Giter Club home page Giter Club logo

sources-ui's Introduction

Sources

Main screen with "Add a new Source" wizard

Build Status Test Coverage

List of Sources for Red Hat Hybrid Cloud Console.

This application allows to

  • view all sources (filtering, sorting)
  • add a new source (AWS, Google, Azure, OpenShift, ...)
  • connect an application to a source (Cost Management, RHEL management bundle, ...)
  • remove an application from a source
  • pause/resume a source/application

Table of Contents

Getting Started

Run app

  1. npm install

  2. npm run start

    • starts a dev server based on your preferences selected in interactive guide

You have to be connected to Red Hat VPN and use Red Hat squid proxy settings (check source.redhat.com for a guide). Check also, if you have updated /etc/hosts/ file to route these adresses to localhost. (See script)

Check our proxy documenation for more options.

Debug functions

Sources UI provides easy way how to test different states of the application when running in dev environment.

Run from the console one of following commands:

  • sourcesDebug.showEmptyState

Sets number of currently loaded sources to 0. Shows empty state.

  • sourcesDebug.setCount

Changes number of sources to a value you need.

  • sourcesDebug.removePermissions

Removes write permissions.

  • sourcesDebug.setPermissions

Grants write permissions.

Queries

You can use queries to modify the initial state of the application. Read more here.

Testing

  • Travis is used to test the build for this code.
    • npm run test will run tests locally,
    • npm run lint will run just the linter.

Patternfly

Data-driven forms

Insights Chrome

Insights Chrome is an application that wraps all the UI applications in Red Hat Hybrid Cloud Console. It using Federated modules to do that.

Config

Cloud Services Config manages the UI navigation and Akamai configuration.

Insights Components

Red Hat Insights Frontend Components

Insights Platform will deliver components and static assets through npm.

AddSourceWizard

ADD SOURCE WIZARD WAS MOVED TO THIS REPOSITORY!

Documentation is here.

Updating steps in the wizard

  • See Update wizard. This guideline provides info how to update the add source wizard.

API

Sources Javascript API client

This API client is no longer in the UI because of its huge bundle size. However, is useful to use is a documentation to the API.

Insights Frontend Assets

Static assets are deployed to Insights Frontend Assets repository. If you need to add/change/remove some icon, please do it there.

Deploying

  • The Platform team is using Travis to deploy the application

How it works

Branch updates environment
master => stage/beta and stage/stable
prod-beta => prod/beta
prod-stable => prod/stable

Example:

  • any push to the master branch will deploy to a sources-ui-build master branch => Stage/Beta and Stage/Stable

License

This project is available as open source under the terms of the Apache License 2.0.

sources-ui's People

Contributors

adiabramovitch avatar agrare avatar aneelac22 avatar boaz0 avatar chambridge avatar codywmitchell avatar dependabot-preview[bot] avatar dependabot[bot] avatar djnakabaale avatar dlabrecq avatar epwinchell avatar ezr-ondrej avatar fhlavac avatar fryguy avatar gmcculloug avatar gtanzillo avatar hyperkid123 avatar iphands avatar jason-rh avatar jharting avatar karelhala avatar lgalis avatar myerscody avatar pkomanek avatar radekkaluzik avatar rvsia avatar ryandeussing avatar ryelo avatar shaded-enmity avatar syncrou avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sources-ui's Issues

Implement Platform Sources-Cost Management OCP Wizard

Cost Management needs specific pages to be created for OCP source types. Details of the flow can be seen in the UX Mocks here: https://marvelapp.com/4b472gc/screen/62036227

The OCP Cluster ID will be stored in the Platform Sources service in the source_ref field on the sources API.

See project-koku/koku#1319 for some more general details around this.

@rvsia recently implemented the AWS-Cost Management wizard pages and is available to consult on this issue.

@boaz0 would be a great candidate to work on this ๐Ÿ‘

@nlcwong Please feel free to include in the right UX person to this issue.

Source removal warning for destroying application data

For Cost Management, we are removing all data when the application is removed from the source. The in CI-beta the warning for removing data is happening after the source is destroyed, not the application. At this point it's too and the user just removed their cost-mgmt data before getting warned.

There is future work being discussed around implementing a cost management "soft delete" feature with a data retention policy. That will certainly have implications to this UX (@nlcwong).

For now I wanted to call it out that this warning message should be occurring before the application is removed, not the source with today's cost-platform sources integration.

  1. Delete Source with application attached
    drop_down_delete

  2. Warning message that an application is attached to the source. Gives opportunity to remove.
    remove_app_from_source

  3. Clicks Remove for confirmation box (no warning message yet...). Cost data is removed when the Red Remove button is clicked.
    remove_app_confirm

  4. Remove source confirmation now that all applications are gone. (Cost Management data is already gone at this point)
    app_gone_data_destroy_msg

