Skip to content

Commit abcd0d5

Browse files
committed
add large image warning when creating compute server
1 parent 7a6d9da commit abcd0d5

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

src/packages/frontend/compute/select-image.tsx

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import type {
66
GoogleCloudImages,
77
} from "@cocalc/util/db-schema/compute-servers";
88
import { makeValidGoogleName } from "@cocalc/util/db-schema/compute-servers";
9-
import { Alert, Select, Spin } from "antd";
9+
import { Alert, Checkbox, Select, Spin } from "antd";
1010
import { CSSProperties, useEffect, useMemo, useState } from "react";
1111
import { Icon, Markdown } from "@cocalc/frontend/components";
1212
import { A } from "@cocalc/frontend/components/A";
@@ -129,17 +129,23 @@ export default function SelectImage({
129129
configuration={configuration}
130130
/>
131131
)}
132-
{warnBigGb && (dockerSizeGb ?? 0) > warnBigGb && (
132+
{warnBigGb && (dockerSizeGb ?? 1) > warnBigGb && (
133133
<Alert
134134
style={{ margin: "15px 0" }}
135-
showIcon
136135
type="warning"
137-
message="Large Image"
136+
message={<h4>Large Image Warning</h4>}
138137
description={
139138
<>
140-
The compute server will take <b>several extra minutes</b> to start
141-
the first time, because the {dockerSizeGb}GB Docker image must be
142-
pulled and decompressed. Please be patient!
139+
The compute server will take{" "}
140+
<b>up to {Math.ceil((dockerSizeGb ?? 1) / 3)} extra minutes</b> to
141+
start the first time, because a {dockerSizeGb} GB Docker image
142+
must be pulled and decompressed. Please be patient!
143+
<br />
144+
<br />
145+
<Checkbox>
146+
I understand that initial startup will take at least{" "}
147+
{Math.ceil((dockerSizeGb ?? 1) / 3)} extra minutes
148+
</Checkbox>
143149
</>
144150
}
145151
/>

0 commit comments

Comments
 (0)