Skip to content
Snippets Groups Projects
Verified Commit 9dac2537 authored by Jaromír Hradil's avatar Jaromír Hradil
Browse files

Adding custom EOSC ui settings

parent 8a32a2aa
Branches eosc-ui
No related tags found
1 merge request!6Adding custom EOSC ui
......@@ -131,6 +131,8 @@ singleuser:
singleuser-webdav-wrapper.sh:
mode: 0755
mountPath: /usr/local/bin/jupyterhub-singleuser-webdav-wrapper
#NotebookNotary.db_file=':memory:' is used due to issues
#notebook notary file was causing in ~/.jupyter in ownCloud mount
stringData: |-
#! /bin/sh
#
......@@ -147,26 +149,42 @@ singleuser:
exec jupyterhub-singleuser \
--FileCheckpoints.checkpoint_dir='/home/jovyan/.notebookCheckpoints' \
--NotebookNotary.db_file=':memory:' \
--LabApp.custom_css=True \
"$@"
disable-labnews:
#Settings in overrides.json must be passed as stringData.
#Otherwise JupyterLab will not consider them
##Disables news Jupyter notifications
##Overrides default Help menu to include EOSC links
##Setting is reusing 'git:open-url' command from Jupyter Git
##extension to open link in browser tab, because 'help:open'
##command opens tab inside Lab and EOSC website does not
##allow itself to be open if embedded in another website
overrides-settings:
mode: 0644
mountPath: /opt/conda/share/jupyter/lab/settings/overrides.json
stringData: |-
{
"@jupyterlab/apputils-extension:notification": {
"checkForUpdates": "false",
"fetchNews": "false"
},
"@jupyterlab/application-extension:context-menu": {
"contextMenu": [
{
"command": "filebrowser:share-main",
"selector": ".jp-DirListing-item[data-isdir]",
"disabled": true
}
]
}
}
{% filter indent(10) %}
{{ overrides_file_content | to_json }}
{% endfilter %}
#Two files below are not included in /home/jovyan/.jupyter because
#that is ownCloud mount path. They are included in jupyter_server
#static path instead, because otherwise Jupyter is not considering
# custom CSS
eosc-css:
mode: 0644
mountPath: /opt/conda/lib/python3.11/site-packages/jupyter_server/static/custom/custom.css
binaryData: "{{ css_file_content | b64encode }}"
eosc-logo:
mode: 0644
mountPath: /opt/conda/lib/python3.11/site-packages/jupyter_server/static/custom/logo/eosc-ntb-logo.svg
binaryData: "{{ logo_file_content | b64encode }}"
hub:
services:
......
/*
Custom CSS modifying default JupyterLab default UI to include EOSC themes
*/
/*-----------------------------------------------------------------------------
| Copyright (c) Jupyter Development Team.
| Distributed under the terms of the Modified BSD License.
|----------------------------------------------------------------------------*/
/*
The following CSS variables define the main, public API for styling JupyterLab.
These variables should be used by all plugins wherever possible. In other
words, plugins should not define custom colors, sizes, etc unless absolutely
necessary. This enables users to change the visual theme of JupyterLab
by changing these variables.
Many variables appear in an ordered sequence (0,1,2,3). These sequences
are designed to work well together, so for example, `--jp-border-color1` should
be used with `--jp-layout-color1`. The numbers have the following meanings:
* 0: super-primary, reserved for special emphasis
* 1: primary, most important under normal situations
* 2: secondary, next most important under normal situations
* 3: tertiary, next most important under normal situations
Throughout JupyterLab, we are mostly following principles from Google's
Material Design when selecting colors. We are not, however, following
all of MD as it is not optimized for dense, information rich UIs.
*/
:root {
/* Elevation
*
* We style box-shadows using Material Design's idea of elevation. These particular numbers are taken from here:
*
* https://github.com/material-components/material-components-web
* https://material-components-web.appspot.com/elevation.html
*/
--jp-shadow-base-lightness: 0;
--jp-shadow-umbra-color: rgba(
var(--jp-shadow-base-lightness),
var(--jp-shadow-base-lightness),
var(--jp-shadow-base-lightness),
0.2
);
--jp-shadow-penumbra-color: rgba(
var(--jp-shadow-base-lightness),
var(--jp-shadow-base-lightness),
var(--jp-shadow-base-lightness),
0.14
);
--jp-shadow-ambient-color: rgba(
var(--jp-shadow-base-lightness),
var(--jp-shadow-base-lightness),
var(--jp-shadow-base-lightness),
0.12
);
--jp-elevation-z0: none;
--jp-elevation-z1: 0 2px 1px -1px var(--jp-shadow-umbra-color),
0 1px 1px 0 var(--jp-shadow-penumbra-color),
0 1px 3px 0 var(--jp-shadow-ambient-color);
--jp-elevation-z2: 0 3px 1px -2px var(--jp-shadow-umbra-color),
0 2px 2px 0 var(--jp-shadow-penumbra-color),
0 1px 5px 0 var(--jp-shadow-ambient-color);
--jp-elevation-z4: 0 2px 4px -1px var(--jp-shadow-umbra-color),
0 4px 5px 0 var(--jp-shadow-penumbra-color),
0 1px 10px 0 var(--jp-shadow-ambient-color);
--jp-elevation-z6: 0 3px 5px -1px var(--jp-shadow-umbra-color),
0 6px 10px 0 var(--jp-shadow-penumbra-color),
0 1px 18px 0 var(--jp-shadow-ambient-color);
--jp-elevation-z8: 0 5px 5px -3px var(--jp-shadow-umbra-color),
0 8px 10px 1px var(--jp-shadow-penumbra-color),
0 3px 14px 2px var(--jp-shadow-ambient-color);
--jp-elevation-z12: 0 7px 8px -4px var(--jp-shadow-umbra-color),
0 12px 17px 2px var(--jp-shadow-penumbra-color),
0 5px 22px 4px var(--jp-shadow-ambient-color);
--jp-elevation-z16: 0 8px 10px -5px var(--jp-shadow-umbra-color),
0 16px 24px 2px var(--jp-shadow-penumbra-color),
0 6px 30px 5px var(--jp-shadow-ambient-color);
--jp-elevation-z20: 0 10px 13px -6px var(--jp-shadow-umbra-color),
0 20px 31px 3px var(--jp-shadow-penumbra-color),
0 8px 38px 7px var(--jp-shadow-ambient-color);
--jp-elevation-z24: 0 11px 15px -7px var(--jp-shadow-umbra-color),
0 24px 38px 3px var(--jp-shadow-penumbra-color),
0 9px 46px 8px var(--jp-shadow-ambient-color);
/* Borders
*
* The following variables, specify the visual styling of borders in JupyterLab.
*/
--jp-border-width: 1px;
--jp-border-color0: var(--md-grey-400, #bdbdbd);
--jp-border-color1: var(--md-grey-400, #bdbdbd);
--jp-border-color2: var(--md-grey-300, #e0e0e0);
--jp-border-color3: var(--md-grey-200, #eee);
--jp-inverse-border-color: var(--md-grey-600, #757575);
--jp-border-radius: 2px;
/* UI Fonts
*
* The UI font CSS variables are used for the typography all of the JupyterLab
* user interface elements that are not directly user generated content.
*
* The font sizing here is done assuming that the body font size of --jp-ui-font-size1
* is applied to a parent element. When children elements, such as headings, are sized
* in em all things will be computed relative to that body size.
*/
--jp-ui-font-scale-factor: 1.2;
--jp-ui-font-size0: 0.83333em;
--jp-ui-font-size1: 13px; /* Base font size */
--jp-ui-font-size2: 1.2em;
--jp-ui-font-size3: 1.44em;
--jp-ui-font-family: system-ui, -apple-system, blinkmacsystemfont, 'Segoe UI',
helvetica, arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji',
'Segoe UI Symbol';
/*
* Use these font colors against the corresponding main layout colors.
* In a light theme, these go from dark to light.
*/
/* Defaults use Material Design specification */
--jp-ui-font-color0: rgba(0, 0, 0, 1);
--jp-ui-font-color1: rgba(0, 0, 0, 0.87);
--jp-ui-font-color2: rgba(0, 0, 0, 0.54);
--jp-ui-font-color3: rgba(0, 0, 0, 0.38);
/*
* Use these against the brand/accent/warn/error colors.
* These will typically go from light to darker, in both a dark and light theme.
*/
--jp-ui-inverse-font-color0: rgba(255, 255, 255, 1);
--jp-ui-inverse-font-color1: rgba(255, 255, 255, 1);
--jp-ui-inverse-font-color2: rgba(255, 255, 255, 0.7);
--jp-ui-inverse-font-color3: rgba(255, 255, 255, 0.5);
/* Content Fonts
*
* Content font variables are used for typography of user generated content.
*
* The font sizing here is done assuming that the body font size of --jp-content-font-size1
* is applied to a parent element. When children elements, such as headings, are sized
* in em all things will be computed relative to that body size.
*/
--jp-content-line-height: 1.6;
--jp-content-font-scale-factor: 1.2;
--jp-content-font-size0: 0.83333em;
--jp-content-font-size1: 14px; /* Base font size */
--jp-content-font-size2: 1.2em;
--jp-content-font-size3: 1.44em;
--jp-content-font-size4: 1.728em;
--jp-content-font-size5: 2.0736em;
/* This gives a magnification of about 125% in presentation mode over normal. */
--jp-content-presentation-font-size1: 17px;
--jp-content-heading-line-height: 1;
--jp-content-heading-margin-top: 1.2em;
--jp-content-heading-margin-bottom: 0.8em;
--jp-content-heading-font-weight: 500;
/* Defaults use Material Design specification */
--jp-content-font-color0: rgba(0, 0, 0, 1);
--jp-content-font-color1: rgba(0, 0, 0, 0.87);
--jp-content-font-color2: rgba(0, 0, 0, 0.54);
--jp-content-font-color3: rgba(0, 0, 0, 0.38);
--jp-content-link-color: #004494 !important;
--jp-content-link-visited-color: var(--md-purple-700, #7b1fa2);
--jp-content-font-family: system-ui, -apple-system, blinkmacsystemfont,
'Segoe UI', helvetica, arial, sans-serif, 'Apple Color Emoji',
'Segoe UI Emoji', 'Segoe UI Symbol';
/*
* Code Fonts
*
* Code font variables are used for typography of code and other monospaces content.
*/
--jp-code-font-size: 13px;
--jp-code-line-height: 1.3077; /* 17px for 13px base */
--jp-code-padding: 5px; /* 5px for 13px base, codemirror highlighting needs integer px value */
--jp-code-font-family-default: menlo, consolas, 'DejaVu Sans Mono', monospace;
--jp-code-font-family: var(--jp-code-font-family-default);
/* This gives a magnification of about 125% in presentation mode over normal. */
--jp-code-presentation-font-size: 16px;
/* may need to tweak cursor width if you change font size */
--jp-code-cursor-width0: 1.4px;
--jp-code-cursor-width1: 2px;
--jp-code-cursor-width2: 4px;
/* Layout
*
* The following are the main layout colors use in JupyterLab. In a light
* theme these would go from light to dark.
*/
--jp-layout-color0: white;
--jp-layout-color1: white;
--jp-layout-color2: var(--md-grey-200, #eee);
--jp-layout-color3: var(--md-grey-400, #bdbdbd);
--jp-layout-color4: var(--md-grey-600, #757575);
/* Inverse Layout
*
* The following are the inverse layout colors use in JupyterLab. In a light
* theme these would go from dark to light.
*/
--jp-inverse-layout-color0: #111;
--jp-inverse-layout-color1: var(--md-grey-900, #212121);
--jp-inverse-layout-color2: var(--md-grey-800, #424242);
--jp-inverse-layout-color3: var(--md-grey-700, #616161);
--jp-inverse-layout-color4: var(--md-grey-600, #757575);
/* Brand/accent */
--jp-brand-color0: #004494 !important;
--jp-brand-color1: #004494 !important;
--jp-brand-color2: #004494 !important;
--jp-brand-color3: #004494 !important;
--jp-brand-color4: #004494 !important;
--jp-accent-color0: var(--md-green-900, #1b5e20);
--jp-accent-color1: var(--md-green-700, #388e3c);
--jp-accent-color2: var(--md-green-300, #81c784);
--jp-accent-color3: var(--md-green-100, #c8e6c9);
/* State colors (warn, error, success, info) */
--jp-warn-color0: var(--md-orange-900, #e65100);
--jp-warn-color1: var(--md-orange-700, #f57c00);
--jp-warn-color2: var(--md-orange-300, #ffb74d);
--jp-warn-color3: var(--md-orange-100, #ffe0b2);
--jp-error-color0: var(--md-red-900, #b71c1c);
--jp-error-color1: var(--md-red-700, #d32f2f);
--jp-error-color2: var(--md-red-300, #e57373);
--jp-error-color3: var(--md-red-100, #ffcdd2);
--jp-success-color0: var(--md-green-900, #1b5e20);
--jp-success-color1: var(--md-green-700, #388e3c);
--jp-success-color2: var(--md-green-300, #81c784);
--jp-success-color3: var(--md-green-100, #c8e6c9);
--jp-info-color0: #004494 !important;
--jp-info-color1: #004494 !important;
--jp-info-color2: #004494 !important;
--jp-info-color3: #004494 !important;
/* Cell specific styles */
--jp-cell-padding: 5px;
--jp-cell-collapser-width: 8px;
--jp-cell-collapser-min-height: 20px;
--jp-cell-collapser-not-active-hover-opacity: 0.6;
--jp-cell-editor-background: var(--md-grey-100, #f5f5f5);
--jp-cell-editor-border-color: var(--md-grey-300, #e0e0e0);
--jp-cell-editor-box-shadow: inset 0 0 2px #004494 !important;
--jp-cell-editor-active-background: var(--jp-layout-color0);
--jp-cell-editor-active-border-color: var(--jp-brand-color1);
--jp-cell-prompt-width: 64px;
--jp-cell-prompt-font-family: var(--jp-code-font-family-default);
--jp-cell-prompt-letter-spacing: 0;
--jp-cell-prompt-opacity: 1;
--jp-cell-prompt-not-active-opacity: 0.5;
--jp-cell-prompt-not-active-font-color: var(--md-grey-700, #616161);
/* A custom blend of MD grey and blue 600
* See https://meyerweb.com/eric/tools/color-blend/#546E7A:1E88E5:5:hex */
--jp-cell-inprompt-font-color: #004494 !important;
/* A custom blend of MD grey and orange 600
* https://meyerweb.com/eric/tools/color-blend/#546E7A:F4511E:5:hex */
--jp-cell-outprompt-font-color: #bf5b3d;
/* Notebook specific styles */
--jp-notebook-padding: 10px;
--jp-notebook-select-background: var(--jp-layout-color1);
--jp-notebook-multiselected-color: var(--md-blue-50, #e3f2fd);
/* The scroll padding is calculated to fill enough space at the bottom of the
notebook to show one single-line cell (with appropriate padding) at the top
when the notebook is scrolled all the way to the bottom. We also subtract one
pixel so that no scrollbar appears if we have just one single-line cell in the
notebook. This padding is to enable a 'scroll past end' feature in a notebook.
*/
--jp-notebook-scroll-padding: calc(
100% - var(--jp-code-font-size) * var(--jp-code-line-height) -
var(--jp-code-padding) - var(--jp-cell-padding) - 1px
);
/* Rendermime styles */
--jp-rendermime-error-background: #fdd;
--jp-rendermime-table-row-background: var(--md-grey-100, #cfd8dc);
--jp-rendermime-table-row-hover-background: var(--md-light-blue-50, #e1f5fe);
/* Dialog specific styles */
--jp-dialog-background: rgba(0, 0, 0, 0.25);
/* Console specific styles */
--jp-console-padding: 10px;
/* Toolbar specific styles */
--jp-toolbar-border-color: var(--jp-border-color1);
--jp-toolbar-micro-height: 8px;
--jp-toolbar-background: var(--jp-layout-color1);
--jp-toolbar-box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.24);
--jp-toolbar-header-margin: 4px 4px 0 4px;
--jp-toolbar-active-background: var(--md-grey-300, #90a4ae);
/* Statusbar specific styles */
--jp-statusbar-height: 24px;
/* Input field styles */
--jp-input-box-shadow: inset 0 0 2px #004494 !important;
--jp-input-active-background: var(--jp-layout-color1);
--jp-input-hover-background: var(--jp-layout-color1);
--jp-input-background: var(--md-grey-100, #f5f5f5);
--jp-input-border-color: var(--jp-inverse-border-color);
--jp-input-active-border-color: var(--jp-brand-color1);
--jp-input-active-box-shadow-color: rgba(19, 124, 189, 0.3);
/* General editor styles */
--jp-editor-selected-background: #d9d9d9;
--jp-editor-selected-focused-background: #d7d4f0;
--jp-editor-cursor-color: var(--jp-ui-font-color0);
/* Code mirror specific styles */
--jp-mirror-editor-keyword-color: #008000;
--jp-mirror-editor-atom-color: #88f;
--jp-mirror-editor-number-color: #080;
--jp-mirror-editor-def-color: #004494 !important;
--jp-mirror-editor-variable-color: var(--md-grey-900, #212121);
--jp-mirror-editor-variable-2-color: #004494 !important;
--jp-mirror-editor-variable-3-color: #085;
--jp-mirror-editor-punctuation-color: #004494 !important;
--jp-mirror-editor-property-color: #004494 !important;
--jp-mirror-editor-operator-color: #a2f;
--jp-mirror-editor-comment-color: #408080;
--jp-mirror-editor-string-color: #ba2121;
--jp-mirror-editor-string-2-color: #708;
--jp-mirror-editor-meta-color: #a2f;
--jp-mirror-editor-qualifier-color: #555;
--jp-mirror-editor-builtin-color: #008000;
--jp-mirror-editor-bracket-color: #997;
--jp-mirror-editor-tag-color: #170;
--jp-mirror-editor-attribute-color: #004494 !important;
--jp-mirror-editor-header-color: #004494 !important;
--jp-mirror-editor-quote-color: #090;
--jp-mirror-editor-link-color: #004494 !important;
--jp-mirror-editor-error-color: #f00;
--jp-mirror-editor-hr-color: #999;
/*
RTC user specific colors.
These colors are used for the cursor, username in the editor,
and the icon of the user.
*/
--jp-collaborator-color1: #ffad8e;
--jp-collaborator-color2: #dac83d;
--jp-collaborator-color3: #72dd76;
--jp-collaborator-color4: #00e4d0;
--jp-collaborator-color5: #45d4ff;
--jp-collaborator-color6: #e2b1ff;
--jp-collaborator-color7: #ff9de6;
/* Vega extension styles */
--jp-vega-background: white;
/* Sidebar-related styles */
--jp-sidebar-min-width: 250px;
/* Search-related styles */
--jp-search-toggle-off-opacity: 0.5;
--jp-search-toggle-hover-opacity: 0.8;
--jp-search-toggle-on-opacity: 1;
--jp-search-selected-match-background-color: rgb(245, 200, 0);
--jp-search-selected-match-color: black;
--jp-search-unselected-match-background-color: var(
--jp-inverse-layout-color0
);
--jp-search-unselected-match-color: var(--jp-ui-inverse-font-color0);
/* Icon colors that work well with light or dark backgrounds */
--jp-icon-contrast-color0: var(--md-purple-600, #8e24aa);
--jp-icon-contrast-color1: var(--md-green-600, #43a047);
--jp-icon-contrast-color2: var(--md-pink-600, #d81b60);
--jp-icon-contrast-color3: #004494 !important;
/* Button colors */
--jp-accept-color-normal: #004494 !important;
--jp-accept-color-hover: #004494 !important;
--jp-accept-color-active: #004494 !important;
--jp-warn-color-normal: var(--md-red-700, #d32f2f);
--jp-warn-color-hover: var(--md-red-800, #c62828);
--jp-warn-color-active: var(--md-red-900, #b71c1c);
--jp-reject-color-normal: var(--md-grey-600, #757575);
--jp-reject-color-hover: var(--md-grey-700, #616161);
--jp-reject-color-active: var(--md-grey-800, #424242);
/* File or activity icons and switch semantic variables */
--jp-jupyter-icon-color: #f37626;
--jp-notebook-icon-color: #f37626;
--jp-json-icon-color: var(--md-orange-700, #f57c00);
--jp-console-icon-background-color: #004494 !important;
--jp-console-icon-color: white;
--jp-terminal-icon-background-color: var(--md-grey-800, #424242);
--jp-terminal-icon-color: var(--md-grey-200, #eee);
--jp-text-editor-icon-color: var(--md-grey-700, #616161);
--jp-inspector-icon-color: var(--md-grey-700, #616161);
--jp-switch-color: var(--md-grey-400, #bdbdbd);
--jp-switch-true-position-color: var(--md-orange-900, #e65100);
--jp-private-menubar-height: 44px !important;
--jp-private-menu-item-height: 24px !important;
}
#jp-MainLogo svg {
visibility: hidden !important;
}
#jp-MainLogo {
background-image: url("./logo/eosc-ntb-logo.svg") !important;
background-repeat: no-repeat !important;
background-size: 99% !important; /* size of the actual image within the allocated space */
background-position-x: 0px !important;
background-position-y: center !important;
width: 220px !important; /* size of the image space */
}
#jp-MainMenu .lm-MenuBar-content {
margin-top: 14px !important;
}
.lm-MenuBar-item {
margin-top: 9px !important;
line-height: 20px !important;
}
This diff is collapsed.
{
"@jupyterlab/apputils-extension:notification": {
"checkForUpdates": "false",
"fetchNews": "false"
},
"@jupyterlab/application-extension:context-menu": {
"contextMenu": [
{
"command": "filebrowser:share-main",
"selector": ".jp-DirListing-item[data-isdir]",
"disabled": true
}
]
},
"@jupyterlab/mainmenu-extension:plugin": {
"menus": [
{
"disabled": false,
"id": "jp-mainmenu-help",
"items": [
{
"type": "submenu",
"submenu": {
"id": "jp-mainmenu-help-eosc-links",
"label": "Useful EOSC links",
"items": [
{
"command": "git:open-url",
"args": {
"text": "EOSC EU website",
"url": "https://open-science-cloud.ec.europa.eu/"
}
},
{
"command": "git:open-url",
"args": {
"text": "Accessibility statement",
"url": "https://open-science-cloud.ec.europa.eu/accessibility-statement"
}
},
{
"command": "git:open-url",
"args": {
"text": "Helpdesk contact",
"url": "https://open-science-cloud.ec.europa.eu/support/helpdesk"
}
},
{
"command": "git:open-url",
"args": {
"text": "FAQ",
"url": "https://open-science-cloud.ec.europa.eu/support/frequently-asked-questions"
}
},
{
"command": "git:open-url",
"args": {
"text": "EOSC EU Node Acceptable Use Policy",
"url": "https://open-science-cloud.ec.europa.eu/index.php/system/files?file=2024-04/EOSC-EU-Node-Acceptable-Use-Policy.pdf"
}
},
{
"command": "git:open-url",
"args": {
"text": "Contact the European Commission",
"url": "https://commission.europa.eu/about-european-commission/contact_en"
}
},
{
"command": "git:open-url",
"args": {
"text": "Follow the European Commission on social media",
"url": "https://european-union.europa.eu/contact-eu/social-media-channels_en#/search?page=0&institutions=european_commission"
}
},
{
"command": "git:open-url",
"args": {
"text": "Resources for Partners",
"url": "https://commission.europa.eu/resources-partners_en"
}
},
{
"command": "git:open-url",
"args": {
"text": "Cookies policy",
"url": "https://commission.europa.eu/cookies-policy_en"
}
},
{
"command": "git:open-url",
"args": {
"text": "Privacy policy",
"url": "https://commission.europa.eu/privacy-policy-websites-managed-european-commission_en"
}
},
{
"command": "git:open-url",
"args": {
"text": "Legal notice",
"url": "https://commission.europa.eu/legal-notice_en"
}
}
]
}
}
]
}
]
}
}
\ No newline at end of file
......@@ -113,6 +113,8 @@ singleuser:
singleuser-webdav-wrapper.sh:
mode: 0755
mountPath: /usr/local/bin/jupyterhub-singleuser-webdav-wrapper
#NotebookNotary.db_file=':memory:' is used due to issues
#notebook notary file was causing in ~/.jupyter in ownCloud mount
stringData: |-
#! /bin/sh
#
......@@ -129,26 +131,41 @@ singleuser:
exec jupyterhub-singleuser \
--FileCheckpoints.checkpoint_dir='/home/jovyan/.notebookCheckpoints' \
--NotebookNotary.db_file=':memory:' \
--LabApp.custom_css=True \
"$@"
disable-labnews:
#Settings in overrides.json must be passed as stringData.
#Otherwise JupyterLab will not consider them
##Disables news Jupyter notifications
##Overrides default Help menu to include EOSC links
##Setting is reusing 'git:open-url' command from Jupyter Git
##extension to open link in browser tab, because 'help:open'
##command opens tab inside Lab and EOSC website does not
##allow itself to be open if embedded in another website
overrides-settings:
mode: 0644
mountPath: /opt/conda/share/jupyter/lab/settings/overrides.json
stringData: |-
{
"@jupyterlab/apputils-extension:notification": {
"checkForUpdates": "false",
"fetchNews": "false"
},
"@jupyterlab/application-extension:context-menu": {
"contextMenu": [
{
"command": "filebrowser:share-main",
"selector": ".jp-DirListing-item[data-isdir]",
"disabled": true
}
]
}
}
{% filter indent(10) %}
{{ overrides_file_content | to_json }}
{% endfilter %}
#Two files below are not included in /home/jovyan/.jupyter because
#that is ownCloud mount path. They are included in jupyter_server
#static path instead, because otherwise Jupyter is not considering
# custom CSS
eosc-css:
mode: 0644
mountPath: /opt/conda/lib/python3.11/site-packages/jupyter_server/static/custom/custom.css
binaryData: "{{ css_file_content | b64encode }}"
eosc-logo:
mode: 0644
mountPath: /opt/conda/lib/python3.11/site-packages/jupyter_server/static/custom/logo/eosc-ntb-logo.svg
binaryData: "{{ logo_file_content | b64encode }}"
hub:
services:
......
......@@ -113,6 +113,8 @@ singleuser:
singleuser-webdav-wrapper.sh:
mode: 0755
mountPath: /usr/local/bin/jupyterhub-singleuser-webdav-wrapper
#NotebookNotary.db_file=':memory:' is used due to issues
#notebook notary file was causing in ~/.jupyter in ownCloud mount
stringData: |-
#! /bin/sh
#
......@@ -129,26 +131,41 @@ singleuser:
exec jupyterhub-singleuser \
--FileCheckpoints.checkpoint_dir='/home/jovyan/.notebookCheckpoints' \
--NotebookNotary.db_file=':memory:' \
--LabApp.custom_css=True \
"$@"
disable-labnews:
#Settings in overrides.json must be passed as stringData.
#Otherwise JupyterLab will not consider them
##Disables news Jupyter notifications
##Overrides default Help menu to include EOSC links
##Setting is reusing 'git:open-url' command from Jupyter Git
##extension to open link in browser tab, because 'help:open'
##command opens tab inside Lab and EOSC website does not
##allow itself to be open if embedded in another website
overrides-settings:
mode: 0644
mountPath: /opt/conda/share/jupyter/lab/settings/overrides.json
stringData: |-
{
"@jupyterlab/apputils-extension:notification": {
"checkForUpdates": "false",
"fetchNews": "false"
},
"@jupyterlab/application-extension:context-menu": {
"contextMenu": [
{
"command": "filebrowser:share-main",
"selector": ".jp-DirListing-item[data-isdir]",
"disabled": true
}
]
}
}
{% filter indent(10) %}
{{ overrides_file_content | to_json }}
{% endfilter %}
#Two files below are not included in /home/jovyan/.jupyter because
#that is ownCloud mount path. They are included in jupyter_server
#static path instead, because otherwise Jupyter is not considering
# custom CSS
eosc-css:
mode: 0644
mountPath: /opt/conda/lib/python3.11/site-packages/jupyter_server/static/custom/custom.css
binaryData: "{{ css_file_content | b64encode }}"
eosc-logo:
mode: 0644
mountPath: /opt/conda/lib/python3.11/site-packages/jupyter_server/static/custom/logo/eosc-ntb-logo.svg
binaryData: "{{ logo_file_content | b64encode }}"
hub:
services:
......
......@@ -26,6 +26,9 @@
vars:
name: "{{ item | basename | splitext | first }}"
secret: "{{ secrets[name] }}"
css_file_content: "{{ lookup('file', '../../common/deployments/files/css/custom.css') }}"
overrides_file_content: "{{ lookup('file', '../../common/deployments/files/settings/overrides.json') }}"
logo_file_content: "{{ lookup('file', '../../common/deployments/files/logo/eosc-ntb-logo.svg') }}"
template:
src: "{{ item }}"
dest: "/tmp/{{ item | basename }}"
......
......@@ -114,6 +114,8 @@ singleuser:
singleuser-webdav-wrapper.sh:
mode: 0755
mountPath: /usr/local/bin/jupyterhub-singleuser-webdav-wrapper
#NotebookNotary.db_file=':memory:' is used due to issues
#notebook notary file was causing in ~/.jupyter in ownCloud mount
stringData: |-
#! /bin/sh
#
......@@ -130,27 +132,41 @@ singleuser:
exec jupyterhub-singleuser \
--FileCheckpoints.checkpoint_dir='/home/jovyan/.notebookCheckpoints' \
--NotebookNotary.db_file=':memory:' \
--LabApp.custom_css=True \
"$@"
disable-labnews:
#Settings in overrides.json must be passed as stringData.
#Otherwise JupyterLab will not consider them
##Disables news Jupyter notifications
##Overrides default Help menu to include EOSC links
##Setting is reusing 'git:open-url' command from Jupyter Git
##extension to open link in browser tab, because 'help:open'
##command opens tab inside Lab and EOSC website does not
##allow itself to be open if embedded in another website
overrides-settings:
mode: 0644
mountPath: /opt/conda/share/jupyter/lab/settings/overrides.json
stringData: |-
{
"@jupyterlab/apputils-extension:notification": {
"checkForUpdates": "false",
"fetchNews": "false"
},
"@jupyterlab/application-extension:context-menu": {
"contextMenu": [
{
"command": "filebrowser:share-main",
"selector": ".jp-DirListing-item[data-isdir]",
"disabled": true
}
]
}
}
{% filter indent(10) %}
{{ overrides_file_content | to_json }}
{% endfilter %}
#Two files below are not included in /home/jovyan/.jupyter because
#that is ownCloud mount path. They are included in jupyter_server
#static path instead, because otherwise Jupyter is not considering
# custom CSS
eosc-css:
mode: 0644
mountPath: /opt/conda/lib/python3.11/site-packages/jupyter_server/static/custom/custom.css
binaryData: "{{ css_file_content | b64encode }}"
eosc-logo:
mode: 0644
mountPath: /opt/conda/lib/python3.11/site-packages/jupyter_server/static/custom/logo/eosc-ntb-logo.svg
binaryData: "{{ logo_file_content | b64encode }}"
hub:
services:
status:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment