Commit Graph

75 Commits

Author SHA1 Message Date
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
juliusvonkohout 6f50c375b6 Synchronize jupyter-web-application role with clusterrole (kubeflow/kubeflow#6241)
* Update role.yaml

* Update role.yaml

* Update cluster-role.yaml
2022-02-04 11:07:43 +00:00
Hao Xin fcc4786a49 Fix(manifests): Upgrade rbac.authorization.k8s.io from v1beta1 to v1 (kubeflow/kubeflow#6261) 2022-02-03 16:18:16 +00:00
Kimonas Sotirchos 64903665dc Update images for the 1.5 rc0 release (kubeflow/kubeflow#6319)
* Update the releasing version tag

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

* Run automated script for updating versions

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
2022-01-27 14:16:10 +00:00
dependabot[bot] cc03f32bfd Bump log4js from 6.3.0 to 6.4.1 in /components/crud-web-apps/jupyter/frontend (kubeflow/kubeflow#6312)
Bumps [log4js](https://github.com/log4js-node/log4js-node) from 6.3.0 to 6.4.1.
- [Release notes](https://github.com/log4js-node/log4js-node/releases)
- [Changelog](https://github.com/log4js-node/log4js-node/blob/master/CHANGELOG.md)
- [Commits](https://github.com/log4js-node/log4js-node/compare/v6.3.0...v6.4.1)

---
updated-dependencies:
- dependency-name: log4js
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-26 22:30:09 +00:00
dependabot[bot] f64c3576d7 Bump log4js from 6.3.0 to 6.4.1 in /components/crud-web-apps/volumes/frontend (kubeflow/kubeflow#6310)
Bumps [log4js](https://github.com/log4js-node/log4js-node) from 6.3.0 to 6.4.1.
- [Release notes](https://github.com/log4js-node/log4js-node/releases)
- [Changelog](https://github.com/log4js-node/log4js-node/blob/master/CHANGELOG.md)
- [Commits](https://github.com/log4js-node/log4js-node/compare/v6.3.0...v6.4.1)

---
updated-dependencies:
- dependency-name: log4js
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-26 22:29:10 +00:00
dependabot[bot] b23a8aa111 Bump log4js from 6.3.0 to 6.4.1 in /components/crud-web-apps/tensorboards/frontend (kubeflow/kubeflow#6311)
Bumps [log4js](https://github.com/log4js-node/log4js-node) from 6.3.0 to 6.4.1.
- [Release notes](https://github.com/log4js-node/log4js-node/releases)
- [Changelog](https://github.com/log4js-node/log4js-node/blob/master/CHANGELOG.md)
- [Commits](https://github.com/log4js-node/log4js-node/compare/v6.3.0...v6.4.1)

---
updated-dependencies:
- dependency-name: log4js
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-26 22:14:10 +00:00
dependabot[bot] 126a8b57bb Bump log4js from 6.3.0 to 6.4.1 in /components/crud-web-apps/common/frontend/kubeflow-common-lib (kubeflow/kubeflow#6309)
Bumps [log4js](https://github.com/log4js-node/log4js-node) from 6.3.0 to 6.4.1.
- [Release notes](https://github.com/log4js-node/log4js-node/releases)
- [Changelog](https://github.com/log4js-node/log4js-node/blob/master/CHANGELOG.md)
- [Commits](https://github.com/log4js-node/log4js-node/compare/v6.3.0...v6.4.1)

---
updated-dependencies:
- dependency-name: log4js
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-26 22:01:09 +00:00
Kimonas Sotirchos 5da1860f4a Don't use asterisk in Dockerfiles (kubeflow/kubeflow#6318)
* wa(docker): Don't copy node_modules

To ensure Kaniko is not copying stale node_moduels folders, even though
we have a dockerignore file, we are explicitly only copying the source
code.

We have seen the build system with Kaniko to fail, due to NFS stale
instances with files in node_modules and expect that this is the root
cause.

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

* twa: Update makefile to use global dockerignore

The dockerfile for TWA was copying over the local dockerignore. This was
overriding the global one we had for all the web apps.

This commit updates the Makefile of the app to use the global
dockerignore that all the apps should use.

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
2022-01-26 21:52:10 +00:00
Kimonas Sotirchos cf573451c8 frontend: Use responsive tables instead of cards (kubeflow/kubeflow#6316)
* jwa(front): Make ng lint work by ignoring e2e/tsconfig.json

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

* web-apps(front): Make the table responsive

We introduced all of our changes in the underlying TableComponent. This
component can then be either used independently or inside a material
card.

The changes we did in that component are:
1. Create Output() emitters, since this component can be used directly
2. The config object for a Table row now supports a `style` prop for
   defining the list of CSS styles to be applied
2. Remove the truncate classes (small, medium, large) and only have
   a boolean value. The user can define the width directly now via the
   `style` property in the row's config
3. Modify the classes for aligning contents right and left

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

* web-apps(front): Add table paginator

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

* web-apps(front): Add padding to titlebar text

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

* web-apps(front): Use bigger font for toolbar title

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

* jwa(front): Use responsive table and toolbar

We refactor both the index and form pages of the app to:
1. Add a top row toolbar with the title of the app and the button to
   create a new Notebook
2. Replace the card with a responsive table that shows the items. The
   component also has a paginator

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

* vwa(front): Use responsive table and toolbar

This commit:
1. Adds a toolbar at the top of the index page with the title of the app
   and the button to create a new volume
2. Replaces the card with a responsive table

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

* twa(front): Use responsive table and toolbar

This commit:
1. Adds a toolbar at the top of the index page with the title of the app
   and a button to create a new TensorBoard instance
2. Replaces the card with a resopnsive table

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

* fix the format

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

* wa(front): Add npm script for running unit tests in docker

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

* fix unit tests failing

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
2022-01-26 13:30:44 +00:00
Kimonas Sotirchos 23867db5cb JWA: Very basic E2E tests to run locally (kubeflow/kubeflow#6005)
* web-apps(front): Add test attrs selectors

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

* jwa(front): Update gitignore for cypress files

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

* jwa(front): Install cypress & npm scripts for e2e

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

* jwa(e2e): Add first cypress tests

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

* jwa: Update the README for e2e instructions

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
2022-01-24 11:46:48 +00:00
Hao Xin c771edadf4 Fix(frontend): Upgrade ts node to v4 (kubeflow/kubeflow#6242)
* Upgrade ts-node to v10

* Update lock
2021-12-15 12:37:51 +00:00
Jaeyeon Kim d987b24363 web-apps(front) : change error msg for min (kubeflow/kubeflow#6193) 2021-12-08 22:11:54 +00:00
Hao Xin 0346b82e43 chore(docs): It's better to refer to the cli documents, not repo's readme (kubeflow/kubeflow#6239) 2021-12-08 22:05:54 +00:00
Rohan Katkar 35188afc8e add(web-apps): i18n Fr translations (kubeflow/kubeflow#6122) 2021-11-24 15:29:47 +00:00
James Liu af5f419fd5 fix(web-apps): Use relative path for --deploy-url build. #5566 (kubeflow/kubeflow#6206)
* fix(web-apps): Use relative path for --base-href build

* volume web app should use volume base-href
2021-11-01 14:10:59 -07:00
Kimonas Sotirchos eb68995189 jwa(front): Don't disable vendors with no GPUs (kubeflow/kubeflow#6171)
JWA should not block users from selecting GPUs if the current cluster
nodes do not have any GPUs attached to them. We've seen users that have
autoscaled nodegroups for GPUs, so a GPU node will be added to the
cluster once a Pod has requested it.

Refs: arrikto/dev#1484

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
2021-10-07 06:23:23 -07: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 9c1c499f6d fix(jwa): Fix limits calculation when limitFactor is none (kubeflow/kubeflow#6058)
* jwa(front): Don't allow NaN values in limits

The UI should always catch a NaN value and don't add it in the form.
Currently this is the case for the cpu/memory limits.

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

* jwa(front): Limits should not be changed if dirty

If the user has manually edited the limits fields then the UI should not
try to automatically calculate them again, using the limitFactors.

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
2021-08-13 02:14:54 -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
David van der Spek 941ec2e9ff Update CRUD web apps from Angular 8 to Angular 12 (kubeflow/kubeflow#6004)
* common: update angular core and cli to 9

ng update @angular/core@9 @angular/cli@9

* common: update material, cdk and cdk-experimental to 9

ng update @angular/cdk@9 @angular/material@9 @angular/cdk-experimental@9

* common: remove entryComponents and replace TestBed.get with TestBed.inject

Edit files manually

* common: make compatible with Angular 9

Edit files manually

* common: update fontawesome to 0.6.0

npm i @fortawesome/angular-fontawesome@0.6.0

* update kubeflow-common project dependencies

* common: add @angular/localize

ng add @angular/localize

* jupyter: update angular core and cli 8

ng update @angular/core@8 @angular/cli@8

* jupyter: update angular core and cli to 9

ng update @angular/core@9 @angular/cli@9

* jupyter: update material, cdk and cdk-experimental to 9

ng update @angular/cdk@9 @angular/material@9 @angular/cdk-experimental@9

* jupyter: remove entryComponents

Edit file manually

* jupyter: update fontawesome to 0.6.0

npm i @fortawesome/angular-fontawesome@0.6.0

* jupyter: add @angular/localize

ng add @angular/localize

* tensorboards: update angular core and cli to 9

ng update @angular/core@9 @angular/cli@9

* tensorboards: update material, cdk and cdk-experimental to 9

ng update @angular/cdk@9 @angular/material@9 @angular/cdk-experimental@9

* tensorboards: remove entryComponents and replace TestBed.get with TestBed.inje…

Edit files manually

* tensorboards: update fontawesome to 0.6.0

npm i @fortawesome/angular-fontawesome@0.6.0

* tensorboards: add @angular/localize

ng add @angular/localize

* Fix tensorboards-web-app run-dev in makefile

Edit file manually

* volumes: update angular core and cli to 9

ng update @angular/core@9 @angular/cli@9

* volumes: update material, cdk and cdk-experimental to 9

ng update @angular/cdk@9 @angular/material@9 @angular/cdk-experimental@9

* volumes: remove entryComponents and replace TestBed.get with TestBe…

Edit files manually

* volumes: update fontawesome to 0.6.0

npm i @fortawesome/angular-fontawesome@0.6.0

* volumes: add @angular/localize

ng add @angular/localize

* common: update angular core and cli to 10

ng update @angular/core@10 @angular/cli@10 --force

* common: update material, cdk and cdk-experimental to 10

ng update @angular/cdk@10 @angular/material@10 @angular/cdk-experimental@10

* update kubeflow-common project dependencies

Edit file manually

* common: update fontawesome to 0.7.0

npm i @fortawesome/angular-fontawesome@0.7.0

* common: fix font location

Edit file manually

* jupyter: update angular-fontawesome to 0.7.0

npm i @fortawesome/angular-fontawesome@0.7.0

* jupyter: update angular core and cli to 10

ng update @angular/core@10 @angular/cli@10

* jupyter: update material, cdk and cdk-experimental to 10

ng update @angular/cdk@10 @angular/material@10 @angular/cdk-experimental@10

* tensorboards: update angular-fontawesome to 0.7.0

npm i @fortawesome/angular-fontawesome@0.7.0

* tensorboards: update angular core and cli to 10

ng update @angular/core@10 @angular/cli@10

* tensorboards: update material, cdk and cdk-experimental to 10

ng update @angular/cdk@10 @angular/material@10 @angular/cdk-experimental@10

* volumes: update angular-fontawesome to 0.7.0

npm i @fortawesome/angular-fontawesome@0.7.0

* volumes: update angular core and cli to 10

ng update @angular/core@10 @angular/cli@10

* volumes: update material, cdk and cdk-experimental to 10

ng update @angular/cdk@10 @angular/material@10 @angular/cdk-experimental@10

* common: update angular-fontawesome to 0.8.2

npm i @fortawesome/angular-fontawesome@0.8.2

* common: update codelyzer to 6.0.2

npm i codelyzer@6.0.2

* common: install @angular-devkit/core@11

npm install --save-dev @angular-devkit/core@11

* common: update angular core and cli to 11

ng update @angular/core@11 @angular/cli@11

* common: update material, cdk and cdk-experimental to 11

ng update @angular/cdk@11 @angular/material@11 @angular/cdk-experimental@11

* update kubeflow-common project dependencies

Edit file manually

* jupyter: update angular-fontawesome to 0.8.2

npm i @fortawesome/angular-fontawesome@0.8.2

* jupyter: update codelyzer to 6.0.2

npm i codelyzer@6.0.2

* jupyter: update angular core and cli to 11

ng update @angular/core@11 @angular/cli@11

* jupyter: update material, cdk and cdk-experimental to 11

ng update @angular/cdk@11 @angular/material@11 @angular/cdk-experimental@11

* tensorboards: update angular-fontawesome to 0.8.2

npm i @fortawesome/angular-fontawesome@0.8.2

* tensorboards: update codelyzer to 6.0.2

npm i codelyzer@6.0.2

* tensorboards: update angular core and cli to 11

ng update @angular/core@11 @angular/cli@11

* tensorboards: update material, cdk and cdk-experimental to 11

ng update @angular/cdk@11 @angular/material@11 @angular/cdk-experimental@11

* volumes: update angular-fontawesome to 0.8.2

npm i @fortawesome/angular-fontawesome@0.8.2

* volumes: update codelyzer to 6.0.2

npm i codelyzer@6.0.2

* volumes: update angular core and cli to 11

ng update @angular/core@11 @angular/cli@11

* volumes: update material, cdk and cdk-experimental to 11

ng update @angular/cdk@11 @angular/material@11 @angular/cdk-experimental@11

* common: Fix CI failure

* jupyter: npm run format:write

npm run format:write

* volumes: npm run format:write

npm run format:write

* tensorboards: manually run prettier

prettier --write 'src/**/*.{js,ts,html,scss,css}'

* common: Fix MockComponent entryComponents for CI

Manually edit file

* common: update angular-fontawesome to 0.9.0

npm i @fortawesome/angular-fontawesome@0.9.0

* common: update angular core and cli to 12

ng update @angular/core@12 @angular/cli@12

* common: update material, cdk and cdk-experimental to 12

ng update @angular/cdk@12 @angular/material@12 @angular/cdk-experimental@12

* update kubeflow-common project dependencies

Edit file manually

* common: fix Intl.DateTimeFormatOptions

Edit file manually. Type of defaultDateOptions and defaultTimeOptions needs to explicitly be set to Intl.DateTimeFormatOptions.

* jupyter: update angular-fontawesome to 0.9.0

npm i @fortawesome/angular-fontawesome@0.9.0

* jupyter: update codelyzer to 6.0.2

npm i codelyzer@6.0.2

* jupyter: update angular core and cli to 12

ng update @angular/core@12 @angular/cli@12

* jupyter: update material, cdk and cdk-experimental to 12

ng update @angular/cdk@12 @angular/material@12 @angular/cdk-experimental@12

* tensorboards: update angular-fontawesome to 0.9.0

npm i @fortawesome/angular-fontawesome@0.9.0

* tensorboards: update angular core and cli to 12

ng update @angular/core@12 @angular/cli@12

* tensorboards: update material, cdk and cdk-experimental to 12

ng update @angular/cdk@12 @angular/material@12 @angular/cdk-experimental@12

* volumes: update angular-fontawesome to 0.9.0

npm i @fortawesome/angular-fontawesome@0.9.0

* volumes: update angular core and cli to 12

ng update @angular/core@12 @angular/cli@12

* volumes: update material, cdk and cdk-experimental to 12

ng update @angular/cdk@12 @angular/material@12 @angular/cdk-experimental@12

* common: update and audit packages

npm update && npm audit fix && npm i lodash-es@4.17.21 && npm i material-icons@0.7.3

* jupyter: update and audit packages

npm update && npm audit fix && npm i material-icons@0.7.3

* tensorboards: update and audit packages

npm update && npm audit fix && npm i material-icons@0.7.3

* volumes: update and audit packages

npm update && npm audit fix && npm i material-icons@0.7.3

* jupyter: npm run format:write

npm run format:write
2021-07-21 02:35:50 -07:00
Kimonas Sotirchos 09be08aa51 WA: Use relative paths for fetching translation files (kubeflow/kubeflow#6034)
* jwa(front): Use relative path for i18n json

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

* vwa(front): Use relative path for i18n json

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

* twa(front): Use relative path for i18n json

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
2021-07-07 09:06:22 -07:00
DavidSpek 34d068da27 Sync spawner yaml from source to manifests (kubeflow/kubeflow#5999) 2021-06-21 07:33:17 -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
Saffa Alvi 1e7fbce505 feat(jupyter): add fonts as assets to service (kubeflow/kubeflow#5691)
* cwa(front): Ignore font files in assets

* feat(jupyter): add fonts as assets to service

* CRUD: fonts in common

* CWA: Remove link to css file

* jwa(front): Remove font assets from jupyter

Co-authored-by: Wendy Gaultier <wvgaultier@gmail.com>
2021-06-02 10:44:35 -07:00
juliusvonkohout 2406692558 FIX The number of gpu must be set as string in Kubernetes/Openshift (kubeflow/kubeflow#5891)
* Update form.py

* Update form.py

* Update form-default.component.ts

* fix whitespace issue
2021-06-02 10:28:35 -07:00
Kimonas Sotirchos 0a7ba3170b 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 <kimwnasptd@arrikto.com>

* jwa(front): Change logos fetch url

Change the URLs of the logos from `static/assets/*` to
`static/assets/logos`.

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

* 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 <kimwnasptd@arrikto.com>
2021-05-31 01:36:03 -07:00
Kimonas Sotirchos 33fea6f503 Add CI format checks for the Volumes web app (kubeflow/kubeflow#5820)
* vwa(front): Add npm script to check the formatting

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

* vwa(front): Update the package-lock.json

Run `npm install` to bring the package-lock.json up to date

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

* vwa(front): Fix formatting

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

* vwa(back): Fix formatting

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

* vwa(docker): Remove unused dockerignore file

We have created a global dockerignore file for all the web apps in the
parent dir.

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

* vwa(docker): Don't copy node_modules in dockerfile

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

* vwa(make): Don't include dockerignore

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

* ci(vwa): Add format check tasks

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

* jwa(docker): Copy only necessary files for build

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

* review: Use docker context instead of cd ..

Don't use a `cd ..` and copy dockerignore files back and forth. Instead
we should use the Docker context and the global dockerignore file we
have for all the web apps.

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
2021-05-17 08:25:31 -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 50445138fe (manifests): Remove unused params that break newer kustomize for web apps (kubeflow/kubeflow#5768) 2021-03-24 08:04:45 -07:00
DavidSpek 4842c53f7a Update manifests to use ECR and fix fieldPath in kustomization files (kubeflow/kubeflow#5765)
* Update manifests to use ECR and latest image tags

* remove duplicate value in central-dashboard kustomization.yaml
2021-03-24 07:35:45 -07:00
Kimonas Sotirchos facf6073e5 web-apps: Introduce an APP_SECURE_COOKIES env var (kubeflow/kubeflow#5764)
* web-apps(back): Introduce APP_SECURE_COOKIES var

Expose a new APP_SECURE_COOKIES env variable that will configure whether
the web apps should set Secure cookies or not.

This will allow the admins to configure the web apps to work when
Kubeflow is exposed over localhost/http.

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

* web-apps(back): Switch CSRF checks order

The order the backend makes the CSRF checks should be the following:
1. check if the CSRF cookie is present
2. check if the CSRF header is present
3. check if the CSRF cookie and header have the same value

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

* web-apps: Set APP_SECURE_COOKIES to false in dev

When running the web apps via the makefiles in dev mode we will need to
explicitly set the APP_SECURE_COOKIES env var to False, since the app
will be served over http.

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
2021-03-24 05:16:45 -07:00
DavidSpek b89ce2ce21 (JWA): Add RStudio trademark statement in Notebook Spawner UI (kubeflow/kubeflow#5758)
* Add RStudio trademark statement

* move tooltip position to the right of the RStudio button

* fix labels of icons

* RStudio trademark tooltip on index page, remove title jupyter-icon
2021-03-23 13:05:44 -07:00
DavidSpek 165d7d7241 (JWA): update manifests with latest notebook image tags (kubeflow/kubeflow#5757) 2021-03-23 12:30:44 -07:00
Kimonas Sotirchos a144fcae46 Update the manifests for the Jupyter web app (kubeflow/kubeflow#5741)
* manifests: Add variable for the app's prefix

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

* manifests: Remove Rok variables

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

* manifests: Use AWS image

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

* manifests: Update the spawner-config.yaml file

* Add the ImagePullPolicy setting
* Don't name the config `jupyter-web-app-jupyter-web-app-config`

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

* manifests: Permissions to start/stop nbs

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

* Add latest jupyter images

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
2021-03-23 08:50: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
DavidSpek 149393118e Add listing nodes to JWA ClusterRole for GPU vendor detection (kubeflow/kubeflow#5732) 2021-03-21 13:48:17 -07:00
Kimonas Sotirchos 8db0c6120d Manifests for the Volumes web app (kubeflow/kubeflow#5728)
Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
2021-03-19 16:22:17 -07:00
Kimonas Sotirchos 0aeda30689 Manifests for Tensorboards web app (kubeflow/kubeflow#5727)
Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
2021-03-19 16:21:17 -07:00
Yannis Zarkadas da3c7a6642 jupyter-web-app: Consolidate manifests (kubeflow/kubeflow#5721)
Signed-off-by: Yannis Zarkadas <yanniszark@arrikto.com>
2021-03-19 10:16:16 -07:00
Kimonas Sotirchos 08433d6394 web-apps: Extend common code for the apps to work in standalone mode (kubeflow/kubeflow#5710)
* web-apps(back): Introduce an APP_NO_AUTHNZ env var

The admin can use the APP_NO_AUTHNZ={True,False} to configure if the
application should perform authnz checks or not.

In case of False, then the app will not be expecting a logged in user, in the
`kubeflow-userid` header, and will not perform authorization checks using
SubjectAccessReviews.

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

* web-apps(front): Expose if Dashboard is connected

The NamespaceService will also provide an observable that informs
different parts of the app if the CentralDashboard is present.

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

* review: Use enumeration for Dashboard state

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

* review: Move common vars to a settings module

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
2021-03-18 13:16:16 -07:00
Kimonas Sotirchos ebbd123359 Fixes in Tensorboard web app (kubeflow/kubeflow#5693)
* twa(front): Use correct base-href when building

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

* web-apps(backend): Fix regex for parsing prefix

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

* twa: Add git tag while building the image

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

* twa: Fix dockerfile for buster-slim image

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

* twa: Use common date-time component to show date

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

* twa(back): Fetch the name directly from the CR

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

* review: Remove unused npm script

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

* twa: Don't override the app's config

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

* twa: Use correct AWS image in Makefile

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

* review: Use bash in Dockerfile entrypoint

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
2021-03-18 12:26:16 -07:00
Kimonas Sotirchos a63eff43ed Volumes Management UI (kubeflow/kubeflow#5684)
* vwa(back): first commit of volumes web app backend

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

* vwa(front): init code for volumes web app frontend

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

* vwa: {Make,Docker}files

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

* vwa: gitignore

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

* vwa: README

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

* review: Rename Jupyter to Volumes in README

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

* review: Rephrase comment in default flavor

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

* review: Remove snapshot reference from default flavor

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
2021-03-18 01:07:16 -07:00
dependabot[bot] d110b9670c Bump lodash from 4.17.15 to 4.17.21 in /components/crud-web-apps/common/frontend/kubeflow-common-lib (kubeflow/kubeflow#5674)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.21.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.21)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-10 03:33:23 -08:00