From 0a7ba3170b43da9ce4e62944b51a154d727e8ebe Mon Sep 17 00:00:00 2001 From: Kimonas Sotirchos Date: Mon, 31 May 2021 11:36:03 +0300 Subject: [PATCH] JWA: Don't override assets with logos ConfigMap (kubeflow/kubeflow#5942) * jwa(front): Add static logos in the app The app does not contain the logos' svgs in its source code/static files. This results in the icons to not show when developing locally. This commit adds the svgs found in the logos ConfigMap to the static files of the app as well. Signed-off-by: Kimonas Sotirchos * jwa(front): Change logos fetch url Change the URLs of the logos from `static/assets/*` to `static/assets/logos`. Signed-off-by: Kimonas Sotirchos * jwa(manifests): Don't override assets with logos Mount the ConfigMap under the `static/assets/logos` directory to not override the contents of the entire assets dir. Signed-off-by: Kimonas Sotirchos --- .../src/assets/logos/group-one-icon.svg | 11 +++ .../src/assets/logos/group-one-logo.svg | 11 +++ .../src/assets/logos/group-two-icon.svg | 14 +++ .../src/assets/logos/group-two-logo.svg | 14 +++ .../src/assets/logos/jupyter-icon.svg | 89 +++++++++++++++++++ .../src/assets/logos/jupyterlab-logo.svg | 43 +++++++++ .../src/environments/environment.prod.ts | 12 +-- .../src/environments/environment.rok.prod.ts | 12 +-- .../src/environments/environment.rok.ts | 12 +-- .../frontend/src/environments/environment.ts | 12 +-- .../jupyter/manifests/base/deployment.yaml | 2 +- 11 files changed, 207 insertions(+), 25 deletions(-) create mode 100644 components/crud-web-apps/jupyter/frontend/src/assets/logos/group-one-icon.svg create mode 100644 components/crud-web-apps/jupyter/frontend/src/assets/logos/group-one-logo.svg create mode 100644 components/crud-web-apps/jupyter/frontend/src/assets/logos/group-two-icon.svg create mode 100644 components/crud-web-apps/jupyter/frontend/src/assets/logos/group-two-logo.svg create mode 100644 components/crud-web-apps/jupyter/frontend/src/assets/logos/jupyter-icon.svg create mode 100644 components/crud-web-apps/jupyter/frontend/src/assets/logos/jupyterlab-logo.svg diff --git a/components/crud-web-apps/jupyter/frontend/src/assets/logos/group-one-icon.svg b/components/crud-web-apps/jupyter/frontend/src/assets/logos/group-one-icon.svg new file mode 100644 index 00000000..cf1d2baf --- /dev/null +++ b/components/crud-web-apps/jupyter/frontend/src/assets/logos/group-one-icon.svg @@ -0,0 +1,11 @@ + + + + + + + + + diff --git a/components/crud-web-apps/jupyter/frontend/src/assets/logos/group-one-logo.svg b/components/crud-web-apps/jupyter/frontend/src/assets/logos/group-one-logo.svg new file mode 100644 index 00000000..cf1d2baf --- /dev/null +++ b/components/crud-web-apps/jupyter/frontend/src/assets/logos/group-one-logo.svg @@ -0,0 +1,11 @@ + + + + + + + + + diff --git a/components/crud-web-apps/jupyter/frontend/src/assets/logos/group-two-icon.svg b/components/crud-web-apps/jupyter/frontend/src/assets/logos/group-two-icon.svg new file mode 100644 index 00000000..8a09cead --- /dev/null +++ b/components/crud-web-apps/jupyter/frontend/src/assets/logos/group-two-icon.svg @@ -0,0 +1,14 @@ + + + + + + + + diff --git a/components/crud-web-apps/jupyter/frontend/src/assets/logos/group-two-logo.svg b/components/crud-web-apps/jupyter/frontend/src/assets/logos/group-two-logo.svg new file mode 100644 index 00000000..8a09cead --- /dev/null +++ b/components/crud-web-apps/jupyter/frontend/src/assets/logos/group-two-logo.svg @@ -0,0 +1,14 @@ + + + + + + + + diff --git a/components/crud-web-apps/jupyter/frontend/src/assets/logos/jupyter-icon.svg b/components/crud-web-apps/jupyter/frontend/src/assets/logos/jupyter-icon.svg new file mode 100644 index 00000000..61e470a1 --- /dev/null +++ b/components/crud-web-apps/jupyter/frontend/src/assets/logos/jupyter-icon.svg @@ -0,0 +1,89 @@ + + Created using Figma 0.90 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/components/crud-web-apps/jupyter/frontend/src/assets/logos/jupyterlab-logo.svg b/components/crud-web-apps/jupyter/frontend/src/assets/logos/jupyterlab-logo.svg new file mode 100644 index 00000000..ecd31ea3 --- /dev/null +++ b/components/crud-web-apps/jupyter/frontend/src/assets/logos/jupyterlab-logo.svg @@ -0,0 +1,43 @@ + + + + + diff --git a/components/crud-web-apps/jupyter/frontend/src/environments/environment.prod.ts b/components/crud-web-apps/jupyter/frontend/src/environments/environment.prod.ts index 88aa6622..c06cb854 100644 --- a/components/crud-web-apps/jupyter/frontend/src/environments/environment.prod.ts +++ b/components/crud-web-apps/jupyter/frontend/src/environments/environment.prod.ts @@ -3,12 +3,12 @@ export const environment = { apiUrl: '/jupyter', resource: 'notebooks', ui: 'default', - jupyterlabLogo: 'static/assets/jupyterlab-logo.svg', - jupyterIcon: 'static/assets/jupyter-icon.svg', - groupOneLogo: 'static/assets/group-one-logo.svg', - groupOneIcon: 'static/assets/group-one-icon.svg', - groupTwoLogo: 'static/assets/group-two-logo.svg', - groupTwoIcon: 'static/assets/group-two-icon.svg', + jupyterlabLogo: 'static/assets/logos/jupyterlab-logo.svg', + jupyterIcon: 'static/assets/logos/jupyter-icon.svg', + groupOneLogo: 'static/assets/logos/group-one-logo.svg', + groupOneIcon: 'static/assets/logos/group-one-icon.svg', + groupTwoLogo: 'static/assets/logos/group-two-logo.svg', + groupTwoIcon: 'static/assets/logos/group-two-icon.svg', // Rok rokUrl: '', diff --git a/components/crud-web-apps/jupyter/frontend/src/environments/environment.rok.prod.ts b/components/crud-web-apps/jupyter/frontend/src/environments/environment.rok.prod.ts index c80b4f1a..e70c1916 100755 --- a/components/crud-web-apps/jupyter/frontend/src/environments/environment.rok.prod.ts +++ b/components/crud-web-apps/jupyter/frontend/src/environments/environment.rok.prod.ts @@ -2,10 +2,10 @@ export const environment = { production: true, resource: 'notebooks', ui: 'rok', - jupyterlabLogo: 'static/assets/jupyterlab-logo.svg', - jupyterIcon: 'static/assets/jupyter-icon.svg', - groupOneLogo: 'static/assets/group-one-logo.svg', - groupOneIcon: 'static/assets/group-one-icon.svg', - groupTwoLogo: 'static/assets/group-two-logo.svg', - groupTwoIcon: 'static/assets/group-two-icon.svg', + jupyterlabLogo: 'static/assets/logos/jupyterlab-logo.svg', + jupyterIcon: 'static/assets/logos/jupyter-icon.svg', + groupOneLogo: 'static/assets/logos/group-one-logo.svg', + groupOneIcon: 'static/assets/logos/group-one-icon.svg', + groupTwoLogo: 'static/assets/logos/group-two-logo.svg', + groupTwoIcon: 'static/assets/logos/group-two-icon.svg', }; diff --git a/components/crud-web-apps/jupyter/frontend/src/environments/environment.rok.ts b/components/crud-web-apps/jupyter/frontend/src/environments/environment.rok.ts index 17b1a3f5..0c940919 100755 --- a/components/crud-web-apps/jupyter/frontend/src/environments/environment.rok.ts +++ b/components/crud-web-apps/jupyter/frontend/src/environments/environment.rok.ts @@ -6,12 +6,12 @@ export const environment = { production: false, resource: 'notebooks', ui: 'rok', - jupyterlabLogo: 'static/assets/jupyterlab-logo.svg', - jupyterIcon: 'static/assets/jupyter-icon.svg', - groupOneLogo: 'static/assets/group-one-logo.svg', - groupOneIcon: 'static/assets/group-one-icon.svg', - groupTwoLogo: 'static/assets/group-two-logo.svg', - groupTwoIcon: 'static/assets/group-two-icon.svg', + jupyterlabLogo: 'static/assets/logos/jupyterlab-logo.svg', + jupyterIcon: 'static/assets/logos/jupyter-icon.svg', + groupOneLogo: 'static/assets/logos/group-one-logo.svg', + groupOneIcon: 'static/assets/logos/group-one-icon.svg', + groupTwoLogo: 'static/assets/logos/group-two-logo.svg', + groupTwoIcon: 'static/assets/logos/group-two-icon.svg', }; /* * For easier debugging in development mode, you can import the following file diff --git a/components/crud-web-apps/jupyter/frontend/src/environments/environment.ts b/components/crud-web-apps/jupyter/frontend/src/environments/environment.ts index ba2db8cc..3288a321 100644 --- a/components/crud-web-apps/jupyter/frontend/src/environments/environment.ts +++ b/components/crud-web-apps/jupyter/frontend/src/environments/environment.ts @@ -7,12 +7,12 @@ export const environment = { apiUrl: 'http://localhost:5000', resource: 'notebooks', ui: 'default', - jupyterlabLogo: 'static/assets/jupyterlab-logo.svg', - jupyterIcon: 'static/assets/jupyter-icon.svg', - groupOneLogo: 'static/assets/group-one-logo.svg', - groupOneIcon: 'static/assets/group-one-icon.svg', - groupTwoLogo: 'static/assets/group-two-logo.svg', - groupTwoIcon: 'static/assets/group-two-icon.svg', + jupyterlabLogo: 'static/assets/logos/jupyterlab-logo.svg', + jupyterIcon: 'static/assets/logos/jupyter-icon.svg', + groupOneLogo: 'static/assets/logos/group-one-logo.svg', + groupOneIcon: 'static/assets/logos/group-one-icon.svg', + groupTwoLogo: 'static/assets/logos/group-two-logo.svg', + groupTwoIcon: 'static/assets/logos/group-two-icon.svg', // Rok specifics rokUrl: '', diff --git a/components/crud-web-apps/jupyter/manifests/base/deployment.yaml b/components/crud-web-apps/jupyter/manifests/base/deployment.yaml index dff3d93a..22b48f6a 100644 --- a/components/crud-web-apps/jupyter/manifests/base/deployment.yaml +++ b/components/crud-web-apps/jupyter/manifests/base/deployment.yaml @@ -17,7 +17,7 @@ spec: volumeMounts: - mountPath: /etc/config name: config-volume - - mountPath: /src/apps/default/static/assets + - mountPath: /src/apps/default/static/assets/logos name: logos-volume env: - name: APP_PREFIX