mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: add frontend warning when autostart disabled due to automatic updates (#10508)
This commit is contained in:
@@ -1287,6 +1287,15 @@ export const updateWorkspace = async (
|
||||
});
|
||||
};
|
||||
|
||||
export const getWorkspaceResolveAutostart = async (
|
||||
workspaceId: string,
|
||||
): Promise<TypesGen.ResolveAutostartResponse> => {
|
||||
const response = await axios.get(
|
||||
`/api/v2/workspaces/${workspaceId}/resolve-autostart`,
|
||||
);
|
||||
return response.data;
|
||||
};
|
||||
|
||||
const getMissingParameters = (
|
||||
oldBuildParameters: TypesGen.WorkspaceBuildParameter[],
|
||||
newBuildParameters: TypesGen.WorkspaceBuildParameter[],
|
||||
|
||||
@@ -11,3 +11,15 @@ export const workspaceQuota = (username: string) => {
|
||||
queryFn: () => API.getWorkspaceQuota(username),
|
||||
};
|
||||
};
|
||||
|
||||
const getWorkspaceResolveAutostartQueryKey = (workspaceId: string) => [
|
||||
workspaceId,
|
||||
"workspaceResolveAutostart",
|
||||
];
|
||||
|
||||
export const workspaceResolveAutostart = (workspaceId: string) => {
|
||||
return {
|
||||
queryKey: getWorkspaceResolveAutostartQueryKey(workspaceId),
|
||||
queryFn: () => API.getWorkspaceResolveAutostart(workspaceId),
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user