Skip to content

Commit 59f7649

Browse files
committed
move jupyter classic button to last, since jupyterlab is where the action is
- and a few other stylistic improvements
1 parent 8028102 commit 59f7649

File tree

3 files changed

+54
-50
lines changed

3 files changed

+54
-50
lines changed

src/packages/frontend/compute/compute-servers.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,9 @@ export default function ComputeServers({ project_id }: { project_id: string }) {
115115
<A href="https://doc.cocalc.com/account/ssh.html">
116116
account public ssh keys
117117
</A>{" "}
118-
that has access to this project (you must restart the compute
119-
server if you add keys). If you start a web service on any
120-
port P on your compute server, type{" "}
118+
that has access to this project (wait about 30 seconds after
119+
you add keys). If you start a web service on any port P on
120+
your compute server, type{" "}
121121
<code>ssh -L P:localhost:P user@ip_address</code>
122122
on your laptop, and you can connect to that web service on
123123
localhost on your laptop. Also ports 80 and 443 are always

src/packages/frontend/project/named-server-panel.tsx

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,6 @@ code completion, snippets, code refactoring, and embedded Git.`,
8383
},
8484
} as const;
8585

86-
interface Props {
87-
project_id: string;
88-
name: NamedServerName;
89-
}
90-
9186
function getServerInfo(name: NamedServerName): Server {
9287
return (
9388
SPEC[name] ?? {
@@ -102,10 +97,13 @@ function getServerInfo(name: NamedServerName): Server {
10297
);
10398
}
10499

105-
export const NamedServerPanel: React.FC<Props> = ({
106-
project_id,
107-
name,
108-
}: Props) => {
100+
interface Props {
101+
project_id: string;
102+
name: NamedServerName;
103+
style?;
104+
}
105+
106+
export function NamedServerPanel({ project_id, name, style }: Props) {
109107
const student_project_functionality =
110108
useStudentProjectFunctionality(project_id);
111109

@@ -171,11 +169,11 @@ export const NamedServerPanel: React.FC<Props> = ({
171169
}
172170

173171
return (
174-
<SettingBox title={`${longName} Server`} icon={icon}>
172+
<SettingBox title={`${longName} Server`} icon={icon} style={style}>
175173
{body}
176174
</SettingBox>
177175
);
178-
};
176+
}
179177

180178
export function serverURL(project_id: string, name: NamedServerName): string {
181179
return (

src/packages/frontend/project/servers/project-servers.tsx

Lines changed: 42 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
import { Col, Divider, Modal, Row, Tabs, TabsProps } from "antd";
77
import { Gutter } from "antd/es/grid/row";
8-
98
import { useProjectContext } from "@cocalc/frontend/project/context";
109
import { useState } from "@cocalc/frontend/app-framework";
1110
import { A, Icon, Paragraph, Text, Title } from "@cocalc/frontend/components";
@@ -61,56 +60,56 @@ export function ProjectServers() {
6160
return (
6261
<>
6362
<Row gutter={gutter} style={newRowStyle}>
64-
{available.jupyter_notebook ? (
65-
<Col sm={sm} md={md}>
66-
<NewFileButton
67-
name={"Jupyter Classic..."}
68-
icon={"ipynb"}
69-
active={showNamedServer === "jupyter"}
70-
on_click={() => toggleShowNamedServer("jupyter")}
71-
/>
72-
</Col>
73-
) : null}
74-
{available.jupyter_lab ? (
63+
{available.jupyter_lab && (
7564
<Col sm={sm} md={md}>
7665
<NewFileButton
77-
name={"JupyterLab..."}
66+
name={<span style={{ fontSize: "14pt" }}>JupyterLab</span>}
7867
icon={"ipynb"}
7968
active={showNamedServer === "jupyterlab"}
8069
on_click={() => toggleShowNamedServer("jupyterlab")}
8170
/>
8271
</Col>
83-
) : null}
84-
{available.vscode ? (
72+
)}
73+
{available.vscode && (
8574
<Col sm={sm} md={md}>
8675
<NewFileButton
87-
name={"VS Code..."}
76+
name={<span style={{ fontSize: "14pt" }}>VS Code</span>}
8877
icon={"vscode"}
8978
active={showNamedServer === "code"}
9079
on_click={() => toggleShowNamedServer("code")}
9180
/>
9281
</Col>
93-
) : null}
94-
{available.julia ? (
82+
)}
83+
{available.julia && (
9584
<Col sm={sm} md={md}>
9685
<NewFileButton
97-
name={"Pluto..."}
86+
name={<span style={{ fontSize: "14pt" }}>Pluto</span>}
9887
icon={"julia"}
9988
active={showNamedServer === "pluto"}
10089
on_click={() => toggleShowNamedServer("pluto")}
10190
/>
10291
</Col>
103-
) : null}
104-
{available.rserver ? (
92+
)}
93+
{available.rserver && (
10594
<Col sm={sm} md={md}>
10695
<NewFileButton
107-
name={`${R_IDE}...`}
96+
name={<span style={{ fontSize: "14pt" }}>{R_IDE}</span>}
10897
icon={"r"}
10998
active={showNamedServer === "rserver"}
11099
on_click={() => toggleShowNamedServer("rserver")}
111100
/>
112101
</Col>
113-
) : null}
102+
)}
103+
{available.jupyter_notebook && (
104+
<Col sm={sm} md={md}>
105+
<NewFileButton
106+
name={<span style={{ fontSize: "14pt" }}>Jupyter Classic</span>}
107+
icon={"ipynb"}
108+
active={showNamedServer === "jupyter"}
109+
on_click={() => toggleShowNamedServer("jupyter")}
110+
/>
111+
</Col>
112+
)}
114113
{noServers && (
115114
<Col sm={sm} md={md}>
116115
<NewFileButton
@@ -137,16 +136,15 @@ export function ProjectServers() {
137136
)}
138137
</Row>
139138

140-
<Row gutter={gutter} style={newRowStyle}>
141-
<Col sm={18}>
142-
{showNamedServer && (
143-
<NamedServerPanel
144-
project_id={project_id}
145-
name={showNamedServer}
146-
/>
147-
)}
148-
</Col>
149-
</Row>
139+
<div>
140+
{showNamedServer && (
141+
<NamedServerPanel
142+
project_id={project_id}
143+
name={showNamedServer}
144+
style={{ maxWidth: "600px", margin: "30px auto" }}
145+
/>
146+
)}
147+
</div>
150148
</>
151149
);
152150
}
@@ -175,9 +173,9 @@ export function ProjectServers() {
175173
children: (
176174
<>
177175
<Paragraph>
178-
You can run various servers inside this project. They run in the same
179-
environment, have access to the same files, and stop when the project
180-
stops. You can also{" "}
176+
You can run various notebook servers inside this project with one
177+
click. They run in the same environment, have access to the same
178+
files, and stop when the project stops. You can also{" "}
181179
<A href={"https://doc.cocalc.com/howto/webserver.html"}>
182180
run your own servers
183181
</A>
@@ -203,6 +201,14 @@ export function ProjectServers() {
203201
<ComputeServerDocs style={{ float: "right" }} />
204202
Compute Servers
205203
</h2>
204+
<div style={{ marginBottom: "15px" }}>
205+
Compute servers provide powerful computing capabilities, allowing
206+
you to scale up to 400+ CPU cores, terabytes of RAM, advanced GPUs,
207+
extensive storage options and integration with multiple cloud
208+
services for flexible use. The platform features real-time
209+
collaboration, pre-configured software, and clear, minute-by-minute
210+
billing for efficient project management and cost control.
211+
</div>
206212
<ComputeServers project_id={project_id} />
207213
</>
208214
),

0 commit comments

Comments
 (0)