Skip to content

Commit

Permalink
Merge pull request #7561 from VikalpRusia/improve-readablity
Browse files Browse the repository at this point in the history
Fix: Ensure Image Name Reflects in ImagesOutputWindow During Build/Pull
  • Loading branch information
mook-as authored Oct 1, 2024
2 parents f7879df + 139600a commit b25d842
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
2 changes: 2 additions & 0 deletions pkg/rancher-desktop/components/Images.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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"
/>
Expand Down Expand Up @@ -168,6 +169,7 @@ export default {
imageOutputCuller: null,
mainWindowScroll: -1,
selected: [],
imageToPull: null,
};
},
computed: {
Expand Down
4 changes: 4 additions & 0 deletions pkg/rancher-desktop/components/ImagesOutputWindow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ export default {
type: Boolean,
default: true,
},
imageToPull: {
type: String,
default: null,
},
},
data() {
Expand Down
7 changes: 4 additions & 3 deletions pkg/rancher-desktop/pages/images/add.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
:current-command="currentCommand"
:action="activeTab"
:image-output-culler="imageOutputCuller"
:image-to-pull="imageToPull"
@ok:process-end="resetCurrentCommand"
@ok:show="toggleOutput"
/>
Expand Down Expand Up @@ -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();
}
Expand All @@ -99,15 +100,15 @@ export default {
}
},
doPullAnImage() {
const imageName = this.imageToPull.trim();
const imageName = this.imageToPull;
this.currentCommand = `pull ${ imageName }`;
this.startRunningCommand('pull');
ipcRenderer.send('do-image-pull', imageName);
this.showOutput = true;
},
doBuildAnImage() {
const imageName = this.imageToPull.trim();
const imageName = this.imageToPull;
this.currentCommand = `build ${ imageName }`;
this.startRunningCommand('build');
Expand Down
1 change: 1 addition & 0 deletions pkg/rancher-desktop/pages/images/scans/_image-name.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
v-if="showOutput"
:current-command="currentCommand"
:image-output-culler="imageOutputCuller"
:image-to-pull="image"
@ok:process-end="onProcessEnd"
>
<template #loading="{ isLoading }">
Expand Down

0 comments on commit b25d842

Please sign in to comment.