Skip to content

Commit 577f52d

Browse files
committed
onprem --> "self hosted" for the compute server drop down
1 parent 8b72185 commit 577f52d

File tree

5 files changed

+42
-40
lines changed

5 files changed

+42
-40
lines changed

src/packages/frontend/chat/side-chat.tsx

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -106,19 +106,20 @@ export default function SideChat({ project_id, path, style }: Props) {
106106
borderBottom: "1px solid lightgrey",
107107
}}
108108
>
109-
<Button
110-
style={{
111-
float: "right",
112-
marginTop: "-5px",
113-
color: "rgb(51, 51, 51)",
114-
background: "rgb(91, 192, 222)",
115-
}}
116-
onClick={() => {
117-
actions.showTimeTravelInNewTab();
118-
}}
119-
>
120-
<Icon name="history" />
121-
</Button>
109+
<Tooltip title="Show TimeTravel change history of this side chat.">
110+
<Button
111+
style={{
112+
float: "right",
113+
marginTop: "-5px",
114+
background: "rgb(91, 192, 222)",
115+
}}
116+
onClick={() => {
117+
actions.showTimeTravelInNewTab();
118+
}}
119+
>
120+
<Icon name="history" />
121+
</Button>
122+
</Tooltip>
122123
<VideoChatButton
123124
style={{ float: "right", marginTop: "-5px" }}
124125
project_id={project_id}

