зеркало из https://github.com/Azure/Sia-EventUI.git
1b989f6353
* SIA Chrome Extension Push Notifications |
||
---|---|---|
cfg | ||
src | ||
test | ||
.babelrc | ||
.deployment | ||
.editorconfig | ||
.gitignore | ||
.travis.yml | ||
LICENSE | ||
README.md | ||
app.js | ||
deploy.cmd | ||
jsconfig.json | ||
karma.conf.js | ||
package-lock.json | ||
package.json | ||
server.js | ||
webpack.config.js |
README.md
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 ) |