This is an application insights based project that displays a bots analytics dashboard.
- Clone
- Get an Application Insights App ID and Api Key
- Create the following
.env
file:
REACT_APP_APP_INSIGHTS_APPID={APP ID}
REACT_APP_APP_INSIGHTS_APIKEY={API KEY}
- Run
npm start
- Open http://localhost:3000/
- Fork this repo (to be able to automatically create github deployment key)
- Clone & Deploy:
from you new repo run:
clone https://github.com/[your-user-name/group]/bot-fmk-dashboard
cd bot-fmk-dashboard
cd deploy
cp dashboard.parameters.json dashboard.parameters.private.json
Edit dashboard.parameters.private.json
and change the repo url to your own, and fix the other parameters as well.
azure login
azure account list
azure account set "{account id}"
azure group create "new-resource-group" -l "West Europe" -f dashboard.template.json -e dashboard.parameters.private.json
Since application insights API doesn't support ARM yet, we need to manually create an API Key for the application insights service. Once you created the api key, copy and paste it into the Web App ==> Application Settings ==> REACT_APP_APP_INSIGHTS_APIKEY.
- Go to azure portal
- Select: Resource Groups > [new resource group] > App Insights Service
- Copy Instrumentation Key and paste into your bot registration page (on the bottom)
- Click: API Access > Create New Key > +Read Telemetry
- Copy
Application ID
+API Key
- Select: Resource Groups > [new resource group] > Web App
- Under Application Settings > App Settings set the following values:
REACT_APP_APP_INSIGHTS_APPID: {Application ID}
REACT_APP_APP_INSIGHTS_APIKEY: {API Key}
- Save changes, go to Overview and restart the web app.
- Click on URL to see the dashboard
This project is built using:
The server approach was added using:
- https://www.fullstackreact.com/articles/using-create-react-app-with-a-server/
- https://github.com/fullstackreact/food-lookup-demo
- https://medium.com/@patriciolpezjuri/using-create-react-app-with-react-router-express-js-8fa658bf892d#.14dex6478
Thinking about integrating with:
- Running node version 4.5 or above.
git clone https://github.com/CatalystCode/bot-fmk-dashboard.git
cd bot-fmk-dashboard
npm install -g create-react-app
npm install
npm start
Runs the test watcher in an interactive mode. By default, runs tests related to files changes since the last commit.
npm test
npm run build
- webpack with webpack-dev-server, html-webpack-plugin and style-loader
- Babel with ES6 and extensions used by Facebook (JSX, object spread, class properties)
- Autoprefixer
- ESLint
- Jest