Skip to content

Commit 2373af0

Browse files
committed
Clean up calculation for the Dev Spaces host name.
- Set SSHD LogLevel from DEBUG3 to DEBUG1 for reduction in log file size - Add basic documentation to CSS file Signed-off-by: Roland Grunberg <[email protected]>
1 parent 86ea408 commit 2373af0

File tree

4 files changed

+13
-12
lines changed

4 files changed

+13
-12
lines changed

build/dockerfiles/dev.sshd.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ RUN sed -i \
3434
-e 's|#Port 22|Port 2022|' \
3535
-e 's|#StrictModes yes|StrictModes=no|' \
3636
-e 's|#PidFile /var/run/sshd.pid|PidFile /tmp/sshd.pid|' \
37-
-e 's|#LogLevel INFO|LogLevel DEBUG3|' \
37+
-e 's|#LogLevel INFO|LogLevel DEBUG1|' \
3838
/opt/ssh/sshd_config
3939

4040
# Provide new path containing host keys

build/scripts/code-sshd-page/page-style.css

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
SPDX-License-Identifier: EPL-2.0
88
*/
99

10+
/* Code block */
1011
pre {
1112
background-color: #f6f8fa; /* Light gray background */
1213
overflow-x: auto; /* Enable horizontal scrolling for long lines */
@@ -17,6 +18,7 @@ pre {
1718
padding: 10px;
1819
}
1920

21+
/* Inline code */
2022
code {
2123
background-color: #e3e6e8; /* Slightly darker gray for inline code */
2224
padding: 2px 4px;
@@ -25,14 +27,16 @@ code {
2527
font-size: 0.9em; /* Slightly smaller than surrounding text */
2628
}
2729

30+
/* Container for code block & clipboard icon */
2831
.parent {
29-
background-color: #f6f8fa; /* Light gray background */
32+
background-color: #f6f8fa;
3033
display: table;
3134
width: 100%;
3235
}
3336

37+
/* Container for clipboard icon of code block */
3438
.clipboard {
35-
background-color: #f6f8fa; /* Light gray background */
39+
background-color: #f6f8fa;
3640
display: table-cell;
3741
width: 2%;
3842
}
@@ -46,7 +50,7 @@ code {
4650
}
4751

4852
.clipboard-img-code {
49-
background-color: #e3e6e8; /* Slightly darker gray for inline code */
53+
background-color: #e3e6e8;
5054
width: 10px;
5155
height: 10px;
5256
border: 1px solid black;
@@ -55,6 +59,8 @@ code {
5559
vertical-align: bottom;
5660
}
5761

62+
63+
/* Colour change for clipboard icon hover */
5864
.clipboard-img-pre:hover {
5965
background:#e3e6e8;
6066
}

build/scripts/code-sshd-page/page-utils.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ function copyToClipboard(id) {
1313
}
1414

1515
function initializePlatformContent() {
16-
1716
if (navigator.userAgent.indexOf('Windows') !== -1) {
1817
var pathEntries = document.getElementsByClassName('path');
1918
for (var i = 0; i < pathEntries.length; i++) {

build/scripts/code-sshd-page/server.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -145,13 +145,9 @@ function getHostURL () {
145145
return undefined;
146146
}
147147
let i = 0;
148-
while (i < consoleURL.length || i < devspacesURL.length) {
149-
if (consoleURL.substring(consoleURL.length - 1 - i) != devspacesURL.substring(devspacesURL.length - 1 - i)) {
150-
if (i != 0) {
151-
break;
152-
}
153-
}
148+
while (i < consoleURL.length && i < devspacesURL.length
149+
&& consoleURL.substring(consoleURL.length - 1 - i) === devspacesURL.substring(devspacesURL.length - 1 - i)) {
154150
i++;
155-
}
151+
}
156152
return consoleURL.substring(consoleURL.length - i);
157153
}

0 commit comments

Comments
 (0)