Containerized frontend broken in ephemeral clusters

The containerized frontend is looping and throwing a console error on navigation to settings, because sources is the default page for settings.

This was introduced in this change:
#1105

The image for 74f0056 does not display this behavior:
https://quay.io/repository/cloudservices/sources-ui/manifest/sha256:dcd4e252fb22a95a7409b4b413408915519b64fbbbf0df351ce2d48514452356

The image for 84c5520 (merge commit of 1105) does display the looping behavior.
https://quay.io/repository/cloudservices/sources-ui/manifest/sha256:709c3c8b337ad30b23576fd6bbe5685dd7986941d31d330d33ee589b4b815bbe

This can be replicated by deploying to ephemeral using bonfire with the --set-image-tag quay.io/cloudservices/sources-ui=74f0056 option.

Video of the behavior has been shared internally with the maintainers.

Incorporate application-specific onboarding flow when attaching applications to a source

The source creation onboarding wizard flows allow for per-app wizard screens when attaching an application. For example: Create AWS Source with Cost Management attached, the user is prompted to enter the S3 bucket.

The app-specific UI pages are missing when attaching an application to a pre-existing source via the ... -> Manage applications screen.

Changes are needed for AWS, OCP, and Azure

UX considerations should be made for how the user would reuse some of the data that was already added when the source was initially created.

The most complicated situation is AWS. For example, here are some questions that come to mind:

  • The roleARN can be added when creating an AWS source, Cost Management needs this, should it reuse the one already added or should it be given an opportunity to be changed? What's the impact of this to other applications if its changed
  • How should the user handle the fact that they can not see the current roleARN due to backend implementation details?
  • If the source had a AWS Secret added and no roleARN, we would need them to add a roleARN for Cost Management since we do not currently support AWS secret keys. Are there any sources backend implications to having both an AWS secret and a roleARN?

FYI: @nlcwong

Show the real status in the status column

Top level source status Applications attached Shown Icon
Available 0 -- (no status)
Available 1+ ๐Ÿ†— everything works
Partially Available 0 -- (no status)
Partially Available 1+ โš ๏ธ List of app's errors or Unknown error
Unavailable 0 -- (no status)
Unavailable 1+ โ›” : List of app's errors or Unknown error
Everything else (i.e. empty) 0 -- (no status)
Everything else (i.e. empty) 1+ โ“ status has not been verified yet

This is a table which shows how the UI maps values obtained by API to the icon which is shown to an user in the table list.

When I was working on this, I didn't know that the top-level is not always representing the updated status. I thought that the top level status is just some aggregation of its application status. (i.e.: All apps are connected > available, some app is not available > partially available, no apps is available > unavailable, no app is connected > unavailable)

So, I will be happy if you can help me to complete this table with backend/api information I haven't got (or I got wrong).

Question:

Can be source available/unavailable when there is no application attached? If yes what connects to it?

@agrare @gtanzillo @dccurtis

cc @terezanovotna

Implement Platform Sources-Cost Management Azure Wizard

Cost Management needs specific pages to be created for Azure source types. Details of the flow can be seen in the UX Mocks here: https://marvelapp.com/4b472gc/screen/62036219 (mocks need to have the resource group, storage account and subscription ID added still)

The Azure Resource Group, Storage Account, and Subscription ID will be added to the Cost Management service and the Tenant ID, Client Secret, and Client ID will be added to Platform Sources

Storage Account and Resource Group can be added to cost management with the billing_source API

JSON POST example:
{"source_id": 1, "billing_source": {"data_source": { "resource_group": "MYRG", "storage_account": "testaccount"}}}

Subscription ID can be added to cost management with the authentication API

JSON POST example
{"source_id": 3, "credentials": {"subscription_id": "cffa2d90-8507-4817-a5a1-279555f83704"}}

The Platform Source values for tenant id, client secret, and client id would remain as they are today.

@rvsia recently implemented the AWS-Cost Management wizard pages and is available to consult on this issue.

@boaz0 would be a great candidate to work on this ๐Ÿ‘

@nlcwong Please feel free to include in the right UX person to this issue.

UX for removing applications

Hi @terezanovotna, there is one confusing behaviour when managing applications in Sources.
When I remove one or more applications, then I must click to "Cancel" link.
It can be taken that my changes will be reverted.

Edit form UX feedback

Based on UX session

  • cancel hover on uneditable fields
  • grid 6 > 12
  • checkboxes/switches no pencil icon

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.