* 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>
* 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>
* web-apps(front): Remove rok references
Signed-off-by: Elena Zioga <elena@arrikto.com>
* web-apps(back): Remove rok references
Signed-off-by: Elena Zioga <elena@arrikto.com>
---------
Signed-off-by: Elena Zioga <elena@arrikto.com>
* 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>
* 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>
* vwa(back): Append notebooks using each PVC
Append notebooks using each PVC when getting and parsing all PVCs.
Refs arrikto/dev#2017
Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com>
Reviewed-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
* vwa(front): Create custom delete action column
Create custom delete column component that extends ActionComponent from
Kubeflow common code and adds the following functionalities:
* Disable the button when a row's notebooks array is not empty
* Display an appropriate message including the notebooks' names
Refs arrikto/dev#2017
Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com>
Reviewed-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
* vwa(front): Add delete button component in index page
Implement custom delete column in the table in VWA's index page.
Refs arrikto/dev#2017
Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com>
Reviewed-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
* vwa(front): Add Used by column in volumes table
Add a Used by column in volumes table of VWA's index page in order to
link to the notebooks that are using each PVC.
Refs arrikto/dev#2017
Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com>
Reviewed-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
* vwa(front): Fix integration tests
Update mock request for PVCs
Refs arrikto/dev#2017
Refs arrikto/dev#2135
Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com>
Reviewed-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
* vwa(front): Fix format error
Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com>
* web-apps(front): Fix linting errors
Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com>
---------
Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com>
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>
* 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>
* web-apps(front): Remove Protractor files
Remove Protractor files since it's not used anywhere in the common
code.
Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com>
* web-apps(front): Add Cypress attributes
Add more attributes and modify some existing ones for elements to be
selectable during UI tests with Cypress.
Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com>
* vwa(front): Install Cypress
- Install Cypress & npm scripts for UI tests
- Remove Protractor files
- Update README.md with UI tests instructions
Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com>
* vwa(front): Add UI tests with Cypress
- Add Cypress attributes for elements to be selectable during
UI tests.
- Add UI tests with Cypress to check that:
* New Volume form dialog has proper values
* Index page table contains all PVC names received
* Index page table status icons are correctly shown
* Index page table browse buttons are correctly shown
Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com>
* gh-actions(vwa): Add UI tests to VWA's frontend workflow
Add UI tests to VWA's frontend workflow. These tests should run in
Ubuntu 20.04 since Ubuntu 20.04 includes both Chrome and Firefox
installations by default.
Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com>
* vwa(front): Fix formatting errors
Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com>
* web-apps(front): Fix format errors
Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com>
Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com>
* web-apps(front): Add script
Signed-off-by: Elena Zioga <elena@arrikto.com>
* web-apps(front): Install Prettier
Signed-off-by: Elena Zioga <elena@arrikto.com>
* web-apps(front): Format code
Signed-off-by: Elena Zioga <elena@arrikto.com>
* web-apps(front): Create a workflow for code formatting/linting and unit tests
Signed-off-by: Elena Zioga <elena@arrikto.com>
Signed-off-by: Elena Zioga <elena@arrikto.com>
* 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>
* 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>
* 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>
* 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>
Extend spinner component by adding some text below the spinner in order
to inform users why we're spinning about.
Signed-off-by: Elena Zioga <elena@arrikto.com>
Signed-off-by: Elena Zioga <elena@arrikto.com>
* 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>
* 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>
* 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>
* 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>
* web-apps(front): Import @types/lodash package
Import @types/lodash package to support type definitions.
Signed-off-by: Elena Zioga <elena@arrikto.com>
* web-apps(front): Changes needed for trials table
In this commit:
- Adjust filtering tooltip to expose info only for the existing
columns.
- Extend table component to be able to highlight a row.
- Fix autocomplete dropdown bug.
Signed-off-by: Elena Zioga <elena@arrikto.com>
Signed-off-by: Elena Zioga <elena@arrikto.com>
* 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>
* vwa(front): Enable sorting in VWA (kubeflow/kubeflow#6460)
* Enable sorting functionality in VWA.
Signed-off-by: Elena Zioga <elena@arrikto.com>
* twa(front): Enable sorting in TWA (kubeflow/kubeflow#6460)
* Enable sorting functionality in TWA.
Signed-off-by: Elena Zioga <elena@arrikto.com>
* web-apps(front): Fix unit tests
* Fix unit tests.
Signed-off-by: Elena Zioga <elena@arrikto.com>
Signed-off-by: Elena Zioga <elena@arrikto.com>
* 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>
* 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>
* 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>
Create Logs Viewer component in Kubeflow common library similar to the
one we use in MWA.
Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com>
Signed-off-by: Orfeas Kourkakis <orfeas@arrikto.com>
* 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.
* 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>