@@ -81,37 +81,61 @@ const AppEnvList: React.FC<AppEnvListProps> = (props = {}) => {
8181
8282 { currentApp ?. phase === APP_PHASE_STATUS . Started ? (
8383 < >
84- < ConfirmButton
85- headerText = { t ( "SettingPanel.Restart" ) }
86- bodyText = {
87- < Checkbox
88- colorScheme = "primary"
89- mt = { 4 }
90- isChecked = { ! onlyRuntimeFlag }
91- onChange = { ( e ) => setOnlyRuntimeFlag ( ! e . target . checked ) }
84+ { currentApp ?. bundle ?. resource ?. dedicatedDatabase ?. limitCPU ? (
85+ < ConfirmButton
86+ headerText = { t ( "SettingPanel.Restart" ) }
87+ bodyText = {
88+ < Checkbox
89+ colorScheme = "primary"
90+ mt = { 4 }
91+ isChecked = { ! onlyRuntimeFlag }
92+ onChange = { ( e ) => setOnlyRuntimeFlag ( ! e . target . checked ) }
93+ >
94+ { t ( "SettingPanel.RestartTips" ) }
95+ </ Checkbox >
96+ }
97+ confirmButtonText = { String ( t ( "Confirm" ) ) }
98+ onSuccessAction = { async ( event ) => {
99+ event ?. preventDefault ( ) ;
100+ updateCurrentApp ( currentApp ! , APP_STATUS . Restarting , onlyRuntimeFlag ) ;
101+ setOnlyRuntimeFlag ( true ) ;
102+ } }
103+ >
104+ < Button
105+ className = "mr-2"
106+ fontWeight = { "semibold" }
107+ size = { "sm" }
108+ color = { "grayModern.600" }
109+ bg = { "none" }
110+ _hover = { { color : "primary.600" } }
92111 >
93- { t ( "SettingPanel.RestartTips" ) }
94- </ Checkbox >
95- }
96- confirmButtonText = { String ( t ( "Confirm" ) ) }
97- onSuccessAction = { async ( event ) => {
98- event ?. preventDefault ( ) ;
99- updateCurrentApp ( currentApp ! , APP_STATUS . Restarting , onlyRuntimeFlag ) ;
100- setOnlyRuntimeFlag ( true ) ;
101- } }
102- >
103- < Button
104- className = "mr-2"
105- fontWeight = { "semibold" }
106- size = { "sm" }
107- color = { "grayModern.600" }
108- bg = { "none" }
109- _hover = { { color : "primary.600" } }
112+ < MdRestartAlt size = { 16 } className = "mr-1" />
113+ { t ( "SettingPanel.Restart" ) }
114+ </ Button >
115+ </ ConfirmButton >
116+ ) : (
117+ < ConfirmButton
118+ headerText = { t ( "SettingPanel.Restart" ) }
119+ bodyText = { t ( "SettingPanel.RestartTips1" ) }
120+ confirmButtonText = { String ( t ( "Confirm" ) ) }
121+ onSuccessAction = { async ( event ) => {
122+ event ?. preventDefault ( ) ;
123+ updateCurrentApp ( currentApp ! , APP_STATUS . Restarting ) ;
124+ } }
110125 >
111- < MdRestartAlt size = { 16 } className = "mr-1" />
112- { t ( "SettingPanel.Restart" ) }
113- </ Button >
114- </ ConfirmButton >
126+ < Button
127+ className = "mr-2"
128+ fontWeight = { "semibold" }
129+ size = { "sm" }
130+ color = { "grayModern.600" }
131+ bg = { "none" }
132+ _hover = { { color : "primary.600" } }
133+ >
134+ < MdRestartAlt size = { 16 } className = "mr-1" />
135+ { t ( "SettingPanel.Restart" ) }
136+ </ Button >
137+ </ ConfirmButton >
138+ ) }
115139
116140 < Button
117141 className = "mr-2"
0 commit comments