* wa(back): Add helper for deserializing JSON obj In some cases we might need to construct Python k8s lib objects from the JSONs that are provided by clients. I.e. the UI will be sending a PVC object in json format, so the backend will need to create the corresponding client.V1PersistentVolumeClaim object and submit it. Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com> Reviewed-by: Ilias Katsakioris <elikatsis@arrikto.com> * wa(back): Serialization helper Add helper function for converting a k8s-client object into a dict that can be sent as an HTTP response. Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com> Reviewed-by: Ilias Katsakioris <elikatsis@arrikto.com> * wa(back): Add dry run to Notebooks and PVCs The backend will need to be able to create objects with dry-run, in order to ensure they are valid. The backend will need to check that both the Notebook and the PVCs can be created beforehand. This way we avoid the scenario where we create PVCs but the Notebook fails to be created, and the PVCs are never garbage collected. Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com> Reviewed-by: Ilias Katsakioris <elikatsis@arrikto.com> * wa(back): Update kubernetes to 0.17 In order to support dry-run we must use the 0.17 version of the Python k8s client. Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com> Reviewed-by: Ilias Katsakioris <elikatsis@arrikto.com> * wa(back): Extend api module to patch pvcs The backend will need to be able to PATCH PVCs in order to set the ownerReference to the Notebook that mounts the PVCs. Ref: arrikto/dev/issues/386#issuecomment-856700392 Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com> Reviewed-by: Ilias Katsakioris <elikatsis@arrikto.com> * jwa(back): Work with new Volumes API The backend API should not add any more layers of abstractions on top of the K8s API. The backend should expect the client/UI to be sending the entire PVC spec of a new PVC. Refs: arrikto/dev/issues/386 Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com> Reviewed-by: Ilias Katsakioris <elikatsis@arrikto.com> * jwa(back): Add unittests for new volumes API Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com> Reviewed-by: Ilias Katsakioris <elikatsis@arrikto.com> * jwa(back): Extend the PVC info returned We want to show both the access mode and size of the existing PVCs, when a user clicks on the dropdown to select which PVC to mount. The backend will need to provide this information to the frontend. We don't want to send the K8s list of PVCs since this will result in a lot of unnecessary data to be sent. Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com> Reviewed-by: Ilias Katsakioris <elikatsis@arrikto.com> * jwa(front): Add proxy config for Rok When developing the Rok flavor locally we will need to be able to open the Rok chooser. This can be done by using Angular/webpack proxy to bring the exposed rok service and the app under the same domain. Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com> Reviewed-by: Tasos Alexiou <tasos@arrikto.com> * jwa(front): Remove card from form The form of the app should not be a big card, but a normal form. Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com> Reviewed-by: Tasos Alexiou <tasos@arrikto.com> * jwa(front): Install AceModule for yaml editing Install AceModule to allow users to edit yamls of objects. Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com> Reviewed-by: Tasos Alexiou <tasos@arrikto.com> * wa(front): Change the styling of form sections Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com> Reviewed-by: Tasos Alexiou <tasos@arrikto.com> * jwa(front): Create common volume components Component for: * New PVC and configuring its spec * Attaching an existing PVC in a Notebook Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com> Reviewed-by: Tasos Alexiou <tasos@arrikto.com> * jwa(front): Update Rok form for new Volume API Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com> Reviewed-by: Tasos Alexiou <tasos@arrikto.com> * jwa(front): Mark inputs as dirty when restoring Lab When the UI autofills the form with values from a JupyterLab snapshot then it should mark the touched fields as dirty. This way if a field has errors the UI will make that input red. Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com> Reviewed-by: Tasos Alexiou <tasos@arrikto.com> * jwa: Update ConfigMap in manifests Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com> * jwa(front): Fix format errors Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com> |
||
|---|---|---|
| .. | ||
| projects/kubeflow | ||
| .editorconfig | ||
| .gitignore | ||
| README.md | ||
| angular.json | ||
| package-lock.json | ||
| package.json | ||
| tsconfig.json | ||
| tslint.json | ||
README.md
Kubeflow Common Frontend Library
This code provides a common library of reusable Angular Components that can be used from our different Kubeflow web apps. This library aims to:
- Enforce a common UX throughout the different apps
- Reduce the development effort required to propagate changes to all the web apps
- Minimize the code duplication between our Kubeflow web apps
This project was generated with Angular CLI version 8.3.20, which is required to build and run the unit tests.
Local development
In order to use this library while developing locally your Angular app you will need to:
- Build the
kubeflownode module from this source code - Link the produced module to your global npm modules
- Link the
kubeflowmodule in the npm modules of you app
Building the library locally
# build the npm module
npm run build
# might need sudo, depending on where you global folder lives
# https://nodejs.dev/learn/where-does-npm-install-the-packages
npm link dist/kubeflow
Linking it to the app
cd ${APP_DIR}
npm install
npm link kubeflow
Running unit tests
Run ng test to execute the unit tests via Karma.
Contributor Guidelines
Unit tests
- Any new component added to this library should also include some basic unit tests
- The unit tests should be passing at any point of time
Git commits
Git commits that modify this code should be prefixed with web-apps(front).