diff --git a/components/dashboard/public/complete-auth/index.html b/components/dashboard/public/complete-auth/index.html index 63426d0f84f353..0f04ecc461346c 100644 --- a/components/dashboard/public/complete-auth/index.html +++ b/components/dashboard/public/complete-auth/index.html @@ -21,6 +21,6 @@ - If this tab is not closed automatically, feel free to close it and proceed. + If this tab is not closed automatically, feel free to close it and proceed. diff --git a/components/dashboard/src/FromReferrer.tsx b/components/dashboard/src/FromReferrer.tsx index 3ef72dddc2665a..8b9c5cb7ffafe6 100644 --- a/components/dashboard/src/FromReferrer.tsx +++ b/components/dashboard/src/FromReferrer.tsx @@ -4,7 +4,7 @@ * See License.AGPL.txt in the project root for license information. */ -import { Link } from "react-router-dom"; +import { LinkButton } from "@podkit/buttons/LinkButton"; export default function FromReferrer() { const contextUrl = document.referrer; @@ -36,9 +36,9 @@ export default function FromReferrer() {

- - - + + Go to Dashboard + diff --git a/components/dashboard/src/Login.tsx b/components/dashboard/src/Login.tsx index fb7c2a41142b37..f8eaa99b135d30 100644 --- a/components/dashboard/src/Login.tsx +++ b/components/dashboard/src/Login.tsx @@ -21,6 +21,8 @@ import { useAuthProviderDescriptions } from "./data/auth-providers/auth-provider import { SetupPending } from "./login/SetupPending"; import { useNeedsSetup } from "./dedicated-setup/use-needs-setup"; import { AuthProviderDescription } from "@gitpod/public-api/lib/gitpod/v1/authprovider_pb"; +import { Button, ButtonProps } from "@podkit/buttons/Button"; +import { cn } from "@podkit/lib/cn"; export function markLoggedIn() { document.cookie = GitpodCookie.generateCookie(window.location.hostname); @@ -153,28 +155,23 @@ export const Login: FC = ({ onLoggedIn }) => {
{providerFromContext ? ( - + ) : ( authProviders.data?.map((ap) => ( - + )) )} = ({ onLoggedIn }) => {
); }; + +// TODO: Do we really want a different style button for the login page, or could we use our normal secondary variant? +type LoginButtonProps = { + onClick: ButtonProps["onClick"]; +}; +const LoginButton: FC = ({ children, onClick }) => { + return ( + + ); +}; diff --git a/components/dashboard/src/OauthClientApproval.tsx b/components/dashboard/src/OauthClientApproval.tsx index 8ad6adf2128037..b1bb5dd3d5ea24 100644 --- a/components/dashboard/src/OauthClientApproval.tsx +++ b/components/dashboard/src/OauthClientApproval.tsx @@ -4,6 +4,7 @@ * See License.AGPL.txt in the project root for license information. */ +import { Button } from "@podkit/buttons/Button"; import gitpodIcon from "./icons/gitpod.svg"; export default function OAuthClientApproval() { @@ -42,12 +43,12 @@ export default function OAuthClientApproval() {
- - + +
diff --git a/components/dashboard/src/admin/BlockedEmailDomains.tsx b/components/dashboard/src/admin/BlockedEmailDomains.tsx index 80336a93468ad8..d664fa5c45572a 100644 --- a/components/dashboard/src/admin/BlockedEmailDomains.tsx +++ b/components/dashboard/src/admin/BlockedEmailDomains.tsx @@ -16,7 +16,7 @@ import searchIcon from "../icons/search.svg"; import { getGitpodService } from "../service/service"; import { AdminPageHeader } from "./AdminPageHeader"; import Pagination from "../Pagination/Pagination"; -import { Button } from "../components/Button"; +import { Button } from "@podkit/buttons/Button"; export function BlockedEmailDomains() { return ( @@ -127,7 +127,7 @@ export function BlockedEmailDomainsList(props: Props) { />
- +
@@ -231,10 +231,10 @@ function AddBlockedDomainModal(p: AddBlockedDomainModalProps) {
- - + ); diff --git a/components/dashboard/src/admin/BlockedRepositories.tsx b/components/dashboard/src/admin/BlockedRepositories.tsx index fa976f713a7307..66c9c92480fc35 100644 --- a/components/dashboard/src/admin/BlockedRepositories.tsx +++ b/components/dashboard/src/admin/BlockedRepositories.tsx @@ -17,7 +17,7 @@ import { ContextMenuEntry } from "../components/ContextMenu"; import Alert from "../components/Alert"; import { SpinnerLoader } from "../components/Loader"; import searchIcon from "../icons/search.svg"; -import { Button } from "../components/Button"; +import { Button } from "@podkit/buttons/Button"; export function BlockedRepositories() { return ( @@ -144,7 +144,7 @@ export function BlockedRepositoriesList(props: Props) { />
- +
@@ -235,10 +235,10 @@ function AddBlockedRepositoryModal(p: AddBlockedRepositoryModalProps) {
- - + ); diff --git a/components/dashboard/src/admin/TeamDetail.tsx b/components/dashboard/src/admin/TeamDetail.tsx index befeac25657624..1a4b5671966a15 100644 --- a/components/dashboard/src/admin/TeamDetail.tsx +++ b/components/dashboard/src/admin/TeamDetail.tsx @@ -19,6 +19,7 @@ import { CostCenterJSON, CostCenter_BillingStrategy } from "@gitpod/gitpod-proto import Modal from "../components/Modal"; import { Heading2 } from "../components/typography/headings"; import search from "../icons/search.svg"; +import { Button } from "@podkit/buttons/Button"; export default function TeamDetail(props: { team: Team }) { const { team } = props; @@ -226,7 +227,7 @@ export default function TeamDetail(props: { team: Team }) { onClose={() => setEditSpendingLimit(false)} title="Change Usage Limit" buttons={[ - , + , ]} >

Change the usage limit in credits per month.

@@ -260,7 +261,7 @@ export default function TeamDetail(props: { team: Team }) { onClose={() => setEditAddCreditNote(false)} title="Add Credits" buttons={[ - , + , ]} >

Adds or subtracts the amount of credits from this account.

diff --git a/components/dashboard/src/admin/UserDetail.tsx b/components/dashboard/src/admin/UserDetail.tsx index 700c8fc936def6..33efc6f99846d5 100644 --- a/components/dashboard/src/admin/UserDetail.tsx +++ b/components/dashboard/src/admin/UserDetail.tsx @@ -21,6 +21,7 @@ import Property from "./Property"; import { AdminPageHeader } from "./AdminPageHeader"; import { CheckboxInputField, CheckboxListField } from "../components/forms/CheckboxInputField"; import { Heading2, Subheading } from "../components/typography/headings"; +import { Button } from "@podkit/buttons/Button"; export default function UserDetail(p: { user: User }) { const [activity, setActivity] = useState(false); @@ -92,16 +93,16 @@ export default function UserDetail(p: { user: User }) { {!user.lastVerificationTime ? ( - + ) : null} - - + +
@@ -151,9 +152,9 @@ export default function UserDetail(p: { user: User }) { onClose={() => setEditFeatureFlags(false)} title="Edit Feature Flags" buttons={[ - , + , ]} > setEditRoles(false)} title="Edit Roles" buttons={[ - , + , ]} >
- - +
diff --git a/components/dashboard/src/app/Blocked.tsx b/components/dashboard/src/app/Blocked.tsx index a0464a1065ad29..89e4d0112e0dcd 100644 --- a/components/dashboard/src/app/Blocked.tsx +++ b/components/dashboard/src/app/Blocked.tsx @@ -7,6 +7,7 @@ import { FunctionComponent } from "react"; import { Heading1, Subheading } from "../components/typography/headings"; import gitpodIcon from "../icons/gitpod.svg"; +import { Button } from "@podkit/buttons/Button"; export const Blocked: FunctionComponent = () => { return ( @@ -23,7 +24,7 @@ export const Blocked: FunctionComponent = () => { . - +
); diff --git a/components/dashboard/src/components/Button.tsx b/components/dashboard/src/components/Button.tsx index 3a0bc0f379e1ca..d2497e3a8de076 100644 --- a/components/dashboard/src/components/Button.tsx +++ b/components/dashboard/src/components/Button.tsx @@ -26,6 +26,9 @@ export type ButtonProps = { // Allow w/ or w/o handling event argument type ButtonOnClickHandler = React.DOMAttributes["onClick"] | (() => void); +/** + * @deprecated use `@podkit/buttons/Button` instead + */ export const Button = forwardRef( ( { diff --git a/components/dashboard/src/components/Modal.tsx b/components/dashboard/src/components/Modal.tsx index 1fa8b5b0302c2a..8022be3721fb67 100644 --- a/components/dashboard/src/components/Modal.tsx +++ b/components/dashboard/src/components/Modal.tsx @@ -13,6 +13,7 @@ import Alert, { AlertProps } from "./Alert"; import "./modal.css"; import classNames from "classnames"; import { useTrackEvent } from "../data/tracking/track-event-mutation"; +import { Button } from "@podkit/buttons/Button"; type CloseModalManner = "esc" | "enter" | "x" | "click_outside"; @@ -239,17 +240,17 @@ type ModalCloseIconProps = { }; const ModalCloseIcon: FC = ({ onClose }) => { return ( - // TODO: Create an IconButton component - + ); }; diff --git a/components/dashboard/src/components/PrebuildLogs.tsx b/components/dashboard/src/components/PrebuildLogs.tsx index 6815c5cd3d91d6..6fc5547062fe9f 100644 --- a/components/dashboard/src/components/PrebuildLogs.tsx +++ b/components/dashboard/src/components/PrebuildLogs.tsx @@ -176,7 +176,7 @@ export default function PrebuildLogs(props: PrebuildLogsProps) {
-
+
{prebuild && }
{props.children} diff --git a/components/dashboard/src/components/UsageBasedBillingConfig.tsx b/components/dashboard/src/components/UsageBasedBillingConfig.tsx index 008319bec108d6..8f8995237db163 100644 --- a/components/dashboard/src/components/UsageBasedBillingConfig.tsx +++ b/components/dashboard/src/components/UsageBasedBillingConfig.tsx @@ -17,11 +17,12 @@ import { getGitpodService } from "../service/service"; import Alert from "./Alert"; import { Subheading } from "./typography/headings"; import { AddPaymentMethodModal } from "./billing/AddPaymentMethodModal"; -import { Button } from "./Button"; import { useCreateHoldPaymentIntentMutation } from "../data/billing/create-hold-payment-intent-mutation"; import { useToast } from "./toasts/Toasts"; import { ProgressBar } from "./ProgressBar"; import { useListOrganizationMembers } from "../data/organizations/members-query"; +import { Button } from "@podkit/buttons/Button"; +import { LoadingButton } from "@podkit/buttons/LoadingButton"; const BASE_USAGE_LIMIT_FOR_STRIPE_USERS = 1000; @@ -293,7 +294,7 @@ export default function UsageBasedBillingConfig({ hideSubheading = false }: Prop "YYYY-MM-DD", )}`} > - +
@@ -331,14 +332,14 @@ export default function UsageBasedBillingConfig({ hideSubheading = false }: Prop
{stripePortalUrl && ( - + )} - +
@@ -358,9 +359,9 @@ export default function UsageBasedBillingConfig({ hideSubheading = false }: Prop - + @@ -445,12 +446,12 @@ function UpdateLimitModal(props: { - - + ); diff --git a/components/dashboard/src/components/UsageLimitReachedModal.tsx b/components/dashboard/src/components/UsageLimitReachedModal.tsx index fc6a2c36c7ca0d..35d870a4fee429 100644 --- a/components/dashboard/src/components/UsageLimitReachedModal.tsx +++ b/components/dashboard/src/components/UsageLimitReachedModal.tsx @@ -4,6 +4,7 @@ * See License.AGPL.txt in the project root for license information. */ +import { Button } from "@podkit/buttons/Button"; import { useCurrentOrg } from "../data/organizations/orgs-query"; import Alert from "./Alert"; import Modal from "./Modal"; @@ -35,7 +36,7 @@ export function UsageLimitReachedModal(p: { hints: any; onClose?: () => void })
- +
diff --git a/components/dashboard/src/components/error-boundaries/ReloadPageErrorBoundary.tsx b/components/dashboard/src/components/error-boundaries/ReloadPageErrorBoundary.tsx index c9385fa3eae616..846bec11aa953a 100644 --- a/components/dashboard/src/components/error-boundaries/ReloadPageErrorBoundary.tsx +++ b/components/dashboard/src/components/error-boundaries/ReloadPageErrorBoundary.tsx @@ -9,6 +9,7 @@ import { ErrorBoundary, ErrorBoundaryProps, FallbackProps } from "react-error-bo import gitpodIcon from "../../icons/gitpod.svg"; import { Heading1, Subheading } from "../typography/headings"; import { reportError } from "../../service/metrics"; +import { Button } from "@podkit/buttons/Button"; export type CaughtError = Error & { code?: number }; @@ -48,7 +49,7 @@ export const ReloadPageErrorFallback: FC> = ({ erro .
- +
{caughtError.code && ( diff --git a/components/dashboard/src/components/podkit/buttons/Button.tsx b/components/dashboard/src/components/podkit/buttons/Button.tsx index 9c963384ecccab..319892d2630774 100644 --- a/components/dashboard/src/components/podkit/buttons/Button.tsx +++ b/components/dashboard/src/components/podkit/buttons/Button.tsx @@ -20,7 +20,7 @@ export const buttonVariants = cva( outline: "border border-input bg-transparent hover:bg-kumquat-ripe hover:text-gray-600", secondary: "bg-gray-100 dark:bg-gray-700 hover:bg-gray-200 dark:hover:bg-gray-600 text-gray-500 dark:text-gray-100 hover:text-gray-600", - ghost: "bg-transparent hover:bg-gray-100 hover:text-gray-600 text-gray-500", + ghost: "bg-transparent hover:opacity-50", link: "text-gray-500 dark:text-gray-100 underline-offset-4 hover:underline", }, size: { diff --git a/components/dashboard/src/components/podkit/loading/LoadingState.tsx b/components/dashboard/src/components/podkit/loading/LoadingState.tsx index 84d0688ecbd4fc..848348be9273c6 100644 --- a/components/dashboard/src/components/podkit/loading/LoadingState.tsx +++ b/components/dashboard/src/components/podkit/loading/LoadingState.tsx @@ -6,11 +6,17 @@ import { Loader2 } from "lucide-react"; import { Delayed } from "./Delayed"; +import { FC } from "react"; -export const LoadingState = () => { - return ( - - - - ); +type Props = { + delay?: boolean; +}; +export const LoadingState: FC = ({ delay = true }) => { + const loader = ; + + if (!delay) { + return loader; + } + + return {loader}; }; diff --git a/components/dashboard/src/components/podkit/tables/SortableTable.tsx b/components/dashboard/src/components/podkit/tables/SortableTable.tsx new file mode 100644 index 00000000000000..b7850de71e1e1e --- /dev/null +++ b/components/dashboard/src/components/podkit/tables/SortableTable.tsx @@ -0,0 +1,44 @@ +/** + * Copyright (c) 2023 Gitpod GmbH. All rights reserved. + * Licensed under the GNU Affero General Public License (AGPL). + * See License.AGPL.txt in the project root for license information. + */ + +import React, { useCallback } from "react"; +import { HideableCellProps, TableHead } from "./Table"; +import { Button } from "@podkit/buttons/Button"; +import { ChevronDownIcon, ChevronUpIcon } from "lucide-react"; +import { cn } from "@podkit/lib/cn"; + +export type TableSortOrder = "asc" | "desc"; + +export type SortableTableHeadProps = { + columnName: string; + sortOrder?: TableSortOrder; + onSort: (sortBy: string, sortOrder: TableSortOrder) => void; +} & HideableCellProps; +export const SortableTableHead = React.forwardRef< + HTMLTableCellElement, + React.HTMLAttributes & SortableTableHeadProps +>(({ columnName, sortOrder, children, onSort, ...props }, ref) => { + const handleClick = useCallback(() => { + onSort(columnName, sortOrder === "asc" ? "desc" : "asc"); + }, [onSort, columnName, sortOrder]); + + return ( + + + + ); +}); +SortableTableHead.displayName = "SortableTableHead"; diff --git a/components/dashboard/src/components/podkit/tables/Table.tsx b/components/dashboard/src/components/podkit/tables/Table.tsx index e9cf888cc4010a..585c9b6ea0fd07 100644 --- a/components/dashboard/src/components/podkit/tables/Table.tsx +++ b/components/dashboard/src/components/podkit/tables/Table.tsx @@ -7,7 +7,7 @@ import { cn } from "@podkit/lib/cn"; import React from "react"; -type HideableCellProps = { +export type HideableCellProps = { hideOnSmallScreen?: boolean; }; diff --git a/components/dashboard/src/components/toasts/Toast.tsx b/components/dashboard/src/components/toasts/Toast.tsx index 7f53dc95675763..52554d86a9f182 100644 --- a/components/dashboard/src/components/toasts/Toast.tsx +++ b/components/dashboard/src/components/toasts/Toast.tsx @@ -4,11 +4,12 @@ * See License.AGPL.txt in the project root for license information. */ -import classNames from "classnames"; import { FC, useCallback, useEffect, useRef } from "react"; import { useId } from "../../hooks/useId"; import { ToastEntry } from "./reducer"; import { ReactComponent as CloseIcon } from "../../images/x.svg"; +import { Button } from "@podkit/buttons/Button"; +import { cn } from "@podkit/lib/cn"; type Props = ToastEntry & { onRemove: (id: string) => void; @@ -66,7 +67,7 @@ export const Toast: FC = ({ id, message, duration = 5000, autoHide = true return (
= ({ id, message, duration = 5000, autoHide = true {typeof message === "string" ?

{message}

: message}
- +
); diff --git a/components/dashboard/src/data/configurations/configuration-queries.ts b/components/dashboard/src/data/configurations/configuration-queries.ts index 3329c673bf5d76..712c22e117b8fb 100644 --- a/components/dashboard/src/data/configurations/configuration-queries.ts +++ b/components/dashboard/src/data/configurations/configuration-queries.ts @@ -7,6 +7,8 @@ import { useInfiniteQuery, useMutation, useQuery, useQueryClient } from "@tanstack/react-query"; import { useCurrentOrg } from "../organizations/orgs-query"; import { configurationClient } from "../../service/public-api"; +import { SortOrder } from "@gitpod/public-api/lib/gitpod/v1/sorting_pb"; +import { TableSortOrder } from "@podkit/tables/SortableTable"; import type { Configuration, UpdateConfigurationRequest } from "@gitpod/public-api/lib/gitpod/v1/configuration_pb"; import type { PartialMessage } from "@bufbuild/protobuf"; @@ -15,13 +17,15 @@ const BASE_KEY = "configurations"; type ListConfigurationsArgs = { pageSize?: number; searchTerm?: string; + sortBy: string; + sortOrder: TableSortOrder; }; -export const useListConfigurations = ({ searchTerm = "", pageSize }: ListConfigurationsArgs) => { +export const useListConfigurations = ({ searchTerm = "", pageSize, sortBy, sortOrder }: ListConfigurationsArgs) => { const { data: org } = useCurrentOrg(); return useInfiniteQuery( - getListConfigurationsQueryKey(org?.id || "", { searchTerm, pageSize }), + getListConfigurationsQueryKey(org?.id || "", { searchTerm, pageSize, sortBy, sortOrder }), // QueryFn receives the past page's pageParam as it's argument async ({ pageParam: nextToken }) => { if (!org) { @@ -32,6 +36,12 @@ export const useListConfigurations = ({ searchTerm = "", pageSize }: ListConfigu organizationId: org.id, searchTerm, pagination: { pageSize, token: nextToken }, + sort: [ + { + field: sortBy, + order: sortOrder === "desc" ? SortOrder.DESC : SortOrder.ASC, + }, + ], }); return { diff --git a/components/dashboard/src/feedback-form/FeedbackComponent.tsx b/components/dashboard/src/feedback-form/FeedbackComponent.tsx index 35b94e3638c372..ac23fc6369d45a 100644 --- a/components/dashboard/src/feedback-form/FeedbackComponent.tsx +++ b/components/dashboard/src/feedback-form/FeedbackComponent.tsx @@ -12,6 +12,8 @@ import crying from "../images/feedback/crying-emoji.svg"; import { trackEvent, TrackFeedback } from "../Analytics"; import { StartWorkspaceError } from "../start/StartPage"; import { Heading2 } from "../components/typography/headings"; +import { Button } from "@podkit/buttons/Button"; +import { cn } from "@podkit/lib/cn"; function FeedbackComponent(props: { onClose?: () => void; @@ -60,15 +62,15 @@ function FeedbackComponent(props: { { id: 4, name: "starry", src: starry }, ]; return emojiList.map((emoji) => ( - + )); }; @@ -94,7 +96,9 @@ function FeedbackComponent(props: { {props.message}

-
{emojiGroup(props.initialSize || 50)}
+
+ {emojiGroup(props.initialSize || 50)} +
)} {expandedWithTextView && ( @@ -130,12 +134,12 @@ function FeedbackComponent(props: {
{emojiGroup(24)}
- - + +
diff --git a/components/dashboard/src/index.css b/components/dashboard/src/index.css index 52ab6f44029dea..08ee218bd00a67 100644 --- a/components/dashboard/src/index.css +++ b/components/dashboard/src/index.css @@ -41,9 +41,6 @@ .app-container { @apply lg:px-28 px-4; } - .btn-login { - @apply rounded-md border-none bg-gray-100 hover:bg-gray-200 text-gray-500 dark:text-gray-200 dark:bg-gray-800 dark:hover:bg-gray-600; - } .dark .dark\:filter-invert { @apply filter-invert; } @@ -56,27 +53,6 @@ } @layer components { - /* TODO: deprecate button styles in favor of using + diff --git a/components/dashboard/src/projects/Prebuild.tsx b/components/dashboard/src/projects/Prebuild.tsx index 8b7fa57cb11e4e..72ea7ae17815f0 100644 --- a/components/dashboard/src/projects/Prebuild.tsx +++ b/components/dashboard/src/projects/Prebuild.tsx @@ -16,6 +16,7 @@ import { shortCommitMessage } from "./render-utils"; import { prebuildClient, watchPrebuild } from "../service/public-api"; import { Prebuild, PrebuildPhase_Phase } from "@gitpod/public-api/lib/gitpod/v1/prebuild_pb"; import { gitpodHostUrl } from "../service/service"; +import { Button } from "@podkit/buttons/Button"; export default function PrebuildPage() { const history = useHistory(); @@ -136,8 +137,9 @@ export default function PrebuildPage() { {[PrebuildPhase_Phase.BUILDING, PrebuildPhase_Phase.QUEUED].includes( prebuild?.status?.phase?.name || PrebuildPhase_Phase.UNSPECIFIED, ) ? ( - + ) : ( <> - + {prebuild?.status?.phase?.name === PrebuildPhase_Phase.AVAILABLE ? ( - + ) : ( - + )} )} diff --git a/components/dashboard/src/projects/Prebuilds.tsx b/components/dashboard/src/projects/Prebuilds.tsx index 4f4b9014fa64eb..74aba58ac982e7 100644 --- a/components/dashboard/src/projects/Prebuilds.tsx +++ b/components/dashboard/src/projects/Prebuilds.tsx @@ -24,6 +24,7 @@ import search from "../icons/search.svg"; import Tooltip from "../components/Tooltip"; import { prebuildClient, watchPrebuild } from "../service/public-api"; import { Prebuild, PrebuildPhase_Phase } from "@gitpod/public-api/lib/gitpod/v1/prebuild_pb"; +import { Button } from "@podkit/buttons/Button"; export default function PrebuildsPage(props: { project?: Project; isAdminDashboard?: boolean }) { const currentProject = useCurrentProject(); @@ -173,7 +174,7 @@ export default function PrebuildsPage(props: { project?: Project; isAdminDashboa {!props.isAdminDashboard && ( - + )} diff --git a/components/dashboard/src/projects/Project.tsx b/components/dashboard/src/projects/Project.tsx index 023999f5825f99..ee3f87e7b56b49 100644 --- a/components/dashboard/src/projects/Project.tsx +++ b/components/dashboard/src/projects/Project.tsx @@ -25,6 +25,7 @@ import search from "../icons/search.svg"; import Tooltip from "../components/Tooltip"; import { prebuildClient } from "../service/public-api"; import { Prebuild, PrebuildPhase_Phase } from "@gitpod/public-api/lib/gitpod/v1/prebuild_pb"; +import { Button } from "@podkit/buttons/Button"; export default function ProjectsPage() { const history = useHistory(); @@ -224,12 +225,9 @@ export default function ProjectsPage() { Authorize {showAuthBanner.host}
to access branch information. - + ) : ( @@ -283,12 +281,9 @@ export default function ProjectsPage() { )} {!isResuming && ( - + )} )} @@ -376,11 +371,11 @@ export default function ProjectsPage() { - + - @@ -364,9 +364,9 @@ export default function ProjectSettingsView() { This will delete the project and all project-level environment variables you've set for this project. - + {showRemoveModal && ( Environment Variables Manage project-specific environment variables. - {envVars.length > 0 && } + {envVars.length > 0 && } {envVars.length === 0 ? (
@@ -78,7 +79,7 @@ export default function ProjectVariablesPage() { All project-specific environment variables will be visible in prebuilds and optionally in workspaces for this project. - +
) : ( @@ -200,12 +201,12 @@ function AddVariableModal(props: { project?: Project; onClose: () => void }) { ) : null } > - - + ); diff --git a/components/dashboard/src/repositories/list/RepositoryList.tsx b/components/dashboard/src/repositories/list/RepositoryList.tsx index 936af98bf492df..81d8b9cfd1ad35 100644 --- a/components/dashboard/src/repositories/list/RepositoryList.tsx +++ b/components/dashboard/src/repositories/list/RepositoryList.tsx @@ -17,6 +17,7 @@ import { RepoListEmptyState } from "./RepoListEmptyState"; import { useStateWithDebounce } from "../../hooks/use-state-with-debounce"; import { RepositoryTable } from "./RepositoryTable"; import { LoadingState } from "@podkit/loading/LoadingState"; +import { TableSortOrder } from "@podkit/tables/SortableTable"; const RepositoryListPage: FC = () => { useDocumentTitle("Imported repositories"); @@ -25,17 +26,33 @@ const RepositoryListPage: FC = () => { const params = useQueryParams(); const [searchTerm, setSearchTerm, searchTermDebounced] = useStateWithDebounce(params.get("search") || ""); + const [sortBy, setSortBy] = useState(parseSortBy(params)); + const [sortOrder, setSortOrder] = useState(parseSortOrder(params)); const [showCreateProjectModal, setShowCreateProjectModal] = useState(false); + // TODO: abstract this into a more generic hook for next sortable table // Search/Filter params tracked in url query params useEffect(() => { - const params = searchTermDebounced ? `?search=${encodeURIComponent(searchTermDebounced)}` : ""; - history.replace({ search: params }); - }, [history, searchTermDebounced]); - + const params = new URLSearchParams(); + if (searchTermDebounced) { + params.set("search", searchTermDebounced); + } + if (sortBy) { + params.set("sortBy", sortBy); + } + if (sortOrder) { + params.set("sortOrder", sortOrder); + } + params.toString(); + history.replace({ search: `?${params.toString()}` }); + }, [history, searchTermDebounced, sortBy, sortOrder]); + + // TODO: handle isError case const { data, isLoading, isFetching, isFetchingNextPage, isPreviousData, hasNextPage, fetchNextPage } = useListConfigurations({ searchTerm: searchTermDebounced, + sortBy: sortBy, + sortOrder: sortOrder, }); const handleRepoImported = useCallback( @@ -45,6 +62,14 @@ const RepositoryListPage: FC = () => { [history], ); + const handleSort = useCallback( + (columnName: string, newSortOrder: TableSortOrder) => { + setSortBy(columnName); + setSortOrder(newSortOrder); + }, + [setSortOrder], + ); + const configurations = useMemo(() => { return data?.pages.map((page) => page.configurations).flat() ?? []; }, [data?.pages]); @@ -74,6 +99,8 @@ const RepositoryListPage: FC = () => { { hasMoreThanOnePage={hasMoreThanOnePage} onLoadNextPage={() => fetchNextPage()} onSearchTermChange={setSearchTerm} + onSort={handleSort} /> )} @@ -98,3 +126,19 @@ const RepositoryListPage: FC = () => { }; export default RepositoryListPage; + +const parseSortOrder = (params: URLSearchParams) => { + const sortOrder = params.get("sortOrder"); + if (sortOrder === "asc" || sortOrder === "desc") { + return sortOrder; + } + return "asc"; +}; + +const parseSortBy = (params: URLSearchParams) => { + const sortBy = params.get("sortBy"); + if (sortBy === "name" || sortBy === "creationTime") { + return sortBy; + } + return "name"; +}; diff --git a/components/dashboard/src/repositories/list/RepositoryTable.tsx b/components/dashboard/src/repositories/list/RepositoryTable.tsx index fa6b3ed110928f..3161202fb613cd 100644 --- a/components/dashboard/src/repositories/list/RepositoryTable.tsx +++ b/components/dashboard/src/repositories/list/RepositoryTable.tsx @@ -7,34 +7,41 @@ import { FC } from "react"; import { TextInput } from "../../components/forms/TextInputField"; import { Table, TableBody, TableHead, TableHeader, TableRow } from "@podkit/tables/Table"; -import { LoaderIcon } from "lucide-react"; import { RepositoryListItem } from "./RepoListItem"; import { LoadingButton } from "@podkit/buttons/LoadingButton"; import { Configuration } from "@gitpod/public-api/lib/gitpod/v1/configuration_pb"; import { TextMuted } from "@podkit/typography/TextMuted"; import { Subheading } from "@podkit/typography/Headings"; import { cn } from "@podkit/lib/cn"; +import { SortableTableHead, TableSortOrder } from "@podkit/tables/SortableTable"; +import { LoadingState } from "@podkit/loading/LoadingState"; type Props = { configurations: Configuration[]; searchTerm: string; + sortBy: string; + sortOrder: "asc" | "desc"; hasNextPage: boolean; hasMoreThanOnePage: boolean; isSearching: boolean; isFetchingNextPage: boolean; onSearchTermChange: (val: string) => void; onLoadNextPage: () => void; + onSort: (columnName: string, direction: TableSortOrder) => void; }; export const RepositoryTable: FC = ({ searchTerm, configurations, + sortOrder, + sortBy, hasNextPage, hasMoreThanOnePage, isSearching, isFetchingNextPage, onSearchTermChange, onLoadNextPage, + onSort, }) => { return ( <> @@ -54,14 +61,26 @@ export const RepositoryTable: FC = ({
{configurations.length > 0 ? ( - {/* TODO: Add sorting controls */} - Name + + Name + Repository - + Created - + Prebuilds @@ -69,11 +88,7 @@ export const RepositoryTable: FC = ({ {isSearching && (
- {/* TODO: Make a LoadingIcon component */} - +
)}
diff --git a/components/dashboard/src/start/StartWorkspace.tsx b/components/dashboard/src/start/StartWorkspace.tsx index e35bd46bade692..1552a437e6c84d 100644 --- a/components/dashboard/src/start/StartWorkspace.tsx +++ b/components/dashboard/src/start/StartWorkspace.tsx @@ -28,6 +28,7 @@ import Alert from "../components/Alert"; import { workspaceClient, workspacesService } from "../service/public-api"; import { GetWorkspaceRequest, Workspace, WorkspacePhase_Phase } from "@gitpod/public-api/lib/gitpod/v1/workspace_pb"; import { watchWorkspaceStatus } from "../data/workspaces/listen-to-workspace-ws-messages"; +import { Button } from "@podkit/buttons/Button"; const sessionId = v4(); @@ -586,12 +587,12 @@ export default class StartWorkspace extends React.Component - + - + {!useLatest && ( @@ -659,7 +660,7 @@ export default class StartWorkspace extends React.Component @@ -705,10 +706,10 @@ export default class StartWorkspace extends React.Component @@ -802,9 +803,9 @@ function ImageBuildView(props: ImageBuildViewProps) {

- + )} diff --git a/components/dashboard/src/teams/Members.tsx b/components/dashboard/src/teams/Members.tsx index 85fb3b4251142d..b600f91c7f7ac7 100644 --- a/components/dashboard/src/teams/Members.tsx +++ b/components/dashboard/src/teams/Members.tsx @@ -23,6 +23,7 @@ import { OrganizationMember, OrganizationRole } from "@gitpod/public-api/lib/git import { useListOrganizationMembers, useOrganizationMembersInvalidator } from "../data/organizations/members-query"; import { useInvitationId, useInviteInvalidator } from "../data/organizations/invite-query"; import { Delayed } from "@podkit/loading/Delayed"; +import { Button } from "@podkit/buttons/Button"; export default function MembersPage() { const user = useCurrentUser(); @@ -149,7 +150,7 @@ export default function MembersPage() {
{isOwner && ( - + )}
@@ -284,13 +285,13 @@ export default function MembersPage() { {!!inviteId && ( - + )} - + )} diff --git a/components/dashboard/src/teams/TeamSettings.tsx b/components/dashboard/src/teams/TeamSettings.tsx index 6e03edec510086..8f4e67c51f22db 100644 --- a/components/dashboard/src/teams/TeamSettings.tsx +++ b/components/dashboard/src/teams/TeamSettings.tsx @@ -7,7 +7,6 @@ import { Organization, OrganizationSettings } from "@gitpod/public-api/lib/gitpod/v1/organization_pb"; import React, { Children, ReactNode, useCallback, useMemo, useState } from "react"; import Alert from "../components/Alert"; -import { Button } from "../components/Button"; import ConfirmationModal from "../components/ConfirmationModal"; import { InputWithCopy } from "../components/InputWithCopy"; import Modal, { ModalBody, ModalFooter, ModalHeader } from "../components/Modal"; @@ -28,6 +27,7 @@ import { gitpodHostUrl } from "../service/service"; import { useCurrentUser } from "../user-context"; import { OrgSettingsPage } from "./OrgSettingsPage"; import { ErrorCode } from "@gitpod/gitpod-protocol/lib/messaging/error"; +import { Button } from "@podkit/buttons/Button"; export default function TeamSettingsPage() { const user = useCurrentUser(); @@ -112,7 +112,7 @@ export default function TeamSettingsPage() { /> {isOwner && ( - )} @@ -128,9 +128,9 @@ export default function TeamSettingsPage() { workspaces. Deleted organizations cannot be restored! - + )} @@ -321,13 +321,7 @@ function WorkspaceImageButton(props: { {parseDockerImage(image).tag} {!props.disabled && ( - )} @@ -398,7 +392,7 @@ function OrgDefaultWorkspaceImageModal(props: OrgDefaultWorkspaceImageModalProps - + ); diff --git a/components/dashboard/src/usage/UsageDateFilters.tsx b/components/dashboard/src/usage/UsageDateFilters.tsx index 5dd1fc84f7a00d..81f0b583c3b871 100644 --- a/components/dashboard/src/usage/UsageDateFilters.tsx +++ b/components/dashboard/src/usage/UsageDateFilters.tsx @@ -11,6 +11,7 @@ import ContextMenu, { ContextMenuEntry } from "../components/ContextMenu"; import { Subheading } from "../components/typography/headings"; import dayjs, { Dayjs } from "dayjs"; import { useToast } from "../components/toasts/Toasts"; +import { Button } from "@podkit/buttons/Button"; const MAX_HOURS = 300 * 24; // 300 days @@ -148,14 +149,14 @@ type DateDisplayProps = { }; const DateDisplay = forwardRef(({ value, onClick }, ref) => { return ( - // TODO: Turn this into something like a - + ); }); diff --git a/components/dashboard/src/usage/download/DownloadUsage.tsx b/components/dashboard/src/usage/download/DownloadUsage.tsx index e2fdebce32fd99..ea4644b6e41060 100644 --- a/components/dashboard/src/usage/download/DownloadUsage.tsx +++ b/components/dashboard/src/usage/download/DownloadUsage.tsx @@ -5,7 +5,6 @@ */ import { FC, useCallback, useEffect, useMemo, useState } from "react"; -import { Button } from "../../components/Button"; import { useDownloadUsageCSV } from "./download-usage-csv"; import { AttributionId } from "@gitpod/gitpod-protocol/lib/attribution"; import { Dayjs } from "dayjs"; @@ -18,6 +17,7 @@ import { saveAs } from "file-saver"; import prettyBytes from "pretty-bytes"; import { ProgressBar } from "../../components/ProgressBar"; import { useTemporaryState } from "../../hooks/use-temporary-value"; +import { Button } from "@podkit/buttons/Button"; type Props = { attributionId: AttributionId; @@ -50,14 +50,10 @@ export const DownloadUsage: FC = ({ attributionId, startDate, endDate }) }, [attributionId, endDate, org, setDownloadDisabled, startDate, toast]); return ( - ); }; diff --git a/components/dashboard/src/user-settings/EnvironmentVariables.tsx b/components/dashboard/src/user-settings/EnvironmentVariables.tsx index 8f3ed256ec4065..6085460595db62 100644 --- a/components/dashboard/src/user-settings/EnvironmentVariables.tsx +++ b/components/dashboard/src/user-settings/EnvironmentVariables.tsx @@ -11,10 +11,10 @@ import { Item, ItemField, ItemsList } from "../components/ItemsList"; import Modal, { ModalBody, ModalFooter, ModalHeader } from "../components/Modal"; import { PageWithSettingsSubMenu } from "./PageWithSettingsSubMenu"; import { EnvironmentVariableEntry } from "./EnvironmentVariableEntry"; -import { Button } from "../components/Button"; import { Heading2, Subheading } from "../components/typography/headings"; import { envVarClient } from "../service/public-api"; import { UserEnvironmentVariable } from "@gitpod/public-api/lib/gitpod/v1/envvar_pb"; +import { Button } from "@podkit/buttons/Button"; interface EnvVarModalProps { envVar: UserEnvVarValue; @@ -101,10 +101,10 @@ function AddEnvVarModal(p: EnvVarModalProps) { - - + ); @@ -258,10 +258,10 @@ export default function EnvVars() { {envVars.length !== 0 ? ( -
- +
) : null} @@ -275,7 +275,7 @@ export default function EnvVars() { In addition to user-specific environment variables you can also pass variables through a workspace creation URL. - + ) : ( diff --git a/components/dashboard/src/user-settings/Integrations.tsx b/components/dashboard/src/user-settings/Integrations.tsx index 22950f1445ba60..6a9ecbe2588f35 100644 --- a/components/dashboard/src/user-settings/Integrations.tsx +++ b/components/dashboard/src/user-settings/Integrations.tsx @@ -39,6 +39,7 @@ import { authProviderClient } from "../service/public-api"; import { useCreateUserAuthProviderMutation } from "../data/auth-providers/create-user-auth-provider-mutation"; import { useUpdateUserAuthProviderMutation } from "../data/auth-providers/update-user-auth-provider-mutation"; import { useDeleteUserAuthProviderMutation } from "../data/auth-providers/delete-user-auth-provider-mutation"; +import { Button } from "@podkit/buttons/Button"; export default function Integrations() { return ( @@ -332,12 +333,12 @@ function GitProviders() { - + )} @@ -486,10 +487,10 @@ function GitIntegrations() { {/* Hide create button if ff is disabled */} {userGitAuthProviders && (providers || []).length !== 0 ? ( -
- +
) : null} @@ -504,9 +505,7 @@ function GitIntegrations() { In addition to the default Git Providers you can authorize
with a self-hosted instance of a provider. - + )} @@ -895,9 +894,9 @@ export function GitIntegrationModal( )}
- +
); diff --git a/components/dashboard/src/user-settings/PersonalAccessTokens.tsx b/components/dashboard/src/user-settings/PersonalAccessTokens.tsx index 1c09cccefa9505..2524803e7a7734 100644 --- a/components/dashboard/src/user-settings/PersonalAccessTokens.tsx +++ b/components/dashboard/src/user-settings/PersonalAccessTokens.tsx @@ -7,7 +7,6 @@ import { PersonalAccessToken } from "@gitpod/public-api/lib/gitpod/experimental/v1/tokens_pb"; import { useCallback, useEffect, useState } from "react"; import { Redirect, useLocation } from "react-router"; -import { Link } from "react-router-dom"; import { personalAccessTokensService } from "../service/public-api"; import { PageWithSettingsSubMenu } from "./PageWithSettingsSubMenu"; import { settingsPathPersonalAccessTokenCreate, settingsPathPersonalAccessTokenEdit } from "./settings.routes"; @@ -23,6 +22,8 @@ import ShowTokenModal from "./ShowTokenModal"; import Pagination from "../Pagination/Pagination"; import { Heading2, Subheading } from "../components/typography/headings"; import { useFeatureFlag } from "../data/featureflag-query"; +import { Button } from "@podkit/buttons/Button"; +import { LinkButton } from "@podkit/buttons/LinkButton"; export default function PersonalAccessTokens() { const enablePersonalAccessTokens = useFeatureFlag("personalAccessTokensEnabled"); @@ -179,9 +180,7 @@ function ListAccessTokensView() { {tokens.length > 0 && ( - - - + New Access Token )} {errorMsg.length > 0 && ( @@ -215,9 +214,9 @@ function ListAccessTokensView() {
Make sure to copy your access token — you won't be able to access it again.
- + )} @@ -233,9 +232,7 @@ function ListAccessTokensView() { Generate an access token for applications that need access to the Gitpod API.{" "} - - - + New Access Token ) : ( <> diff --git a/components/dashboard/src/user-settings/PersonalAccessTokensCreateView.tsx b/components/dashboard/src/user-settings/PersonalAccessTokensCreateView.tsx index 80a178b14716f1..d58891d3b94ebb 100644 --- a/components/dashboard/src/user-settings/PersonalAccessTokensCreateView.tsx +++ b/components/dashboard/src/user-settings/PersonalAccessTokensCreateView.tsx @@ -8,7 +8,6 @@ import { PersonalAccessToken } from "@gitpod/public-api/lib/gitpod/experimental/ import dayjs from "dayjs"; import { useEffect, useState } from "react"; import { Redirect, useHistory, useParams } from "react-router"; -import { Link } from "react-router-dom"; import Alert from "../components/Alert"; import { CheckboxInputField, CheckboxListField } from "../components/forms/CheckboxInputField"; import DateSelector from "../components/DateSelector"; @@ -22,6 +21,8 @@ import { Timestamp } from "@bufbuild/protobuf"; import arrowDown from "../images/sort-arrow.svg"; import { Heading2, Subheading } from "../components/typography/headings"; import { useFeatureFlag } from "../data/featureflag-query"; +import { LinkButton } from "@podkit/buttons/LinkButton"; +import { Button } from "@podkit/buttons/Button"; interface EditPATData { name: string; @@ -152,21 +153,14 @@ function PersonalAccessTokenCreateView() {
- - - + + Back arrow + Back to list + {editToken && ( - + )}
{errorMsg.length > 0 && ( @@ -256,15 +250,13 @@ function PersonalAccessTokenCreateView() {
{isEditing && ( - - - + + Cancel + )} - +
diff --git a/components/dashboard/src/user-settings/SSHKeys.tsx b/components/dashboard/src/user-settings/SSHKeys.tsx index 3d0aae3a0fd8ed..d64af4d095900a 100644 --- a/components/dashboard/src/user-settings/SSHKeys.tsx +++ b/components/dashboard/src/user-settings/SSHKeys.tsx @@ -15,7 +15,7 @@ import dayjs from "dayjs"; import { PageWithSettingsSubMenu } from "./PageWithSettingsSubMenu"; import { Heading2, Subheading } from "../components/typography/headings"; import { EmptyMessage } from "../components/EmptyMessage"; -import { Button } from "../components/Button"; +import { Button } from "@podkit/buttons/Button"; interface AddModalProps { value: SSHPublicKeyValue; @@ -110,10 +110,10 @@ export function AddSSHKeyModal(props: AddModalProps) { - - + ); @@ -199,9 +199,9 @@ export default function SSHKeys() { {dataList.length !== 0 ? (
- +
) : null} diff --git a/components/dashboard/src/user-settings/SelectAccountModal.tsx b/components/dashboard/src/user-settings/SelectAccountModal.tsx index 06a3cefbe3ffa3..b99c26ecb3e931 100644 --- a/components/dashboard/src/user-settings/SelectAccountModal.tsx +++ b/components/dashboard/src/user-settings/SelectAccountModal.tsx @@ -10,6 +10,7 @@ import { gitpodHostUrl } from "../service/service"; import InfoBox from "../components/InfoBox"; import Modal, { ModalBody, ModalFooter, ModalHeader } from "../components/Modal"; import SelectableCard from "../components/SelectableCard"; +import { Button } from "@podkit/buttons/Button"; export function SelectAccountModal( props: SelectAccountPayload & { @@ -99,7 +100,7 @@ export function SelectAccountModal( - + ); diff --git a/components/dashboard/src/whatsnew/WhatsNew.tsx b/components/dashboard/src/whatsnew/WhatsNew.tsx index 85129c08e34c36..c11dae9cc92d73 100644 --- a/components/dashboard/src/whatsnew/WhatsNew.tsx +++ b/components/dashboard/src/whatsnew/WhatsNew.tsx @@ -11,6 +11,7 @@ import { WhatsNewEntry202106 } from "./WhatsNew-2021-06"; import { UserContext } from "../user-context"; import { useContext, useState } from "react"; import { getGitpodService } from "../service/service"; +import { Button } from "@podkit/buttons/Button"; const allEntries: WhatsNewEntry[] = [WhatsNewEntry202106, WhatsNewEntry202104]; @@ -77,16 +78,16 @@ export function WhatsNew(props: { onClose: () => void }) {
{unseenEntries.length} more update{unseenEntries.length > 1 ? "s" : ""}
- - + + ) : (
- +
)} diff --git a/components/dashboard/src/workspaces/ConnectToSSHModal.tsx b/components/dashboard/src/workspaces/ConnectToSSHModal.tsx index 38fb55a97cd971..20b90c236cd702 100644 --- a/components/dashboard/src/workspaces/ConnectToSSHModal.tsx +++ b/components/dashboard/src/workspaces/ConnectToSSHModal.tsx @@ -12,6 +12,7 @@ import { settingsPathSSHKeys } from "../user-settings/settings.routes"; import { getGitpodService } from "../service/service"; import { InputWithCopy } from "../components/InputWithCopy"; import { Link } from "react-router-dom"; +import { Button } from "@podkit/buttons/Button"; interface SSHProps { workspaceId: string; @@ -110,9 +111,9 @@ export default function ConnectToSSHModal(props: { - + ); diff --git a/components/dashboard/src/workspaces/CreateWorkspacePage.tsx b/components/dashboard/src/workspaces/CreateWorkspacePage.tsx index 7a83c44a0647cf..eff893881128c9 100644 --- a/components/dashboard/src/workspaces/CreateWorkspacePage.tsx +++ b/components/dashboard/src/workspaces/CreateWorkspacePage.tsx @@ -18,7 +18,6 @@ import { FC, FunctionComponent, useCallback, useContext, useEffect, useMemo, use import { useHistory, useLocation } from "react-router"; import Alert from "../components/Alert"; import { AuthorizeGit, useNeedsGitAuthorization } from "../components/AuthorizeGit"; -import { Button } from "../components/Button"; import { LinkButton } from "../components/LinkButton"; import Modal from "../components/Modal"; import RepositoryFinder from "../components/RepositoryFinder"; @@ -45,6 +44,8 @@ import { settingsPathIntegrations } from "../user-settings/settings.routes"; import { WorkspaceEntry } from "./WorkspaceEntry"; import { AuthProviderType } from "@gitpod/public-api/lib/gitpod/v1/authprovider_pb"; import { WorkspacePhase_Phase } from "@gitpod/public-api/lib/gitpod/v1/workspace_pb"; +import { Button } from "@podkit/buttons/Button"; +import { LoadingButton } from "@podkit/buttons/LoadingButton"; export function CreateWorkspacePage() { const { user, setUser } = useContext(UserContext); @@ -422,15 +423,15 @@ export function CreateWorkspacePage() {
- +
{existingWorkspaces.length > 0 && !createWorkspaceMutation.isStarting && (
@@ -662,10 +663,10 @@ export function LimitReachedModal(p: { children: React.ReactNode }) {
diff --git a/components/dashboard/src/workspaces/Workspaces.tsx b/components/dashboard/src/workspaces/Workspaces.tsx index 5bbdde4cb68128..e19305245b7f49 100644 --- a/components/dashboard/src/workspaces/Workspaces.tsx +++ b/components/dashboard/src/workspaces/Workspaces.tsx @@ -17,6 +17,7 @@ import { hoursBefore, isDateSmallerOrEqual } from "@gitpod/gitpod-protocol/lib/u import { useDeleteInactiveWorkspacesMutation } from "../data/workspaces/delete-inactive-workspaces-mutation"; import { useToast } from "../components/toasts/Toasts"; import { Workspace, WorkspacePhase_Phase } from "@gitpod/public-api/lib/gitpod/v1/workspace_pb"; +import { Button } from "@podkit/buttons/Button"; const WorkspacesPage: FunctionComponent = () => { const [limit, setLimit] = useState(50); @@ -105,7 +106,7 @@ const WorkspacesPage: FunctionComponent = () => { return ; })} {filteredActiveWorkspaces.length > 0 &&
} - {filteredInactiveWorkspaces.length > 0 && ( + {filteredActiveWorkspaces.length > 0 && (
setShowInactive(!showInactive)} @@ -137,15 +138,18 @@ const WorkspacesPage: FunctionComponent = () => {
{showInactive ? ( - + ) : null}
diff --git a/components/public-api/gitpod/v1/configuration.proto b/components/public-api/gitpod/v1/configuration.proto index 72e601e47a03de..cfca9460a15619 100644 --- a/components/public-api/gitpod/v1/configuration.proto +++ b/components/public-api/gitpod/v1/configuration.proto @@ -3,6 +3,7 @@ syntax = "proto3"; package gitpod.v1; import "gitpod/v1/pagination.proto"; +import "gitpod/v1/sorting.proto"; import "google/protobuf/timestamp.proto"; option go_package = "github.com/gitpod-io/gitpod/components/public-api/go/v1"; @@ -47,8 +48,8 @@ service ConfigurationService { rpc ListConfigurations(ListConfigurationsRequest) returns (ListConfigurationsResponse) {} // Updates a configuration. - rpc UpdateConfiguration(UpdateConfigurationRequest) - returns (UpdateConfigurationResponse) {}; + rpc UpdateConfiguration(UpdateConfigurationRequest) returns (UpdateConfigurationResponse) {} + // Deletes a configuration. rpc DeleteConfiguration(DeleteConfigurationRequest) returns (DeleteConfigurationResponse) {} @@ -76,6 +77,8 @@ message ListConfigurationsRequest { string organization_id = 1; string search_term = 2; PaginationRequest pagination = 3; + // Configurations can be sorted by "name" OR "creationTime" + repeated Sort sort = 4; } message ListConfigurationsResponse { @@ -91,14 +94,18 @@ message UpdateConfigurationRequest { optional int32 prebuild_interval = 4; optional string workspace_class = 5; } - message WorkspaceSettings { optional string workspace_class = 1; } + message WorkspaceSettings { + optional string workspace_class = 1; + } string configuration_id = 1; optional string name = 2; optional PrebuildSettings prebuild_settings = 3; optional WorkspaceSettings workspace_settings = 4; } -message UpdateConfigurationResponse { Configuration configuration = 1; } +message UpdateConfigurationResponse { + Configuration configuration = 1; +} message DeleteConfigurationRequest { string configuration_id = 1; diff --git a/components/public-api/gitpod/v1/sorting.proto b/components/public-api/gitpod/v1/sorting.proto new file mode 100644 index 00000000000000..33028efa62c5a2 --- /dev/null +++ b/components/public-api/gitpod/v1/sorting.proto @@ -0,0 +1,17 @@ +syntax = "proto3"; + +package gitpod.v1; + +option go_package = "github.com/gitpod-io/gitpod/components/public-api/go/v1"; + +enum SortOrder { + SORT_ORDER_UNSPECIFIED = 0; + SORT_ORDER_ASC = 1; + SORT_ORDER_DESC = 2; +} + +message Sort { + // Field name to sort by, in camelCase. + string field = 1; + SortOrder order = 2; +} diff --git a/components/public-api/go/v1/configuration.pb.go b/components/public-api/go/v1/configuration.pb.go index 4d216a19e6d7ab..1d4eb4b0398de6 100644 --- a/components/public-api/go/v1/configuration.pb.go +++ b/components/public-api/go/v1/configuration.pb.go @@ -510,6 +510,8 @@ type ListConfigurationsRequest struct { OrganizationId string `protobuf:"bytes,1,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"` SearchTerm string `protobuf:"bytes,2,opt,name=search_term,json=searchTerm,proto3" json:"search_term,omitempty"` Pagination *PaginationRequest `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"` + // Configurations can be sorted by "name" OR "creationTime" + Sort []*Sort `protobuf:"bytes,4,rep,name=sort,proto3" json:"sort,omitempty"` } func (x *ListConfigurationsRequest) Reset() { @@ -565,6 +567,13 @@ func (x *ListConfigurationsRequest) GetPagination() *PaginationRequest { return nil } +func (x *ListConfigurationsRequest) GetSort() []*Sort { + if x != nil { + return x.Sort + } + return nil +} + type ListConfigurationsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -956,210 +965,214 @@ var file_gitpod_v1_configuration_proto_rawDesc = []byte{ 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x1a, 0x1a, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd1, 0x02, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x72, 0x67, - 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x6c, 0x6f, 0x6e, 0x65, 0x5f, - 0x75, 0x72, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6c, 0x6f, 0x6e, 0x65, - 0x55, 0x72, 0x6c, 0x12, 0x3f, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x54, 0x69, 0x6d, 0x65, 0x12, 0x48, 0x0a, 0x11, 0x70, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, - 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1b, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x65, 0x62, - 0x75, 0x69, 0x6c, 0x64, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x10, 0x70, 0x72, - 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x4b, - 0x0a, 0x12, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x73, 0x65, 0x74, 0x74, - 0x69, 0x6e, 0x67, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x69, 0x74, - 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x86, 0x02, 0x0a, 0x10, - 0x50, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, - 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x36, 0x0a, 0x17, 0x62, 0x72, - 0x61, 0x6e, 0x63, 0x68, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x62, 0x72, 0x61, - 0x6e, 0x63, 0x68, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x74, 0x74, 0x65, - 0x72, 0x6e, 0x12, 0x4a, 0x0a, 0x0f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x5f, 0x73, 0x74, 0x72, - 0x61, 0x74, 0x65, 0x67, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x67, 0x69, - 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x52, 0x0e, - 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x2b, - 0x0a, 0x11, 0x70, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, - 0x76, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x70, 0x72, 0x65, 0x62, 0x75, - 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x27, 0x0a, 0x0f, 0x77, - 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, - 0x6c, 0x61, 0x73, 0x73, 0x22, 0x3c, 0x0a, 0x11, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x77, 0x6f, 0x72, - 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0e, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x6c, 0x61, - 0x73, 0x73, 0x22, 0x76, 0x0a, 0x1a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, - 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, - 0x09, 0x63, 0x6c, 0x6f, 0x6e, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x63, 0x6c, 0x6f, 0x6e, 0x65, 0x55, 0x72, 0x6c, 0x22, 0x5d, 0x0a, 0x1b, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x18, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x44, 0x0a, 0x17, 0x47, 0x65, 0x74, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, - 0x5a, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x0d, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xa3, 0x01, 0x0a, 0x19, - 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x72, 0x67, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2f, 0x76, + 0x31, 0x2f, 0x73, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0xd1, 0x02, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, + 0x69, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x1b, 0x0a, 0x09, 0x63, 0x6c, 0x6f, 0x6e, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x63, 0x6c, 0x6f, 0x6e, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x3f, 0x0a, 0x0d, + 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, + 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x48, 0x0a, + 0x11, 0x70, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, + 0x67, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, + 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x53, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x10, 0x70, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x53, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x4b, 0x0a, 0x12, 0x77, 0x6f, 0x72, 0x6b, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, + 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x73, 0x52, 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74, + 0x69, 0x6e, 0x67, 0x73, 0x22, 0x86, 0x02, 0x0a, 0x10, 0x50, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, + 0x64, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, + 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x64, 0x12, 0x36, 0x0a, 0x17, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x5f, 0x6d, 0x61, + 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x4d, 0x61, 0x74, 0x63, + 0x68, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x12, 0x4a, 0x0a, 0x0f, 0x62, + 0x72, 0x61, 0x6e, 0x63, 0x68, 0x5f, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, + 0x2e, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x53, + 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x52, 0x0e, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x53, + 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x2b, 0x0a, 0x11, 0x70, 0x72, 0x65, 0x62, 0x75, + 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x10, 0x70, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x74, 0x65, + 0x72, 0x76, 0x61, 0x6c, 0x12, 0x27, 0x0a, 0x0f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x77, + 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x22, 0x3c, 0x0a, + 0x11, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, + 0x67, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, + 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x77, 0x6f, 0x72, + 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x22, 0x76, 0x0a, 0x1a, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x5f, 0x74, 0x65, 0x72, - 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x54, - 0x65, 0x72, 0x6d, 0x12, 0x3c, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, - 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x22, 0x9d, 0x01, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x40, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, - 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x12, 0x3d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, - 0x76, 0x31, 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x22, 0xcc, 0x06, 0x0a, 0x1a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x29, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x88, 0x01, 0x01, 0x12, 0x68, 0x0a, 0x11, 0x70, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, - 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x36, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x50, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x53, - 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x48, 0x01, 0x52, 0x10, 0x70, 0x72, 0x65, 0x62, 0x75, - 0x69, 0x6c, 0x64, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x88, 0x01, 0x01, 0x12, 0x6b, - 0x0a, 0x12, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x73, 0x65, 0x74, 0x74, - 0x69, 0x6e, 0x67, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x67, 0x69, 0x74, - 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, - 0x6e, 0x67, 0x73, 0x48, 0x02, 0x52, 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x88, 0x01, 0x01, 0x1a, 0x85, 0x03, 0x0a, 0x10, - 0x50, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, - 0x12, 0x1d, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x08, 0x48, 0x00, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, - 0x3b, 0x0a, 0x17, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x69, - 0x6e, 0x67, 0x5f, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x01, 0x52, 0x15, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x69, - 0x6e, 0x67, 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x4f, 0x0a, 0x0f, - 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x5f, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, - 0x31, 0x2e, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, - 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x48, 0x02, 0x52, 0x0e, 0x62, 0x72, 0x61, 0x6e, - 0x63, 0x68, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x88, 0x01, 0x01, 0x12, 0x30, 0x0a, - 0x11, 0x70, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, - 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x48, 0x03, 0x52, 0x10, 0x70, 0x72, 0x65, 0x62, - 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x88, 0x01, 0x01, 0x12, - 0x2c, 0x0a, 0x0f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x63, 0x6c, 0x61, - 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x04, 0x52, 0x0e, 0x77, 0x6f, 0x72, 0x6b, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, - 0x08, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x62, 0x72, - 0x61, 0x6e, 0x63, 0x68, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x61, - 0x74, 0x74, 0x65, 0x72, 0x6e, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, - 0x5f, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x70, 0x72, - 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x42, - 0x12, 0x0a, 0x10, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x63, 0x6c, - 0x61, 0x73, 0x73, 0x1a, 0x55, 0x0a, 0x11, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x2c, 0x0a, 0x0f, 0x77, 0x6f, 0x72, 0x6b, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x48, 0x00, 0x52, 0x0e, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x6c, - 0x61, 0x73, 0x73, 0x88, 0x01, 0x01, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x70, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, - 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x77, 0x6f, - 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, - 0x22, 0x5d, 0x0a, 0x1b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x3e, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, - 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, - 0x47, 0x0a, 0x1a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, + 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x6c, 0x6f, 0x6e, 0x65, 0x5f, + 0x75, 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6c, 0x6f, 0x6e, 0x65, + 0x55, 0x72, 0x6c, 0x22, 0x5d, 0x0a, 0x1b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x69, 0x74, 0x70, + 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x22, 0x44, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x1d, 0x0a, 0x1b, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2a, 0xc9, 0x01, 0x0a, 0x16, 0x42, 0x72, 0x61, 0x6e, - 0x63, 0x68, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, - 0x67, 0x79, 0x12, 0x28, 0x0a, 0x24, 0x42, 0x52, 0x41, 0x4e, 0x43, 0x48, 0x5f, 0x4d, 0x41, 0x54, - 0x43, 0x48, 0x49, 0x4e, 0x47, 0x5f, 0x53, 0x54, 0x52, 0x41, 0x54, 0x45, 0x47, 0x59, 0x5f, 0x55, - 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x2b, 0x0a, 0x27, - 0x42, 0x52, 0x41, 0x4e, 0x43, 0x48, 0x5f, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x49, 0x4e, 0x47, 0x5f, - 0x53, 0x54, 0x52, 0x41, 0x54, 0x45, 0x47, 0x59, 0x5f, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, - 0x5f, 0x42, 0x52, 0x41, 0x4e, 0x43, 0x48, 0x10, 0x01, 0x12, 0x29, 0x0a, 0x25, 0x42, 0x52, 0x41, - 0x4e, 0x43, 0x48, 0x5f, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x49, 0x4e, 0x47, 0x5f, 0x53, 0x54, 0x52, - 0x41, 0x54, 0x45, 0x47, 0x59, 0x5f, 0x41, 0x4c, 0x4c, 0x5f, 0x42, 0x52, 0x41, 0x4e, 0x43, 0x48, - 0x45, 0x53, 0x10, 0x02, 0x12, 0x2d, 0x0a, 0x29, 0x42, 0x52, 0x41, 0x4e, 0x43, 0x48, 0x5f, 0x4d, - 0x41, 0x54, 0x43, 0x48, 0x49, 0x4e, 0x47, 0x5f, 0x53, 0x54, 0x52, 0x41, 0x54, 0x45, 0x47, 0x59, - 0x5f, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x45, 0x44, 0x5f, 0x42, 0x52, 0x41, 0x4e, 0x43, 0x48, 0x45, - 0x53, 0x10, 0x03, 0x32, 0x92, 0x04, 0x0a, 0x14, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x66, 0x0a, 0x13, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, 0x69, 0x74, - 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x5d, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, - 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x67, - 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x63, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x24, 0x2e, 0x67, 0x69, 0x74, 0x70, - 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x25, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x66, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x25, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, - 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x12, 0x66, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, - 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, - 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x39, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2d, 0x69, 0x6f, - 0x2f, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, - 0x74, 0x73, 0x2f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x2d, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, - 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x5a, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x69, + 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xc8, 0x01, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72, 0x67, + 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x73, + 0x65, 0x61, 0x72, 0x63, 0x68, 0x5f, 0x74, 0x65, 0x72, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x54, 0x65, 0x72, 0x6d, 0x12, 0x3c, 0x0a, 0x0a, + 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1c, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x67, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0a, + 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x04, 0x73, 0x6f, + 0x72, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, + 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x6f, 0x72, 0x74, 0x52, 0x04, 0x73, 0x6f, 0x72, 0x74, 0x22, + 0x9d, 0x01, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, + 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, + 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x12, 0x3d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, + 0x2e, 0x50, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, + 0xcc, 0x06, 0x0a, 0x1a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, + 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x88, + 0x01, 0x01, 0x12, 0x68, 0x0a, 0x11, 0x70, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x73, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, + 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x2e, 0x50, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x53, 0x65, 0x74, + 0x74, 0x69, 0x6e, 0x67, 0x73, 0x48, 0x01, 0x52, 0x10, 0x70, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, + 0x64, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x88, 0x01, 0x01, 0x12, 0x6b, 0x0a, 0x12, + 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, + 0x67, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, + 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, + 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, + 0x73, 0x48, 0x02, 0x52, 0x11, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x88, 0x01, 0x01, 0x1a, 0x85, 0x03, 0x0a, 0x10, 0x50, 0x72, + 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x1d, + 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, + 0x00, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x3b, 0x0a, + 0x17, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, + 0x5f, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, + 0x52, 0x15, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, + 0x50, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x4f, 0x0a, 0x0f, 0x62, 0x72, + 0x61, 0x6e, 0x63, 0x68, 0x5f, 0x73, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, + 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x53, 0x74, + 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x48, 0x02, 0x52, 0x0e, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, + 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x88, 0x01, 0x01, 0x12, 0x30, 0x0a, 0x11, 0x70, + 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x48, 0x03, 0x52, 0x10, 0x70, 0x72, 0x65, 0x62, 0x75, 0x69, + 0x6c, 0x64, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x2c, 0x0a, + 0x0f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x04, 0x52, 0x0e, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, + 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x42, 0x1a, 0x0a, 0x18, 0x5f, 0x62, 0x72, 0x61, 0x6e, + 0x63, 0x68, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x5f, 0x73, + 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x70, 0x72, 0x65, 0x62, + 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x42, 0x12, 0x0a, + 0x10, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, + 0x73, 0x1a, 0x55, 0x0a, 0x11, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, + 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x2c, 0x0a, 0x0f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, + 0x00, 0x52, 0x0e, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x43, 0x6c, 0x61, 0x73, + 0x73, 0x88, 0x01, 0x01, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x42, 0x07, 0x0a, 0x05, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x70, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x73, + 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x42, 0x15, 0x0a, 0x13, 0x5f, 0x77, 0x6f, 0x72, 0x6b, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x5d, + 0x0a, 0x1b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, + 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, + 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x47, 0x0a, + 0x1a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x1d, 0x0a, 0x1b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2a, 0xc9, 0x01, 0x0a, 0x16, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, + 0x4d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, + 0x12, 0x28, 0x0a, 0x24, 0x42, 0x52, 0x41, 0x4e, 0x43, 0x48, 0x5f, 0x4d, 0x41, 0x54, 0x43, 0x48, + 0x49, 0x4e, 0x47, 0x5f, 0x53, 0x54, 0x52, 0x41, 0x54, 0x45, 0x47, 0x59, 0x5f, 0x55, 0x4e, 0x53, + 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x2b, 0x0a, 0x27, 0x42, 0x52, + 0x41, 0x4e, 0x43, 0x48, 0x5f, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x49, 0x4e, 0x47, 0x5f, 0x53, 0x54, + 0x52, 0x41, 0x54, 0x45, 0x47, 0x59, 0x5f, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x5f, 0x42, + 0x52, 0x41, 0x4e, 0x43, 0x48, 0x10, 0x01, 0x12, 0x29, 0x0a, 0x25, 0x42, 0x52, 0x41, 0x4e, 0x43, + 0x48, 0x5f, 0x4d, 0x41, 0x54, 0x43, 0x48, 0x49, 0x4e, 0x47, 0x5f, 0x53, 0x54, 0x52, 0x41, 0x54, + 0x45, 0x47, 0x59, 0x5f, 0x41, 0x4c, 0x4c, 0x5f, 0x42, 0x52, 0x41, 0x4e, 0x43, 0x48, 0x45, 0x53, + 0x10, 0x02, 0x12, 0x2d, 0x0a, 0x29, 0x42, 0x52, 0x41, 0x4e, 0x43, 0x48, 0x5f, 0x4d, 0x41, 0x54, + 0x43, 0x48, 0x49, 0x4e, 0x47, 0x5f, 0x53, 0x54, 0x52, 0x41, 0x54, 0x45, 0x47, 0x59, 0x5f, 0x4d, + 0x41, 0x54, 0x43, 0x48, 0x45, 0x44, 0x5f, 0x42, 0x52, 0x41, 0x4e, 0x43, 0x48, 0x45, 0x53, 0x10, + 0x03, 0x32, 0x92, 0x04, 0x0a, 0x14, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x66, 0x0a, 0x13, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x25, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, + 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x5d, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, + 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x67, 0x69, 0x74, + 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x63, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x24, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, + 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, + 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, + 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x66, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x2e, + 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, + 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x66, + 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, + 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, + 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x39, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2d, 0x69, 0x6f, 0x2f, 0x67, + 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, + 0x2f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x2d, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x76, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1195,7 +1208,8 @@ var file_gitpod_v1_configuration_proto_goTypes = []interface{}{ (*UpdateConfigurationRequest_WorkspaceSettings)(nil), // 15: gitpod.v1.UpdateConfigurationRequest.WorkspaceSettings (*timestamppb.Timestamp)(nil), // 16: google.protobuf.Timestamp (*PaginationRequest)(nil), // 17: gitpod.v1.PaginationRequest - (*PaginationResponse)(nil), // 18: gitpod.v1.PaginationResponse + (*Sort)(nil), // 18: gitpod.v1.Sort + (*PaginationResponse)(nil), // 19: gitpod.v1.PaginationResponse } var file_gitpod_v1_configuration_proto_depIdxs = []int32{ 16, // 0: gitpod.v1.Configuration.creation_time:type_name -> google.protobuf.Timestamp @@ -1205,27 +1219,28 @@ var file_gitpod_v1_configuration_proto_depIdxs = []int32{ 1, // 4: gitpod.v1.CreateConfigurationResponse.configuration:type_name -> gitpod.v1.Configuration 1, // 5: gitpod.v1.GetConfigurationResponse.configuration:type_name -> gitpod.v1.Configuration 17, // 6: gitpod.v1.ListConfigurationsRequest.pagination:type_name -> gitpod.v1.PaginationRequest - 1, // 7: gitpod.v1.ListConfigurationsResponse.configurations:type_name -> gitpod.v1.Configuration - 18, // 8: gitpod.v1.ListConfigurationsResponse.pagination:type_name -> gitpod.v1.PaginationResponse - 14, // 9: gitpod.v1.UpdateConfigurationRequest.prebuild_settings:type_name -> gitpod.v1.UpdateConfigurationRequest.PrebuildSettings - 15, // 10: gitpod.v1.UpdateConfigurationRequest.workspace_settings:type_name -> gitpod.v1.UpdateConfigurationRequest.WorkspaceSettings - 1, // 11: gitpod.v1.UpdateConfigurationResponse.configuration:type_name -> gitpod.v1.Configuration - 0, // 12: gitpod.v1.UpdateConfigurationRequest.PrebuildSettings.branch_strategy:type_name -> gitpod.v1.BranchMatchingStrategy - 4, // 13: gitpod.v1.ConfigurationService.CreateConfiguration:input_type -> gitpod.v1.CreateConfigurationRequest - 6, // 14: gitpod.v1.ConfigurationService.GetConfiguration:input_type -> gitpod.v1.GetConfigurationRequest - 8, // 15: gitpod.v1.ConfigurationService.ListConfigurations:input_type -> gitpod.v1.ListConfigurationsRequest - 10, // 16: gitpod.v1.ConfigurationService.UpdateConfiguration:input_type -> gitpod.v1.UpdateConfigurationRequest - 12, // 17: gitpod.v1.ConfigurationService.DeleteConfiguration:input_type -> gitpod.v1.DeleteConfigurationRequest - 5, // 18: gitpod.v1.ConfigurationService.CreateConfiguration:output_type -> gitpod.v1.CreateConfigurationResponse - 7, // 19: gitpod.v1.ConfigurationService.GetConfiguration:output_type -> gitpod.v1.GetConfigurationResponse - 9, // 20: gitpod.v1.ConfigurationService.ListConfigurations:output_type -> gitpod.v1.ListConfigurationsResponse - 11, // 21: gitpod.v1.ConfigurationService.UpdateConfiguration:output_type -> gitpod.v1.UpdateConfigurationResponse - 13, // 22: gitpod.v1.ConfigurationService.DeleteConfiguration:output_type -> gitpod.v1.DeleteConfigurationResponse - 18, // [18:23] is the sub-list for method output_type - 13, // [13:18] is the sub-list for method input_type - 13, // [13:13] is the sub-list for extension type_name - 13, // [13:13] is the sub-list for extension extendee - 0, // [0:13] is the sub-list for field type_name + 18, // 7: gitpod.v1.ListConfigurationsRequest.sort:type_name -> gitpod.v1.Sort + 1, // 8: gitpod.v1.ListConfigurationsResponse.configurations:type_name -> gitpod.v1.Configuration + 19, // 9: gitpod.v1.ListConfigurationsResponse.pagination:type_name -> gitpod.v1.PaginationResponse + 14, // 10: gitpod.v1.UpdateConfigurationRequest.prebuild_settings:type_name -> gitpod.v1.UpdateConfigurationRequest.PrebuildSettings + 15, // 11: gitpod.v1.UpdateConfigurationRequest.workspace_settings:type_name -> gitpod.v1.UpdateConfigurationRequest.WorkspaceSettings + 1, // 12: gitpod.v1.UpdateConfigurationResponse.configuration:type_name -> gitpod.v1.Configuration + 0, // 13: gitpod.v1.UpdateConfigurationRequest.PrebuildSettings.branch_strategy:type_name -> gitpod.v1.BranchMatchingStrategy + 4, // 14: gitpod.v1.ConfigurationService.CreateConfiguration:input_type -> gitpod.v1.CreateConfigurationRequest + 6, // 15: gitpod.v1.ConfigurationService.GetConfiguration:input_type -> gitpod.v1.GetConfigurationRequest + 8, // 16: gitpod.v1.ConfigurationService.ListConfigurations:input_type -> gitpod.v1.ListConfigurationsRequest + 10, // 17: gitpod.v1.ConfigurationService.UpdateConfiguration:input_type -> gitpod.v1.UpdateConfigurationRequest + 12, // 18: gitpod.v1.ConfigurationService.DeleteConfiguration:input_type -> gitpod.v1.DeleteConfigurationRequest + 5, // 19: gitpod.v1.ConfigurationService.CreateConfiguration:output_type -> gitpod.v1.CreateConfigurationResponse + 7, // 20: gitpod.v1.ConfigurationService.GetConfiguration:output_type -> gitpod.v1.GetConfigurationResponse + 9, // 21: gitpod.v1.ConfigurationService.ListConfigurations:output_type -> gitpod.v1.ListConfigurationsResponse + 11, // 22: gitpod.v1.ConfigurationService.UpdateConfiguration:output_type -> gitpod.v1.UpdateConfigurationResponse + 13, // 23: gitpod.v1.ConfigurationService.DeleteConfiguration:output_type -> gitpod.v1.DeleteConfigurationResponse + 19, // [19:24] is the sub-list for method output_type + 14, // [14:19] is the sub-list for method input_type + 14, // [14:14] is the sub-list for extension type_name + 14, // [14:14] is the sub-list for extension extendee + 0, // [0:14] is the sub-list for field type_name } func init() { file_gitpod_v1_configuration_proto_init() } @@ -1234,6 +1249,7 @@ func file_gitpod_v1_configuration_proto_init() { return } file_gitpod_v1_pagination_proto_init() + file_gitpod_v1_sorting_proto_init() if !protoimpl.UnsafeEnabled { file_gitpod_v1_configuration_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Configuration); i { diff --git a/components/public-api/go/v1/sorting.pb.go b/components/public-api/go/v1/sorting.pb.go new file mode 100644 index 00000000000000..e312dbbdf18495 --- /dev/null +++ b/components/public-api/go/v1/sorting.pb.go @@ -0,0 +1,219 @@ +// Copyright (c) 2023 Gitpod GmbH. All rights reserved. +// Licensed under the GNU Affero General Public License (AGPL). +// See License.AGPL.txt in the project root for license information. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc (unknown) +// source: gitpod/v1/sorting.proto + +package v1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type SortOrder int32 + +const ( + SortOrder_SORT_ORDER_UNSPECIFIED SortOrder = 0 + SortOrder_SORT_ORDER_ASC SortOrder = 1 + SortOrder_SORT_ORDER_DESC SortOrder = 2 +) + +// Enum value maps for SortOrder. +var ( + SortOrder_name = map[int32]string{ + 0: "SORT_ORDER_UNSPECIFIED", + 1: "SORT_ORDER_ASC", + 2: "SORT_ORDER_DESC", + } + SortOrder_value = map[string]int32{ + "SORT_ORDER_UNSPECIFIED": 0, + "SORT_ORDER_ASC": 1, + "SORT_ORDER_DESC": 2, + } +) + +func (x SortOrder) Enum() *SortOrder { + p := new(SortOrder) + *p = x + return p +} + +func (x SortOrder) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SortOrder) Descriptor() protoreflect.EnumDescriptor { + return file_gitpod_v1_sorting_proto_enumTypes[0].Descriptor() +} + +func (SortOrder) Type() protoreflect.EnumType { + return &file_gitpod_v1_sorting_proto_enumTypes[0] +} + +func (x SortOrder) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SortOrder.Descriptor instead. +func (SortOrder) EnumDescriptor() ([]byte, []int) { + return file_gitpod_v1_sorting_proto_rawDescGZIP(), []int{0} +} + +type Sort struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Field name to sort by, in camelCase. + Field string `protobuf:"bytes,1,opt,name=field,proto3" json:"field,omitempty"` + Order SortOrder `protobuf:"varint,2,opt,name=order,proto3,enum=gitpod.v1.SortOrder" json:"order,omitempty"` +} + +func (x *Sort) Reset() { + *x = Sort{} + if protoimpl.UnsafeEnabled { + mi := &file_gitpod_v1_sorting_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Sort) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Sort) ProtoMessage() {} + +func (x *Sort) ProtoReflect() protoreflect.Message { + mi := &file_gitpod_v1_sorting_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Sort.ProtoReflect.Descriptor instead. +func (*Sort) Descriptor() ([]byte, []int) { + return file_gitpod_v1_sorting_proto_rawDescGZIP(), []int{0} +} + +func (x *Sort) GetField() string { + if x != nil { + return x.Field + } + return "" +} + +func (x *Sort) GetOrder() SortOrder { + if x != nil { + return x.Order + } + return SortOrder_SORT_ORDER_UNSPECIFIED +} + +var File_gitpod_v1_sorting_proto protoreflect.FileDescriptor + +var file_gitpod_v1_sorting_proto_rawDesc = []byte{ + 0x0a, 0x17, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x6f, 0x72, 0x74, + 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x67, 0x69, 0x74, 0x70, 0x6f, + 0x64, 0x2e, 0x76, 0x31, 0x22, 0x48, 0x0a, 0x04, 0x53, 0x6f, 0x72, 0x74, 0x12, 0x14, 0x0a, 0x05, + 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x66, 0x69, 0x65, + 0x6c, 0x64, 0x12, 0x2a, 0x0a, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x14, 0x2e, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x6f, + 0x72, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x05, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x2a, 0x50, + 0x0a, 0x09, 0x53, 0x6f, 0x72, 0x74, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x16, 0x53, + 0x4f, 0x52, 0x54, 0x5f, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, + 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x4f, 0x52, 0x54, 0x5f, + 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x41, 0x53, 0x43, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x53, + 0x4f, 0x52, 0x54, 0x5f, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x44, 0x45, 0x53, 0x43, 0x10, 0x02, + 0x42, 0x39, 0x5a, 0x37, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, + 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2d, 0x69, 0x6f, 0x2f, 0x67, 0x69, 0x74, 0x70, 0x6f, 0x64, 0x2f, + 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x70, 0x75, 0x62, 0x6c, 0x69, + 0x63, 0x2d, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_gitpod_v1_sorting_proto_rawDescOnce sync.Once + file_gitpod_v1_sorting_proto_rawDescData = file_gitpod_v1_sorting_proto_rawDesc +) + +func file_gitpod_v1_sorting_proto_rawDescGZIP() []byte { + file_gitpod_v1_sorting_proto_rawDescOnce.Do(func() { + file_gitpod_v1_sorting_proto_rawDescData = protoimpl.X.CompressGZIP(file_gitpod_v1_sorting_proto_rawDescData) + }) + return file_gitpod_v1_sorting_proto_rawDescData +} + +var file_gitpod_v1_sorting_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_gitpod_v1_sorting_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_gitpod_v1_sorting_proto_goTypes = []interface{}{ + (SortOrder)(0), // 0: gitpod.v1.SortOrder + (*Sort)(nil), // 1: gitpod.v1.Sort +} +var file_gitpod_v1_sorting_proto_depIdxs = []int32{ + 0, // 0: gitpod.v1.Sort.order:type_name -> gitpod.v1.SortOrder + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_gitpod_v1_sorting_proto_init() } +func file_gitpod_v1_sorting_proto_init() { + if File_gitpod_v1_sorting_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_gitpod_v1_sorting_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Sort); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_gitpod_v1_sorting_proto_rawDesc, + NumEnums: 1, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_gitpod_v1_sorting_proto_goTypes, + DependencyIndexes: file_gitpod_v1_sorting_proto_depIdxs, + EnumInfos: file_gitpod_v1_sorting_proto_enumTypes, + MessageInfos: file_gitpod_v1_sorting_proto_msgTypes, + }.Build() + File_gitpod_v1_sorting_proto = out.File + file_gitpod_v1_sorting_proto_rawDesc = nil + file_gitpod_v1_sorting_proto_goTypes = nil + file_gitpod_v1_sorting_proto_depIdxs = nil +} diff --git a/components/public-api/typescript/src/gitpod/v1/configuration_pb.ts b/components/public-api/typescript/src/gitpod/v1/configuration_pb.ts index a544839af5269b..cc30552cbfe4ab 100644 --- a/components/public-api/typescript/src/gitpod/v1/configuration_pb.ts +++ b/components/public-api/typescript/src/gitpod/v1/configuration_pb.ts @@ -12,6 +12,7 @@ import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; import { Message, proto3, Timestamp } from "@bufbuild/protobuf"; import { PaginationRequest, PaginationResponse } from "./pagination_pb.js"; +import { Sort } from "./sorting_pb.js"; /** * @generated from enum gitpod.v1.BranchMatchingStrategy @@ -395,6 +396,13 @@ export class ListConfigurationsRequest extends Message) { super(); proto3.util.initPartial(data, this); @@ -406,6 +414,7 @@ export class ListConfigurationsRequest extends Message): ListConfigurationsRequest { diff --git a/components/public-api/typescript/src/gitpod/v1/sorting_pb.ts b/components/public-api/typescript/src/gitpod/v1/sorting_pb.ts new file mode 100644 index 00000000000000..0c698ee68140ee --- /dev/null +++ b/components/public-api/typescript/src/gitpod/v1/sorting_pb.ts @@ -0,0 +1,84 @@ +/** + * Copyright (c) 2023 Gitpod GmbH. All rights reserved. + * Licensed under the GNU Affero General Public License (AGPL). + * See License.AGPL.txt in the project root for license information. + */ + +// @generated by protoc-gen-es v1.3.3 with parameter "target=ts" +// @generated from file gitpod/v1/sorting.proto (package gitpod.v1, syntax proto3) +/* eslint-disable */ +// @ts-nocheck + +import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf"; +import { Message, proto3 } from "@bufbuild/protobuf"; + +/** + * @generated from enum gitpod.v1.SortOrder + */ +export enum SortOrder { + /** + * @generated from enum value: SORT_ORDER_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: SORT_ORDER_ASC = 1; + */ + ASC = 1, + + /** + * @generated from enum value: SORT_ORDER_DESC = 2; + */ + DESC = 2, +} +// Retrieve enum metadata with: proto3.getEnumType(SortOrder) +proto3.util.setEnumType(SortOrder, "gitpod.v1.SortOrder", [ + { no: 0, name: "SORT_ORDER_UNSPECIFIED" }, + { no: 1, name: "SORT_ORDER_ASC" }, + { no: 2, name: "SORT_ORDER_DESC" }, +]); + +/** + * @generated from message gitpod.v1.Sort + */ +export class Sort extends Message { + /** + * Field name to sort by, in camelCase. + * + * @generated from field: string field = 1; + */ + field = ""; + + /** + * @generated from field: gitpod.v1.SortOrder order = 2; + */ + order = SortOrder.UNSPECIFIED; + + constructor(data?: PartialMessage) { + super(); + proto3.util.initPartial(data, this); + } + + static readonly runtime: typeof proto3 = proto3; + static readonly typeName = "gitpod.v1.Sort"; + static readonly fields: FieldList = proto3.util.newFieldList(() => [ + { no: 1, name: "field", kind: "scalar", T: 9 /* ScalarType.STRING */ }, + { no: 2, name: "order", kind: "enum", T: proto3.getEnumType(SortOrder) }, + ]); + + static fromBinary(bytes: Uint8Array, options?: Partial): Sort { + return new Sort().fromBinary(bytes, options); + } + + static fromJson(jsonValue: JsonValue, options?: Partial): Sort { + return new Sort().fromJson(jsonValue, options); + } + + static fromJsonString(jsonString: string, options?: Partial): Sort { + return new Sort().fromJsonString(jsonString, options); + } + + static equals(a: Sort | PlainMessage | undefined, b: Sort | PlainMessage | undefined): boolean { + return proto3.util.equals(Sort, a, b); + } +} diff --git a/components/server/src/api/configuration-service-api.ts b/components/server/src/api/configuration-service-api.ts index d2a5764df5b5eb..1a1891315e6751 100644 --- a/components/server/src/api/configuration-service-api.ts +++ b/components/server/src/api/configuration-service-api.ts @@ -27,6 +27,8 @@ import { validate as uuidValidate } from "uuid"; import { PaginationToken, generatePaginationToken, parsePaginationToken } from "./pagination"; import { ctxUserId } from "../util/request-context"; import { UserService } from "../user/user-service"; +import { SortOrder } from "@gitpod/public-api/lib/gitpod/v1/sorting_pb"; +import { Project } from "@gitpod/gitpod-protocol"; import { DeepPartial } from "@gitpod/gitpod-protocol/lib/util/deep-partial"; function buildUpdateObject>(obj: T): Partial { @@ -118,12 +120,23 @@ export class ConfigurationServiceAPI implements ServiceImpl