зеркало из https://github.com/Azure/Sia-EventUI.git
3.0 KiB
3.0 KiB
This is the user interface for SRE Incident Assistant (SIA)
See the Root repository for full project information and an overview of how services fit together.
SIA is built using:
SIA is configured for Wepback's hot module reloading, so changes should automatically appear in your browser.
Requirements
- Node.js (latest LTS is preferred)
Before You Start
You will need to add const files in config for each environment you want to use; these are not tracked in git. See cfg/constExample.js
for more details. Const files follow the naming convention $env.const.js (localhost.const.js
is the const file loaded by localhost.js, for example).
Launch UI pointing at a local Gateway API
Use these steps to launch if you're hosting your Gateway API locally.
- Navigate to the SIA-EventUI source directory root
- Ensure your local copy of the gateway API is running on http://localhost:50000 (or the base URL you configured)
- Enter these commands to launch the Event UI:
npm install npm start
- Navigate to http://localhost:3000
Launch UI pointing at a remote dev Gateway API
Use these steps if you're working on the Event UI and do not need to run a local copy of the gateway.
- Create a localhost.const.js file inside the cfg folder. Use the
cfg/constExample.js
file as a template. - Navigate to the SIA-EventUI source directory root
- Enter these commands to launch the Event UI:
npm install npm run serve
- Navigate to http://localhost:3000
To Test
- Enter this command:
npm test
To create dist bundle, no server
webpack --env=dist
NPM scripts
A partial list of run scripts and what they do
Script | What it does |
---|---|
start | Launch the server and point at a gateway hosted on localhost (use localhost.const.js ) |
serve | Launch the server and point at a gateway hosted in the dev environment (use dev.const.js ) |