1
- import Alert from "@mui/material/Alert" ;
2
1
import Link from "@mui/material/Link" ;
3
2
import TextField from "@mui/material/TextField" ;
4
3
import { useFormik } from "formik" ;
@@ -8,7 +7,6 @@ import { useState, type FC } from "react";
8
7
import { useQuery } from "react-query" ;
9
8
import { useSearchParams } from "react-router-dom" ;
10
9
import * as Yup from "yup" ;
11
- import { API } from "api/api" ;
12
10
import { provisionerDaemons } from "api/queries/organizations" ;
13
11
import type {
14
12
Organization ,
@@ -19,6 +17,7 @@ import type {
19
17
TemplateVersionVariable ,
20
18
VariableValue ,
21
19
} from "api/typesGenerated" ;
20
+ import { Alert } from "components/Alert/Alert" ;
22
21
import {
23
22
HorizontalForm ,
24
23
FormSection ,
@@ -216,18 +215,6 @@ export const CreateTemplateForm: FC<CreateTemplateFormProps> = (props) => {
216
215
} ) ;
217
216
const getFieldHelpers = getFormHelpers < CreateTemplateFormData > ( form , error ) ;
218
217
219
- const warnAboutProvisionersQuery = useQuery ( {
220
- enabled : showOrganizationPicker && Boolean ( selectedOrg ) ,
221
- queryKey : [ "warnAboutProvisioners" , selectedOrg ?. id ] ,
222
- queryFn : async ( ) => {
223
- const provisioners = await API . getProvisionerDaemonsByOrganization (
224
- selectedOrg ! . id ,
225
- ) ;
226
-
227
- return provisioners . length === 0 ;
228
- } ,
229
- } ) ;
230
-
231
218
const provisionerDaemonsQuery = useQuery (
232
219
selectedOrg
233
220
? {
@@ -407,7 +394,7 @@ const ProvisionerWarning: FC = () => {
407
394
return (
408
395
< Alert severity = "warning" css = { { marginBottom : 16 } } >
409
396
This organization does not have any provisioners. Before you create a
410
- template, you' ll need to configure a provisioner.{ " " }
397
+ template, you' ll need to configure a provisioner.{ " " }
411
398
< Link href = { docs ( "/admin/provisioners#organization-scoped-provisioners" ) } >
412
399
See our documentation.
413
400
</ Link >
0 commit comments