Commit Graph

34 Commits

Author SHA1 Message Date
Tobias Goerke 0e787960f5 fix: local var shadowing import (kubeflow/kubeflow#7375)
resolves #7373
2023-10-23 18:05:08 +00:00
Tobias Goerke 7286a41656 fix: KeyError on KF 1.8 (kubeflow/kubeflow#7335)
This change fixes an error 500 on notebook creation
2023-10-13 08:45:52 +00:00
Daniela Plascencia b38794b7c6 fix: set default GPU vendors list (kubeflow/kubeflow#7320)
The change introduced by kubeflow/kubeflow#6736 removed the default GPU vendors
list, which causes an issue when trying to select a vendor from the dropdown menu
if the vendors list is not configured.
This commit can be reverted if proper documentation is provided for users/distributions
to configure the dropdown menu.
Fixes #7273
2023-10-09 08:28:18 +00:00
boarder7395 5213455aa3 Only load spawner_ui_config.yaml once every 10 minutes. closes #7259 (kubeflow/kubeflow#7260)
* Only load spawner_ui_config.yaml once every 10 minutes.

* Update cache to 60 seconds
2023-10-04 16:24:16 +00:00
axel7083 310d4a0c10 feature(notebook): Adding creator user-id to annotation (kubeflow/kubeflow#7198)
* Adding creator annotation to notebooks

* Adding missing html

* Fixing linter issue

* Fixing prettier

* Adding condition for displaying creator (backward compatibility)
2023-07-31 16:37:29 +00:00
Kimonas Sotirchos 0dc4261955 Fix Python linting (kubeflow/kubeflow#7060)
* gh-action: Workflow for testing python lint

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* lint: Run autopep8 to lint files

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* linting: Manual changes

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

---------

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
2023-03-30 09:32:05 +00:00
Elena Zioga c0f00e836b jwa: Improve how JWA exposes errors (kubeflow/kubeflow#6952)
* web-apps(front): Fix status case

* Fix the status case to properly show the warning icon when the status
  phase is warning.

Signed-off-by: Elena Zioga <elena@arrikto.com>

* web-apps(front): Modify status-icon component

* Modify the status-icon component to follow the status cases.

Signed-off-by: Elena Zioga <elena@arrikto.com>

* web-apps(front): Modify status component

Signed-off-by: Elena Zioga <elena@arrikto.com>

* web-apps(front): Introduce status-info component

* Have an admonition in the details page of each Notebook with a
  detailed message on the current status.

Signed-off-by: Elena Zioga <elena@arrikto.com>

* jwa(back): Extend process_status function

The process_status parses the status by:
- Checking the .status.containerState.
- Checking the .status.conditions, since they have the one-liner reason
  and a message.
- If none of the above exist, it will use the Events emitted for the
  notebook.
- In case it deduces the status from an Event and it's not available
  anymore, it uses a generic message.

Also, add a 10 second delay to the backend logic where we display a
spinner and a generic message to prevent a warning icon from appearing
immediately after a notebook is initialized.

Signed-off-by: Elena Zioga <elena@arrikto.com>

* jwa(back): Extend getNotebook request

* Extend the getNotebook request to also include the processed status
  information in the Notebook details page.

Signed-off-by: Elena Zioga <elena@arrikto.com>

* jwa(front): Extend the frontend

Extend the frontend by:
- Adding an admonition with a detailed message on the current status
  bellow the notebook name.
- Adding the processed_status field.

Signed-off-by: Elena Zioga <elena@arrikto.com>

* jwa(front): Fix unit tests

Fix unit tests accordingly.

Signed-off-by: Elena Zioga <elena@arrikto.com>

* jwa: Don't show the popup when a notebook is being stopped

* Use the waiting status, which also uses the spinner, when a notebook
  is being stopped.

Signed-off-by: Elena Zioga <elena@arrikto.com>

* vwa(front): Update lib-status-icon

Signed-off-by: Elena Zioga <elena@arrikto.com>

* fixup! jwa(back): Extend getNotebook request

* fixup! jwa(back): Extend process_status function

---------

Signed-off-by: Elena Zioga <elena@arrikto.com>
2023-03-23 15:23:22 +00:00
Midhun Nair 78e067e594 Fix: Strip unwanted space in custom image name (kubeflow/kubeflow#7026) 2023-03-14 15:40:25 +00:00
Mathew Wicks e3725c98d8 clean up default `spawner_ui_config.yaml` (kubeflow/kubeflow#6736) 2023-03-08 07:45:12 +00:00
Elena Zioga 85f262abb9 jwa: Remove all the Rok references (kubeflow/kubeflow#6985)
* jwa(front): Remove rok references

Signed-off-by: Elena Zioga <elena@arrikto.com>

* jwa(back): Remove rok references

Signed-off-by: Elena Zioga <elena@arrikto.com>

---------

Signed-off-by: Elena Zioga <elena@arrikto.com>
2023-03-06 10:06:35 +00:00
Orfeas Kourkakis 2a2ad29745 jwa: Add EVENTS tab to Notebook details page (kubeflow/kubeflow#6782)
* jwa(back): Get a notebook's events

 - Add logic in the backend to fetch the events of a notebook.
 - Fix the authorization parameters in the get_notebook_events
   function.

Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com>

* jwa(front): Add EVENTS tab to Notebook details page

Add Events tab to show the available events of the notebook in the
form of a table, in order to help a user with debugging the
notebook.

Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com>

Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com>
2022-12-01 16:25:45 +00:00
Orfeas Kourkakis 03c240a5d5 jwa(front): Add LOGS tab to the notebook details page (kubeflow/kubeflow#6779)
* jwa(back): Get a notebook's logs

Add logic in the backend to fetch the logs of a notebook's
underlying pod.

Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com>

* jwa(front): Add LOGS tab to Notebook details page

 - Create Logs tab to show the logs of the notebook's underlying
   pod.
 - Create Logs Viewer component in Kubeflow common library exactly
   like the one we have in MWA.

Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com>

Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com>
2022-11-29 15:28:42 +00:00
Orfeas Kourkakis 54f4cee3b2 jwa(front): Create distinct notebook details page (kubeflow/kubeflow#6769)
* jwa(back): Get a single notebook and its pod

In this commit:

 - Add logic in the backend to fetch a single notebook and its
   underlying pod.
 - Make list_pods function in Kubeflow common code to accept a
   label_selector parameter and use it to filter out results when
   available.

Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com>

* jwa(front): Create Notebook details page with OVERVIEW tab

In this commit:

 - Create OVERVIEW tab to show key information about the notebook
   and its underlying pod.
 - Create Content List Item component in Kubeflow commonn library to
   be able to encapsulate any content/component in the form of a
   list item.
 - Create Variables Group component in Kubeflow common library to
   show groups of variables in the form of chips.
 - Small UI tweak in Details list Item component from Kubeflow
   common library in order to stop chips from overlapping with each
   other.

Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com>

* Fix linting errors

* Include Kubeflow common library's new package-lock.json

Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com>

* jwa(front): Replace pod conditions with notebook status conditions

Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com>

* web-apps(back): Backend fetch pods fix

Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com>

Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com>
2022-11-29 08:17:42 +00:00
Kimonas Sotirchos 6af0c9a614 jwa: Use common date component for age (kubeflow/kubeflow#6719)
Instead of parsing the date in the backend we should use our common UI
date component, in order to show dates in a uniform way.
2022-11-08 15:36:40 +00:00
Kimonas Sotirchos 4387f1bc15 JWA: Fix backend unittests and add GH Action (kubeflow/kubeflow#6711)
* jwa(back): Fix volume unit tests

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* gh-action: Add GH Action for JWA's backend unittests

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* review: Use a more descriptive name for workflow file

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* review: Better name for the workflow

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
2022-11-08 10:35:39 +00:00
sergeykuprikov 1708fc7b68 Add quotes to notebook_template.yaml namespace field. (kubeflow/kubeflow#6655) 2022-10-25 10:04:29 +00:00
Ed Henry 444ed46b5b Cast nvidia.com/gpu value as string respective of K8s Resource Spec (kubeflow/kubeflow#6051) 2022-07-30 02:48:45 +00:00
apoger 939e1e22ca Introduce a mechanism to build all Kubeflow images (kubeflow/kubeflow#6555)
* build: Update components makefiles for building

We'll create a top-level Makefile under components/ dir
that has the following rules:

* build-all:
  To build all images locally

* push-all:
  * We can use a specific REGISTRY and retag the images
  * Push all the images

This top-level Makefile will run the sub-Makefiles that every
component has for building and pushing the images.

We modified every sub-Makefile as follows:
* We don't use a registry in images by default
* Removed unused rules and vars
* Use the --dirty flag of git describe in TAG

        --dirty[=<mark>]
               Describe the working tree. It means describe HEAD and
               appends <mark> (-dirty by default) if the working tree
               is dirty.

Signed-off-by: Apotolos Gerakaris <apoger@arrikto.com>

* build: Create makefiles for notebook servers

The common starting point of building the notebook-server
images are the following 4 *base* images:
- base
- codeserver
- jupyter
- rstudio

All other server images need to build on top of them. We'll
dynamically pass the base images in every Dockerfile by
using an ARG IMG. We can set the value of this ARG during
docker build with the --build-arg CLI argument.

This way we build both the base images with a tag locally,
and then we pass that image as arg via the Makefile and build the rest

So we modified our building procedure as follows:
1. Build the base image since everything starts from there

2. Pass the base image as an ARG in the Dockerfiles of
jupyter, codeserver, rstudio images and build on top

3. Pass the base images in all other server images and build
on top

For that we will:

1. Create a Makefile for each of the notebook servers, in each folder
   a. Each makefile will be responsible for building the bases and use args for passing them on

2. Use the central Makefile to call each Makefile from above

Signed-off-by: Apotolos Gerakaris <apoger@arrikto.com>

* cherry-pick: Notebook server upstream fixes

Relevant upstream PR: https://github.com/kubeflow/kubeflow/pull/6466/files

Signed-off-by: Apotolos Gerakaris <apoger@arrikto.com>

* build: Fix Makefiles

- Remove build-gcp and build-gcr rules as we don't use them anywhere in
the project
- Fix code conficts

Signed-off-by: Apotolos Gerakaris <apoger@arrikto.com>

* build: Fix Dockerfiles for notbook-server images

We remove the previous logic of using already built images as bases.
The users must use only the Makefiles to pass the appropriate BASE_IMG
and build the images correctly.

Thus, we have Makefiles everywhere that:

- Can build any base image
- If an image requires another notebook base, then we first build that one using its makefile,
  and then use it as docker ARG for building the next one

Signed-off-by: Apotolos Gerakaris <apoger@arrikto.com>

* build: Fix notebook-controller Makefile

Removed a misplaced "|" char that breaks the Makefile

Signed-off-by: Apotolos Gerakaris <apoger@arrikto.com>

* build: Update GH action workflows

* Update workflow for notebook-server images:
  - Add a step for building all images by using the
  central-Makefile under components/example-notebook-servers/ dir.
  - Add a step for pushing all images by using the
  central-Makefile under components/example-notebook-servers/ dir.

* Update workflow for all Kubeflow images:
  - Add a step for building & pushing all images by using the
  top-level Makefile under components/ dir.

Signed-off-by: Apotolos Gerakaris <apoger@arrikto.com>

* build: Remove completely ECR references from images

Replace everywhere the "public.ecr.aws/j1r0q0g6/notebooks/notebook-servers"
prefix with "kubeflownotebookswg"

Signed-off-by: Apotolos Gerakaris <apoger@arrikto.com>

* build: Fix GH actions for Kubeflow components

Fix GH actions to use the updated make rules
when building the Kubeflow component images.

Remove the "docker.io" prefix when building with
GH action workflows

Signed-off-by: Apotolos Gerakaris <apoger@arrikto.com>
2022-07-01 17:54:06 +00:00
Kimonas Sotirchos ae4d647d3c jwa: Expose a last-activity column (kubeflow/kubeflow#6544)
We want to extend JWA to have a column for showing the `Last activity`
of a Notebook CR.

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
2022-06-29 13:21:22 +00:00
Kimonas Sotirchos 08542ef8bc jwa: Rework the Storage API of the web app (kubeflow/kubeflow#6321)
* wa(back): Add helper for deserializing JSON obj

In some cases we might need to construct Python k8s lib objects from the
JSONs that are provided by clients. I.e. the UI will be sending a PVC
object in json format, so the backend will need to create the
corresponding client.V1PersistentVolumeClaim object and submit it.

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
Reviewed-by: Ilias Katsakioris <elikatsis@arrikto.com>

* wa(back): Serialization helper

Add helper function for converting a k8s-client object into a dict that
can be sent as an HTTP response.

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
Reviewed-by: Ilias Katsakioris <elikatsis@arrikto.com>

* wa(back): Add dry run to Notebooks and PVCs

The backend will need to be able to create objects with dry-run, in
order to ensure they are valid. The backend will need to check that both
the Notebook and the PVCs can be created beforehand.

This way we avoid the scenario where we create PVCs but the Notebook
fails to be created, and the PVCs are never garbage collected.

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
Reviewed-by: Ilias Katsakioris <elikatsis@arrikto.com>

* wa(back): Update kubernetes to 0.17

In order to support dry-run we must use the 0.17 version of the Python
k8s client.

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
Reviewed-by: Ilias Katsakioris <elikatsis@arrikto.com>

* wa(back): Extend api module to patch pvcs

The backend will need to be able to PATCH PVCs in order to set the
ownerReference to the Notebook that mounts the PVCs.

Ref: arrikto/dev/issues/386#issuecomment-856700392

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
Reviewed-by: Ilias Katsakioris <elikatsis@arrikto.com>

* jwa(back): Work with new Volumes API

The backend API should not add any more layers of abstractions on top of
the K8s API. The backend should expect the client/UI to be sending the
entire PVC spec of a new PVC.

Refs: arrikto/dev/issues/386

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
Reviewed-by: Ilias Katsakioris <elikatsis@arrikto.com>

* jwa(back): Add unittests for new volumes API

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
Reviewed-by: Ilias Katsakioris <elikatsis@arrikto.com>

* jwa(back): Extend the PVC info returned

We want to show both the access mode and size of the existing PVCs, when
a user clicks on the dropdown to select which PVC to mount.

The backend will need to provide this information to the frontend. We
don't want to send the K8s list of PVCs since this will result in a lot
of unnecessary data to be sent.

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
Reviewed-by: Ilias Katsakioris <elikatsis@arrikto.com>

* jwa(front): Add proxy config for Rok

When developing the Rok flavor locally we will need to be able to open
the Rok chooser. This can be done by using Angular/webpack proxy to
bring the exposed rok service and the app under the same domain.

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
Reviewed-by: Tasos Alexiou <tasos@arrikto.com>

* jwa(front): Remove card from form

The form of the app should not be a big card, but a normal form.

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
Reviewed-by: Tasos Alexiou <tasos@arrikto.com>

* jwa(front): Install AceModule for yaml editing

Install AceModule to allow users to edit yamls of objects.

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
Reviewed-by: Tasos Alexiou <tasos@arrikto.com>

* wa(front): Change the styling of form sections

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
Reviewed-by: Tasos Alexiou <tasos@arrikto.com>

* jwa(front): Create common volume components

Component for:
* New PVC and configuring its spec
* Attaching an existing PVC in a Notebook

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
Reviewed-by: Tasos Alexiou <tasos@arrikto.com>

* jwa(front): Update Rok form for new Volume API

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
Reviewed-by: Tasos Alexiou <tasos@arrikto.com>

* jwa(front): Mark inputs as dirty when restoring Lab

When the UI autofills the form with values from a JupyterLab snapshot
then it should mark the touched fields as dirty. This way if a field has
errors the UI will make that input red.

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
Reviewed-by: Tasos Alexiou <tasos@arrikto.com>

* jwa: Update ConfigMap in manifests

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* jwa(front): Fix format errors

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
2022-02-07 16:26:17 +00:00
Abhishek Vilas Munagekar 76c6bc9b40 Fix NaN in Kubeflow Notebooks (kubeflow/kubeflow#6092)
* Fix NaN in Kubeflow Notebooks

* add a validation check for NaN values

* fix: validation check if value is None

* lint: fix line length
2021-08-16 10:26:06 -07:00
Kimonas Sotirchos e9b1bfca5c fix(web-apps): Use Angular's i18n proposed implementation (kubeflow/kubeflow#6065)
* jwa(front): Add i18n for french in angular.json

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* jwa(front): Add i18n rules in package.json

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* jwa(front): i18n FormImage

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* jwa(front): i18n FormAdvancedOptions

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* jwa(front): i18n FormAffinityTolerations

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* jwa(front): i18n FormConfigurations

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* jwa(front): i18n FormCpuRam

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* jwa(front): i18n FormDataVolumes

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* jwa(front): i18n FormGpus

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* jwa(front): i18n FromName

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* jwa(front): i18n FormWorkspaceVolume

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* jwa(front): i18n Volume

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* web-apps(front): i18n BackendService

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* web-apps(front): Add localize to peerDependencies

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* web-apps(front): Import $localize in library

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* web-apps(front): i18n RokService

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* jwa(front): i18n Form

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* jwa(front): i18n BackendService

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* web-apps(front): i18n ConfirmDialog

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* jwa(front): i18n Index

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* web-apps(front): i18n ResourceTable

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* web-apps(front): i18n SnackBar

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* web-apps(front): i18n Form

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* web-app(front): i18n NameNamespaceSelector

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* web-apps(front): Remove ngx-translate

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* jwa(front): i18n App

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* jwa(front): Remove ngx-translate from package.json

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* jwa(back): Don't parse keys in status

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* vwa(back): Revert backend messages

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* jwa(front): Update translation language files

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* web-apps(back): Don't parse keys in status

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* vwa(front): Add i18n for french in angular.json

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* vwa(front): Add i18n rules in package.json

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* vwa(front): i18n Form

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* vwa(front): i18n Index

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* vwa(front): i18n BackendService

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* vwa(front): i18n App

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* vwa(front): Remove ngx-translate from package.json

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* vwa(front): i18n Form

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* vwa(front): Update translation language files

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* twa(back): Revert backend messages

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* twa(front): Add i18n rules in package.json

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* twa(front): Add i18n for french in angular.json

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* twa(front): i18n Index

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* twa(front): i18n BackendService

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* twa(front): i18n App

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* twa(front): Update translation language files

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* twa(front): Remove ngx-translate from package.json

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* wa: Update READMEs

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* web-apps(front): Add localize when testing

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
2021-08-12 05:13:03 -07:00
Wendy Gaultier 9f0334174c CRUD web apps: i18n (kubeflow/kubeflow#5880)
* feat(jupyter): add modules for translations

* feat(jupyter): fix path for translations + add GPU translations

* feat(jupyter): add translations

* feat(jupyter): add translations to form-default

* feat(jupyter): add translations to affinity/tolerations

* feat(jupyter): add translations to Image Pull Policy

* feat(jupyter): remove imports from app.module.ts + fix translations

* web-apps(front): add TranslationModule to common for jupyter

* Implement i18n for jupyter frontend
- Including common components needed
- Refactor translation file

* web-apps(front): add i18n to messages from backend
Status tooltip text
Snackbar message

* web-apps(front): volumes and tensorboards i18n ini
Add the i18n feature for the other 2 projects

* feat(volume): add translations for volume

* feat(jupyter): refactor asset file

* Update asset files for all folders

* feat(tensorboards): add i18n
Update all asset files

* cwa: add new translations

* cwa: Add README documentation

* fix: formatting with prettier

* Fix tests

* Fix python format

* remove comment

Co-authored-by: saffaalvi <alvi118@uwindsor.ca>
Co-authored-by: Jose-Matsuda <tongster789@gmail.com>
2021-06-21 07:26:17 -07:00
DavidSpek 9381b829fc Update spawner_ui_config.yaml with new tags (kubeflow/kubeflow#5998)
* Update images in spawner_ui_config.yaml

* Update manifest image tags
2021-06-21 06:00:17 -07:00
Saffa Alvi ffe75b6a52 feat(jupyter): Support hiding image registry/tag (kubeflow/kubeflow#5681)
* feat(jupyter): Support hiding image registry/tag

* feat(jupyter): Support hiding VSCode/RStudio images registry/tag

* rebasing onto upstream master

* fix: formatting with prettier and set default hideRegistry=true

* fix: move hideRegistry and hideTag from spawnerFormDefaults.image

* fix whitespace

* add tooltip for images

Co-authored-by: JessicaBarh <jessicabarhoma@gmail.com>
2021-06-09 10:26:51 -07:00
DavidSpek 2e5eaa1dc6 Remove the f-strings in the Jupyter web app's backend (kubeflow/kubeflow#5680) 2021-06-03 09:10:37 -07:00
Jaeyeon Kim 2a0d0c7857 [fix]: Make jupyter-web-app parse workspace volume MountPath (kubeflow/kubeflow#5952)
* [fix]: Make jupyter-web-app parse workspace volume MountPath

- workspace volume path was fixed with "/home/jovyan"
- it should be enable to parse from jupyter-web-app-config's data

* change parsing key correctly
2021-06-03 08:53:36 -07:00
DavidSpek fe2789b9d4 Make notebook limits configurable with a multiplication factor (kubeflow/kubeflow#5815)
* Make notebook limits configurable with a multiplication factor

* Make limits configurable under advanced section

* run prettier to format frontend code

* fix formatting and add rounding in backend

* Return error if limit is smaller than request

* Allow disabling limitFactor by setting it to none

* review: remove camelCase in python backend

* fix: update spawner_ui_config.yaml in manifests directory

* review: fix setting limits backend

* review: remove unnecessary check from backend
2021-04-13 08:40:11 -07:00
DavidSpek 2570a8eea4 Remove Logo Trademarks from the Jupyter Web App and make logos configurable (kubeflow/kubeflow#5823)
* rebase: Make logos configurable in configmap and remove trademark references

Rebased to remove the changes to the package-lock.json

* review: add suggested changes and add image group section to README
2021-04-13 05:04:04 -07:00
Kimonas Sotirchos 149a986d3d Add CI format checks for the Jupyter web app (kubeflow/kubeflow#5811)
* jwa(front): Add npm rule for checking the format

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* ci: Add common tasks for format checks

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* ci(jwa): Add format check tasks

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* jwa(back): Fix formatting

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* jwa(front): Fix formatting

Run `npm run format:write` on frontend

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* jwa(front): Include prettier in package.json

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* jwa(docker): Don't copy node_modules in Dockerfile

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* web-apps: Add global dockerignore file

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* jwa: Remove unused dockerignore file

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* jwa(make): Don't include dockerignore and cleanup

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
2021-04-08 03:51:02 -07:00
DavidSpek 165d7d7241 (JWA): update manifests with latest notebook image tags (kubeflow/kubeflow#5757) 2021-03-23 12:30:44 -07:00
DavidSpek 90a8e02fc1 (JWA): Add server type selector for jupterlab, vs-code and r-studio (kubeflow/kubeflow#5646)
* jwa(back): ability to setting annotations on NB resource

* jwa(back): update spanwer yaml, dump logo from yaml if file doesn't exist

* jwa(front): add annotations and VSCode/RStudio image types/config

* jwa(front): add server type toggle to UI

* jwa(front): set annotations in notebook request based on server-type

* jwa(front): add server type column to index page

* review: improve button toggle formatting

* jwa(back): set rstudio-tidyverse image in spawner_ui_config

* review: move rewrite and headers to backend

* review: add logo SVGs and set them in environment*.ts

* review: fix how allowing custom images works

* review: add server type logo to index
2021-03-22 05:09:18 -07:00
Kimonas Sotirchos 9593da2cd3 Initialize the Jupyter web app frontend in crud-web-apps (kubeflow/kubeflow#5332)
* Update the backend

For the frontend to work properly we will need to add the following
changes to jupyter web app's backend as well as to the common backend
code:
* rename the references from `flask_rest_backend` to `crud_backend` in
  the web app's backend code
* add a route for exposing GPU info. This way the UI will block users
  from creating Notebooks with a GPU type that is not installed at all
  in the cluster

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* Update the common frontend library

New functionality added:
* An `Advanced Settings` button that can expand and shrink to
  expose/hide more options in the form
* All validators will have a debounce time to make the input of
  characters smoother
* Extend the Status types to allow start/stopped resources
* Extend the main table config to support a button [ ex CONNECT for
  jupyter web app ]
* The http services should use relative URLs

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* Update the frontend to utilize the common code

The bulk of the new frontend code. The folder structure is changed to
make it more clear what pages are used from the page.

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* {Make,Docker}files

Add Makefile and Dockerfiles. Note that GCB build process needs to be
updated.

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* README.md

Add a readme that explains how to build the app and have a development
environment.

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
2020-10-27 07:45:59 -07:00
Kimonas Sotirchos 5d84874fc4 Refactor the JWA backend to utilize common code (kubeflow/kubeflow#5316)
* WA: Backend common: update the library

Update the common python wheel wrt:
* How to distinguish between dev and prod mode
* Extra routes for handling Notebooks
* Serving the index.html for every non api route (SPA)
* Add a STOPPED state to the possible Status values

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* JWA: Add the refactored backend

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>

* JWA: Backend: Add support for Affinity/Tolerations

* Extend the configuration yaml with default form values for the
  affinity/tolerations
* Set them accordingly when the user submits a notebook

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
Reviewed-by: Ilias Katsakioris <elikatsis@arrikto.com>
2020-09-29 02:37:25 -07:00