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