Skip to content

Remove download workspace button from the workspaces list and admin dashboard #14393

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions components/dashboard/src/admin/WorkspaceDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
*/

import { User, WorkspaceAndInstance, ContextURL } from "@gitpod/gitpod-protocol";
import { GitpodHostUrl } from "@gitpod/gitpod-protocol/lib/util/gitpod-host-url";
import dayjs from "dayjs";
import { useEffect, useState } from "react";
import { Link } from "react-router-dom";
Expand Down Expand Up @@ -66,18 +65,6 @@ export default function WorkspaceDetail(props: { workspace: WorkspaceAndInstance
</div>
<p>{getProject(WorkspaceAndInstance.toWorkspace(workspace))}</p>
</div>
<button
className="secondary ml-3"
onClick={() => {
window.location.href = new GitpodHostUrl(window.location.href)
.with({
pathname: `/workspace-download/get/${workspace.workspaceId}`,
})
.toString();
}}
>
Download Workspace
</button>
<button
className="danger ml-3"
disabled={activity || workspace.phase === "stopped"}
Expand Down
23 changes: 16 additions & 7 deletions components/dashboard/src/workspaces/WorkspaceEntry.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,6 @@ export function WorkspaceEntry({ desc, model, isAdmin, stopWorkspace }: Props) {
pathname: "/start/",
hash: "#" + ws.id,
});
const downloadURL = new GitpodHostUrl(window.location.href)
.with({
pathname: `/workspace-download/get/${ws.id}`,
})
.toString();
const menuEntries: ContextMenuEntry[] = [
{
title: "Open",
Expand Down Expand Up @@ -91,8 +86,22 @@ export function WorkspaceEntry({ desc, model, isAdmin, stopWorkspace }: Props) {
}
menuEntries.push({
title: "Download",
href: downloadURL,
download: `${ws.id}.tar`,
customContent: (
<div className="">
<span className="block text-gray-300">Download</span>
<span className="text-gray-400">
Deprecated.{" "}
<a
href="https://github.com/gitpod-io/gitpod/issues/7901"
className="gp-link"
target="_blank"
rel="noreferrer"
>
Learn more
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This currently links to #7901 as a minimal viable change. If and when we have a section in the docs we can link to for extensive explanation we could do that. Cc @kylos101 @atduarte

From #14364 (comment):

Current state of #14393
Screenshot 2022-11-03 at 3 06 37 PM

</a>
</span>
</div>
),
});
if (!isAdmin) {
menuEntries.push(
Expand Down