Coder Social home page Coder Social logo

odpi / egeria-ui Goto Github PK

View Code? Open in Web Editor NEW
35.0 12.0 17.0 13.61 MB

User interface instance using main Egeria functionalities.

Home Page: https://odpi.github.io/egeria-ui/

License: Apache License 2.0

HTML 12.17% JavaScript 11.06% Dockerfile 10.94% SCSS 13.75% TypeScript 52.09%
entry-point javascript ui egeria

egeria-ui's Introduction

Egeria UI

egeria ui build

Library Latest version available
egeria-js-commons egeria-js-commons
egeria-ui-core egeria-ui-core
egeria-ui-components egeria-ui-components
happi-graph happi-graph

Table of contents

  1. Prerequisites
  2. Dependencies
  3. Tests
  4. Development
  5. Production
    1. Standalone build
    2. Preconfigured build with API_URL parameter
  6. Themes
  7. Release cycle
  8. Links
  9. License

Prerequisites

Version
NodeJS 16.13.0 (LTS)
NPM 8.1.0

Dependencies

$ npm install

Tests

$ npm test

Development

Development with backend API

The backend API URL from odpi/egeria (ui-chassis-spring, here [0]), which needs to start with CORS filter on.

$ npm run start --api-url=http://localhost:8443

Development with mocked API

The backend API URL from odpi/egeria-api-mocks (egeria-api-mocks, here [1]).

$ npm run start --api-url=http://localhost:9000

Production

Standalone build

Outputs the build in /build/prod with no config what so ever.

$ npm run build

Preconfigured build with API_URL parameter

Outputs the build with all HTTP requests prefixed with the given API_URL parameter. The API server needs to have the CORS filter on.

npm run build --api-url=http://api.app.prod

Themes

The theme folder now sits statically under the themes folder, changing the files here will change the theme directly. It is directly referenced in the index.html page.

Release cycle

Egeria-UI use GitHub as its dependency provider, this means that all the releases are being pushed to the Github Egeria-UI repository here [2].

$ git clone https://github.com/odpi/egeria-ui     # clone and checkout to main branch
$ vim release-notes.md                            # add release notes
$ git commit -m "Add release notes"
$ npm version patch                               # (minor or major) this will create a new commit with the bumped version
                                                  # and also a git version tag
$ # `npm publish .` won't be executed since we are using GitHub as a direct dependency
$ git push origin main
$ git push origin main --tags
$                                                 # the released version will be available at the git version tag or in the
                                                  # release page here [1]

Links

[0] - https://github.com/odpi/egeria/tree/main/open-metadata-implementation/user-interfaces/ui-chassis/ui-chassis-spring/

[1] - https://github.com/odpi/egeria-api-mocks

[2] - https://github.com/odpi/egeria-ui

License

SPDX-License-Identifier: Apache-2.0

Copyright Contributors to the ODPi Egeria project.

egeria-ui's People

Contributors

alexandra-bucur avatar bogdan-sava avatar dependabot[bot] avatar ginaisaia avatar jmertic avatar lcpopa avatar lpalashevski avatar marius-patrascu avatar mihaiiliescu avatar planetf1 avatar popa-raluca avatar sarbull avatar tcnt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

egeria-ui's Issues

Cannot login to UI (helm chart)

egeria-ui 4.0.1 was recently announced.
The currently released egeria charts uses 3.2.0 and continues to work.
However for testing I tried running with version 4.0.1 of the UI

For example:

 helm install lab egeria/odpi-egeria-lab --set jupyter.tokenPlain='s3cr3t!'  --set-string image.uistatic.tag=4.0.1

I then ran the configure/start/building a data catalog notebooks

With the ports forwarded, and attemt to go to the nginx port (https://localhost:443) results in continually 'loading' window
Screenshot 2022-09-23 at 15 30 04

I would presume we need some updates for the new UI to work correctly - configuration?

@sarbull @lpalashevski

Error in homepage. "roles" request - 404

We launched the egeria ui master project with mocks. We go to the main page, an error falls on the API request for roles and the application state does not exit "Loading"
image

We looked for a method for requesting "/api/users/roles", in a project with mocks, this method does not exist, so all actions in the ui project lead to 403 errors

Enable Azure pipeline build & release for UI

Before we can have this component as a dependency of the main egeria code base we need an Azure build pipeline

The build process needn't use maven, or be version synchronized to egeria, but it must be possible to build PRs, merge builds, and establish a build pipline

Migrate build of container to egeria-ui project

Currently the container image for the static content is built under the main egeria project as part of the maven merge build running under azure pipelines

I propose we move the container build here, so that it is consistent with the code it contains.

  • Look at if we can do this under github actions
  • will need access to the odpi credentials for accessing the repo
  • we could initially push to the github container repo for testing
  • we could look at whether even a PR could build the container (for verification and testing) - and use a PR specific 'tag'

There is still code in egeria repo that references the image - docker compose & lab helm chart. If the name of the image, location, or version changes, this will need updating.
Two changes we've not done yet in egeria for this image

  • verifying image security.
  • Using a UBI image (we do use the redhat UBI-8 image for base egeria, hopefully can use the same for the UI)
  • ensure we always use https

User roles fix

Current behaviour: In the User menu are all the user roles from authentication are shown.

Only user roles that are mapped in the application should be displayed

'About' does not work

Navigating to 'about' via
a) (i) icon at bottom left
b) 'About' on top navigation bar

