File tree Expand file tree Collapse file tree 1 file changed +15
-6
lines changed
frontend/src/views/container/compose Expand file tree Collapse file tree 1 file changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -441,17 +441,20 @@ const handleComposeOperate = async (operation: 'up' | 'stop' | 'restart', row: a
441441 loading .value = true ;
442442 const params = {
443443 name: row .name ,
444- path: currentCompose . value .path ,
444+ path: row .path ,
445445 operation: operation ,
446446 withFile: false ,
447447 force: false ,
448448 };
449449 await composeOperator (params )
450- .then (() => {
450+ .then (async () => {
451451 MsgSuccess (i18n .global .t (' commons.msg.operationSuccess' ));
452- search ();
453- if (row .name === currentCompose .value ?.name ) {
454- loadDetail (currentCompose .value , true );
452+ await search ();
453+ if (currentCompose .value ) {
454+ const updated = data .value .find ((item ) => item .name === currentCompose .value .name );
455+ if (updated ) {
456+ await loadDetail (updated , true );
457+ }
455458 }
456459 })
457460 .finally (() => {
@@ -480,7 +483,13 @@ const onSubmitEdit = async () => {
480483 await composeUpdate (param )
481484 .then (async () => {
482485 MsgSuccess (i18n .global .t (' commons.msg.operationSuccess' ));
483- await loadDetail (currentCompose .value , true );
486+ await search ();
487+ if (currentCompose .value ) {
488+ const updated = data .value .find ((item ) => item .name === currentCompose .value .name );
489+ if (updated ) {
490+ await loadDetail (updated , true );
491+ }
492+ }
484493 })
485494 .finally (() => {
486495 loading .value = false ;
You can’t perform that action at this time.
0 commit comments