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.
Insights Chrome comes with a Javacript API that allows applications to control navigation, global filters, etc.
Check out the useChrome hook docs
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.
-
Building assets
> npm run build
-
Building assets and watching files when they change
> npm run build --watch
-
Running tests
> npm run test
-
Install all dependencies
> npm install
-
Run dev command in watch mode
> npm run dev
-
Open browser at
https://stage.foo.redhat.com:1337/
.
You can spin chrome locally together with other applications. Use LOCAL_APPS
to list the locally deployed applications.
For illustration, to deploy Advisor together with Insights Chrome, you would require to
- Ensure Advisor has the 'static: fec static' script
- Run Advisor with
npm run static
- In Chrome, add advisor to the routes portion inside webpack.config.js
'/apps/advisor': { host: 'http://0.0.0.0:8003', },
- In Chrome then run
npm run dev
- If youd like to run against a different env, this can be altered with the env variable, ex. 'prod-stable'.
You can also specify deployed applications through devServer.routes field:
- Run Advisor with
--port=8004
(or any other available port number), - Update the webpack config in the following way:
...
devServer: {
...
routes: {
'/apps/ocp-advisor': {
host: 'https://localhost:8004',
},
},
}
...
- Run insights-chrome with
npm run dev
.
See local search development documentation.
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 purposesinvTags
- to enable experimental tags in inventoryjwtDebug
- to enable debugging of JWTremediationsDebug
- to enable debug buttons in remediations appshortSession
- to enable short session in order to test automatic logoutsforcePendo
- to force Pendo initializtionappFilter
- to enable new application filter in any environment
More detailed documentation can be found in the docs section