Skip to content

Commit 3c99474

Browse files
committed
Remove template deprecation warning
1 parent 8a7f0e9 commit 3c99474

File tree

6 files changed

+3
-60
lines changed

6 files changed

+3
-60
lines changed

site/src/components/TemplateVersionWarnings/TemplateVersionWarnings.stories.tsx

Lines changed: 0 additions & 16 deletions
This file was deleted.

site/src/components/TemplateVersionWarnings/TemplateVersionWarnings.tsx

Lines changed: 0 additions & 26 deletions
This file was deleted.

site/src/pages/TemplatePage/TemplateSummaryPage/TemplateSummaryPageView.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import { Loader } from "components/Loader/Loader";
99
import { Stack } from "components/Stack/Stack";
1010
import { TemplateResourcesTable } from "components/TemplateResourcesTable/TemplateResourcesTable";
1111
import { TemplateStats } from "./TemplateStats";
12-
import { TemplateVersionWarnings } from "components/TemplateVersionWarnings/TemplateVersionWarnings";
1312

1413
export interface TemplateSummaryPageViewProps {
1514
resources?: WorkspaceResource[];
@@ -45,7 +44,6 @@ export const TemplateSummaryPageView: FC<TemplateSummaryPageViewProps> = ({
4544

4645
return (
4746
<Stack spacing={4}>
48-
<TemplateVersionWarnings warnings={activeVersion.warnings} />
4947
<TemplateStats template={template} activeVersion={activeVersion} />
5048
<TemplateResourcesTable resources={getStartedResources(resources)} />
5149
</Stack>

site/src/pages/WorkspacePage/Workspace.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import {
1515
PageHeaderTitle,
1616
PageHeaderSubtitle,
1717
} from "components/PageHeader/FullWidthPageHeader";
18-
import { TemplateVersionWarnings } from "components/TemplateVersionWarnings/TemplateVersionWarnings";
1918
import { ErrorAlert } from "components/Alert/ErrorAlert";
2019
import { DormantWorkspaceBanner } from "components/WorkspaceDeletion";
2120
import { Avatar } from "components/Avatar/Avatar";
@@ -55,7 +54,6 @@ export interface WorkspaceProps {
5554
isRestarting: boolean;
5655
workspace: TypesGen.Workspace;
5756
resources?: TypesGen.WorkspaceResource[];
58-
templateWarnings?: TypesGen.TemplateVersionWarning[];
5957
canUpdateWorkspace: boolean;
6058
updateMessage?: string;
6159
canRetryDebugMode: boolean;
@@ -106,7 +104,6 @@ export const Workspace: FC<React.PropsWithChildren<WorkspaceProps>> = ({
106104
template,
107105
quotaBudget,
108106
handleBuildRetry,
109-
templateWarnings,
110107
buildLogs,
111108
onLoadMoreBuilds,
112109
isLoadingMoreBuilds,
@@ -271,8 +268,6 @@ export const Workspace: FC<React.PropsWithChildren<WorkspaceProps>> = ({
271268
onDismiss={() => saveLocal("dismissedWorkspace", workspace.id)}
272269
/>
273270

274-
<TemplateVersionWarnings warnings={templateWarnings} />
275-
276271
{showAlertPendingInQueue && (
277272
<Alert severity="info">
278273
<AlertTitle>Workspace build is pending</AlertTitle>

site/src/pages/WorkspacePage/WorkspaceReadyPage.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ export const WorkspaceReadyPage = ({
6363
const {
6464
workspace,
6565
template,
66-
templateVersion: currentVersion,
6766
deploymentValues,
6867
buildError,
6968
cancellationError,
@@ -207,7 +206,6 @@ export const WorkspaceReadyPage = ({
207206
sshPrefix={sshPrefix}
208207
template={template}
209208
quotaBudget={quota?.budget}
210-
templateWarnings={currentVersion?.warnings}
211209
buildLogs={
212210
shouldDisplayBuildLogs && (
213211
<WorkspaceBuildLogsSection logs={buildLogs} />

site/src/xServices/workspace/workspaceXService.ts

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ export interface WorkspaceContext {
1818
workspace?: TypesGen.Workspace;
1919
template?: TypesGen.Template;
2020
permissions?: Permissions;
21-
templateVersion?: TypesGen.TemplateVersion;
2221
deploymentValues?: TypesGen.DeploymentValues;
2322
build?: TypesGen.WorkspaceBuild;
2423
// Builds
@@ -436,7 +435,6 @@ export const workspaceMachine = createMachine(
436435
assignInitialData: assign({
437436
workspace: (_, event) => event.data.workspace,
438437
template: (_, event) => event.data.template,
439-
templateVersion: (_, event) => event.data.templateVersion,
440438
permissions: (_, event) => event.data.permissions as Permissions,
441439
deploymentValues: (_, event) => event.data.deploymentValues,
442440
}),
@@ -682,12 +680,9 @@ async function loadInitialWorkspaceData({
682680
},
683681
);
684682
const template = await API.getTemplateByName(orgId, workspace.template_name);
685-
const [templateVersion, permissions] = await Promise.all([
686-
API.getTemplateVersion(template.active_version_id),
687-
API.checkAuthorization({
688-
checks: permissionsToCheck(workspace, template),
689-
}),
690-
]);
683+
const permissions = await API.checkAuthorization({
684+
checks: permissionsToCheck(workspace, template),
685+
});
691686

692687
const canViewDeploymentValues = Boolean(
693688
(permissions as Permissions)?.viewDeploymentValues,
@@ -698,7 +693,6 @@ async function loadInitialWorkspaceData({
698693
return {
699694
workspace,
700695
template,
701-
templateVersion,
702696
permissions,
703697
deploymentValues,
704698
};

0 commit comments

Comments
 (0)