diff --git a/pkg/rancher-desktop/components/Images.vue b/pkg/rancher-desktop/components/Images.vue index 376116bae72..942b7e3f913 100644 --- a/pkg/rancher-desktop/components/Images.vue +++ b/pkg/rancher-desktop/components/Images.vue @@ -71,6 +71,7 @@ :current-command="currentCommand" :image-output-culler="imageOutputCuller" :show-status="false" + :image-to-pull="imageToPull" @ok:process-end="resetCurrentCommand" @ok:show="toggleOutput" /> @@ -168,6 +169,7 @@ export default { imageOutputCuller: null, mainWindowScroll: -1, selected: [], + imageToPull: null, }; }, computed: { diff --git a/pkg/rancher-desktop/components/ImagesOutputWindow.vue b/pkg/rancher-desktop/components/ImagesOutputWindow.vue index 0b85f321289..fe936994de4 100644 --- a/pkg/rancher-desktop/components/ImagesOutputWindow.vue +++ b/pkg/rancher-desktop/components/ImagesOutputWindow.vue @@ -30,6 +30,10 @@ export default { type: Boolean, default: true, }, + imageToPull: { + type: String, + default: null, + }, }, data() { diff --git a/pkg/rancher-desktop/pages/images/add.vue b/pkg/rancher-desktop/pages/images/add.vue index 4957d1cf0c9..9749811b1d1 100644 --- a/pkg/rancher-desktop/pages/images/add.vue +++ b/pkg/rancher-desktop/pages/images/add.vue @@ -23,6 +23,7 @@ :current-command="currentCommand" :action="activeTab" :image-output-culler="imageOutputCuller" + :image-to-pull="imageToPull" @ok:process-end="resetCurrentCommand" @ok:show="toggleOutput" /> @@ -89,7 +90,7 @@ export default { this.imageOutputCuller = getImageOutputCuller(command); }, doImageAction({ action, image }) { - this.imageToPull = image; + this.imageToPull = image.trim(); if (action === 'pull') { this.doPullAnImage(); } @@ -99,7 +100,7 @@ export default { } }, doPullAnImage() { - const imageName = this.imageToPull.trim(); + const imageName = this.imageToPull; this.currentCommand = `pull ${ imageName }`; this.startRunningCommand('pull'); @@ -107,7 +108,7 @@ export default { this.showOutput = true; }, doBuildAnImage() { - const imageName = this.imageToPull.trim(); + const imageName = this.imageToPull; this.currentCommand = `build ${ imageName }`; this.startRunningCommand('build'); diff --git a/pkg/rancher-desktop/pages/images/scans/_image-name.vue b/pkg/rancher-desktop/pages/images/scans/_image-name.vue index e5986e2713f..ef144f9b717 100644 --- a/pkg/rancher-desktop/pages/images/scans/_image-name.vue +++ b/pkg/rancher-desktop/pages/images/scans/_image-name.vue @@ -4,6 +4,7 @@ v-if="showOutput" :current-command="currentCommand" :image-output-culler="imageOutputCuller" + :image-to-pull="image" @ok:process-end="onProcessEnd" >