Skip to content

Commit

Permalink
Merge pull request InseeFrLab#758 from InseeFrLab/vite
Browse files Browse the repository at this point in the history
Vite Migration
  • Loading branch information
garronej authored Feb 22, 2024
2 parents d0ef007 + e0485e4 commit 2c1189b
Show file tree
Hide file tree
Showing 82 changed files with 2,467 additions and 9,608 deletions.
9 changes: 1 addition & 8 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,8 @@ jobs:
sub_directory: web
- uses: actions/[email protected]
- uses: bahmutov/[email protected]
env:
XDG_CACHE_HOME: "/home/runner/.cache/yarn"
- run: yarn build
- run: npx keycloakify
env:
XDG_CACHE_HOME: "/home/runner/.cache/yarn"

test_helm-chart:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -98,15 +94,12 @@ jobs:
sha: ${{needs.prepare_release.outputs.target_commit}}
- uses: actions/[email protected]
- uses: bahmutov/[email protected]
env:
XDG_CACHE_HOME: "/home/runner/.cache/yarn"
- run: rm -r public/material-icons
- run: yarn build
- run: npx keycloakify
env:
XDG_CACHE_HOME: "/home/runner/.cache/yarn"
KEYCLOAKIFY_THEME_VERSION: ${{needs.prepare_release.outputs.new_chart_version}}
- run: mv build_keycloak/target/retrocompat-*.jar keycloak-theme.jar
- run: mv dist_keycloak/target/retrocompat-*.jar keycloak-theme.jar
# Delay 25 minute because wait-for-jobs has a limit of 15 minutes and the build of the docker image takes ~27 minutes
- name: Delay
run: sleep 1500
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Onyxia is developed by the French National institute of statistics and economic

**Core feature set**:

