Skip to content

Commit 0ce0542

Browse files
gtsiolisroboquat
authored andcommitted
Remove download workspace button from admin
1 parent 2b928f0 commit 0ce0542

File tree

2 files changed

+16
-20
lines changed

2 files changed

+16
-20
lines changed

components/dashboard/src/admin/WorkspaceDetail.tsx

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
*/
66

77
import { User, WorkspaceAndInstance, ContextURL } from "@gitpod/gitpod-protocol";
8-
import { GitpodHostUrl } from "@gitpod/gitpod-protocol/lib/util/gitpod-host-url";
98
import dayjs from "dayjs";
109
import { useEffect, useState } from "react";
1110
import { Link } from "react-router-dom";
@@ -66,18 +65,6 @@ export default function WorkspaceDetail(props: { workspace: WorkspaceAndInstance
6665
</div>
6766
<p>{getProject(WorkspaceAndInstance.toWorkspace(workspace))}</p>
6867
</div>
69-
<button
70-
className="secondary ml-3"
71-
onClick={() => {
72-
window.location.href = new GitpodHostUrl(window.location.href)
73-
.with({
74-
pathname: `/workspace-download/get/${workspace.workspaceId}`,
75-
})
76-
.toString();
77-
}}
78-
>
79-
Download Workspace
80-
</button>
8168
<button
8269
className="danger ml-3"
8370
disabled={activity || workspace.phase === "stopped"}

components/dashboard/src/workspaces/WorkspaceEntry.tsx

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,6 @@ export function WorkspaceEntry({ desc, model, isAdmin, stopWorkspace }: Props) {
5757
pathname: "/start/",
5858
hash: "#" + ws.id,
5959
});
60-
const downloadURL = new GitpodHostUrl(window.location.href)
61-
.with({
62-
pathname: `/workspace-download/get/${ws.id}`,
63-
})
64-
.toString();
6560
const menuEntries: ContextMenuEntry[] = [
6661
{
6762
title: "Open",
@@ -91,8 +86,22 @@ export function WorkspaceEntry({ desc, model, isAdmin, stopWorkspace }: Props) {
9186
}
9287
menuEntries.push({
9388
title: "Download",
94-
href: downloadURL,
95-
download: `${ws.id}.tar`,
89+
customContent: (
90+
<div className="">
91+
<span className="block text-gray-300">Download</span>
92+
<span className="text-gray-400">
93+
Deprecated.{" "}
94+
<a
95+
href="https://github.com/gitpod-io/gitpod/issues/7901"
96+
className="gp-link"
97+
target="_blank"
98+
rel="noreferrer"
99+
>
100+
Learn more
101+
</a>
102+
</span>
103+
</div>
104+
),
96105
});
97106
if (!isAdmin) {
98107
menuEntries.push(

0 commit comments

Comments
 (0)