Skip to content

Commit 351abd5

Browse files
msivasubramaniaanvrubezhny
authored andcommitted
add progress while getting info
1 parent c4472a1 commit 351abd5

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

src/deployment.ts

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import { validateRFC1123DNSLabel } from './openshift/nameValidator';
1414
import { inputValue, quickBtn } from './util/inputValue';
1515
import { vsCommand } from './vscommand';
1616
import { OpenShiftTerminalManager } from './webview/openshift-terminal/openShiftTerminal';
17+
import { Progress } from './util/progress';
1718

1819
export class Deployment {
1920

@@ -162,14 +163,19 @@ export class Deployment {
162163
}));
163164

164165
disposables.push(inputBox.onDidAccept(async (_e) => {
165-
166166
//check url has image
167167
if (inputBox.validationMessage === undefined && inputBox.value !== undefined) {
168-
if (! await Oc.Instance.hasImageInfo(inputBox.value)) {
169-
inputBox.validationMessage = 'Image referece is not valid'
170-
} else {
171-
inputBox.validationMessage = undefined;
172-
}
168+
inputBox.busy = true;
169+
inputBox.enabled = false;
170+
await Progress.execFunctionWithProgress(`Fetching Image info ${inputBox.value}`, async () => {
171+
if (! await Oc.Instance.hasImageInfo(inputBox.value)) {
172+
inputBox.validationMessage = 'Image referece is not valid'
173+
} else {
174+
inputBox.validationMessage = undefined;
175+
}
176+
});
177+
inputBox.enabled = true;
178+
inputBox.busy = false;
173179
}
174180

175181
if (inputBox.validationMessage === undefined && inputBox.value !== undefined) {

0 commit comments

Comments
 (0)