Skip to content

Commit

Permalink
chore: respond to review comments
Browse files Browse the repository at this point in the history
Signed-off-by: Tim deBoer <[email protected]>
  • Loading branch information
deboer-tim committed Mar 28, 2024
1 parent 142f18e commit 547d229
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
3 changes: 0 additions & 3 deletions packages/backend/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,6 @@ export async function openBuildPage(
panel: extensionApi.WebviewPanel,
image: { name: string; tag: string },
): Promise<void> {
console.log('Opening webview for ' + image.name);

// this should use webview reveal function in the future
const webviews = extensionApi.window.listWebviews();
const bootcWebView = (await webviews).find(webview => webview.viewType === 'bootc');
Expand All @@ -112,7 +110,6 @@ export async function openBuildPage(

await panel.webview.postMessage({
id: Messages.MSG_NAVIGATE_BUILD,
// Must pass in an empty body to satisfy the type system. If it is undefined, this fails
body: encodeURIComponent(image.name) + '/' + encodeURIComponent(image.tag),
});
}
Expand Down
1 change: 0 additions & 1 deletion packages/frontend/src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ onMount(() => {
isMounted = true;
return rpcBrowser.subscribe(Messages.MSG_NAVIGATE_BUILD, (x: string) => {
console.log(`Navigating to /build/${x}`);
router.goto(`/build/${x}`);
});
});
Expand Down
6 changes: 2 additions & 4 deletions packages/frontend/src/Build.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,13 @@ async function fillBuildOptions() {
// If an image name and tag were passed in, try to use it as the initially selected image
let initialImage: ImageInfo | undefined;
if (imageName && imageTag) {
console.log('Preselecting image: ' + imageName + ' ' + imageTag);
initialImage = findImage(`${imageName}:${imageTag}`);
}
// If not, use the last image from history if it is valid
if (!initialImage && historyInfo.length > 0) {
const latestBuild = historyInfo[0];
if (!initialImage && historyInfo.length > 0 && historyInfo[0].image && historyInfo[0].tag) {
// Find the image that matches the latest build's name and tag
initialImage = findImage(`${latestBuild.image}:${latestBuild.tag}`);
initialImage = findImage(`${historyInfo[0].image}:${historyInfo[0].tag}`);
}
if (initialImage && initialImage.RepoTags && initialImage.RepoTags.length > 0) {
Expand Down

0 comments on commit 547d229

Please sign in to comment.