Skip to content

influxdata/ui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Packages

Adding new packages

To add a new package, run

yarn add packageName

Adding devDependency

yarn add packageName --dev

Updating a package

First, run the command:

yarn outdated

... to determine which packages may need upgrading.

We really should not upgrade all packages at once, but, one at a time and make darn sure to test.

To upgrade a single package named packageName:

yarn upgrade packageName

Unit Testing

Unit tests can be run via command line with yarn test, from within the /ui directory. For more detailed reporting, use yarn test -- --reporters=verbose.

Local dev

cloud platform

  1. From k8s-idpe, start the remocal service with loopback to your local ui changes.
    1. have your remocal instance build and deployed. See docs here.
    2. make remocal-dev APPS=ui DETACHED=1
  2. From the ui directory. Build the local dev server:
    1. set env vars for PUBLIC (your remocal url)
    2. yarn install && yarn start:dev:remocal
    3. yarn link different javascript libraries (e.g. giraffe, clockface, flux-lsp) as needed.
      • note that the flux-lsp wasm build produces an output directory which contains a package.json for the release. Make sure to yarn link to this directory.

oss platform

  1. From oss/influxdb repo, start the backend service.
    1. setup service following the contributing guide.
    2. run the service, goto browser localhost:8086
    3. create a login/password. (Remember these!)
    4. CAVEAT: influxdb/oss does not have live reload.
      • instead, run make and restart influxdb
  2. From the ui directory. Build the local dev server:
    1. yarn install && yarn start:dev:oss
    2. goto browser localhost:8080
    3. the same login/password pair should work.
    4. CAVEAT: live reload does not work, so you need to refresh the browser page.

Cypress Testing

cloud platform

  1. have your local dev running (see above).
  2. export NS=<your-remocal-namespace>
  3. run cypress test:
    • yarn test:e2e:remocal to test on tsm storage
    • yarn test:e2e:remocal:iox to test on iox storage

oss platform

  1. have your local dev running (see above).
    • Make sure to start your oss backend service with --e2e-testing flag.
  2. run cypress test:
    • yarn test:e2e:oss

Generating Test Reports

  • to run all tests [in series] locally, and generate a report: yarn test:e2e:<whatever>:report
    • e.g. yarn test:e2e:remocal:report, yarn test:e2e:remocal:iox:report, yarn test:e2e:oss:report
  • this will run in headless mode, so no browser will be shown. Just a stdout waiting as each test runs.
    • WARNING: This takes a long time, unlike CI which runs in parallel.
  • after all tests complete, it will automatically open a test result viewer.
  • any screenshots or vids will be saved in cypress/videos and cypress/screenshots

What is oats?

Oats is how we automatically generate our typescript definitions based open the openapi contract. See here for more details. After one of the yarn generate scripts are run, the typescript definitions are usually output to ./src/client/.

Zuora Form

Troubleshooting: If your Zuora form isn't rendering or calling your callback function which you passed in client.render. When running UI locally using Monitor CI, get Zuora PageID which you are using to render the form. Then, from Zuora admin console, get the Host and Port that PageID is corresponding to. Make sure to match those Host and Port with your INGRESS_HOST and PORT_HTTPS provided in the .env file of monitor-ci.