* 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>
* 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>
* 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>
* 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>
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>
* 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>
* 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>
* 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>
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>
* 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>
* 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>
* 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>
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>
* 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>
* 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>
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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
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>