src/packages/frontend/compute/cloud-filesystem/bucket.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ export function BucketLocation({ configuration, setConfiguration }) {
239239
</b>
240240
{NO_CHANGE}
241241
You can use your cloud file system from any compute server in the world,
242-
in any cloud or on prem. However, data transfer and operations are{" "}
242+
in any cloud or self hosted. However, data transfer and operations are{" "}
243243
<b>faster and cheaper</b> when the file system and compute server are in
244244
the same region. <br />
245245
<div style={{ display: "flex", margin: "10px 0" }}>
Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import type { Cloud as CloudType } from "@cocalc/util/db-schema/compute-servers";
22
import { CLOUDS_BY_NAME } from "@cocalc/util/compute/cloud/clouds";
3+
import { Icon } from "@cocalc/frontend/components/icon";
34

45
interface Props {
56
cloud: CloudType;
@@ -9,13 +10,16 @@ interface Props {
910

1011
export default function DisplayCloud({ cloud, height, style }: Props) {
1112
const x = CLOUDS_BY_NAME[cloud];
13+
let label;
14+
if (x?.image) {
15+
label = <img src={x.image} height={height ?? 18} alt={x.label} />;
16+
} else {
17+
label = x?.label ?? cloud ?? "No Cloud Configured";
18+
}
1219
return (
1320
<span style={style}>
14-
{x?.image ? (
15-
<img src={x.image} height={height ?? 18} alt={x.label} />
16-
) : (
17-
x?.label ?? cloud ?? "No Cloud Configured"
18-
)}
21+
{x?.icon && <Icon name={x.icon} style={{ marginRight: "5px" }} />}
22+
{label}
1923
</span>
2024
);
2125
}

src/packages/frontend/compute/onprem-config.tsx

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export default function OnPremCloudConfiguration({
7777
if (!editable || !project_id) {
7878
return (
7979
<div>
80-
OnPrem {configuration.arch == "arm64" ? "ARM64" : "x86_64"} Linux VM
80+
Self Hosted {configuration.arch == "arm64" ? "ARM64" : "x86_64"} Linux VM
8181
{configuration.gpu ? " that has an NVIDIA GPU" : ""}.
8282
</div>
8383
);
@@ -91,7 +91,7 @@ export default function OnPremCloudConfiguration({
9191
<div style={{ marginBottom: "30px" }}>
9292
<div style={{ color: "#666", marginBottom: "15px" }}>
9393
<div style={{ color: "#666", marginBottom: "5px" }}>
94-
<b>OnPrem Compute Server</b>
94+
<b>Self Hosted Compute Server</b>
9595
</div>
9696
You can connect your own <b>Ubuntu 22.04 Virtual Machine</b> to this
9797
CoCalc project and seamlessly run Jupyter notebooks and terminals on it.
@@ -104,13 +104,10 @@ export default function OnPremCloudConfiguration({
104104
</A>
105105
.
106106
</li>
107-
<li>On-Prem compute servers are currently free.</li>
107+
<li>Self hosted compute servers are currently free.</li>
108108
<li>
109-
<A href="https://onprem.cocalc.com/overview.html">
110-
CoCalc-OnPrem
111-
</A>{" "}
112-
is a related on-prem product for running a self-contained CoCalc
113-
cluster.
109+
<A href="https://onprem.cocalc.com/overview.html">CoCalc OnPrem</A>{" "}
110+
is a related product for running a self-contained CoCalc cluster.
114111
</li>
115112
</ul>
116113
</div>

src/packages/util/compute/cloud/clouds.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -91,17 +91,21 @@ export const ON_PREM_DEFAULTS = {
9191
},
9292
};
9393

94+
interface CloudInfo {
95+
name: Cloud;
96+
label: string;
97+
icon?: string;
98+
image?: string;
99+
defaultConfiguration: Configuration;
100+
}
101+
94102
// The ones that are at all potentially worth exposing to users.
95103
const CLOUDS: {
96-
[short: string]: {
97-
name: Cloud;
98-
label: string;
99-
image?: string;
100-
defaultConfiguration: Configuration;
101-
};
104+
[short: string]: CloudInfo;
102105
} = {
103106
google: {
104107
name: "google-cloud",
108+
icon: "google",
105109
label: "Google Cloud Platform",
106110
// image url https://www.gstatic.com/devrel-devsite/prod/v0e0f589edd85502a40d78d7d0825db8ea5ef3b99ab4070381ee86977c9168730/cloud/images/cloud-logo.svg
107111
image: `data:image/svg+xml;utf8,%3Csvg%20id%3D%22Google_Cloud_logo%22%20data-name%3D%22Google%20Cloud%20logo%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%20138.35%2024%22%3E%3Cpath%20d%3D%22M89.75%2C18.62A8.36%2C8.36%2C0%2C0%2C1%2C81.2%2C10%2C8.33%2C8.33%2C0%2C0%2C1%2C83.63%2C3.9a8.25%2C8.25%2C0%2C0%2C1%2C6.12-2.48%2C7.62%2C7.62%2C0%2C0%2C1%2C6%2C2.69L94.28%2C5.58a5.64%2C5.64%2C0%2C0%2C0-4.53-2.14%2C6.22%2C6.22%2C0%2C0%2C0-4.57%2C1.84A6.38%2C6.38%2C0%2C0%2C0%2C83.36%2C10a6.38%2C6.38%2C0%2C0%2C0%2C1.82%2C4.74%2C6.18%2C6.18%2C0%2C0%2C0%2C4.57%2C1.84%2C6.44%2C6.44%2C0%2C0%2C0%2C5-2.42l1.54%2C1.5a8%2C8%2C0%2C0%2C1-2.87%2C2.17A8.67%2C8.67%2C0%2C0%2C1%2C89.75%2C18.62ZM100.12%2C1.79V18.26H98V1.79Zm1.82%2C10.83a6%2C6%2C0%2C0%2C1%2C1.64-4.3%2C5.57%2C5.57%2C0%2C0%2C1%2C4.16-1.7%2C5.51%2C5.51%2C0%2C0%2C1%2C4.14%2C1.7%2C5.92%2C5.92%2C0%2C0%2C1%2C1.65%2C4.3%2C5.87%2C5.87%2C0%2C0%2C1-1.65%2C4.3%2C5.47%2C5.47%2C0%2C0%2C1-4.14%2C1.7%2C5.53%2C5.53%2C0%2C0%2C1-4.16-1.7A6%2C6%2C0%2C0%2C1%2C101.94%2C12.62Zm2.12%2C0a4.1%2C4.1%2C0%2C0%2C0%2C1.06%2C2.94%2C3.6%2C3.6%2C0%2C0%2C0%2C5.24%2C0%2C4.1%2C4.1%2C0%2C0%2C0%2C1.06-2.94%2C4.07%2C4.07%2C0%2C0%2C0-1.06-2.92%2C3.56%2C3.56%2C0%2C0%2C0-5.24%2C0A4.07%2C4.07%2C0%2C0%2C0%2C104.06%2C12.62Zm21.17%2C5.64h-2V16.69h-.1a3.75%2C3.75%2C0%2C0%2C1-1.48%2C1.38%2C4.23%2C4.23%2C0%2C0%2C1-2.08.55%2C4.18%2C4.18%2C0%2C0%2C1-3.19-1.18%2C4.74%2C4.74%2C0%2C0%2C1-1.11-3.37V7h2.11v6.94a2.49%2C2.49%2C0%2C0%2C0%2C2.79%2C2.76%2C2.63%2C2.63%2C0%2C0%2C0%2C2.11-1%2C3.69%2C3.69%2C0%2C0%2C0%2C.85-2.45V7h2.12Zm7.16.36a5%2C5%2C0%2C0%2C1-3.79-1.74A6.24%2C6.24%2C0%2C0%2C1%2C127%2C12.62a6.2%2C6.2%2C0%2C0%2C1%2C1.56-4.25%2C4.94%2C4.94%2C0%2C0%2C1%2C3.79-1.75%2C4.78%2C4.78%2C0%2C0%2C1%2C2.27.53%2C4%2C4%2C0%2C0%2C1%2C1.58%2C1.4h.09L136.24%2C7V1.79h2.11V18.26h-2V16.69h-.09a4%2C4%2C0%2C0%2C1-1.58%2C1.4A4.78%2C4.78%2C0%2C0%2C1%2C132.39%2C18.62Zm.35-1.93a3.21%2C3.21%2C0%2C0%2C0%2C2.55-1.13%2C4.17%2C4.17%2C0%2C0%2C0%2C1-2.94%2C4.21%2C4.21%2C0%2C0%2C0-1-2.92%2C3.23%2C3.23%2C0%2C0%2C0-2.55-1.15%2C3.29%2C3.29%2C0%2C0%2C0-2.55%2C1.15%2C4.21%2C4.21%2C0%2C0%2C0-1%2C2.92%2C4.14%2C4.14%2C0%2C0%2C0%2C1%2C2.92A3.29%2C3.29%2C0%2C0%2C0%2C132.74%2C16.69Z%22%20style%3D%22fill%3A%235f6368%22/%3E%3Cg%20id%3D%22_75x24px%22%20data-name%3D%2275x24px%22%3E%3Cpath%20d%3D%22M9.49%2C18.62A9.46%2C9.46%2C0%2C0%2C1%2C0%2C9.31%2C9.46%2C9.46%2C0%2C0%2C1%2C9.49%2C0%2C8.91%2C8.91%2C0%2C0%2C1%2C15.9%2C2.57L14.09%2C4.36a6.51%2C6.51%2C0%2C0%2C0-4.6-1.82A6.69%2C6.69%2C0%2C0%2C0%2C2.78%2C9.31a6.69%2C6.69%2C0%2C0%2C0%2C6.71%2C6.77%2C6.25%2C6.25%2C0%2C0%2C0%2C4.72-1.87A5.26%2C5.26%2C0%2C0%2C0%2C15.6%2C11H9.49V8.47h8.6a8.38%2C8.38%2C0%2C0%2C1%2C.13%2C1.59A8.37%2C8.37%2C0%2C0%2C1%2C16%2C16%2C8.57%2C8.57%2C0%2C0%2C1%2C9.49%2C18.62Z%22%20style%3D%22fill%3A%234285f4%22/%3E%3Cpath%20d%3D%22M31.52%2C12.62a5.94%2C5.94%2C0%2C1%2C1-11.87%2C0%2C5.94%2C5.94%2C0%2C1%2C1%2C11.87%2C0Zm-2.6%2C0a3.35%2C3.35%2C0%2C1%2C0-6.67%2C0%2C3.35%2C3.35%2C0%2C1%2C0%2C6.67%2C0Z%22%20style%3D%22fill%3A%23ea4335%22/%3E%3Cpath%20d%3D%22M44.83%2C12.62a5.94%2C5.94%2C0%2C1%2C1-11.87%2C0%2C5.94%2C5.94%2C0%2C1%2C1%2C11.87%2C0Zm-2.6%2C0a3.35%2C3.35%2C0%2C1%2C0-6.68%2C0%2C3.35%2C3.35%2C0%2C1%2C0%2C6.68%2C0Z%22%20style%3D%22fill%3A%23fbbc04%22/%3E%3Cpath%20d%3D%22M57.8%2C7V17.76c0%2C4.42-2.63%2C6.24-5.73%2C6.24a5.75%2C5.75%2C0%2C0%2C1-5.34-3.54l2.31-1a3.32%2C3.32%2C0%2C0%2C0%2C3%2C2.14c2%2C0%2C3.22-1.23%2C3.22-3.52v-.86H55.2A4.16%2C4.16%2C0%2C0%2C1%2C52%2C18.62a6%2C6%2C0%2C0%2C1%2C0-12A4.22%2C4.22%2C0%2C0%2C1%2C55.2%2C8h.09V7Zm-2.33%2C5.66A3.39%2C3.39%2C0%2C0%2C0%2C52.25%2C9a3.48%2C3.48%2C0%2C0%2C0-3.35%2C3.66%2C3.45%2C3.45%2C0%2C0%2C0%2C3.35%2C3.61A3.35%2C3.35%2C0%2C0%2C0%2C55.47%2C12.65Z%22%20style%3D%22fill%3A%234285f4%22/%3E%3Cpath%20d%3D%22M62.43.64V18.26H59.79V.64Z%22%20style%3D%22fill%3A%2334a853%22/%3E%3Cpath%20d%3D%22M72.83%2C14.6%2C74.89%2C16a6%2C6%2C0%2C0%2C1-5%2C2.66%2C5.81%2C5.81%2C0%2C0%2C1-5.89-6%2C5.52%2C5.52%2C0%2C0%2C1%2C10.75-2.18l.27.69-8%2C3.31a3.07%2C3.07%2C0%2C0%2C0%2C2.92%2C1.82A3.44%2C3.44%2C0%2C0%2C0%2C72.83%2C14.6Zm-6.31-2.16%2C5.38-2.22A2.34%2C2.34%2C0%2C0%2C0%2C69.66%2C9%2C3.29%2C3.29%2C0%2C0%2C0%2C66.52%2C12.44Z%22%20style%3D%22fill%3A%23ea4335%22/%3E%3C/g%3E%3C/svg%3E%0A`,
@@ -136,7 +140,8 @@ const CLOUDS: {
136140
},
137141
onprem: {
138142
name: "onprem",
139-
label: "On Prem",
143+
label: "Self Hosted",
144+
icon: "home",
140145
defaultConfiguration: {
141146
cloud: "onprem",
142147
image: "python",
@@ -148,12 +153,7 @@ const CLOUDS: {
148153
};
149154

150155
export const CLOUDS_BY_NAME: {
151-
[name: string]: {
152-
name: Cloud;
153-
label: string;
154-
image?: string;
155-
defaultConfiguration: Configuration;
156-
};
156+
[name: string]: CloudInfo;
157157
} = {};
158158
for (const short in CLOUDS) {
159159
CLOUDS_BY_NAME[CLOUDS[short].name] = CLOUDS[short];

0 commit comments

Comments
 (0)