= ({ buildInfo, provisioners }) => {
+ const isEmpty = provisioners.every((group) => group.daemons.length === 0);
+
+ const provisionerGroupsCount = provisioners.length;
+ const provisionersCount = provisioners.reduce(
+ (a, group) => a + group.daemons.length,
+ 0,
+ );
+
+ return (
+ <>
+ {isEmpty ? (
+ }
+ target="_blank"
+ href={docs("/admin/provisioners")}
+ >
+ Create a provisioner
+
+ }
+ />
+ ) : (
+ ({
+ margin: 0,
+ fontSize: 12,
+ paddingBottom: 18,
+ color: theme.palette.text.secondary,
+ })}
+ >
+ Showing {provisionerGroupsCount} groups and {provisionersCount}{" "}
+ provisioners
+
+ )}
+
+ {provisioners.map((group) => (
+
+ ))}
+
+ >
+ );
+};
+
+// Ideally these would be generated and appear in typesGenerated.ts, but that is
+// not currently the case. In the meantime, these are taken from verbatim from
+// the corresponding codersdk declarations. The names remain unchanged to keep
+// usage of these special values "grep-able".
+// https://github.com/coder/coder/blob/7c77a3cc832fb35d9da4ca27df163c740f786137/codersdk/provisionerdaemons.go#L291-L295
+const ProvisionerKeyIDBuiltIn = "00000000-0000-0000-0000-000000000001";
+const ProvisionerKeyIDUserAuth = "00000000-0000-0000-0000-000000000002";
+const ProvisionerKeyIDPSK = "00000000-0000-0000-0000-000000000003";
+
+function getGroupType(key: ProvisionerKey) {
+ switch (key.id) {
+ case ProvisionerKeyIDBuiltIn:
+ return "builtin";
+ case ProvisionerKeyIDUserAuth:
+ return "userAuth";
+ case ProvisionerKeyIDPSK:
+ return "psk";
+ default:
+ return "key";
+ }
+}
diff --git a/site/src/router.tsx b/site/src/router.tsx
index 8490c966c8a54..66d37f92aeaf1 100644
--- a/site/src/router.tsx
+++ b/site/src/router.tsx
@@ -267,10 +267,7 @@ const CreateEditRolePage = lazy(
),
);
const ProvisionersPage = lazy(
- () =>
- import(
- "./pages/OrganizationSettingsPage/ProvisionersPage/ProvisionersPage"
- ),
+ () => import("./pages/OrganizationSettingsPage/OrganizationProvisionersPage"),
);
const TemplateEmbedPage = lazy(
() => import("./pages/TemplatePage/TemplateEmbedPage/TemplateEmbedPage"),
pFad - Phonifier reborn
Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies:
Alternative Proxy
pFad Proxy
pFad v3 Proxy
pFad v4 Proxy