Skip to content

Commit fca5670

Browse files
geroplroboquat
authored andcommitted
[dashboard] Fix displaying of snapshot contexts on /workspaces
1 parent f290849 commit fca5670

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

components/dashboard/src/workspaces/WorkspaceEntry.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,8 @@ export function WorkspaceEntry({ desc, model, isAdmin, stopWorkspace }: Props) {
149149
}
150150
};
151151

152-
const normalizedContextUrl = ContextURL.getNormalizedURL(ws)?.toString() || "undefined";
152+
const normalizedContextUrl = ContextURL.getNormalizedURL(ws)?.toString();
153+
const normalizedContextUrlDescription = normalizedContextUrl || ws.contextURL; // Instead of showing nothing, we prefer to show the raw content instead
153154
return (
154155
<Item className="whitespace-nowrap py-6 px-6">
155156
<ItemFieldIcon>
@@ -175,7 +176,7 @@ export function WorkspaceEntry({ desc, model, isAdmin, stopWorkspace }: Props) {
175176
</div>
176177
<a href={normalizedContextUrl}>
177178
<div className="text-sm text-gray-400 dark:text-gray-500 overflow-ellipsis truncate hover:text-blue-600 dark:hover:text-blue-400">
178-
{normalizedContextUrl}
179+
{normalizedContextUrlDescription}
179180
</div>
180181
</a>
181182
</ItemField>

components/gitpod-protocol/src/context-url.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export namespace ContextURL {
3838
try {
3939
return new URL(normalized);
4040
} catch (err) {
41-
console.error(`unable to parse URL from normalized contextURL: '${normalized}'`, err);
41+
console.debug(`unable to parse URL from normalized contextURL: '${normalized}'`);
4242
}
4343
return undefined;
4444
}

0 commit comments

Comments
 (0)