Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
gitpod-io
GitHub Repository: gitpod-io/gitpod
Path: blob/main/components/dashboard/src/admin/ProjectDetail.tsx
2500 views
1
/**
2
* Copyright (c) 2022 Gitpod GmbH. All rights reserved.
3
* Licensed under the GNU Affero General Public License (AGPL).
4
* See License.AGPL.txt in the project root for license information.
5
*/
6
7
import { Link } from "react-router-dom";
8
import { Project } from "@gitpod/gitpod-protocol";
9
import Property from "./Property";
10
import dayjs from "dayjs";
11
import { PrebuildsList } from "../prebuilds/list/PrebuildList";
12
import { Heading2, Heading3, Subheading } from "@podkit/typography/Headings";
13
14
type Props = {
15
project: Project;
16
owner?: string;
17
};
18
export default function ProjectDetail({ project, owner }: Props) {
19
return (
20
<div className="app-container">
21
<div className="flex mt-8">
22
<div className="flex-1">
23
<div className="flex">
24
<Heading2>{project.name}</Heading2>
25
<span className="my-auto"></span>
26
</div>
27
<Subheading>{project.cloneUrl}</Subheading>
28
</div>
29
</div>
30
<div className="flex flex-col w-full">
31
<div className="flex w-full mt-6">
32
<Property name="Created">{dayjs(project.creationTime).format("MMM D, YYYY")}</Property>
33
<Property name="Repository">
34
<a
35
className="text-blue-400 dark:text-blue-600 hover:text-blue-600 dark:hover:text-blue-400 truncate"
36
href={project.cloneUrl}
37
>
38
{project.name}
39
</a>
40
</Property>
41
<Property name="Owner">
42
<Link
43
className="text-blue-400 dark:text-blue-600 hover:text-blue-600 dark:hover:text-blue-400 truncate"
44
to={"/admin/orgs/" + project.teamId}
45
>
46
{owner}
47
</Link>
48
<span className="text-gray-400 dark:text-gray-500"> (Organization)</span>
49
</Property>
50
</div>
51
<div className="flex w-full mt-6">
52
<Property name="Marked Deleted">{project.markedDeleted ? "Yes" : "No"}</Property>
53
</div>
54
</div>
55
<div className="mt-6">
56
<Heading3 className="mb-4">Prebuilds</Heading3>
57
<PrebuildsList
58
initialFilter={{ configurationId: project.id }}
59
organizationId={project.teamId}
60
hideOrgSpecificControls
61
/>
62
</div>
63
</div>
64
);
65
}
66
67