results in a page not loading

Additionally, there is no way out - except back. No timeout is observed if a remote request is being issued.

Screenshot 2023-03-29 at 12 17 43

original report: #480

Updates to Docker build

Several changes are needed to the docker build now that we are doing in the same repo

  1. Switch to node 10 (not 14 -- which is failing to work properly)
  2. Avoid re-cloning the source and building from scratch, which was previously needed as the dockerfile was in the egeria repo

Egeria UI broken

The Egeria UI currently does not work in our Helm Charts using the existing zuul based redirection

When the UI is accessed (via the ui server chassis) I see 'Egeria UI' as the title / favicon but the content area is blank, and the javascript console in chrome reports

Uncaught DOMException: Failed to execute 'define' on 'CustomElementRegistry': the name "paper-menu-grow-height-animation" has already been used with this registry
    at Polymer (https://c12bb70b-eu-gb.lb.appdomain.cloud/src/my-app.js:5867:139)
    at https://c12bb70b-eu-gb.lb.appdomain.cloud/src/my-app.js:14878:66
DevTools failed to load SourceMap: Could not load content for chrome-extension://hnmpcagpplmpfojmgmnngilcnanddlhb/browser-polyfill.min.js.map: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME
DevTools failed to load SourceMap: Could not load content for chrome-extension://eoolfmmapnkhandljfaaofncecfakljd/dist/Versioning.js.map: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME

See odpi/egeria#4926 where I am making the change to implement an nginx proxy to support odpi/egeria#4549

The docker image is posted to https://hub.docker.com/repository/docker/odpi/egeria-ui

The UI was working correctly as of the 2.7 release, so this looks like a recent regression

Appropriate UI release for base egeria release 2.9

Egeria has now branched for 2.9 - see odpi/egeria#5075.

If you would like a new version of the egeria-ui included by the helm/compose charts in egeria 2.9, please can you create a 2.9 release. Then a PR will need doing for the egeria-2.9 release on base egeria, but this code is under test and will be released soon (days)

For now I will set the egeria code to use the 2.8 version, which is the last 'release'.

Create stable releases (inc. docker images)

When we release Helm charts including both the Egeria UI & Egeria for a release like 3.2, 3.3, we need to be able
to point to a 'fixed' version of the UI code to run

The version is specified in package.json - and this is also used by the docker build
Currently this is set to 3.0.1

However a github release of 3.0.1 was made in August.

What we need is for the version to be incremented in package.lock immediately after the github release.
Additionally until ready to release we should mark it as a prerelease (ie 3.0.2-rc.0 or similar), only changing to a fixed release at the final moment.

This way we can have a stable github release, and a stable docker image to be consumed by our helm charts (and other users)

Add nexus-IQ scan to egeria UI

Currently our code is scanned for license adherence & CVEs. One tool used for this is nexus IQ
This egeria-ui project should be added to Nexis IQ

Initial feedback on building egeria-ui

  • After an 'npm install' and 'npm run build' a 'git status' is showing package-lock.json as having been modified

    • is this intentional
  • To build, it seems as if 'npm install polymer-cli' is needed

  • On macOS, and in an alpine 14 container on docker, a 'npm test' is failing with:

jonesn:egeria-ui/ (master*) $ npm test                                                                                [15:59:49]

> [email protected] test /Users/jonesn/IdeaProjects/egeria-ui
> polymer test


TypeError: Cannot read property 'length' of undefined

error:	cli runtime exception: TypeError: Cannot read property 'length' of undefined
error:	TypeError: Cannot read property 'length' of undefined
    at /usr/local/lib/node_modules/polymer-cli/node_modules/web-component-tester/runner/webserver.js:93:142
    at Generator.next (<anonymous>)
    at /usr/local/lib/node_modules/polymer-cli/node_modules/web-component-tester/runner/webserver.js:20:71
    at new Promise (<anonymous>)
    at __awaiter (/usr/local/lib/node_modules/polymer-cli/node_modules/web-component-tester/runner/webserver.js:16:12)
    at /usr/local/lib/node_modules/polymer-cli/node_modules/web-component-tester/runner/webserver.js:63:16
    at /usr/local/lib/node_modules/polymer-cli/node_modules/web-component-tester/runner/context.js:107:42
    at new Promise (<anonymous>)
    at hookToPromise (/usr/local/lib/node_modules/polymer-cli/node_modules/web-component-tester/runner/context.js:106:24)
    at Context.<anonymous> (/usr/local/lib/node_modules/polymer-cli/node_modules/web-component-tester/runner/context.js:124:27)
npm ERR! Test failed.  See above for more details.
jonesn:egeria-ui/ (master*) $ 

Error handling needs improving when ui-chassis is not ready

During startup, the ui chassis may not be ready to service all requests. Use of the UI during this time may hang

For example:
In our coco labs environment, deployed using our odpi-egeria-lab helm chart, run the configuration, and data catalog notebooks.

Then navigate to the ui

You may see this page after login, which is indicative of the ui chassis not being ready:

Screenshot 2023-03-29 at 08 13 35

If we look in more detail, we may see errors fetching types:

Screenshot 2023-03-29 at 08 38 22

Screenshot 2023-03-29 at 08 39 09

And in the log from the ui chassis it's clear this is because the server is not ready:

2023-03-29 07:35:57.397 - INFO 1 --- [           main] o.o.o.u.u.springboot.EgeriaUIPlatform    : Started EgeriaUIPlatform in 60.405 seconds (process running
 for 61.971)
2023-03-29 07:37:56.824 -ERROR 1 --- [nio-8443-exec-2] o.o.o.c.ffdc.RESTExceptionHandler        : Detected Invalid Parameter Exception in REST Response

org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException: OMAG-MULTI-TENANT-404-001 The OMAG Server cocoMDS1 is not available to service a
request from user erinoverview
        at org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler.throwInvalidParameterException(RESTExceptionHandler.java:289) ~[ffdc-services-4.0.j
ar!/:na]
        at org.odpi.openmetadata.commonservices.ffdc.RESTExceptionHandler.detectAndThrowInvalidParameterException(RESTExceptionHandler.java:206) ~[ffdc-servi
ces-4.0.jar!/:na]
        at org.odpi.openmetadata.accessservices.assetcatalog.AssetCatalog.detectExceptions(AssetCatalog.java:307) ~[asset-catalog-client-4.0.jar!/:na]
        at org.odpi.openmetadata.accessservices.assetcatalog.AssetCatalog.getSupportedTypes(AssetCatalog.java:276) ~[asset-catalog-client-4.0.jar!/:na]
        at org.odpi.openmetadata.userinterface.uichassis.springboot.service.AssetCatalogOMASService.getSupportedTypes(AssetCatalogOMASService.java:236) ~[cla
sses!/:na]

The UI should have an appropriate timeout and error handling

Glossary View results in being thrown back to login page (user not authorized)

  • Setup egeria lab environment (k8s, lab chart, configure/data catalog notebooks)

When clicking on the glossary icon, the page is immediately cleared and the user is bounced back to the UI login panel
Clicking 'back' results in being returned to a glossary page

Screenshot 2023-03-29 at 12 26 51

In my case, the root cause was permissions - the following was found in the ui chassis log

2023-03-29 11:33:23.580 -ERROR 1 --- [io-8443-exec-10] o.o.o.u.u.s.a.ExceptionHandlerController : 401 User is not authorized

org.odpi.openmetadata.userinterface.uichassis.springboot.api.exceptions.UserNotAuthorizedException: 401 User is not authorized
	at org.odpi.openmetadata.userinterface.uichassis.springboot.api.SecureController.getUser(SecureController.java:38) ~[classes!/:na]
	at org.odpi.openmetadata.userinterface.uichassis.springboot.api.glossary.GlossaryViewController.getAllGlossaries(GlossaryViewController.java:51) ~[classes!/:na

The same occurs with other users, including garygeeke

Error handling is needed for this case

Original report: #480

something wrong about egeria-ui

Please forgive my English level, I use translation software, I hope you can understand what I mean
I run the latest version of egeria-ui by docker, but when I enter the page in browser, it prompts me that there is a page error, as shown below:
image
I am using the chrome browser, and the browser console did not report an error. By the way, how does egeria-ui configure OMAG services, such as port, IP, etc.

Simplifying the load of a glossary

Here is a screen capture of the Cloud Information Model (CIM) glossary. The name is long enough to push the button beyond the visible area.
Screenshot 2023-06-07 at 20 07 39

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.