notebooks/components/crud-web-apps/common/frontend/kubeflow-common-lib
Kimonas Sotirchos 08433d6394 web-apps: Extend common code for the apps to work in standalone mode (kubeflow/kubeflow#5710)
* web-apps(back): Introduce an APP_NO_AUTHNZ env var

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

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

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

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

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

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

* review: Use enumeration for Dashboard state

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

* review: Move common vars to a settings module

Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com>
2021-03-18 13:16:16 -07:00
..
projects/kubeflow web-apps: Extend common code for the apps to work in standalone mode (kubeflow/kubeflow#5710) 2021-03-18 13:16:16 -07:00
.editorconfig Create an Angular Library with common frontend code (kubeflow/kubeflow#5252) 2020-08-28 05:14:53 -07:00
.gitignore Create an Angular Library with common frontend code (kubeflow/kubeflow#5252) 2020-08-28 05:14:53 -07:00
README.md web-apps(front): Update the README (kubeflow/kubeflow#5481) 2020-12-23 02:42:28 -08:00
angular.json Create an Angular Library with common frontend code (kubeflow/kubeflow#5252) 2020-08-28 05:14:53 -07:00
package-lock.json Bump lodash from 4.17.15 to 4.17.21 in /components/crud-web-apps/common/frontend/kubeflow-common-lib (kubeflow/kubeflow#5674) 2021-03-10 03:33:23 -08:00
package.json Bump lodash-es from 4.17.11 to 4.17.14 in /components/crud-web-apps/common/frontend/kubeflow-common-lib (kubeflow/kubeflow#5475) 2021-03-10 03:32:23 -08:00
tsconfig.json Create an Angular Library with common frontend code (kubeflow/kubeflow#5252) 2020-08-28 05:14:53 -07:00
tslint.json Create an Angular Library with common frontend code (kubeflow/kubeflow#5252) 2020-08-28 05:14:53 -07:00

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:

  1. Build the kubeflow node module from this source code
  2. Link the produced module to your global npm modules
  3. Link the kubeflow module 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

  1. Any new component added to this library should also include some basic unit tests
  2. 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).