ibex-dashboard/README.md

187 строки
6.2 KiB
Markdown
Исходник Постоянная ссылка Обычный вид История

2018-01-07 15:35:00 +03:00
# Ibex Dashboard [![Build Status](https://travis-ci.org/Azure/ibex-dashboard.png?branch=master)](https://travis-ci.org/Azure/ibex-dashboard)
2017-07-12 16:59:31 +03:00
2017-10-15 18:06:44 +03:00
2017-09-27 17:48:50 +03:00
[Ibex](http://aka.ms/ibex) is a dashboarding application that enables building dashboard and templates.
2017-07-30 11:06:07 +03:00
It mainly supports **Application Insights** but data sources and visual components are easily extendable.
2017-01-07 13:22:11 +03:00
2017-10-16 10:57:07 +03:00
## Changes
2018-01-22 12:52:56 +03:00
### Version 1.3 (January 22, 2018)
2018-01-08 19:04:41 +03:00
2018-01-08 19:05:19 +03:00
Version 1.3 contains the following changes:
2018-01-08 19:04:41 +03:00
* Moving application insights queries from client to server
* Updated tests to answer some security risks presented by GitHub
* Updated tests to accommodate the new approach
* Added masking/unmasking of connection parameters (so that client side can only update API KEY but not see what it is)
* Fixed small bugs with Firefox rendering
2017-10-16 10:57:07 +03:00
### Version 1.2 (October 16, 2017)
Version 1.2 breaks the persitency paths of dashboard files and custom templates. If you are upgrading to this version, copy your private dashboards from `/dashboards` into `/dashboards/persistent/` as follows:
> Private Files: Move files from `/dashboards/*.private.js` to `/dashboards/persistent/private`.
> Custom Templates: Move files from `/dashboards/customTemplates/*.private.ts` to `/dashboards/persistent/customTemplates`.
2017-04-06 11:48:03 +03:00
# Preview
2017-01-07 13:22:11 +03:00
2017-07-30 11:06:07 +03:00
[![Preview](/docs/images/bot-fmk-dashboard.png)](/docs/images/bot-fmk-dashboard.png)
[![Preview](/docs/images/bot-fmk-dashboard-msgs.png)](/docs/images/bot-fmk-dashboard-msgs.png)
[![Preview](/docs/images/bot-fmk-dashboard-intent.png)](/docs/images/bot-fmk-dashboard-intent.png)
2017-01-07 13:22:11 +03:00
2017-08-17 10:41:08 +03:00
# Installation
2017-01-07 13:22:11 +03:00
2017-07-30 11:06:07 +03:00
```bash
npm install yarn -g
2016-02-09 03:00:40 +03:00
2018-01-07 15:35:00 +03:00
git clone https://github.com/Azure/ibex-dashboard
2017-07-30 11:06:07 +03:00
cd ibex-dashboard
yarn
yarn start
```
2017-08-17 10:41:08 +03:00
### Using Bot Analytics Instrumented Dashboard
2017-07-30 11:06:07 +03:00
1. Open **http://localhost:4000**
2017-08-17 10:41:08 +03:00
2. Create a new template from **Bot Analytics Instrumented Dashboard**
2017-07-30 11:06:07 +03:00
3. Run through the **Application Insights** setup and fill in **API Key** and **Application ID** according to the application insights account associated with your registered bot.
2017-08-17 10:41:08 +03:00
### Installation on Ubuntu
Use the following to install yarn on Ubuntu:
```bash
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update && sudo apt-get install yarn
```
# Development
2017-07-30 11:06:07 +03:00
```bash
yarn start:dev
```
2017-08-09 13:40:20 +03:00
Open **http://localhost:3000**
2017-08-16 16:54:24 +03:00
For contribution and code documentation follow:
[DEVELOPMENT & CONTRIBUTION](/docs/README.md).
2017-07-30 11:06:07 +03:00
2017-08-17 10:41:08 +03:00
# Deploy To Azure
2017-07-30 11:06:07 +03:00
There are 3 ways to deploy to Azure:
2017-08-17 10:41:08 +03:00
### 1. Web App - Automated
2017-07-02 13:22:23 +03:00
1. Fork this repo (to be able to automatically create github deployment key)
2017-07-30 11:06:07 +03:00
2. Copy the fork url and use it with the following deployment button:
2018-05-31 18:24:22 +03:00
<a href="https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fibex-dashboard%2Fmaster%2Fscripts%2Fdeployment%2Fwebapp%2Fazuredeploy.json" target="_blank">
<img src="http://azuredeploy.net/deploybutton.png"/>
</a>
2017-08-17 10:41:08 +03:00
### 2. Web App On Linux - Automated with Docker Hub
2018-01-07 15:35:00 +03:00
<a href="https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fibex-dashboard%2Fmaster%2Fscripts%2Fdeployment%2Fwebapponlinux%2Fazuredeploy.json" target="_blank">
<img src="http://azuredeploy.net/deploybutton.png"/>
</a>
2017-08-17 10:41:08 +03:00
### 3. Manual
2017-04-06 11:48:03 +03:00
1. Fork this repo (to be able to automatically create github deployment key)
2. Clone & Deploy:
2017-04-06 11:58:53 +03:00
3. [Create a new Web App in Azure](https://docs.microsoft.com/en-us/azure/app-service-web/app-service-continuous-deployment)
2017-08-17 10:41:08 +03:00
# Deploy With Docker
2017-06-21 08:48:08 +03:00
1. `docker build -t **image name** .`
2. `docker run -d -e PORT=80 **image name** `
2018-01-07 15:35:00 +03:00
3. Docker image is also available at Docker Hub - `docker pull morshemesh/ibex-dashboard`
2017-06-21 08:48:08 +03:00
2017-08-17 10:41:08 +03:00
# Application Insights Integration
2017-07-30 11:06:07 +03:00
Since application insights API doesn't support ARM yet, we need to manually [create an API Key](https://dev.applicationinsights.io/documentation/Authorization/API-key-and-App-ID) for the application insights service.
The full instructions are also available when you create a new dashboard.
You can also follow the next headline.
2017-08-17 10:41:08 +03:00
### Create new API Key and Application ID
2017-04-06 11:58:53 +03:00
The following steps explain how to connect **Application Insights** bot with your bot and your dashboard:
[you can also follow the [official Application Insights article](https://dev.applicationinsights.io/documentation/Authorization/API-key-and-App-ID)].
1. Go to [azure portal](https://portal.azure.com)
2. Select: **Resource Groups** > **[new resource group]** > **App Insights Service**
3. Copy **Instrumentation Key** and paste into your bot registration page (on the bottom)
4. Click: **API Access** > **Create New Key** > **+ Read Telemetry**
5. Copy `Application ID` + `API Key`
6. Open the URL of your web app
7. Under **AppId**/**ApiKey** set the values you created.
2017-08-26 14:32:05 +03:00
### Adding Application Insights instrumentation to your bot
2018-01-07 15:35:00 +03:00
- [Instrumentation for Node.js bots](https://github.com/Azure/botbuilder-instrumentation)
- [Instrumentation for C# bots](https://github.com/Azure/botbuilder-instrumentation-cs)
2017-08-26 14:32:05 +03:00
2017-08-17 10:41:08 +03:00
# Testing
2017-07-30 11:06:07 +03:00
The test watcher is integrated into the create-react-app mechanism and runs tests related to files changes since the last commit.
To run the test watcher in an interactive mode:
2017-04-06 11:48:03 +03:00
```bash
2017-06-14 13:38:35 +03:00
cd client
yarn test
```
Alternatively, you can also run the full commands that the Travis CI server
will run to validate any changes.
```bash
.travis/ci.sh
```
2017-08-17 10:41:08 +03:00
# Build
2017-06-14 13:38:35 +03:00
Our CI server Travis creates new production builds automatically for changes
to master. If you need to create a build locally, you can execute the same
commands as the CI server.
2017-04-06 11:48:03 +03:00
```bash
2017-07-30 11:06:07 +03:00
yarn build
```
2017-07-30 11:06:07 +03:00
Or
```bash
.travis/build.sh
```
2016-02-09 03:00:40 +03:00
2017-08-17 10:41:08 +03:00
# Resources
### Technologies In Use
* https://facebook.github.io/react/
* https://github.com/facebookincubator/create-react-app
* http://recharts.org/
* https://react-md.mlaursen.com/
### Design and Patterns
This project is built using:
* https://github.com/facebookincubator/create-react-app
The server approach was added using:
* https://www.fullstackreact.com/articles/using-create-react-app-with-a-server/
Thinking about integrating with:
* https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md
### Engines
* Running node version 6.11 or above.
# License
2017-09-27 17:47:01 +03:00
MIT