GithubHelp home page GithubHelp logo

dlabrecq / insights-chrome Goto Github PK

View Code? Open in Web Editor NEW

This project forked from redhatinsights/insights-chrome

0.0 0.0 0.0 38.19 MB

Chroming for Insights apps

License: MIT License

Shell 0.66% JavaScript 17.09% TypeScript 78.21% HTML 0.08% Dockerfile 0.04% EJS 0.34% SCSS 3.59%

insights-chrome's Introduction

Insights Chrome

The "wrapper" around your application!

Insights Chrome provides:

  • Standard header and navigation
  • Base CSS/style
  • A Javascript library for interacting with Insights Chrome

For more detailed information about chrome and what it provides, look through the detailed documentation.

JavaScript API

Insights Chrome comes with a Javacript API that allows applications to control navigation, global filters, etc.

Check out the useChrome hook docs

Running the build

There are a few scripts for building this application.

To run a script you have to install dependencies npm install. Then you are free to use any task you want.

  1. Building assets

    > npm run build
  2. Building assets and watching files when they change

    > npm run build --watch
  3. Running tests

    > npm run test

Running chrome locally

  1. Install all dependencies

    > npm install
  2. Run dev command in watch mode

    > npm run dev
  3. Open browser at https://stage.foo.redhat.com:1337/ or Open browser at https://stage.foo.redhat.com:1337/preview.

Running chrome with other applications locally

You can spin chrome locally together with other applications. Use LOCAL_APPS to list the locally deployed applications.

Example 1 (using LOCAL_APPS)

For illustration, to deploy Advisor together with Insights Chrome, you would require to

  1. Run Advisor on any available port with npm run start -- --port=8004 or npm run start:beta -- --port=8004,
  2. Run Chrome and list the Advisor's port: LOCAL_APPS=advisor:8004:http npm run dev or LOCAL_APPS=advisor:8004:http npm run dev:beta.

Example 2 (using devServer route)

You can also specify deployed applications through devServer.routes field:

  1. Run Advisor with --port=8004 (or any other available port number),
  2. Update the webpack config in the following way:
...
devServer: {
    ...
    routes: {
        '/apps/ocp-advisor': {
            host: 'https://localhost:8004',
        },
    },
}
...
  1. Run insights-chrome with npm run dev or npm run dev:beta.

LocalStorage Debugging

There are some localStorage values for you to enable debuging information or enable some values that are in experimental state. If you want to enable them call const iqe = insights.chrome.enable.iqe() for instance to enable such service. This function will return callback to disable such feature so calling iqe() will remove such item from localStorage.

Available function:

  • iqe - to enable some iqe functions for QE purposes
  • invTags - to enable experimental tags in inventory
  • jwtDebug - to enable debugging of JWT
  • remediationsDebug - to enable debug buttons in remediations app
  • shortSession - to enable short session in order to test automatic logouts
  • forcePendo - to force Pendo initializtion
  • appFilter - to enable new application filter in any environment

Futher reading

More detailed documentation can be found in the docs section

insights-chrome's People

Contributors

hyperkid123 avatar karelhala avatar ryelo avatar epwinchell avatar iphands avatar fhlavac avatar panspagetka avatar aneelac22 avatar dependabot-preview[bot] avatar insanezein avatar radekkaluzik avatar dependabot[bot] avatar jharting avatar jschuler avatar rvsia avatar arivepr avatar tahmidefaz avatar kruai avatar florkbr avatar blakeholifield avatar depfu[bot] avatar adamrdrew avatar codywmitchell avatar psav avatar rsun19 avatar gkarat avatar john-dupuy avatar adonispuente avatar victoria-dos avatar apinkert avatar

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.