- [An interface for launching docker images](https://datalab.sspcloud.fr/catalog/inseefrlab-helm-charts-datascience)
- [An interface for helm charts](https://datalab.sspcloud.fr/catalog/inseefrlab-helm-charts-datascience)
(e.g: [Jupyter](https://jupyter.org), [RStudio](https://www.rstudio.com)) on demand on a [Kubernetes](https://kubernetes.io) cluster.
The catalog of available images is not part of the app, you can create your own.
([here](https://github.com/inseefrlab/helm-charts-datascience) is the catalog we build for the institute's needs.)
Expand Down
90 changes: 43 additions & 47 deletions web/.env
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
# fr: "%PUBLIC_URL%/custom-resources/tos/fr.md",
# }
#
# You can omit the REACT_APP_ prefix.
#
# Cache busting:
#
# Onyxia is configured to make the the browser cache assets so they are not re-downloaded
Expand Down Expand Up @@ -81,14 +79,14 @@
# You can apply theses classes on the root of your SVG on on any <g> element:
# See the default Onyxia logo for example: https://github.com/InseeFrLab/onyxia/blob/main/web/public/logo.svg?short_path=bceaf10
#
REACT_APP_HEADER_LOGO="%PUBLIC_URL%/logo.svg?v=2"
HEADER_LOGO="%PUBLIC_URL%/logo.svg?v=2"

# The parameters defines if 'Onyxia -' in the header should be hidden
# See https://user-images.githubusercontent.com/6702424/152916796-f93de2e4-b3d8-4214-bb01-628704562421.png
#
# Type: "true" or "false"
#
REACT_APP_HEADER_HIDE_ONYXIA=false
HEADER_HIDE_ONYXIA=false

# This parameter enable to defines the text that is rendered in bold in the header
# See: https://user-images.githubusercontent.com/6702424/152652494-7c2e2515-23f2-4b06-bd9f-15c00173bb66.png
Expand All @@ -99,12 +97,12 @@ REACT_APP_HEADER_HIDE_ONYXIA=false
#
# HEADER_TEXT_BOLD: My Organization
#
REACT_APP_HEADER_TEXT_BOLD=
HEADER_TEXT_BOLD=

# This parameter is for defning the text of the header that is rendered with the focus color of your palette
# See: https://user-images.githubusercontent.com/6702424/152652533-b97512ca-f6f4-4aa8-a91f-96988181902c.png
#
REACT_APP_HEADER_TEXT_FOCUS=Datalab
HEADER_TEXT_FOCUS=Datalab

# This parameter allows you to override some, or all, of the color palette.
#
Expand All @@ -129,7 +127,7 @@ REACT_APP_HEADER_TEXT_FOCUS=Datalab
# }
# }
#
REACT_APP_PALETTE_OVERRIDE=
PALETTE_OVERRIDE=

# For customizing the font used in the webapp
#
Expand Down Expand Up @@ -182,7 +180,7 @@ REACT_APP_PALETTE_OVERRIDE=
# "700": "Geist-Bold.woff2"
# }
#
REACT_APP_FONT={ fontFamily: "Work Sans", dirUrl: "%PUBLIC_URL%/fonts/WorkSans", "400": "worksans-regular-webfont.woff2", "500": "worksans-medium-webfont.woff2", "600": "worksans-semibold-webfont.woff2", "700": "worksans-bold-webfont.woff2" }
FONT={ fontFamily: "Work Sans", dirUrl: "%PUBLIC_URL%/fonts/WorkSans", "400": "worksans-regular-webfont.woff2", "500": "worksans-medium-webfont.woff2", "600": "worksans-semibold-webfont.woff2", "700": "worksans-bold-webfont.woff2" }

# This parameter let you customize the splash screen that is displayed when the app is loading.
# See: https://github.com/InseeFrLab/onyxia/assets/6702424/40369e77-acb5-4c21-b9c2-4681a1594268
Expand All @@ -202,7 +200,7 @@ REACT_APP_FONT={ fontFamily: "Work Sans", dirUrl: "%PUBLIC_URL%/fonts/WorkSans",
# Alternatively you can apply "splashscreen-animation-group1" 2 and 3 to <g> elements of your SVG to make them blink in a different rythm.
# See the default Onyxia logo for example: https://github.com/InseeFrLab/onyxia/blob/main/web/public/logo.svg?short_path=bceaf10
#
REACT_APP_SPLASHSCREEN_LOGO=
SPLASHSCREEN_LOGO=

# This parameter let you change the size of the splash screen logo.
#
Expand All @@ -217,7 +215,7 @@ REACT_APP_SPLASHSCREEN_LOGO=
#
# SPLASHSCREEN_LOGO_SCALE_FACTOR=0.8
#
REACT_APP_SPLASHSCREEN_LOGO_SCALE_FACTOR=1
SPLASHSCREEN_LOGO_SCALE_FACTOR=1

# Favicon of the webapp, it's the icon that is displayed in the browser tab.
# See: https://github.com/InseeFrLab/onyxia/assets/6702424/980987a6-be87-43de-9a1b-cf5cd3f8d435
Expand All @@ -227,29 +225,29 @@ REACT_APP_SPLASHSCREEN_LOGO_SCALE_FACTOR=1
#
# Examples: See HEADER_LOGO
#
REACT_APP_FAVICON=
FAVICON=

# For configuring the text that is displayed in the browser tab.
# see: https://github.com/InseeFrLab/onyxia/assets/6702424/180e9edb-cbd9-433c-a8a8-708394fda89f
#
# Type: string
#
REACT_APP_TAB_TITLE=Onyxia
TAB_TITLE=Onyxia

# Title of the social card.
# see: https://github.com/InseeFrLab/onyxia/assets/6702424/256b847a-ddae-400d-b585-a702b2e2253a
# The social media card gets displayed when you share the link of your Onyxia instance on social media.
#
# Type: string
#
REACT_APP_SOCIAL_MEDIA_TITLE=Onyxia
SOCIAL_MEDIA_TITLE=Onyxia

# Description text of the social card.
# see: https://user-images.githubusercontent.com/6702424/152668805-d1e055e0-2d9d-4b6c-9bc7-fba0093855aa.png
#
# Type: string
#
REACT_APP_SOCIAL_MEDIA_DESCRIPTION=Shared platform for statistical data processing and data science services
SOCIAL_MEDIA_DESCRIPTION=Shared platform for statistical data processing and data science services

# Image of displayed in the social media card.
# See: https://github.com/InseeFrLab/onyxia/assets/6702424/806ffd48-f657-4ebf-9b0d-a95de2c53459
Expand All @@ -260,7 +258,7 @@ REACT_APP_SOCIAL_MEDIA_DESCRIPTION=Shared platform for statistical data processi
#
# SOCIAL_MEDIA_IMAGE: "%PUBLIC_URL%/custom-resources/preview.png"
#
REACT_APP_SOCIAL_MEDIA_IMAGE=%PUBLIC_URL%/preview-onyxia.png
SOCIAL_MEDIA_IMAGE=%PUBLIC_URL%/preview-onyxia.png

# Parameter to customize the image that gets displayed in the background of the hompage
# and in the login pages if you are using the Onyxia Keycloak theme.
Expand All @@ -281,7 +279,7 @@ REACT_APP_SOCIAL_MEDIA_IMAGE=%PUBLIC_URL%/preview-onyxia.png
# "dark": "%PUBLIC_URL%/custom-resources/background-dark.webp"
# }
#
REACT_APP_BACKGROUND_ASSET=
BACKGROUND_ASSET=

# This parameter enables you to add some custom links in the header:
# See: https://github.com/InseeFrLab/onyxia/assets/6702424/2792da93-af21-405b-804d-be75b8f2f333
Expand Down Expand Up @@ -325,7 +323,7 @@ REACT_APP_BACKGROUND_ASSET=
# }
# ]
#
REACT_APP_HEADER_LINKS=
HEADER_LINKS=

# This parameter enables you to add some custom links in the left bar:
# See: https://github.com/InseeFrLab/onyxia/assets/6702424/fbadc4f0-dd4c-4eef-9087-29624e7cb632
Expand All @@ -334,15 +332,15 @@ REACT_APP_HEADER_LINKS=
#
# Examples: See HEADER_LINKS
#
REACT_APP_LEFTBAR_LINKS=
LEFTBAR_LINKS=

# This parameter enables to completely disable the homepage of the app.
# It's this page: https://github.com/InseeFrLab/onyxia/assets/6702424/750e1c56-dbd2-465a-8033-5d0d6f786811
# If set to true the home of your instance becomes the catalog page.
#
# Type: "true" or "false"
#
REACT_APP_DISABLE_HOMEPAGE=false
DISABLE_HOMEPAGE=false

# This parameter enables to customize the logo that gets displayed in the homepage.
# See: https://github.com/InseeFrLab/onyxia/assets/6702424/d10726b1-eaab-42d5-afe7-01183a64a26c
Expand All @@ -355,7 +353,7 @@ REACT_APP_DISABLE_HOMEPAGE=false
# or, to disable the logo:
# HOMEPAGE_LOGO: "false"
#
REACT_APP_HOMEPAGE_LOGO=
HOMEPAGE_LOGO=

# Parameter to customize the main image of the homepage.
# See: https://github.com/InseeFrLab/onyxia/assets/6702424/86bf26ed-fa2d-44f3-815d-05e09a81b7c4
Expand All @@ -367,7 +365,7 @@ REACT_APP_HOMEPAGE_LOGO=
# or, to disable the logo:
# HOMEPAGE_LOGO: "false"
#
REACT_APP_HOMEPAGE_MAIN_ASSET=
HOMEPAGE_MAIN_ASSET=

# A parameter to enable you to ajust the position of the main image of the homepage.
#
Expand All @@ -379,10 +377,10 @@ REACT_APP_HOMEPAGE_MAIN_ASSET=
# HOMEPAGE_MAIN_ASSET_X_OFFSET: "-200px"
# Yields this result: https://github.com/InseeFrLab/onyxia/assets/6702424/7970c6d3-b8ea-4f53-bc02-ceb6be12f09f
#
REACT_APP_HOMEPAGE_MAIN_ASSET_X_OFFSET=0
HOMEPAGE_MAIN_ASSET_X_OFFSET=0

# Same as HOMEPAGE_MAIN_ASSET_X_OFFSET but for the Y axis.
REACT_APP_HOMEPAGE_MAIN_ASSET_Y_OFFSET=0
HOMEPAGE_MAIN_ASSET_Y_OFFSET=0

# This parameter enables you to adjust the size of the main image of the homepage.
#
Expand All @@ -395,7 +393,7 @@ REACT_APP_HOMEPAGE_MAIN_ASSET_Y_OFFSET=0
# Make the image 50% smaller:
# HOMEPAGE_MAIN_ASSET_SCALE_FACTOR: "0.5"
# Yields this result: https://github.com/InseeFrLab/onyxia/assets/6702424/6d644051-98d7-4eb4-b94e-cbcb3bbd45a2
REACT_APP_HOMEPAGE_MAIN_ASSET_SCALE_FACTOR=1
HOMEPAGE_MAIN_ASSET_SCALE_FACTOR=1

# This parameter is used to customize the hero text of the homepage.
# See: https://github.com/InseeFrLab/onyxia/assets/6702424/aaa68da6-fa30-4308-9651-762acf3cc1c3
Expand All @@ -418,7 +416,7 @@ REACT_APP_HOMEPAGE_MAIN_ASSET_SCALE_FACTOR=1
#
# HOMEPAGE_HERO_TEXT: Welcome to the **Onyxia** Datalab. Click [here](https://example.com) to learn more. [Go to the catalog](/catalog).
#
REACT_APP_HOMEPAGE_HERO_TEXT=
HOMEPAGE_HERO_TEXT=

# This parameter enable you to display a diffent hero text when the user is authenticated.
# See: https://github.com/InseeFrLab/onyxia/assets/6702424/aaa68da6-fa30-4308-9651-762acf3cc1c3
Expand All @@ -431,17 +429,17 @@ REACT_APP_HOMEPAGE_HERO_TEXT=
#
# HOMEPAGE_HERO_TEXT_AUTHENTICATED: "Welcome %USER_FIRSTNAME%"
#
REACT_APP_HOMEPAGE_HERO_TEXT_AUTHENTICATED=
HOMEPAGE_HERO_TEXT_AUTHENTICATED=

# Same as HOMEPAGE_HERO_TEXT but for the text just below.
# See: https://github.com/InseeFrLab/onyxia/assets/6702424/121dba8a-a210-4497-8419-9a410b16dedf
#
REACT_APP_HOMEPAGE_BELOW_HERO_TEXT=
HOMEPAGE_BELOW_HERO_TEXT=

# Same as HOMEPAGE_HERO_TEXT_AUTHENTICATED but for the text just below.
# You can also use %USER_FIRSTNAME% here.
#
REACT_APP_HOMEPAGE_BELOW_HERO_TEXT_AUTHENTICATED=
HOMEPAGE_BELOW_HERO_TEXT_AUTHENTICATED=

# Parameter to customize the action button that get displayed bellow the hero section.
# See: https://github.com/InseeFrLab/onyxia/assets/6702424/26993b9b-dcb0-4ef5-9e04-73c0a089b81f
Expand Down Expand Up @@ -476,12 +474,12 @@ REACT_APP_HOMEPAGE_BELOW_HERO_TEXT_AUTHENTICATED=
#
# HOMEPAGE_CALL_TO_ACTION_BUTTON: "false"
#
REACT_APP_HOMEPAGE_CALL_TO_ACTION_BUTTON=
HOMEPAGE_CALL_TO_ACTION_BUTTON=

# This parameter enables you to display a diffent call to action button when the user is authenticated.
# See: HOMEPAGE_CALL_TO_ACTION_BUTTON
#
REACT_APP_HOMEPAGE_CALL_TO_ACTION_BUTTON_AUTHENTICATED=
HOMEPAGE_CALL_TO_ACTION_BUTTON_AUTHENTICATED=

# This parameter let you customize the cards that are displayed in the homepage.
# See: https://github.com/InseeFrLab/onyxia/assets/6702424/dc3b827d-0612-48df-89f4-75d8694398c7
Expand Down Expand Up @@ -542,7 +540,7 @@ REACT_APP_HOMEPAGE_CALL_TO_ACTION_BUTTON_AUTHENTICATED=
#
# HOMEPAGE_CARDS: "[]"
#
REACT_APP_HOMEPAGE_CARDS=
HOMEPAGE_CARDS=

# =============================================================================
# Non cosmetic parameters - Enables to configures some behaviors of the app
Expand All @@ -569,7 +567,7 @@ REACT_APP_HOMEPAGE_CARDS=
# "fr": "%PUBLIC_URL%/custom-resources/tos_fr.md"
# }
#
REACT_APP_TERMS_OF_SERVICES=
TERMS_OF_SERVICES=

# With this parameter you can define some custom HTML code that will be injected at the end of the <head> tag.
# This can be useful for analytics or for injecting some custom CSS or JS.
Expand All @@ -596,7 +594,7 @@ REACT_APP_TERMS_OF_SERVICES=
# gtag('config', 'GA_MEASUREMENT_ID');
# </script>
#
REACT_APP_CUSTOM_HTML_HEAD=
CUSTOM_HTML_HEAD=

# Enable to share a communication message to all your users, it will be displayed in a banner on the top of the page.
# https://github.com/inseefrlab/onyxia/assets/6702424/5c3345a6-b3e1-4620-af21-d8a4dad72af9
Expand Down Expand Up @@ -635,7 +633,7 @@ REACT_APP_CUSTOM_HTML_HEAD=
# }
# }
#
REACT_APP_GLOBAL_ALERT=
GLOBAL_ALERT=

# Onyxia comes by default with support for many languages.
# This parameter enables you to selectively enable a subset of language.
Expand All @@ -652,15 +650,15 @@ REACT_APP_GLOBAL_ALERT=
#
# ENABLED_LANGUAGES: fr,en
#
REACT_APP_ENABLED_LANGUAGES=
ENABLED_LANGUAGES=

# To hide the command bar by default,
# it can be enabled back in the account page by the user.
# For reference this is the command bar: https://github.com/InseeFrLab/onyxia/assets/6702424/474da82c-a0e1-4107-acf7-84870aab9f78
#
# Type: "true" or "false"
#
REACT_APP_DISABLE_COMMAND_BAR=false
DISABLE_COMMAND_BAR=false

# When this variable is set to true, it disables the injection of personal information
# into the Onyxia values for group projects. Specifically, it prevents:
Expand All @@ -673,7 +671,7 @@ REACT_APP_DISABLE_COMMAND_BAR=false
#
# Type: "true" or "false"
#
REACT_APP_DISABLE_PERSONAL_INFOS_INJECTION_IN_GROUP=false
DISABLE_PERSONAL_INFOS_INJECTION_IN_GROUP=false

# The parameter controls the automatic service
# launching behavior of Onyxia based on URL query parameters. When set to true,
Expand Down Expand Up @@ -710,7 +708,7 @@ REACT_APP_DISABLE_PERSONAL_INFOS_INJECTION_IN_GROUP=false
#
# Type: "true" or "false"
#
REACT_APP_DISABLE_AUTO_LAUNCH=false
DISABLE_AUTO_LAUNCH=false


# In the Data Explorer helper text there's a link to a sample dataset.
Expand All @@ -722,7 +720,7 @@ REACT_APP_DISABLE_AUTO_LAUNCH=false
#
# SAMPLE_DATASET_URL: "%PUBLIC_URL%/custom-resources/my-sample-dataset.parquet"
#
REACT_APP_SAMPLE_DATASET_URL=https://static.data.gouv.fr/resources/recensement-de-la-population-fichiers-detail-individus-localises-au-canton-ou-ville-2020-1/20231023-122841/fd-indcvi-2020.parquet
SAMPLE_DATASET_URL=https://static.data.gouv.fr/resources/recensement-de-la-population-fichiers-detail-individus-localises-au-canton-ou-ville-2020-1/20231023-122841/fd-indcvi-2020.parquet

# ==================================================================================
# Private parameters - Not expected to be configured by the instance administrator
Expand All @@ -732,16 +730,14 @@ REACT_APP_SAMPLE_DATASET_URL=https://static.data.gouv.fr/resources/recensement-d
# https://github.com/InseeFrLab/onyxia/assets/6702424/e026697a-bc59-4f10-b968-e2b389f8e9c1
# *_URL defines the url toward wich the user is redirected when the version number is clicked.
# Thoses two parameters ares set automatically by the Helm chart.
REACT_APP_ONYXIA_VERSION=
REACT_APP_ONYXIA_VERSION_URL=
ONYXIA_VERSION=
ONYXIA_VERSION_URL=

# This is to be configured if you want to spin up a local instance of onyxia-web
# and connect to a remote instance of onyxia-api.
# You would set for example REACT_APP_ONYXIA_API_URL=https://datalab.sspcloud.fr/api
REACT_APP_ONYXIA_API_URL=/api

REACT_APP_CUSTOM_RESOURCES_URL=%PUBLIC_URL%/custom-resources
# You would set for example ONYXIA_API_URL=https://datalab.sspcloud.fr/api
ONYXIA_API_URL=/api

GENERATE_SOURCEMAP=true
CUSTOM_RESOURCES_URL=%PUBLIC_URL%/custom-resources

REACT_APP_ALLOW_THEME_TESTING_VIA_URL=false
ALLOW_THEME_TESTING_VIA_URL=false
Loading

0 comments on commit 2c1189b

Please sign in to comment.