Commit Graph

89 Commits

Author SHA1 Message Date
Elena Zioga 95bbbf07da [wa-theme-typography]: Define theme and typography (kubeflow/kubeflow#7062)
* web-apps(front): Define theme and typography

In this commit:
* Create a styles folder that contains all sccs files.
* Define the generic theme and typography.

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

* web-apps(front): Use the style of the specified body-1 level

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

* web-apps(front): Use the styles of the specified title and headline levels

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

* web-apps(front): Use primary color in snackbar component

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

* web-apps(front): Change back button

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

* jwa(front): Fix imports after restructuring

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

* jwa(front): Add mat-typography class in index.html

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

* jwa(front): Use the style of the specified title level

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

* jwa(front): Use primary color

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

* vwa(front): Fix imports after restructuring

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

* vwa(front): Add mat-typography class in index.html

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

* vwa(front): Use the style of the specified title level

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

* twa(front): Fix typo

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

* twa(front): Add mat-typography class in index.html

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

* twa(front): Fix imports after restructuring

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

* twa(front): Use primary color

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

* twa(front): Fix formatting

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

* twa(front): Fix ui test

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

---------

Signed-off-by: Elena Zioga <elena@arrikto.com>
2023-07-31 16:47:29 +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
dependabot[bot] 095d47ac53 build(deps): bump socket.io-parser from 4.2.1 to 4.2.3 in /components/crud-web-apps/jupyter/frontend (kubeflow/kubeflow#7145)
Bumps [socket.io-parser](https://github.com/socketio/socket.io-parser) from 4.2.1 to 4.2.3.
- [Release notes](https://github.com/socketio/socket.io-parser/releases)
- [Changelog](https://github.com/socketio/socket.io-parser/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io-parser/compare/4.2.1...4.2.3)

---
updated-dependencies:
- dependency-name: socket.io-parser
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-13 18:14:03 +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
Elena Zioga 8af965fb9b jwa(front): Fix the workspace volume form's inputs (kubeflow/kubeflow#7029)
* jwa(front): Fix the size input value

The size form input was not showing the correct value, once the frontend
got the ConfigMap defaults. We should be updating the intermediate FormControl
when the data from the ConfigMap arrives at the frontend.

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

* jwa(front): Fix the access-mode input value

The access mode form input was not showing the correct value, once the frontend
got the ConfigMap defaults. We should be updating the intermediate FormControl
when the data from the ConfigMap arrives at the frontend.

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

* jwa(front): Fix the name input value

The name form input was not showing the correct value, once the frontend
got the ConfigMap defaults. We should be updating the intermediate FormControl
when the data from the ConfigMap arrives at the frontend.

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

* jwa(front): Use 5Gi everywhere

All new volumes will have a default value of 5Gi. This includes the 'Add
new volume' button for both the workspace and data volumes.

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

* jwa(front): Add UI tests with Cypress

Add integration tests with Cypress to ensure that the form will have the
correct values once it gets the ConfigMap.

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

---------

Signed-off-by: Elena Zioga <elena@arrikto.com>
2023-03-22 13:57:43 +00:00
Elena Zioga 40cd9ad78e web-apps(front): Fix typos (kubeflow/kubeflow#7017)
* jwa(front): Fix typo

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

* twa(front): Fix typos

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

---------

Signed-off-by: Elena Zioga <elena@arrikto.com>
2023-03-06 17:58:36 +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
Elena Zioga f465180f05 jwa(front): JWA shows a weird long value for memory when restoring notebook from snapshot (kubeflow/kubeflow#6897)
* web-apps(front): Introduce MemoryValue class

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

* web-apps(front): Introduce unit tests for the MemoryValue class

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

* jwa(front): Use MemoryValue class for memory column

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

* web-apps(front): Make quantityToScalar() use only Number()

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

* jwa(front): Update quantityToScalar() import

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

* vwa(front): Update quantityToScalar() import

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

---------

Signed-off-by: Elena Zioga <elena@arrikto.com>
2023-02-24 12:33:24 +00:00
dependabot[bot] c1df60efda build(deps): bump json5 from 1.0.1 to 1.0.2 in /components/crud-web-apps/jupyter/frontend (kubeflow/kubeflow#6880)
Bumps [json5](https://github.com/json5/json5) from 1.0.1 to 1.0.2.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v1.0.1...v1.0.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-16 13:38:06 +00:00
Kimonas Sotirchos a99af12eea Add approvers to the frontends (kubeflow/kubeflow#6929)
* Add approvers to the frontends

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

* Add owners to common frontend code

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

---------

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
2023-02-13 17:23:24 +00:00
Orfeas Kourkakis b5e0deec09 cdb-angular: Show KF version (kubeflow/kubeflow#6918)
* cdb-angular: Modify README.md port-forward instructions

Add instructions to port-forward Profiles KFAM service.

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

* web-apps(front): Modify SnackBar service to use config parameter

Modify SnackBarService to:

 - Accept as a parameter a config object that will be able to include
   all possible configurations MatSnackBarService
 - Inject MAT_SNACK_BAR_DEFAULT_OPTIONS. This allows a structured way
   for every WA to provide to the service a default configuration
   app-wide for values like like HorizontalPosition and duration.

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

* cdb(front): Use Kubeflow common library

Build CDB using components from Kubeflow's common libary.

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

* cdb-angular(front): Introduce backend service and ErrorInterceptor

 - Introduce backend service to handle requests to the backend
 - Use snackBar service by KF common library
 - Introduce ErrorInterceptor to hanlde errors in a uniform way.

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

* cdb-angular(back): Remove "kubeflowVersion" from API

Remove the "kubeflowVersion from Workgroup's API "/env-info"
endpoint since it was using CRDs which are deprecated.

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

* cdb-angular(back): Modify KF build version during runtime

By default, the version displayed in the dashboard's sidebar is the
ENV variable `BUILD_VERSION` defined during build time. With this
change, the `/api/workgroup/env-info` endpoint may now return the
build's label, version, and id which will be displayed instead of the
BUILD_VERSION. These values are assigned during runtime and can be
defined through the deployment's `KF_DASHBOARD_BUILD_LABEL`,
`KF_DASHBOARD_VERSION` and `KF_DASHBOARD_BUILD_ID` ENV variables.

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

* cdb-angular(front): Show KF version in the left sidebar

Show KF version at the bottom of the left sidebar navigation menu.
Variables that are used to show the KF version get their default values
during build time but may be modified during runtime by the
depoloyment's ENV vars fetched from the request at
'/api/workflow/env-info'.

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

* jwa(front): Update the use of SnackBarService

Update the use of SnackBarService in order to pass required data via a
`config` object.

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

* vwa(front): Update the use of SnackBarService

Update the use of SnackBarService in order to pass required data via a
`config` object.

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

* twa(front): Update the use of SnackBarService

Update the use of SnackBarService in order to pass required data via a
`config` object.

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

* web-apps(front): Fix flaky filtering unit test

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

---------

Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com>
2023-02-13 16:16:25 +00:00
Orfeas Kourkakis c75943512f jwa(front): Fix ENV vars bug in details page (kubeflow/kubeflow#6903)
Fix bug where extracting the ENV vars from PodDefaults for a notebook
would fail when one of the PodDefaults didn't contain any ENV variables.

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

Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com>
2023-01-25 17:44:52 +00:00
Elena Zioga 89d4f97303 [wa-actual-links-in-tables] Make links in our table component actual links (kubeflow/kubeflow#6864)
* web-apps(front): Import @angular/router package

Import @angular/router package to use routerLink directive.

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

* web-apps(front): Introduce LinkValue class

Introduce a distinct class for our external and internal links.

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

* web-apps(front): Modify unit tests

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

* web-apps(front): Remove isLink property from PropertyValue class

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

* jwa(front): Make links actual links

Make JWA's main table links actual links by using the new LinkValue
class.

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

* vwa(front): Make links actual links

Make VWA's main table links actual links by using the new LinkValue
class.

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

Signed-off-by: Elena Zioga <elena@arrikto.com>
2023-01-18 14:19:21 +00:00
Orfeas Kourkakis c7e03bbaba jwa(front): Add UI tests with Cypress (kubeflow/kubeflow#6891)
* jwa(front): Add integration tests with Cypress

 - Upgrade Cypress to version ^10.10.0
 - Add integration tests with Cypress to check that:
   * Index page renders every Notebook name into the table
   * Index page shows correct Status icon for all notebooks

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

* gh-actions(jwa): Add UI tests to JWA's frontend workflow

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

* fixup! gh-actions(jwa): Add UI tests to JWA's frontend workflow

Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com>
2023-01-16 11:03:00 +00:00
Tasos Alexiou a14539b57c jwa(front): Auto update mount path (kubeflow/kubeflow#6875)
* jwa(front): Add missing generateName form control

Add missing generateName form control when creating the metadata
form group from a PVC.

Signed-off-by: Tasos Alexiou <tasos@arrikto.com>

* jwa(front): Update volume's mount path when name changes

Extend VolumeMountComponent class and update volume's mount path
when it is not dirty and name is changed. This feature affects only
the data volumes and not the workspace volume.

Signed-off-by: Tasos Alexiou <tasos@arrikto.com>

* jwa(front): Add UI tests for volume's mount path input

Signed-off-by: Tasos Alexiou <tasos@arrikto.com>

Signed-off-by: Tasos Alexiou <tasos@arrikto.com>
2023-01-11 14:38:16 +00:00
Orfeas Kourkakis 3dec176271 web-apps(front): Sort events & conditions tables by date (kubeflow/kubeflow#6858)
* web-apps(front): Sort tables according to input

Configure tableConfig with new fields (column and order) that the table
will use to sort items during initialization.

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

* web-apps(front): Sort conditions table by timestamp

Initialize conditions table sorted by Last Transition Time column, with
the most recent ones being on top.

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

* jwa(front): Sort events by timestamp

Initialize events table in EVENTS tab by Created at column, with the
most recent ones being on top.

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

* vwa(front): Sort events by timestamp

Initialize events table in EVENTS tab by Created at column, with the
most recent ones being on top.

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

* vwa(front): Fix format errors

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

Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com>
2022-12-20 16:50:19 +00:00
Orfeas Kourkakis d5216c7d2a jwa(front): Link to VWA details page (kubeflow/kubeflow#6857)
* web-apps(front): Create lib-urls component

Create a URLs component in Kubeflow common library which takes a
list of URLs and their corresponding name and exposes them
horizontally in a div.

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

* web-apps(front): Add unit test for lib-urls

Add a unit test for lib-urls component

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

* jwa(front): Remove column Volumes from index page

Remove Volumes column from the table in JWA's index page.

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

* jwa(front): Link to a Volume details from JWA details page

 - Expose all volumes from a notebook, not only PVCs.
 - Expose the volumes grouped by type, having PVCs link to their
   corresponding volume details page in VWA, using lib-urls
   component.

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

* vwa(front): Implement lib-urls in VWA details page

Implement lib-urls component in the OVERVIEW tab of VWA's volume
details page to avoid duplicate code.

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

* jwa(front): Use common link styles

Use common link styles in configurations component.

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

* Fix linting errors

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

Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com>
2022-12-20 16:49:18 +00:00
Orfeas Kourkakis cfe32e59c2 web-apps(front): Fix namespace selector bug (kubeflow/kubeflow#6845)
Fix a bug in the namespace selectors of JWA, VWA and TWA. In order to
show the namespace selector, they only checked if there is no
env.production variable available. This resulted in the selector not
showing even if there was no dashboard which is not expected.

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

Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com>
2022-12-20 16:47:18 +00:00
Orfeas Kourkakis afed933c2c jwa(front): Add details page functionalities & unit tests (kubeflow/kubeflow#6822)
* jwa(front): Add buttons to Notebook details page

In this commit:

 - Add buttons for Connect, Start/Stop, Delete actions.
 - Create Actions Service to handle button actions and implement it
   in all components that use these buttons.
 - Small CSS tweak in title toolbar component in order for
   buttons to be aligned horizontally.

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

* jwa(front): Handle query parameters in Notebook page

Add query parameter handling for each tab in order for the user to
be able to navigate directly to the tab of choice inside the
Notebook details page.

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

* web-apps(front): Add default values in lib-conditions-table fields

Add default values for lastTransitionTime, reason & message fields
in order to prevent the table's Sorting functionality returning
error due to null values.

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

* jwa(front): Add unit tests for notebook-page component

In this commit, add unit tests in order to:
 - Show only the proper tab according to query parameters passed.
 - Switch tabs according to query parameters passed.
 - Update disabled field of buttons according to notebook status.
 - Update start/stop button according to notebook status.

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

* jwa(front): Add unit tests for OVERVIEW tab component

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

Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com>
2022-12-15 11:54:21 +00:00
Elena Zioga 0cb36aedf4 jwa(front): Rework the create page (kubeflow/kubeflow#6826)
* jwa(front): Fix panel.ts file

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

* jwa(front): Modify form name component

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

* web-apps(front): Add a helper tooltip in section component

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

* jwa(front): Rework the Create page

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

* jwa(front): Fix linting errors

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

Signed-off-by: Elena Zioga <elena@arrikto.com>
2022-12-15 09:06:22 +00:00
Elena Zioga dd0a681457 web-apps(front): Enable source maps in WAs (kubeflow/kubeflow#6787)
* jwa(front): Add source maps in the browser

* Enable source maps in both development and production.

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

* vwa(front): Add source maps in the browser

* Enable source maps in both development and production.

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

* twa(front): Add source maps in the browser

* Enable source maps in both development and production.

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

Signed-off-by: Elena Zioga <elena@arrikto.com>
2022-12-09 14:12:11 +00:00
Elena Zioga cca60b7d26 jwa(front): Fix unit tests (kubeflow/kubeflow#6804)
* jwa(front): Rename form-default component

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

* jwa(front): Create missing module files

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

* jwa(front): Remove form-rok and form components

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

* jwa(front): Update JWA's @angular/common package

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

* jwa(front): Modify rok-url component

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

* web-apps(front): Add Rok URL message

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

* vwa(front): Update VWA's @angular/common package

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

* vwa(front): Remove the headers request

Remove the headers request since the common code implements it.

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

* jwa(front): Fix JWA's unit tests

Fix JWA's unit tests.

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

* gh-actions: Add GH action to run JWA unit tests

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

* jwa(build): Update Dockerfile

Update Dockerfile to not build Rok.

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

Signed-off-by: Elena Zioga <elena@arrikto.com>
2022-12-07 12:49:38 +00:00
Orfeas Kourkakis 750178e2ae jwa(front): Add YAML tab to Notebook details page (kubeflow/kubeflow#6790)
Add tab to show the full YAML both from the Notebook and from its
underlying pod, when there is one.

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

Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com>
2022-12-05 10:28:08 +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
Kimonas Sotirchos 485550635b web-apps: Add support for all-namespaces in the Volumes and TensorBoards web apps (kubeflow/kubeflow#6778)
* vwa(front): Support all-namespaces

The VWA will now be able to work with the "All namespaces" option of
the CentralDashboard.

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

* twa(front): Support all-namespaces

The TWA will now be able to work with the "All namespaces" option of
the CentralDashboard.

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

* wa(front): Add cypress attributes

Add more attributes for elements to be selectable when running e2e
tests.

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

* jwa(e2e): Add e2e tests for all-namespaces

Add a new e2e test that checks if the Namespaces column is shown
when selecting all-namespaces.

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

* dashboard: Allow all-namespaces for vwa/twa

The dashboard will be allowing the VWA and TWA to work with
all-namespaces, now that we added this functionality.

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

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
2022-11-29 10:56:43 +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
dependabot[bot] f0d9b37e14 build(deps): bump loader-utils from 1.4.1 to 1.4.2 in /components/crud-web-apps/jupyter/frontend (kubeflow/kubeflow#6748)
Bumps [loader-utils](https://github.com/webpack/loader-utils) from 1.4.1 to 1.4.2.
- [Release notes](https://github.com/webpack/loader-utils/releases)
- [Changelog](https://github.com/webpack/loader-utils/blob/v1.4.2/CHANGELOG.md)
- [Commits](https://github.com/webpack/loader-utils/compare/v1.4.1...v1.4.2)

---
updated-dependencies:
- dependency-name: loader-utils
  dependency-type: indirect
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-28 18:02:16 +00:00
dependabot[bot] c7c1b85944 build(deps): bump engine.io and socket.io in /components/crud-web-apps/jupyter/frontend (kubeflow/kubeflow#6759)
Bumps [engine.io](https://github.com/socketio/engine.io) and [socket.io](https://github.com/socketio/socket.io). These dependencies needed to be updated together.

Updates `engine.io` from 6.1.3 to 6.2.1
- [Release notes](https://github.com/socketio/engine.io/releases)
- [Changelog](https://github.com/socketio/engine.io/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/engine.io/compare/6.1.3...6.2.1)

Updates `socket.io` from 4.4.1 to 4.5.3
- [Release notes](https://github.com/socketio/socket.io/releases)
- [Changelog](https://github.com/socketio/socket.io/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io/compare/4.4.1...4.5.3)

---
updated-dependencies:
- dependency-name: engine.io
  dependency-type: indirect
- dependency-name: socket.io
  dependency-type: indirect
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-28 11:13:14 +00:00
Orfeas Kourkakis 878eb35e0f jwa(front): Use new Editor component (kubeflow/kubeflow#6775)
Import new Editor component from Kubeflow Common Library and replace
all instances of previous Ace Editor.

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

Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com>
2022-11-28 10:23:14 +00:00
Mathew Wicks 7f1d338ab6 fix setting readOnly on gpus (kubeflow/kubeflow#6735) 2022-11-24 12:34:10 +00:00
Elena Zioga 9fa3fde87e Upgrade @angular/material in WAs (kubeflow/kubeflow#6763)
* jwa(front): Upgrade @angular/material package (kubeflow/kubeflow#6462)

* Upgrade @angular/material package to align the mat-chip x button.

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

* vwa(front): Upgrade @angular/material package (kubeflow/kubeflow#6462)

* Upgrade @angular/material package to align the mat-chip x button.

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

* twa(front): Upgrade @angular/material package (kubeflow/kubeflow#6462)

* Upgrade @angular/material package to align the mat-chip x button.

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

Signed-off-by: Elena Zioga <elena@arrikto.com>
2022-11-23 15:06:43 +00:00
Elena Zioga 955fb6b19b Filtering support for the web apps (kubeflow/kubeflow#6754)
* web-apps(front): Add filtering functionality in WAs (kubeflow/kubeflow#6462)

* Add filtering functionality in the common table component.

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

* jwa(front): Differentiate type property (kubeflow/kubeflow#6462)

* Differentiate type property from other ComponentValue properties.

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

Signed-off-by: Elena Zioga <elena@arrikto.com>
2022-11-23 13:44:43 +00:00
Elena Zioga 23f3a32721 Sorting support for JWA (kubeflow/kubeflow#6742)
* web-apps(front): Add sorting in common code (kubeflow/kubeflow#6460)

* Add sorting functionality in the common code.

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

* jwa(front): Enable sorting in JWA (kubeflow/kubeflow#6460)

* Enable sorting functionality in JWA.

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

Signed-off-by: Elena Zioga <elena@arrikto.com>
2022-11-15 14:51:27 +00:00
Kimonas Sotirchos 1be7370a06 web-apps: Common code for all-namespaces (kubeflow/kubeflow#6730)
* wa(front): Use es2019 to have .flat()

Add es2019 to the tsconfig.compilerOptions.lib array in order for the
tslint linter to not complain about the use of flat().

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

* wa(front): all-namespaces requests helper

Add a helper function in the backend.service that can take care of
creating the observable that will make requests for all namespaces.

Refs arrikto/dev#1529

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

* wa(front): Disable toolbar + button on all-namespaces

Add helper methods to toolbar buttons to disable/enable them and add a
tooltip if the user selected all-namespaces.

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

* wa(front): Common logic for dynamic ns column

We want to show a `namespace` column when the user selects
all-namespaces, to make it easier to identify the different objects.

To not replicate the logic of adding and removing a column if all
namespaces was selected we moved this logic in the common table
component.

We also add an option to the component's config to disable/enable this
behavior.

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

* jwa(front): Utilize common code for all-namespaces

Update the JWA's code to work with the common code introduced to
supporting all-namespaces. This includes changes for:
* The Namespace column in the main table
* Helpers for performing requests in all namespaces
* Dynamically enabling/disabling the `+ new` button

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

* frontend: Update the linting GH Action

Ensure we run `ng lint` to check if the code is properly linted.

Previously we just did `ng lint --fix` which would try to fix the code,
and not complain about it. But this means that we don't actually check
if the code is linted.

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

* wa(front): Fix linting issues in common code

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

* gh-actions: Lint apps in parallel

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

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
2022-11-14 16:22:26 +00:00
dependabot[bot] 44458191cc build(deps): bump loader-utils from 1.4.0 to 1.4.1 in /components/crud-web-apps/jupyter/frontend (kubeflow/kubeflow#6716)
Bumps [loader-utils](https://github.com/webpack/loader-utils) from 1.4.0 to 1.4.1.
- [Release notes](https://github.com/webpack/loader-utils/releases)
- [Changelog](https://github.com/webpack/loader-utils/blob/v1.4.1/CHANGELOG.md)
- [Commits](https://github.com/webpack/loader-utils/compare/v1.4.0...v1.4.1)

---
updated-dependencies:
- dependency-name: loader-utils
  dependency-type: indirect
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-14 12:53:26 +00:00
Orfeas Kourkakis b64781917b web-apps(front): Introduce new Editor component (kubeflow/kubeflow#6733)
* web-apps(front): Introduce new Editor component

Create new Editor component as part of the Kubeflow Common Library, that
wraps and integrates Monaco Editor as an AMD module.

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

* web-apps(front): Add unit tests for Editor component

Add unit tests for the Editor component's loadability and
functionality

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

* Fix Editor-related linting errors

 - Add const prvEditor in tests
 - Ignore monaco.ts interface file in ESLint

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

Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com>
2022-11-14 12:39:27 +00:00
dependabot[bot] 49f1fe5e14 build(deps): bump socket.io-parser from 4.0.4 to 4.0.5 in /components/crud-web-apps/jupyter/frontend (kubeflow/kubeflow#6729)
Bumps [socket.io-parser](https://github.com/socketio/socket.io-parser) from 4.0.4 to 4.0.5.
- [Release notes](https://github.com/socketio/socket.io-parser/releases)
- [Changelog](https://github.com/socketio/socket.io-parser/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io-parser/compare/4.0.4...4.0.5)

---
updated-dependencies:
- dependency-name: socket.io-parser
  dependency-type: indirect
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-11 10:20:51 +00:00
Kimonas Sotirchos 766528e659 web-apps: Ensure in-flight requests are cancelled (kubeflow/kubeflow#6718)
* vwa(front): Use ng serve for local dev

Add proxy rules to connect the webpack dev server with the backend

* twa(front): Use ng serve for local dev

Refs arrikto/dev#1597

* vwa(back): Fix the install-deps make rule

Use the new common code path when installing the common packages.

* wa(front): Disable Angular analytics

Edit the angular.json file of all our frontend components to not send
Angular analytics. This way we won't be seeing a y/N input each time we
try to build the frontend, which could also block a CI/CD system.

* wa(front): Add exponential-backoff service

Create an Angular Service that handles the polling. Specifically the
polling function has as input an observable responsible for fetching the
data. It will return a final observable, which will be using the
fetch-observable, that will only be emitting the final data.

This service will take care of:
1. Checking if the new data is new and reset the polling
2. Cancelling in-flight requests, if someone terminates the subscription

* vwa(front): Use the new Polling Service

The frontend code of VWA will now be using the new Poller Service which
has a pure RxJS implementation underneath. This will make it simpler to
cancel in-flight requests and also moves the reset logic into the common
code.

* jwa(front): Use the new Polling Service

The frontend code of JWA will now be using the new Poller Service which
has a pure RxJS implementation underneath. This will make it simpler to
cancel in-flight requests and also moves the reset logic into the common
code.

* twa(front): Use the new Polling Service

The frontend code of TWA will now be using the new Poller Service which
has a pure RxJS implementation underneath. This will make it simpler to
cancel in-flight requests and also moves the reset logic into the common
code.
2022-11-10 14:37:00 +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 c98c2d4ac9 jwa: Support for showing Notebooks from all namespaces (kubeflow/kubeflow#6706)
* jwa(back): Use gevent for gunicorn's workers

Since the backend only serves simple HTTP requests that need some K8s
data, instead of only have working processes we will also use greenlets.
This way we can have multiple user-space threads that will handle the
http requests.

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

* jwa(front): Use cli to continuously build the UI

We extend the current package.json file to allow us to build and serve
the UI via Angular's dev server.

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

* wa(front): Handle all-namespaces

The common library will add an event handler to dashboard's lib when it
is emitting all the namespaces. By extension, the common namespace
service will be exposing a new observable that will be emitting the list
of all the namespaces, when the user selects this from the dashboard.

This way current apps won't break, since they will simply not handle
this new observable.

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

* wa(front): Handle dynamic table colums

The UIs will be showing a new column for the namespace only when the
user selects all-namespaces from the dashboard. The common code should
expose handlers for modifying the tables' config columns accordingly.

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

* jwa(front): Make requests for all-namespaces

As a first iteration in order for the JWA to support showing Notebooks
from all namespaces it will be polling with batch requests. After all
the requests, for all the namespaces, succeed then the JWA will sort
them based on their name and show them in the table.

While this approach will be generating a significantly bigger amount of
requests, we chose this approach because:
1. It was simple to implement, since we only need to modify the frontend
2. We don't add any extra abstractions on the backend and keep the 1-1
   relationship with the k8s api endpoints
3. To further optimize we now only look on K8s concepts and won't have
   to adjust them to a custom backend implementation [2]

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

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
2022-11-04 15:33:16 +00:00
Elena Zioga d053c3fc92 [wa-upgrade-k8s-client] Upgrade @kubernetes/client-node in wa frontends (kubeflow/kubeflow#6696)
* jwa(front): Upgrade @kubernetes/client-node module

* Upgrade @kubernetes/client-node module, so that to include
  quantityToScalar function directly from kubernetes js module.
* Set allowSyntheticDefaultImports flag to true to allow 'import x
  from y' when a module doesn't have a default export.

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

* vwa(front): Upgrade @kubernetes/client-node module

* Upgrade @kubernetes/client-node module, so that to include
  quantityToScalar function directly from kubernetes js module.
* Set allowSyntheticDefaultImports flag to true to allow 'import x
  from y' when a module doesn't have a default export.

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

* twa(front): Upgrade @kubernetes/client-node module

* Upgrade @kubernetes/client-node module, so that to include
  quantityToScalar function directly from kubernetes js module.
* Set allowSyntheticDefaultImports flag to true to allow 'import x
  from y' when a module doesn't have a default export.

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

Signed-off-by: Elena Zioga <elena@arrikto.com>
2022-11-03 08:37:05 +00:00
Elena Zioga b6ae7a746d [wa-age-column-improvements] Improvements in the web app's age column (kubeflow/kubeflow#6694)
* web-apps(front): Rename Age header in WAs

* Rename Age header to Created at.

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

* web-apps(front): Right-align date columns in WAs

* Make date columns to be right-aligned.

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

Signed-off-by: Elena Zioga <elena@arrikto.com>
2022-11-01 08:39:21 +00:00
Bryan Paget b40e4e0364 fix(volume name): update formCtrl.get() (kubeflow/kubeflow#6681)
The Angular code for `<app-form-data-volumes>` was missing `.value`.
2022-10-25 12:57:30 +00:00
dependabot[bot] a9df14972d build(deps): bump jszip from 3.6.0 to 3.10.1 in /components/crud-web-apps/jupyter/frontend (kubeflow/kubeflow#6641)
Bumps [jszip](https://github.com/Stuk/jszip) from 3.6.0 to 3.10.1.
- [Release notes](https://github.com/Stuk/jszip/releases)
- [Changelog](https://github.com/Stuk/jszip/blob/main/CHANGES.md)
- [Commits](https://github.com/Stuk/jszip/compare/v3.6.0...v3.10.1)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-25 10:05:30 +00:00
dependabot[bot] f932c6bfb6 build(deps): bump jose from 2.0.5 to 2.0.6 in /components/crud-web-apps/jupyter/frontend (kubeflow/kubeflow#6654)
Bumps [jose](https://github.com/panva/jose) from 2.0.5 to 2.0.6.
- [Release notes](https://github.com/panva/jose/releases)
- [Changelog](https://github.com/panva/jose/blob/v2.0.6/CHANGELOG.md)
- [Commits](https://github.com/panva/jose/compare/v2.0.5...v2.0.6)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-18 08:16:28 +00:00
juliusvonkohout ffccc4b360 Docker -> OCI Update form-image.component.html (kubeflow/kubeflow#6673)
Docker is dead and superseeded by OCI on all common Platforms
2022-10-13 16:00:03 +00:00
Orfeas Kourkakis 25c1bc09ad JWA(front): Fix image group one and two not showing (kubeflow/kubeflow#6625)
Fix image group one and two not showing in JWA's New notebook form, even
when the avaialable config provides value for them.

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

Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com>
2022-08-25 08:32:10 +00:00
suryabdev a1c5de49a6 Fix #6616: Typo on New Notebook page (kubeflow/kubeflow#6620) 2022-08-23 09:50:25 +00:00
Xin Hao 02f2013eb7 Fix(Jupyter): Fix the ImageGroup object path (kubeflow/kubeflow#6596) 2022-07-26 14:52:14 +00:00