From 9188932dfdabfe31b73e3604dc627f424543b2ad Mon Sep 17 00:00:00 2001 From: nxanil Date: Mon, 8 May 2017 17:30:13 +0530 Subject: [PATCH 01/70] Middleware setup and API to fetch dashboard configuration --- README.md | 9 ++++ server/.babelrc | 9 ++++ server/.env.example | 2 + server/.eslintignore | 2 + server/.eslintrc | 24 +++++++++ server/.gitignore | 7 +++ server/README.md | 11 ++++ server/app/config/constants.js | 26 ++++++++++ server/app/controllers/base.controller.js | 36 +++++++++++++ .../app/controllers/dashboards.controller.js | 37 ++++++++++++++ server/app/controllers/meta.controller.js | 12 +++++ server/app/index.js | 5 ++ server/app/lib/util.js | 0 server/app/middleware/error-handler.js | 26 ++++++++++ server/app/routes.js | 17 +++++++ server/app/server.js | 50 +++++++++++++++++++ server/index.js | 5 ++ server/package.json | 47 +++++++++++++++++ 18 files changed, 325 insertions(+) create mode 100644 server/.babelrc create mode 100644 server/.env.example create mode 100644 server/.eslintignore create mode 100644 server/.eslintrc create mode 100755 server/.gitignore create mode 100644 server/README.md create mode 100644 server/app/config/constants.js create mode 100755 server/app/controllers/base.controller.js create mode 100644 server/app/controllers/dashboards.controller.js create mode 100644 server/app/controllers/meta.controller.js create mode 100644 server/app/index.js create mode 100755 server/app/lib/util.js create mode 100644 server/app/middleware/error-handler.js create mode 100644 server/app/routes.js create mode 100644 server/app/server.js create mode 100755 server/index.js create mode 100644 server/package.json diff --git a/README.md b/README.md index b7ba8802..51759bba 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,15 @@ Here is a list of environment variable that can be set to configure the visualiz * `REACT_APP_ELASTICSEARCH_HOST` (**required**) allows you to specify the Elastic Search server (ex: http://localhost:9200) * `REACT_APP_VSD_API_ENDPOINT` allows to specify the VSD API endpoint (ex:https://vsd.com:8443/nuage/api/) +## Middleware Setup + + 1. Go inside the `visualization-framework/server` folder + 2. Install all dependancies using `npm install` (it will take some time, please be patient) + 3. Run the application using `npm start` command. + 4. Run the lint using `npm run lint` command. + +## Middleware APIs + 1. Dashboard Confirguration: http://HOSTNAME/api/dashboards/:dashboardname ## kitchenSink diff --git a/server/.babelrc b/server/.babelrc new file mode 100644 index 00000000..82405b94 --- /dev/null +++ b/server/.babelrc @@ -0,0 +1,9 @@ +{ + "presets": ["es2015", "stage-0"], + "plugins": [ + ["transform-runtime", { + "polyfill": false, + "regenerator": true + }] + ] +} diff --git a/server/.env.example b/server/.env.example new file mode 100644 index 00000000..37a14403 --- /dev/null +++ b/server/.env.example @@ -0,0 +1,2 @@ +PORT=8010 +IP=localhost diff --git a/server/.eslintignore b/server/.eslintignore new file mode 100644 index 00000000..dd87e2d7 --- /dev/null +++ b/server/.eslintignore @@ -0,0 +1,2 @@ +node_modules +build diff --git a/server/.eslintrc b/server/.eslintrc new file mode 100644 index 00000000..4ad70bc2 --- /dev/null +++ b/server/.eslintrc @@ -0,0 +1,24 @@ +{ + "extends": ["eslint:recommended", "google"], + "parser": "babel-eslint", + "parserOptions": { + "ecmaVersion": '2017', + "sourceType": "module" + }, + "plugins": [ + "babel" + ], + "env": { + "node": true, + "mocha": true, + "es6": true + }, + "rules": { + "strict": [2, "never"], + "require-jsdoc": 0, + "no-invalid-this": 0, + "max-len": [1, 120], + "object-curly-spacing": ["error", "always"], + "babel/new-cap": 1 + } +} diff --git a/server/.gitignore b/server/.gitignore new file mode 100755 index 00000000..9926a159 --- /dev/null +++ b/server/.gitignore @@ -0,0 +1,7 @@ +**/.DS_STORE +npm-debug.log +.imdone +build +coverage +node_modules +.env diff --git a/server/README.md b/server/README.md new file mode 100644 index 00000000..0cff67c8 --- /dev/null +++ b/server/README.md @@ -0,0 +1,11 @@ +# Install dependencies +npm install + +# Run it +npm start + + +## NPM Scripts + +- **`npm start`** - Start live-reloading development server +- **`npm run build`** - Generate production ready application in `./build` \ No newline at end of file diff --git a/server/app/config/constants.js b/server/app/config/constants.js new file mode 100644 index 00000000..7b13dc43 --- /dev/null +++ b/server/app/config/constants.js @@ -0,0 +1,26 @@ +import path from 'path'; +import merge from 'lodash/merge'; + +// Default configuations applied to all environments +const defaultConfig = { + env: process.env.NODE_ENV, + get envs() { + return { + test: process.env.NODE_ENV === 'test', + development: process.env.NODE_ENV === 'development', + production: process.env.NODE_ENV === 'production', + }; + }, + + version: require('../../package.json').version, + root: path.normalize(__dirname + '/../../..'), + port: process.env.PORT || 8010, + ip: process.env.IP || '0.0.0.0', + apiPrefix: '/api', +}; + +// Environment specific overrides +const environmentConfigs = {}; + +// Recursively merge configurations +export default merge(defaultConfig, environmentConfigs[process.env.NODE_ENV] || {}); diff --git a/server/app/controllers/base.controller.js b/server/app/controllers/base.controller.js new file mode 100755 index 00000000..035bdbf0 --- /dev/null +++ b/server/app/controllers/base.controller.js @@ -0,0 +1,36 @@ +class BaseController { + filterParams(params, whitelist) { + const filtered = {}; + for (const key in params) { + if (whitelist.indexOf(key) > -1) { + filtered[key] = params[key]; + } + } + return filtered; + } + + formatApiError(err) { + if (!err) { + // eslint-disable-next-line no-console + return console.error('Provide an error'); + } + + const formatted = { + message: err.message, + }; + + if (err.errors) { + formatted.errors = {}; + const errors = err.errors; + for (const type in errors) { + if (errors.hasOwnProperty(type)) { + formatted.errors[type] = errors[type].message; + } + } + } + + return formatted; + } +} + +export default BaseController; diff --git a/server/app/controllers/dashboards.controller.js b/server/app/controllers/dashboards.controller.js new file mode 100644 index 00000000..52be4904 --- /dev/null +++ b/server/app/controllers/dashboards.controller.js @@ -0,0 +1,37 @@ +import BaseController from './base.controller'; + +import fs from 'fs'; +import path from 'path'; + +class DashboardsController extends BaseController { + index = async (req, res, next) => { + let { dashboard } = req.params; + + const configPath = '../../../public/configurations'; + const dashboardDir = 'dashboards'; + const visualizationDir = 'visualizations'; + + try { + let fileContent = fs.readFileSync( + path.resolve(__dirname, configPath, dashboardDir, `${dashboard}.json`), + 'utf8'); + + let dasboardData = JSON.parse(fileContent); + + if(dasboardData.visualizations) { + dasboardData.visualizations.forEach((visualization, index, array) => { + let visualizationData = fs.readFileSync( + path.resolve(__dirname, configPath, visualizationDir, `${visualization.id}.json`), + 'utf8'); + dasboardData.visualizations[index].detail = JSON.parse(visualizationData); + }); + } + + res.json(dasboardData); + } catch(err) { + next(err); + } + } +} + +export default new DashboardsController(); diff --git a/server/app/controllers/meta.controller.js b/server/app/controllers/meta.controller.js new file mode 100644 index 00000000..b7b80443 --- /dev/null +++ b/server/app/controllers/meta.controller.js @@ -0,0 +1,12 @@ +import BaseController from './base.controller'; +import Constants from '../config/constants'; + +class MetaController extends BaseController { + index(req, res) { + res.json({ + version: Constants.version, + }); + } +} + +export default new MetaController(); diff --git a/server/app/index.js b/server/app/index.js new file mode 100644 index 00000000..db0faf91 --- /dev/null +++ b/server/app/index.js @@ -0,0 +1,5 @@ +// Load environment variables +require('dotenv').config(); + +// Initialize Server +require('./server'); diff --git a/server/app/lib/util.js b/server/app/lib/util.js new file mode 100755 index 00000000..e69de29b diff --git a/server/app/middleware/error-handler.js b/server/app/middleware/error-handler.js new file mode 100644 index 00000000..09850307 --- /dev/null +++ b/server/app/middleware/error-handler.js @@ -0,0 +1,26 @@ +import Constants from '../config/constants'; + +export default function errorHandler(err, req, res, next) { + if (!err) { + return res.sendStatus(500); + } + + const error = { + message: err.message || 'Internal Server Error.', + }; + + if (Constants.envs.development) { + error.stack = err.stack; + } + + if (err.errors) { + error.errors = {}; + const { errors } = err; + for (const type in errors) { + if (type in errors) { + error.errors[type] = errors[type].message; + } + } + } + res.status(err.status || 500).json(error); +} diff --git a/server/app/routes.js b/server/app/routes.js new file mode 100644 index 00000000..54674fbb --- /dev/null +++ b/server/app/routes.js @@ -0,0 +1,17 @@ +import { Router } from 'express'; + +import MetaController from './controllers/meta.controller'; +import DashboardsController from './controllers/dashboards.controller'; + +import errorHandler from './middleware/error-handler'; + +const routes = new Router(); + +routes.get('/', MetaController.index); + +// Users +routes.get('/dashboards/:dashboard', DashboardsController.index); + +routes.use(errorHandler); + +export default routes; diff --git a/server/app/server.js b/server/app/server.js new file mode 100644 index 00000000..7cb6a67d --- /dev/null +++ b/server/app/server.js @@ -0,0 +1,50 @@ +import express from 'express'; +import cors from 'cors'; +import bodyParser from 'body-parser'; +import methodOverride from 'method-override'; +import morgan from 'morgan'; +import helmet from 'helmet'; + +import routes from './routes'; +import Constants from './config/constants'; + +const app = express(); + +// Helmet helps you secure your Express apps by setting various HTTP headers +// https://github.com/helmetjs/helmet +app.use(helmet()); + +// Enable CORS with various options +// https://github.com/expressjs/cors +app.use(cors()); + +// Request logger +// https://github.com/expressjs/morgan +if (!Constants.envs.test) { + app.use(morgan('dev')); +} + +// Parse incoming request bodies +// https://github.com/expressjs/body-parser +app.use(bodyParser.json()); +app.use(bodyParser.urlencoded({ extended: true })); + +// Lets you use HTTP verbs such as PUT or DELETE +// https://github.com/expressjs/method-override +app.use(methodOverride()); + +// Mount public routes +app.use('/public', express.static(`${__dirname}/public`)); + +// Mount API routes +app.use(Constants.apiPrefix, routes); + +app.listen(Constants.port, () => { + // eslint-disable-next-line no-console + console.log(` + Port: ${Constants.port} + Env: ${app.get('env')} + `); +}); + +export default app; diff --git a/server/index.js b/server/index.js new file mode 100755 index 00000000..a1eb4250 --- /dev/null +++ b/server/index.js @@ -0,0 +1,5 @@ +// Used as entry for development server only +process.env.NODE_ENV = process.env.NODE_ENV || 'development'; + +require('babel-register'); +require('./app'); diff --git a/server/package.json b/server/package.json new file mode 100644 index 00000000..3a40c558 --- /dev/null +++ b/server/package.json @@ -0,0 +1,47 @@ +{ + "name": "visualization-framework-middleware", + "version": "0.1.0", + "description": "Middleware using restfull node backend server powered by ES6 and Express", + "main": "index.js", + "scripts": { + "build": "npm run clean && babel app -d build", + "clean": "rm -rf build && mkdir build", + "start": "nodemon", + "lint": "eslint app", + "validate": "npm run test && npm outdated --depth 0" + }, + "engines": { + "node": ">= 6", + "npm": ">= 3" + }, + "author": "Anil Chauhan ", + "dependencies": { + "babel-core": "^6.18.0", + "body-parser": "^1.15.2", + "cors": "^2.8.1", + "dotenv": "^4.0.0", + "express": "^4.14.0", + "helmet": "^3.1.0", + "lodash": "^4.16.4", + "method-override": "^2.3.6", + "morgan": "^1.7.0" + }, + "devDependencies": { + "babel-cli": "^6.18.0", + "babel-eslint": "^7.0.0", + "babel-plugin-transform-runtime": "^6.22.0", + "babel-preset-es2015": "^6.18.0", + "babel-preset-stage-0": "^6.16.0", + "babel-register": "^6.18.0", + "chai": "^3.5.0", + "chai-http": "^3.0.0", + "eslint": "^3.8.1", + "eslint-config-google": "^0.7.1", + "eslint-plugin-babel": "^4.0.0", + "eslint-plugin-flowtype": "^2.32.1", + "eslint-plugin-import": "^2.2.0", + "eslint-plugin-jsx-a11y": "^4.0.0", + "eslint-plugin-react": "^7.0.0", + "nodemon": "^1.11.0" + } +} From ce41b6c781774e21d0c825f160089a590e1a944a Mon Sep 17 00:00:00 2001 From: nxanil Date: Mon, 8 May 2017 18:06:27 +0530 Subject: [PATCH 02/70] Indentation Issues --- server/app/config/constants.js | 14 ++---- server/app/controllers/base.controller.js | 48 ++++++++----------- .../app/controllers/dashboards.controller.js | 3 +- server/app/controllers/index.controller.js | 12 +++++ server/app/controllers/meta.controller.js | 12 ----- server/app/routes.js | 4 +- 6 files changed, 39 insertions(+), 54 deletions(-) create mode 100644 server/app/controllers/index.controller.js delete mode 100644 server/app/controllers/meta.controller.js diff --git a/server/app/config/constants.js b/server/app/config/constants.js index 7b13dc43..f7fd97c5 100644 --- a/server/app/config/constants.js +++ b/server/app/config/constants.js @@ -1,7 +1,5 @@ import path from 'path'; -import merge from 'lodash/merge'; -// Default configuations applied to all environments const defaultConfig = { env: process.env.NODE_ENV, get envs() { @@ -11,16 +9,12 @@ const defaultConfig = { production: process.env.NODE_ENV === 'production', }; }, - - version: require('../../package.json').version, - root: path.normalize(__dirname + '/../../..'), port: process.env.PORT || 8010, ip: process.env.IP || '0.0.0.0', + release: require('../../package.json').version, + baseDir: path.normalize(__dirname + '/../..'), + apiPrefix: '/api', }; -// Environment specific overrides -const environmentConfigs = {}; - -// Recursively merge configurations -export default merge(defaultConfig, environmentConfigs[process.env.NODE_ENV] || {}); +export default defaultConfig; diff --git a/server/app/controllers/base.controller.js b/server/app/controllers/base.controller.js index 035bdbf0..97281f61 100755 --- a/server/app/controllers/base.controller.js +++ b/server/app/controllers/base.controller.js @@ -1,36 +1,26 @@ class BaseController { - filterParams(params, whitelist) { - const filtered = {}; - for (const key in params) { - if (whitelist.indexOf(key) > -1) { - filtered[key] = params[key]; - } - } - return filtered; - } + formatApiError(err) { + if (!err) { + // eslint-disable-next-line no-console + return console.error('Provide an error'); + } - formatApiError(err) { - if (!err) { - // eslint-disable-next-line no-console - return console.error('Provide an error'); - } + const formatted = { + message: err.message, + }; - const formatted = { - message: err.message, - }; + if (err.errors) { + formatted.errors = {}; + const errors = err.errors; + for (const type in errors) { + if (errors.hasOwnProperty(type)) { + formatted.errors[type] = errors[type].message; + } + } + } - if (err.errors) { - formatted.errors = {}; - const errors = err.errors; - for (const type in errors) { - if (errors.hasOwnProperty(type)) { - formatted.errors[type] = errors[type].message; - } - } - } - - return formatted; - } + return formatted; + } } export default BaseController; diff --git a/server/app/controllers/dashboards.controller.js b/server/app/controllers/dashboards.controller.js index 52be4904..ded17ca5 100644 --- a/server/app/controllers/dashboards.controller.js +++ b/server/app/controllers/dashboards.controller.js @@ -1,4 +1,5 @@ import BaseController from './base.controller'; +import Constants from '../config/constants'; import fs from 'fs'; import path from 'path'; @@ -7,7 +8,7 @@ class DashboardsController extends BaseController { index = async (req, res, next) => { let { dashboard } = req.params; - const configPath = '../../../public/configurations'; + const configPath = `${Constants.baseDir}/../public/configurations`; const dashboardDir = 'dashboards'; const visualizationDir = 'visualizations'; diff --git a/server/app/controllers/index.controller.js b/server/app/controllers/index.controller.js new file mode 100644 index 00000000..1118351f --- /dev/null +++ b/server/app/controllers/index.controller.js @@ -0,0 +1,12 @@ +import BaseController from './base.controller'; +import Constants from '../config/constants'; + +class IndexController extends BaseController { + index(req, res) { + res.json({ + release: Constants.release, + }); + } +} + +export default new IndexController(); diff --git a/server/app/controllers/meta.controller.js b/server/app/controllers/meta.controller.js deleted file mode 100644 index b7b80443..00000000 --- a/server/app/controllers/meta.controller.js +++ /dev/null @@ -1,12 +0,0 @@ -import BaseController from './base.controller'; -import Constants from '../config/constants'; - -class MetaController extends BaseController { - index(req, res) { - res.json({ - version: Constants.version, - }); - } -} - -export default new MetaController(); diff --git a/server/app/routes.js b/server/app/routes.js index 54674fbb..6fbf90e5 100644 --- a/server/app/routes.js +++ b/server/app/routes.js @@ -1,13 +1,13 @@ import { Router } from 'express'; -import MetaController from './controllers/meta.controller'; +import IndexController from './controllers/index.controller'; import DashboardsController from './controllers/dashboards.controller'; import errorHandler from './middleware/error-handler'; const routes = new Router(); -routes.get('/', MetaController.index); +routes.get('/', IndexController.index); // Users routes.get('/dashboards/:dashboard', DashboardsController.index); From fce2fa463f7c906ad54378d27e878b39127b1a16 Mon Sep 17 00:00:00 2001 From: nxanil Date: Mon, 8 May 2017 18:11:04 +0530 Subject: [PATCH 03/70] Comments and Indentations --- server/app/server.js | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/server/app/server.js b/server/app/server.js index 7cb6a67d..031beba2 100644 --- a/server/app/server.js +++ b/server/app/server.js @@ -10,32 +10,24 @@ import Constants from './config/constants'; const app = express(); -// Helmet helps you secure your Express apps by setting various HTTP headers -// https://github.com/helmetjs/helmet +// Securing express APPs app.use(helmet()); -// Enable CORS with various options -// https://github.com/expressjs/cors +// Enabling CORS app.use(cors()); // Request logger -// https://github.com/expressjs/morgan if (!Constants.envs.test) { app.use(morgan('dev')); } // Parse incoming request bodies -// https://github.com/expressjs/body-parser app.use(bodyParser.json()); app.use(bodyParser.urlencoded({ extended: true })); // Lets you use HTTP verbs such as PUT or DELETE -// https://github.com/expressjs/method-override app.use(methodOverride()); -// Mount public routes -app.use('/public', express.static(`${__dirname}/public`)); - // Mount API routes app.use(Constants.apiPrefix, routes); From 02b3861c979703c9a42c827b094130bdfe1898ad Mon Sep 17 00:00:00 2001 From: nxanil Date: Mon, 8 May 2017 18:23:07 +0530 Subject: [PATCH 04/70] Configuration Path issue --- server/app/controllers/dashboards.controller.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/app/controllers/dashboards.controller.js b/server/app/controllers/dashboards.controller.js index ded17ca5..5251d7c5 100644 --- a/server/app/controllers/dashboards.controller.js +++ b/server/app/controllers/dashboards.controller.js @@ -14,7 +14,7 @@ class DashboardsController extends BaseController { try { let fileContent = fs.readFileSync( - path.resolve(__dirname, configPath, dashboardDir, `${dashboard}.json`), + path.resolve(configPath, dashboardDir, `${dashboard}.json`), 'utf8'); let dasboardData = JSON.parse(fileContent); @@ -22,7 +22,7 @@ class DashboardsController extends BaseController { if(dasboardData.visualizations) { dasboardData.visualizations.forEach((visualization, index, array) => { let visualizationData = fs.readFileSync( - path.resolve(__dirname, configPath, visualizationDir, `${visualization.id}.json`), + path.resolve(configPath, visualizationDir, `${visualization.id}.json`), 'utf8'); dasboardData.visualizations[index].detail = JSON.parse(visualizationData); }); From d19e7acc3216e55b1149594cf148dbdc702f6971 Mon Sep 17 00:00:00 2001 From: nxanil Date: Tue, 9 May 2017 22:12:52 +0530 Subject: [PATCH 05/70] Color Swapping --- src/components/Graphs/GaugeGraph/default.config.js | 2 +- .../nuage/scripts/vss-simulator/flowGenerator.py | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/components/Graphs/GaugeGraph/default.config.js b/src/components/Graphs/GaugeGraph/default.config.js index f7d54376..7d876c18 100644 --- a/src/components/Graphs/GaugeGraph/default.config.js +++ b/src/components/Graphs/GaugeGraph/default.config.js @@ -23,7 +23,7 @@ export const properties = { minValue : '0', maxValue : '100', - colors : ['#fc5f5f', '#8fc496'], + colors : ['#8fc496', '#fc5f5f'], labelFormat : '.0s', stroke: { diff --git a/src/configs/nuage/scripts/vss-simulator/flowGenerator.py b/src/configs/nuage/scripts/vss-simulator/flowGenerator.py index b492305a..821ead3a 100644 --- a/src/configs/nuage/scripts/vss-simulator/flowGenerator.py +++ b/src/configs/nuage/scripts/vss-simulator/flowGenerator.py @@ -54,12 +54,12 @@ def generateFlowStats(domain_id, type="l3"): es_data['type'] = random.sample(ACL_ACTION, 1)[0] es_data['nuage_metadata'] ={ - 'inport': random.randint(1,5), + 'inport': random.randint(1,5), 'flowid': random.randint(10000,15000), 'outport': random.randint(1,5), 'domainName': CONFIG_DICT['domain.name'] + "-" + str(domain_id), 'dpgName': flow_data[1]['pg'], - 'enterpriseName': CONFIG_DICT['enterprise.name'], + 'enterpriseName': CONFIG_DICT['enterprise.name'], 'sourcevport': flow_data[0]['uuid'], 'destinationvport': flow_data[1]['uuid'], 'spgName': flow_data[0]['pg'], @@ -84,7 +84,7 @@ def generateFlowStats(domain_id, type="l3"): writeToES(es_data) def writeToES(es_data): - es = Elasticsearch("192.168.100.200") + es = Elasticsearch("http://localhost:9200") write_data = [] # Create counters on the fly everytime # Write data for a day every minute @@ -99,7 +99,7 @@ def writeToES(es_data): helpers.bulk(es, iter(write_data), request_timeout=50) def populateData(): - populatePGs() + populatePGs() populateVPorts() def configRead(): @@ -117,7 +117,6 @@ def configRead(): #print PGS #print VPORTS generateFlowStats(i, type="l2") - + for i in range(1, CONFIG_DICT['no_of_l2domains']+1): - generateFlowStats(i, type='l2') - + generateFlowStats(i, type='l2') From d34dbb84682b6b49e6f7fdb30a4a95168f2e8299 Mon Sep 17 00:00:00 2001 From: nxanil Date: Wed, 17 May 2017 12:25:49 +0530 Subject: [PATCH 06/70] Middleware - Elastice and VSD API --- server/app/config/constants.js | 20 ------------------ .../app/controllers/dashboards.controller.js | 21 +++++-------------- server/app/controllers/index.controller.js | 2 +- server/app/middleware/error-handler.js | 2 +- server/app/routes.js | 2 ++ server/app/server.js | 2 +- src/components/Visualization/index.js | 1 - src/configs/nuage/elasticsearch/index.js | 2 -- src/utils/configurations.js | 3 ++- 9 files changed, 12 insertions(+), 43 deletions(-) delete mode 100644 server/app/config/constants.js diff --git a/server/app/config/constants.js b/server/app/config/constants.js deleted file mode 100644 index f7fd97c5..00000000 --- a/server/app/config/constants.js +++ /dev/null @@ -1,20 +0,0 @@ -import path from 'path'; - -const defaultConfig = { - env: process.env.NODE_ENV, - get envs() { - return { - test: process.env.NODE_ENV === 'test', - development: process.env.NODE_ENV === 'development', - production: process.env.NODE_ENV === 'production', - }; - }, - port: process.env.PORT || 8010, - ip: process.env.IP || '0.0.0.0', - release: require('../../package.json').version, - baseDir: path.normalize(__dirname + '/../..'), - - apiPrefix: '/api', -}; - -export default defaultConfig; diff --git a/server/app/controllers/dashboards.controller.js b/server/app/controllers/dashboards.controller.js index 5251d7c5..7527adf1 100644 --- a/server/app/controllers/dashboards.controller.js +++ b/server/app/controllers/dashboards.controller.js @@ -1,30 +1,19 @@ import BaseController from './base.controller'; -import Constants from '../config/constants'; +import {DirectoryTypes, FetchManager} from '../lib/fetch'; -import fs from 'fs'; -import path from 'path'; class DashboardsController extends BaseController { index = async (req, res, next) => { let { dashboard } = req.params; - const configPath = `${Constants.baseDir}/../public/configurations`; - const dashboardDir = 'dashboards'; - const visualizationDir = 'visualizations'; - try { - let fileContent = fs.readFileSync( - path.resolve(configPath, dashboardDir, `${dashboard}.json`), - 'utf8'); - - let dasboardData = JSON.parse(fileContent); + let dasboardData = FetchManager.fetchAndParseJSON(dashboard, DirectoryTypes.DASHBOARD); if(dasboardData.visualizations) { dasboardData.visualizations.forEach((visualization, index, array) => { - let visualizationData = fs.readFileSync( - path.resolve(configPath, visualizationDir, `${visualization.id}.json`), - 'utf8'); - dasboardData.visualizations[index].detail = JSON.parse(visualizationData); + dasboardData.visualizations[index].visualization = FetchManager.fetchAndParseJSON(visualization.id, DirectoryTypes.VISUALIZATION); + if(dasboardData.visualizations[index].visualization.query) + dasboardData.visualizations[index].query = FetchManager.fetchAndParseJSON(dasboardData.visualizations[index].visualization.query, DirectoryTypes.QUERY); }); } diff --git a/server/app/controllers/index.controller.js b/server/app/controllers/index.controller.js index 1118351f..8fb68b14 100644 --- a/server/app/controllers/index.controller.js +++ b/server/app/controllers/index.controller.js @@ -1,5 +1,5 @@ import BaseController from './base.controller'; -import Constants from '../config/constants'; +import Constants from '../configurations/constants'; class IndexController extends BaseController { index(req, res) { diff --git a/server/app/middleware/error-handler.js b/server/app/middleware/error-handler.js index 09850307..68ed09b5 100644 --- a/server/app/middleware/error-handler.js +++ b/server/app/middleware/error-handler.js @@ -1,4 +1,4 @@ -import Constants from '../config/constants'; +import Constants from '../configurations/constants'; export default function errorHandler(err, req, res, next) { if (!err) { diff --git a/server/app/routes.js b/server/app/routes.js index 6fbf90e5..b463e228 100644 --- a/server/app/routes.js +++ b/server/app/routes.js @@ -2,6 +2,7 @@ import { Router } from 'express'; import IndexController from './controllers/index.controller'; import DashboardsController from './controllers/dashboards.controller'; +import VisualizationsController from './controllers/visualizations.controller'; import errorHandler from './middleware/error-handler'; @@ -11,6 +12,7 @@ routes.get('/', IndexController.index); // Users routes.get('/dashboards/:dashboard', DashboardsController.index); +routes.post('/visualizations/:visualization', VisualizationsController.fetch); routes.use(errorHandler); diff --git a/server/app/server.js b/server/app/server.js index 031beba2..dd786e43 100644 --- a/server/app/server.js +++ b/server/app/server.js @@ -6,7 +6,7 @@ import morgan from 'morgan'; import helmet from 'helmet'; import routes from './routes'; -import Constants from './config/constants'; +import Constants from './configurations/constants'; const app = express(); diff --git a/src/components/Visualization/index.js b/src/components/Visualization/index.js index db49d439..86bd24e6 100644 --- a/src/components/Visualization/index.js +++ b/src/components/Visualization/index.js @@ -465,7 +465,6 @@ const mapStateToProps = (state, ownProps) => { configurationID, ConfigurationsActionKeyStore.ERROR ]) - }; // Expose the query template as a JS object if it is available. diff --git a/src/configs/nuage/elasticsearch/index.js b/src/configs/nuage/elasticsearch/index.js index ed737258..5fcbd56a 100644 --- a/src/configs/nuage/elasticsearch/index.js +++ b/src/configs/nuage/elasticsearch/index.js @@ -31,7 +31,6 @@ let ESClient = function (state) { const fetch = function (queryConfiguration, state) { var client = ESClient(state) // eslint-disable-line - if (!client) return Promise.reject(); @@ -69,7 +68,6 @@ const ping = function (queryConfiguration, state) { */ const getRequestID = function (queryConfiguration, context) { const parameters = getUsedParameters(queryConfiguration, context); - if (Object.keys(parameters).length === 0) return queryConfiguration.id; diff --git a/src/utils/configurations.js b/src/utils/configurations.js index e230d4b7..6c388985 100644 --- a/src/utils/configurations.js +++ b/src/utils/configurations.js @@ -46,13 +46,14 @@ export const parameterizedConfiguration = (configuration, context) => { */ export const getUsedParameters = (configuration, context) => { const parameters = parse(configuration).parameters; + let queryParams = {}; for (let i in parameters) { if (!parameters.hasOwnProperty(i)) continue; - + let parameter = parameters[i]; if (parameter.key in context) { From 073a4ff1b659a0859d5ff68001750e45ede22a78 Mon Sep 17 00:00:00 2001 From: nxanil Date: Fri, 19 May 2017 17:36:54 +0530 Subject: [PATCH 07/70] Middleware API - Data Request --- server/.env.example | 6 +- server/app/configurations/constants.js | 20 + .../configurations/dashboards/aarDomain.json | 21 + .../dashboards/aarEnterprise.json | 27 + .../dashboards/aarEnterpriseDetail.json | 21 + .../app/configurations/dashboards/aarNSG.json | 39 ++ .../dashboards/aarNSGDetail.json | 22 + .../dashboards/aarNetworkPerformance.json | 22 + .../dashboards/appsOverview.json | 9 + .../configurations/dashboards/dashboard2.json | 10 + .../dashboards/dateHistogramExample.json | 17 + .../configurations/dashboards/example.json | 10 + .../dashboards/kitchenSink.json | 108 ++++ .../dashboards/lineChartExample.json | 17 + .../dashboards/multi-line-test.json | 17 + .../dashboards/tableExample.json | 9 + server/app/configurations/dashboards/vnf.json | 44 ++ .../dashboards/vssDomainACL.json | 47 ++ .../dashboards/vssDomainEvent.json | 28 ++ .../dashboards/vssDomainFlow.json | 92 ++++ .../dashboards/vssDomainTraffic.json | 49 ++ .../dashboards/vssEnterprise.json | 16 + .../queries/aar-default-app-l7.json | 54 ++ .../queries/aar-domain-probe-path.json | 71 +++ .../aar-domain-probe-table-dest-to-src.json | 41 ++ .../queries/aar-domain-probe-table.json | 41 ++ .../queries/aar-domain-top5-apmg.json | 80 +++ .../queries/aar-flow-sla-heatmap.json | 62 +++ .../queries/aar-nsg-app-from-nsg.json | 216 ++++++++ .../queries/aar-nsg-app-linechart.json | 83 +++ .../queries/aar-nsg-app-to-nsg.json | 216 ++++++++ .../queries/aar-nsg-sla-from-nsg.json | 97 ++++ .../queries/aar-nsg-sla-to-nsg.json | 97 ++++ .../queries/aar-nsg-top10-app.json | 75 +++ .../aar-nsg-top5-talkers-download.json | 91 ++++ .../queries/aar-nsg-top5-talkers-upload.json | 91 ++++ .../queries/aar-slastatus-enterprise.json | 50 ++ .../queries/app-specific-vertical-bar.json | 57 +++ .../connectivity-score-part1-download.json | 45 ++ .../connectivity-score-part1-upload.json | 45 ++ .../connectivity-score-part2-download.json | 50 ++ .../connectivity-score-part2-upload.json | 50 ++ .../queries/effective-score-part1.json | 57 +++ .../queries/effective-score-part2.json | 52 ++ .../newly-discovered-applications.json | 10 + .../queries/number-of-apm-groups.json | 10 + .../queries/number-of-applications.json | 10 + .../queries/number-of-npms.json | 10 + .../number-of-performance-monitors.json | 10 + .../configurations/queries/probe-paths.json | 67 +++ ...-bottom-5-paths-horizontal-bar-charts.json | 103 ++++ .../queries/top20-talkers-domain-table.json | 185 +++++++ ...0-talkers-enterprise-defaultapp-table.json | 123 +++++ .../top20-talkers-enterprise-table.json | 125 +++++ .../queries/top5-APMG-APP-pie-chart.json | 72 +++ .../queries/top5-app-vertical-bar-domain.json | 75 +++ .../queries/top5-app-vertical-bar.json | 60 +++ .../queries/top5-download-users-table.json | 112 +++++ .../queries/top5-upload-users-table.json | 112 +++++ .../queries/top5-users-table.json | 86 ++++ .../queries/vertical-bar-with-sla.json | 23 + .../queries/vnf-status-linechart.json | 82 +++ .../configurations/queries/vnf-status.json | 23 + .../queries/vsd-from-nsgs-list.json | 11 + .../queries/vsd-to-nsgs-list.json | 11 + .../queries/vss-domain-acl-dpg.json | 90 ++++ .../queries/vss-domain-acl-spg.json | 90 ++++ .../queries/vss-domain-acl-time.json | 87 ++++ .../queries/vss-domain-acl-top5.json | 91 ++++ .../queries/vss-domain-events-by-pg.json | 75 +++ .../queries/vss-domain-events-by-type.json | 75 +++ .../queries/vss-domain-events-detail.json | 24 + .../queries/vss-domain-flow-table.json | 47 ++ .../queries/vss-domain-flow.json | 121 +++++ .../queries/vss-domain-traffic-icmp.json | 102 ++++ .../queries/vss-domain-traffic-tcp-conn.json | 102 ++++ .../vss-domain-traffic-tcp-multiline.json | 102 ++++ .../queries/vss-domain-traffic-tcp-syn.json | 72 +++ .../vss-domain-traffic-tcp-synflood.json | 87 ++++ .../queries/vss-domain-traffic-top-dpg.json | 75 +++ .../queries/vss-domain-traffic-top-spg.json | 75 +++ .../queries/vss-domain-traffic-udp.json | 102 ++++ .../queries/vss-ent-acldeny-time.json | 72 +++ .../vss-enterprise-acldeny-metric.json | 66 +++ .../queries/vss-enterprise-alerts-metric.json | 66 +++ .../queries/vss-enterprise-events-metric.json | 51 ++ .../queries/vss-enterprise-flows-metric.json | 58 +++ .../queries/vss-enterprise-pg-metric.json | 58 +++ .../vss-top-domains-blocked-traffic.json | 75 +++ .../queries/vss-top-sec-events.json | 65 +++ .../visualizations/aar-domain-probe-path.json | 20 + .../aar-domain-probe-table-dest-to-src.json | 21 + .../aar-domain-probe-table.json | 21 + .../visualizations/aar-domain-top5-apmg.json | 18 + .../visualizations/aar-flow-sla-heatmap.json | 28 ++ .../visualizations/aar-nsg-app-from-nsg.json | 22 + .../visualizations/aar-nsg-app-linechart.json | 51 ++ .../visualizations/aar-nsg-app-to-nsg.json | 22 + .../visualizations/aar-nsg-gauge-chart.json | 13 + .../visualizations/aar-nsg-line-chart.json | 16 + .../visualizations/aar-nsg-sla-from-nsg.json | 18 + .../visualizations/aar-nsg-sla-to-nsg.json | 18 + .../visualizations/aar-nsg-top10-app.json | 18 + .../aar-nsg-top5-talkers-download.json | 17 + .../aar-nsg-top5-talkers-upload.json | 17 + .../aar-slastatus-enterprise.json | 17 + .../app-specific-date-histogram.json | 19 + .../app-specific-line-chart.json | 13 + .../visualizations/effective-score.json | 13 + ...y-discovered-applications-with-circle.json | 13 + .../newly-discovered-applications.json | 9 + .../visualizations/number-of-apm-groups.json | 31 ++ .../number-of-applications.json | 31 ++ .../visualizations/number-of-npms.json | 31 ++ .../number-of-performance-monitors.json | 31 ++ .../visualizations/top20-talkers-domain.json | 34 ++ .../top20-talkers-enterprise-defaultapp.json | 23 + .../top20-talkers-enterprise.json | 25 + .../visualizations/top5-app-donut.json | 14 + .../top5-app-horizontal-bar.json | 23 + .../visualizations/top5-app-pie.json | 32 ++ .../visualizations/top5-app-table.json | 21 + .../top5-app-vertical-bar-domain.json | 27 + .../visualizations/top5-app-vertical-bar.json | 36 ++ .../top5-download-users-table.json | 18 + .../top5-upload-users-table.json | 18 + .../visualizations/top5-users-table.json | 17 + .../visualizations/vnf-cpu-status.json | 14 + .../visualizations/vnf-disk-status.json | 14 + .../visualizations/vnf-memory-status.json | 15 + .../visualizations/vnf-status-linechart.json | 29 ++ .../visualizations/vsd-from-nsgs-table.json | 49 ++ .../visualizations/vsd-to-nsgs-table.json | 49 ++ .../visualizations/vss-domain-acl-dpg.json | 25 + .../visualizations/vss-domain-acl-spg.json | 23 + .../visualizations/vss-domain-acl-time.json | 25 + .../visualizations/vss-domain-acl-top5.json | 21 + .../vss-domain-events-by-pg.json | 22 + .../vss-domain-events-by-type.json | 35 ++ .../vss-domain-events-detail.json | 18 + .../vss-domain-flow-fixed-weight.json | 13 + .../visualizations/vss-domain-flow-table.json | 21 + .../visualizations/vss-domain-flow.json | 24 + .../vss-domain-traffic-icmp.json | 22 + .../vss-domain-traffic-tcp-conn.json | 22 + .../vss-domain-traffic-tcp-syn.json | 57 +++ .../vss-domain-traffic-tcp-synflood.json | 22 + .../vss-domain-traffic-top-dpg.json | 26 + .../vss-domain-traffic-top-spg.json | 24 + .../vss-domain-traffic-udp.json | 21 + .../visualizations/vss-ent-acldeny-time.json | 22 + .../vss-enterprise-acldeny-metric.json | 15 + .../vss-enterprise-alerts-metric.json | 15 + .../vss-enterprise-events-metric.json | 15 + .../vss-enterprise-flows-metric.json | 15 + .../vss-enterprise-pg-metric.json | 15 + .../vss-top-domains-blocked-traffic.json | 38 ++ .../visualizations/vss-top-sec-events.json | 23 + server/app/controllers/base.controller.js | 27 +- .../app/controllers/dashboards.controller.js | 2 +- .../controllers/visualizations.controller.js | 59 +++ server/app/lib/servicemanager/index.js | 99 ++++ .../elasticsearch/elasticsearch.spec.js | 83 +++ .../app/lib/services/elasticsearch/index.js | 88 ++++ .../app/lib/services/elasticsearch/tabify.js | 166 ++++++ .../lib/services/elasticsearch/tabify.spec.js | 476 ++++++++++++++++++ .../lib/services/scripts/effective-score.js | 11 + .../{util.js => services/scripts/index.js} | 0 server/app/lib/services/vsd/index.js | 189 +++++++ server/app/lib/services/vsd/redux/actions.js | 20 + server/app/lib/services/vsd/redux/reducer.js | 30 ++ server/app/lib/services/vsd/vsd.spec.js | 158 ++++++ server/app/lib/utils/configurations.js | 73 +++ server/app/lib/utils/fetch.js | 34 ++ server/app/middleware/error-handler.js | 4 + 175 files changed, 8679 insertions(+), 25 deletions(-) create mode 100644 server/app/configurations/constants.js create mode 100644 server/app/configurations/dashboards/aarDomain.json create mode 100644 server/app/configurations/dashboards/aarEnterprise.json create mode 100644 server/app/configurations/dashboards/aarEnterpriseDetail.json create mode 100644 server/app/configurations/dashboards/aarNSG.json create mode 100644 server/app/configurations/dashboards/aarNSGDetail.json create mode 100644 server/app/configurations/dashboards/aarNetworkPerformance.json create mode 100644 server/app/configurations/dashboards/appsOverview.json create mode 100644 server/app/configurations/dashboards/dashboard2.json create mode 100644 server/app/configurations/dashboards/dateHistogramExample.json create mode 100644 server/app/configurations/dashboards/example.json create mode 100644 server/app/configurations/dashboards/kitchenSink.json create mode 100644 server/app/configurations/dashboards/lineChartExample.json create mode 100644 server/app/configurations/dashboards/multi-line-test.json create mode 100644 server/app/configurations/dashboards/tableExample.json create mode 100644 server/app/configurations/dashboards/vnf.json create mode 100644 server/app/configurations/dashboards/vssDomainACL.json create mode 100644 server/app/configurations/dashboards/vssDomainEvent.json create mode 100644 server/app/configurations/dashboards/vssDomainFlow.json create mode 100644 server/app/configurations/dashboards/vssDomainTraffic.json create mode 100644 server/app/configurations/dashboards/vssEnterprise.json create mode 100644 server/app/configurations/queries/aar-default-app-l7.json create mode 100644 server/app/configurations/queries/aar-domain-probe-path.json create mode 100644 server/app/configurations/queries/aar-domain-probe-table-dest-to-src.json create mode 100644 server/app/configurations/queries/aar-domain-probe-table.json create mode 100644 server/app/configurations/queries/aar-domain-top5-apmg.json create mode 100644 server/app/configurations/queries/aar-flow-sla-heatmap.json create mode 100644 server/app/configurations/queries/aar-nsg-app-from-nsg.json create mode 100644 server/app/configurations/queries/aar-nsg-app-linechart.json create mode 100644 server/app/configurations/queries/aar-nsg-app-to-nsg.json create mode 100644 server/app/configurations/queries/aar-nsg-sla-from-nsg.json create mode 100644 server/app/configurations/queries/aar-nsg-sla-to-nsg.json create mode 100644 server/app/configurations/queries/aar-nsg-top10-app.json create mode 100644 server/app/configurations/queries/aar-nsg-top5-talkers-download.json create mode 100644 server/app/configurations/queries/aar-nsg-top5-talkers-upload.json create mode 100644 server/app/configurations/queries/aar-slastatus-enterprise.json create mode 100644 server/app/configurations/queries/app-specific-vertical-bar.json create mode 100644 server/app/configurations/queries/connectivity-score-part1-download.json create mode 100644 server/app/configurations/queries/connectivity-score-part1-upload.json create mode 100644 server/app/configurations/queries/connectivity-score-part2-download.json create mode 100644 server/app/configurations/queries/connectivity-score-part2-upload.json create mode 100644 server/app/configurations/queries/effective-score-part1.json create mode 100644 server/app/configurations/queries/effective-score-part2.json create mode 100644 server/app/configurations/queries/newly-discovered-applications.json create mode 100644 server/app/configurations/queries/number-of-apm-groups.json create mode 100644 server/app/configurations/queries/number-of-applications.json create mode 100644 server/app/configurations/queries/number-of-npms.json create mode 100644 server/app/configurations/queries/number-of-performance-monitors.json create mode 100644 server/app/configurations/queries/probe-paths.json create mode 100644 server/app/configurations/queries/top-bottom-5-paths-horizontal-bar-charts.json create mode 100644 server/app/configurations/queries/top20-talkers-domain-table.json create mode 100644 server/app/configurations/queries/top20-talkers-enterprise-defaultapp-table.json create mode 100644 server/app/configurations/queries/top20-talkers-enterprise-table.json create mode 100644 server/app/configurations/queries/top5-APMG-APP-pie-chart.json create mode 100644 server/app/configurations/queries/top5-app-vertical-bar-domain.json create mode 100644 server/app/configurations/queries/top5-app-vertical-bar.json create mode 100644 server/app/configurations/queries/top5-download-users-table.json create mode 100644 server/app/configurations/queries/top5-upload-users-table.json create mode 100644 server/app/configurations/queries/top5-users-table.json create mode 100644 server/app/configurations/queries/vertical-bar-with-sla.json create mode 100644 server/app/configurations/queries/vnf-status-linechart.json create mode 100644 server/app/configurations/queries/vnf-status.json create mode 100644 server/app/configurations/queries/vsd-from-nsgs-list.json create mode 100644 server/app/configurations/queries/vsd-to-nsgs-list.json create mode 100644 server/app/configurations/queries/vss-domain-acl-dpg.json create mode 100644 server/app/configurations/queries/vss-domain-acl-spg.json create mode 100644 server/app/configurations/queries/vss-domain-acl-time.json create mode 100644 server/app/configurations/queries/vss-domain-acl-top5.json create mode 100644 server/app/configurations/queries/vss-domain-events-by-pg.json create mode 100644 server/app/configurations/queries/vss-domain-events-by-type.json create mode 100644 server/app/configurations/queries/vss-domain-events-detail.json create mode 100644 server/app/configurations/queries/vss-domain-flow-table.json create mode 100644 server/app/configurations/queries/vss-domain-flow.json create mode 100644 server/app/configurations/queries/vss-domain-traffic-icmp.json create mode 100644 server/app/configurations/queries/vss-domain-traffic-tcp-conn.json create mode 100644 server/app/configurations/queries/vss-domain-traffic-tcp-multiline.json create mode 100644 server/app/configurations/queries/vss-domain-traffic-tcp-syn.json create mode 100644 server/app/configurations/queries/vss-domain-traffic-tcp-synflood.json create mode 100644 server/app/configurations/queries/vss-domain-traffic-top-dpg.json create mode 100644 server/app/configurations/queries/vss-domain-traffic-top-spg.json create mode 100644 server/app/configurations/queries/vss-domain-traffic-udp.json create mode 100644 server/app/configurations/queries/vss-ent-acldeny-time.json create mode 100644 server/app/configurations/queries/vss-enterprise-acldeny-metric.json create mode 100644 server/app/configurations/queries/vss-enterprise-alerts-metric.json create mode 100644 server/app/configurations/queries/vss-enterprise-events-metric.json create mode 100644 server/app/configurations/queries/vss-enterprise-flows-metric.json create mode 100644 server/app/configurations/queries/vss-enterprise-pg-metric.json create mode 100644 server/app/configurations/queries/vss-top-domains-blocked-traffic.json create mode 100644 server/app/configurations/queries/vss-top-sec-events.json create mode 100644 server/app/configurations/visualizations/aar-domain-probe-path.json create mode 100644 server/app/configurations/visualizations/aar-domain-probe-table-dest-to-src.json create mode 100644 server/app/configurations/visualizations/aar-domain-probe-table.json create mode 100644 server/app/configurations/visualizations/aar-domain-top5-apmg.json create mode 100644 server/app/configurations/visualizations/aar-flow-sla-heatmap.json create mode 100644 server/app/configurations/visualizations/aar-nsg-app-from-nsg.json create mode 100644 server/app/configurations/visualizations/aar-nsg-app-linechart.json create mode 100644 server/app/configurations/visualizations/aar-nsg-app-to-nsg.json create mode 100644 server/app/configurations/visualizations/aar-nsg-gauge-chart.json create mode 100644 server/app/configurations/visualizations/aar-nsg-line-chart.json create mode 100644 server/app/configurations/visualizations/aar-nsg-sla-from-nsg.json create mode 100644 server/app/configurations/visualizations/aar-nsg-sla-to-nsg.json create mode 100644 server/app/configurations/visualizations/aar-nsg-top10-app.json create mode 100644 server/app/configurations/visualizations/aar-nsg-top5-talkers-download.json create mode 100644 server/app/configurations/visualizations/aar-nsg-top5-talkers-upload.json create mode 100644 server/app/configurations/visualizations/aar-slastatus-enterprise.json create mode 100644 server/app/configurations/visualizations/app-specific-date-histogram.json create mode 100644 server/app/configurations/visualizations/app-specific-line-chart.json create mode 100644 server/app/configurations/visualizations/effective-score.json create mode 100644 server/app/configurations/visualizations/newly-discovered-applications-with-circle.json create mode 100644 server/app/configurations/visualizations/newly-discovered-applications.json create mode 100644 server/app/configurations/visualizations/number-of-apm-groups.json create mode 100644 server/app/configurations/visualizations/number-of-applications.json create mode 100644 server/app/configurations/visualizations/number-of-npms.json create mode 100644 server/app/configurations/visualizations/number-of-performance-monitors.json create mode 100644 server/app/configurations/visualizations/top20-talkers-domain.json create mode 100644 server/app/configurations/visualizations/top20-talkers-enterprise-defaultapp.json create mode 100644 server/app/configurations/visualizations/top20-talkers-enterprise.json create mode 100644 server/app/configurations/visualizations/top5-app-donut.json create mode 100644 server/app/configurations/visualizations/top5-app-horizontal-bar.json create mode 100644 server/app/configurations/visualizations/top5-app-pie.json create mode 100644 server/app/configurations/visualizations/top5-app-table.json create mode 100644 server/app/configurations/visualizations/top5-app-vertical-bar-domain.json create mode 100644 server/app/configurations/visualizations/top5-app-vertical-bar.json create mode 100644 server/app/configurations/visualizations/top5-download-users-table.json create mode 100644 server/app/configurations/visualizations/top5-upload-users-table.json create mode 100644 server/app/configurations/visualizations/top5-users-table.json create mode 100644 server/app/configurations/visualizations/vnf-cpu-status.json create mode 100644 server/app/configurations/visualizations/vnf-disk-status.json create mode 100644 server/app/configurations/visualizations/vnf-memory-status.json create mode 100644 server/app/configurations/visualizations/vnf-status-linechart.json create mode 100644 server/app/configurations/visualizations/vsd-from-nsgs-table.json create mode 100644 server/app/configurations/visualizations/vsd-to-nsgs-table.json create mode 100644 server/app/configurations/visualizations/vss-domain-acl-dpg.json create mode 100644 server/app/configurations/visualizations/vss-domain-acl-spg.json create mode 100644 server/app/configurations/visualizations/vss-domain-acl-time.json create mode 100644 server/app/configurations/visualizations/vss-domain-acl-top5.json create mode 100644 server/app/configurations/visualizations/vss-domain-events-by-pg.json create mode 100644 server/app/configurations/visualizations/vss-domain-events-by-type.json create mode 100644 server/app/configurations/visualizations/vss-domain-events-detail.json create mode 100644 server/app/configurations/visualizations/vss-domain-flow-fixed-weight.json create mode 100644 server/app/configurations/visualizations/vss-domain-flow-table.json create mode 100644 server/app/configurations/visualizations/vss-domain-flow.json create mode 100644 server/app/configurations/visualizations/vss-domain-traffic-icmp.json create mode 100644 server/app/configurations/visualizations/vss-domain-traffic-tcp-conn.json create mode 100644 server/app/configurations/visualizations/vss-domain-traffic-tcp-syn.json create mode 100644 server/app/configurations/visualizations/vss-domain-traffic-tcp-synflood.json create mode 100644 server/app/configurations/visualizations/vss-domain-traffic-top-dpg.json create mode 100644 server/app/configurations/visualizations/vss-domain-traffic-top-spg.json create mode 100644 server/app/configurations/visualizations/vss-domain-traffic-udp.json create mode 100644 server/app/configurations/visualizations/vss-ent-acldeny-time.json create mode 100644 server/app/configurations/visualizations/vss-enterprise-acldeny-metric.json create mode 100644 server/app/configurations/visualizations/vss-enterprise-alerts-metric.json create mode 100644 server/app/configurations/visualizations/vss-enterprise-events-metric.json create mode 100644 server/app/configurations/visualizations/vss-enterprise-flows-metric.json create mode 100644 server/app/configurations/visualizations/vss-enterprise-pg-metric.json create mode 100644 server/app/configurations/visualizations/vss-top-domains-blocked-traffic.json create mode 100644 server/app/configurations/visualizations/vss-top-sec-events.json create mode 100644 server/app/controllers/visualizations.controller.js create mode 100644 server/app/lib/servicemanager/index.js create mode 100644 server/app/lib/services/elasticsearch/elasticsearch.spec.js create mode 100644 server/app/lib/services/elasticsearch/index.js create mode 100644 server/app/lib/services/elasticsearch/tabify.js create mode 100644 server/app/lib/services/elasticsearch/tabify.spec.js create mode 100644 server/app/lib/services/scripts/effective-score.js rename server/app/lib/{util.js => services/scripts/index.js} (100%) mode change 100755 => 100644 create mode 100644 server/app/lib/services/vsd/index.js create mode 100644 server/app/lib/services/vsd/redux/actions.js create mode 100644 server/app/lib/services/vsd/redux/reducer.js create mode 100644 server/app/lib/services/vsd/vsd.spec.js create mode 100644 server/app/lib/utils/configurations.js create mode 100644 server/app/lib/utils/fetch.js diff --git a/server/.env.example b/server/.env.example index 37a14403..9a440d55 100644 --- a/server/.env.example +++ b/server/.env.example @@ -1,2 +1,4 @@ -PORT=8010 -IP=localhost +APP_SERVER_PORT=8010 +APP_SERVER_IP=localhost +APP_ELASTICSEARCH_HOST=http://localhost:9200 +APP_VSD_API_ENDPOINT=https://vsd.com:8443/nuage/api/ diff --git a/server/app/configurations/constants.js b/server/app/configurations/constants.js new file mode 100644 index 00000000..0de90be9 --- /dev/null +++ b/server/app/configurations/constants.js @@ -0,0 +1,20 @@ +import path from 'path'; + +const defaultConfig = { + env: process.env.NODE_ENV, + get envs() { + return { + test: process.env.NODE_ENV === 'test', + development: process.env.NODE_ENV === 'development', + production: process.env.NODE_ENV === 'production', + }; + }, + port: process.env.APP_SERVER_PORT || 8010, + ip: process.env.APP_SERVER_IP || '0.0.0.0', + release: require('../../package.json').version, + baseDir: path.normalize(__dirname + '/../..'), + + apiPrefix: '/api', +}; + +export default defaultConfig; diff --git a/server/app/configurations/dashboards/aarDomain.json b/server/app/configurations/dashboards/aarDomain.json new file mode 100644 index 00000000..0edb7461 --- /dev/null +++ b/server/app/configurations/dashboards/aarDomain.json @@ -0,0 +1,21 @@ +{ + "id": "aarDomain", + "author": "Ronak Shah", + "creationDate": "10/14/2016", + "title": "AAR Domain ({{domainName}})", + "links": [ + { + "label": "Applications", + "url": "/dashboards/aarDomain" + }, + { + "label": "Network Performance", + "url": "/dashboards/aarNetworkPerformance" + } + ], + "visualizations": [ + { "id": "top20-talkers-domain", "x": 0, "y": 0, "w": 12, "h": 15, "minW": 2, "minH": 12, "static": true}, + { "id": "top5-app-vertical-bar-domain", "x": 0, "y": 15, "w": 6, "h": 15, "minW": 2, "minH": 12, "static": true}, + { "id": "aar-domain-top5-apmg", "x": 6, "y": 15, "w": 6, "h": 15, "minW": 2, "minH": 12, "static": true} + ] +} diff --git a/server/app/configurations/dashboards/aarEnterprise.json b/server/app/configurations/dashboards/aarEnterprise.json new file mode 100644 index 00000000..c753ccd1 --- /dev/null +++ b/server/app/configurations/dashboards/aarEnterprise.json @@ -0,0 +1,27 @@ +{ + "id": "aarEnterprise", + "author": "Christophe Serafin and Curran Kelleher", + "creationDate": "09/29/2016", + "title": "AAR Enterprise ({{enterpriseName}}) Dashboard", + "visualizations": [ + { "id": "newly-discovered-applications", "x": 0, "y": 0, "w": 3, "h": 14, "minW": 3, "minH": 15, "static": true}, + { "id": "top5-app-vertical-bar", "x": 3, "y": 0, "w": 5, "h": 14, "minW": 4, "minH": 10, "static": true}, + { "id": "number-of-apm-groups", "x": 8, "y": 0, "w": 2, "h": 7, "minW": 2, "minH": 7, "static": true}, + { "id": "number-of-applications", "x": 10, "y": 0, "w": 2, "h": 7, "minW": 2, "minH": 7, "static": true}, + { "id": "number-of-performance-monitors", "x": 8, "y": 7, "w": 2, "h": 7, "minW": 2, "minH": 7, "static": true}, + { "id": "number-of-npms", "x": 10, "y": 7, "w": 2, "h": 7, "minW": 2, "minH": 7, "static": true}, + { "id": "aar-slastatus-enterprise", "x": 0, "y": 14, "w": 3, "h": 14, "minW": 3, "minH": 14, "static": true}, + { "id": "top5-upload-users-table", "x": 3, "y": 14, "w": 9, "h": 14, "minW": 4, "minH": 14, "static": true}, + { "id": "top5-download-users-table", "x": 3, "y": 28, "w": 9, "h": 14, "minW": 4, "minH": 14, "static": true} + ], + "links": [ + { + "label": "Dashboard View", + "url": "/dashboards/aarEnterprise" + }, + { + "label": "Detail View", + "url": "/dashboards/aarEnterpriseDetail" + } + ] +} diff --git a/server/app/configurations/dashboards/aarEnterpriseDetail.json b/server/app/configurations/dashboards/aarEnterpriseDetail.json new file mode 100644 index 00000000..fca82c2e --- /dev/null +++ b/server/app/configurations/dashboards/aarEnterpriseDetail.json @@ -0,0 +1,21 @@ +{ + "id": "aarEnterpriseDetail", + "author": "Ronak Shah", + "creationDate": "09/29/2016", + "title": "AAR Enterprise({{enterpriseName}}) - L7Classification Detail", + "visualizations": [ + { "id": "top20-talkers-enterprise", "x": 0, "y": 0, "w": 12, "h": 15, "minW": 8, "minH": 12, "static": true}, + { "id": "top20-talkers-enterprise-defaultapp", "x": 0, "y": 15, "w": 12, "h": 15, "minW": 2, "minH": 12, "static": true}, + { "id": "app-specific-date-histogram", "x": 0, "y": 30, "w": 12, "h": 15, "minW": 8, "minH": 12, "static": true} + ], + "links": [ + { + "label": "Dashboard View", + "url": "/dashboards/aarEnterprise" + }, + { + "label": "Detail View", + "url": "/dashboards/aarEnterpriseDetail" + } + ] +} diff --git a/server/app/configurations/dashboards/aarNSG.json b/server/app/configurations/dashboards/aarNSG.json new file mode 100644 index 00000000..f62f8300 --- /dev/null +++ b/server/app/configurations/dashboards/aarNSG.json @@ -0,0 +1,39 @@ +{ + "id": "aarNSG", + "author": "Ronak Shah", + "creationDate": "10/26/2016", + "title": "AAR NSG ({{snsg}})", + "visualizations": [ + { "id": "aar-nsg-top10-app", "x": 0, "y": 0, "w": 6, "h": 15, "minW": 5, "minH": 10, "static": true}, + { "id": "aar-nsg-top5-talkers-upload", "x": 0, "y": 15, "w": 6, "h": 12, "minW": 5, "minH": 10, "static": true}, + { "id": "aar-nsg-top5-talkers-download", "x": 6, "y": 15, "w": 6, "h": 12, "minW": 5, "minH": 10, "static": true}, + { "id": "aar-nsg-app-linechart", "x": 6, "y": 0, "w": 6, "h": 15, "minW": 5, "minH": 10, "static": true} + ], + "links": [ + { + "label": "Dashboard View", + "url": "/dashboards/aarNSG" + }, + { + "label": "Detail View", + "url": "/dashboards/aarNSGDetail" + } + ], + "filterOptions": { + "Metric": { + "parameter": "metric", + "default": "TotalBytesCount", + "options": [ + { + "label": "TotalBytes", + "value": "TotalBytesCount", + "default": true + }, + { + "label": "TotalPackets", + "value": "TotalPacketsCount" + } + ] + } + } +} diff --git a/server/app/configurations/dashboards/aarNSGDetail.json b/server/app/configurations/dashboards/aarNSGDetail.json new file mode 100644 index 00000000..b563a30a --- /dev/null +++ b/server/app/configurations/dashboards/aarNSGDetail.json @@ -0,0 +1,22 @@ +{ + "id": "aarNSGDetail", + "author": "Ronak Shah", + "creationDate": "10/26/2016", + "title": "AAR NSG ({{snsg}})", + "visualizations": [ + { "id": "aar-nsg-app-from-nsg", "x": 0, "y": 0, "w": 6, "h": 15, "minW": 5, "minH": 12, "static": true}, + { "id": "aar-nsg-app-to-nsg", "x": 6, "y": 0, "w": 6, "h": 15, "minW": 5, "minH": 12, "static": true}, + { "id": "aar-nsg-sla-from-nsg", "x": 0, "y": 15, "w": 6, "h": 15, "minW": 5, "minH": 12, "static": true}, + { "id": "aar-nsg-sla-to-nsg", "x": 6, "y": 15, "w": 6, "h": 15, "minW": 5, "minH": 12, "static": true} + ], + "links": [ + { + "label": "Dashboard View", + "url": "/dashboards/aarNSG" + }, + { + "label": "Detail View", + "url": "/dashboards/aarNSGDetail" + } + ] +} diff --git a/server/app/configurations/dashboards/aarNetworkPerformance.json b/server/app/configurations/dashboards/aarNetworkPerformance.json new file mode 100644 index 00000000..772d4e0c --- /dev/null +++ b/server/app/configurations/dashboards/aarNetworkPerformance.json @@ -0,0 +1,22 @@ +{ + "id": "aarNetworkPerformance", + "author": "Christophe SERAFIN", + "creationDate": "01/24/2016", + "title": "AAR Network Performance", + "links": [ + { + "label": "Applications", + "url": "/dashboards/aarDomain" + }, + { + "label": "Network Performance", + "url": "/dashboards/aarNetworkPerformance" + } + ], + "visualizations": [ + { "id": "vsd-from-nsgs-table", "x": 0, "y": 0, "w": 6, "h": 12, "minW": 2, "minH": 12, "static": true}, + { "id": "vsd-to-nsgs-table", "x": 6, "y": 0, "w": 6, "h": 12, "minW": 2, "minH": 12, "static": true}, + { "id": "aar-domain-probe-table", "x": 0, "y": 15, "w": 6, "h": 15, "minW": 2, "minH": 12, "static": true}, + { "id": "aar-domain-probe-table-dest-to-src", "x": 6, "y": 15, "w": 6, "h": 15, "minW": 2, "minH": 12, "static": true} + ] +} diff --git a/server/app/configurations/dashboards/appsOverview.json b/server/app/configurations/dashboards/appsOverview.json new file mode 100644 index 00000000..bdab046a --- /dev/null +++ b/server/app/configurations/dashboards/appsOverview.json @@ -0,0 +1,9 @@ +{ + "id": "appsOverfiew", + "author": "Christophe Serafin and Curran Kelleher", + "creationDate": "09/29/2016", + "title": "Apps Overview Dashboard", + "visualizations": [ + { "id": "top5-app-vertical-bar", "x": 6, "y": 0, "w": 6, "h": 22, "minW": 2, "minH": 12 } + ] +} diff --git a/server/app/configurations/dashboards/dashboard2.json b/server/app/configurations/dashboards/dashboard2.json new file mode 100644 index 00000000..db451825 --- /dev/null +++ b/server/app/configurations/dashboards/dashboard2.json @@ -0,0 +1,10 @@ +{ + "id": "dashboard1", + "author": "Christophe SERAFIN", + "creationDate": "09/15/2016", + "title": "Dashboard 1 - The first and unique.", + "visualizations": [ + { "id": "newly-discovered-applications", "x": 6, "y": 0, "w": 6, "h": 22, "minW": 6, "minH": 22 }, + { "id": "newly-discovered-applications-with-circle", "x": 0, "y": 0, "w": 6, "h": 22, "minW": 6, "minH": 22 } + ] +} diff --git a/server/app/configurations/dashboards/dateHistogramExample.json b/server/app/configurations/dashboards/dateHistogramExample.json new file mode 100644 index 00000000..2afc2384 --- /dev/null +++ b/server/app/configurations/dashboards/dateHistogramExample.json @@ -0,0 +1,17 @@ +{ + "id": "dateHistogramExample", + "author": "Curran Kelleher", + "creationDate": "10/14/2016", + "title": "Date Histogram Example", + "visualizations": [ + { + "id": "app-specific-date-histogram", + "x": 0, + "y": 0, + "w": 12, + "h": 30, + "minW": 2, + "minH": 12 + } + ] +} diff --git a/server/app/configurations/dashboards/example.json b/server/app/configurations/dashboards/example.json new file mode 100644 index 00000000..c5464a50 --- /dev/null +++ b/server/app/configurations/dashboards/example.json @@ -0,0 +1,10 @@ +{ + "id": "kitchenSink", + "author": "Christophe SERAFIN", + "creationDate": "01/24/2016", + "title": "Example", + "visualizations": [ + { "id": "vsd-from-nsgs-table", "x": 0, "y": 0, "w": 6, "h": 12, "minW": 2, "minH": 12, "static": true}, + { "id": "vsd-to-nsgs-table", "x": 6, "y": 0, "w": 6, "h": 12, "minW": 2, "minH": 12, "static": true} + ] +} diff --git a/server/app/configurations/dashboards/kitchenSink.json b/server/app/configurations/dashboards/kitchenSink.json new file mode 100644 index 00000000..35b37cb9 --- /dev/null +++ b/server/app/configurations/dashboards/kitchenSink.json @@ -0,0 +1,108 @@ +{ + "id": "kitchenSink", + "author": "Curran Kelleher", + "creationDate": "10/13/2016", + "title": "Kitchen Sink", + "visualizations": [ + { + "id": "top5-app-vertical-bar", + "x": 0, + "y": 0, + "w": 3, + "h": 15, + "minW": 2, + "minH": 12 + }, + { + "id": "top5-app-horizontal-bar", + "x": 3, + "y": 0, + "w": 3, + "h": 15, + "minW": 2, + "minH": 12 + }, + { + "id": "top5-app-table", + "x": 6, + "y": 0, + "w": 6, + "h": 15, + "minW": 2, + "minH": 12 + }, + { + "id": "top5-app-pie", + "x": 0, + "y": 15, + "w": 3, + "h": 15, + "minW": 2, + "minH": 12 + }, + { + "id": "top5-app-donut", + "x": 3, + "y": 15, + "w": 3, + "h": 15, + "minW": 2, + "minH": 12 + }, + { + "id": "vss-domain-flow", + "x": 6, + "y": 15, + "w": 3, + "h": 15, + "minW": 2, + "minH": 12 + }, + { + "id": "vss-domain-flow-fixed-weight", + "x": 9, + "y": 15, + "w": 3, + "h": 15, + "minW": 2, + "minH": 12 + }, + { + "id": "effective-score", + "x": 0, + "y": 15, + "w": 3, + "h": 15, + "minW": 2, + "minH": 12 + }, + { + "id": "vss-domain-acl-time", + "x": 3, + "y": 15, + "w": 3, + "h": 15, + "minW": 2, + "minH": 12 + }, + { + "id": "aar-nsg-line-chart", + "x": 6, + "y": 15, + "w": 3, + "h": 15, + "minW": 2, + "minH": 12 + }, + { + "id": "aar-nsg-gauge-chart", + "x": 6, + "y": 15, + "w": 3, + "h": 15, + "minW": 2, + "minH": 12 + } + + ] +} diff --git a/server/app/configurations/dashboards/lineChartExample.json b/server/app/configurations/dashboards/lineChartExample.json new file mode 100644 index 00000000..ae21ec39 --- /dev/null +++ b/server/app/configurations/dashboards/lineChartExample.json @@ -0,0 +1,17 @@ +{ + "id": "lineChartExample", + "author": "Curran Kelleher", + "creationDate": "10/14/2016", + "title": "Line ChartExample", + "visualizations": [ + { + "id": "app-specific-line-chart", + "x": 0, + "y": 0, + "w": 12, + "h": 30, + "minW": 2, + "minH": 12 + } + ] +} diff --git a/server/app/configurations/dashboards/multi-line-test.json b/server/app/configurations/dashboards/multi-line-test.json new file mode 100644 index 00000000..b2b9f2f5 --- /dev/null +++ b/server/app/configurations/dashboards/multi-line-test.json @@ -0,0 +1,17 @@ +{ + "id": "multi-line-test", + "author": "Curran Kelleher", + "creationDate": "11/08/2016", + "title": "Test for Multi-Line Chart", + "visualizations": [ + { + "id": "aar-nsg-line-chart", + "x": 0, + "y": 0, + "w": 12, + "h": 30, + "minW": 2, + "minH": 12 + } + ] +} diff --git a/server/app/configurations/dashboards/tableExample.json b/server/app/configurations/dashboards/tableExample.json new file mode 100644 index 00000000..a8f14f81 --- /dev/null +++ b/server/app/configurations/dashboards/tableExample.json @@ -0,0 +1,9 @@ +{ + "id": "tableExample", + "author": "Curran Kelleher", + "creationDate": "10/10/2016", + "title": "Example Dashboard with Table", + "visualizations": [ + { "id": "top5-app-table", "x": 0, "y": 0, "w": 12, "h": 22, "minW": 2, "minH": 12 } + ] +} diff --git a/server/app/configurations/dashboards/vnf.json b/server/app/configurations/dashboards/vnf.json new file mode 100644 index 00000000..01604a3b --- /dev/null +++ b/server/app/configurations/dashboards/vnf.json @@ -0,0 +1,44 @@ +{ + "id": "vnf", + "author": "Ronak Shah", + "creationDate": "04/13/2017", + "title": "VNF", + "visualizations": [ + { + "id": "vnf-cpu-status", + "x": 0, + "y": 0, + "w": 2, + "h": 10, + "minW": 2, + "minH": 6 + }, + { + "id": "vnf-memory-status", + "x": 2, + "y": 0, + "w": 2, + "h": 10, + "minW": 2, + "minH": 6 + }, + { + "id": "vnf-disk-status", + "x": 4, + "y": 0, + "w": 2, + "h": 10, + "minW": 2, + "minH": 6 + }, + { + "id": "vnf-status-linechart", + "x": 0, + "y": 10, + "w": 6, + "h": 10, + "minW": 6, + "minH": 15 + } + ] +} diff --git a/server/app/configurations/dashboards/vssDomainACL.json b/server/app/configurations/dashboards/vssDomainACL.json new file mode 100644 index 00000000..2806eab0 --- /dev/null +++ b/server/app/configurations/dashboards/vssDomainACL.json @@ -0,0 +1,47 @@ +{ + "id": "vssDomainACL", + "author": "Ronak Shah", + "creationDate": "10/18/2016", + "title": "{{domainName:VSS Domain}} - ACL Analytics", + "visualizations": [ + { "id": "vss-domain-acl-time", "x": 0, "y": 0, "w": 6, "h": 15, "minW": 2, "minH": 12}, + { "id": "vss-domain-acl-spg", "x": 6, "y": 0, "w": 6, "h": 15, "minW": 2, "minH": 12}, + { "id": "vss-domain-acl-dpg", "x": 0, "y": 15, "w": 6, "h": 15, "minW": 2, "minH": 12}, + { "id": "vss-domain-acl-top5", "x": 6, "y": 15, "w": 6, "h": 15, "minW": 2, "minH": 12} + ], + "links": [ + { + "label": "Traffic Analytics", + "url": "/dashboards/vssDomainTraffic" + }, + { + "label": "Flow Analytics", + "url": "/dashboards/vssDomainFlow" + }, + { + "label": "Event Analytics", + "url": "/dashboards/vssDomainEvent" + }, + { + "label": "ACL Analytics", + "url": "/dashboards/vssDomainACL" + } + ], + "filterOptions": { + "ACL Action": { + "parameter": "actionType", + "default": "DENY", + "options": [ + { + "label": "Deny", + "value": "DENY", + "default": true + }, + { + "label": "Allow", + "value": "ALLOW" + } + ] + } + } +} diff --git a/server/app/configurations/dashboards/vssDomainEvent.json b/server/app/configurations/dashboards/vssDomainEvent.json new file mode 100644 index 00000000..0045c9d9 --- /dev/null +++ b/server/app/configurations/dashboards/vssDomainEvent.json @@ -0,0 +1,28 @@ +{ + "id": "vssDomainEvent", + "author": "Ronak Shah", + "creationDate": "10/18/2016", + "title": "{{domainName:VSS Domain}} - Event Analytics", + "visualizations": [ + { "id": "vss-domain-events-by-type", "x": 0, "y": 0, "w": 6, "h": 15, "minW": 2, "minH": 12}, + { "id": "vss-domain-events-detail", "x": 6, "y": 0, "w": 6, "h": 15, "minW": 2, "minH": 12} + ], + "links": [ + { + "label": "Traffic Analytics", + "url": "/dashboards/vssDomainTraffic" + }, + { + "label": "Flow Analytics", + "url": "/dashboards/vssDomainFlow" + }, + { + "label": "Event Analytics", + "url": "/dashboards/vssDomainEvent" + }, + { + "label": "ACL Analytics", + "url": "/dashboards/vssDomainACL" + } + ] +} diff --git a/server/app/configurations/dashboards/vssDomainFlow.json b/server/app/configurations/dashboards/vssDomainFlow.json new file mode 100644 index 00000000..ea614271 --- /dev/null +++ b/server/app/configurations/dashboards/vssDomainFlow.json @@ -0,0 +1,92 @@ +{ + "id": "vssDomainFlow", + "author": "Ronak Shah", + "creationDate": "11/02/2016", + "title": "{{domainName:VSS Domain}} - Flow Visualization", + "visualizations": [ + { "id": "vss-domain-flow", "x": 1, "y": 0, "w": 5, "h": 25, "minW": 2, "minH": 12}, + { "id": "vss-domain-flow-table", "x": 6, "y": 0, "w": 5, "h": 25, "minW": 2 , "minH": 12} + ], + "links": [ + { + "label": "Traffic Analytics", + "url": "/dashboards/vssDomainTraffic" + }, + { + "label": "Flow Analytics", + "url": "/dashboards/vssDomainFlow" + }, + { + "label": "Event Analytics", + "url": "/dashboards/vssDomainEvent" + }, + { + "label": "ACL Analytics", + "url": "/dashboards/vssDomainACL" + } + ], + "filterOptions": { + "Source Field": { + "parameter": "source_field", + "default": "pg", + "options": [ + { + "label": "Endpoint's Domain", + "value": "endpoint-domain" + }, + { + "label": "Endpoint's Subnet", + "value": "endpoint-subnet" + }, + { + "label": "Endpoint's Zone", + "value": "endpoint-zone" + }, + { + "label": "Subnet", + "value": "subnet" + }, + { + "label": "Zone", + "value": "zone" + }, + { + "label": "PG", + "value": "pg", + "default": true + } + ] + }, + "Destination Field": { + "parameter": "destination_field", + "default": "pg", + "options": [ + { + "label": "Endpoint's Domain", + "value": "endpoint-domain" + }, + { + "label": "Endpoint's Subnet", + "value": "endpoint-subnet" + }, + { + "label": "Endpoint's Zone", + "value": "endpoint-zone" + }, + { + "label": "Subnet", + "value": "subnet" + }, + { + "label": "Zone", + "value": "zone" + }, + { + "label": "PG", + "value": "pg", + "default": true + } + ] + } + } +} diff --git a/server/app/configurations/dashboards/vssDomainTraffic.json b/server/app/configurations/dashboards/vssDomainTraffic.json new file mode 100644 index 00000000..acec9e0d --- /dev/null +++ b/server/app/configurations/dashboards/vssDomainTraffic.json @@ -0,0 +1,49 @@ +{ + "id": "vssDomainTraffic1", + "author": "Ronak Shah", + "creationDate": "10/18/2016", + "title": "{{domainName:VSS Domain}} - Traffic Analytics", + "visualizations": [ + { "id": "vss-domain-traffic-tcp-conn", "x": 0, "y": 0, "w": 6, "h": 15, "minW": 2, "minH": 12}, + { "id": "vss-domain-traffic-udp", "x": 6, "y": 0, "w": 6, "h": 15, "minW": 2, "minH": 12}, + { "id": "vss-domain-traffic-icmp", "x": 0, "y": 15, "w": 6, "h": 15, "minW": 2, "minH": 12}, + { "id": "vss-domain-traffic-tcp-syn", "x": 6, "y": 15, "w": 6, "h": 15, "minW": 2, "minH": 12}, + { "id": "vss-domain-traffic-top-spg", "x": 0, "y": 35, "w": 6, "h": 15, "minW": 2, "minH": 12}, + { "id": "vss-domain-traffic-top-dpg", "x": 6, "y": 30, "w": 6, "h": 15, "minW": 2, "minH": 12} + ], + "links": [ + { + "label": "Traffic Analytics", + "url": "/dashboards/vssDomainTraffic" + }, + { + "label": "Flow Analytics", + "url": "/dashboards/vssDomainFlow" + }, + { + "label": "Event Analytics", + "url": "/dashboards/vssDomainEvent" + }, + { + "label": "ACL Analytics", + "url": "/dashboards/vssDomainACL" + } + ], + "filterOptions": { + "Action": { + "parameter": "actionType", + "default": "ALLOW", + "options": [ + { + "label": "Deny", + "value": "DENY", + "default": true + }, + { + "label": "Allow", + "value": "ALLOW" + } + ] + } + } +} diff --git a/server/app/configurations/dashboards/vssEnterprise.json b/server/app/configurations/dashboards/vssEnterprise.json new file mode 100644 index 00000000..e720cf7d --- /dev/null +++ b/server/app/configurations/dashboards/vssEnterprise.json @@ -0,0 +1,16 @@ +{ + "id": "vssEnterprise", + "author": "Ronak Shah", + "creationDate": "10/17/2016", + "title": "VSS Dashboard - Enterprise {{enterpriseName:...}}", + "visualizations": [ + { "id": "vss-enterprise-alerts-metric", "x": 1, "y": 0, "w": 2, "h": 5, "minW": 2, "minH": 5, "static": true}, + { "id": "vss-enterprise-acldeny-metric", "x": 3, "y": 0, "w": 2, "h": 5, "minW": 2, "minH": 5, "static": true}, + { "id": "vss-enterprise-events-metric", "x": 5, "y": 0, "w": 2, "h": 5, "minW": 2, "minH": 5, "static": true}, + { "id": "vss-enterprise-flows-metric", "x": 7, "y": 0, "w": 2, "h": 5, "minW": 2, "minH": 5, "static": true}, + { "id": "vss-enterprise-pg-metric", "x": 9, "y": 0, "w": 2, "h": 5, "minW": 2, "minH": 5, "static": true}, + { "id": "vss-ent-acldeny-time", "x": 0, "y": 2, "w": 6, "h": 15, "minW": 2, "minH": 12 }, + { "id": "vss-top-domains-blocked-traffic", "x": 6, "y": 2, "w": 6, "h": 15, "minW": 2, "minH": 12}, + { "id": "vss-top-sec-events", "x": 0, "y": 17, "w": 6, "h": 15, "minW": 2, "minH": 12} + ] +} diff --git a/server/app/configurations/queries/aar-default-app-l7.json b/server/app/configurations/queries/aar-default-app-l7.json new file mode 100644 index 00000000..c8c1a738 --- /dev/null +++ b/server/app/configurations/queries/aar-default-app-l7.json @@ -0,0 +1,54 @@ +{ + "id":"aar-default-app-l7", + "title":"Distinct L7 count in Default Application", + "service":"elasticsearch", + "query":{ + "index":"{{index:nuage_dpi_flowstats}}", + "type":"{{type:nuage_doc_type}}", + "body":{ + "size":0, + "query":{ + "bool":{ + "must":[ + { + "range":{ + "timestamp":{ + "gte":"{{startTime:now-24h}}", + "lte":"{{endTime:now}}", + "format":"epoch_millis" + } + } + }, + { + "term":{ + "Application":"Default Application" + } + } + ] + } + }, + "aggs": { + "2": { + "filters":{ + "filters":{ + "Enterprise":{ + "query":{ + "term":{ + "EnterpriseName":"{{enterpriseName:test_organization}}" + } + } + } + } + }, + "aggs": { + "l7_count": { + "cardinality": { + "field":"L7Classification" + } + } + } + } + } + } + } +} diff --git a/server/app/configurations/queries/aar-domain-probe-path.json b/server/app/configurations/queries/aar-domain-probe-path.json new file mode 100644 index 00000000..5343d422 --- /dev/null +++ b/server/app/configurations/queries/aar-domain-probe-path.json @@ -0,0 +1,71 @@ +{ + "id":"aar-domain-probe-path", + "title":"TBD", + "service":"elasticsearch", + "query":{ + "index":"{{index:nuage_dpi_probestats}}", + "type":"{{type:nuage_doc_type}}", + "body":{ + "size":0, + "query":{ + "bool":{ + "must":[ + { + "range":{ + "timestamp":{ + "gte":"{{startTime:now-24h}}", + "lte":"{{endTime:now}}", + "format":"epoch_millis" + } + } + } + ] + } + }, + "aggs":{ + "snsg":{ + "terms":{ + "field":"SourceNSG", + "size":5, + "order":{ + "_count":"desc" + } + }, + "aggs":{ + "suplink":{ + "terms":{ + "field":"SrcUplink", + "size":5, + "order":{ + "_count":"desc" + } + }, + "aggs":{ + "dnsg":{ + "terms":{ + "field":"DestinationNSG", + "size":5, + "order":{ + "_count":"desc" + } + }, + "aggs":{ + "duplink":{ + "terms":{ + "field":"DstUplink", + "size":5, + "order":{ + "_count":"desc" + } + } + } + } + } + } + } + } + } + } + } + } +} diff --git a/server/app/configurations/queries/aar-domain-probe-table-dest-to-src.json b/server/app/configurations/queries/aar-domain-probe-table-dest-to-src.json new file mode 100644 index 00000000..22d32299 --- /dev/null +++ b/server/app/configurations/queries/aar-domain-probe-table-dest-to-src.json @@ -0,0 +1,41 @@ +{ + "id":"aar-domain-probe-table", + "title":"aar domain probe table", + "service":"elasticsearch", + "query":{ + "index":"{{index:nuage_dpi_probestats}}", + "type":"{{type:nuage_doc_type}}", + "body":{ + "sort": [ + { "timestamp": { "order": "desc" } } + ], + "query": { + "bool": { + "should": [ + { + "bool": { + "must": [ + { + "term": + {"SourceNSG": "{{dnsg}}"} + }, + { + "term": {"DestinationNSG": "{{snsg}}"} + }, + { "range": { + "timestamp": { + "gte": "{{startTime:now-24h}}", + "lte": "{{endTime:now}}", + "format":"epoch_millis" + } + } + } + ] + } + } + ] + } + } + } + } +} diff --git a/server/app/configurations/queries/aar-domain-probe-table.json b/server/app/configurations/queries/aar-domain-probe-table.json new file mode 100644 index 00000000..35ab4909 --- /dev/null +++ b/server/app/configurations/queries/aar-domain-probe-table.json @@ -0,0 +1,41 @@ +{ + "id":"aar-domain-probe-table", + "title":"aar domain probe table", + "service":"elasticsearch", + "query":{ + "index":"{{index:nuage_dpi_probestats}}", + "type":"{{type:nuage_doc_type}}", + "body":{ + "sort": [ + { "timestamp": { "order": "desc" } } + ], + "query": { + "bool": { + "should": [ + { + "bool": { + "must": [ + { + "term": + {"SourceNSG": "{{snsg}}" } + }, + { "term": + {"DestinationNSG": "{{dnsg}}"} + }, + { "range": { + "timestamp": { + "gte": "{{startTime:now-24h}}", + "lte": "{{endTime:now}}", + "format":"epoch_millis" + } + } + } + ] + } + } + ] + } + } + } + } +} diff --git a/server/app/configurations/queries/aar-domain-top5-apmg.json b/server/app/configurations/queries/aar-domain-top5-apmg.json new file mode 100644 index 00000000..ca38ff83 --- /dev/null +++ b/server/app/configurations/queries/aar-domain-top5-apmg.json @@ -0,0 +1,80 @@ +{ + "id":"aar-domain-top5-apmg", + "title":"TBD", + "service":"elasticsearch", + "query":{ + "index":"{{index:nuage_dpi_flowstats}}", + "type":"{{type:nuage_doc_type}}", + "body":{ + "size":0, + "query":{ + "bool":{ + "must":[ + { + "range":{ + "timestamp":{ + "gte":"{{startTime:now-24h}}", + "lte":"{{endTimeTime:now}}", + "format":"epoch_millis" + } + } + } + ] + } + }, + "aggs":{ + "3":{ + "filters":{ + "filters":{ + "Enterprise":{ + "query":{ + "term":{ + "EnterpriseName":"{{enterpriseName:test_org}}" + } + } + } + } + }, + "aggs":{ + "4":{ + "filters":{ + "filters":{ + "Domain":{ + "query":{ + "term":{ + "Domain":"{{domainName:Domain1}}" + } + } + } + } + }, + "aggs":{ + "Sum of MB":{ + "sum":{ + "field":"TotalMB" + } + }, + "APMGroup":{ + "terms":{ + "field":"APMGroup", + "size":5, + "order":{ + "Sum of MB":"desc" + } + }, + "aggs":{ + "Sum of MB":{ + "sum":{ + "field":"TotalMB" + } + } + } + } + } + } + } + } + } + } + } +} diff --git a/server/app/configurations/queries/aar-flow-sla-heatmap.json b/server/app/configurations/queries/aar-flow-sla-heatmap.json new file mode 100644 index 00000000..9aab75f6 --- /dev/null +++ b/server/app/configurations/queries/aar-flow-sla-heatmap.json @@ -0,0 +1,62 @@ +{ + "id": "aar-flow-sla-heatmap", + "title": "Flows Sla HeatMap", + "service": "elasticsearch", + "query": { + "index": "{{index:nuage_dpi_flowstats}}", + "type": "{{type:nuage_doc_type}}", + "body": { + "size": 0, + "sort": [ + { + "timestamp": { + "order": "desc" + } + } + ], + "query": { + "bool": { + "must": [ + { + "range": { + "timestamp": { + "gte":"{{startTime:now-24h}}", + "lte":"{{endTimeTime:now}}", + "format": "epoch_millis" + } + } + } + ], + "filter": { + "term": { + "SourceNSG": "{{snsg:ovs-1}}" + } + } + } + }, + "aggs": { + "date_histo": { + "date_histogram": { + "field": "timestamp", + "interval": "{{interval:1h}}" + }, + "aggs": { + "application": { + "terms": { + "field": "Application" + }, + "aggs": { + "slastatus": { + "terms": { + "size": 1, + "field": "SlaStatus" + } + } + } + } + } + } + } + } + } +} diff --git a/server/app/configurations/queries/aar-nsg-app-from-nsg.json b/server/app/configurations/queries/aar-nsg-app-from-nsg.json new file mode 100644 index 00000000..d0cf5e84 --- /dev/null +++ b/server/app/configurations/queries/aar-nsg-app-from-nsg.json @@ -0,0 +1,216 @@ +{ + "id":"aar-nsg-app-from-nsg", + "title":"TBD", + "service":"elasticsearch", + "query":{ + "index":"{{index:nuage_dpi_flowstats}}", + "type":"{{type:nuage_doc_type}}", + "body":{ + "size":0, + "query":{ + "bool":{ + "must":[ + { + "range":{ + "timestamp":{ + "gte":"{{startTime:now-24h}}", + "lte":"{{endTimeTime:now}}", + "format":"epoch_millis" + } + } + } + ] + } + }, + "aggs":{ + "12":{ + "filters":{ + "filters":{ + "Enterprise":{ + "query":{ + "term":{ + "EnterpriseName":"{{enterpriseName:test_organization}}" + } + } + } + } + }, + "aggs": { + "11": { + "filters": { + "filters": { + "SourceNSG": { + "query": { + "term": { + "SourceNSG": "{{snsg:default}}" + } + } + } + } + }, + "aggs": { + "SumofBytes": { + "sum": { + "field": "TotalBytesCount" + } + }, + "SumofPackets": { + "sum": { + "field": "TotalPacketsCount" + } + }, + "APMGroup": { + "terms": { + "field": "APMGroup", + "size": 5, + "order": { + "SumofBytes": "desc" + } + }, + "aggs": { + "SumofBytes": { + "sum": { + "field": "TotalBytesCount" + } + }, + "SumofPackets": { + "sum": { + "field": "TotalPacketsCount" + } + }, + "Application": { + "terms": { + "field": "Application", + "size": 5, + "order": { + "SumofBytes": "desc" + } + }, + "aggs": { + "SumofBytes": { + "sum": { + "field": "TotalBytesCount" + } + }, + "SumofPackets": { + "sum": { + "field": "TotalPacketsCount" + } + }, + "L7Classification": { + "terms": { + "field": "L7ClassEnhanced", + "size": 5, + "order": { + "SumofBytes": "desc" + } + }, + "aggs": { + "SumofBytes": { + "sum": { + "field": "TotalBytesCount" + } + }, + "SumofPackets": { + "sum": { + "field": "TotalPacketsCount" + } + }, + "SrcVportName": { + "terms": { + "field": "SrcVportName", + "size": 5, + "order": { + "SumofBytes": "desc" + } + }, + "aggs": { + "SumofBytes": { + "sum": { + "field": "TotalBytesCount" + } + }, + "SumofPackets": { + "sum": { + "field": "TotalPacketsCount" + } + }, + "SrcUplink": { + "terms": { + "field": "SrcUplink", + "size": 5, + "order": { + "SumofBytes": "desc" + } + }, + "aggs": { + "SumofBytes": { + "sum": { + "field": "TotalBytesCount" + } + }, + "SumofPackets": { + "sum": { + "field": "TotalPacketsCount" + } + }, + "SrcUplinkRole": { + "terms": { + "field": "SrcUplinkRole", + "size": 5, + "order": { + "SumofBytes": "desc" + } + }, + "aggs": { + "SumofBytes": { + "sum": { + "field": "TotalBytesCount" + } + }, + "SumofPackets": { + "sum": { + "field": "TotalPacketsCount" + } + }, + "DestinationNSG": { + "terms": { + "field": "DestinationNSG", + "size": 5, + "order": { + "SumofBytes": "desc" + } + }, + "aggs": { + "SumofBytes": { + "sum": { + "field": "TotalBytesCount" + } + }, + "SumofPackets": { + "sum": { + "field": "TotalPacketsCount" + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } +} diff --git a/server/app/configurations/queries/aar-nsg-app-linechart.json b/server/app/configurations/queries/aar-nsg-app-linechart.json new file mode 100644 index 00000000..c4bf49e2 --- /dev/null +++ b/server/app/configurations/queries/aar-nsg-app-linechart.json @@ -0,0 +1,83 @@ +{ + "id":"aar-nsg-app-linechart", + "title":"TBD", + "service":"elasticsearch", + "query":{ + "index":"{{index:nuage_dpi_flowstats}}", + "type":"{{type:nuage_doc_type}}", + "body":{ + "size":0, + "query":{ + "bool":{ + "must":[ + { + "range":{ + "timestamp":{ + "gte":"{{startTime:now-24h}}", + "lte":"{{endTime:now}}", + "format":"epoch_millis" + } + } + } + ] + } + }, + "aggs":{ + "5":{ + "filters":{ + "filters":{ + "Enterprise":{ + "query":{ + "term":{ + "EnterpriseName":"{{enterpriseName:test_organization}}" + } + } + } + } + }, + "aggs": { + "4": { + "filters": { + "filters": { + "SourceNSG": { + "query": { + "term": { + "SourceNSG": "{{snsg:default}}" + } + } + } + } + }, + "aggs": { + "ts": { + "date_histogram": { + "field": "timestamp", + "interval": "{{interval:1h}}" + }, + "aggs": { + "L7Classification": { + "terms": { + "field": "L7ClassEnhanced", + "size": 5, + "order": { + "SumOf": "desc" + } + }, + "aggs": { + "SumOf": { + "sum": { + "field": "{{metric:TotalBytesCount}}" + } + } + } + } + } + } + } + } + } + } + } + } + } +} diff --git a/server/app/configurations/queries/aar-nsg-app-to-nsg.json b/server/app/configurations/queries/aar-nsg-app-to-nsg.json new file mode 100644 index 00000000..c86f5425 --- /dev/null +++ b/server/app/configurations/queries/aar-nsg-app-to-nsg.json @@ -0,0 +1,216 @@ +{ + "id":"aar-nsg-app-to-nsg", + "title":"TBD", + "service":"elasticsearch", + "query":{ + "index":"{{index:nuage_dpi_flowstats}}", + "type":"{{type:nuage_doc_type}}", + "body":{ + "size":0, + "query":{ + "bool":{ + "must":[ + { + "range":{ + "timestamp":{ + "gte":"{{startTime:now-24h}}", + "lte":"{{endTimeTime:now}}", + "format":"epoch_millis" + } + } + } + ] + } + }, + "aggs":{ + "12":{ + "filters":{ + "filters":{ + "Enterprise":{ + "query":{ + "term":{ + "EnterpriseName":"{{enterpriseName:test_organization}}" + } + } + } + } + }, + "aggs": { + "11": { + "filters": { + "filters": { + "DestinationNSG": { + "query": { + "term": { + "DestinationNSG": "{{snsg:default}}" + } + } + } + } + }, + "aggs": { + "SumofBytes": { + "sum": { + "field": "TotalBytesCount" + } + }, + "SumofPackets": { + "sum": { + "field": "TotalPacketsCount" + } + }, + "APMGroup": { + "terms": { + "field": "APMGroup", + "size": 5, + "order": { + "SumofBytes": "desc" + } + }, + "aggs": { + "SumofBytes": { + "sum": { + "field": "TotalBytesCount" + } + }, + "SumofPackets": { + "sum": { + "field": "TotalPacketsCount" + } + }, + "Application": { + "terms": { + "field": "Application", + "size": 5, + "order": { + "SumofBytes": "desc" + } + }, + "aggs": { + "SumofBytes": { + "sum": { + "field": "TotalBytesCount" + } + }, + "SumofPackets": { + "sum": { + "field": "TotalPacketsCount" + } + }, + "L7Classification": { + "terms": { + "field": "L7ClassEnhanced", + "size": 5, + "order": { + "SumofBytes": "desc" + } + }, + "aggs": { + "SumofBytes": { + "sum": { + "field": "TotalBytesCount" + } + }, + "SumofPackets": { + "sum": { + "field": "TotalPacketsCount" + } + }, + "DestVportName": { + "terms": { + "field": "DestVportName", + "size": 5, + "order": { + "SumofBytes": "desc" + } + }, + "aggs": { + "SumofBytes": { + "sum": { + "field": "TotalBytesCount" + } + }, + "SumofPackets": { + "sum": { + "field": "TotalPacketsCount" + } + }, + "DstUplink": { + "terms": { + "field": "DstUplink", + "size": 5, + "order": { + "SumofBytes": "desc" + } + }, + "aggs": { + "SumofBytes": { + "sum": { + "field": "TotalBytesCount" + } + }, + "SumofPackets": { + "sum": { + "field": "TotalPacketsCount" + } + }, + "DstUplinkRole": { + "terms": { + "field": "DstUplinkRole", + "size": 5, + "order": { + "SumofBytes": "desc" + } + }, + "aggs": { + "SumofBytes": { + "sum": { + "field": "TotalBytesCount" + } + }, + "SumofPackets": { + "sum": { + "field": "TotalPacketsCount" + } + }, + "DestinationNSG": { + "terms": { + "field": "DestinationNSG", + "size": 5, + "order": { + "SumofBytes": "desc" + } + }, + "aggs": { + "SumofBytes": { + "sum": { + "field": "TotalBytesCount" + } + }, + "SumofPackets": { + "sum": { + "field": "TotalPacketsCount" + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } +} diff --git a/server/app/configurations/queries/aar-nsg-sla-from-nsg.json b/server/app/configurations/queries/aar-nsg-sla-from-nsg.json new file mode 100644 index 00000000..a2fc334c --- /dev/null +++ b/server/app/configurations/queries/aar-nsg-sla-from-nsg.json @@ -0,0 +1,97 @@ +{ + "id":"aar-nsg-sla-from-nsg", + "title":"TBD", + "service":"elasticsearch", + "query":{ + "index":"{{index:nuage_dpi_slastats}}", + "type":"{{type:nuage_doc_type}}", + "body":{ + "size":0, + "query":{ + "bool":{ + "must":[ + { + "range":{ + "timestamp":{ + "gte":"{{startTime:now-24h}}", + "lte":"{{endTimeTime:now}}", + "format":"epoch_millis" + } + } + } + ] + } + }, + "aggs": { + "11": { + "filters": { + "filters": { + "SourceNSG": { + "query": { + "term": { + "SourceNSG": "{{snsg:default}}" + } + } + } + } + }, + "aggs": { + "ts": { + "terms": { + "field": "timestamp", + "size": 10, + "order": { + "_count": "desc" + } + }, + "aggs": { + "DestinationNSG": { + "terms": { + "field": "DestinationNSG", + "size": 10, + "order": { + "_count": "desc" + } + }, + "aggs": { + "Application": { + "terms": { + "field": "Application", + "size": 10, + "order": { + "_count": "desc" + } + }, + "aggs": { + "APMGroup": { + "terms": { + "field": "APMGroup", + "size": 10, + "order": { + "_count": "desc" + } + }, + "aggs": { + "ViolationType": { + "terms": { + "field": "ViolationType", + "size": 10, + "order": { + "_count": "desc" + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } +} diff --git a/server/app/configurations/queries/aar-nsg-sla-to-nsg.json b/server/app/configurations/queries/aar-nsg-sla-to-nsg.json new file mode 100644 index 00000000..1eea56cc --- /dev/null +++ b/server/app/configurations/queries/aar-nsg-sla-to-nsg.json @@ -0,0 +1,97 @@ +{ + "id":"aar-nsg-sla-to-nsg", + "title":"TBD", + "service":"elasticsearch", + "query":{ + "index":"{{index:nuage_dpi_slastats}}", + "type":"{{type:nuage_doc_type}}", + "body":{ + "size":0, + "query":{ + "bool":{ + "must":[ + { + "range":{ + "timestamp":{ + "gte":"{{startTime:now-24h}}", + "lte":"{{endTimeTime:now}}", + "format":"epoch_millis" + } + } + } + ] + } + }, + "aggs": { + "11": { + "filters": { + "filters": { + "DestinationNSG": { + "query": { + "term": { + "DestinationNSG": "{{snsg:default}}" + } + } + } + } + }, + "aggs": { + "ts": { + "terms": { + "field": "timestamp", + "size": 10, + "order": { + "_count": "desc" + } + }, + "aggs": { + "SourceNSG": { + "terms": { + "field": "SourceNSG", + "size": 10, + "order": { + "_count": "desc" + } + }, + "aggs": { + "Application": { + "terms": { + "field": "Application", + "size": 10, + "order": { + "_count": "desc" + } + }, + "aggs": { + "APMGroup": { + "terms": { + "field": "APMGroup", + "size": 10, + "order": { + "_count": "desc" + } + }, + "aggs": { + "ViolationType": { + "terms": { + "field": "ViolationType", + "size": 10, + "order": { + "_count": "desc" + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } +} diff --git a/server/app/configurations/queries/aar-nsg-top10-app.json b/server/app/configurations/queries/aar-nsg-top10-app.json new file mode 100644 index 00000000..810d5dab --- /dev/null +++ b/server/app/configurations/queries/aar-nsg-top10-app.json @@ -0,0 +1,75 @@ +{ + "id":"aar-nsg-top10-app", + "title":"Top 10 App per NSG", + "service":"elasticsearch", + "query":{ + "index":"{{index:nuage_dpi_flowstats}}", + "type":"{{type:nuage_doc_type}}", + "body":{ + "size": 0, + "query":{ + "bool":{ + "must":[ + { + "range":{ + "timestamp":{ + "gte":"{{startTime:now-24h}}", + "lte":"{{endTime:now}}", + "format":"epoch_millis" + } + } + } + ] + } + }, + "aggs":{ + "4":{ + "filters":{ + "filters":{ + "Enterprise":{ + "query":{ + "term":{ + "EnterpriseName":"{{enterpriseName:test_organization}}" + } + } + } + } + }, + "aggs":{ + "3":{ + "filters":{ + "filters":{ + "SourceNSG":{ + "query":{ + "term":{ + "SourceNSG":"{{snsg:ovs-114}}" + } + } + } + } + }, + "aggs":{ + "Application":{ + "terms":{ + "field":"Application", + "size":10, + "order":{ + "Sum of MB":"desc" + } + }, + "aggs":{ + "Sum of MB":{ + "sum":{ + "field":"TotalMB" + } + } + } + } + } + } + } + } + } + } + } +} diff --git a/server/app/configurations/queries/aar-nsg-top5-talkers-download.json b/server/app/configurations/queries/aar-nsg-top5-talkers-download.json new file mode 100644 index 00000000..2467f278 --- /dev/null +++ b/server/app/configurations/queries/aar-nsg-top5-talkers-download.json @@ -0,0 +1,91 @@ +{ + "id":"aar-nsgtop5-talkers-download", + "title":"Top 5 talkers (download) per NSG", + "service":"elasticsearch", + "query":{ + "index":"{{index:nuage_dpi_flowstats}}", + "type":"{{type:nuage_doc_type}}", + "body":{ + "size":0, + "query":{ + "bool":{ + "must":[ + { + "range":{ + "timestamp":{ + "gte":"{{startTime:now-24h}}", + "lte":"{{endTime:now}}", + "format":"epoch_millis" + } + } + }, + { + "term":{ + "IngressBytes": 0 + } + } + ] + } + }, + "aggs":{ + "5":{ + "filters":{ + "filters":{ + "DestinationNSG":{ + "query":{ + "term":{ + "DestinationNSG":"{{snsg:ovs-114}}" + } + } + } + } + }, + "aggs":{ + "DestinationIP":{ + "terms":{ + "field":"DstIp", + "size":5, + "order":{ + "Bytes":"desc" + } + }, + "aggs":{ + "Packets":{ + "sum":{ + "field":"EgressPackets" + } + }, + "Bytes":{ + "sum":{ + "field":"EgressBytes" + } + }, + "DomainName":{ + "terms":{ + "field":"Domain", + "size":5, + "order":{ + "Bytes":"desc" + } + }, + "aggs":{ + "Packets":{ + "sum":{ + "field":"EgressPackets" + } + }, + "Bytes":{ + "sum":{ + "field":"EgressBytes" + } + } + } + } + } + } + } + } + } + } + } +} diff --git a/server/app/configurations/queries/aar-nsg-top5-talkers-upload.json b/server/app/configurations/queries/aar-nsg-top5-talkers-upload.json new file mode 100644 index 00000000..7fc26f35 --- /dev/null +++ b/server/app/configurations/queries/aar-nsg-top5-talkers-upload.json @@ -0,0 +1,91 @@ +{ + "id":"aar-nsgtop5-talkers-upload", + "title":"Top 5 talkers (upload) per NSG", + "service":"elasticsearch", + "query":{ + "index":"{{index:nuage_dpi_flowstats}}", + "type":"{{type:nuage_doc_type}}", + "body":{ + "size":0, + "query":{ + "bool":{ + "must":[ + { + "range":{ + "timestamp":{ + "gte":"{{startTime:now-24h}}", + "lte":"{{endTime:now}}", + "format":"epoch_millis" + } + } + }, + { + "term":{ + "EgressBytes":0 + } + } + ] + } + }, + "aggs":{ + "5":{ + "filters":{ + "filters":{ + "SourceNSG":{ + "query":{ + "term":{ + "SourceNSG":"{{snsg:ovs-114}}" + } + } + } + } + }, + "aggs":{ + "SourceIP":{ + "terms":{ + "field":"SrcIp", + "size":5, + "order":{ + "Bytes":"desc" + } + }, + "aggs":{ + "Packets":{ + "sum":{ + "field":"IngressPackets" + } + }, + "Bytes":{ + "sum":{ + "field":"IngressBytes" + } + }, + "DomainName":{ + "terms":{ + "field":"Domain", + "size":5, + "order":{ + "Bytes":"desc" + } + }, + "aggs":{ + "Packets":{ + "sum":{ + "field":"IngressPackets" + } + }, + "Bytes":{ + "sum":{ + "field":"IngressBytes" + } + } + } + } + } + } + } + } + } + } + } +} diff --git a/server/app/configurations/queries/aar-slastatus-enterprise.json b/server/app/configurations/queries/aar-slastatus-enterprise.json new file mode 100644 index 00000000..52090a56 --- /dev/null +++ b/server/app/configurations/queries/aar-slastatus-enterprise.json @@ -0,0 +1,50 @@ +{ + "id":"slaStatus-PieChart-Enterprise", + "title":"SLA Status per Enterprise", + "service":"elasticsearch", + "query":{ + "index":"{{index:nuage_dpi_flowstats}}", + "type":"{{type:nuage_doc_type}}", + "body":{ + "size":0, + "query":{ + "bool":{ + "must":[ + { + "range":{ + "timestamp":{ + "gte":"{{startTime:now-24h}}", + "lte":"{{endTime:now}}", + "format":"epoch_millis" + } + } + } + ] + } + }, + "aggs":{ + "1":{ + "filters":{ + "filters":{ + "Enterprise":{ + "query":{ + "term":{ + "EnterpriseName":"{{enterpriseName:test_org}}" + } + } + } + } + }, + "aggs":{ + "slastatus":{ + "terms":{ + "field":"SlaStatus" + } + } + } + } + } + } + } +} + diff --git a/server/app/configurations/queries/app-specific-vertical-bar.json b/server/app/configurations/queries/app-specific-vertical-bar.json new file mode 100644 index 00000000..70c1863a --- /dev/null +++ b/server/app/configurations/queries/app-specific-vertical-bar.json @@ -0,0 +1,57 @@ +{ + "id":"app-specific-vertical-bar", + "title":"App Specific Vertical Bar", + "service":"elasticsearch", + "query":{ + "index":"{{index:nuage_dpi_flowstats}}", + "type":"{{type:nuage_doc_type}}", + "body":{ + "size":0, + "query":{ + "bool":{ + "must":[ + { + "range":{ + "timestamp":{ + "gte":"{{startTime:now-24h}}", + "lte":"{{endTime:now}}", + "format":"epoch_millis" + } + } + } + ] + } + }, + "aggs":{ + "4":{ + "filters":{ + "filters":{ + "L7Classification":{ + "query":{ + "term":{ + "L7ClassEnhanced":"{{app}}" + } + } + } + } + }, + "aggs":{ + "date-histo":{ + "date_histogram":{ + "field":"timestamp", + "interval":"{{interval:1h}}" + }, + "aggs":{ + "SumOfBytes":{ + "sum":{ + "field":"TotalBytesCount" + } + } + } + } + } + } + } + } + } +} diff --git a/server/app/configurations/queries/connectivity-score-part1-download.json b/server/app/configurations/queries/connectivity-score-part1-download.json new file mode 100644 index 00000000..56238fba --- /dev/null +++ b/server/app/configurations/queries/connectivity-score-part1-download.json @@ -0,0 +1,45 @@ +{ + "id":"connectivity-score-part1-download", + "title":"TBD", + "service":"elasticsearch", + "query":{ + "size":0, + "query":{ + "bool":{ + "must":[ + { + "range":{ + "timestamp":{ + "gte":"now-1y", + "lte":"now", + "format":"epoch_millis" + } + } + } + ] + } + }, + "aggs":{ + "5":{ + "filters":{ + "filters":{ + "DestNSG":{ + "query":{ + "term":{ + "DestinationNSG":"ovs-186" + } + } + } + } + }, + "aggs":{ + "Application":{ + "cardinality":{ + "field":"Application" + } + } + } + } + } + } +} diff --git a/server/app/configurations/queries/connectivity-score-part1-upload.json b/server/app/configurations/queries/connectivity-score-part1-upload.json new file mode 100644 index 00000000..577cd266 --- /dev/null +++ b/server/app/configurations/queries/connectivity-score-part1-upload.json @@ -0,0 +1,45 @@ +{ + "id":"connectivity-score-part1-upload", + "title":"TBD", + "service":"elasticsearch", + "query":{ + "size":0, + "query":{ + "bool":{ + "must":[ + { + "range":{ + "timestamp":{ + "gte":"now-1y", + "lte":"now", + "format":"epoch_millis" + } + } + } + ] + } + }, + "aggs":{ + "5":{ + "filters":{ + "filters":{ + "SourceNSG":{ + "query":{ + "term":{ + "SourceNSG":"ovs-186" + } + } + } + } + }, + "aggs":{ + "Application":{ + "cardinality":{ + "field":"Application" + } + } + } + } + } + } +} diff --git a/server/app/configurations/queries/connectivity-score-part2-download.json b/server/app/configurations/queries/connectivity-score-part2-download.json new file mode 100644 index 00000000..44eb96dd --- /dev/null +++ b/server/app/configurations/queries/connectivity-score-part2-download.json @@ -0,0 +1,50 @@ +{ + "id":"connectivity-score-part2-download", + "title":"TBD", + "service":"elasticsearch", + "query":{ + "size":0, + "query":{ + "bool":{ + "must":[ + { + "range":{ + "timestamp":{ + "gte":"now-1y", + "lte":"now", + "format":"epoch_millis" + } + } + }, + { + "term":{ + "SlaStatus":"IN" + } + } + ] + } + }, + "aggs":{ + "5":{ + "filters":{ + "filters":{ + "DestNSG":{ + "query":{ + "term":{ + "DestinationNSG":"ovs-186" + } + } + } + } + }, + "aggs":{ + "Application":{ + "cardinality":{ + "field":"Application" + } + } + } + } + } + } +} diff --git a/server/app/configurations/queries/connectivity-score-part2-upload.json b/server/app/configurations/queries/connectivity-score-part2-upload.json new file mode 100644 index 00000000..977ad70a --- /dev/null +++ b/server/app/configurations/queries/connectivity-score-part2-upload.json @@ -0,0 +1,50 @@ +{ + "id":"connectivity-score-part2-upload", + "title":"TBD", + "service":"elasticsearch", + "query":{ + "size":0, + "query":{ + "bool":{ + "must":[ + { + "range":{ + "timestamp":{ + "gte":"now-1y", + "lte":"now", + "format":"epoch_millis" + } + } + }, + { + "term":{ + "SlaStatus":"IN" + } + } + ] + } + }, + "aggs":{ + "5":{ + "filters":{ + "filters":{ + "SourceNSG":{ + "query":{ + "term":{ + "SourceNSG":"ovs-186" + } + } + } + } + }, + "aggs":{ + "Application":{ + "cardinality":{ + "field":"Application" + } + } + } + } + } + } +} diff --git a/server/app/configurations/queries/effective-score-part1.json b/server/app/configurations/queries/effective-score-part1.json new file mode 100644 index 00000000..91d6a82f --- /dev/null +++ b/server/app/configurations/queries/effective-score-part1.json @@ -0,0 +1,57 @@ +{ + "id":"effective-score-part1", + "title":"TBD", + "service":"elasticsearch", + "query":{ + "index":"{{index:nuage_dpi_flowstats}}", + "type":"{{type:nuage_doc_type}}", + "size":0, + "query":{ + "bool":{ + "must":[ + { + "range":{ + "timestamp":{ + "gte":"now-1y", + "lte":"now", + "format":"epoch_millis" + } + } + }, + { + "term":{ + "SlaStatus":"IN" + } + }, + { + "term":{ + "SlaTransition":"True" + } + } + ] + } + }, + "aggs":{ + "5":{ + "filters":{ + "filters":{ + "Enterprise":{ + "query":{ + "term":{ + "EnterpriseName":"test_org" + } + } + } + } + }, + "aggs":{ + "Application":{ + "cardinality":{ + "field":"Application" + } + } + } + } + } + } +} diff --git a/server/app/configurations/queries/effective-score-part2.json b/server/app/configurations/queries/effective-score-part2.json new file mode 100644 index 00000000..7fa877d4 --- /dev/null +++ b/server/app/configurations/queries/effective-score-part2.json @@ -0,0 +1,52 @@ +{ + "id":"effective-score-part2", + "title":"TBD", + "service":"elasticsearch", + "query":{ + "index":"{{index:nuage_dpi_flowstats}}", + "type":"{{type:nuage_doc_type}}", + "size":0, + "query":{ + "bool":{ + "must":[ + { + "range":{ + "timestamp":{ + "gte":"now-1y", + "lte":"now", + "format":"epoch_millis" + } + } + }, + { + "term":{ + "SlaTransition":"True" + } + } + ] + } + }, + "aggs":{ + "5":{ + "filters":{ + "filters":{ + "Enterprise":{ + "query":{ + "term":{ + "EnterpriseName":"test_org" + } + } + } + } + }, + "aggs":{ + "Application":{ + "cardinality":{ + "field":"Application" + } + } + } + } + } + } +} diff --git a/server/app/configurations/queries/newly-discovered-applications.json b/server/app/configurations/queries/newly-discovered-applications.json new file mode 100644 index 00000000..f34ab4d0 --- /dev/null +++ b/server/app/configurations/queries/newly-discovered-applications.json @@ -0,0 +1,10 @@ +{ + "id":"newly-discovered-applications", + "title":"Newly Discovered Applications", + "service":"VSD", + "query":{ + "parentResource":"enterprises", + "parentID":"{{enterpriseID}}", + "resource":"applications" + } +} diff --git a/server/app/configurations/queries/number-of-apm-groups.json b/server/app/configurations/queries/number-of-apm-groups.json new file mode 100644 index 00000000..2b18b22c --- /dev/null +++ b/server/app/configurations/queries/number-of-apm-groups.json @@ -0,0 +1,10 @@ +{ + "id":"number-of-apm-groups", + "title":"APM Groups", + "service":"VSD", + "query":{ + "parentResource":"enterprises", + "parentID":"{{enterpriseID}}", + "resource":"applicationperformancemanagements" + } +} diff --git a/server/app/configurations/queries/number-of-applications.json b/server/app/configurations/queries/number-of-applications.json new file mode 100644 index 00000000..442f22fa --- /dev/null +++ b/server/app/configurations/queries/number-of-applications.json @@ -0,0 +1,10 @@ +{ + "id":"number-of-applications", + "title":"Applications", + "service":"VSD", + "query":{ + "parentResource":"enterprises", + "parentID":"{{enterpriseID}}", + "resource":"applications" + } +} diff --git a/server/app/configurations/queries/number-of-npms.json b/server/app/configurations/queries/number-of-npms.json new file mode 100644 index 00000000..0c846cf2 --- /dev/null +++ b/server/app/configurations/queries/number-of-npms.json @@ -0,0 +1,10 @@ +{ + "id":"number-of-npms", + "title":"NPMs", + "service":"VSD", + "query":{ + "parentResource":"enterprises", + "parentID":"{{enterpriseID}}", + "resource":"networkperformancemeasurements" + } +} diff --git a/server/app/configurations/queries/number-of-performance-monitors.json b/server/app/configurations/queries/number-of-performance-monitors.json new file mode 100644 index 00000000..2d207d3e --- /dev/null +++ b/server/app/configurations/queries/number-of-performance-monitors.json @@ -0,0 +1,10 @@ +{ + "id":"number-of-performance-monitors", + "title":"Performance Monitors", + "service":"VSD", + "query":{ + "parentResource":"enterprises", + "parentID":"{{enterpriseID}}", + "resource":"performancemonitors" + } +} diff --git a/server/app/configurations/queries/probe-paths.json b/server/app/configurations/queries/probe-paths.json new file mode 100644 index 00000000..25d54eb1 --- /dev/null +++ b/server/app/configurations/queries/probe-paths.json @@ -0,0 +1,67 @@ +{ + "id":"probe-paths", + "title":"TBD", + "service":"elasticsearch", + "query":{ + "size":0, + "query":{ + "bool":{ + "must":[ + { + "range":{ + "timestamp":{ + "gte":"now-24h", + "lte":"now", + "format":"epoch_millis" + } + } + } + ] + } + }, + "aggs":{ + "2":{ + "terms":{ + "field":"SourceNSG", + "size":5, + "order":{ + "_count":"desc" + } + }, + "aggs":{ + "4":{ + "terms":{ + "field":"SrcUplink", + "size":5, + "order":{ + "_count":"desc" + } + }, + "aggs":{ + "3":{ + "terms":{ + "field":"DestinationNSG", + "size":5, + "order":{ + "_count":"desc" + } + }, + "aggs":{ + "5":{ + "terms":{ + "field":"DstUplink", + "size":5, + "order":{ + "_count":"desc" + } + } + } + } + } + } + } + } + } + } + } +} diff --git a/server/app/configurations/queries/top-bottom-5-paths-horizontal-bar-charts.json b/server/app/configurations/queries/top-bottom-5-paths-horizontal-bar-charts.json new file mode 100644 index 00000000..142b2262 --- /dev/null +++ b/server/app/configurations/queries/top-bottom-5-paths-horizontal-bar-charts.json @@ -0,0 +1,103 @@ +{ + "id":"top-bottom-5-paths-horizontal-bar-charts", + "title":"TBD", + "service":"elasticsearch", + "query":{ + "query":{ + "bool":{ + "must":[ + { + "range":{ + "timestamp":{ + "gte":"now-24h", + "lte":"now", + "format":"epoch_millis" + } + } + } + ] + } + }, + "aggs":{ + "5":{ + "filters":{ + "filters":{ + "Enterprise":{ + "query":{ + "term":{ + "Enterprise":"test_org" + } + } + } + } + }, + "aggs":{ + "SourceNSG":{ + "terms":{ + "field":"SourceNSG", + "size":5, + "order":{ + "1":"desc" + } + }, + "aggs":{ + "1":{ + "sum":{ + "field":"AvgDelay" + } + }, + "SrcUplink":{ + "terms":{ + "field":"SrcUplink", + "size":5, + "order":{ + "1":"desc" + } + }, + "aggs":{ + "1":{ + "sum":{ + "field":"AvgDelay" + } + }, + "DestinationNSG":{ + "terms":{ + "field":"DestinationNSG", + "size":5, + "order":{ + "1":"desc" + } + }, + "aggs":{ + "1":{ + "sum":{ + "field":"AvgDelay" + } + }, + "DstUplink":{ + "terms":{ + "field":"DstUplink", + "size":5, + "order":{ + "1":"desc" + } + }, + "aggs":{ + "1":{ + "sum":{ + "field":"AvgDelay" + } + } + } + } + } + } + } + } + } + } + } + } + } + } +} diff --git a/server/app/configurations/queries/top20-talkers-domain-table.json b/server/app/configurations/queries/top20-talkers-domain-table.json new file mode 100644 index 00000000..741da118 --- /dev/null +++ b/server/app/configurations/queries/top20-talkers-domain-table.json @@ -0,0 +1,185 @@ +{ + "id": "top20-talkers-domain-table", + "title": "Top 20 talkers", + "service": "elasticsearch", + "query": { + "index": "{{index:nuage_dpi_flowstats}}", + "type": "{{type:nuage_doc_type}}", + "body": { + "size": 0, + "query": { + "bool": { + "must": [ + { + "range": { + "timestamp": { + "gte": "{{startTime:now-24h}}", + "lte": "{{endTime:now}}", + "format": "epoch_millis" + } + } + } + ] + } + }, + "aggs": { + "2": { + "filters": { + "filters": { + "Enterprise": { + "query": { + "term": { + "EnterpriseName": "{{enterpriseName:test_org}}" + } + } + } + } + }, + "aggs": { + "3": { + "filters": { + "filters": { + "Domain": { + "query": { + "term": { + "Domain": "{{domainName:Domain1}}" + } + } + } + } + }, + "aggs": { + "Application": { + "terms": { + "field": "Application", + "size": 20, + "order": { + "1": "desc" + } + }, + "aggs": { + "1": { + "sum": { + "field": "TotalBytesCount" + } + }, + "11": { + "sum": { + "field": "TotalPacketsCount" + } + }, + "L7Classification": { + "terms": { + "field": "L7ClassEnhanced", + "size": 20, + "order": { + "1": "desc" + } + }, + "aggs": { + "1": { + "sum": { + "field": "TotalBytesCount" + } + }, + "11": { + "sum": { + "field": "TotalPacketsCount" + } + }, + "SrcVportName": { + "terms": { + "field": "SrcVportName", + "size": 20, + "order": { + "1": "desc" + } + }, + "aggs": { + "1": { + "sum": { + "field": "TotalBytesCount" + } + }, + "11": { + "sum": { + "field": "TotalPacketsCount" + } + }, + "SourceNSG": { + "terms": { + "field": "SourceNSG", + "size": 20, + "order": { + "1": "desc" + } + }, + "aggs": { + "1": { + "sum": { + "field": "TotalBytesCount" + } + }, + "11":{ + "sum": { + "field": "TotalPacketsCount" + } + }, + "DestinationNSG": { + "terms": { + "field": "DestinationNSG", + "size": 20, + "order": { + "1": "desc" + } + }, + "aggs": { + "1": { + "sum": { + "field": "TotalBytesCount" + } + }, + "11": { + "sum": { + "field": "TotalPacketsCount" + } + }, + "DestVportName": { + "terms": { + "field": "DestVportName", + "size": 20, + "order": { + "1": "desc" + } + }, + "aggs": { + "1": { + "sum": { + "field": "TotalBytesCount" + } + }, + "11": { + "sum": { + "field": "TotalPacketsCount" + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } +} diff --git a/server/app/configurations/queries/top20-talkers-enterprise-defaultapp-table.json b/server/app/configurations/queries/top20-talkers-enterprise-defaultapp-table.json new file mode 100644 index 00000000..2662db5a --- /dev/null +++ b/server/app/configurations/queries/top20-talkers-enterprise-defaultapp-table.json @@ -0,0 +1,123 @@ +{ + "id":"top20-talkers-enterprise-defaultapp-table", + "title":"Top 20 Talkers in Enterprise", + "service":"elasticsearch", + "query": { + "index":"{{index:nuage_dpi_flowstats}}", + "type":"{{type:nuage_doc_type}}", + "body": { + "size":0, + "query":{ + "bool":{ + "must":[ + { + "range":{ + "timestamp":{ + "gte":"{{startTime:now-24h}}", + "lte":"{{endTime:now}}", + "format":"epoch_millis" + } + } + } + ] + } + }, + "aggs":{ + "2":{ + "filters":{ + "filters":{ + "EnterpriseName":{ + "query":{ + "term":{ + "EnterpriseName":"{{enterpriseName:test_org}}" + } + } + } + } + }, + "aggs":{ + "5":{ + "filters":{ + "filters":{ + "AppName":{ + "query":{ + "term":{ + "Application":"Default Application" + } + } + } + } + }, + "aggs":{ + "Application":{ + "terms":{ + "field":"Application", + "size":20, + "order":{ + "1":"desc" + } + }, + "aggs":{ + "1":{ + "sum":{ + "field":"TotalBytesCount" + } + }, + "APMGroup":{ + "terms":{ + "field":"APMGroup", + "size":20, + "order":{ + "1":"desc" + } + }, + "aggs":{ + "1":{ + "sum":{ + "field":"TotalBytesCount" + } + }, + "DomainName":{ + "terms":{ + "field":"Domain", + "size":20, + "order":{ + "1":"desc" + } + }, + "aggs":{ + "1":{ + "sum":{ + "field":"TotalBytesCount" + } + }, + "L7Classification":{ + "terms":{ + "field":"L7ClassEnhanced", + "size":20, + "order":{ + "1":"desc" + } + }, + "aggs":{ + "1":{ + "sum":{ + "field":"TotalBytesCount" + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } +} diff --git a/server/app/configurations/queries/top20-talkers-enterprise-table.json b/server/app/configurations/queries/top20-talkers-enterprise-table.json new file mode 100644 index 00000000..f14dedc3 --- /dev/null +++ b/server/app/configurations/queries/top20-talkers-enterprise-table.json @@ -0,0 +1,125 @@ +{ + "id":"top20-talkers-enterprise-table", + "title":"Top 20 Talkers in Enterprise", + "service":"elasticsearch", + "query": { + "index":"{{index:nuage_dpi_flowstats}}", + "type":"{{type:nuage_doc_type}}", + "body": { + "size":0, + "query":{ + "bool":{ + "must":[ + { + "range":{ + "timestamp":{ + "gte":"{{startTime:now-24h}}", + "lte":"{{endTime:now}}", + "format":"epoch_millis" + } + } + } + ] + } + }, + "aggs":{ + "2":{ + "filters":{ + "filters":{ + "EnterpriseName":{ + "query":{ + "term":{ + "EnterpriseName":"{{enterpriseName:test_org}}" + } + } + } + } + }, + "aggs":{ + "5":{ + "filters":{ + "filters":{ + "AppName":{ + "query":{ + "not":{ + "term":{ + "Application":"Default Application" + } + } + } + } + } + }, + "aggs":{ + "Application":{ + "terms":{ + "field":"Application", + "size":20, + "order":{ + "1":"desc" + } + }, + "aggs":{ + "1":{ + "sum":{ + "field":"TotalBytesCount" + } + }, + "APMGroup":{ + "terms":{ + "field":"APMGroup", + "size":20, + "order":{ + "1":"desc" + } + }, + "aggs":{ + "1":{ + "sum":{ + "field":"TotalBytesCount" + } + }, + "DomainName":{ + "terms":{ + "field":"Domain", + "size":20, + "order":{ + "1":"desc" + } + }, + "aggs":{ + "1":{ + "sum":{ + "field":"TotalBytesCount" + } + }, + "L7Classification":{ + "terms":{ + "field":"L7ClassEnhanced", + "size":20, + "order":{ + "1":"desc" + } + }, + "aggs":{ + "1":{ + "sum":{ + "field":"TotalBytesCount" + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } +} diff --git a/server/app/configurations/queries/top5-APMG-APP-pie-chart.json b/server/app/configurations/queries/top5-APMG-APP-pie-chart.json new file mode 100644 index 00000000..0b0b806f --- /dev/null +++ b/server/app/configurations/queries/top5-APMG-APP-pie-chart.json @@ -0,0 +1,72 @@ +{ + "id":"top5-APMG-APP-pie-chart", + "title":"TBD", + "service":"elasticsearch", + "query":{ + "size":0, + "query":{ + "bool":{ + "must":[ + { + "range":{ + "timestamp":{ + "gte":"{{startTime:now-24h}}", + "lte":"{{endTime:now}}", + "format":"epoch_millis" + } + } + } + ] + } + }, + "aggs":{ + "3":{ + "filters":{ + "filters":{ + "Enterprise":{ + "query":{ + "term":{ + "EnterpriseName":"{{enterpriseName:test_org}}" + } + } + } + } + }, + "aggs":{ + "APMGroup":{ + "terms":{ + "field":"APMGroup", + "size":5, + "order":{ + "Sum of MB":"desc" + } + }, + "aggs":{ + "Sum of MB":{ + "sum":{ + "field":"TotalMB" + } + }, + "Application":{ + "terms":{ + "field":"Application", + "size":5, + "order":{ + "Sum of MB":"desc" + } + }, + "aggs":{ + "Sum of MB":{ + "sum":{ + "field":"TotalMB" + } + } + } + } + } + } + } + } + } + } +} diff --git a/server/app/configurations/queries/top5-app-vertical-bar-domain.json b/server/app/configurations/queries/top5-app-vertical-bar-domain.json new file mode 100644 index 00000000..349c7b70 --- /dev/null +++ b/server/app/configurations/queries/top5-app-vertical-bar-domain.json @@ -0,0 +1,75 @@ +{ + "id":"top5-app-vertical-bar-domain", + "title":"Top 5 Applications", + "service":"elasticsearch", + "query":{ + "index":"{{index:nuage_dpi_flowstats}}", + "type":"{{type:nuage_doc_type}}", + "body":{ + "size":0, + "query":{ + "bool":{ + "must":[ + { + "range":{ + "timestamp":{ + "gte":"{{startTime:now-24h}}", + "lte":"{{endTime:now}}", + "format":"epoch_millis" + } + } + } + ] + } + }, + "aggs":{ + "3":{ + "filters":{ + "filters":{ + "Enterprise":{ + "query":{ + "term":{ + "EnterpriseName":"{{enterpriseName:test_org}}" + } + } + } + } + }, + "aggs":{ + "3":{ + "filters":{ + "filters":{ + "Domain":{ + "query":{ + "term":{ + "Domain":"{{domainName:Domain1}}" + } + } + } + } + }, + "aggs":{ + "Application":{ + "terms":{ + "field":"Application", + "size":5, + "order":{ + "SumofBytes":"desc" + } + }, + "aggs":{ + "SumofBytes":{ + "sum":{ + "field":"TotalBytesCount" + } + } + } + } + } + } + } + } + } + } + } +} diff --git a/server/app/configurations/queries/top5-app-vertical-bar.json b/server/app/configurations/queries/top5-app-vertical-bar.json new file mode 100644 index 00000000..d0f627e5 --- /dev/null +++ b/server/app/configurations/queries/top5-app-vertical-bar.json @@ -0,0 +1,60 @@ +{ + "id":"top5-app-vertical-bar", + "title":"Top 5 Applications", + "service":"elasticsearch", + "query":{ + "index":"{{index:nuage_dpi_flowstats}}", + "type":"{{type:nuage_doc_type}}", + "body":{ + "size":0, + "query":{ + "bool":{ + "must":[ + { + "range":{ + "timestamp":{ + "gte":"{{startTime:now-24h}}", + "lte":"{{endTime:now}}", + "format":"epoch_millis" + } + } + } + ] + } + }, + "aggs":{ + "3":{ + "filters":{ + "filters":{ + "Enterprise":{ + "query":{ + "term":{ + "EnterpriseName":"{{enterpriseName:test_org}}" + } + } + } + } + }, + "aggs":{ + "L7Classification":{ + "terms":{ + "field":"L7ClassEnhanced", + "size":5, + "order":{ + "Sum of MB":"desc" + } + }, + "aggs":{ + "Sum of MB":{ + "sum":{ + "field":"TotalBytesCount" + } + } + } + } + } + } + } + } + } +} diff --git a/server/app/configurations/queries/top5-download-users-table.json b/server/app/configurations/queries/top5-download-users-table.json new file mode 100644 index 00000000..3c14d7b4 --- /dev/null +++ b/server/app/configurations/queries/top5-download-users-table.json @@ -0,0 +1,112 @@ +{ + "id": "top5-download-users-table", + "title": "Top 5 Downlod Users", + "service": "elasticsearch", + "query": { + "index": "{{index:nuage_dpi_flowstats}}", + "type": "{{type:nuage_doc_type}}", + "body": { + "size": 0, + "query": { + "bool": { + "must": [ + { + "range": { + "timestamp": { + "gte": "{{startTime:now-24h}}", + "lte": "{{endTime:now}}", + "format": "epoch_millis" + } + } + }, + { + "term": { + "IngressBytes": 0 + } + } + ] + } + }, + "aggs": { + "5": { + "filters": { + "filters": { + "Enterprise": { + "query": { + "term": { + "EnterpriseName": "{{enterpriseName:test_org}}" + } + } + } + } + }, + "aggs": { + "DstIP": { + "terms": { + "field": "DstIp", + "size": 5, + "order": { + "EgressBytes": "desc" + } + }, + "aggs": { + "EgressPackets": { + "sum": { + "field": "EgressPackets" + } + }, + "EgressBytes": { + "sum": { + "field": "EgressBytes" + } + }, + "DestinationNSG": { + "terms": { + "field": "DestinationNSG", + "size": 5, + "order": { + "EgressBytes": "desc" + } + }, + "aggs": { + "EgressPackets": { + "sum": { + "field": "EgressPackets" + } + }, + "EgressBytes": { + "sum": { + "field": "EgressBytes" + } + }, + "DomainName": { + "terms": { + "field": "Domain", + "size": 5, + "order": { + "EgressBytes": "desc" + } + }, + "aggs": { + "EgressPackets": { + "sum": { + "field": "EgressPackets" + } + }, + "EgressBytes": { + "sum": { + "field": "EgressBytes" + } + } + } + } + } + } + } + } + } + } + } + } + } +} diff --git a/server/app/configurations/queries/top5-upload-users-table.json b/server/app/configurations/queries/top5-upload-users-table.json new file mode 100644 index 00000000..2952d0cc --- /dev/null +++ b/server/app/configurations/queries/top5-upload-users-table.json @@ -0,0 +1,112 @@ +{ + "id": "top5-upload-users-table", + "title": "Top 5 Upload Users", + "service": "elasticsearch", + "query": { + "index": "{{index:nuage_dpi_flowstats}}", + "type": "{{type:nuage_doc_type}}", + "body": { + "size": 0, + "query": { + "bool": { + "must": [ + { + "range": { + "timestamp": { + "gte": "{{startTime:now-24h}}", + "lte": "{{endTime:now}}", + "format": "epoch_millis" + } + } + }, + { + "term": { + "EgressBytes": 0 + } + } + ] + } + }, + "aggs": { + "5": { + "filters": { + "filters": { + "Enterprise": { + "query": { + "term": { + "EnterpriseName": "{{enterpriseName:test_org}}" + } + } + } + } + }, + "aggs": { + "SourceIP": { + "terms": { + "field": "SrcIp", + "size": 5, + "order": { + "IngressBytes": "desc" + } + }, + "aggs": { + "IngressPackets": { + "sum": { + "field": "IngressPackets" + } + }, + "IngressBytes": { + "sum": { + "field": "IngressBytes" + } + }, + "SourceNSG": { + "terms": { + "field": "SourceNSG", + "size": 5, + "order": { + "IngressBytes": "desc" + } + }, + "aggs": { + "IngressPackets": { + "sum": { + "field": "IngressPackets" + } + }, + "IngressBytes": { + "sum": { + "field": "IngressBytes" + } + }, + "DomainName": { + "terms": { + "field": "Domain", + "size": 5, + "order": { + "IngressBytes": "desc" + } + }, + "aggs": { + "IngressPackets": { + "sum": { + "field": "IngressPackets" + } + }, + "IngressBytes": { + "sum": { + "field": "IngressBytes" + } + } + } + } + } + } + } + } + } + } + } + } + } +} diff --git a/server/app/configurations/queries/top5-users-table.json b/server/app/configurations/queries/top5-users-table.json new file mode 100644 index 00000000..abd1d65b --- /dev/null +++ b/server/app/configurations/queries/top5-users-table.json @@ -0,0 +1,86 @@ +{ + "id":"top5-users-table", + "title":"Top 5 Users", + "service":"elasticsearch", + "query":{ + "index":"{{index:nuage_dpi_flowstats}}", + "type":"{{type:nuage_doc_type}}", + "body":{ + "size":0, + "query":{ + "bool":{ + "must":[ + { + "range":{ + "timestamp":{ + "gte":"{{startTime:now-24h}}", + "lte":"{{endTime:now}}", + "format":"epoch_millis" + } + } + } + ] + } + }, + "aggs":{ + "5":{ + "filters":{ + "filters":{ + "Enterprise":{ + "query":{ + "term":{ + "EnterpriseName":"{{enterpriseName:test_org}}" + } + } + } + } + }, + "aggs":{ + "SourceIP":{ + "terms":{ + "field":"SrcIp", + "size":5, + "order":{ + "TotalBytesCount":"desc" + } + }, + "aggs":{ + "TotalPacketsCount":{ + "sum":{ + "field":"TotalPacketsCount" + } + }, + "TotalBytesCount":{ + "sum":{ + "field":"TotalBytesCount" + } + }, + "SourceNSG":{ + "terms":{ + "field":"SourceNSG", + "size":5, + "order":{ + "TotalBytesCount":"desc" + } + }, + "aggs":{ + "TotalPacketsCount":{ + "sum":{ + "field":"TotalPacketsCount" + } + }, + "TotalBytesCount":{ + "sum":{ + "field":"TotalBytesCount" + } + } + } + } + } + } + } + } + } + } + } +} diff --git a/server/app/configurations/queries/vertical-bar-with-sla.json b/server/app/configurations/queries/vertical-bar-with-sla.json new file mode 100644 index 00000000..34f1ecc0 --- /dev/null +++ b/server/app/configurations/queries/vertical-bar-with-sla.json @@ -0,0 +1,23 @@ +{ + "id":"vertical-bar-with-sla", + "title":"TBD", + "service":"elasticsearch", + "query":{ + "query":{ + "term":{ + "Application":"myApp-3" + } + }, + "sort":{ + "timestamp":{ + "order":"desc" + } + }, + "_source":{ + "include":[ + "SlaStatus" + ] + }, + "size":1 + } +} diff --git a/server/app/configurations/queries/vnf-status-linechart.json b/server/app/configurations/queries/vnf-status-linechart.json new file mode 100644 index 00000000..0e5534ba --- /dev/null +++ b/server/app/configurations/queries/vnf-status-linechart.json @@ -0,0 +1,82 @@ +{ + "id":"vnf-status-linechart", + "title":"TBD", + "service":"elasticsearch", + "query":{ + "index":"{{index:nuage_vnf}}", + "type":"{{type:nuage_doc_type}}", + "body":{ + "size":0, + "query":{ + "bool":{ + "must":[ + { + "range":{ + "timestamp":{ + "gte":"{{startTime:now-24h}}", + "lte":"{{endTime:now}}", + "format":"epoch_millis" + } + } + } + ] + } + }, + "aggs":{ + "5":{ + "filters":{ + "filters":{ + "NSG":{ + "query":{ + "term":{ + "nsg":"{{nsg:NSG-1}}" + } + } + } + } + }, + "aggs": { + "3":{ + "filters":{ + "filters":{ + "VNF":{ + "query":{ + "term":{ + "vnf": "{{vnf:NSG-1-VNF-1}}" + } + } + } + } + }, + "aggs": { + "ts": { + "date_histogram": { + "field": "timestamp", + "interval": "{{interval:1h}}" + }, + "aggs": { + "CPU": { + "avg": { + "field": "cpu" + } + }, + "MEMORY": { + "avg": { + "field": "memory" + } + }, + "DISK": { + "avg": { + "field": "disk" + } + } + } + } + } + } + } + } + } + } + } +} diff --git a/server/app/configurations/queries/vnf-status.json b/server/app/configurations/queries/vnf-status.json new file mode 100644 index 00000000..0242396e --- /dev/null +++ b/server/app/configurations/queries/vnf-status.json @@ -0,0 +1,23 @@ +{ + "id":"vnf-status", + "title":"TBD", + "service":"elasticsearch", + "query":{ + "index":"{{index:nuage_vnf}}", + "type":"{{type:nuage_doc_type}}", + "body":{ + "size":1, + "sort": [ + { "timestamp": { "order": "desc" } } + ], + "query": { + "bool": { + "must": [ + { "term": { "nsg": "{{nsg:NSG-1}}" } }, + { "term": { "vnf": "{{vnf:NSG-1-VNF-1}}" } } + ] + } + } + } + } +} diff --git a/server/app/configurations/queries/vsd-from-nsgs-list.json b/server/app/configurations/queries/vsd-from-nsgs-list.json new file mode 100644 index 00000000..56743476 --- /dev/null +++ b/server/app/configurations/queries/vsd-from-nsgs-list.json @@ -0,0 +1,11 @@ +{ + "id":"vsd-from-nsgs-list", + "title":"Applications", + "service":"VSD", + "query":{ + "parentResource":"enterprises", + "parentID":"{{enterpriseID}}", + "resource":"nsgateways", + "filter": "personality == {{fromPersonality:NSG}}" + } +} diff --git a/server/app/configurations/queries/vsd-to-nsgs-list.json b/server/app/configurations/queries/vsd-to-nsgs-list.json new file mode 100644 index 00000000..66e51e62 --- /dev/null +++ b/server/app/configurations/queries/vsd-to-nsgs-list.json @@ -0,0 +1,11 @@ +{ + "id":"vsd-to-nsgs-list", + "title":"Applications", + "service":"VSD", + "query":{ + "parentResource":"enterprises", + "parentID":"{{enterpriseID}}", + "resource":"nsgateways", + "filter": "personality == {{toPersonality:NSG}}" + } +} diff --git a/server/app/configurations/queries/vss-domain-acl-dpg.json b/server/app/configurations/queries/vss-domain-acl-dpg.json new file mode 100644 index 00000000..9fc79753 --- /dev/null +++ b/server/app/configurations/queries/vss-domain-acl-dpg.json @@ -0,0 +1,90 @@ +{ + "id":"vss-domain-acl-dpg", + "title":"ACL hits by Destination PG", + "service":"elasticsearch", + "query":{ + "index":"{{index:nuage_flow}}", + "type":"{{type:nuage_doc_type}}", + "body":{ + "size":0, + "query":{ + "bool":{ + "must":[ + { + "range":{ + "timestamp":{ + "gte":"{{startTime:now-24h}}", + "lte":"{{endTime:now}}", + "format":"epoch_millis" + } + } + } + ] + } + }, + "aggs": { + "2": { + "filters":{ + "filters":{ + "Enterprise":{ + "query":{ + "term":{ + "nuage_metadata.enterpriseName":"{{enterpriseName:chord_enterprise}}" + } + } + } + } + }, + "aggs": { + "3": { + "filters":{ + "filters":{ + "Domain":{ + "query":{ + "term":{ + "{{domainType:nuage_metadata.domainName}}":"{{domainName:chord_domain}}" + } + } + } + } + }, + "aggs": { + "4": { + "filters": { + "filters": { + "ACL": { + "query": { + "term": { + "type": "{{actionType:DENY}}" + } + } + } + } + }, + "aggs": { + "dpg": { + "terms": { + "field": "nuage_metadata.dpgName", + "size": 5, + "order": { + "SumOf": "desc" + } + }, + "aggs": { + "SumOf": { + "sum": { + "field": "packets" + } + } + } + } + } + } + } + } + } + } + } + } + } +} diff --git a/server/app/configurations/queries/vss-domain-acl-spg.json b/server/app/configurations/queries/vss-domain-acl-spg.json new file mode 100644 index 00000000..4d60c7a7 --- /dev/null +++ b/server/app/configurations/queries/vss-domain-acl-spg.json @@ -0,0 +1,90 @@ +{ + "id":"vss-domain-acl-spg", + "title":"ACL hits by Source PG", + "service":"elasticsearch", + "query":{ + "index":"{{index:nuage_flow}}", + "type":"{{type:nuage_doc_type}}", + "body":{ + "size":0, + "query":{ + "bool":{ + "must":[ + { + "range":{ + "timestamp":{ + "gte":"{{startTime:now-24h}}", + "lte":"{{endTime:now}}", + "format":"epoch_millis" + } + } + } + ] + } + }, + "aggs": { + "2": { + "filters":{ + "filters":{ + "Enterprise":{ + "query":{ + "term":{ + "nuage_metadata.enterpriseName":"{{enterpriseName:chord_enterprise}}" + } + } + } + } + }, + "aggs": { + "3": { + "filters":{ + "filters":{ + "Domain":{ + "query":{ + "term":{ + "{{domainType:nuage_metadata.domainName}}":"{{domainName:chord_domain}}" + } + } + } + } + }, + "aggs": { + "4": { + "filters": { + "filters": { + "ACL": { + "query": { + "term": { + "type": "{{actionType:DENY}}" + } + } + } + } + }, + "aggs": { + "spg": { + "terms": { + "field": "nuage_metadata.spgName", + "size": 5, + "order": { + "SumOf": "desc" + } + }, + "aggs": { + "SumOf": { + "sum": { + "field": "packets" + } + } + } + } + } + } + } + } + } + } + } + } + } +} diff --git a/server/app/configurations/queries/vss-domain-acl-time.json b/server/app/configurations/queries/vss-domain-acl-time.json new file mode 100644 index 00000000..500e4f71 --- /dev/null +++ b/server/app/configurations/queries/vss-domain-acl-time.json @@ -0,0 +1,87 @@ +{ + "id":"vss-domain-acl-time", + "title":"ACL vs Time", + "service":"elasticsearch", + "query":{ + "index":"{{index:nuage_flow}}", + "type":"{{type:nuage_doc_type}}", + "body":{ + "size":0, + "query":{ + "bool":{ + "must":[ + { + "range":{ + "timestamp":{ + "gte":"{{startTime:now-24h}}", + "lte":"{{endTime:now}}", + "format":"epoch_millis" + } + } + } + ] + } + }, + "aggs": { + "2": { + "filters":{ + "filters":{ + "Enterprise":{ + "query":{ + "term":{ + "nuage_metadata.enterpriseName":"{{enterpriseName:chord_enterprise}}" + } + } + } + } + }, + "aggs": { + "3": { + "filters":{ + "filters":{ + "Domain":{ + "query":{ + "term":{ + "{{domainType:nuage_metadata.domainName}}":"{{domainName:chord_domain}}" + } + } + } + } + }, + "aggs": { + "4": { + "filters": { + "filters": { + "ACL": { + "query": { + "term": { + "type": "{{actionType:DENY}}" + } + } + } + } + }, + "aggs": { + "timestamp": { + "date_histogram": { + "field": "timestamp", + "interval": "{{interval:1h}}" + }, + "aggs": { + "SumOf": { + "sum": { + "field": "packets" + } + } + } + } + } + } + } + } + } + } + } + } + } +} diff --git a/server/app/configurations/queries/vss-domain-acl-top5.json b/server/app/configurations/queries/vss-domain-acl-top5.json new file mode 100644 index 00000000..04215f51 --- /dev/null +++ b/server/app/configurations/queries/vss-domain-acl-top5.json @@ -0,0 +1,91 @@ +{ + "id":"vss-domain-acl-top5", + "title":"top 5 acls", + "service":"elasticsearch", + "query":{ + "index":"{{index:nuage_flow}}", + "type":"{{type:nuage_doc_type}}", + "body":{ + "size":0, + "query":{ + "bool":{ + "must":[ + { + "range":{ + "timestamp":{ + "gte":"{{startTime:now-24h}}", + "lte":"{{endTime:now}}", + "format":"epoch_millis" + } + } + } + ] + } + }, + "aggs": { + "2": { + "filters":{ + "filters":{ + "Enterprise":{ + "query":{ + "term":{ + "nuage_metadata.enterpriseName":"{{enterpriseName:chord_enterprise}}" + } + } + } + } + }, + "aggs": { + "3": { + "filters":{ + "filters":{ + "Domain":{ + "query":{ + "term":{ + "nuage_metadata.domainName":"{{domainName:chord_domain}}" + } + } + } + } + }, + "aggs": { + "top-acls": { + "terms": { + "field": "nuage_metadata.aclId", + "size": 5 + }, + "aggs": { + "top-acl-hits": { + "top_hits": { + "sort": [ + { + "packets": { + "order": "desc", + "mode": "sum" + } + } + ], + "_source": { + "include": [ + "nuage_metadata.spgName", + "nuage_metadata.dpgName", + "sourceport", + "destinationport", + "protocol", + "type" + ] + }, + "size": 1 + } + } + } + } + } + } + } + } + } + } + } +} + diff --git a/server/app/configurations/queries/vss-domain-events-by-pg.json b/server/app/configurations/queries/vss-domain-events-by-pg.json new file mode 100644 index 00000000..e583dc1d --- /dev/null +++ b/server/app/configurations/queries/vss-domain-events-by-pg.json @@ -0,0 +1,75 @@ +{ + "id":"vss-domain-events-by-pg", + "title":"Top Security Events by Source PG", + "service":"elasticsearch", + "query":{ + "index":"{{index:nuage_event}}", + "type":"{{type:nuage_doc_type}}", + "body":{ + "size":0, + "query":{ + "bool":{ + "must":[ + { + "range":{ + "timestamp":{ + "gte":"{{startTime:now-24h}}", + "lte":"{{endTime:now}}", + "format":"epoch_millis" + } + } + } + ] + } + }, + "aggs": { + "2": { + "filters":{ + "filters":{ + "Enterprise":{ + "query":{ + "term":{ + "nuage_metadata.enterpriseName":"{{enterpriseName:chord_enterprise}}" + } + } + } + } + }, + "aggs": { + "3": { + "filters":{ + "filters":{ + "Domain":{ + "query":{ + "term":{ + "nuage_metadata.domainName":"{{domainName:chord_domain}}" + } + } + } + } + }, + "aggs": { + "PG": { + "terms": { + "field": "nuage_metadata.spgName", + "size": 5, + "order": { + "Sum of Value": "desc" + } + }, + "aggs": { + "Sum of Value": { + "sum": { + "field": "value" + } + } + } + } + } + } + } + } + } + } + } +} diff --git a/server/app/configurations/queries/vss-domain-events-by-type.json b/server/app/configurations/queries/vss-domain-events-by-type.json new file mode 100644 index 00000000..765fc941 --- /dev/null +++ b/server/app/configurations/queries/vss-domain-events-by-type.json @@ -0,0 +1,75 @@ +{ + "id":"vss-domain-events-by-type", + "title":"Top Security Events by Type", + "service":"elasticsearch", + "query":{ + "index":"{{index:nuage_event}}", + "type":"{{type:nuage_doc_type}}", + "body":{ + "size":0, + "query":{ + "bool":{ + "must":[ + { + "range":{ + "timestamp":{ + "gte":"{{startTime:now-24h}}", + "lte":"{{endTime:now}}", + "format":"epoch_millis" + } + } + } + ] + } + }, + "aggs": { + "2": { + "filters":{ + "filters":{ + "Enterprise":{ + "query":{ + "term":{ + "nuage_metadata.enterpriseName":"{{enterpriseName:chord_enterprise}}" + } + } + } + } + }, + "aggs": { + "3": { + "filters":{ + "filters":{ + "Domain":{ + "query":{ + "term":{ + "{{domainType:nuage_metadata.domainName}}":"{{domainName:chord_domain}}" + } + } + } + } + }, + "aggs": { + "EventType": { + "terms": { + "field": "type", + "size": 5, + "order": { + "Sum of Value": "desc" + } + }, + "aggs": { + "Sum of Value": { + "sum": { + "field": "value" + } + } + } + } + } + } + } + } + } + } + } +} diff --git a/server/app/configurations/queries/vss-domain-events-detail.json b/server/app/configurations/queries/vss-domain-events-detail.json new file mode 100644 index 00000000..836e63c7 --- /dev/null +++ b/server/app/configurations/queries/vss-domain-events-detail.json @@ -0,0 +1,24 @@ +{ + "id":"vss-domain-events-detail", + "title":"Event Information", + "service":"elasticsearch", + "query":{ + "index":"{{index:nuage_event}}", + "type":"{{type:nuage_doc_type}}", + "body":{ + "sort": [ + { "timestamp": { "order": "desc" } } + ], + "query": { + "bool": { + "must": [ + {"term": {"nuage_metadata.enterpriseName": "{{enterpriseName:chord_enterprise}}"} }, + {"term": {"{{domainType:nuage_metadata.domainName}}": "{{domainName}}"} }, + {"term": {"type": "{{eventType}}"} }, + {"range": { "timestamp": { "gte": "{{startTime:now-24h}}", "lte": "{{endTime:now}}", "format":"epoch_millis"} }} + ] + } + } + } + } +} diff --git a/server/app/configurations/queries/vss-domain-flow-table.json b/server/app/configurations/queries/vss-domain-flow-table.json new file mode 100644 index 00000000..22be0456 --- /dev/null +++ b/server/app/configurations/queries/vss-domain-flow-table.json @@ -0,0 +1,47 @@ +{ + "id":"vss-domain-flow-table", + "title":"Flow Information", + "service":"elasticsearch", + "query":{ + "index":"{{index:nuage_flow}}", + "type":"{{type:nuage_doc_type}}", + "body":{ + "sort": [ + { "timestamp": { "order": "desc" } } + ], + "query": { + "bool": { + "should": [ + { + "bool": { + "must": [ + {"term": {"nuage_metadata.enterpriseName": "{{enterpriseName:chord_enterprise}}"} }, + {"term": {"{{domainType:nuage_metadata.domainName}}": "{{domainName}}"} }, + {"term": {"nuage_metadata.acl_source_type": "{{source_field}}"} }, + {"term": {"nuage_metadata.acl_destination_type": "{{destination_field}}"} }, + {"term": {"nuage_metadata.acl_destination_name": "{{destination}}"} }, + {"term": {"nuage_metadata.acl_source_name": "{{source}}"} }, + {"term": {"nuage_metadata.acl_destination_name": "{{destination}}"} }, + {"range": { "timestamp": { "gte": "{{startTime:now-24h}}", "lte": "{{endTime:now}}", "format":"epoch_millis"} }} + ] + } + }, + { + "bool": { + "must": [ + {"term": {"nuage_metadata.enterpriseName": "{{enterpriseName:chord_enterprise}}"} }, + {"term": {"{{domainType:nuage_metadata.domainName}}": "{{domainName}}"} }, + {"term": {"nuage_metadata.acl_source_type": "{{source_field}}"} }, + {"term": {"nuage_metadata.acl_destination_type": "{{destination_field}}"} }, + { "term": {"nuage_metadata.acl_source_name": "{{destination}}"} }, + { "term": {"nuage_metadata.acl_destination_name": "{{source}}"} }, + {"range": { "timestamp": {"gte": "{{startTime:now-24h}}", "lte": "{{endTime:now}}", "format":"epoch_millis"} }} + ] + } + } + ] + } + } + } + } +} diff --git a/server/app/configurations/queries/vss-domain-flow.json b/server/app/configurations/queries/vss-domain-flow.json new file mode 100644 index 00000000..f56835f5 --- /dev/null +++ b/server/app/configurations/queries/vss-domain-flow.json @@ -0,0 +1,121 @@ +{ + "id":"vss-domain-flow", + "title":"Flows per Domain", + "service":"elasticsearch", + "query":{ + "index":"{{index:nuage_flow}}", + "type":"{{type:nuage_doc_type}}", + "body":{ + "size":0, + "query":{ + "bool":{ + "must":[ + { + "range":{ + "timestamp":{ + "gte":"{{startTime:now-24h}}", + "lte":"{{endTime:now}}", + "format":"epoch_millis" + } + } + } + ] + } + }, + "aggs": { + "2": { + "filters":{ + "filters":{ + "Enterprise":{ + "query":{ + "term":{ + "nuage_metadata.enterpriseName":"{{enterpriseName:chord_enterprise}}" + } + } + } + } + }, + "aggs": { + "3": { + "filters":{ + "filters":{ + "Domain":{ + "query":{ + "term":{ + "{{domainType:nuage_metadata.domainName}}":"{{domainName:chord_domain}}" + } + } + } + } + }, + "aggs": { + "4": { + "filters":{ + "filters":{ + "SourceType":{ + "query":{ + "term":{ + "nuage_metadata.acl_source_type":"{{source_field:pg}}" + } + } + } + } + }, + "aggs": { + "5": { + "filters":{ + "filters":{ + "DestinationType":{ + "query":{ + "term":{ + "nuage_metadata.acl_destination_type":"{{destination_field:pg}}" + } + } + } + } + }, + "aggs": { + "source": { + "terms": { + "field": "nuage_metadata.acl_source_name", + "size": 5, + "order": { + "SumOf": "desc" + } + }, + "aggs": { + "SumOf": { + "sum": { + "field": "packets" + } + }, + "destination": { + "terms": { + "field": "nuage_metadata.acl_destination_name", + "size": 5, + "order": { + "SumOf": "desc" + } + }, + "aggs": { + "SumOf": { + "sum": { + "field": "packets" + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } +} diff --git a/server/app/configurations/queries/vss-domain-traffic-icmp.json b/server/app/configurations/queries/vss-domain-traffic-icmp.json new file mode 100644 index 00000000..394baaad --- /dev/null +++ b/server/app/configurations/queries/vss-domain-traffic-icmp.json @@ -0,0 +1,102 @@ +{ + "id":"vss-domain-traffic-icmp", + "title":"ICMP connections vs Time", + "service":"elasticsearch", + "query":{ + "index":"{{index:nuage_flow}}", + "type":"{{type:nuage_doc_type}}", + "body":{ + "size":0, + "query":{ + "bool":{ + "must":[ + { + "range":{ + "timestamp":{ + "gte":"{{startTime:now-24h}}", + "lte":"{{endTime:now}}", + "format":"epoch_millis" + } + } + } + ] + } + }, + "aggs": { + "2": { + "filters":{ + "filters":{ + "Enterprise":{ + "query":{ + "term":{ + "nuage_metadata.enterpriseName":"{{enterpriseName:chord_enterprise}}" + } + } + } + } + }, + "aggs": { + "3": { + "filters":{ + "filters":{ + "Domain":{ + "query":{ + "term":{ + "{{domainType:nuage_metadata.domainName}}":"{{domainName:chord_domain}}" + } + } + } + } + }, + "aggs": { + "4": { + "filters": { + "filters": { + "ACLALLOW": { + "query": { + "term": { + "type": "{{actionType:ALLOW}}" + } + } + } + } + }, + "aggs": { + "5": { + "filters": { + "filters": { + "Protocol": { + "query": { + "term": { + "protocol": "ICMP" + } + } + } + } + }, + "aggs": { + "timestamp": { + "date_histogram": { + "field": "timestamp", + "interval": "{{interval:1h}}" + }, + "aggs": { + "SumOf": { + "sum": { + "field": "packets" + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } +} diff --git a/server/app/configurations/queries/vss-domain-traffic-tcp-conn.json b/server/app/configurations/queries/vss-domain-traffic-tcp-conn.json new file mode 100644 index 00000000..76521b1b --- /dev/null +++ b/server/app/configurations/queries/vss-domain-traffic-tcp-conn.json @@ -0,0 +1,102 @@ +{ + "id":"vss-domain-traffic-tcp-conn", + "title":"TCP connections vs Time", + "service":"elasticsearch", + "query":{ + "index":"{{index:nuage_flow}}", + "type":"{{type:nuage_doc_type}}", + "body":{ + "size":0, + "query":{ + "bool":{ + "must":[ + { + "range":{ + "timestamp":{ + "gte":"{{startTime:now-24h}}", + "lte":"{{endTime:now}}", + "format":"epoch_millis" + } + } + } + ] + } + }, + "aggs": { + "2": { + "filters":{ + "filters":{ + "Enterprise":{ + "query":{ + "term":{ + "nuage_metadata.enterpriseName":"{{enterpriseName:chord_enterprise}}" + } + } + } + } + }, + "aggs": { + "3": { + "filters":{ + "filters":{ + "Domain":{ + "query":{ + "term":{ + "{{domainType:nuage_metadata.domainName}}":"{{domainName:chord_domain}}" + } + } + } + } + }, + "aggs": { + "4": { + "filters": { + "filters": { + "ACLALLOW": { + "query": { + "term": { + "type": "{{actionType:ALLOW}}" + } + } + } + } + }, + "aggs": { + "5": { + "filters": { + "filters": { + "Protocol": { + "query": { + "term": { + "protocol": "TCP" + } + } + } + } + }, + "aggs": { + "timestamp": { + "date_histogram": { + "field": "timestamp", + "interval": "{{interval:1h}}" + }, + "aggs": { + "SumOf": { + "sum": { + "field": "packets" + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } +} diff --git a/server/app/configurations/queries/vss-domain-traffic-tcp-multiline.json b/server/app/configurations/queries/vss-domain-traffic-tcp-multiline.json new file mode 100644 index 00000000..38a8eabc --- /dev/null +++ b/server/app/configurations/queries/vss-domain-traffic-tcp-multiline.json @@ -0,0 +1,102 @@ +{ + "id":"vss-domain-traffic-tcp-multiline", + "title":"TCP traffic per Domain", + "service":"elasticsearch", + "query":{ + "index":"{{index:nuage_flow}}", + "type":"{{type:nuage_doc_type}}", + "body":{ + "size":0, + "query":{ + "bool":{ + "must":[ + { + "range":{ + "timestamp":{ + "gte":"{{startTime:now-24h}}", + "lte":"{{endTime:now}}", + "format":"epoch_millis" + } + } + } + ] + } + }, + "aggs": { + "2": { + "filters":{ + "filters":{ + "Enterprise":{ + "query":{ + "term":{ + "nuage_metadata.enterpriseName":"{{enterpriseName:chord_enterprise}}" + } + } + } + } + }, + "aggs": { + "3": { + "filters":{ + "filters":{ + "Domain":{ + "query":{ + "term":{ + "nuage_metadata.domainName":"{{domainName:chord_domain}}" + } + } + } + } + }, + "aggs": { + "timestamp": { + "date_histogram": { + "field": "timestamp", + "interval": "1h" + }, + "aggs": { + "SYN": { + "sum": { + "field": "tcpflags.SYN" + } + }, + "SYN-ACK": { + "sum": { + "field": "tcpflags.SYN-ACK" + } + }, + "ACK": { + "sum": { + "field": "tcpflags.ACK" + } + }, + "FIN": { + "sum": { + "field": "tcpflags.FIN" + } + }, + "FIN-ACK": { + "sum": { + "field": "tcpflags.FIN-ACK" + } + }, + "NULL": { + "sum": { + "field": "tcpflags.NULL" + } + }, + "RST": { + "sum": { + "field": "tcpflags.RST" + } + } + } + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/server/app/configurations/queries/vss-domain-traffic-tcp-syn.json b/server/app/configurations/queries/vss-domain-traffic-tcp-syn.json new file mode 100644 index 00000000..fbd8a3e8 --- /dev/null +++ b/server/app/configurations/queries/vss-domain-traffic-tcp-syn.json @@ -0,0 +1,72 @@ +{ + "id":"vss-domain-traffic-tcp", + "title":"TCP traffic per Domain", + "service":"elasticsearch", + "query":{ + "index":"{{index:nuage_flow}}", + "type":"{{type:nuage_doc_type}}", + "body":{ + "size":0, + "query":{ + "bool":{ + "must":[ + { + "range":{ + "timestamp":{ + "gte":"{{startTime:now-24h}}", + "lte":"{{endTime:now}}", + "format":"epoch_millis" + } + } + } + ] + } + }, + "aggs": { + "2": { + "filters":{ + "filters":{ + "Enterprise":{ + "query":{ + "term":{ + "nuage_metadata.enterpriseName":"{{enterpriseName:chord_enterprise}}" + } + } + } + } + }, + "aggs": { + "3": { + "filters":{ + "filters":{ + "Domain":{ + "query":{ + "term":{ + "nuage_metadata.domainName":"{{domainName:chord_domain}}" + } + } + } + } + }, + "aggs": { + "timestamp": { + "date_histogram": { + "field": "timestamp", + "interval": "1h" + }, + "aggs": { + "flag": { + "sum": { + "field": "tcpflags.{{flagtype}}" + } + } + } + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/server/app/configurations/queries/vss-domain-traffic-tcp-synflood.json b/server/app/configurations/queries/vss-domain-traffic-tcp-synflood.json new file mode 100644 index 00000000..eee7047c --- /dev/null +++ b/server/app/configurations/queries/vss-domain-traffic-tcp-synflood.json @@ -0,0 +1,87 @@ +{ + "id":"vss-domain-traffic-tcp-synflood", + "title":"TCP-SYN Flood vs Time", + "service":"elasticsearch", + "query":{ + "index":"{{index:nuage_event}}", + "type":"{{type:nuage_doc_type}}", + "body":{ + "size":0, + "query":{ + "bool":{ + "must":[ + { + "range":{ + "timestamp":{ + "gte":"{{startTime:now-24h}}", + "lte":"{{endTime:now}}", + "format":"epoch_millis" + } + } + } + ] + } + }, + "aggs": { + "2": { + "filters":{ + "filters":{ + "Enterprise":{ + "query":{ + "term":{ + "nuage_metadata.enterpriseName":"{{enterpriseName:chord_enterprise}}" + } + } + } + } + }, + "aggs": { + "3": { + "filters":{ + "filters":{ + "Domain":{ + "query":{ + "term":{ + "{{domainType:nuage_metadata.domainName}}":"{{domainName:chord_domain}}" + } + } + } + } + }, + "aggs": { + "4": { + "filters": { + "filters": { + "TYPE": { + "query": { + "term": { + "type": "TCP_SYN_FLOOD" + } + } + } + } + }, + "aggs": { + "timestamp": { + "date_histogram": { + "field": "timestamp", + "interval": "{{interval:1h}}" + }, + "aggs": { + "SumOf": { + "sum": { + "field": "value" + } + } + } + } + } + } + } + } + } + } + } + } + } +} diff --git a/server/app/configurations/queries/vss-domain-traffic-top-dpg.json b/server/app/configurations/queries/vss-domain-traffic-top-dpg.json new file mode 100644 index 00000000..c38dbb70 --- /dev/null +++ b/server/app/configurations/queries/vss-domain-traffic-top-dpg.json @@ -0,0 +1,75 @@ +{ + "id":"vss-domain-traffic-top-dpg", + "title":"Top Destination PG by Count", + "service":"elasticsearch", + "query":{ + "index":"{{index:nuage_flow}}", + "type":"{{type:nuage_doc_type}}", + "body":{ + "size":0, + "query":{ + "bool":{ + "must":[ + { + "range":{ + "timestamp":{ + "gte":"{{startTime:now-24h}}", + "lte":"{{endTime:now}}", + "format":"epoch_millis" + } + } + } + ] + } + }, + "aggs": { + "2": { + "filters":{ + "filters":{ + "Enterprise":{ + "query":{ + "term":{ + "nuage_metadata.enterpriseName":"{{enterpriseName:chord_enterprise}}" + } + } + } + } + }, + "aggs": { + "3": { + "filters":{ + "filters":{ + "Domain":{ + "query":{ + "term":{ + "{{domainType:nuage_metadata.domainName}}":"{{domainName:chord_domain}}" + } + } + } + } + }, + "aggs": { + "dpg": { + "terms": { + "field": "nuage_metadata.dpgName", + "size": 5, + "order": { + "SumOf": "desc" + } + }, + "aggs": { + "SumOf": { + "sum": { + "field": "packets" + } + } + } + } + } + } + } + } + } + } + } +} diff --git a/server/app/configurations/queries/vss-domain-traffic-top-spg.json b/server/app/configurations/queries/vss-domain-traffic-top-spg.json new file mode 100644 index 00000000..766aee82 --- /dev/null +++ b/server/app/configurations/queries/vss-domain-traffic-top-spg.json @@ -0,0 +1,75 @@ +{ + "id":"vss-domain-traffic-top-spg", + "title":"Top Source PG by Count", + "service":"elasticsearch", + "query":{ + "index":"{{index:nuage_flow}}", + "type":"{{type:nuage_doc_type}}", + "body":{ + "size":0, + "query":{ + "bool":{ + "must":[ + { + "range":{ + "timestamp":{ + "gte":"{{startTime:now-24h}}", + "lte":"{{endTime:now}}", + "format":"epoch_millis" + } + } + } + ] + } + }, + "aggs": { + "2": { + "filters":{ + "filters":{ + "Enterprise":{ + "query":{ + "term":{ + "nuage_metadata.enterpriseName":"{{enterpriseName:chord_enterprise}}" + } + } + } + } + }, + "aggs": { + "3": { + "filters":{ + "filters":{ + "Domain":{ + "query":{ + "term":{ + "{{domainType:nuage_metadata.domainName}}":"{{domainName:chord_domain}}" + } + } + } + } + }, + "aggs": { + "spg": { + "terms": { + "field": "nuage_metadata.spgName", + "size": 5, + "order": { + "SumOf": "desc" + } + }, + "aggs": { + "SumOf": { + "sum": { + "field": "packets" + } + } + } + } + } + } + } + } + } + } + } +} diff --git a/server/app/configurations/queries/vss-domain-traffic-udp.json b/server/app/configurations/queries/vss-domain-traffic-udp.json new file mode 100644 index 00000000..d7249ab1 --- /dev/null +++ b/server/app/configurations/queries/vss-domain-traffic-udp.json @@ -0,0 +1,102 @@ +{ + "id":"vss-domain-traffic-udp", + "title":"UDP vs Time", + "service":"elasticsearch", + "query":{ + "index":"{{index:nuage_flow}}", + "type":"{{type:nuage_doc_type}}", + "body":{ + "size":0, + "query":{ + "bool":{ + "must":[ + { + "range":{ + "timestamp":{ + "gte":"{{startTime:now-24h}}", + "lte":"{{endTime:now}}", + "format":"epoch_millis" + } + } + } + ] + } + }, + "aggs": { + "2": { + "filters":{ + "filters":{ + "Enterprise":{ + "query":{ + "term":{ + "nuage_metadata.enterpriseName":"{{enterpriseName:chord_enterprise}}" + } + } + } + } + }, + "aggs": { + "3": { + "filters":{ + "filters":{ + "Domain":{ + "query":{ + "term":{ + "{{domainType:nuage_metadata.domainName}}":"{{domainName:chord_domain}}" + } + } + } + } + }, + "aggs": { + "4": { + "filters": { + "filters": { + "ACLALLOW": { + "query": { + "term": { + "type": "{{actionType:ALLOW}}" + } + } + } + } + }, + "aggs": { + "5": { + "filters": { + "filters": { + "Protocol": { + "query": { + "term": { + "protocol": "UDP" + } + } + } + } + }, + "aggs": { + "timestamp": { + "date_histogram": { + "field": "timestamp", + "interval": "{{interval:1h}}" + }, + "aggs": { + "SumOf": { + "sum": { + "field": "packets" + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } +} diff --git a/server/app/configurations/queries/vss-ent-acldeny-time.json b/server/app/configurations/queries/vss-ent-acldeny-time.json new file mode 100644 index 00000000..e15e6489 --- /dev/null +++ b/server/app/configurations/queries/vss-ent-acldeny-time.json @@ -0,0 +1,72 @@ +{ + "id":"vss-enterprise-acldeny-time", + "title":"ACL Deny vs Time", + "service":"elasticsearch", + "query":{ + "index":"{{index:nuage_flow}}", + "type":"{{type:nuage_doc_type}}", + "body":{ + "size":0, + "query":{ + "bool":{ + "must":[ + { + "range":{ + "timestamp":{ + "gte":"{{startTime:now-24h}}", + "lte":"{{endTime:now}}", + "format":"epoch_millis" + } + } + } + ] + } + }, + "aggs": { + "2": { + "filters":{ + "filters":{ + "Enterprise":{ + "query":{ + "term":{ + "nuage_metadata.enterpriseName":"{{enterpriseName:chord_enterprise}}" + } + } + } + } + }, + "aggs": { + "4": { + "filters": { + "filters": { + "ACLDENY": { + "query": { + "term": { + "type": "DENY" + } + } + } + } + }, + "aggs": { + "timestamp": { + "date_histogram": { + "field": "timestamp", + "interval": "{{interval:1h}}" + }, + "aggs": { + "SumOf": { + "sum": { + "field": "packets" + } + } + } + } + } + } + } + } + } + } + } +} diff --git a/server/app/configurations/queries/vss-enterprise-acldeny-metric.json b/server/app/configurations/queries/vss-enterprise-acldeny-metric.json new file mode 100644 index 00000000..6dca2686 --- /dev/null +++ b/server/app/configurations/queries/vss-enterprise-acldeny-metric.json @@ -0,0 +1,66 @@ +{ + "id":"vss-enterprise-acldeny-metric", + "title":"ACL Deny count per enterprise", + "service":"elasticsearch", + "query":{ + "index":"{{index:nuage_event}}", + "type":"{{type:nuage_doc_type}}", + "body":{ + "size": 0, + "aggs": { + "2": { + "filters":{ + "filters":{ + "Domain":{ + "query":{ + "term":{ + "nuage_metadata.enterpriseName":"{{enterpriseName:chord_enterprise}}" + } + } + } + } + }, + "aggs": { + "timezones": { + "filters": { + "filters": { + "Prev 24": { + "range": { + "timestamp": { + "gte": "now-48h", + "lte": "now-24h" + } + } + }, + "Last 24": { + "range": { + "timestamp": { + "gte": "now-24h", + "lte": "now" + } + } + } + } + }, + "aggs": { + "types": { + "filters": { + "filters": { + "type": { + "query": { + "term": { + "type": "ACL_DENY" + } + } + } + } + } + } + } + } + } + } + } + } + } +} diff --git a/server/app/configurations/queries/vss-enterprise-alerts-metric.json b/server/app/configurations/queries/vss-enterprise-alerts-metric.json new file mode 100644 index 00000000..e0f84802 --- /dev/null +++ b/server/app/configurations/queries/vss-enterprise-alerts-metric.json @@ -0,0 +1,66 @@ +{ + "id":"vss-enterprise-alerts-metric", + "title":"Alerts count per enterprise", + "service":"elasticsearch", + "query":{ + "index":"{{index:nuage_event}}", + "type":"{{type:nuage_doc_type}}", + "body":{ + "size": 0, + "aggs": { + "2": { + "filters":{ + "filters":{ + "Domain":{ + "query":{ + "term":{ + "nuage_metadata.enterpriseName":"{{enterpriseName:chord_enterprise}}" + } + } + } + } + }, + "aggs": { + "timezones": { + "filters": { + "filters": { + "Prev 24": { + "range": { + "timestamp": { + "gte": "now-48h", + "lte": "now-24h" + } + } + }, + "Last 24": { + "range": { + "timestamp": { + "gte": "now-24h", + "lte": "now" + } + } + } + } + }, + "aggs": { + "types": { + "filters": { + "filters": { + "type": { + "query": { + "term": { + "type": "TCA_EVENT" + } + } + } + } + } + } + } + } + } + } + } + } + } +} diff --git a/server/app/configurations/queries/vss-enterprise-events-metric.json b/server/app/configurations/queries/vss-enterprise-events-metric.json new file mode 100644 index 00000000..de666aee --- /dev/null +++ b/server/app/configurations/queries/vss-enterprise-events-metric.json @@ -0,0 +1,51 @@ +{ + "id":"vss-enterprise-events-metric", + "title":"Events count per enterprise", + "service":"elasticsearch", + "query":{ + "index":"{{index:nuage_event}}", + "type":"{{type:nuage_doc_type}}", + "body":{ + "size": 0, + "aggs": { + "2": { + "filters":{ + "filters":{ + "Domain":{ + "query":{ + "term":{ + "nuage_metadata.enterpriseName":"{{enterpriseName:chord_enterprise}}" + } + } + } + } + }, + "aggs": { + "timezones": { + "filters": { + "filters": { + "Prev 24": { + "range": { + "timestamp": { + "gte": "{{prevStartTime:now-48h}}", + "lte": "{{startTime:now-24h}}" + } + } + }, + "Last 24": { + "range": { + "timestamp": { + "gte": "{{startTime:now-24h}}", + "lte": "{{endTime:now}}" + } + } + } + } + } + } + } + } + } + } + } +} diff --git a/server/app/configurations/queries/vss-enterprise-flows-metric.json b/server/app/configurations/queries/vss-enterprise-flows-metric.json new file mode 100644 index 00000000..b1a1fd20 --- /dev/null +++ b/server/app/configurations/queries/vss-enterprise-flows-metric.json @@ -0,0 +1,58 @@ +{ + "id":"vss-enterprise-flows-metric", + "title":"Flows count per enterprise", + "service":"elasticsearch", + "query":{ + "index":"{{index:nuage_flow}}", + "type":"{{type:nuage_doc_type}}", + "body":{ + "size": 0, + "aggs": { + "2": { + "filters":{ + "filters":{ + "Domain":{ + "query":{ + "term":{ + "nuage_metadata.enterpriseName":"{{enterpriseName:chord_enterprise}}" + } + } + } + } + }, + "aggs": { + "timezones": { + "filters": { + "filters": { + "Prev 24": { + "range": { + "timestamp": { + "gte": "now-48h", + "lte": "now-24h" + } + } + }, + "Last 24": { + "range": { + "timestamp": { + "gte": "now-24h", + "lte": "now" + } + } + } + } + }, + "aggs": { + "SumOf": { + "sum": { + "field": "packets" + } + } + } + } + } + } + } + } + } +} diff --git a/server/app/configurations/queries/vss-enterprise-pg-metric.json b/server/app/configurations/queries/vss-enterprise-pg-metric.json new file mode 100644 index 00000000..a2a760fb --- /dev/null +++ b/server/app/configurations/queries/vss-enterprise-pg-metric.json @@ -0,0 +1,58 @@ +{ + "id":"vss-enterprise-pg-metric", + "title":"Distinct PG count per enterprise", + "service":"elasticsearch", + "query":{ + "index":"{{index:nuage_flow}}", + "type":"{{type:nuage_doc_type}}", + "body":{ + "size": 0, + "aggs": { + "2": { + "filters":{ + "filters":{ + "Domain":{ + "query":{ + "term":{ + "nuage_metadata.enterpriseName":"{{enterpriseName:chord_enterprise}}" + } + } + } + } + }, + "aggs": { + "timezones": { + "filters": { + "filters": { + "Prev 24": { + "range": { + "timestamp": { + "gte": "now-48h", + "lte": "now-24h" + } + } + }, + "Last 24": { + "range": { + "timestamp": { + "gte": "now-24h", + "lte": "now" + } + } + } + } + }, + "aggs": { + "pg_count": { + "cardinality": { + "field": "nuage_metadata.spgName" + } + } + } + } + } + } + } + } + } +} diff --git a/server/app/configurations/queries/vss-top-domains-blocked-traffic.json b/server/app/configurations/queries/vss-top-domains-blocked-traffic.json new file mode 100644 index 00000000..a4a10fc3 --- /dev/null +++ b/server/app/configurations/queries/vss-top-domains-blocked-traffic.json @@ -0,0 +1,75 @@ +{ + "id":"vss-topdomains-blocked-traffic", + "title":"Top Domains with Blocked Traffic", + "service":"elasticsearch", + "query":{ + "index":"{{index:nuage_flow}}", + "type":"{{type:nuage_doc_type}}", + "body":{ + "size":0, + "query":{ + "bool":{ + "must":[ + { + "range":{ + "timestamp":{ + "gte":"{{startTime:now-24h}}", + "lte":"{{endTime:now}}", + "format":"epoch_millis" + } + } + } + ] + } + }, + "aggs": { + "2": { + "filters":{ + "filters":{ + "Enterprise":{ + "query":{ + "term":{ + "nuage_metadata.enterpriseName":"{{enterpriseName:chord_enterprise}}" + } + } + } + } + }, + "aggs": { + "4": { + "filters": { + "filters": { + "ACLDENY": { + "query": { + "term": { + "type": "DENY" + } + } + } + } + }, + "aggs": { + "domains": { + "terms": { + "field": "nuage_metadata.domainName", + "size": 5, + "order": { + "SumOf": "desc" + } + }, + "aggs": { + "SumOf": { + "sum": { + "field": "packets" + } + } + } + } + } + } + } + } + } + } + } +} diff --git a/server/app/configurations/queries/vss-top-sec-events.json b/server/app/configurations/queries/vss-top-sec-events.json new file mode 100644 index 00000000..00ed0768 --- /dev/null +++ b/server/app/configurations/queries/vss-top-sec-events.json @@ -0,0 +1,65 @@ +{ + "id":"vss-top-sec-events", + "title":"Top Security Events by Type", + "service":"elasticsearch", + "query":{ + "index":"{{index:nuage_event}}", + "type":"{{type:nuage_doc_type}}", + "body":{ + "size":0, + "query":{ + "bool":{ + "must":[ + { + "range":{ + "timestamp":{ + "gte":"{{startTime:now-24h}}", + "lte":"{{endTime:now}}", + "format":"epoch_millis" + } + } + } + ] + } + }, + "aggs": { + "2": { + "filters":{ + "filters":{ + "Enterprise":{ + "query":{ + "term":{ + "nuage_metadata.enterpriseName":"{{enterpriseName:chord_enterprise}}" + } + } + } + } + }, + "aggs": { + "SumOf": { + "sum": { + "field": "value" + } + }, + "EventType": { + "terms": { + "field": "type", + "size": 5, + "order": { + "SumOf": "desc" + } + }, + "aggs": { + "SumOf": { + "sum": { + "field": "value" + } + } + } + } + } + } + } + } + } +} diff --git a/server/app/configurations/visualizations/aar-domain-probe-path.json b/server/app/configurations/visualizations/aar-domain-probe-path.json new file mode 100644 index 00000000..04cb79c2 --- /dev/null +++ b/server/app/configurations/visualizations/aar-domain-probe-path.json @@ -0,0 +1,20 @@ +{ + "id": "aar-domain-probe-path", + "graph": "ChordGraph", + "title": "Path Performance Measurements", + "description": "Domain level top 10 NSG Path Performance Measurements. Computation: Count of NSGs with highest counts of probe records for the displayed time span.", + "author": "Ronak Shah and Curran Kelleher", + "creationDate": "11/02/2016", + "data": { + "chordSourceColumn": "snsg", + "chordDestinationColumn": "dnsg", + "colorColumn": "snsg" + }, + "listeners": [{ + "params": { + "snsg": "snsg", + "dnsg": "dnsg" + } + }], + "query": "aar-domain-probe-path" +} diff --git a/server/app/configurations/visualizations/aar-domain-probe-table-dest-to-src.json b/server/app/configurations/visualizations/aar-domain-probe-table-dest-to-src.json new file mode 100644 index 00000000..b9312eb1 --- /dev/null +++ b/server/app/configurations/visualizations/aar-domain-probe-table-dest-to-src.json @@ -0,0 +1,21 @@ +{ + "id": "aar-domain-probe-table-dest-to-src", + "graph": "Table", + "title": "{{dnsg}} ({{toTitlePersonality}}) to {{snsg}} ({{fromTitlePersonality}}) Probe Detail", + "description": "Domain level, 10 most recent Path Performance Measurements from remote NSG or NSGUBR as source to local NSG or NSGUBR as destination. Computation: Order by time in descending order.", + "author": "Ronak Shah", + "creationDate": "11/02/2016", + "data": { + "columns": [ + { "column": "timestamp", "label": "Timestamp", "timeFormat": "%b %d, %y %X"}, + { "column": "SrcUplink", "label": "Source Uplink" }, + { "column": "DstUplink", "label": "Destination Uplink" }, + { "column": "UnderlayName", "label": "Underlay Name" }, + { "column": "PerfMonitor", "label": "Perf Monitor" }, + { "column": "AvgJitter", "label": "Avg Jitter", "format": ",.2f" }, + { "column": "AvgDelay", "label": "Avg Latency", "format": ",.2f" }, + { "column": "AvgPktLoss", "label": "Avg Pkt Loss", "format": ",.2f"} + ] + }, + "query": "aar-domain-probe-table-dest-to-src" +} diff --git a/server/app/configurations/visualizations/aar-domain-probe-table.json b/server/app/configurations/visualizations/aar-domain-probe-table.json new file mode 100644 index 00000000..7b5562a4 --- /dev/null +++ b/server/app/configurations/visualizations/aar-domain-probe-table.json @@ -0,0 +1,21 @@ +{ + "id": "aar-domain-probe-table", + "graph": "Table", + "title": "{{snsg}} ({{fromTitlePersonality}}) to {{dnsg}} ({{toTitlePersonality}}) Probe Detail", + "description": "Domain level, 10 most recent Path Performance Measurements from local NSG or NSGUBR as source to remote NSG or NSGUBR as destination. Computation: Order by time in descending order.", + "author": "Ronak Shah", + "creationDate": "11/02/2016", + "data": { + "columns": [ + { "column": "timestamp", "label": "Timestamp", "timeFormat": "%b %d, %y %X"}, + { "column": "SrcUplink", "label": "Source Uplink" }, + { "column": "DstUplink", "label": "Destination Uplink" }, + { "column": "UnderlayName", "label": "Underlay Name" }, + { "column": "PerfMonitor", "label": "Perf Monitor" }, + { "column": "AvgJitter", "label": "Avg Jitter", "format": ",.2f" }, + { "column": "AvgDelay", "label": "Avg Latency", "format": ",.2f" }, + { "column": "AvgPktLoss", "label": "Avg Pkt Loss", "format": ",.2f"} + ] + }, + "query": "aar-domain-probe-table" +} diff --git a/server/app/configurations/visualizations/aar-domain-top5-apmg.json b/server/app/configurations/visualizations/aar-domain-top5-apmg.json new file mode 100644 index 00000000..172f38a8 --- /dev/null +++ b/server/app/configurations/visualizations/aar-domain-top5-apmg.json @@ -0,0 +1,18 @@ +{ + "id": "aar-domain-top5-apmg", + "graph": "PieGraph", + "title": "Top 5 Application Groups (Mbps)", + "description": "Domain level top 5 Application Performance Management Groups. Computation: Sum of total Bytes sent and/or received in descending order.", + "author": "Ronak Shah", + "creationDate": "10/26/2016", + "data": { + "tooltip": [ + { "column": "APMGroup", "label": "APMGroup" }, + { "column": "Sum of MB", "label": "Total Bytes(MB)", "format": ",.2f"} + ], + "sliceColumn": "Sum of MB", + "labelColumn": "APMGroup", + "colorColumn": "APMGroup" + }, + "query": "aar-domain-top5-apmg" +} diff --git a/server/app/configurations/visualizations/aar-flow-sla-heatmap.json b/server/app/configurations/visualizations/aar-flow-sla-heatmap.json new file mode 100644 index 00000000..cf95bc7a --- /dev/null +++ b/server/app/configurations/visualizations/aar-flow-sla-heatmap.json @@ -0,0 +1,28 @@ +{ + "id": "aar-flow-sla-heatmap", + "graph": "HeatmapGraph", + "title": "Heatmap Chart Example", + "author": "Anil Chauhan", + "creationDate": "03/04/2017", + "data": { + "xColumn": "date_histo", + "xLabel": "Time", + "yColumn": "application", + "yTickGrid": false, + "yLabel": "Application", + "legendColumn": "slastatus", + "cellColumn": "slastatus", + "legend": { + "show": true, + "orientation": "horizontal", + "circleSize": 4, + "labelOffset": 2 + }, + "tooltip": [ + { "column": "date_histo", "label": "Timestamp", "timeFormat": "%b %d, %y %X"}, + { "column": "application", "label": "Application" }, + { "column": "slastatus", "label": "Status" } + ] + }, + "query": "aar-flow-sla-heatmap" +} diff --git a/server/app/configurations/visualizations/aar-nsg-app-from-nsg.json b/server/app/configurations/visualizations/aar-nsg-app-from-nsg.json new file mode 100644 index 00000000..afbb4f7b --- /dev/null +++ b/server/app/configurations/visualizations/aar-nsg-app-from-nsg.json @@ -0,0 +1,22 @@ +{ + "id": "aar-nsg-app-from-nsg", + "graph": "Table", + "title": "Application - From NSG", + "description": "This graph shows application usage per path between source and destination NSG. Computation: Sum of ingress Bytes in descending order", + "author": "Ronak Shah", + "creationDate": "10/13/2016", + "data": { + "columns": [ + { "column": "APMGroup", "label": "APM Group" }, + { "column": "Application", "label": "Application" }, + { "column": "L7Classification", "label": "L7 Classification" }, + { "column": "SrcVportName", "label": "Source Vport" }, + { "column": "SrcUplink", "label": "Source Uplink" }, + { "column": "SrcUplinkRole", "label": "Source Uplink Role" }, + { "column": "DestinationNSG", "label": "Destination NSG" }, + { "column": "SumofPackets", "label": "Total Packets", "format": ",.2s"}, + { "column": "SumofBytes", "label": "Total Bytes", "format": ",.2s" } + ] + }, + "query": "aar-nsg-app-from-nsg" +} diff --git a/server/app/configurations/visualizations/aar-nsg-app-linechart.json b/server/app/configurations/visualizations/aar-nsg-app-linechart.json new file mode 100644 index 00000000..3f00ce33 --- /dev/null +++ b/server/app/configurations/visualizations/aar-nsg-app-linechart.json @@ -0,0 +1,51 @@ +{ + "id": "aar-nsg-app-linechart", + "graph": "LineGraph", + "title": "Top 5 Discovered Applications Usage Over Time", + "description": "NSG level discovered application total bytes usage over time. Layer-7 Classification includes discovered applications including Common Name in TLS certificates when available.Computation: Sum of total Bytes sent and/or received for a given interval displayed over the configured time span. Possible values are: If time span = Last 15 minutes: interval is 1 minute, If time span = Last 24 hours: interval is 1 hour, If time span = Last 7 days: interval is 12 hours", + "author": "Ronak Shah", + "creationDate": "11/07/2016", + "data": { + "xColumn": "ts", + "yColumn": "SumOf", + "yTickFormat": ".2s", + "xLabel": "Time", + "yLabel": "{{metric:Total Bytes}}", + "stroke": { + "color": "#f76159", + "width": "2px" + }, + "colors": [ + "#6b94ec", + "#e78ac3", + "#f9b13d", + "#b3d645", + "#ffd92f", + "#aa97f2", + "#f76159", + "#d9d9d9" + ], + "tooltip": [ + { "column": "L7Classification" } + ], + "linesColumn": "L7Classification" + }, + "filterOptions": { + "Metric": { + "parameter": "metric", + "default": "TotalBytesCount", + "options": [ + { + "label": "Total Bytes", + "value": "TotalBytesCount", + "default": true + }, + { + "label": "Total Packets", + "value": "TotalPacketsCount" + } + ] + } + }, + "query": "aar-nsg-app-linechart" +} diff --git a/server/app/configurations/visualizations/aar-nsg-app-to-nsg.json b/server/app/configurations/visualizations/aar-nsg-app-to-nsg.json new file mode 100644 index 00000000..5500112b --- /dev/null +++ b/server/app/configurations/visualizations/aar-nsg-app-to-nsg.json @@ -0,0 +1,22 @@ +{ + "id": "aar-nsg-app-to-nsg", + "graph": "Table", + "title": "Application - To NSG", + "description": "NSG level report of applications connected to remote NSGs sending traffic to local (this) NSG. Computation: Sum of ingress Bytes in descending order.", + "author": "Ronak Shah", + "creationDate": "11/07/2016", + "data": { + "columns": [ + { "column": "APMGroup", "label": "APM Group" }, + { "column": "Application", "label": "Application" }, + { "column": "L7Classification", "label": "L7 Classification" }, + { "column": "DestVportName", "label": "Destination Vport" }, + { "column": "DstUplink", "label": "Destination Uplink" }, + { "column": "DstUplinkRole", "label": "Destination Uplink Role" }, + { "column": "DestinationNSG", "label": "Destination NSG" }, + { "column": "SumofPackets", "label": "Total Packets", "format": ",.2s"}, + { "column": "SumofBytes", "label": "Total Bytes", "format": ",.2s" } + ] + }, + "query": "aar-nsg-app-to-nsg" +} diff --git a/server/app/configurations/visualizations/aar-nsg-gauge-chart.json b/server/app/configurations/visualizations/aar-nsg-gauge-chart.json new file mode 100644 index 00000000..15d717b7 --- /dev/null +++ b/server/app/configurations/visualizations/aar-nsg-gauge-chart.json @@ -0,0 +1,13 @@ +{ + "id": "aar-nsg-gauge-chart", + "graph": "GaugeGraph", + "title": "Gauge Chart Example", + "author": "Anil Chauhan", + "creationDate": "07/04/2017", + "data": { + "maxValue": "100", + "currentValue": "10", + "gauzeTicks": "10" + }, + "query": "aar-flow-sla-heatmap" +} diff --git a/server/app/configurations/visualizations/aar-nsg-line-chart.json b/server/app/configurations/visualizations/aar-nsg-line-chart.json new file mode 100644 index 00000000..1fa3fa5e --- /dev/null +++ b/server/app/configurations/visualizations/aar-nsg-line-chart.json @@ -0,0 +1,16 @@ +{ + "id": "aar-nsg-line-chart", + "graph": "LineGraph", + "title": "Multi-Line Chart Example", + "author": "Curran Kelleher", + "creationDate": "11/08/2016", + "data": { + "xColumn": "ts", + "xLabel": "Time", + "yColumn": "SumOf", + "yLabel": "Total MB", + "yTicks": 5, + "linesColumn": "L7Classification" + }, + "query": "aar-nsg-app-linechart" +} diff --git a/server/app/configurations/visualizations/aar-nsg-sla-from-nsg.json b/server/app/configurations/visualizations/aar-nsg-sla-from-nsg.json new file mode 100644 index 00000000..c6aff5b0 --- /dev/null +++ b/server/app/configurations/visualizations/aar-nsg-sla-from-nsg.json @@ -0,0 +1,18 @@ +{ + "id": "aar-nsg-sla-from-nsg", + "graph": "Table", + "title": "SLA - From NSG", + "description": "All SLA violation during the last time interval, that caused a path from this NSG to switch. Computation: Ordered by time in descending order.", + "author": "Ronak Shah", + "creationDate": "11/08/2016", + "data": { + "columns": [ + { "column": "ts", "label": "Timestamp", "timeFormat": "%b %d, %y %X"}, + { "column": "DestinationNSG", "label": "Destination NSG" }, + { "column": "Application", "label": "Application" }, + { "column": "APMGroup", "label": "APM Group" }, + { "column": "ViolationType", "label": "Violation Type" } + ] + }, + "query": "aar-nsg-sla-from-nsg" +} diff --git a/server/app/configurations/visualizations/aar-nsg-sla-to-nsg.json b/server/app/configurations/visualizations/aar-nsg-sla-to-nsg.json new file mode 100644 index 00000000..d491989b --- /dev/null +++ b/server/app/configurations/visualizations/aar-nsg-sla-to-nsg.json @@ -0,0 +1,18 @@ +{ + "id": "aar-nsg-sla-to-nsg", + "graph": "Table", + "title": "SLA - To NSG", + "description": "All SLA violation during the last time interval, that caused a path from this NSG to switch. Computation: Ordered by time in descending order.", + "author": "Ronak Shah", + "creationDate": "11/08/2016", + "data": { + "columns": [ + { "column": "ts", "label": "Timestamp", "timeFormat": "%b %d, %y %X"}, + { "column": "SourceNSG", "label": "Source NSG" }, + { "column": "Application", "label": "Application" }, + { "column": "APMGroup", "label": "APM Group" }, + { "column": "ViolationType", "label": "Violation Type" } + ] + }, + "query": "aar-nsg-sla-to-nsg" +} diff --git a/server/app/configurations/visualizations/aar-nsg-top10-app.json b/server/app/configurations/visualizations/aar-nsg-top10-app.json new file mode 100644 index 00000000..38c777bb --- /dev/null +++ b/server/app/configurations/visualizations/aar-nsg-top10-app.json @@ -0,0 +1,18 @@ +{ + "id": "aar-nsg-top10-app", + "graph": "PieGraph", + "title": "Top 10 Applications", + "description": "NSG level top 10 applications. Computation: Sum of total Bytes sent and/or received in descending order.", + "author": "Ronak Shah", + "creationDate": "10/26/2016", + "data": { + "sliceColumn": "Sum of MB", + "labelColumn": "Application", + "pieInnerRadius": 0.5, + "tooltip": [ + { "column": "Application", "label": "Application" }, + { "column": "Sum of MB", "label": "Total MB", "format": ",.2f"} + ] + }, + "query": "aar-nsg-top10-app" +} diff --git a/server/app/configurations/visualizations/aar-nsg-top5-talkers-download.json b/server/app/configurations/visualizations/aar-nsg-top5-talkers-download.json new file mode 100644 index 00000000..0b0373d6 --- /dev/null +++ b/server/app/configurations/visualizations/aar-nsg-top5-talkers-download.json @@ -0,0 +1,17 @@ +{ + "id": "aar-nsg-top5-talkers-download", + "graph": "Table", + "title": "Top 5 Users (Download)", + "description": "NSG level top 5 users (IP addresses) receiving traffic from the network. Computation: Sum of egress Bytes for any traffic destined to this client IP in descending order.", + "author": "Ronak Shah", + "creationDate": "10/26/2016", + "data": { + "columns": [ + { "column": "DestinationIP", "label": "Client IP" }, + { "column": "DomainName", "label": "Domain" }, + { "column": "Packets", "label": "Packets", "format": ",.2s" }, + { "column": "Bytes", "label": "Bytes", "format": ",.2s" } + ] + }, + "query": "aar-nsg-top5-talkers-download" +} diff --git a/server/app/configurations/visualizations/aar-nsg-top5-talkers-upload.json b/server/app/configurations/visualizations/aar-nsg-top5-talkers-upload.json new file mode 100644 index 00000000..36869ee6 --- /dev/null +++ b/server/app/configurations/visualizations/aar-nsg-top5-talkers-upload.json @@ -0,0 +1,17 @@ +{ + "id": "aar-nsg-top5-talkers-upload", + "graph": "Table", + "title": "Top 5 Users (Upload)", + "description": "NSG level top 5 users (IP addresses) sending traffic to the network. Computation: Sum of ingress Bytes sourced from this client IP to any destination in descending order.", + "author": "Ronak Shah", + "creationDate": "10/26/2016", + "data": { + "columns": [ + { "column": "SourceIP", "label": "Client IP" }, + { "column": "DomainName", "label": "Domain" }, + { "column": "Packets", "label": "Packets", "format": ",.2s" }, + { "column": "Bytes", "label": "Bytes", "format": ",.2s" } + ] + }, + "query": "aar-nsg-top5-talkers-upload" +} diff --git a/server/app/configurations/visualizations/aar-slastatus-enterprise.json b/server/app/configurations/visualizations/aar-slastatus-enterprise.json new file mode 100644 index 00000000..5d81a81a --- /dev/null +++ b/server/app/configurations/visualizations/aar-slastatus-enterprise.json @@ -0,0 +1,17 @@ +{ + "id": "aar-slastatus-enterprise", + "graph": "PieGraph", + "title": "SLA Status", + "description": "Enterprise level representation of Application SLA status. Computation: Possible values are: In SLA, Out of SLA and/or Not monitored.", + "author": "Ronak Shah", + "creationDate": "10/19/2016", + "data": { + "sliceColumn": "doc_count", + "labelColumn": "slastatus", + "tooltip": [ + { "column": "slastatus", "label": "SLA Status" }, + { "column": "doc_count", "label": "Count", "format": ",.2s"} + ] + }, + "query": "aar-slastatus-enterprise" +} diff --git a/server/app/configurations/visualizations/app-specific-date-histogram.json b/server/app/configurations/visualizations/app-specific-date-histogram.json new file mode 100644 index 00000000..83c4b509 --- /dev/null +++ b/server/app/configurations/visualizations/app-specific-date-histogram.json @@ -0,0 +1,19 @@ +{ + "id": "app-specific-date-histogram", + "graph": "BarGraph", + "title": "L7Classification ({{app}}) Date Histogram", + "description": "Bandwidth usage per application across domains. Layer-7 Classification includes discovered applications including Common Name in TLS certificates when available. Computation: Sum of total Bytes sent and/or received for a given interval displayed over the configured timespan. Possible values are: If time span = Last 15 minutes: interval is 1 minute, If time span = Last 24 hours: interval is 1 hour, If time span = Last 7 days: interval is 12 hours", + "author": "Curran Kelleher", + "creationDate": "10/14/2016", + "data": { + "dateHistogram": true, + "interval": "30m", + "xColumn": "date-histo", + "yColumn": "SumOfBytes", + "yTickFormat": ".2s", + "colorColumn": "date-histo", + "xLabel": "Time", + "yLabel": "Total Bytes" + }, + "query": "app-specific-vertical-bar" +} diff --git a/server/app/configurations/visualizations/app-specific-line-chart.json b/server/app/configurations/visualizations/app-specific-line-chart.json new file mode 100644 index 00000000..3a12effc --- /dev/null +++ b/server/app/configurations/visualizations/app-specific-line-chart.json @@ -0,0 +1,13 @@ +{ + "id": "app-specific-line-chart", + "graph": "LineGraph", + "title": "App-specific Line Chart", + "author": "Curran Kelleher", + "creationDate": "10/14/2016", + "data": { + "xColumn": "key", + "yColumn": "1", + "colorColumn": "key" + }, + "query": "app-specific-vertical-bar" +} diff --git a/server/app/configurations/visualizations/effective-score.json b/server/app/configurations/visualizations/effective-score.json new file mode 100644 index 00000000..b0f5267a --- /dev/null +++ b/server/app/configurations/visualizations/effective-score.json @@ -0,0 +1,13 @@ +{ + "id": "effective-score", + "graph": "SimpleTextGraph", + "title": "Effective Score", + "author": "Christophe SERAFIN", + "creationDate": "11/01/2016", + "script": "effective-score", + "data": { + "circle": true, + "circleColor": "#4097FF", + "targetedColumn": "name" + } +} diff --git a/server/app/configurations/visualizations/newly-discovered-applications-with-circle.json b/server/app/configurations/visualizations/newly-discovered-applications-with-circle.json new file mode 100644 index 00000000..85292d5c --- /dev/null +++ b/server/app/configurations/visualizations/newly-discovered-applications-with-circle.json @@ -0,0 +1,13 @@ +{ + "id": "newly-discovered-applications", + "title": "Newly Discovered Applications", + "query": "newly-discovered-applications", + "graph": "SimpleTextGraph", + "data": { + "circle": true, + "circleColor": "#4097FF" + }, + "listeners": [{ + "redirect": "/dashboards/appsOverview" + }] +} diff --git a/server/app/configurations/visualizations/newly-discovered-applications.json b/server/app/configurations/visualizations/newly-discovered-applications.json new file mode 100644 index 00000000..ccb71cdc --- /dev/null +++ b/server/app/configurations/visualizations/newly-discovered-applications.json @@ -0,0 +1,9 @@ +{ + "id": "newly-discovered-applications", + "title": "Newly Discovered Default Applications", + "query": "aar-default-app-l7", + "graph": "SimpleTextGraph", + "data": { + "targetedColumn":"value" + } +} diff --git a/server/app/configurations/visualizations/number-of-apm-groups.json b/server/app/configurations/visualizations/number-of-apm-groups.json new file mode 100644 index 00000000..738617d4 --- /dev/null +++ b/server/app/configurations/visualizations/number-of-apm-groups.json @@ -0,0 +1,31 @@ +{ + "id": "number-of-apm-groups", + "title": "APM Groups", + "query": "number-of-apm-groups", + "graph": "SimpleTextGraph", + "showTitleBar": false, + "data": { + "borderRadius": "0", + "titlePosition": "bottom", + "textAlign": "center", + "margin": { + "top": "10px", + "bottom": "0", + "left": "auto", + "right": "auto" + }, + "padding": { + "top": "0", + "bottom": "0", + "left": "5px", + "right": "5px" + }, + "fontSize": "4em", + "fontColor": "#6b6b6b", + "innerWidth": 1, + "innerHeight": 0.6, + "colors": [ + "#ffffff" + ] + } +} diff --git a/server/app/configurations/visualizations/number-of-applications.json b/server/app/configurations/visualizations/number-of-applications.json new file mode 100644 index 00000000..846c7f93 --- /dev/null +++ b/server/app/configurations/visualizations/number-of-applications.json @@ -0,0 +1,31 @@ +{ + "id": "number-of-applications", + "title": "Applications", + "query": "number-of-applications", + "graph": "SimpleTextGraph", + "showTitleBar": false, + "data": { + "borderRadius": "0", + "titlePosition": "bottom", + "textAlign": "center", + "margin": { + "top": "10px", + "bottom": "0", + "left": "auto", + "right": "auto" + }, + "padding": { + "top": "0", + "bottom": "0", + "left": "5px", + "right": "5px" + }, + "fontSize": "4em", + "fontColor": "#6b6b6b", + "innerWidth": 1, + "innerHeight": 0.6, + "colors": [ + "#ffffff" + ] + } +} diff --git a/server/app/configurations/visualizations/number-of-npms.json b/server/app/configurations/visualizations/number-of-npms.json new file mode 100644 index 00000000..6655f6cc --- /dev/null +++ b/server/app/configurations/visualizations/number-of-npms.json @@ -0,0 +1,31 @@ +{ + "id": "number-of-npms", + "title": "NPMs", + "query": "number-of-npms", + "graph": "SimpleTextGraph", + "showTitleBar": false, + "data": { + "borderRadius": "0", + "titlePosition": "bottom", + "textAlign": "center", + "margin": { + "top": "10px", + "bottom": "0", + "left": "auto", + "right": "auto" + }, + "padding": { + "top": "0", + "bottom": "0", + "left": "5px", + "right": "5px" + }, + "fontSize": "4em", + "fontColor": "#6b6b6b", + "innerWidth": 1, + "innerHeight": 0.6, + "colors": [ + "#ffffff" + ] + } +} diff --git a/server/app/configurations/visualizations/number-of-performance-monitors.json b/server/app/configurations/visualizations/number-of-performance-monitors.json new file mode 100644 index 00000000..6a30733f --- /dev/null +++ b/server/app/configurations/visualizations/number-of-performance-monitors.json @@ -0,0 +1,31 @@ +{ + "id": "number-of-performance-monitors", + "title": "Performance Monitors", + "query": "number-of-performance-monitors", + "graph": "SimpleTextGraph", + "showTitleBar": false, + "data": { + "borderRadius": "0", + "titlePosition": "bottom", + "textAlign": "center", + "margin": { + "top": "10px", + "bottom": "0", + "left": "auto", + "right": "auto" + }, + "padding": { + "top": "0", + "bottom": "0", + "left": "5px", + "right": "5px" + }, + "fontSize": "4em", + "fontColor": "#6b6b6b", + "innerWidth": 1, + "innerHeight": 0.6, + "colors": [ + "#ffffff" + ] + } +} diff --git a/server/app/configurations/visualizations/top20-talkers-domain.json b/server/app/configurations/visualizations/top20-talkers-domain.json new file mode 100644 index 00000000..20361a2d --- /dev/null +++ b/server/app/configurations/visualizations/top20-talkers-domain.json @@ -0,0 +1,34 @@ +{ + "id": "top20-talkers-domain", + "graph": "Table", + "title": "Top 20 Talkers", + "description": "Domain level top 20 discovered and configured applications. Computation: Sum of total Bytes sent and/or received in descending order.", + "author": "Ronak Shah", + "creationDate": "10/14/2016", + "data": { + "columns": [ + { "column": "Application", "label": "Application" }, + { "column": "L7Classification", "label": "L7-Classification" }, + { "column": "SrcVportName", "label": "Source Vport-Name"}, + { "column": "SourceNSG", "label": "Source-NSG"}, + { "column": "DestinationNSG", "label": ""}, + { "column": "1", "label": "Total Bytes", "format": ",.2s" }, + { "column": "11", "label": "Total Packets", "format": ",.2s" } + ] + }, + "listeners": [ + { + "redirect": "/dashboards/aarNSGDetail", + "params": { + "snsg": "SourceNSG" + } + }], + "listeners": [ + { + "redirect": "/dashboards/aarNSGDetail", + "params": { + "snsg": "DestinationNSG" + } + }], + "query": "top20-talkers-domain-table" +} diff --git a/server/app/configurations/visualizations/top20-talkers-enterprise-defaultapp.json b/server/app/configurations/visualizations/top20-talkers-enterprise-defaultapp.json new file mode 100644 index 00000000..6df41475 --- /dev/null +++ b/server/app/configurations/visualizations/top20-talkers-enterprise-defaultapp.json @@ -0,0 +1,23 @@ +{ + "id": "top20-talkers-enterprise-defaultapp-table", + "graph": "Table", + "title": "Top 20 Discovered Applications (Default Application Group)", + "description": "Enterprise level top 20 discovered applications. Layer-7 Classification includes discovered applications including Common Name in TLS certificates when available. Computation: Sum of total Bytes sent and/or received in descending order. Click on a row to load the date histogram for this application.", + "author": "Ronak Shah", + "creationDate": "10/14/2016", + "data": { + "columns": [ + { "column": "DomainName", "label": "Domain"}, + { "column": "L7Classification", "label": "L7 Classification" }, + { "column": "1", "label": "Total Bytes", "format": ",.2s" } + ] + }, + "listeners": [ + { + "params": { + "app": "L7Classification" + } + }], + + "query": "top20-talkers-enterprise-defaultapp-table" +} diff --git a/server/app/configurations/visualizations/top20-talkers-enterprise.json b/server/app/configurations/visualizations/top20-talkers-enterprise.json new file mode 100644 index 00000000..34a528d4 --- /dev/null +++ b/server/app/configurations/visualizations/top20-talkers-enterprise.json @@ -0,0 +1,25 @@ +{ + "id": "top20-talkers-enterprise", + "graph": "Table", + "title": "Top 20 Applications", + "description": "Enterprise level top 20 applications. Layer-7 Classification includes discovered applications including Common Name in TLS certificates when available. Computation: Sum of total Bytes sent and/or received in descending order. Click on a row to load the date histogram for this application.", + "author": "Ronak Shah", + "creationDate": "10/14/2016", + "data": { + "columns": [ + { "column": "Application", "label": "Application" }, + { "column": "APMGroup", "label": "APM-Group" }, + { "column": "DomainName", "label": "Domain"}, + { "column": "L7Classification", "label": "L7 Classification" }, + { "column": "1", "label": "Total Bytes", "format": ",.2s" } + ] + }, + "listeners": [ + { + "params": { + "app": "L7Classification" + } + }], + + "query": "top20-talkers-enterprise-table" +} diff --git a/server/app/configurations/visualizations/top5-app-donut.json b/server/app/configurations/visualizations/top5-app-donut.json new file mode 100644 index 00000000..a159bc9e --- /dev/null +++ b/server/app/configurations/visualizations/top5-app-donut.json @@ -0,0 +1,14 @@ +{ + "id": "top5-app-donut", + "graph": "PieGraph", + "title": "Top 5 Apps Donut", + "author": "Curran Kelleher", + "creationDate": "10/19/2016", + "refreshInterval": 10000, + "data": { + "sliceColumn": "Sum of MB", + "labelColumn": "L7Classification", + "pieInnerRadius": 0.5 + }, + "query": "top5-app-vertical-bar" +} diff --git a/server/app/configurations/visualizations/top5-app-horizontal-bar.json b/server/app/configurations/visualizations/top5-app-horizontal-bar.json new file mode 100644 index 00000000..5c2e6e59 --- /dev/null +++ b/server/app/configurations/visualizations/top5-app-horizontal-bar.json @@ -0,0 +1,23 @@ +{ + "id": "top5-app-vertical-bar", + "graph": "BarGraph", + "title": "Top 5 Apps", + "description": "This graph will show something that is really useful for administrators", + "author": "Curran Kelleher", + "creationDate": "10/13/2016", + "data": { + "xColumn": "Sum of MB", + "yColumn": "L7Classification", + "orientation": "horizontal", + "colors": [ + "#7da3f7", + "#fec26a", + "#e78ac3", + "#f79e99" + ], + "xTicks": 5, + "xTickGrid": true, + "yTickGrid": false + }, + "query": "top5-app-vertical-bar" +} diff --git a/server/app/configurations/visualizations/top5-app-pie.json b/server/app/configurations/visualizations/top5-app-pie.json new file mode 100644 index 00000000..03eb97de --- /dev/null +++ b/server/app/configurations/visualizations/top5-app-pie.json @@ -0,0 +1,32 @@ +{ + "id": "top5-app-pie", + "graph": "PieGraph", + "title": "Top 5 Apps Pie", + "author": "Curran Kelleher", + "creationDate": "10/19/2016", + "data": { + "sliceColumn": "Sum of MB", + "labelColumn": "L7Classification", + "tooltip": [ + { "column": "L7Classification", "label": "L7 Classification" }, + { "column": "Sum of MB", "format": ",.1f"} + ], + "percentages": true, + "percentagesFormat": ",.1%", + "pieLabelRadius": 0.55, + "pieOuterRadius": 0.95, + "legend": { + "show": true, + "orientation": "horizontal", + "circleSize": 4, + "labelOffset": 2 + } + }, + "listeners": [{ + "redirect": "/dashboards/dateHistogramExample", + "params": { + "app": "L7Classification" + } + }], + "query": "top5-app-vertical-bar" +} diff --git a/server/app/configurations/visualizations/top5-app-table.json b/server/app/configurations/visualizations/top5-app-table.json new file mode 100644 index 00000000..0164b939 --- /dev/null +++ b/server/app/configurations/visualizations/top5-app-table.json @@ -0,0 +1,21 @@ +{ + "id": "top5-app-table", + "graph": "Table", + "title": "Top 5 Apps", + "author": "Curran Kelleher", + "creationDate": "10/10/2016", + "data": { + "columns": [ + { "column": "L7Classification", "label": "L7Classification" }, + { "column": "Sum of MB" }, + { "column": "doc_count", "label": "Document Count", "format": ",.2f" } + ] + }, + "listeners": [{ + "redirect": "/dashboards/dateHistogramExample", + "params": { + "app": "Application" + } + }], + "query": "top5-app-vertical-bar" +} diff --git a/server/app/configurations/visualizations/top5-app-vertical-bar-domain.json b/server/app/configurations/visualizations/top5-app-vertical-bar-domain.json new file mode 100644 index 00000000..5923b2dd --- /dev/null +++ b/server/app/configurations/visualizations/top5-app-vertical-bar-domain.json @@ -0,0 +1,27 @@ +{ + "id": "top5-app-vertical-bar-domain", + "graph": "BarGraph", + "title": "Top 5 Defined Applications", + "description": "Domain level top 5 defined applications. Computation: Sum of total Bytes sent and/or received in descending order.", + "author": "Ronak Shah", + "creationDate": "10/14/2016", + "data": { + "colors": [ + "#7da3f7", + "#fec26a", + "#e78ac3", + "#f79e99", + "#b3d645" + ], + "tooltip": [ + { "column": "Application", "label": "Application" }, + { "column": "SumofBytes", "label": "Total Bytes", "format": ",.2s"} + ], + "xLabel": "Application", + "yLabel": "Total Bytes", + "yTickFormat": ".2s", + "xColumn": "Application", + "yColumn": "SumofBytes" + }, + "query": "top5-app-vertical-bar-domain" +} diff --git a/server/app/configurations/visualizations/top5-app-vertical-bar.json b/server/app/configurations/visualizations/top5-app-vertical-bar.json new file mode 100644 index 00000000..3da7b32b --- /dev/null +++ b/server/app/configurations/visualizations/top5-app-vertical-bar.json @@ -0,0 +1,36 @@ +{ + "id": "top5-app-vertical-bar", + "graph": "BarGraph", + "title": "Top 5 Discovered Applications", + "description": "Enterprise level top 5 discovered applications. Computation: Sum of total Bytes sent and/or received in descending order across all domains.", + "author": "Curran Kelleher", + "creationDate": "10/13/2016", + "data": { + "xColumn": "L7Classification", + "xLabel": "Application", + "yColumn": "Sum of MB", + "yLabel": "Total Bytes", + "yTicks": 5, + "yTickFormat": ".2s", + "colors": [ + "#7da3f7", + "#b3d645", + "#fec26a", + "#e78ac3", + "#f79e99" + ], + "tooltip": [ + { "column": "L7Classification", "label": "L7 Signature" }, + { "column": "Sum of MB", "format": ",.2s"} + ] + }, + "listeners": [ + { + "redirect": "/dashboards/aarEnterpriseDetail", + "params": { + "app": "L7Classification" + } + } + ], + "query": "top5-app-vertical-bar" +} diff --git a/server/app/configurations/visualizations/top5-download-users-table.json b/server/app/configurations/visualizations/top5-download-users-table.json new file mode 100644 index 00000000..467127b2 --- /dev/null +++ b/server/app/configurations/visualizations/top5-download-users-table.json @@ -0,0 +1,18 @@ +{ + "id": "top5-download-users-table", + "graph": "Table", + "title": "Top 5 Download Users", + "description": "Enterprise level top 5 download users (IP addresses). Computation: Sum of Egress Bytes for any traffic destined to this Client IP in descending order.", + "author": "Ronak Shah", + "creationDate": "10/13/2016", + "data": { + "columns": [ + { "column": "DstIP", "label": "Client IP" }, + { "column": "DestinationNSG", "label": "NSG" }, + { "column": "DomainName", "label": "Domain" }, + { "column": "EgressPackets", "label": "Packets", "format": ",.2s"}, + { "column": "EgressBytes", "label": "Bytes", "format": ",.2s" } + ] + }, + "query": "top5-download-users-table" +} diff --git a/server/app/configurations/visualizations/top5-upload-users-table.json b/server/app/configurations/visualizations/top5-upload-users-table.json new file mode 100644 index 00000000..88decda4 --- /dev/null +++ b/server/app/configurations/visualizations/top5-upload-users-table.json @@ -0,0 +1,18 @@ +{ + "id": "top5-upload-users-table", + "graph": "Table", + "title": "Top 5 Upload Users", + "description": "Enterprise level top 5 upload users (IP addresses) across domains. Computation: Sum of Ingress Bytes sourced from IP to any destination in descending order.", + "author": "Ronak Shah", + "creationDate": "10/13/2016", + "data": { + "columns": [ + { "column": "SourceIP", "label": "Client IP" }, + { "column": "SourceNSG", "label": "NSG" }, + { "column": "DomainName", "label": "Domain" }, + { "column": "IngressPackets", "label": "Packets", "format": ",.2s"}, + { "column": "IngressBytes", "label": "Bytes", "format": ",.2s" } + ] + }, + "query": "top5-upload-users-table" +} diff --git a/server/app/configurations/visualizations/top5-users-table.json b/server/app/configurations/visualizations/top5-users-table.json new file mode 100644 index 00000000..c06dcb23 --- /dev/null +++ b/server/app/configurations/visualizations/top5-users-table.json @@ -0,0 +1,17 @@ +{ + "id": "top5-users-table", + "graph": "Table", + "title": "Top 5 Users", + "description": "Enterprise level top 5 users (IP addresses). Computation: Sum of total Bytes sent and/or received in descending order.", + "author": "Ronak Shah", + "creationDate": "10/13/2016", + "data": { + "columns": [ + { "column": "SourceIP", "label": "Source IP" }, + { "column": "SourceNSG", "label": "Source NSG" }, + { "column": "TotalPacketsCount", "label": "Total Packets", "format": ",.2s"}, + { "column": "TotalBytesCount", "label": "Total Bytes", "format": ",.2s" } + ] + }, + "query": "top5-users-table" +} diff --git a/server/app/configurations/visualizations/vnf-cpu-status.json b/server/app/configurations/visualizations/vnf-cpu-status.json new file mode 100644 index 00000000..803a09db --- /dev/null +++ b/server/app/configurations/visualizations/vnf-cpu-status.json @@ -0,0 +1,14 @@ +{ + "id": "vnf-cpu-status", + "graph": "GaugeGraph", + "title": "CPU utilization", + "description": "CPU utilization for approx last 5 min", + "author": "Ronak Shah", + "creationDate": "04/13/2017", + "data": { + "maxValue": "100", + "currentColumn": "cpu", + "gauzeTicks": "10" + }, + "query": "vnf-status" +} diff --git a/server/app/configurations/visualizations/vnf-disk-status.json b/server/app/configurations/visualizations/vnf-disk-status.json new file mode 100644 index 00000000..76597bfe --- /dev/null +++ b/server/app/configurations/visualizations/vnf-disk-status.json @@ -0,0 +1,14 @@ +{ + "id": "vnf-disk-status", + "graph": "GaugeGraph", + "title": "Disk utilization", + "description": "Latest disk utilization recorded", + "author": "Ronak Shah", + "creationDate": "04/13/2017", + "data": { + "maxValue": "100", + "currentColumn": "disk", + "gauzeTicks": "10" + }, + "query": "vnf-status" +} diff --git a/server/app/configurations/visualizations/vnf-memory-status.json b/server/app/configurations/visualizations/vnf-memory-status.json new file mode 100644 index 00000000..75918122 --- /dev/null +++ b/server/app/configurations/visualizations/vnf-memory-status.json @@ -0,0 +1,15 @@ +{ + "id": "vnf-memory-status", + "graph": "GaugeGraph", + "title": "Memory utilization", + "description": "Latest memory utilization recorded", + "author": "Ronak Shah", + "creationDate": "04/13/2017", + "data": { + "maxValue": "100", + "currentColumn": "memory", + "gauzeTicks": "10", + "gaugeCtrSuffix": "" + }, + "query": "vnf-status" +} diff --git a/server/app/configurations/visualizations/vnf-status-linechart.json b/server/app/configurations/visualizations/vnf-status-linechart.json new file mode 100644 index 00000000..89966c03 --- /dev/null +++ b/server/app/configurations/visualizations/vnf-status-linechart.json @@ -0,0 +1,29 @@ +{ + "id": "vnf-status-linechart", + "graph": "MultiLineGraph", + "title": "VNF Utilization vs time", + "description": "Memory, disk and CPU utilization over a period of time", + "author": "Ronak Shah", + "creationDate": "11/08/2016", + "data": { + "xColumn": "ts", + "xLabel": "Time", + "yColumn": ["CPU", "MEMORY", "DISK"], + "yTickFormat": ",.0f", + "yLabel": "", + "yTicks": 5, + "linesColumn": ["CPU", "MEMORY", "DISK"], + "legend": { + "orientation": "vertical", + "show": true, + "circleSize": 5, + "labelOffset": 5 + }, + "tooltip": [ + { "column": "columnType", "label": "Type"}, + { "column": "yColumn", "label": "Value", "format": "0.2f"}, + { "column": "ts", "label": "Timestamp"} + ] + }, + "query": "vnf-status-linechart" +} diff --git a/server/app/configurations/visualizations/vsd-from-nsgs-table.json b/server/app/configurations/visualizations/vsd-from-nsgs-table.json new file mode 100644 index 00000000..d5a70b73 --- /dev/null +++ b/server/app/configurations/visualizations/vsd-from-nsgs-table.json @@ -0,0 +1,49 @@ +{ + "id": "vsd-from-nsgs-table", + "graph": "Table", + "title": "From {{fromTitlePersonality}}", + "author": "Christophe SERAFIN", + "creationDate": "23/01/2016", + "data": { + "columns": [ + { "column": "ID"}, + { "column": "name" } + ] + }, + "listeners": [{ + "params": { + "snsg": "name", + "sPersonality": "personality" + } + }], + "filterOptions": { + "Personality": { + "parameter": "fromPersonality", + "default": "NSG", + "options": [ + { + "label": "NSG", + "value": "NSG", + "forceOptions": { + "fromTitlePersonality": "NSG" + } + }, + { + "label": "NSG-BR", + "value": "NSGBR", + "forceOptions": { + "fromTitlePersonality": "NSG-BR" + } + }, + { + "label": "NSG-UBR", + "value": "NSGDUC", + "forceOptions": { + "fromTitlePersonality": "NSG-UBR" + } + } + ] + } + }, + "query": "vsd-from-nsgs-list" +} diff --git a/server/app/configurations/visualizations/vsd-to-nsgs-table.json b/server/app/configurations/visualizations/vsd-to-nsgs-table.json new file mode 100644 index 00000000..85e6608a --- /dev/null +++ b/server/app/configurations/visualizations/vsd-to-nsgs-table.json @@ -0,0 +1,49 @@ +{ + "id": "vsd-to-nsgs-table", + "graph": "Table", + "title": "To {{toTitlePersonality}}", + "author": "Christophe SERAFIN", + "creationDate": "23/01/2016", + "data": { + "columns": [ + { "column": "ID"}, + { "column": "name" } + ] + }, + "listeners": [{ + "params": { + "dnsg": "name", + "dPersonality": "personality" + } + }], + "filterOptions": { + "Personality": { + "parameter": "toPersonality", + "default": "NSG", + "options": [ + { + "label": "NSG", + "value": "NSG", + "forceOptions": { + "toTitlePersonality": "NSG" + } + }, + { + "label": "NSG-BR", + "value": "NSGBR", + "forceOptions": { + "toTitlePersonality": "NSG-BR" + } + }, + { + "label": "NSG-UBR", + "value": "NSGDUC", + "forceOptions": { + "toTitlePersonality": "NSG-UBR" + } + } + ] + } + }, + "query": "vsd-to-nsgs-list" +} diff --git a/server/app/configurations/visualizations/vss-domain-acl-dpg.json b/server/app/configurations/visualizations/vss-domain-acl-dpg.json new file mode 100644 index 00000000..5f9a6197 --- /dev/null +++ b/server/app/configurations/visualizations/vss-domain-acl-dpg.json @@ -0,0 +1,25 @@ +{ + "id": "vss-domain-acl-dpg", + "graph": "BarGraph", + "title": "ACL Hits by Destination Policy Groups - {{actionType:DENY}}", + "description": "This barchart represents top 5 destination policygroups per ACL hits for a given period of time. By default its aggregated on deny hits count. One can select other ACL actions i.e from the drop down menu on this dashboard.", + "author": "Ronak Shah", + "creationDate": "10/18/2016", + "data": { + "xColumn": "dpg", + "yColumn": "SumOf", + "colors": [ + "#fec26a" + ], + "tooltip": [ + { "column": "dpg", "label": "PG" }, + { "column": "SumOf", "label": "ACL Hits", "format": ",.1f"} + ], + "xTickGrid": false, + "yTickGrid": true, + "yTickFormat": ".2s", + "xLabel": "Destination Policy Groups", + "yLabel": "Total # of ACL Hits" + }, + "query": "vss-domain-acl-dpg" +} diff --git a/server/app/configurations/visualizations/vss-domain-acl-spg.json b/server/app/configurations/visualizations/vss-domain-acl-spg.json new file mode 100644 index 00000000..1e407e26 --- /dev/null +++ b/server/app/configurations/visualizations/vss-domain-acl-spg.json @@ -0,0 +1,23 @@ +{ + "id": "vss-domain-acl-spg", + "graph": "BarGraph", + "title": "ACL Hits by Source Policy Group - {{actionType:DENY}}", + "description": "This horizontal barchart represents top 5 source policygroups per ACL hits for a given period of time. By default its aggregated on deny hits count. One can select other ACL actions i.e from the drop down menu on this dashboard.", + "author": "Ronak Shah", + "creationDate": "10/18/2016", + "data": { + "xColumn": "SumOf", + "yColumn": "spg", + "orientation": "horizontal", + "tooltip": [ + { "column": "spg", "label": "PG" }, + { "column": "SumOf", "label": "ACL Hits", "format": ",.1f"} + ], + "xTickGrid": true, + "yTickGrid": false, + "xTickFormat": ".2s", + "xLabel": "Total # of ACL Hits", + "yLabel": "Source Policy Groups" + }, + "query": "vss-domain-acl-spg" +} diff --git a/server/app/configurations/visualizations/vss-domain-acl-time.json b/server/app/configurations/visualizations/vss-domain-acl-time.json new file mode 100644 index 00000000..a0a73e27 --- /dev/null +++ b/server/app/configurations/visualizations/vss-domain-acl-time.json @@ -0,0 +1,25 @@ +{ + "id": "vss-domain-acl-time", + "graph": "LineGraph", + "title": "ACL Hits vs Time - {{actionType:DENY}}", + "description": "This line graph represents total no of ACL deny received for this domain over a period of specified time. By default it shows ACL Deny hits. One can select other ACL actions i.e from the drop down menu on this dashboard.", + "author": "Ronak Shah", + "creationDate": "10/18/2016", + "data": { + "xColumn": "timestamp", + "yColumn": "SumOf", + "stroke": { + "color": "#f76159", + "width": "2px" + }, + "xTickGrid": false, + "yTickGrid": true, + "yTickFormat": ".2s", + "xLabel": "Time", + "yLabel": "Total # ACL Hits", + "xColumn": "timestamp", + "yColumn": "SumOf", + "brushEnabled": false + }, + "query": "vss-domain-acl-time" +} diff --git a/server/app/configurations/visualizations/vss-domain-acl-top5.json b/server/app/configurations/visualizations/vss-domain-acl-top5.json new file mode 100644 index 00000000..b4ef2992 --- /dev/null +++ b/server/app/configurations/visualizations/vss-domain-acl-top5.json @@ -0,0 +1,21 @@ +{ + "id": "vss-domain-acl-top5", + "graph": "Table", + "title": "Top 5 ACL by # hits", + "description": "Top 5 ACL by # of hits in this domain", + "author": "Ronak Shah", + "creationDate": "11/29/2016", + "data": { + "columns": [ + { "column": "top-acls", "label": "ACL ID" }, + { "column": "top-acl-hits.sort", "label": "# Packets" }, + { "column": "top-acl-hits.type", "label": "Type" }, + { "column": "top-acl-hits.protocol", "label": "Protocol" }, + { "column": "top-acl-hits.sourceport", "label": "Source Port" }, + { "column": "top-acl-hits.destinationport", "label": "Dest Port" }, + { "column": "top-acl-hits.nuage_metadata.spgName", "label": "Source PG" }, + { "column": "top-acl-hits.nuage_metadata.dpgName", "label": "Dest PG" } + ] + }, + "query": "vss-domain-acl-top5" +} diff --git a/server/app/configurations/visualizations/vss-domain-events-by-pg.json b/server/app/configurations/visualizations/vss-domain-events-by-pg.json new file mode 100644 index 00000000..342e3c9b --- /dev/null +++ b/server/app/configurations/visualizations/vss-domain-events-by-pg.json @@ -0,0 +1,22 @@ +{ + "id": "vss-domain-events-by-pg", + "graph": "BarGraph", + "title": "Count of Security Events by Source Policy Group", + "author": "Ronak Shah", + "creationDate": "10/18/2016", + "data": { + "xColumn": "PG", + "yColumn": "Sum of Value", + "xTickGrid": false, + "yTickGrid": true, + "yTickFormat": ".2s", + "xLabel": "Source Policy Groups", + "yLabel": "Total # of Events" + }, + "listeners": [{ + "params": { + "spg": "PG" + } + }], + "query": "vss-domain-events-by-pg" +} diff --git a/server/app/configurations/visualizations/vss-domain-events-by-type.json b/server/app/configurations/visualizations/vss-domain-events-by-type.json new file mode 100644 index 00000000..c508da35 --- /dev/null +++ b/server/app/configurations/visualizations/vss-domain-events-by-type.json @@ -0,0 +1,35 @@ +{ + "id": "vss-domain-events-by-type", + "graph": "BarGraph", + "title": "Count of Security Events by Event Type", + "description": "This horizontal barchart represents top 5 security events per total count of events registered, for this domain over a given period of time. When any of the bar is clicked, the table showing detail information (in reverse chronological order) about that event appears on this dashboard.", + "author": "Ronak Shah", + "creationDate": "10/18/2016", + "data": { + "xColumn": "Sum of Value", + "yColumn": "EventType", + "colorColumn": "EventType", + "orientation": "horizontal", + "colors": [ + "#ff4d4d", + "#ff8533", + "#7da3f7" + ], + "tooltip": [ + { "column": "EventType", "label": "Event" }, + { "column": "Sum of Value", "label": "Count", "format": ",.1f"} + ], + "xTickGrid": true, + "yTickGrid": false, + "xTickFormat": ".2s", + "xTicks": 5, + "xLabel": "Total # of Events", + "yLabel": "Event Type" + }, + "listeners": [{ + "params": { + "eventType": "EventType" + } + }], + "query": "vss-domain-events-by-type" +} diff --git a/server/app/configurations/visualizations/vss-domain-events-detail.json b/server/app/configurations/visualizations/vss-domain-events-detail.json new file mode 100644 index 00000000..cc64954f --- /dev/null +++ b/server/app/configurations/visualizations/vss-domain-events-detail.json @@ -0,0 +1,18 @@ +{ + "id": "vss-domain-events-detail", + "graph": "Table", + "title": "Event Detail - {{eventType}}", + "description": "Detail for selected event in reverse chronological order within context of this domain.", + "author": "Ronak Shah", + "creationDate": "11/15/2016", + "data": { + "columns": [ + { "column": "timestamp", "label": "Timestamp", "timeFormat": "%b %d, %y %X"}, + { "column": "value", "label": "Value" }, + { "column": "nuage_metadata.vportId", "label": "Vport UUID" }, + { "column": "nuage_metadata.subnetName", "label": "Subnet Name" }, + { "column": "nuage_metadata.zoneName", "label": "Zone Name" } + ] + }, + "query": "vss-domain-events-detail" +} diff --git a/server/app/configurations/visualizations/vss-domain-flow-fixed-weight.json b/server/app/configurations/visualizations/vss-domain-flow-fixed-weight.json new file mode 100644 index 00000000..7290fa88 --- /dev/null +++ b/server/app/configurations/visualizations/vss-domain-flow-fixed-weight.json @@ -0,0 +1,13 @@ +{ + "id": "vss-domain-flow", + "graph": "ChordGraph", + "title": "Flows per Domain", + "author": "Ronak Shah and Curran Kelleher", + "creationDate": "11/3/2016", + "data": { + "chordSourceColumn": "spg", + "chordDestinationColumn": "dpg", + "colorColumn": "spg" + }, + "query": "vss-domain-flow" +} diff --git a/server/app/configurations/visualizations/vss-domain-flow-table.json b/server/app/configurations/visualizations/vss-domain-flow-table.json new file mode 100644 index 00000000..5ffa87d0 --- /dev/null +++ b/server/app/configurations/visualizations/vss-domain-flow-table.json @@ -0,0 +1,21 @@ +{ + "id": "vss-domain-flow-table", + "graph": "Table", + "title": "Flow detail between {{source:Source}} and {{destination:Destination}}", + "description": "Detail in a reverse chronological order about flows between selected source and destination.", + "author": "Ronak Shah", + "creationDate": "11/02/2016", + "data": { + "columns": [ + { "column": "sourceip", "label": "Source IP" }, + { "column": "destinationip", "label": "Destination IP" }, + { "column": "protocol", "label": "Protocol" }, + { "column": "sourceport", "label": "Source Port" }, + { "column": "destinationport", "label": "Dest Port" }, + { "column": "type", "label": "Type"}, + { "column": "timestamp", "label": "Timestamp", "timeFormat": "%b %d, %y %X"}, + { "column": "packets", "label": "Packets" } + ] + }, + "query": "vss-domain-flow-table" +} diff --git a/server/app/configurations/visualizations/vss-domain-flow.json b/server/app/configurations/visualizations/vss-domain-flow.json new file mode 100644 index 00000000..6e5f4ab1 --- /dev/null +++ b/server/app/configurations/visualizations/vss-domain-flow.json @@ -0,0 +1,24 @@ +{ + "id": "vss-domain-flow", + "graph": "ChordGraph", + "title": "Flows per Domain", + "description": "This chord diagram represents flow information between source and destination. Every chord represents total packets sent and received between source an destination. Chord's thickness is directly proportional to no of packets exchanged. The color of the chord represents the color of destination to which the first flow was registered. When clicked on a particular chord, the table showing detail (in a reverse chronological order) about flows between that source and destination will appear next to the chord diagram.", + "author": "Ronak Shah and Curran Kelleher", + "creationDate": "10/25/2016", + "data": { + "chordWeightColumn": "SumOf", + "chordSourceColumn": "source", + "chordDestinationColumn": "destination", + "colorColumn": "source", + "tooltip": [ + { "column": "value", "format": ",", "label": "MB"} + ] + }, + "listeners": [{ + "params": { + "source": "source", + "destination": "destination" + } + }], + "query": "vss-domain-flow" +} diff --git a/server/app/configurations/visualizations/vss-domain-traffic-icmp.json b/server/app/configurations/visualizations/vss-domain-traffic-icmp.json new file mode 100644 index 00000000..3f06ec69 --- /dev/null +++ b/server/app/configurations/visualizations/vss-domain-traffic-icmp.json @@ -0,0 +1,22 @@ +{ + "id": "vss-domain-traffic-icmp", + "graph": "LineGraph", + "title": "ICMP vs Time", + "description": "This line graph represents total no of ICMP Packets received for this domain over a period of specified time. By default it shows allowed traffic. One can select other deny action i.e from the drop down menu on this dashboard to show denied traffic.", + "author": "Ronak Shah", + "creationDate": "10/18/2016", + "data": { + "xColumn": "timestamp", + "yColumn": "SumOf", + "stroke": { + "color": "#fec26a", + "width": "2px" + }, + "xTickGrid": false, + "yTickGrid": true, + "yTickFormat": ".2s", + "xLabel": "Time", + "yLabel": "Total # of ICMP Packets" + }, + "query": "vss-domain-traffic-icmp" +} diff --git a/server/app/configurations/visualizations/vss-domain-traffic-tcp-conn.json b/server/app/configurations/visualizations/vss-domain-traffic-tcp-conn.json new file mode 100644 index 00000000..abcf4e17 --- /dev/null +++ b/server/app/configurations/visualizations/vss-domain-traffic-tcp-conn.json @@ -0,0 +1,22 @@ +{ + "id": "vss-domain-traffic-tcp-conn", + "graph": "LineGraph", + "title": "TCP vs Time", + "description": "This line graph represents total no of TCP Packets received for this domain over a period of specified time. By default it shows allowed traffic. One can select other deny action i.e from the drop down menu on this dashboard to show denied traffic.", + "author": "Ronak Shah", + "creationDate": "10/18/2016", + "data": { + "xColumn": "timestamp", + "yColumn": "SumOf", + "stroke": { + "color": "#b3d645", + "width": "2px" + }, + "xTickGrid": false, + "yTickGrid": true, + "yTickFormat": ".2s", + "xLabel": "Time", + "yLabel": "Total # of TCP Packets" + }, + "query": "vss-domain-traffic-tcp-conn" +} diff --git a/server/app/configurations/visualizations/vss-domain-traffic-tcp-syn.json b/server/app/configurations/visualizations/vss-domain-traffic-tcp-syn.json new file mode 100644 index 00000000..cafa92ec --- /dev/null +++ b/server/app/configurations/visualizations/vss-domain-traffic-tcp-syn.json @@ -0,0 +1,57 @@ +{ + "id": "vss-domain-traffic-tcp-syn", + "graph": "LineGraph", + "title": "TCP-{{flagtype}} vs Time", + "description": "This line graph represents total no of TCP SYN Packets received for this domain over a period of specified time. By default it shows allowed traffic. One can select other deny action i.e from the drop down menu on this dashboard to show denied traffic.", + "author": "Ronak Shah", + "creationDate": "2/28/2016", + "data": { + "xColumn": "timestamp", + "yColumn": "flag", + "stroke": { + "color": "#fec26a", + "width": "2px" + }, + "xTickGrid": false, + "yTickGrid": true, + "yTickFormat": ".2s", + "xLabel": "Time", + "yLabel": "Total # of TCP-{{flagtype}} Packets" + }, + "filterOptions": { + "Flag-Type": { + "parameter": "flagtype", + "default": "SYN", + "options": [ + { + "label": "SYN", + "value": "SYN", + "default": true + }, + { + "label": "SYN-ACK", + "value": "SYN-ACK" + }, + { + "label": "FIN", + "value": "FIN", + "default": true + }, + { + "label": "FIN-ACK", + "value": "FIN-ACK" + }, + { + "label": "NULL", + "value": "NULL", + "default": true + }, + { + "label": "RST", + "value": "RST" + } + ] + } + }, + "query": "vss-domain-traffic-tcp-syn" +} diff --git a/server/app/configurations/visualizations/vss-domain-traffic-tcp-synflood.json b/server/app/configurations/visualizations/vss-domain-traffic-tcp-synflood.json new file mode 100644 index 00000000..3e218d55 --- /dev/null +++ b/server/app/configurations/visualizations/vss-domain-traffic-tcp-synflood.json @@ -0,0 +1,22 @@ +{ + "id": "vss-domain-traffic-tcp-synflood", + "graph": "LineGraph", + "title": "TCP-SYN Flood vs Time", + "description": "This line graph represents total no of TCP SYN-FLOOD received for this domain over a period of specified time.", + "author": "Ronak Shah", + "creationDate": "10/18/2016", + "data": { + "xColumn": "timestamp", + "yColumn": "SumOf", + "stroke": { + "color": "#f76159", + "width": "2px" + }, + "xTickGrid": false, + "yTickGrid": true, + "yTickFormat": ".2s", + "xLabel": "Time", + "yLabel": "Total # of TCP SYN-FLOOD" + }, + "query": "vss-domain-traffic-tcp-synflood" +} diff --git a/server/app/configurations/visualizations/vss-domain-traffic-top-dpg.json b/server/app/configurations/visualizations/vss-domain-traffic-top-dpg.json new file mode 100644 index 00000000..c47b1fab --- /dev/null +++ b/server/app/configurations/visualizations/vss-domain-traffic-top-dpg.json @@ -0,0 +1,26 @@ +{ + "id": "vss-domain-traffic-top-dpg", + "graph": "BarGraph", + "title": "Top Destination Policy Groups by Count", + "description": "This barchart represents top 5 destination policy groups by total no of packets registered in a given time.", + "author": "Ronak Shah", + "creationDate": "10/18/2016", + "data": { + "xColumn": "dpg", + "yColumn": "SumOf", + "colorColumn": "dpg", + "colors": [ + "#fec26a" + ], + "tooltip": [ + { "column": "dpg", "label": "PG" }, + { "column": "SumOf", "label": "Packets", "format": ",.1f"} + ], + "xTickGrid": false, + "yTickGrid": true, + "yTickFormat": ".2s", + "xLabel": "Destination Policy Groups", + "yLabel": "Total # of Packets" + }, + "query": "vss-domain-traffic-top-dpg" +} diff --git a/server/app/configurations/visualizations/vss-domain-traffic-top-spg.json b/server/app/configurations/visualizations/vss-domain-traffic-top-spg.json new file mode 100644 index 00000000..0676a120 --- /dev/null +++ b/server/app/configurations/visualizations/vss-domain-traffic-top-spg.json @@ -0,0 +1,24 @@ +{ + "id": "vss-domain-traffic-top-spg", + "graph": "BarGraph", + "title": "Top Source Policy Groups by Count", + "description": "This horizontal barchart represents top 5 source policy groups by total no of packets registered in a given time.", + "author": "Ronak Shah", + "creationDate": "10/18/2016", + "data": { + "xColumn": "SumOf", + "yColumn": "spg", + "colorColumn": "spg", + "orientation": "horizontal", + "tooltip": [ + { "column": "spg", "label": "PG" }, + { "column": "SumOf", "label": "Packets", "format": ",.1f"} + ], + "xTickGrid": true, + "yTickGrid": false, + "xTickFormat": ".2s", + "xLabel": "Total # of Packets", + "yLabel": "Source Policy Groups" + }, + "query": "vss-domain-traffic-top-spg" +} diff --git a/server/app/configurations/visualizations/vss-domain-traffic-udp.json b/server/app/configurations/visualizations/vss-domain-traffic-udp.json new file mode 100644 index 00000000..d15bc3b8 --- /dev/null +++ b/server/app/configurations/visualizations/vss-domain-traffic-udp.json @@ -0,0 +1,21 @@ +{ + "id": "vss-domain-traffic-udp", + "graph": "LineGraph", + "title": "UDP vs Time", + "author": "Ronak Shah", + "description": "This line graph represents total no of UDP Packets received for this domain over a period of specified time. By default it shows allowed traffic. One can select other deny action i.e from the drop down menu on this dashboard to show denied traffic.", + "creationDate": "10/18/2016", + "data": { + "xColumn": "timestamp", + "yColumn": "SumOf", + "stroke": { + "width": "2px" + }, + "xTickGrid": false, + "yTickGrid": true, + "yTickFormat": ".2s", + "xLabel": "Time", + "yLabel": "Total # of UDP Packets" + }, + "query": "vss-domain-traffic-udp" +} diff --git a/server/app/configurations/visualizations/vss-ent-acldeny-time.json b/server/app/configurations/visualizations/vss-ent-acldeny-time.json new file mode 100644 index 00000000..753dc40e --- /dev/null +++ b/server/app/configurations/visualizations/vss-ent-acldeny-time.json @@ -0,0 +1,22 @@ +{ + "id": "vss-ent-acldeny-time", + "graph": "LineGraph", + "title": "ACL Deny vs Time", + "description": "This line graph represents total no of ACL deny received for this enterprise over a period of specified time.", + "author": "Ronak Shah", + "creationDate": "10/17/2016", + "data": { + "xColumn": "timestamp", + "yColumn": "SumOf", + "stroke": { + "color": "#f76159", + "width": "2px" + }, + "xTickGrid": false, + "yTickGrid": true, + "yTickFormat": ".2s", + "xLabel": "Time", + "yLabel": "Total # ACL Deny" + }, + "query": "vss-ent-acldeny-time" +} diff --git a/server/app/configurations/visualizations/vss-enterprise-acldeny-metric.json b/server/app/configurations/visualizations/vss-enterprise-acldeny-metric.json new file mode 100644 index 00000000..80b86280 --- /dev/null +++ b/server/app/configurations/visualizations/vss-enterprise-acldeny-metric.json @@ -0,0 +1,15 @@ +{ + "id": "vss-enterprise-acldeny-metric", + "title": "# ACL-Deny (24h)", + "query": "vss-enterprise-acldeny-metric", + "graph": "VariationTextGraph", + "showTitleBar": false, + "data": { + "titlePosition": "top", + "target":{ + "column": "timezones", + "value": "Last 24", + "field": "doc_count" + } + } +} diff --git a/server/app/configurations/visualizations/vss-enterprise-alerts-metric.json b/server/app/configurations/visualizations/vss-enterprise-alerts-metric.json new file mode 100644 index 00000000..f487531e --- /dev/null +++ b/server/app/configurations/visualizations/vss-enterprise-alerts-metric.json @@ -0,0 +1,15 @@ +{ + "id": "vss-enterprise-alerts-metric", + "title": "# TCA Alerts (24h)", + "query": "vss-enterprise-alerts-metric", + "graph": "VariationTextGraph", + "showTitleBar": false, + "data": { + "titlePosition": "top", + "target":{ + "column": "timezones", + "value": "Last 24", + "field": "doc_count" + } + } +} diff --git a/server/app/configurations/visualizations/vss-enterprise-events-metric.json b/server/app/configurations/visualizations/vss-enterprise-events-metric.json new file mode 100644 index 00000000..b9c68d43 --- /dev/null +++ b/server/app/configurations/visualizations/vss-enterprise-events-metric.json @@ -0,0 +1,15 @@ +{ + "id": "vss-enterprise-events-metric", + "title": "# Events (24h)", + "query": "vss-enterprise-events-metric", + "graph": "VariationTextGraph", + "showTitleBar": false, + "data": { + "titlePosition": "top", + "target":{ + "column": "timezones", + "value": "Last 24", + "field": "doc_count" + } + } +} diff --git a/server/app/configurations/visualizations/vss-enterprise-flows-metric.json b/server/app/configurations/visualizations/vss-enterprise-flows-metric.json new file mode 100644 index 00000000..9af0b0bc --- /dev/null +++ b/server/app/configurations/visualizations/vss-enterprise-flows-metric.json @@ -0,0 +1,15 @@ +{ + "id": "vss-enterprise-flows-metric", + "title": "# Packets (24h)", + "query": "vss-enterprise-flows-metric", + "graph": "VariationTextGraph", + "showTitleBar": false, + "data": { + "titlePosition": "top", + "target":{ + "column": "timezones", + "value": "Last 24", + "field": "value" + } + } +} diff --git a/server/app/configurations/visualizations/vss-enterprise-pg-metric.json b/server/app/configurations/visualizations/vss-enterprise-pg-metric.json new file mode 100644 index 00000000..8161e7ae --- /dev/null +++ b/server/app/configurations/visualizations/vss-enterprise-pg-metric.json @@ -0,0 +1,15 @@ +{ + "id": "vss-enterprise-pg-metric", + "title": "# PGs (24h)", + "query": "vss-enterprise-pg-metric", + "graph": "VariationTextGraph", + "showTitleBar": false, + "data": { + "titlePosition": "top", + "target":{ + "column": "timezones", + "value": "Last 24", + "field": "value" + } + } +} diff --git a/server/app/configurations/visualizations/vss-top-domains-blocked-traffic.json b/server/app/configurations/visualizations/vss-top-domains-blocked-traffic.json new file mode 100644 index 00000000..93a227a4 --- /dev/null +++ b/server/app/configurations/visualizations/vss-top-domains-blocked-traffic.json @@ -0,0 +1,38 @@ +{ + "id": "vss-top-domains-blocked-traffic", + "graph": "BarGraph", + "title": "Top 5 Domains by blocked traffic", + "description": "Top 5 domains per enterprise based on blocked (acl-deny) traffic for given period. When clicked on a given domain bar, it will redirect to that domain's dashboard page.", + "author": "Ronak Shah", + "creationDate": "10/17/2016", + "data": { + "xColumn": "SumOf", + "yColumn": "domains", + "colorColumn": "domains", + "orientation": "horizontal", + "tooltip": [ + { "column": "domains", "label": "Domain" }, + { "column": "SumOf", "label": "# ACL Deny", "format": ",.1f"} + ], + "colors": [ + "#7da3f7", + "#fec26a", + "#e78ac3", + "#f79e99" + ], + "xTickGrid": true, + "yTickGrid": false, + "xTickFormat": ".2s", + "xTicks": 8, + "xLabel": "Total # ACL Deny", + "yLabel": "Domains" + }, + "listeners": [ + { + "redirect": "/dashboards/vssDomainACL", + "params": { + "domainName": "domains" + } + }], + "query": "vss-top-domains-blocked-traffic" +} diff --git a/server/app/configurations/visualizations/vss-top-sec-events.json b/server/app/configurations/visualizations/vss-top-sec-events.json new file mode 100644 index 00000000..256a76c9 --- /dev/null +++ b/server/app/configurations/visualizations/vss-top-sec-events.json @@ -0,0 +1,23 @@ +{ + "id": "vss-top-sec-events", + "graph": "PieGraph", + "title": "Top Security Events", + "description": "Top 5 security events for this enterprise in a given period of time", + "author": "Ronak Shah", + "creationDate": "10/17/2016", + "data": { + "sliceColumn": "SumOf", + "labelColumn": "EventType", + "colorColumn": "EventType", + "tooltip": [ + { "column": "EventType", "label": "Event" }, + { "column": "SumOf", "label": "Count", "format": ",.1f"} + ], + "percentages": true, + "percentagesFormat": ",.1%", + "pieLabelRadius": 0.55, + "pieOuterRadius": 0.95, + "colorLegend": true + }, + "query": "vss-top-sec-events" +} diff --git a/server/app/controllers/base.controller.js b/server/app/controllers/base.controller.js index 97281f61..3fc4514b 100755 --- a/server/app/controllers/base.controller.js +++ b/server/app/controllers/base.controller.js @@ -1,25 +1,8 @@ -class BaseController { - formatApiError(err) { - if (!err) { - // eslint-disable-next-line no-console - return console.error('Provide an error'); - } - - const formatted = { - message: err.message, - }; - - if (err.errors) { - formatted.errors = {}; - const errors = err.errors; - for (const type in errors) { - if (errors.hasOwnProperty(type)) { - formatted.errors[type] = errors[type].message; - } - } - } - - return formatted; +class BaseController { + formatError(message, status) { + let err = new Error(message ? message : 'Internal Server Error'); + err.status = status ? status : 500; + return err; } } diff --git a/server/app/controllers/dashboards.controller.js b/server/app/controllers/dashboards.controller.js index 7527adf1..bab14900 100644 --- a/server/app/controllers/dashboards.controller.js +++ b/server/app/controllers/dashboards.controller.js @@ -1,5 +1,5 @@ import BaseController from './base.controller'; -import {DirectoryTypes, FetchManager} from '../lib/fetch'; +import {DirectoryTypes, FetchManager} from '../lib/utils/fetch'; class DashboardsController extends BaseController { diff --git a/server/app/controllers/visualizations.controller.js b/server/app/controllers/visualizations.controller.js new file mode 100644 index 00000000..6b9d4d9f --- /dev/null +++ b/server/app/controllers/visualizations.controller.js @@ -0,0 +1,59 @@ +import BaseController from './base.controller'; +import Constants from '../configurations/constants'; +import { DirectoryTypes, FetchManager } from '../lib/utils/fetch'; + +import { ServiceManager } from "../lib/servicemanager/index" +import { parameterizedConfiguration } from '../lib/utils/configurations' + +class VisualizationsController extends BaseController { + fetch = async (req, res, next) => { + let { visualization } = req.params; + let context = req.body; + + try { + let visualizationConfig = FetchManager.fetchAndParseJSON(visualization, DirectoryTypes.VISUALIZATION); + let queryConfig = null; + + if(visualizationConfig.query) + queryConfig = FetchManager.fetchAndParseJSON(visualizationConfig.query, DirectoryTypes.QUERY); + else if(visualizationConfig.script) + queryConfig = ServiceManager.executeScript(visualizationConfig.script); + + //If neither query and nor script + if(!queryConfig) + next(this.formatError('Unkown service', 422)); + + //Fethcing the service manager + let service = ServiceManager.getService(queryConfig.service); + + //Not able to reterive service from Service Manager + if(!service) + next(this.formatError('Cant find the mentioned service', 422)); + + //If context on body then parameterized the query + if (context) { + const pQuery = parameterizedConfiguration(queryConfig, context); + + if (pQuery) + queryConfig = pQuery; + else + res.json([]); + } + + //Executing the Service Fetch to reterive the response. + service.fetch(queryConfig, context).then(function(result) { + if(service.tabify) + result = service.tabify(result); + + res.json(result); + }, function(error) { + next(this.formatError(error, 422)); + }) + + } catch(err) { + next(err); + } + } +} + +export default new VisualizationsController(); diff --git a/server/app/lib/servicemanager/index.js b/server/app/lib/servicemanager/index.js new file mode 100644 index 00000000..03c080e9 --- /dev/null +++ b/server/app/lib/servicemanager/index.js @@ -0,0 +1,99 @@ +import { ElasticSearchService } from "../services/elasticsearch/index"; +import { VSDService } from "../services/vsd/index"; + +let config = { + timingCache: 5000, +} + +/* + Stores all services. +*/ +let services = { + elasticsearch: ElasticSearchService, + VSD: VSDService, +}; + +/* + Registers a new service to a service name +*/ +const register = function (service, serviceName) { + services[serviceName] = service; +} + +/* + Get the service registered for the given name +*/ +const getService = function (serviceName) { + if (!(serviceName in services)) + throw new Error("No service named " + serviceName + " has been registered yet!" ); + + return services[serviceName]; +} + +/* + Get the query ID for the given configuration and the given context + + Arguments: + * queryConfiguration: The query configuration + * context: the context if the query configuration should be parameterized + + Returns: + A unique string that represents the request ID +*/ +const getRequestID = function (queryConfiguration, context) { + + // TODO: Temporary - Replace this part in the middleware + // Note: It should actually be its own service ! + const isScript = typeof(queryConfiguration) === "string"; + + if (isScript) + return queryConfiguration + "[" + JSON.stringify(context) + "]"; + // End TODO + + const service = getService(queryConfiguration.service) + return service.getRequestID(queryConfiguration, context); +} + +/* + Tabify the results according to the service that has been used + + Arguments: + * serviceName: the service name + * response: the response results + + Returns: + An array of results +*/ +const tabify = function (queryConfiguration, response) { + const serviceName = queryConfiguration ? queryConfiguration.service : "VSD"; // In case of scripts... + + const service = getService(serviceName) + + if (!service || !service.hasOwnProperty("tabify")) + return response; + + return service.tabify(response); +} + + +// TODO: Temporary - Replace this part in the middleware +const executeScript = function (scriptName, context) { + // TODO: For now, let's put the script in the treeview as discussed on 11/03 + // Later, this part should be done in our middleware + let url = "../services/scripts/" + scriptName + ".js", + main = require(url).main; + + if (main) + return main(context); + + return false; +} + + +export const ServiceManager = { + config: config, + register: register, + getService: getService, + executeScript: executeScript, + tabify: tabify, +} diff --git a/server/app/lib/services/elasticsearch/elasticsearch.spec.js b/server/app/lib/services/elasticsearch/elasticsearch.spec.js new file mode 100644 index 00000000..8dcdbba8 --- /dev/null +++ b/server/app/lib/services/elasticsearch/elasticsearch.spec.js @@ -0,0 +1,83 @@ +import { ElasticSearchService, getCurrentConfig } from "./index"; +import { Map } from "immutable"; +import { ActionKeyStore } from "./redux/actions"; + + +describe('Elastic Search service', () => { + it('should expose certain methods and have an id', () => { + let expectedProperties = [ + "id", + "fetch", + "ping", + "getRequestID", + "tabify" + ]; + expect(Object.keys(ElasticSearchService)).toEqual(expectedProperties) + expect(ElasticSearchService.id).toEqual("elasticsearch") + }); +}); + + +describe('Elastic Search getRequestID', () => { + it('should return a stringify version of the query without parameters', () => { + let query = { + id: "ABC" + }, + context = { + enterpriseName: "Nuage Networks" + }; + expect(ElasticSearchService.getRequestID(query, context)).toEqual("ABC"); + }); + + it('should return a stringify version of the query with all used parameters', () => { + let query = { + id: "ABC", + query: { + randomFilter: "{{enterpriseName}}" + } + }, + context = { + enterpriseName: "Nuage Networks" + }; + expect(ElasticSearchService.getRequestID(query, context)).toEqual("ABC[{\"enterpriseName\":\"Nuage Networks\"}]"); + }); + +}); + + +describe('Elastic Search config', () => { + it('should have no default host', () => { + + const fakeState = { + ES: new Map() + }; + + delete process.env.REACT_APP_ELASTICSEARCH_HOST; + let config = getCurrentConfig(fakeState); + expect(config.host).toEqual(undefined); + }); + + it('should fetch information from the environment variable host', () => { + process.env.REACT_APP_ELASTICSEARCH_HOST = "https://www.google.com"; + + const fakeState = { + ES: new Map() + }; + + let config = getCurrentConfig(fakeState); + expect(config.host).toEqual("https://www.google.com"); + }); + + it('should fetch information from the specified context', () => { + process.env.REACT_APP_ELASTICSEARCH_HOST = "https://www.google.com"; + + const fakeState = { + ES: Map({ + [ActionKeyStore.ES_HOST]: "http://eshost:9200" + }) + }; + + let config = getCurrentConfig(fakeState); + expect(config.host).toEqual("http://eshost:9200"); + }); +}); diff --git a/server/app/lib/services/elasticsearch/index.js b/server/app/lib/services/elasticsearch/index.js new file mode 100644 index 00000000..dc1b158e --- /dev/null +++ b/server/app/lib/services/elasticsearch/index.js @@ -0,0 +1,88 @@ +import elasticsearch from "elasticsearch"; +import tabify from "./tabify"; +import { getUsedParameters } from "../../utils/configurations"; + +var client = null; +let config = function () { + return { + host: process.env.APP_ELASTICSEARCH_HOST ? process.env.APP_ELASTICSEARCH_HOST : null, + log: 'trace', + apiVersion: '2.2', + sniffOnStart: true, + sniffInterval: 60000, + sniffOnConnectionFault: true + } +} + +export const getCurrentConfig = function () { + let currentConfig = config() + return currentConfig; +} + +let ESClient = function () { + var config = getCurrentConfig(); + + if (!config.host){ + throw new Error("The ElasticSearch host is not configured. You can configure the ElasticSearch host by setting the environment variable REACT_APP_ELASTICSEARCH_HOST at compile time. For development with a local ElasticSearch instance running on the default port, you can put the following in your .bashrc or .profile startup script: 'export REACT_APP_ELASTICSEARCH_HOST=http://localhost:9200'"); + } + + return new elasticsearch.Client(config); +} + +const fetch = function (queryConfiguration) { + var client = ESClient() // eslint-disable-line + + if (client == null) { + client = ESClient() ; + } + + if (!client) + return Promise.reject(); + + return new Promise((resolve, reject) => { + client.search(queryConfiguration.query).then(function (body) { + resolve(body); + }, function (error) { + if (!error.body) + reject("no active Elastic Search host"); + else + reject(error.body.error.reason + ": " + error.body.error["resource.id"]); + }); + }); +} + +const ping = function (queryConfiguration, state) { + var client = ESClient(); // eslint-disable-line + + if (!client) + return Promise.reject(); + + return new Promise((resolve, reject) => { + client.search(queryConfiguration.query).then(function (body) { + resolve(body); + }, function (error) { + if (!error.body) + reject("no active Elastic Search host"); + else + reject(error.body.error.reason + ": " + error.body.error["resource.id"]); + }); + }); +} + +/* Computes the request ID based on the queryConfiguration that are actually used + */ +const getRequestID = function (queryConfiguration, context) { + const parameters = getUsedParameters(queryConfiguration, context); + if (Object.keys(parameters).length === 0) + return queryConfiguration.id; + + return queryConfiguration.id + "[" + JSON.stringify(parameters) + "]"; +} + +export const ElasticSearchService = { + id: "elasticsearch", + fetch: fetch, + ping: ping, + getRequestID: getRequestID, + tabify: tabify +} diff --git a/server/app/lib/services/elasticsearch/tabify.js b/server/app/lib/services/elasticsearch/tabify.js new file mode 100644 index 00000000..909a10a6 --- /dev/null +++ b/server/app/lib/services/elasticsearch/tabify.js @@ -0,0 +1,166 @@ +/* + This utility will convert the nested data structure + returned from an ElasticSearch query into a tabular + data structure represented as an array of row objects. + + Inspired by Kibana's implementation, found at + https://github.com/elastic/kibana/blob/master/src/ui/public/agg_response/tabify/tabify.js +*/ +export default function tabify(response) { + let table; + + if (response.aggregations) { + const tree = collectBucket(response.aggregations); + table = flatten(tree); + + } else if (response.hits) { + table = response.hits.hits.map((d) => d._source); + + } else if (Array.isArray(response)) { + table = response; + + } else { + throw new Error("Tabify() invoked with invalid result set. Result set must have either 'aggregations' or 'hits' defined."); + } + + if (process.env.NODE_ENV === "development") { + console.log("Results from tabify (first 3 rows only):"); + + // This one shows where there are "undefined" values. + console.log(table) + + // This one shows the full structure pretty-printed. + console.log(JSON.stringify(table.slice(0, 3), null, 2)) + } + + return table; +} + +function collectBucket(node, stack=[]) { + if (!node) + return; + + const keys = Object.keys(node); + + // Use old school `for` so we can break control flow by returning. + for(let i = 0; i < keys.length; i++) { + const key = keys[i]; + const value = node[key]; + + if (typeof value === 'object') { + + if ("hits" in value && Array.isArray(value.hits) && value.hits.length === 1) { + if ("sort" in value.hits[0]) { + value.hits[0]._source['sort'] = value.hits[0].sort[0]; + } + return value.hits[0]._source; + } + + if (Array.isArray(value)) { + return extractTree(value, [...stack, key]); + } + + // Here we are sure to have an object + if (key === "buckets" && Object.keys(value).length > 1) + { + return extractBuckets(value, [...stack, key]); + } + return collectBucket(value, [...stack, key]); + } + } + + return node; +} + +function extractBuckets(buckets, stack) { + const keys = Object.keys(buckets); + let results = []; + + for(let i = 0; i < keys.length; i++) { + const key = keys[i]; + const value = buckets[key]; + + let currentObject = collectBucket({[key]: value}); + + if (!currentObject) + continue; + + currentObject[stack[stack.length - 2]] = key; + results.push(currentObject) + } + + return results; +} + +function extractTree(buckets, stack) { + return buckets.map((bucket) => { + return Object.keys(bucket).reduce(function (tree, key) { + let value = bucket[key]; + + if (typeof value === "object") { + if("value" in value){ + value = value.value; + } else { + value = collectBucket(value, [...stack, key]); + } + } + + if(key === "key"){ + key = stack[stack.length - 2] + } + + tree[key] = value; + + return tree; + }, {}); + }); +} + +function flatten(tree, parentNode={}){ + + if (!tree) + return []; + + if (!Array.isArray(tree)) + tree = [tree]; + + return tree + + // Have the child node inherit values from the parent. + .map((childNode) => Object.assign({}, parentNode, childNode)) + + // Each node object here has values inherited from its parent. + .map((node) => { + + // Detect properties whose values are arrays. + const childTrees = Object.keys(node) + .map((key) => { + const value = node[key]; + if (Array.isArray(value)) { + return value; + } + return false; + }) + .filter((d) => d); + + switch (childTrees.length) { + + // Leaf node case, return the node. + case 0: + return node; + + // Non-leaf node case, recurse on the child nodes. + case 1: + const childTree = childTrees[0]; + if(childTree.length === 0){ + return node; + } + return flatten(childTree, node); + default: + throw new Error("This case should never happen"); + } + }) + + // Flatten the nested arrays. + .reduce((a, b) => a.concat(b), []); +} diff --git a/server/app/lib/services/elasticsearch/tabify.spec.js b/server/app/lib/services/elasticsearch/tabify.spec.js new file mode 100644 index 00000000..dcaaf695 --- /dev/null +++ b/server/app/lib/services/elasticsearch/tabify.spec.js @@ -0,0 +1,476 @@ +import tabify from './tabify'; + + +describe('ElasticSearch', () => { + it('should tabify list of objects', () => { + const response = { + "took": 8, + "timed_out": false, + "_shards": { + "total": 5, + "successful": 5, + "failed": 0 + }, + "hits": { + "total": 144000, + "max_score": 0, + "hits": [] + }, + "aggregations": { + "2": { + "buckets": { + "Enterprise": { + "4": { + "buckets": { + "ACLDENY": { + "doc_count": 51840, + "timestamp": { + "buckets": [ + { + "key_as_string": "2016-10-19T22:00:00.000Z", + "key": 1476914400000, + "doc_count": 1620, + "SumOf": { + "value": 1223694 + } + }, + { + "key_as_string": "2016-10-19T23:00:00.000Z", + "key": 1476918000000, + "doc_count": 2160, + "SumOf": { + "value": 1621468 + } + }, + { + "key_as_string": "2016-10-20T00:00:00.000Z", + "key": 1476921600000, + "doc_count": 2160, + "SumOf": { + "value": 1609771 + } + } + ] + } + } + } + }, + "doc_count": 144000 + } + } + } + } + } + + const expectedResults = [ + { + "key_as_string": "2016-10-19T22:00:00.000Z", + "timestamp": 1476914400000, + "doc_count": 1620, + "SumOf": 1223694 + }, + { + "key_as_string": "2016-10-19T23:00:00.000Z", + "timestamp": 1476918000000, + "doc_count": 2160, + "SumOf": 1621468 + }, + { + "key_as_string": "2016-10-20T00:00:00.000Z", + "timestamp": 1476921600000, + "doc_count": 2160, + "SumOf": 1609771 + } + ] + + expect(tabify(response)).toEqual(expectedResults); + }); + + + it('should tabify list of single object', () => { + const response = { + "took": 6, + "timed_out": false, + "_shards": { + "total": 5, + "successful": 5, + "failed": 0 + }, + "hits": { + "total": 144000, + "max_score": 0, + "hits": [] + }, + "aggregations": { + "2": { + "buckets": { + "Enterprise": { + "4": { + "buckets": { + "ACLDENY": { + "doc_count": 51840, + "domains": { + "doc_count_error_upper_bound": 0, + "sum_other_doc_count": 0, + "buckets": [ + { + "key": "chord_domain", + "doc_count": 51840, + "SumOf": { + "value": 38920591 + } + } + ] + } + } + } + }, + "doc_count": 144000 + } + } + } + } + } + + const expectedResults = [ + { + "domains": "chord_domain", + "doc_count": 51840, + "SumOf": 38920591 + } + ] + + expect(tabify(response)).toEqual(expectedResults); + }); + + it('should tabify a weird thing', () => { + const response = { + "took": 12, + "timed_out": false, + "_shards": { + "total": 5, + "successful": 5, + "failed": 0 + }, + "hits": { + "total": 144000, + "max_score": 0, + "hits": [] + }, + "aggregations": { + "2": { + "buckets": { + "Enterprise": { + "doc_count": 144000, + "SumOf": { + "value": 2158541661 + }, + "EventType": { + "doc_count_error_upper_bound": 0, + "sum_other_doc_count": 0, + "buckets": [ + { + "key": "TCA_EVENT", + "doc_count": 59040, + "SumOf": { + "value": 884851403 + } + }, + { + "key": "ACL_DENY", + "doc_count": 47520, + "SumOf": { + "value": 712882070 + } + }, + { + "key": "TCP_SYN_FLOOD", + "doc_count": 37440, + "SumOf": { + "value": 560808188 + } + } + ] + } + } + } + } + } + } + + const expectedResults = [ + {"value": 2158541661} + ] + + expect(tabify(response)).toEqual(expectedResults); + }); + + it('should tabify an empty list', () => { + const response = { + "took": 14, + "timed_out": false, + "_shards": { + "total": 15, + "successful": 15, + "failed": 0 + }, + "hits": { + "total": 669887, + "max_score": 0, + "hits": [] + }, + "aggregations": { + "1": { + "buckets": { + "Enterprise": { + "doc_count": 669887, + "slastatus": { + "doc_count_error_upper_bound": 0, + "sum_other_doc_count": 0, + "buckets": [] + } + } + } + } + } + } + + const expectedResults = [] + + expect(tabify(response)).toEqual(expectedResults); + }); + + it('should tabify an object', () => { + const response = { + "took": 4, + "timed_out": false, + "_shards": { + "total": 5, + "successful": 5, + "failed": 0 + }, + "hits": { + "total": 144000, + "max_score": 0, + "hits": [] + }, + "aggregations": { + "2": { + "buckets": { + "Domain": { + "doc_count": 144000, + "timezones": { + "buckets": { + "Prev 24": { + "doc_count": 0, + "types": { + "buckets": { + "type": { + "doc_count": 10 + } + } + } + }, + "Last 24": { + "doc_count": 0, + "types": { + "buckets": { + "type": { + "doc_count": 20 + } + } + } + } + } + } + } + } + } + } + } + + const expectedResults = [ + { "timezones": "Prev 24", "doc_count": 10 }, + { "timezones": "Last 24", "doc_count": 20 } + ] + + expect(tabify(response)).toEqual(expectedResults); + }); + + it('should tabify hits within aggregation', () => { + const response = { + "took": 13628, + "timed_out": false, + "_shards": { + "total": 5, + "successful": 5, + "failed": 0 + }, + "hits": { + "total": 10080000, + "max_score": 0, + "hits": [] + }, + "aggregations": { + "2": { + "buckets": { + "Enterprise": { + "3": { + "buckets": { + "Domain": { + "doc_count": 2880000, + "top-acls": { + "doc_count_error_upper_bound": 4557, + "sum_other_doc_count": 1404000, + "buckets": [ + { + "key": "55cd911d-aa9b-4647-b4dc-68a63122aa7c", + "doc_count": 10080, + "top-acl-hits": { + "hits": { + "total": 10080, + "max_score": null, + "hits": [ + { + "_index": "nuage_flow", + "_type": "nuage_doc_type", + "_id": "AVeZZov_c3SvEs9LIN_2", + "_score": null, + "_source": { + "destinationport": 3, + "sourceport": 5, + "protocol": "TCP", + "nuage_metadata": { + "dpgName": "PG15", + "spgName": "PG9" + } + }, + "sort": [ + 1000 + ] + } + ] + } + } + }, + { + "key": "ba6ee261-3aa1-439f-be90-102136300472", + "doc_count": 7200, + "top-acl-hits": { + "hits": { + "total": 7200, + "max_score": null, + "hits": [ + { + "_index": "nuage_flow", + "_type": "nuage_doc_type", + "_id": "AVeZZfnvc3SvEs9LIA9v", + "_score": null, + "_source": { + "destinationport": 1, + "sourceport": 4, + "protocol": "UDP", + "nuage_metadata": { + "dpgName": "PG15", + "spgName": "PG18" + } + }, + "sort": [ + 1000 + ] + } + ] + } + } + }, + { + "key": "fd4ba772-608c-4ea2-84cc-701214385856", + "doc_count": 7200, + "top-acl-hits": { + "hits": { + "total": 7200, + "max_score": null, + "hits": [ + { + "_index": "nuage_flow", + "_type": "nuage_doc_type", + "_id": "AVeZXy8tc3SvEs9LFwT9", + "_score": null, + "_source": { + "destinationport": 3, + "sourceport": 3, + "protocol": "TCP", + "nuage_metadata": { + "dpgName": "PG8", + "spgName": "PG9" + } + }, + "sort": [ + 1000 + ] + } + ] + } + } + } + ] + } + } + } + }, + "doc_count": 10080000 + } + } + } + } + }; + + const expectedResults = [ + { + "top-acls": "55cd911d-aa9b-4647-b4dc-68a63122aa7c", + "doc_count": 10080, + "top-acl-hits": { + "destinationport": 3, + "sourceport": 5, + "protocol": "TCP", + "sort": 1000, + "nuage_metadata": { + "dpgName": "PG15", + "spgName": "PG9" + } + } + }, + { + "top-acls": "ba6ee261-3aa1-439f-be90-102136300472", + "doc_count": 7200, + "top-acl-hits": { + "destinationport": 1, + "sourceport": 4, + "protocol": "UDP", + "sort": 1000, + "nuage_metadata": { + "dpgName": "PG15", + "spgName": "PG18" + } + } + }, + { + "top-acls": "fd4ba772-608c-4ea2-84cc-701214385856", + "doc_count": 7200, + "top-acl-hits": { + "destinationport": 3, + "sourceport": 3, + "protocol": "TCP", + "sort": 1000, + "nuage_metadata": { + "dpgName": "PG8", + "spgName": "PG9" + } + } + } + ]; + + expect(tabify(response)).toEqual(expectedResults); + }); + +}); diff --git a/server/app/lib/services/scripts/effective-score.js b/server/app/lib/services/scripts/effective-score.js new file mode 100644 index 00000000..1d0b9388 --- /dev/null +++ b/server/app/lib/services/scripts/effective-score.js @@ -0,0 +1,11 @@ +import { DirectoryTypes, FetchManager } from '../../utils/fetch'; + +export const main = function (context) { + // Example on how to get a service + // const service = ServiceManager.getService("elasticsearch"); + + // Example of request + const firstQueryID = "effective-score-part1"; + + return FetchManager.fetchAndParseJSON(firstQueryID, DirectoryTypes.QUERY); +} diff --git a/server/app/lib/util.js b/server/app/lib/services/scripts/index.js old mode 100755 new mode 100644 similarity index 100% rename from server/app/lib/util.js rename to server/app/lib/services/scripts/index.js diff --git a/server/app/lib/services/vsd/index.js b/server/app/lib/services/vsd/index.js new file mode 100644 index 00000000..d0648e41 --- /dev/null +++ b/server/app/lib/services/vsd/index.js @@ -0,0 +1,189 @@ +import $ from "jquery"; + +import { ActionKeyStore } from "./redux/actions"; +import { parameterizedConfiguration } from "../../utils/configurations"; + +const config = { + api_version: "5.0", + end_point_prefix: "/nuage/api/" +} + +const getHeaders = (token, organization, filter, page, orderBy, proxyUser) => { + + // Default headers + let headers = { + "Accept": "*/*", + "Content-Type": "application/json", + "X-Nuage-Organization":"csp", + } + + if (token) + headers["Authorization"] = "XREST " + token + + if (organization) + headers["X-Nuage-Organization"] = organization + + if (filter) + headers["X-Nuage-Filter"] = filter + + if (orderBy) + headers["X-Nuage-OrderBy"] = orderBy + + if (page) + headers["X-Nuage-Page"] = page + + if (proxyUser) + headers["X-Nuage-ProxyUser"] = proxyUser + + // console.error(headers); + return headers +} + +export const getURLEndpoint = (configuration) => { + + let url = configuration.query.parentResource; + + if (configuration.query.hasOwnProperty("parentID")) + url += "/" + configuration.query.parentID; + + if (configuration.query.hasOwnProperty("resource")) + url += "/" + configuration.query.resource; + + return url; +} + +export const getRequestID = (configuration, context) => { + const tmpConfiguration = parameterizedConfiguration(configuration, context); + + if (!tmpConfiguration) + return; + + let URL = getURLEndpoint(tmpConfiguration); + + if (!tmpConfiguration.query.filter) + return URL; + + return URL + "-" + tmpConfiguration.query.filter; +} + +const getURL = (configuration, api) => { + const lastIndex = api.length - 1; + + let base_url = api[lastIndex] === "/" ? api.substring(0, lastIndex) : api; + base_url += config.end_point_prefix + "v" + config.api_version.replace(".", "_") + "/"; + + return base_url + getURLEndpoint(configuration); +} + +const makeRequest = (url, headers) => { + // Encapsulates $.get in a Promise to ensure all services are having the same behavior + return new Promise((resolve, reject) => { + $.get({ + url: url, + headers: headers + }) + .done((response) => { + return resolve(response) + }) + .fail((error) => { + return reject(error) + }); + }); +} + +const getMockResponse = (configuration) => { + + let parent = configuration.query.parentResource, + parentID = configuration.query.parentID, + resource = configuration.query.resource; + + if (!resource && !parentID) { + switch (parent) { + case "enterprises": + return [ + { + "ID": "54334da-6507-484e-8d5b-11d44c4a852e", + "lastUpdatedBy":"3321e4da-6507-484e-8d5b-11d44c4a852e", + "name":"Nuage Networks", + } + ]; + default: + throw new Error("You should set a default value for = " + parent); + } + } + + if (!resource) { + // case of type enterprises/id + switch (parent) { + case "enterprises": + return [ + { + ID: parentID, + name: "Enterprise Test", + } + ] + default: + throw new Error("You should set a default value for = " + parent); + } + } + + switch (resource) { + case "nsgateways": + // case of enterprises/id/domains + return [ + { + ID: "98545-1232-3432", + name: "NSG 1", + personality: "NSG" + }, + { + ID: "906767-432432-89343", + name: "NSG 2", + personality: "NSG" + } + ] + default: + // case of enterprises/id/domains + return [ + { + ID: "12345-1232-3432", + name: "Domain 1", + }, + { + ID: "432980-432432-89343", + name: "Domain 2", + }, + { + ID: "54365-4387-948305", + name: "Domain 3", + } + ] + } +} + +export const VSDServiceTest = { + makeRequest: makeRequest, + getURL: getURL +} + +const fetch = (configuration, state) => { + let token = state.VSD.get(ActionKeyStore.TOKEN), + api = state.VSD.get(ActionKeyStore.API) || process.env.REACT_APP_VSD_API_ENDPOINT, + organization = state.VSD.get(ActionKeyStore.ORGANIZATION); + + if (!api || !token) + return Promise.reject("No VSD API endpoint specified. To configure the VSD API endpoint, provide the endpoint URL via the environment variable REACT_APP_VSD_API_ENDPOINT at compile time. For a development environment, you can set an invalid value, which will cause the system to provide mock data for testing. For example, you can add the following line to your .bashrc or .profile startup script: 'export REACT_APP_VSD_API_ENDPOINT=http://something.invalid'"); + + const url = VSDServiceTest.getURL(configuration, api), + headers = getHeaders(token, organization, configuration.query.filter); + + return VSDServiceTest.makeRequest(url, headers); +} + +export const VSDService = { + id: "VSD", + config: config, + getRequestID: getRequestID, + getMockResponse: getMockResponse, + fetch: fetch +} diff --git a/server/app/lib/services/vsd/redux/actions.js b/server/app/lib/services/vsd/redux/actions.js new file mode 100644 index 00000000..8dffedde --- /dev/null +++ b/server/app/lib/services/vsd/redux/actions.js @@ -0,0 +1,20 @@ +export const ActionTypes = { + VSD_ACTION_SET_SETTINGS: "VSD_ACTION_SET_SETTINGS", +}; + +export const ActionKeyStore = { + TOKEN: "token", + API: "api", + ORGANIZATION: "organization", +}; + +export const Actions = { + setSettings: function(token, API, organization) { + return { + type: ActionTypes.VSD_ACTION_SET_SETTINGS, + token: token, + API: API, + organization: organization + } + } +}; diff --git a/server/app/lib/services/vsd/redux/reducer.js b/server/app/lib/services/vsd/redux/reducer.js new file mode 100644 index 00000000..806e1947 --- /dev/null +++ b/server/app/lib/services/vsd/redux/reducer.js @@ -0,0 +1,30 @@ +import { Map } from "immutable"; +import { ActionTypes, ActionKeyStore } from "./actions"; + +let initialState = Map() // eslint-disable-line + .set(ActionKeyStore.TOKEN, null) + .set(ActionKeyStore.API, null); + +function setSettings(state, token, API, organization) { + if (!token && !API) + return state; + + return state.set(ActionKeyStore.TOKEN, token) + .set(ActionKeyStore.API, API) + .set(ActionKeyStore.ORGANIZATION, organization); +} + + +function VSDReducer(state = initialState, action) { + + switch (action.type) { + case ActionTypes.VSD_ACTION_SET_SETTINGS: + return setSettings(state, action.token, action.API, action.organization); + + default: + return state; + } +}; + + +export default VSDReducer; diff --git a/server/app/lib/services/vsd/vsd.spec.js b/server/app/lib/services/vsd/vsd.spec.js new file mode 100644 index 00000000..1b480d59 --- /dev/null +++ b/server/app/lib/services/vsd/vsd.spec.js @@ -0,0 +1,158 @@ +import configureMockStore from 'redux-mock-store'; +import thunk from 'redux-thunk'; +import $ from 'jquery'; +import "whatwg-fetch"; +import { VSDService, VSDServiceTest } from "./index"; +import { Map } from "immutable"; +import nock from 'nock'; + +import { ActionKeyStore } from "./redux/actions"; + +const middlewares = [thunk]; +const mockStore = configureMockStore(middlewares); + + +xdescribe('VSD service', () => { + it('should expose certain methods and have an id', () => { + let expectedProperties = [ + "id", + "config", + "getRequestID", + "getMockResponse", + "fetch" + ]; + expect(Object.keys(VSDService)).toEqual(expectedProperties) + expect(VSDService.id).toEqual("VSD") + }); + + it('should expose certain methods for tests', () => { + let expectedProperties = [ + "makeRequest", + "getURL", + ]; + expect(Object.keys(VSDServiceTest)).toEqual(expectedProperties) + }); +}); + + +xdescribe('VSDService getRequestID', () => { + it('should return the URL', () => { + let configuration = { + query: { + parentResource: "enterprises", + parentID: "{{enterpriseID}}", + resource: "{{children}}" + }}, + context = { + enterpriseID: "1234", + children: "domains", + }; + expect(VSDService.getRequestID(configuration, context)).toEqual("enterprises/1234/domains"); + }); + + it('should return defaut URL when context does not match', () => { + let configuration = { + query: { + parentResource: "enterprises", + parentID: "1234", + resource: "domains" + }}, + context = {}; + expect(VSDService.getRequestID(configuration, context)).toEqual("enterprises/1234/domains"); + }); + + it('should return null when context does not allow to parameterize configuration', () => { + let configuration = { + query: { + parentResource: "enterprises", + parentID: "{{enterpriseID}}", + resource: "domains" + }}, + context = { + enterpriseName: "ABC" + }; + expect(VSDService.getRequestID(configuration, context)).toEqual(undefined); + }); +}); + + +describe('VSDService fetch', () => { + it('should fetch information from the default host', () => { + process.env.REACT_APP_VSD_API_ENDPOINT = "http://localhost:8001/"; + + let configuration = { + query: { + parentResource: "enterprises", + parentID: "1234", + resource: "domains" + } + }; + + const headers = { + "Accept": "*/*", + "Authorization": "XREST 1234", + "Content-Type": "application/json", + "X-Nuage-Organization": "csp" + } + + const fakeState = { + VSD: Map({ + token: "1234", + }) + }; + + VSDServiceTest.makeRequest = jasmine.createSpy("makeRequest").and.callFake(() => { + return Promise.resolve(); + }); + + // VSDServiceTest.getURL = jasmine.createSpy("getURL").and.callFake(() => { + // return Promise.resolve(); + // }); + + return VSDService.fetch(configuration, fakeState).then( + (results) => { + // expect(VSDServiceTest.getURL).toHaveBeenCalledWith(null); + expect(VSDServiceTest.makeRequest).toHaveBeenCalled(); + expect(VSDServiceTest.makeRequest).toHaveBeenCalledWith("http://localhost:8001/nuage/api/v4_0/enterprises/1234/domains", headers); + } + ); + }); + + + xit('should update the organization if provided', () => { + process.env.REACT_APP_VSD_API_ENDPOINT = "http://localhost:8001/"; + + let configuration = { + query: { + parentResource: "enterprises", + parentID: "1234", + resource: "domains" + } + }; + + const headers = { + "Accept": "*/*", + "Authorization": "XREST 1234", + "Content-Type": "application/json", + "X-Nuage-Organization": "enterprise" + } + + const fakeState = { + VSD: Map({ + token: "1234", + [ActionKeyStore.ORGANIZATION]: "enterprise" + }) + }; + + VSDServiceTest.makeRequest = jasmine.createSpy("makeRequest").and.callFake(() => { + return Promise.resolve(); + }); + + return VSDService.fetch(configuration, fakeState).then( + (results) => { + expect(VSDServiceTest.makeRequest).toHaveBeenCalled(); + expect(VSDServiceTest.makeRequest).toHaveBeenCalledWith("http://localhost:8001/nuage/api/v4_0/enterprises/1234/domains", headers); + } + ); + }); +}); diff --git a/server/app/lib/utils/configurations.js b/server/app/lib/utils/configurations.js new file mode 100644 index 00000000..6c388985 --- /dev/null +++ b/server/app/lib/utils/configurations.js @@ -0,0 +1,73 @@ +import parse from "json-templates"; + +/* + Check if the context can parameterized all parameters. + Arguments: + * parameters: parameters of the query that have been parsed. + * context: the context object that contains parameters value + Returns: + True if the context matches all parameters +*/ +const shouldParameterizedContext = (parameters, context) => { + return parameters.every((parameter) => { + return "defaultValue" in parameter || parameter.key in context; + }) +} + +/* + Parameterized a configuration according to the given context + Arguments: + * configuration: the configuration template that needs to be parameterized + * context: the context object that contains parameters + Returns: + A parameterized configuration. +*/ +export const parameterizedConfiguration = (configuration, context) => { + if (!configuration) + return false; + + const template = parse(configuration), + isContextOK = shouldParameterizedContext(template.parameters, context); + + if(isContextOK) + return template(context); + + return false; +} + +/* + Returns a key-value dictionary with all parameters that are really used + in the configuration. + Arguments: + * configuration: the configuration template that needs to be parameterized + * context: the context object that contains parameters + Returns: + An object that gives all parameters +*/ +export const getUsedParameters = (configuration, context) => { + const parameters = parse(configuration).parameters; + + let queryParams = {}; + + for (let i in parameters) { + + if (!parameters.hasOwnProperty(i)) + continue; + + let parameter = parameters[i]; + + if (parameter.key in context) { + queryParams[parameter.key] = context[parameter.key]; + } + else if ("defaultValue" in parameter) { + queryParams[parameter.key] = parameter.defaultValue; + } + // else ignore the parameter because it is not used in the provided configuration. + } + + return queryParams; +} + +export const contextualize = (data, context) => { + return parse(data)(context); +} diff --git a/server/app/lib/utils/fetch.js b/server/app/lib/utils/fetch.js new file mode 100644 index 00000000..b7a01147 --- /dev/null +++ b/server/app/lib/utils/fetch.js @@ -0,0 +1,34 @@ +import Constants from '../../configurations/constants'; + +import fs from 'fs'; +import path from 'path'; + +export const DirectoryTypes = { + DASHBOARD: 'dashboards', + QUERY: 'queries', + VISUALIZATION: 'visualizations' +} + +const configPath = `${Constants.baseDir}/app/configurations`; + +const fetchJSON = function (file, type) { + let fileContent = fs.readFileSync( + path.resolve(configPath, type, `${file}.json`), + 'utf8'); + return fileContent; +} + +const parseJSON = function (content) { + return JSON.parse(content); +} + +const fetchAndParseJSON = function (file, type) { + let content = fetchJSON(file, type); + return content ? parseJSON(content) : {}; +} + +export const FetchManager = { + fetchJSON: fetchJSON, + parseJSON: parseJSON, + fetchAndParseJSON: fetchAndParseJSON +} diff --git a/server/app/middleware/error-handler.js b/server/app/middleware/error-handler.js index 68ed09b5..036f1f10 100644 --- a/server/app/middleware/error-handler.js +++ b/server/app/middleware/error-handler.js @@ -1,6 +1,10 @@ import Constants from '../configurations/constants'; export default function errorHandler(err, req, res, next) { + if (res.headersSent) { + return next(err) + } + if (!err) { return res.sendStatus(500); } From fce9707d86c16a71f4bb839647287d56364bb203 Mon Sep 17 00:00:00 2001 From: nxanil Date: Fri, 19 May 2017 17:50:30 +0530 Subject: [PATCH 08/70] Middleware: README.md updated --- server/README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/README.md b/server/README.md index 0cff67c8..e05e22ef 100644 --- a/server/README.md +++ b/server/README.md @@ -8,4 +8,8 @@ npm start ## NPM Scripts - **`npm start`** - Start live-reloading development server -- **`npm run build`** - Generate production ready application in `./build` \ No newline at end of file +- **`npm run build`** - Generate production ready application in `./build` + +## Middleware APIs + 1. Dashboard Confirguration: GET http://HOSTNAME/api/dashboards/:dashboard-id + 2. Data API - POST http://HOSTNAME/api/visualizations/:visualization-id {refreshInterval: '-1'} From 557c4378ad8d275a4634911dc2c41ae84711a7ed Mon Sep 17 00:00:00 2001 From: nxanil Date: Tue, 30 May 2017 11:42:49 +0530 Subject: [PATCH 09/70] Integration of Middleware --- .../configurations/dashboards/aarDomain.json | 21 - .../dashboards/aarEnterprise.json | 27 - .../dashboards/aarEnterpriseDetail.json | 21 - public/configurations/dashboards/aarNSG.json | 39 -- .../dashboards/aarNSGDetail.json | 22 - .../dashboards/aarNetworkPerformance.json | 22 - .../dashboards/appsOverview.json | 9 - .../configurations/dashboards/dashboard2.json | 10 - .../dashboards/dateHistogramExample.json | 17 - public/configurations/dashboards/example.json | 10 - .../dashboards/kitchenSink.json | 117 ----- .../dashboards/lineChartExample.json | 17 - .../dashboards/multi-line-test.json | 17 - .../dashboards/tableExample.json | 9 - public/configurations/dashboards/vnf.json | 44 -- .../dashboards/vssDomainACL.json | 47 -- .../dashboards/vssDomainEvent.json | 28 -- .../dashboards/vssDomainFlow.json | 92 ---- .../dashboards/vssDomainTraffic.json | 49 -- .../dashboards/vssEnterprise.json | 16 - .../queries/aar-default-app-l7.json | 54 -- .../queries/aar-domain-probe-path.json | 71 --- .../aar-domain-probe-table-dest-to-src.json | 41 -- .../queries/aar-domain-probe-table.json | 41 -- .../queries/aar-domain-top5-apmg.json | 80 --- .../queries/aar-flow-sla-heatmap.json | 62 --- .../queries/aar-nsg-app-from-nsg.json | 216 -------- .../queries/aar-nsg-app-linechart.json | 83 --- .../queries/aar-nsg-app-to-nsg.json | 216 -------- .../queries/aar-nsg-sla-from-nsg.json | 97 ---- .../queries/aar-nsg-sla-to-nsg.json | 97 ---- .../queries/aar-nsg-top10-app.json | 75 --- .../aar-nsg-top5-talkers-download.json | 91 ---- .../queries/aar-nsg-top5-talkers-upload.json | 91 ---- .../queries/aar-slastatus-enterprise.json | 50 -- .../queries/app-specific-vertical-bar.json | 57 --- .../connectivity-score-part1-download.json | 45 -- .../connectivity-score-part1-upload.json | 45 -- .../connectivity-score-part2-download.json | 50 -- .../connectivity-score-part2-upload.json | 50 -- .../queries/effective-score-part1.json | 57 --- .../queries/effective-score-part2.json | 52 -- .../newly-discovered-applications.json | 10 - .../queries/number-of-apm-groups.json | 10 - .../queries/number-of-applications.json | 10 - .../queries/number-of-npms.json | 10 - .../number-of-performance-monitors.json | 10 - .../configurations/queries/probe-paths.json | 67 --- ...-bottom-5-paths-horizontal-bar-charts.json | 103 ---- .../queries/top20-talkers-domain-table.json | 185 ------- ...0-talkers-enterprise-defaultapp-table.json | 123 ----- .../top20-talkers-enterprise-table.json | 125 ----- .../queries/top5-APMG-APP-pie-chart.json | 72 --- .../queries/top5-app-vertical-bar-domain.json | 75 --- .../queries/top5-app-vertical-bar.json | 60 --- .../queries/top5-download-users-table.json | 112 ----- .../queries/top5-upload-users-table.json | 112 ----- .../queries/top5-users-table.json | 86 ---- .../queries/vertical-bar-with-sla.json | 23 - .../queries/vnf-status-linechart.json | 82 --- public/configurations/queries/vnf-status.json | 23 - .../queries/vsd-from-nsgs-list.json | 11 - .../queries/vsd-to-nsgs-list.json | 11 - .../queries/vss-domain-acl-dpg.json | 90 ---- .../queries/vss-domain-acl-spg.json | 90 ---- .../queries/vss-domain-acl-time.json | 87 ---- .../queries/vss-domain-acl-top5.json | 91 ---- .../queries/vss-domain-events-by-pg.json | 75 --- .../queries/vss-domain-events-by-type.json | 75 --- .../queries/vss-domain-events-detail.json | 24 - .../queries/vss-domain-flow-table.json | 47 -- .../queries/vss-domain-flow.json | 121 ----- .../queries/vss-domain-traffic-icmp.json | 102 ---- .../queries/vss-domain-traffic-tcp-conn.json | 102 ---- .../vss-domain-traffic-tcp-multiline.json | 102 ---- .../queries/vss-domain-traffic-tcp-syn.json | 72 --- .../vss-domain-traffic-tcp-synflood.json | 87 ---- .../queries/vss-domain-traffic-top-dpg.json | 75 --- .../queries/vss-domain-traffic-top-spg.json | 75 --- .../queries/vss-domain-traffic-udp.json | 102 ---- .../queries/vss-ent-acldeny-time.json | 72 --- .../vss-enterprise-acldeny-metric.json | 66 --- .../queries/vss-enterprise-alerts-metric.json | 66 --- .../queries/vss-enterprise-events-metric.json | 51 -- .../queries/vss-enterprise-flows-metric.json | 58 --- .../queries/vss-enterprise-pg-metric.json | 58 --- .../vss-top-domains-blocked-traffic.json | 75 --- .../queries/vss-top-sec-events.json | 65 --- .../visualizations/aar-domain-probe-path.json | 20 - .../aar-domain-probe-table-dest-to-src.json | 21 - .../aar-domain-probe-table.json | 21 - .../visualizations/aar-domain-top5-apmg.json | 18 - .../visualizations/aar-flow-sla-heatmap.json | 28 -- .../visualizations/aar-nsg-app-from-nsg.json | 22 - .../visualizations/aar-nsg-app-linechart.json | 51 -- .../visualizations/aar-nsg-app-to-nsg.json | 22 - .../visualizations/aar-nsg-gauge-chart.json | 13 - .../visualizations/aar-nsg-line-chart.json | 16 - .../visualizations/aar-nsg-sla-from-nsg.json | 18 - .../visualizations/aar-nsg-sla-to-nsg.json | 18 - .../visualizations/aar-nsg-top10-app.json | 18 - .../aar-nsg-top5-talkers-download.json | 17 - .../aar-nsg-top5-talkers-upload.json | 17 - .../aar-slastatus-enterprise.json | 17 - .../app-specific-date-histogram.json | 19 - .../app-specific-line-chart.json | 13 - .../visualizations/effective-score.json | 13 - ...y-discovered-applications-with-circle.json | 13 - .../newly-discovered-applications.json | 9 - .../visualizations/number-of-apm-groups.json | 31 -- .../number-of-applications.json | 31 -- .../visualizations/number-of-npms.json | 31 -- .../number-of-performance-monitors.json | 31 -- .../visualizations/top20-talkers-domain.json | 34 -- .../top20-talkers-enterprise-defaultapp.json | 23 - .../top20-talkers-enterprise.json | 25 - .../visualizations/top5-app-donut.json | 14 - .../top5-app-horizontal-bar.json | 23 - .../visualizations/top5-app-pie.json | 32 -- .../visualizations/top5-app-table.json | 21 - .../top5-app-vertical-bar-domain.json | 27 - .../visualizations/top5-app-vertical-bar.json | 36 -- .../top5-download-users-table.json | 18 - .../top5-upload-users-table.json | 18 - .../visualizations/top5-users-table.json | 17 - .../visualizations/vnf-cpu-status.json | 14 - .../visualizations/vnf-disk-status.json | 14 - .../visualizations/vnf-memory-status.json | 15 - .../visualizations/vnf-status-linechart.json | 29 -- .../visualizations/vsd-from-nsgs-table.json | 49 -- .../visualizations/vsd-to-nsgs-table.json | 49 -- .../visualizations/vss-domain-acl-dpg.json | 25 - .../visualizations/vss-domain-acl-spg.json | 23 - .../visualizations/vss-domain-acl-time.json | 25 - .../visualizations/vss-domain-acl-top5.json | 21 - .../vss-domain-events-by-pg.json | 22 - .../vss-domain-events-by-type.json | 35 -- .../vss-domain-events-detail.json | 18 - .../vss-domain-flow-fixed-weight.json | 13 - .../visualizations/vss-domain-flow-table.json | 21 - .../visualizations/vss-domain-flow.json | 24 - .../vss-domain-traffic-icmp.json | 22 - .../vss-domain-traffic-tcp-conn.json | 22 - .../vss-domain-traffic-tcp-syn.json | 57 --- .../vss-domain-traffic-tcp-synflood.json | 22 - .../vss-domain-traffic-top-dpg.json | 26 - .../vss-domain-traffic-top-spg.json | 24 - .../vss-domain-traffic-udp.json | 21 - .../visualizations/vss-ent-acldeny-time.json | 22 - .../vss-enterprise-acldeny-metric.json | 15 - .../vss-enterprise-alerts-metric.json | 15 - .../vss-enterprise-events-metric.json | 15 - .../vss-enterprise-flows-metric.json | 15 - .../vss-enterprise-pg-metric.json | 15 - .../vss-top-domains-blocked-traffic.json | 38 -- .../visualizations/vss-top-sec-events.json | 23 - .../dashboards/kitchenSink.json | 9 + .../configurations/dashboards/medals.json | 0 .../dashboards/medalsPerCountry.json | 0 .../queries/medalsEvolution.json | 0 .../queries/medalsEvolutionPerCountry.json | 0 .../queries/medalsPerCountry.json | 0 .../configurations/queries/medalsTable.json | 0 .../configurations/queries/top5Countries.json | 0 .../queries/vnf-status-linechart.json | 6 +- .../visualizations/medalsEvolution.json | 0 .../medalsEvolutionPerCountry.json | 0 .../visualizations/medalsPerCountry.json | 0 .../visualizations/medalsRepartition.json | 0 .../visualizations/medalsTable.json | 0 .../visualizations/top5Countries.json | 0 .../app/controllers/dashboards.controller.js | 13 +- .../controllers/visualizations.controller.js | 18 + server/app/routes.js | 3 +- src/components/Dashboard/index.js | 1 + src/components/Graphs/GaugeGraph/index.js | 1 - src/components/Graphs/HeatmapGraph/index.js | 3 +- src/components/Graphs/LineGraph/index.js | 1 - src/components/Graphs/MultiLineGraph/index.js | 4 - src/components/Visualization/index.js | 83 +-- .../nuage/elasticsearch/elasticsearch.spec.js | 83 --- src/configs/nuage/elasticsearch/index.js | 77 +-- .../nuage/elasticsearch/redux/actions.js | 16 - .../nuage/elasticsearch/redux/reducer.js | 27 - src/configs/nuage/elasticsearch/tabify.js | 166 ------ .../nuage/elasticsearch/tabify.spec.js | 476 ------------------ src/configs/nuage/vsd/index.js | 157 +----- src/configs/nuage/vsd/redux/actions.js | 20 - src/configs/nuage/vsd/redux/reducer.js | 30 -- src/configs/nuage/vsd/vsd.spec.js | 158 ------ src/redux/store.js | 21 +- src/services/configurations/index.js | 3 +- src/services/configurations/redux/actions.js | 6 +- src/services/configurations/redux/reducer.js | 16 +- src/services/servicemanager/index.js | 56 +-- src/services/servicemanager/redux/actions.js | 69 +-- 196 files changed, 121 insertions(+), 8570 deletions(-) delete mode 100644 public/configurations/dashboards/aarDomain.json delete mode 100644 public/configurations/dashboards/aarEnterprise.json delete mode 100644 public/configurations/dashboards/aarEnterpriseDetail.json delete mode 100644 public/configurations/dashboards/aarNSG.json delete mode 100644 public/configurations/dashboards/aarNSGDetail.json delete mode 100644 public/configurations/dashboards/aarNetworkPerformance.json delete mode 100644 public/configurations/dashboards/appsOverview.json delete mode 100644 public/configurations/dashboards/dashboard2.json delete mode 100644 public/configurations/dashboards/dateHistogramExample.json delete mode 100644 public/configurations/dashboards/example.json delete mode 100644 public/configurations/dashboards/kitchenSink.json delete mode 100644 public/configurations/dashboards/lineChartExample.json delete mode 100644 public/configurations/dashboards/multi-line-test.json delete mode 100644 public/configurations/dashboards/tableExample.json delete mode 100644 public/configurations/dashboards/vnf.json delete mode 100644 public/configurations/dashboards/vssDomainACL.json delete mode 100644 public/configurations/dashboards/vssDomainEvent.json delete mode 100644 public/configurations/dashboards/vssDomainFlow.json delete mode 100644 public/configurations/dashboards/vssDomainTraffic.json delete mode 100644 public/configurations/dashboards/vssEnterprise.json delete mode 100644 public/configurations/queries/aar-default-app-l7.json delete mode 100644 public/configurations/queries/aar-domain-probe-path.json delete mode 100644 public/configurations/queries/aar-domain-probe-table-dest-to-src.json delete mode 100644 public/configurations/queries/aar-domain-probe-table.json delete mode 100644 public/configurations/queries/aar-domain-top5-apmg.json delete mode 100644 public/configurations/queries/aar-flow-sla-heatmap.json delete mode 100644 public/configurations/queries/aar-nsg-app-from-nsg.json delete mode 100644 public/configurations/queries/aar-nsg-app-linechart.json delete mode 100644 public/configurations/queries/aar-nsg-app-to-nsg.json delete mode 100644 public/configurations/queries/aar-nsg-sla-from-nsg.json delete mode 100644 public/configurations/queries/aar-nsg-sla-to-nsg.json delete mode 100644 public/configurations/queries/aar-nsg-top10-app.json delete mode 100644 public/configurations/queries/aar-nsg-top5-talkers-download.json delete mode 100644 public/configurations/queries/aar-nsg-top5-talkers-upload.json delete mode 100644 public/configurations/queries/aar-slastatus-enterprise.json delete mode 100644 public/configurations/queries/app-specific-vertical-bar.json delete mode 100644 public/configurations/queries/connectivity-score-part1-download.json delete mode 100644 public/configurations/queries/connectivity-score-part1-upload.json delete mode 100644 public/configurations/queries/connectivity-score-part2-download.json delete mode 100644 public/configurations/queries/connectivity-score-part2-upload.json delete mode 100644 public/configurations/queries/effective-score-part1.json delete mode 100644 public/configurations/queries/effective-score-part2.json delete mode 100644 public/configurations/queries/newly-discovered-applications.json delete mode 100644 public/configurations/queries/number-of-apm-groups.json delete mode 100644 public/configurations/queries/number-of-applications.json delete mode 100644 public/configurations/queries/number-of-npms.json delete mode 100644 public/configurations/queries/number-of-performance-monitors.json delete mode 100644 public/configurations/queries/probe-paths.json delete mode 100644 public/configurations/queries/top-bottom-5-paths-horizontal-bar-charts.json delete mode 100644 public/configurations/queries/top20-talkers-domain-table.json delete mode 100644 public/configurations/queries/top20-talkers-enterprise-defaultapp-table.json delete mode 100644 public/configurations/queries/top20-talkers-enterprise-table.json delete mode 100644 public/configurations/queries/top5-APMG-APP-pie-chart.json delete mode 100644 public/configurations/queries/top5-app-vertical-bar-domain.json delete mode 100644 public/configurations/queries/top5-app-vertical-bar.json delete mode 100644 public/configurations/queries/top5-download-users-table.json delete mode 100644 public/configurations/queries/top5-upload-users-table.json delete mode 100644 public/configurations/queries/top5-users-table.json delete mode 100644 public/configurations/queries/vertical-bar-with-sla.json delete mode 100644 public/configurations/queries/vnf-status-linechart.json delete mode 100644 public/configurations/queries/vnf-status.json delete mode 100644 public/configurations/queries/vsd-from-nsgs-list.json delete mode 100644 public/configurations/queries/vsd-to-nsgs-list.json delete mode 100644 public/configurations/queries/vss-domain-acl-dpg.json delete mode 100644 public/configurations/queries/vss-domain-acl-spg.json delete mode 100644 public/configurations/queries/vss-domain-acl-time.json delete mode 100644 public/configurations/queries/vss-domain-acl-top5.json delete mode 100644 public/configurations/queries/vss-domain-events-by-pg.json delete mode 100644 public/configurations/queries/vss-domain-events-by-type.json delete mode 100644 public/configurations/queries/vss-domain-events-detail.json delete mode 100644 public/configurations/queries/vss-domain-flow-table.json delete mode 100644 public/configurations/queries/vss-domain-flow.json delete mode 100644 public/configurations/queries/vss-domain-traffic-icmp.json delete mode 100644 public/configurations/queries/vss-domain-traffic-tcp-conn.json delete mode 100644 public/configurations/queries/vss-domain-traffic-tcp-multiline.json delete mode 100644 public/configurations/queries/vss-domain-traffic-tcp-syn.json delete mode 100644 public/configurations/queries/vss-domain-traffic-tcp-synflood.json delete mode 100644 public/configurations/queries/vss-domain-traffic-top-dpg.json delete mode 100644 public/configurations/queries/vss-domain-traffic-top-spg.json delete mode 100644 public/configurations/queries/vss-domain-traffic-udp.json delete mode 100644 public/configurations/queries/vss-ent-acldeny-time.json delete mode 100644 public/configurations/queries/vss-enterprise-acldeny-metric.json delete mode 100644 public/configurations/queries/vss-enterprise-alerts-metric.json delete mode 100644 public/configurations/queries/vss-enterprise-events-metric.json delete mode 100644 public/configurations/queries/vss-enterprise-flows-metric.json delete mode 100644 public/configurations/queries/vss-enterprise-pg-metric.json delete mode 100644 public/configurations/queries/vss-top-domains-blocked-traffic.json delete mode 100644 public/configurations/queries/vss-top-sec-events.json delete mode 100644 public/configurations/visualizations/aar-domain-probe-path.json delete mode 100644 public/configurations/visualizations/aar-domain-probe-table-dest-to-src.json delete mode 100644 public/configurations/visualizations/aar-domain-probe-table.json delete mode 100644 public/configurations/visualizations/aar-domain-top5-apmg.json delete mode 100644 public/configurations/visualizations/aar-flow-sla-heatmap.json delete mode 100644 public/configurations/visualizations/aar-nsg-app-from-nsg.json delete mode 100644 public/configurations/visualizations/aar-nsg-app-linechart.json delete mode 100644 public/configurations/visualizations/aar-nsg-app-to-nsg.json delete mode 100644 public/configurations/visualizations/aar-nsg-gauge-chart.json delete mode 100644 public/configurations/visualizations/aar-nsg-line-chart.json delete mode 100644 public/configurations/visualizations/aar-nsg-sla-from-nsg.json delete mode 100644 public/configurations/visualizations/aar-nsg-sla-to-nsg.json delete mode 100644 public/configurations/visualizations/aar-nsg-top10-app.json delete mode 100644 public/configurations/visualizations/aar-nsg-top5-talkers-download.json delete mode 100644 public/configurations/visualizations/aar-nsg-top5-talkers-upload.json delete mode 100644 public/configurations/visualizations/aar-slastatus-enterprise.json delete mode 100644 public/configurations/visualizations/app-specific-date-histogram.json delete mode 100644 public/configurations/visualizations/app-specific-line-chart.json delete mode 100644 public/configurations/visualizations/effective-score.json delete mode 100644 public/configurations/visualizations/newly-discovered-applications-with-circle.json delete mode 100644 public/configurations/visualizations/newly-discovered-applications.json delete mode 100644 public/configurations/visualizations/number-of-apm-groups.json delete mode 100644 public/configurations/visualizations/number-of-applications.json delete mode 100644 public/configurations/visualizations/number-of-npms.json delete mode 100644 public/configurations/visualizations/number-of-performance-monitors.json delete mode 100644 public/configurations/visualizations/top20-talkers-domain.json delete mode 100644 public/configurations/visualizations/top20-talkers-enterprise-defaultapp.json delete mode 100644 public/configurations/visualizations/top20-talkers-enterprise.json delete mode 100644 public/configurations/visualizations/top5-app-donut.json delete mode 100644 public/configurations/visualizations/top5-app-horizontal-bar.json delete mode 100644 public/configurations/visualizations/top5-app-pie.json delete mode 100644 public/configurations/visualizations/top5-app-table.json delete mode 100644 public/configurations/visualizations/top5-app-vertical-bar-domain.json delete mode 100644 public/configurations/visualizations/top5-app-vertical-bar.json delete mode 100644 public/configurations/visualizations/top5-download-users-table.json delete mode 100644 public/configurations/visualizations/top5-upload-users-table.json delete mode 100644 public/configurations/visualizations/top5-users-table.json delete mode 100644 public/configurations/visualizations/vnf-cpu-status.json delete mode 100644 public/configurations/visualizations/vnf-disk-status.json delete mode 100644 public/configurations/visualizations/vnf-memory-status.json delete mode 100644 public/configurations/visualizations/vnf-status-linechart.json delete mode 100644 public/configurations/visualizations/vsd-from-nsgs-table.json delete mode 100644 public/configurations/visualizations/vsd-to-nsgs-table.json delete mode 100644 public/configurations/visualizations/vss-domain-acl-dpg.json delete mode 100644 public/configurations/visualizations/vss-domain-acl-spg.json delete mode 100644 public/configurations/visualizations/vss-domain-acl-time.json delete mode 100644 public/configurations/visualizations/vss-domain-acl-top5.json delete mode 100644 public/configurations/visualizations/vss-domain-events-by-pg.json delete mode 100644 public/configurations/visualizations/vss-domain-events-by-type.json delete mode 100644 public/configurations/visualizations/vss-domain-events-detail.json delete mode 100644 public/configurations/visualizations/vss-domain-flow-fixed-weight.json delete mode 100644 public/configurations/visualizations/vss-domain-flow-table.json delete mode 100644 public/configurations/visualizations/vss-domain-flow.json delete mode 100644 public/configurations/visualizations/vss-domain-traffic-icmp.json delete mode 100644 public/configurations/visualizations/vss-domain-traffic-tcp-conn.json delete mode 100644 public/configurations/visualizations/vss-domain-traffic-tcp-syn.json delete mode 100644 public/configurations/visualizations/vss-domain-traffic-tcp-synflood.json delete mode 100644 public/configurations/visualizations/vss-domain-traffic-top-dpg.json delete mode 100644 public/configurations/visualizations/vss-domain-traffic-top-spg.json delete mode 100644 public/configurations/visualizations/vss-domain-traffic-udp.json delete mode 100644 public/configurations/visualizations/vss-ent-acldeny-time.json delete mode 100644 public/configurations/visualizations/vss-enterprise-acldeny-metric.json delete mode 100644 public/configurations/visualizations/vss-enterprise-alerts-metric.json delete mode 100644 public/configurations/visualizations/vss-enterprise-events-metric.json delete mode 100644 public/configurations/visualizations/vss-enterprise-flows-metric.json delete mode 100644 public/configurations/visualizations/vss-enterprise-pg-metric.json delete mode 100644 public/configurations/visualizations/vss-top-domains-blocked-traffic.json delete mode 100644 public/configurations/visualizations/vss-top-sec-events.json rename {public => server/app}/configurations/dashboards/medals.json (100%) rename {public => server/app}/configurations/dashboards/medalsPerCountry.json (100%) rename {public => server/app}/configurations/queries/medalsEvolution.json (100%) rename {public => server/app}/configurations/queries/medalsEvolutionPerCountry.json (100%) rename {public => server/app}/configurations/queries/medalsPerCountry.json (100%) rename {public => server/app}/configurations/queries/medalsTable.json (100%) rename {public => server/app}/configurations/queries/top5Countries.json (100%) rename {public => server/app}/configurations/visualizations/medalsEvolution.json (100%) rename {public => server/app}/configurations/visualizations/medalsEvolutionPerCountry.json (100%) rename {public => server/app}/configurations/visualizations/medalsPerCountry.json (100%) rename {public => server/app}/configurations/visualizations/medalsRepartition.json (100%) rename {public => server/app}/configurations/visualizations/medalsTable.json (100%) rename {public => server/app}/configurations/visualizations/top5Countries.json (100%) delete mode 100644 src/configs/nuage/elasticsearch/elasticsearch.spec.js delete mode 100644 src/configs/nuage/elasticsearch/redux/actions.js delete mode 100644 src/configs/nuage/elasticsearch/redux/reducer.js delete mode 100644 src/configs/nuage/elasticsearch/tabify.js delete mode 100644 src/configs/nuage/elasticsearch/tabify.spec.js delete mode 100644 src/configs/nuage/vsd/redux/actions.js delete mode 100644 src/configs/nuage/vsd/redux/reducer.js delete mode 100644 src/configs/nuage/vsd/vsd.spec.js diff --git a/public/configurations/dashboards/aarDomain.json b/public/configurations/dashboards/aarDomain.json deleted file mode 100644 index 0edb7461..00000000 --- a/public/configurations/dashboards/aarDomain.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "id": "aarDomain", - "author": "Ronak Shah", - "creationDate": "10/14/2016", - "title": "AAR Domain ({{domainName}})", - "links": [ - { - "label": "Applications", - "url": "/dashboards/aarDomain" - }, - { - "label": "Network Performance", - "url": "/dashboards/aarNetworkPerformance" - } - ], - "visualizations": [ - { "id": "top20-talkers-domain", "x": 0, "y": 0, "w": 12, "h": 15, "minW": 2, "minH": 12, "static": true}, - { "id": "top5-app-vertical-bar-domain", "x": 0, "y": 15, "w": 6, "h": 15, "minW": 2, "minH": 12, "static": true}, - { "id": "aar-domain-top5-apmg", "x": 6, "y": 15, "w": 6, "h": 15, "minW": 2, "minH": 12, "static": true} - ] -} diff --git a/public/configurations/dashboards/aarEnterprise.json b/public/configurations/dashboards/aarEnterprise.json deleted file mode 100644 index c753ccd1..00000000 --- a/public/configurations/dashboards/aarEnterprise.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "id": "aarEnterprise", - "author": "Christophe Serafin and Curran Kelleher", - "creationDate": "09/29/2016", - "title": "AAR Enterprise ({{enterpriseName}}) Dashboard", - "visualizations": [ - { "id": "newly-discovered-applications", "x": 0, "y": 0, "w": 3, "h": 14, "minW": 3, "minH": 15, "static": true}, - { "id": "top5-app-vertical-bar", "x": 3, "y": 0, "w": 5, "h": 14, "minW": 4, "minH": 10, "static": true}, - { "id": "number-of-apm-groups", "x": 8, "y": 0, "w": 2, "h": 7, "minW": 2, "minH": 7, "static": true}, - { "id": "number-of-applications", "x": 10, "y": 0, "w": 2, "h": 7, "minW": 2, "minH": 7, "static": true}, - { "id": "number-of-performance-monitors", "x": 8, "y": 7, "w": 2, "h": 7, "minW": 2, "minH": 7, "static": true}, - { "id": "number-of-npms", "x": 10, "y": 7, "w": 2, "h": 7, "minW": 2, "minH": 7, "static": true}, - { "id": "aar-slastatus-enterprise", "x": 0, "y": 14, "w": 3, "h": 14, "minW": 3, "minH": 14, "static": true}, - { "id": "top5-upload-users-table", "x": 3, "y": 14, "w": 9, "h": 14, "minW": 4, "minH": 14, "static": true}, - { "id": "top5-download-users-table", "x": 3, "y": 28, "w": 9, "h": 14, "minW": 4, "minH": 14, "static": true} - ], - "links": [ - { - "label": "Dashboard View", - "url": "/dashboards/aarEnterprise" - }, - { - "label": "Detail View", - "url": "/dashboards/aarEnterpriseDetail" - } - ] -} diff --git a/public/configurations/dashboards/aarEnterpriseDetail.json b/public/configurations/dashboards/aarEnterpriseDetail.json deleted file mode 100644 index fca82c2e..00000000 --- a/public/configurations/dashboards/aarEnterpriseDetail.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "id": "aarEnterpriseDetail", - "author": "Ronak Shah", - "creationDate": "09/29/2016", - "title": "AAR Enterprise({{enterpriseName}}) - L7Classification Detail", - "visualizations": [ - { "id": "top20-talkers-enterprise", "x": 0, "y": 0, "w": 12, "h": 15, "minW": 8, "minH": 12, "static": true}, - { "id": "top20-talkers-enterprise-defaultapp", "x": 0, "y": 15, "w": 12, "h": 15, "minW": 2, "minH": 12, "static": true}, - { "id": "app-specific-date-histogram", "x": 0, "y": 30, "w": 12, "h": 15, "minW": 8, "minH": 12, "static": true} - ], - "links": [ - { - "label": "Dashboard View", - "url": "/dashboards/aarEnterprise" - }, - { - "label": "Detail View", - "url": "/dashboards/aarEnterpriseDetail" - } - ] -} diff --git a/public/configurations/dashboards/aarNSG.json b/public/configurations/dashboards/aarNSG.json deleted file mode 100644 index f62f8300..00000000 --- a/public/configurations/dashboards/aarNSG.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "id": "aarNSG", - "author": "Ronak Shah", - "creationDate": "10/26/2016", - "title": "AAR NSG ({{snsg}})", - "visualizations": [ - { "id": "aar-nsg-top10-app", "x": 0, "y": 0, "w": 6, "h": 15, "minW": 5, "minH": 10, "static": true}, - { "id": "aar-nsg-top5-talkers-upload", "x": 0, "y": 15, "w": 6, "h": 12, "minW": 5, "minH": 10, "static": true}, - { "id": "aar-nsg-top5-talkers-download", "x": 6, "y": 15, "w": 6, "h": 12, "minW": 5, "minH": 10, "static": true}, - { "id": "aar-nsg-app-linechart", "x": 6, "y": 0, "w": 6, "h": 15, "minW": 5, "minH": 10, "static": true} - ], - "links": [ - { - "label": "Dashboard View", - "url": "/dashboards/aarNSG" - }, - { - "label": "Detail View", - "url": "/dashboards/aarNSGDetail" - } - ], - "filterOptions": { - "Metric": { - "parameter": "metric", - "default": "TotalBytesCount", - "options": [ - { - "label": "TotalBytes", - "value": "TotalBytesCount", - "default": true - }, - { - "label": "TotalPackets", - "value": "TotalPacketsCount" - } - ] - } - } -} diff --git a/public/configurations/dashboards/aarNSGDetail.json b/public/configurations/dashboards/aarNSGDetail.json deleted file mode 100644 index b563a30a..00000000 --- a/public/configurations/dashboards/aarNSGDetail.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "id": "aarNSGDetail", - "author": "Ronak Shah", - "creationDate": "10/26/2016", - "title": "AAR NSG ({{snsg}})", - "visualizations": [ - { "id": "aar-nsg-app-from-nsg", "x": 0, "y": 0, "w": 6, "h": 15, "minW": 5, "minH": 12, "static": true}, - { "id": "aar-nsg-app-to-nsg", "x": 6, "y": 0, "w": 6, "h": 15, "minW": 5, "minH": 12, "static": true}, - { "id": "aar-nsg-sla-from-nsg", "x": 0, "y": 15, "w": 6, "h": 15, "minW": 5, "minH": 12, "static": true}, - { "id": "aar-nsg-sla-to-nsg", "x": 6, "y": 15, "w": 6, "h": 15, "minW": 5, "minH": 12, "static": true} - ], - "links": [ - { - "label": "Dashboard View", - "url": "/dashboards/aarNSG" - }, - { - "label": "Detail View", - "url": "/dashboards/aarNSGDetail" - } - ] -} diff --git a/public/configurations/dashboards/aarNetworkPerformance.json b/public/configurations/dashboards/aarNetworkPerformance.json deleted file mode 100644 index 772d4e0c..00000000 --- a/public/configurations/dashboards/aarNetworkPerformance.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "id": "aarNetworkPerformance", - "author": "Christophe SERAFIN", - "creationDate": "01/24/2016", - "title": "AAR Network Performance", - "links": [ - { - "label": "Applications", - "url": "/dashboards/aarDomain" - }, - { - "label": "Network Performance", - "url": "/dashboards/aarNetworkPerformance" - } - ], - "visualizations": [ - { "id": "vsd-from-nsgs-table", "x": 0, "y": 0, "w": 6, "h": 12, "minW": 2, "minH": 12, "static": true}, - { "id": "vsd-to-nsgs-table", "x": 6, "y": 0, "w": 6, "h": 12, "minW": 2, "minH": 12, "static": true}, - { "id": "aar-domain-probe-table", "x": 0, "y": 15, "w": 6, "h": 15, "minW": 2, "minH": 12, "static": true}, - { "id": "aar-domain-probe-table-dest-to-src", "x": 6, "y": 15, "w": 6, "h": 15, "minW": 2, "minH": 12, "static": true} - ] -} diff --git a/public/configurations/dashboards/appsOverview.json b/public/configurations/dashboards/appsOverview.json deleted file mode 100644 index bdab046a..00000000 --- a/public/configurations/dashboards/appsOverview.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "id": "appsOverfiew", - "author": "Christophe Serafin and Curran Kelleher", - "creationDate": "09/29/2016", - "title": "Apps Overview Dashboard", - "visualizations": [ - { "id": "top5-app-vertical-bar", "x": 6, "y": 0, "w": 6, "h": 22, "minW": 2, "minH": 12 } - ] -} diff --git a/public/configurations/dashboards/dashboard2.json b/public/configurations/dashboards/dashboard2.json deleted file mode 100644 index db451825..00000000 --- a/public/configurations/dashboards/dashboard2.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "id": "dashboard1", - "author": "Christophe SERAFIN", - "creationDate": "09/15/2016", - "title": "Dashboard 1 - The first and unique.", - "visualizations": [ - { "id": "newly-discovered-applications", "x": 6, "y": 0, "w": 6, "h": 22, "minW": 6, "minH": 22 }, - { "id": "newly-discovered-applications-with-circle", "x": 0, "y": 0, "w": 6, "h": 22, "minW": 6, "minH": 22 } - ] -} diff --git a/public/configurations/dashboards/dateHistogramExample.json b/public/configurations/dashboards/dateHistogramExample.json deleted file mode 100644 index 2afc2384..00000000 --- a/public/configurations/dashboards/dateHistogramExample.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "id": "dateHistogramExample", - "author": "Curran Kelleher", - "creationDate": "10/14/2016", - "title": "Date Histogram Example", - "visualizations": [ - { - "id": "app-specific-date-histogram", - "x": 0, - "y": 0, - "w": 12, - "h": 30, - "minW": 2, - "minH": 12 - } - ] -} diff --git a/public/configurations/dashboards/example.json b/public/configurations/dashboards/example.json deleted file mode 100644 index c5464a50..00000000 --- a/public/configurations/dashboards/example.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "id": "kitchenSink", - "author": "Christophe SERAFIN", - "creationDate": "01/24/2016", - "title": "Example", - "visualizations": [ - { "id": "vsd-from-nsgs-table", "x": 0, "y": 0, "w": 6, "h": 12, "minW": 2, "minH": 12, "static": true}, - { "id": "vsd-to-nsgs-table", "x": 6, "y": 0, "w": 6, "h": 12, "minW": 2, "minH": 12, "static": true} - ] -} diff --git a/public/configurations/dashboards/kitchenSink.json b/public/configurations/dashboards/kitchenSink.json deleted file mode 100644 index ad55aee1..00000000 --- a/public/configurations/dashboards/kitchenSink.json +++ /dev/null @@ -1,117 +0,0 @@ -{ - "id": "kitchenSink", - "author": "Curran Kelleher", - "creationDate": "10/13/2016", - "title": "Kitchen Sink", - "visualizations": [ - { - "id": "top5-app-vertical-bar", - "x": 0, - "y": 0, - "w": 3, - "h": 15, - "minW": 2, - "minH": 12 - }, - { - "id": "top5-app-horizontal-bar", - "x": 3, - "y": 0, - "w": 3, - "h": 15, - "minW": 2, - "minH": 12 - }, - { - "id": "top5-app-table", - "x": 6, - "y": 0, - "w": 6, - "h": 15, - "minW": 2, - "minH": 12 - }, - { - "id": "top5-app-pie", - "x": 0, - "y": 15, - "w": 3, - "h": 15, - "minW": 2, - "minH": 12 - }, - { - "id": "top5-app-donut", - "x": 3, - "y": 15, - "w": 3, - "h": 15, - "minW": 2, - "minH": 12 - }, - { - "id": "vss-domain-flow", - "x": 6, - "y": 15, - "w": 3, - "h": 15, - "minW": 2, - "minH": 12 - }, - { - "id": "vss-domain-flow-fixed-weight", - "x": 9, - "y": 15, - "w": 3, - "h": 15, - "minW": 2, - "minH": 12 - }, - { - "id": "effective-score", - "x": 0, - "y": 15, - "w": 3, - "h": 15, - "minW": 2, - "minH": 12 - }, - { - "id": "vss-domain-acl-time", - "x": 3, - "y": 15, - "w": 3, - "h": 15, - "minW": 2, - "minH": 12 - }, - { - "id": "aar-nsg-line-chart", - "x": 6, - "y": 15, - "w": 3, - "h": 15, - "minW": 2, - "minH": 12 - }, - { - "id": "aar-nsg-gauge-chart", - "x": 6, - "y": 15, - "w": 3, - "h": 15, - "minW": 2, - "minH": 12 - } - { - "id": "aar-flow-sla-heatmap", - "x": 9, - "y": 15, - "w": 6, - "h": 15, - "minW": 2, - "minH": 12 - } - - ] -} diff --git a/public/configurations/dashboards/lineChartExample.json b/public/configurations/dashboards/lineChartExample.json deleted file mode 100644 index ae21ec39..00000000 --- a/public/configurations/dashboards/lineChartExample.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "id": "lineChartExample", - "author": "Curran Kelleher", - "creationDate": "10/14/2016", - "title": "Line ChartExample", - "visualizations": [ - { - "id": "app-specific-line-chart", - "x": 0, - "y": 0, - "w": 12, - "h": 30, - "minW": 2, - "minH": 12 - } - ] -} diff --git a/public/configurations/dashboards/multi-line-test.json b/public/configurations/dashboards/multi-line-test.json deleted file mode 100644 index b2b9f2f5..00000000 --- a/public/configurations/dashboards/multi-line-test.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "id": "multi-line-test", - "author": "Curran Kelleher", - "creationDate": "11/08/2016", - "title": "Test for Multi-Line Chart", - "visualizations": [ - { - "id": "aar-nsg-line-chart", - "x": 0, - "y": 0, - "w": 12, - "h": 30, - "minW": 2, - "minH": 12 - } - ] -} diff --git a/public/configurations/dashboards/tableExample.json b/public/configurations/dashboards/tableExample.json deleted file mode 100644 index a8f14f81..00000000 --- a/public/configurations/dashboards/tableExample.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "id": "tableExample", - "author": "Curran Kelleher", - "creationDate": "10/10/2016", - "title": "Example Dashboard with Table", - "visualizations": [ - { "id": "top5-app-table", "x": 0, "y": 0, "w": 12, "h": 22, "minW": 2, "minH": 12 } - ] -} diff --git a/public/configurations/dashboards/vnf.json b/public/configurations/dashboards/vnf.json deleted file mode 100644 index 01604a3b..00000000 --- a/public/configurations/dashboards/vnf.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "id": "vnf", - "author": "Ronak Shah", - "creationDate": "04/13/2017", - "title": "VNF", - "visualizations": [ - { - "id": "vnf-cpu-status", - "x": 0, - "y": 0, - "w": 2, - "h": 10, - "minW": 2, - "minH": 6 - }, - { - "id": "vnf-memory-status", - "x": 2, - "y": 0, - "w": 2, - "h": 10, - "minW": 2, - "minH": 6 - }, - { - "id": "vnf-disk-status", - "x": 4, - "y": 0, - "w": 2, - "h": 10, - "minW": 2, - "minH": 6 - }, - { - "id": "vnf-status-linechart", - "x": 0, - "y": 10, - "w": 6, - "h": 10, - "minW": 6, - "minH": 15 - } - ] -} diff --git a/public/configurations/dashboards/vssDomainACL.json b/public/configurations/dashboards/vssDomainACL.json deleted file mode 100644 index 2806eab0..00000000 --- a/public/configurations/dashboards/vssDomainACL.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "id": "vssDomainACL", - "author": "Ronak Shah", - "creationDate": "10/18/2016", - "title": "{{domainName:VSS Domain}} - ACL Analytics", - "visualizations": [ - { "id": "vss-domain-acl-time", "x": 0, "y": 0, "w": 6, "h": 15, "minW": 2, "minH": 12}, - { "id": "vss-domain-acl-spg", "x": 6, "y": 0, "w": 6, "h": 15, "minW": 2, "minH": 12}, - { "id": "vss-domain-acl-dpg", "x": 0, "y": 15, "w": 6, "h": 15, "minW": 2, "minH": 12}, - { "id": "vss-domain-acl-top5", "x": 6, "y": 15, "w": 6, "h": 15, "minW": 2, "minH": 12} - ], - "links": [ - { - "label": "Traffic Analytics", - "url": "/dashboards/vssDomainTraffic" - }, - { - "label": "Flow Analytics", - "url": "/dashboards/vssDomainFlow" - }, - { - "label": "Event Analytics", - "url": "/dashboards/vssDomainEvent" - }, - { - "label": "ACL Analytics", - "url": "/dashboards/vssDomainACL" - } - ], - "filterOptions": { - "ACL Action": { - "parameter": "actionType", - "default": "DENY", - "options": [ - { - "label": "Deny", - "value": "DENY", - "default": true - }, - { - "label": "Allow", - "value": "ALLOW" - } - ] - } - } -} diff --git a/public/configurations/dashboards/vssDomainEvent.json b/public/configurations/dashboards/vssDomainEvent.json deleted file mode 100644 index 0045c9d9..00000000 --- a/public/configurations/dashboards/vssDomainEvent.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "id": "vssDomainEvent", - "author": "Ronak Shah", - "creationDate": "10/18/2016", - "title": "{{domainName:VSS Domain}} - Event Analytics", - "visualizations": [ - { "id": "vss-domain-events-by-type", "x": 0, "y": 0, "w": 6, "h": 15, "minW": 2, "minH": 12}, - { "id": "vss-domain-events-detail", "x": 6, "y": 0, "w": 6, "h": 15, "minW": 2, "minH": 12} - ], - "links": [ - { - "label": "Traffic Analytics", - "url": "/dashboards/vssDomainTraffic" - }, - { - "label": "Flow Analytics", - "url": "/dashboards/vssDomainFlow" - }, - { - "label": "Event Analytics", - "url": "/dashboards/vssDomainEvent" - }, - { - "label": "ACL Analytics", - "url": "/dashboards/vssDomainACL" - } - ] -} diff --git a/public/configurations/dashboards/vssDomainFlow.json b/public/configurations/dashboards/vssDomainFlow.json deleted file mode 100644 index ea614271..00000000 --- a/public/configurations/dashboards/vssDomainFlow.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "id": "vssDomainFlow", - "author": "Ronak Shah", - "creationDate": "11/02/2016", - "title": "{{domainName:VSS Domain}} - Flow Visualization", - "visualizations": [ - { "id": "vss-domain-flow", "x": 1, "y": 0, "w": 5, "h": 25, "minW": 2, "minH": 12}, - { "id": "vss-domain-flow-table", "x": 6, "y": 0, "w": 5, "h": 25, "minW": 2 , "minH": 12} - ], - "links": [ - { - "label": "Traffic Analytics", - "url": "/dashboards/vssDomainTraffic" - }, - { - "label": "Flow Analytics", - "url": "/dashboards/vssDomainFlow" - }, - { - "label": "Event Analytics", - "url": "/dashboards/vssDomainEvent" - }, - { - "label": "ACL Analytics", - "url": "/dashboards/vssDomainACL" - } - ], - "filterOptions": { - "Source Field": { - "parameter": "source_field", - "default": "pg", - "options": [ - { - "label": "Endpoint's Domain", - "value": "endpoint-domain" - }, - { - "label": "Endpoint's Subnet", - "value": "endpoint-subnet" - }, - { - "label": "Endpoint's Zone", - "value": "endpoint-zone" - }, - { - "label": "Subnet", - "value": "subnet" - }, - { - "label": "Zone", - "value": "zone" - }, - { - "label": "PG", - "value": "pg", - "default": true - } - ] - }, - "Destination Field": { - "parameter": "destination_field", - "default": "pg", - "options": [ - { - "label": "Endpoint's Domain", - "value": "endpoint-domain" - }, - { - "label": "Endpoint's Subnet", - "value": "endpoint-subnet" - }, - { - "label": "Endpoint's Zone", - "value": "endpoint-zone" - }, - { - "label": "Subnet", - "value": "subnet" - }, - { - "label": "Zone", - "value": "zone" - }, - { - "label": "PG", - "value": "pg", - "default": true - } - ] - } - } -} diff --git a/public/configurations/dashboards/vssDomainTraffic.json b/public/configurations/dashboards/vssDomainTraffic.json deleted file mode 100644 index acec9e0d..00000000 --- a/public/configurations/dashboards/vssDomainTraffic.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "id": "vssDomainTraffic1", - "author": "Ronak Shah", - "creationDate": "10/18/2016", - "title": "{{domainName:VSS Domain}} - Traffic Analytics", - "visualizations": [ - { "id": "vss-domain-traffic-tcp-conn", "x": 0, "y": 0, "w": 6, "h": 15, "minW": 2, "minH": 12}, - { "id": "vss-domain-traffic-udp", "x": 6, "y": 0, "w": 6, "h": 15, "minW": 2, "minH": 12}, - { "id": "vss-domain-traffic-icmp", "x": 0, "y": 15, "w": 6, "h": 15, "minW": 2, "minH": 12}, - { "id": "vss-domain-traffic-tcp-syn", "x": 6, "y": 15, "w": 6, "h": 15, "minW": 2, "minH": 12}, - { "id": "vss-domain-traffic-top-spg", "x": 0, "y": 35, "w": 6, "h": 15, "minW": 2, "minH": 12}, - { "id": "vss-domain-traffic-top-dpg", "x": 6, "y": 30, "w": 6, "h": 15, "minW": 2, "minH": 12} - ], - "links": [ - { - "label": "Traffic Analytics", - "url": "/dashboards/vssDomainTraffic" - }, - { - "label": "Flow Analytics", - "url": "/dashboards/vssDomainFlow" - }, - { - "label": "Event Analytics", - "url": "/dashboards/vssDomainEvent" - }, - { - "label": "ACL Analytics", - "url": "/dashboards/vssDomainACL" - } - ], - "filterOptions": { - "Action": { - "parameter": "actionType", - "default": "ALLOW", - "options": [ - { - "label": "Deny", - "value": "DENY", - "default": true - }, - { - "label": "Allow", - "value": "ALLOW" - } - ] - } - } -} diff --git a/public/configurations/dashboards/vssEnterprise.json b/public/configurations/dashboards/vssEnterprise.json deleted file mode 100644 index e720cf7d..00000000 --- a/public/configurations/dashboards/vssEnterprise.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "id": "vssEnterprise", - "author": "Ronak Shah", - "creationDate": "10/17/2016", - "title": "VSS Dashboard - Enterprise {{enterpriseName:...}}", - "visualizations": [ - { "id": "vss-enterprise-alerts-metric", "x": 1, "y": 0, "w": 2, "h": 5, "minW": 2, "minH": 5, "static": true}, - { "id": "vss-enterprise-acldeny-metric", "x": 3, "y": 0, "w": 2, "h": 5, "minW": 2, "minH": 5, "static": true}, - { "id": "vss-enterprise-events-metric", "x": 5, "y": 0, "w": 2, "h": 5, "minW": 2, "minH": 5, "static": true}, - { "id": "vss-enterprise-flows-metric", "x": 7, "y": 0, "w": 2, "h": 5, "minW": 2, "minH": 5, "static": true}, - { "id": "vss-enterprise-pg-metric", "x": 9, "y": 0, "w": 2, "h": 5, "minW": 2, "minH": 5, "static": true}, - { "id": "vss-ent-acldeny-time", "x": 0, "y": 2, "w": 6, "h": 15, "minW": 2, "minH": 12 }, - { "id": "vss-top-domains-blocked-traffic", "x": 6, "y": 2, "w": 6, "h": 15, "minW": 2, "minH": 12}, - { "id": "vss-top-sec-events", "x": 0, "y": 17, "w": 6, "h": 15, "minW": 2, "minH": 12} - ] -} diff --git a/public/configurations/queries/aar-default-app-l7.json b/public/configurations/queries/aar-default-app-l7.json deleted file mode 100644 index c8c1a738..00000000 --- a/public/configurations/queries/aar-default-app-l7.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "id":"aar-default-app-l7", - "title":"Distinct L7 count in Default Application", - "service":"elasticsearch", - "query":{ - "index":"{{index:nuage_dpi_flowstats}}", - "type":"{{type:nuage_doc_type}}", - "body":{ - "size":0, - "query":{ - "bool":{ - "must":[ - { - "range":{ - "timestamp":{ - "gte":"{{startTime:now-24h}}", - "lte":"{{endTime:now}}", - "format":"epoch_millis" - } - } - }, - { - "term":{ - "Application":"Default Application" - } - } - ] - } - }, - "aggs": { - "2": { - "filters":{ - "filters":{ - "Enterprise":{ - "query":{ - "term":{ - "EnterpriseName":"{{enterpriseName:test_organization}}" - } - } - } - } - }, - "aggs": { - "l7_count": { - "cardinality": { - "field":"L7Classification" - } - } - } - } - } - } - } -} diff --git a/public/configurations/queries/aar-domain-probe-path.json b/public/configurations/queries/aar-domain-probe-path.json deleted file mode 100644 index 5343d422..00000000 --- a/public/configurations/queries/aar-domain-probe-path.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "id":"aar-domain-probe-path", - "title":"TBD", - "service":"elasticsearch", - "query":{ - "index":"{{index:nuage_dpi_probestats}}", - "type":"{{type:nuage_doc_type}}", - "body":{ - "size":0, - "query":{ - "bool":{ - "must":[ - { - "range":{ - "timestamp":{ - "gte":"{{startTime:now-24h}}", - "lte":"{{endTime:now}}", - "format":"epoch_millis" - } - } - } - ] - } - }, - "aggs":{ - "snsg":{ - "terms":{ - "field":"SourceNSG", - "size":5, - "order":{ - "_count":"desc" - } - }, - "aggs":{ - "suplink":{ - "terms":{ - "field":"SrcUplink", - "size":5, - "order":{ - "_count":"desc" - } - }, - "aggs":{ - "dnsg":{ - "terms":{ - "field":"DestinationNSG", - "size":5, - "order":{ - "_count":"desc" - } - }, - "aggs":{ - "duplink":{ - "terms":{ - "field":"DstUplink", - "size":5, - "order":{ - "_count":"desc" - } - } - } - } - } - } - } - } - } - } - } - } -} diff --git a/public/configurations/queries/aar-domain-probe-table-dest-to-src.json b/public/configurations/queries/aar-domain-probe-table-dest-to-src.json deleted file mode 100644 index 22d32299..00000000 --- a/public/configurations/queries/aar-domain-probe-table-dest-to-src.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "id":"aar-domain-probe-table", - "title":"aar domain probe table", - "service":"elasticsearch", - "query":{ - "index":"{{index:nuage_dpi_probestats}}", - "type":"{{type:nuage_doc_type}}", - "body":{ - "sort": [ - { "timestamp": { "order": "desc" } } - ], - "query": { - "bool": { - "should": [ - { - "bool": { - "must": [ - { - "term": - {"SourceNSG": "{{dnsg}}"} - }, - { - "term": {"DestinationNSG": "{{snsg}}"} - }, - { "range": { - "timestamp": { - "gte": "{{startTime:now-24h}}", - "lte": "{{endTime:now}}", - "format":"epoch_millis" - } - } - } - ] - } - } - ] - } - } - } - } -} diff --git a/public/configurations/queries/aar-domain-probe-table.json b/public/configurations/queries/aar-domain-probe-table.json deleted file mode 100644 index 35ab4909..00000000 --- a/public/configurations/queries/aar-domain-probe-table.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "id":"aar-domain-probe-table", - "title":"aar domain probe table", - "service":"elasticsearch", - "query":{ - "index":"{{index:nuage_dpi_probestats}}", - "type":"{{type:nuage_doc_type}}", - "body":{ - "sort": [ - { "timestamp": { "order": "desc" } } - ], - "query": { - "bool": { - "should": [ - { - "bool": { - "must": [ - { - "term": - {"SourceNSG": "{{snsg}}" } - }, - { "term": - {"DestinationNSG": "{{dnsg}}"} - }, - { "range": { - "timestamp": { - "gte": "{{startTime:now-24h}}", - "lte": "{{endTime:now}}", - "format":"epoch_millis" - } - } - } - ] - } - } - ] - } - } - } - } -} diff --git a/public/configurations/queries/aar-domain-top5-apmg.json b/public/configurations/queries/aar-domain-top5-apmg.json deleted file mode 100644 index ca38ff83..00000000 --- a/public/configurations/queries/aar-domain-top5-apmg.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "id":"aar-domain-top5-apmg", - "title":"TBD", - "service":"elasticsearch", - "query":{ - "index":"{{index:nuage_dpi_flowstats}}", - "type":"{{type:nuage_doc_type}}", - "body":{ - "size":0, - "query":{ - "bool":{ - "must":[ - { - "range":{ - "timestamp":{ - "gte":"{{startTime:now-24h}}", - "lte":"{{endTimeTime:now}}", - "format":"epoch_millis" - } - } - } - ] - } - }, - "aggs":{ - "3":{ - "filters":{ - "filters":{ - "Enterprise":{ - "query":{ - "term":{ - "EnterpriseName":"{{enterpriseName:test_org}}" - } - } - } - } - }, - "aggs":{ - "4":{ - "filters":{ - "filters":{ - "Domain":{ - "query":{ - "term":{ - "Domain":"{{domainName:Domain1}}" - } - } - } - } - }, - "aggs":{ - "Sum of MB":{ - "sum":{ - "field":"TotalMB" - } - }, - "APMGroup":{ - "terms":{ - "field":"APMGroup", - "size":5, - "order":{ - "Sum of MB":"desc" - } - }, - "aggs":{ - "Sum of MB":{ - "sum":{ - "field":"TotalMB" - } - } - } - } - } - } - } - } - } - } - } -} diff --git a/public/configurations/queries/aar-flow-sla-heatmap.json b/public/configurations/queries/aar-flow-sla-heatmap.json deleted file mode 100644 index 9aab75f6..00000000 --- a/public/configurations/queries/aar-flow-sla-heatmap.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "id": "aar-flow-sla-heatmap", - "title": "Flows Sla HeatMap", - "service": "elasticsearch", - "query": { - "index": "{{index:nuage_dpi_flowstats}}", - "type": "{{type:nuage_doc_type}}", - "body": { - "size": 0, - "sort": [ - { - "timestamp": { - "order": "desc" - } - } - ], - "query": { - "bool": { - "must": [ - { - "range": { - "timestamp": { - "gte":"{{startTime:now-24h}}", - "lte":"{{endTimeTime:now}}", - "format": "epoch_millis" - } - } - } - ], - "filter": { - "term": { - "SourceNSG": "{{snsg:ovs-1}}" - } - } - } - }, - "aggs": { - "date_histo": { - "date_histogram": { - "field": "timestamp", - "interval": "{{interval:1h}}" - }, - "aggs": { - "application": { - "terms": { - "field": "Application" - }, - "aggs": { - "slastatus": { - "terms": { - "size": 1, - "field": "SlaStatus" - } - } - } - } - } - } - } - } - } -} diff --git a/public/configurations/queries/aar-nsg-app-from-nsg.json b/public/configurations/queries/aar-nsg-app-from-nsg.json deleted file mode 100644 index d0cf5e84..00000000 --- a/public/configurations/queries/aar-nsg-app-from-nsg.json +++ /dev/null @@ -1,216 +0,0 @@ -{ - "id":"aar-nsg-app-from-nsg", - "title":"TBD", - "service":"elasticsearch", - "query":{ - "index":"{{index:nuage_dpi_flowstats}}", - "type":"{{type:nuage_doc_type}}", - "body":{ - "size":0, - "query":{ - "bool":{ - "must":[ - { - "range":{ - "timestamp":{ - "gte":"{{startTime:now-24h}}", - "lte":"{{endTimeTime:now}}", - "format":"epoch_millis" - } - } - } - ] - } - }, - "aggs":{ - "12":{ - "filters":{ - "filters":{ - "Enterprise":{ - "query":{ - "term":{ - "EnterpriseName":"{{enterpriseName:test_organization}}" - } - } - } - } - }, - "aggs": { - "11": { - "filters": { - "filters": { - "SourceNSG": { - "query": { - "term": { - "SourceNSG": "{{snsg:default}}" - } - } - } - } - }, - "aggs": { - "SumofBytes": { - "sum": { - "field": "TotalBytesCount" - } - }, - "SumofPackets": { - "sum": { - "field": "TotalPacketsCount" - } - }, - "APMGroup": { - "terms": { - "field": "APMGroup", - "size": 5, - "order": { - "SumofBytes": "desc" - } - }, - "aggs": { - "SumofBytes": { - "sum": { - "field": "TotalBytesCount" - } - }, - "SumofPackets": { - "sum": { - "field": "TotalPacketsCount" - } - }, - "Application": { - "terms": { - "field": "Application", - "size": 5, - "order": { - "SumofBytes": "desc" - } - }, - "aggs": { - "SumofBytes": { - "sum": { - "field": "TotalBytesCount" - } - }, - "SumofPackets": { - "sum": { - "field": "TotalPacketsCount" - } - }, - "L7Classification": { - "terms": { - "field": "L7ClassEnhanced", - "size": 5, - "order": { - "SumofBytes": "desc" - } - }, - "aggs": { - "SumofBytes": { - "sum": { - "field": "TotalBytesCount" - } - }, - "SumofPackets": { - "sum": { - "field": "TotalPacketsCount" - } - }, - "SrcVportName": { - "terms": { - "field": "SrcVportName", - "size": 5, - "order": { - "SumofBytes": "desc" - } - }, - "aggs": { - "SumofBytes": { - "sum": { - "field": "TotalBytesCount" - } - }, - "SumofPackets": { - "sum": { - "field": "TotalPacketsCount" - } - }, - "SrcUplink": { - "terms": { - "field": "SrcUplink", - "size": 5, - "order": { - "SumofBytes": "desc" - } - }, - "aggs": { - "SumofBytes": { - "sum": { - "field": "TotalBytesCount" - } - }, - "SumofPackets": { - "sum": { - "field": "TotalPacketsCount" - } - }, - "SrcUplinkRole": { - "terms": { - "field": "SrcUplinkRole", - "size": 5, - "order": { - "SumofBytes": "desc" - } - }, - "aggs": { - "SumofBytes": { - "sum": { - "field": "TotalBytesCount" - } - }, - "SumofPackets": { - "sum": { - "field": "TotalPacketsCount" - } - }, - "DestinationNSG": { - "terms": { - "field": "DestinationNSG", - "size": 5, - "order": { - "SumofBytes": "desc" - } - }, - "aggs": { - "SumofBytes": { - "sum": { - "field": "TotalBytesCount" - } - }, - "SumofPackets": { - "sum": { - "field": "TotalPacketsCount" - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } -} diff --git a/public/configurations/queries/aar-nsg-app-linechart.json b/public/configurations/queries/aar-nsg-app-linechart.json deleted file mode 100644 index c4bf49e2..00000000 --- a/public/configurations/queries/aar-nsg-app-linechart.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "id":"aar-nsg-app-linechart", - "title":"TBD", - "service":"elasticsearch", - "query":{ - "index":"{{index:nuage_dpi_flowstats}}", - "type":"{{type:nuage_doc_type}}", - "body":{ - "size":0, - "query":{ - "bool":{ - "must":[ - { - "range":{ - "timestamp":{ - "gte":"{{startTime:now-24h}}", - "lte":"{{endTime:now}}", - "format":"epoch_millis" - } - } - } - ] - } - }, - "aggs":{ - "5":{ - "filters":{ - "filters":{ - "Enterprise":{ - "query":{ - "term":{ - "EnterpriseName":"{{enterpriseName:test_organization}}" - } - } - } - } - }, - "aggs": { - "4": { - "filters": { - "filters": { - "SourceNSG": { - "query": { - "term": { - "SourceNSG": "{{snsg:default}}" - } - } - } - } - }, - "aggs": { - "ts": { - "date_histogram": { - "field": "timestamp", - "interval": "{{interval:1h}}" - }, - "aggs": { - "L7Classification": { - "terms": { - "field": "L7ClassEnhanced", - "size": 5, - "order": { - "SumOf": "desc" - } - }, - "aggs": { - "SumOf": { - "sum": { - "field": "{{metric:TotalBytesCount}}" - } - } - } - } - } - } - } - } - } - } - } - } - } -} diff --git a/public/configurations/queries/aar-nsg-app-to-nsg.json b/public/configurations/queries/aar-nsg-app-to-nsg.json deleted file mode 100644 index c86f5425..00000000 --- a/public/configurations/queries/aar-nsg-app-to-nsg.json +++ /dev/null @@ -1,216 +0,0 @@ -{ - "id":"aar-nsg-app-to-nsg", - "title":"TBD", - "service":"elasticsearch", - "query":{ - "index":"{{index:nuage_dpi_flowstats}}", - "type":"{{type:nuage_doc_type}}", - "body":{ - "size":0, - "query":{ - "bool":{ - "must":[ - { - "range":{ - "timestamp":{ - "gte":"{{startTime:now-24h}}", - "lte":"{{endTimeTime:now}}", - "format":"epoch_millis" - } - } - } - ] - } - }, - "aggs":{ - "12":{ - "filters":{ - "filters":{ - "Enterprise":{ - "query":{ - "term":{ - "EnterpriseName":"{{enterpriseName:test_organization}}" - } - } - } - } - }, - "aggs": { - "11": { - "filters": { - "filters": { - "DestinationNSG": { - "query": { - "term": { - "DestinationNSG": "{{snsg:default}}" - } - } - } - } - }, - "aggs": { - "SumofBytes": { - "sum": { - "field": "TotalBytesCount" - } - }, - "SumofPackets": { - "sum": { - "field": "TotalPacketsCount" - } - }, - "APMGroup": { - "terms": { - "field": "APMGroup", - "size": 5, - "order": { - "SumofBytes": "desc" - } - }, - "aggs": { - "SumofBytes": { - "sum": { - "field": "TotalBytesCount" - } - }, - "SumofPackets": { - "sum": { - "field": "TotalPacketsCount" - } - }, - "Application": { - "terms": { - "field": "Application", - "size": 5, - "order": { - "SumofBytes": "desc" - } - }, - "aggs": { - "SumofBytes": { - "sum": { - "field": "TotalBytesCount" - } - }, - "SumofPackets": { - "sum": { - "field": "TotalPacketsCount" - } - }, - "L7Classification": { - "terms": { - "field": "L7ClassEnhanced", - "size": 5, - "order": { - "SumofBytes": "desc" - } - }, - "aggs": { - "SumofBytes": { - "sum": { - "field": "TotalBytesCount" - } - }, - "SumofPackets": { - "sum": { - "field": "TotalPacketsCount" - } - }, - "DestVportName": { - "terms": { - "field": "DestVportName", - "size": 5, - "order": { - "SumofBytes": "desc" - } - }, - "aggs": { - "SumofBytes": { - "sum": { - "field": "TotalBytesCount" - } - }, - "SumofPackets": { - "sum": { - "field": "TotalPacketsCount" - } - }, - "DstUplink": { - "terms": { - "field": "DstUplink", - "size": 5, - "order": { - "SumofBytes": "desc" - } - }, - "aggs": { - "SumofBytes": { - "sum": { - "field": "TotalBytesCount" - } - }, - "SumofPackets": { - "sum": { - "field": "TotalPacketsCount" - } - }, - "DstUplinkRole": { - "terms": { - "field": "DstUplinkRole", - "size": 5, - "order": { - "SumofBytes": "desc" - } - }, - "aggs": { - "SumofBytes": { - "sum": { - "field": "TotalBytesCount" - } - }, - "SumofPackets": { - "sum": { - "field": "TotalPacketsCount" - } - }, - "DestinationNSG": { - "terms": { - "field": "DestinationNSG", - "size": 5, - "order": { - "SumofBytes": "desc" - } - }, - "aggs": { - "SumofBytes": { - "sum": { - "field": "TotalBytesCount" - } - }, - "SumofPackets": { - "sum": { - "field": "TotalPacketsCount" - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } -} diff --git a/public/configurations/queries/aar-nsg-sla-from-nsg.json b/public/configurations/queries/aar-nsg-sla-from-nsg.json deleted file mode 100644 index a2fc334c..00000000 --- a/public/configurations/queries/aar-nsg-sla-from-nsg.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "id":"aar-nsg-sla-from-nsg", - "title":"TBD", - "service":"elasticsearch", - "query":{ - "index":"{{index:nuage_dpi_slastats}}", - "type":"{{type:nuage_doc_type}}", - "body":{ - "size":0, - "query":{ - "bool":{ - "must":[ - { - "range":{ - "timestamp":{ - "gte":"{{startTime:now-24h}}", - "lte":"{{endTimeTime:now}}", - "format":"epoch_millis" - } - } - } - ] - } - }, - "aggs": { - "11": { - "filters": { - "filters": { - "SourceNSG": { - "query": { - "term": { - "SourceNSG": "{{snsg:default}}" - } - } - } - } - }, - "aggs": { - "ts": { - "terms": { - "field": "timestamp", - "size": 10, - "order": { - "_count": "desc" - } - }, - "aggs": { - "DestinationNSG": { - "terms": { - "field": "DestinationNSG", - "size": 10, - "order": { - "_count": "desc" - } - }, - "aggs": { - "Application": { - "terms": { - "field": "Application", - "size": 10, - "order": { - "_count": "desc" - } - }, - "aggs": { - "APMGroup": { - "terms": { - "field": "APMGroup", - "size": 10, - "order": { - "_count": "desc" - } - }, - "aggs": { - "ViolationType": { - "terms": { - "field": "ViolationType", - "size": 10, - "order": { - "_count": "desc" - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } -} diff --git a/public/configurations/queries/aar-nsg-sla-to-nsg.json b/public/configurations/queries/aar-nsg-sla-to-nsg.json deleted file mode 100644 index 1eea56cc..00000000 --- a/public/configurations/queries/aar-nsg-sla-to-nsg.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "id":"aar-nsg-sla-to-nsg", - "title":"TBD", - "service":"elasticsearch", - "query":{ - "index":"{{index:nuage_dpi_slastats}}", - "type":"{{type:nuage_doc_type}}", - "body":{ - "size":0, - "query":{ - "bool":{ - "must":[ - { - "range":{ - "timestamp":{ - "gte":"{{startTime:now-24h}}", - "lte":"{{endTimeTime:now}}", - "format":"epoch_millis" - } - } - } - ] - } - }, - "aggs": { - "11": { - "filters": { - "filters": { - "DestinationNSG": { - "query": { - "term": { - "DestinationNSG": "{{snsg:default}}" - } - } - } - } - }, - "aggs": { - "ts": { - "terms": { - "field": "timestamp", - "size": 10, - "order": { - "_count": "desc" - } - }, - "aggs": { - "SourceNSG": { - "terms": { - "field": "SourceNSG", - "size": 10, - "order": { - "_count": "desc" - } - }, - "aggs": { - "Application": { - "terms": { - "field": "Application", - "size": 10, - "order": { - "_count": "desc" - } - }, - "aggs": { - "APMGroup": { - "terms": { - "field": "APMGroup", - "size": 10, - "order": { - "_count": "desc" - } - }, - "aggs": { - "ViolationType": { - "terms": { - "field": "ViolationType", - "size": 10, - "order": { - "_count": "desc" - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } -} diff --git a/public/configurations/queries/aar-nsg-top10-app.json b/public/configurations/queries/aar-nsg-top10-app.json deleted file mode 100644 index 810d5dab..00000000 --- a/public/configurations/queries/aar-nsg-top10-app.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "id":"aar-nsg-top10-app", - "title":"Top 10 App per NSG", - "service":"elasticsearch", - "query":{ - "index":"{{index:nuage_dpi_flowstats}}", - "type":"{{type:nuage_doc_type}}", - "body":{ - "size": 0, - "query":{ - "bool":{ - "must":[ - { - "range":{ - "timestamp":{ - "gte":"{{startTime:now-24h}}", - "lte":"{{endTime:now}}", - "format":"epoch_millis" - } - } - } - ] - } - }, - "aggs":{ - "4":{ - "filters":{ - "filters":{ - "Enterprise":{ - "query":{ - "term":{ - "EnterpriseName":"{{enterpriseName:test_organization}}" - } - } - } - } - }, - "aggs":{ - "3":{ - "filters":{ - "filters":{ - "SourceNSG":{ - "query":{ - "term":{ - "SourceNSG":"{{snsg:ovs-114}}" - } - } - } - } - }, - "aggs":{ - "Application":{ - "terms":{ - "field":"Application", - "size":10, - "order":{ - "Sum of MB":"desc" - } - }, - "aggs":{ - "Sum of MB":{ - "sum":{ - "field":"TotalMB" - } - } - } - } - } - } - } - } - } - } - } -} diff --git a/public/configurations/queries/aar-nsg-top5-talkers-download.json b/public/configurations/queries/aar-nsg-top5-talkers-download.json deleted file mode 100644 index 2467f278..00000000 --- a/public/configurations/queries/aar-nsg-top5-talkers-download.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "id":"aar-nsgtop5-talkers-download", - "title":"Top 5 talkers (download) per NSG", - "service":"elasticsearch", - "query":{ - "index":"{{index:nuage_dpi_flowstats}}", - "type":"{{type:nuage_doc_type}}", - "body":{ - "size":0, - "query":{ - "bool":{ - "must":[ - { - "range":{ - "timestamp":{ - "gte":"{{startTime:now-24h}}", - "lte":"{{endTime:now}}", - "format":"epoch_millis" - } - } - }, - { - "term":{ - "IngressBytes": 0 - } - } - ] - } - }, - "aggs":{ - "5":{ - "filters":{ - "filters":{ - "DestinationNSG":{ - "query":{ - "term":{ - "DestinationNSG":"{{snsg:ovs-114}}" - } - } - } - } - }, - "aggs":{ - "DestinationIP":{ - "terms":{ - "field":"DstIp", - "size":5, - "order":{ - "Bytes":"desc" - } - }, - "aggs":{ - "Packets":{ - "sum":{ - "field":"EgressPackets" - } - }, - "Bytes":{ - "sum":{ - "field":"EgressBytes" - } - }, - "DomainName":{ - "terms":{ - "field":"Domain", - "size":5, - "order":{ - "Bytes":"desc" - } - }, - "aggs":{ - "Packets":{ - "sum":{ - "field":"EgressPackets" - } - }, - "Bytes":{ - "sum":{ - "field":"EgressBytes" - } - } - } - } - } - } - } - } - } - } - } -} diff --git a/public/configurations/queries/aar-nsg-top5-talkers-upload.json b/public/configurations/queries/aar-nsg-top5-talkers-upload.json deleted file mode 100644 index 7fc26f35..00000000 --- a/public/configurations/queries/aar-nsg-top5-talkers-upload.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "id":"aar-nsgtop5-talkers-upload", - "title":"Top 5 talkers (upload) per NSG", - "service":"elasticsearch", - "query":{ - "index":"{{index:nuage_dpi_flowstats}}", - "type":"{{type:nuage_doc_type}}", - "body":{ - "size":0, - "query":{ - "bool":{ - "must":[ - { - "range":{ - "timestamp":{ - "gte":"{{startTime:now-24h}}", - "lte":"{{endTime:now}}", - "format":"epoch_millis" - } - } - }, - { - "term":{ - "EgressBytes":0 - } - } - ] - } - }, - "aggs":{ - "5":{ - "filters":{ - "filters":{ - "SourceNSG":{ - "query":{ - "term":{ - "SourceNSG":"{{snsg:ovs-114}}" - } - } - } - } - }, - "aggs":{ - "SourceIP":{ - "terms":{ - "field":"SrcIp", - "size":5, - "order":{ - "Bytes":"desc" - } - }, - "aggs":{ - "Packets":{ - "sum":{ - "field":"IngressPackets" - } - }, - "Bytes":{ - "sum":{ - "field":"IngressBytes" - } - }, - "DomainName":{ - "terms":{ - "field":"Domain", - "size":5, - "order":{ - "Bytes":"desc" - } - }, - "aggs":{ - "Packets":{ - "sum":{ - "field":"IngressPackets" - } - }, - "Bytes":{ - "sum":{ - "field":"IngressBytes" - } - } - } - } - } - } - } - } - } - } - } -} diff --git a/public/configurations/queries/aar-slastatus-enterprise.json b/public/configurations/queries/aar-slastatus-enterprise.json deleted file mode 100644 index 52090a56..00000000 --- a/public/configurations/queries/aar-slastatus-enterprise.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "id":"slaStatus-PieChart-Enterprise", - "title":"SLA Status per Enterprise", - "service":"elasticsearch", - "query":{ - "index":"{{index:nuage_dpi_flowstats}}", - "type":"{{type:nuage_doc_type}}", - "body":{ - "size":0, - "query":{ - "bool":{ - "must":[ - { - "range":{ - "timestamp":{ - "gte":"{{startTime:now-24h}}", - "lte":"{{endTime:now}}", - "format":"epoch_millis" - } - } - } - ] - } - }, - "aggs":{ - "1":{ - "filters":{ - "filters":{ - "Enterprise":{ - "query":{ - "term":{ - "EnterpriseName":"{{enterpriseName:test_org}}" - } - } - } - } - }, - "aggs":{ - "slastatus":{ - "terms":{ - "field":"SlaStatus" - } - } - } - } - } - } - } -} - diff --git a/public/configurations/queries/app-specific-vertical-bar.json b/public/configurations/queries/app-specific-vertical-bar.json deleted file mode 100644 index 70c1863a..00000000 --- a/public/configurations/queries/app-specific-vertical-bar.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "id":"app-specific-vertical-bar", - "title":"App Specific Vertical Bar", - "service":"elasticsearch", - "query":{ - "index":"{{index:nuage_dpi_flowstats}}", - "type":"{{type:nuage_doc_type}}", - "body":{ - "size":0, - "query":{ - "bool":{ - "must":[ - { - "range":{ - "timestamp":{ - "gte":"{{startTime:now-24h}}", - "lte":"{{endTime:now}}", - "format":"epoch_millis" - } - } - } - ] - } - }, - "aggs":{ - "4":{ - "filters":{ - "filters":{ - "L7Classification":{ - "query":{ - "term":{ - "L7ClassEnhanced":"{{app}}" - } - } - } - } - }, - "aggs":{ - "date-histo":{ - "date_histogram":{ - "field":"timestamp", - "interval":"{{interval:1h}}" - }, - "aggs":{ - "SumOfBytes":{ - "sum":{ - "field":"TotalBytesCount" - } - } - } - } - } - } - } - } - } -} diff --git a/public/configurations/queries/connectivity-score-part1-download.json b/public/configurations/queries/connectivity-score-part1-download.json deleted file mode 100644 index 56238fba..00000000 --- a/public/configurations/queries/connectivity-score-part1-download.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "id":"connectivity-score-part1-download", - "title":"TBD", - "service":"elasticsearch", - "query":{ - "size":0, - "query":{ - "bool":{ - "must":[ - { - "range":{ - "timestamp":{ - "gte":"now-1y", - "lte":"now", - "format":"epoch_millis" - } - } - } - ] - } - }, - "aggs":{ - "5":{ - "filters":{ - "filters":{ - "DestNSG":{ - "query":{ - "term":{ - "DestinationNSG":"ovs-186" - } - } - } - } - }, - "aggs":{ - "Application":{ - "cardinality":{ - "field":"Application" - } - } - } - } - } - } -} diff --git a/public/configurations/queries/connectivity-score-part1-upload.json b/public/configurations/queries/connectivity-score-part1-upload.json deleted file mode 100644 index 577cd266..00000000 --- a/public/configurations/queries/connectivity-score-part1-upload.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "id":"connectivity-score-part1-upload", - "title":"TBD", - "service":"elasticsearch", - "query":{ - "size":0, - "query":{ - "bool":{ - "must":[ - { - "range":{ - "timestamp":{ - "gte":"now-1y", - "lte":"now", - "format":"epoch_millis" - } - } - } - ] - } - }, - "aggs":{ - "5":{ - "filters":{ - "filters":{ - "SourceNSG":{ - "query":{ - "term":{ - "SourceNSG":"ovs-186" - } - } - } - } - }, - "aggs":{ - "Application":{ - "cardinality":{ - "field":"Application" - } - } - } - } - } - } -} diff --git a/public/configurations/queries/connectivity-score-part2-download.json b/public/configurations/queries/connectivity-score-part2-download.json deleted file mode 100644 index 44eb96dd..00000000 --- a/public/configurations/queries/connectivity-score-part2-download.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "id":"connectivity-score-part2-download", - "title":"TBD", - "service":"elasticsearch", - "query":{ - "size":0, - "query":{ - "bool":{ - "must":[ - { - "range":{ - "timestamp":{ - "gte":"now-1y", - "lte":"now", - "format":"epoch_millis" - } - } - }, - { - "term":{ - "SlaStatus":"IN" - } - } - ] - } - }, - "aggs":{ - "5":{ - "filters":{ - "filters":{ - "DestNSG":{ - "query":{ - "term":{ - "DestinationNSG":"ovs-186" - } - } - } - } - }, - "aggs":{ - "Application":{ - "cardinality":{ - "field":"Application" - } - } - } - } - } - } -} diff --git a/public/configurations/queries/connectivity-score-part2-upload.json b/public/configurations/queries/connectivity-score-part2-upload.json deleted file mode 100644 index 977ad70a..00000000 --- a/public/configurations/queries/connectivity-score-part2-upload.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "id":"connectivity-score-part2-upload", - "title":"TBD", - "service":"elasticsearch", - "query":{ - "size":0, - "query":{ - "bool":{ - "must":[ - { - "range":{ - "timestamp":{ - "gte":"now-1y", - "lte":"now", - "format":"epoch_millis" - } - } - }, - { - "term":{ - "SlaStatus":"IN" - } - } - ] - } - }, - "aggs":{ - "5":{ - "filters":{ - "filters":{ - "SourceNSG":{ - "query":{ - "term":{ - "SourceNSG":"ovs-186" - } - } - } - } - }, - "aggs":{ - "Application":{ - "cardinality":{ - "field":"Application" - } - } - } - } - } - } -} diff --git a/public/configurations/queries/effective-score-part1.json b/public/configurations/queries/effective-score-part1.json deleted file mode 100644 index 91d6a82f..00000000 --- a/public/configurations/queries/effective-score-part1.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "id":"effective-score-part1", - "title":"TBD", - "service":"elasticsearch", - "query":{ - "index":"{{index:nuage_dpi_flowstats}}", - "type":"{{type:nuage_doc_type}}", - "size":0, - "query":{ - "bool":{ - "must":[ - { - "range":{ - "timestamp":{ - "gte":"now-1y", - "lte":"now", - "format":"epoch_millis" - } - } - }, - { - "term":{ - "SlaStatus":"IN" - } - }, - { - "term":{ - "SlaTransition":"True" - } - } - ] - } - }, - "aggs":{ - "5":{ - "filters":{ - "filters":{ - "Enterprise":{ - "query":{ - "term":{ - "EnterpriseName":"test_org" - } - } - } - } - }, - "aggs":{ - "Application":{ - "cardinality":{ - "field":"Application" - } - } - } - } - } - } -} diff --git a/public/configurations/queries/effective-score-part2.json b/public/configurations/queries/effective-score-part2.json deleted file mode 100644 index 7fa877d4..00000000 --- a/public/configurations/queries/effective-score-part2.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "id":"effective-score-part2", - "title":"TBD", - "service":"elasticsearch", - "query":{ - "index":"{{index:nuage_dpi_flowstats}}", - "type":"{{type:nuage_doc_type}}", - "size":0, - "query":{ - "bool":{ - "must":[ - { - "range":{ - "timestamp":{ - "gte":"now-1y", - "lte":"now", - "format":"epoch_millis" - } - } - }, - { - "term":{ - "SlaTransition":"True" - } - } - ] - } - }, - "aggs":{ - "5":{ - "filters":{ - "filters":{ - "Enterprise":{ - "query":{ - "term":{ - "EnterpriseName":"test_org" - } - } - } - } - }, - "aggs":{ - "Application":{ - "cardinality":{ - "field":"Application" - } - } - } - } - } - } -} diff --git a/public/configurations/queries/newly-discovered-applications.json b/public/configurations/queries/newly-discovered-applications.json deleted file mode 100644 index f34ab4d0..00000000 --- a/public/configurations/queries/newly-discovered-applications.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "id":"newly-discovered-applications", - "title":"Newly Discovered Applications", - "service":"VSD", - "query":{ - "parentResource":"enterprises", - "parentID":"{{enterpriseID}}", - "resource":"applications" - } -} diff --git a/public/configurations/queries/number-of-apm-groups.json b/public/configurations/queries/number-of-apm-groups.json deleted file mode 100644 index 2b18b22c..00000000 --- a/public/configurations/queries/number-of-apm-groups.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "id":"number-of-apm-groups", - "title":"APM Groups", - "service":"VSD", - "query":{ - "parentResource":"enterprises", - "parentID":"{{enterpriseID}}", - "resource":"applicationperformancemanagements" - } -} diff --git a/public/configurations/queries/number-of-applications.json b/public/configurations/queries/number-of-applications.json deleted file mode 100644 index 442f22fa..00000000 --- a/public/configurations/queries/number-of-applications.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "id":"number-of-applications", - "title":"Applications", - "service":"VSD", - "query":{ - "parentResource":"enterprises", - "parentID":"{{enterpriseID}}", - "resource":"applications" - } -} diff --git a/public/configurations/queries/number-of-npms.json b/public/configurations/queries/number-of-npms.json deleted file mode 100644 index 0c846cf2..00000000 --- a/public/configurations/queries/number-of-npms.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "id":"number-of-npms", - "title":"NPMs", - "service":"VSD", - "query":{ - "parentResource":"enterprises", - "parentID":"{{enterpriseID}}", - "resource":"networkperformancemeasurements" - } -} diff --git a/public/configurations/queries/number-of-performance-monitors.json b/public/configurations/queries/number-of-performance-monitors.json deleted file mode 100644 index 2d207d3e..00000000 --- a/public/configurations/queries/number-of-performance-monitors.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "id":"number-of-performance-monitors", - "title":"Performance Monitors", - "service":"VSD", - "query":{ - "parentResource":"enterprises", - "parentID":"{{enterpriseID}}", - "resource":"performancemonitors" - } -} diff --git a/public/configurations/queries/probe-paths.json b/public/configurations/queries/probe-paths.json deleted file mode 100644 index 25d54eb1..00000000 --- a/public/configurations/queries/probe-paths.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "id":"probe-paths", - "title":"TBD", - "service":"elasticsearch", - "query":{ - "size":0, - "query":{ - "bool":{ - "must":[ - { - "range":{ - "timestamp":{ - "gte":"now-24h", - "lte":"now", - "format":"epoch_millis" - } - } - } - ] - } - }, - "aggs":{ - "2":{ - "terms":{ - "field":"SourceNSG", - "size":5, - "order":{ - "_count":"desc" - } - }, - "aggs":{ - "4":{ - "terms":{ - "field":"SrcUplink", - "size":5, - "order":{ - "_count":"desc" - } - }, - "aggs":{ - "3":{ - "terms":{ - "field":"DestinationNSG", - "size":5, - "order":{ - "_count":"desc" - } - }, - "aggs":{ - "5":{ - "terms":{ - "field":"DstUplink", - "size":5, - "order":{ - "_count":"desc" - } - } - } - } - } - } - } - } - } - } - } -} diff --git a/public/configurations/queries/top-bottom-5-paths-horizontal-bar-charts.json b/public/configurations/queries/top-bottom-5-paths-horizontal-bar-charts.json deleted file mode 100644 index 142b2262..00000000 --- a/public/configurations/queries/top-bottom-5-paths-horizontal-bar-charts.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "id":"top-bottom-5-paths-horizontal-bar-charts", - "title":"TBD", - "service":"elasticsearch", - "query":{ - "query":{ - "bool":{ - "must":[ - { - "range":{ - "timestamp":{ - "gte":"now-24h", - "lte":"now", - "format":"epoch_millis" - } - } - } - ] - } - }, - "aggs":{ - "5":{ - "filters":{ - "filters":{ - "Enterprise":{ - "query":{ - "term":{ - "Enterprise":"test_org" - } - } - } - } - }, - "aggs":{ - "SourceNSG":{ - "terms":{ - "field":"SourceNSG", - "size":5, - "order":{ - "1":"desc" - } - }, - "aggs":{ - "1":{ - "sum":{ - "field":"AvgDelay" - } - }, - "SrcUplink":{ - "terms":{ - "field":"SrcUplink", - "size":5, - "order":{ - "1":"desc" - } - }, - "aggs":{ - "1":{ - "sum":{ - "field":"AvgDelay" - } - }, - "DestinationNSG":{ - "terms":{ - "field":"DestinationNSG", - "size":5, - "order":{ - "1":"desc" - } - }, - "aggs":{ - "1":{ - "sum":{ - "field":"AvgDelay" - } - }, - "DstUplink":{ - "terms":{ - "field":"DstUplink", - "size":5, - "order":{ - "1":"desc" - } - }, - "aggs":{ - "1":{ - "sum":{ - "field":"AvgDelay" - } - } - } - } - } - } - } - } - } - } - } - } - } - } -} diff --git a/public/configurations/queries/top20-talkers-domain-table.json b/public/configurations/queries/top20-talkers-domain-table.json deleted file mode 100644 index 741da118..00000000 --- a/public/configurations/queries/top20-talkers-domain-table.json +++ /dev/null @@ -1,185 +0,0 @@ -{ - "id": "top20-talkers-domain-table", - "title": "Top 20 talkers", - "service": "elasticsearch", - "query": { - "index": "{{index:nuage_dpi_flowstats}}", - "type": "{{type:nuage_doc_type}}", - "body": { - "size": 0, - "query": { - "bool": { - "must": [ - { - "range": { - "timestamp": { - "gte": "{{startTime:now-24h}}", - "lte": "{{endTime:now}}", - "format": "epoch_millis" - } - } - } - ] - } - }, - "aggs": { - "2": { - "filters": { - "filters": { - "Enterprise": { - "query": { - "term": { - "EnterpriseName": "{{enterpriseName:test_org}}" - } - } - } - } - }, - "aggs": { - "3": { - "filters": { - "filters": { - "Domain": { - "query": { - "term": { - "Domain": "{{domainName:Domain1}}" - } - } - } - } - }, - "aggs": { - "Application": { - "terms": { - "field": "Application", - "size": 20, - "order": { - "1": "desc" - } - }, - "aggs": { - "1": { - "sum": { - "field": "TotalBytesCount" - } - }, - "11": { - "sum": { - "field": "TotalPacketsCount" - } - }, - "L7Classification": { - "terms": { - "field": "L7ClassEnhanced", - "size": 20, - "order": { - "1": "desc" - } - }, - "aggs": { - "1": { - "sum": { - "field": "TotalBytesCount" - } - }, - "11": { - "sum": { - "field": "TotalPacketsCount" - } - }, - "SrcVportName": { - "terms": { - "field": "SrcVportName", - "size": 20, - "order": { - "1": "desc" - } - }, - "aggs": { - "1": { - "sum": { - "field": "TotalBytesCount" - } - }, - "11": { - "sum": { - "field": "TotalPacketsCount" - } - }, - "SourceNSG": { - "terms": { - "field": "SourceNSG", - "size": 20, - "order": { - "1": "desc" - } - }, - "aggs": { - "1": { - "sum": { - "field": "TotalBytesCount" - } - }, - "11":{ - "sum": { - "field": "TotalPacketsCount" - } - }, - "DestinationNSG": { - "terms": { - "field": "DestinationNSG", - "size": 20, - "order": { - "1": "desc" - } - }, - "aggs": { - "1": { - "sum": { - "field": "TotalBytesCount" - } - }, - "11": { - "sum": { - "field": "TotalPacketsCount" - } - }, - "DestVportName": { - "terms": { - "field": "DestVportName", - "size": 20, - "order": { - "1": "desc" - } - }, - "aggs": { - "1": { - "sum": { - "field": "TotalBytesCount" - } - }, - "11": { - "sum": { - "field": "TotalPacketsCount" - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } -} diff --git a/public/configurations/queries/top20-talkers-enterprise-defaultapp-table.json b/public/configurations/queries/top20-talkers-enterprise-defaultapp-table.json deleted file mode 100644 index 2662db5a..00000000 --- a/public/configurations/queries/top20-talkers-enterprise-defaultapp-table.json +++ /dev/null @@ -1,123 +0,0 @@ -{ - "id":"top20-talkers-enterprise-defaultapp-table", - "title":"Top 20 Talkers in Enterprise", - "service":"elasticsearch", - "query": { - "index":"{{index:nuage_dpi_flowstats}}", - "type":"{{type:nuage_doc_type}}", - "body": { - "size":0, - "query":{ - "bool":{ - "must":[ - { - "range":{ - "timestamp":{ - "gte":"{{startTime:now-24h}}", - "lte":"{{endTime:now}}", - "format":"epoch_millis" - } - } - } - ] - } - }, - "aggs":{ - "2":{ - "filters":{ - "filters":{ - "EnterpriseName":{ - "query":{ - "term":{ - "EnterpriseName":"{{enterpriseName:test_org}}" - } - } - } - } - }, - "aggs":{ - "5":{ - "filters":{ - "filters":{ - "AppName":{ - "query":{ - "term":{ - "Application":"Default Application" - } - } - } - } - }, - "aggs":{ - "Application":{ - "terms":{ - "field":"Application", - "size":20, - "order":{ - "1":"desc" - } - }, - "aggs":{ - "1":{ - "sum":{ - "field":"TotalBytesCount" - } - }, - "APMGroup":{ - "terms":{ - "field":"APMGroup", - "size":20, - "order":{ - "1":"desc" - } - }, - "aggs":{ - "1":{ - "sum":{ - "field":"TotalBytesCount" - } - }, - "DomainName":{ - "terms":{ - "field":"Domain", - "size":20, - "order":{ - "1":"desc" - } - }, - "aggs":{ - "1":{ - "sum":{ - "field":"TotalBytesCount" - } - }, - "L7Classification":{ - "terms":{ - "field":"L7ClassEnhanced", - "size":20, - "order":{ - "1":"desc" - } - }, - "aggs":{ - "1":{ - "sum":{ - "field":"TotalBytesCount" - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } -} diff --git a/public/configurations/queries/top20-talkers-enterprise-table.json b/public/configurations/queries/top20-talkers-enterprise-table.json deleted file mode 100644 index f14dedc3..00000000 --- a/public/configurations/queries/top20-talkers-enterprise-table.json +++ /dev/null @@ -1,125 +0,0 @@ -{ - "id":"top20-talkers-enterprise-table", - "title":"Top 20 Talkers in Enterprise", - "service":"elasticsearch", - "query": { - "index":"{{index:nuage_dpi_flowstats}}", - "type":"{{type:nuage_doc_type}}", - "body": { - "size":0, - "query":{ - "bool":{ - "must":[ - { - "range":{ - "timestamp":{ - "gte":"{{startTime:now-24h}}", - "lte":"{{endTime:now}}", - "format":"epoch_millis" - } - } - } - ] - } - }, - "aggs":{ - "2":{ - "filters":{ - "filters":{ - "EnterpriseName":{ - "query":{ - "term":{ - "EnterpriseName":"{{enterpriseName:test_org}}" - } - } - } - } - }, - "aggs":{ - "5":{ - "filters":{ - "filters":{ - "AppName":{ - "query":{ - "not":{ - "term":{ - "Application":"Default Application" - } - } - } - } - } - }, - "aggs":{ - "Application":{ - "terms":{ - "field":"Application", - "size":20, - "order":{ - "1":"desc" - } - }, - "aggs":{ - "1":{ - "sum":{ - "field":"TotalBytesCount" - } - }, - "APMGroup":{ - "terms":{ - "field":"APMGroup", - "size":20, - "order":{ - "1":"desc" - } - }, - "aggs":{ - "1":{ - "sum":{ - "field":"TotalBytesCount" - } - }, - "DomainName":{ - "terms":{ - "field":"Domain", - "size":20, - "order":{ - "1":"desc" - } - }, - "aggs":{ - "1":{ - "sum":{ - "field":"TotalBytesCount" - } - }, - "L7Classification":{ - "terms":{ - "field":"L7ClassEnhanced", - "size":20, - "order":{ - "1":"desc" - } - }, - "aggs":{ - "1":{ - "sum":{ - "field":"TotalBytesCount" - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } -} diff --git a/public/configurations/queries/top5-APMG-APP-pie-chart.json b/public/configurations/queries/top5-APMG-APP-pie-chart.json deleted file mode 100644 index 0b0b806f..00000000 --- a/public/configurations/queries/top5-APMG-APP-pie-chart.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "id":"top5-APMG-APP-pie-chart", - "title":"TBD", - "service":"elasticsearch", - "query":{ - "size":0, - "query":{ - "bool":{ - "must":[ - { - "range":{ - "timestamp":{ - "gte":"{{startTime:now-24h}}", - "lte":"{{endTime:now}}", - "format":"epoch_millis" - } - } - } - ] - } - }, - "aggs":{ - "3":{ - "filters":{ - "filters":{ - "Enterprise":{ - "query":{ - "term":{ - "EnterpriseName":"{{enterpriseName:test_org}}" - } - } - } - } - }, - "aggs":{ - "APMGroup":{ - "terms":{ - "field":"APMGroup", - "size":5, - "order":{ - "Sum of MB":"desc" - } - }, - "aggs":{ - "Sum of MB":{ - "sum":{ - "field":"TotalMB" - } - }, - "Application":{ - "terms":{ - "field":"Application", - "size":5, - "order":{ - "Sum of MB":"desc" - } - }, - "aggs":{ - "Sum of MB":{ - "sum":{ - "field":"TotalMB" - } - } - } - } - } - } - } - } - } - } -} diff --git a/public/configurations/queries/top5-app-vertical-bar-domain.json b/public/configurations/queries/top5-app-vertical-bar-domain.json deleted file mode 100644 index 349c7b70..00000000 --- a/public/configurations/queries/top5-app-vertical-bar-domain.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "id":"top5-app-vertical-bar-domain", - "title":"Top 5 Applications", - "service":"elasticsearch", - "query":{ - "index":"{{index:nuage_dpi_flowstats}}", - "type":"{{type:nuage_doc_type}}", - "body":{ - "size":0, - "query":{ - "bool":{ - "must":[ - { - "range":{ - "timestamp":{ - "gte":"{{startTime:now-24h}}", - "lte":"{{endTime:now}}", - "format":"epoch_millis" - } - } - } - ] - } - }, - "aggs":{ - "3":{ - "filters":{ - "filters":{ - "Enterprise":{ - "query":{ - "term":{ - "EnterpriseName":"{{enterpriseName:test_org}}" - } - } - } - } - }, - "aggs":{ - "3":{ - "filters":{ - "filters":{ - "Domain":{ - "query":{ - "term":{ - "Domain":"{{domainName:Domain1}}" - } - } - } - } - }, - "aggs":{ - "Application":{ - "terms":{ - "field":"Application", - "size":5, - "order":{ - "SumofBytes":"desc" - } - }, - "aggs":{ - "SumofBytes":{ - "sum":{ - "field":"TotalBytesCount" - } - } - } - } - } - } - } - } - } - } - } -} diff --git a/public/configurations/queries/top5-app-vertical-bar.json b/public/configurations/queries/top5-app-vertical-bar.json deleted file mode 100644 index d0f627e5..00000000 --- a/public/configurations/queries/top5-app-vertical-bar.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "id":"top5-app-vertical-bar", - "title":"Top 5 Applications", - "service":"elasticsearch", - "query":{ - "index":"{{index:nuage_dpi_flowstats}}", - "type":"{{type:nuage_doc_type}}", - "body":{ - "size":0, - "query":{ - "bool":{ - "must":[ - { - "range":{ - "timestamp":{ - "gte":"{{startTime:now-24h}}", - "lte":"{{endTime:now}}", - "format":"epoch_millis" - } - } - } - ] - } - }, - "aggs":{ - "3":{ - "filters":{ - "filters":{ - "Enterprise":{ - "query":{ - "term":{ - "EnterpriseName":"{{enterpriseName:test_org}}" - } - } - } - } - }, - "aggs":{ - "L7Classification":{ - "terms":{ - "field":"L7ClassEnhanced", - "size":5, - "order":{ - "Sum of MB":"desc" - } - }, - "aggs":{ - "Sum of MB":{ - "sum":{ - "field":"TotalBytesCount" - } - } - } - } - } - } - } - } - } -} diff --git a/public/configurations/queries/top5-download-users-table.json b/public/configurations/queries/top5-download-users-table.json deleted file mode 100644 index 3c14d7b4..00000000 --- a/public/configurations/queries/top5-download-users-table.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "id": "top5-download-users-table", - "title": "Top 5 Downlod Users", - "service": "elasticsearch", - "query": { - "index": "{{index:nuage_dpi_flowstats}}", - "type": "{{type:nuage_doc_type}}", - "body": { - "size": 0, - "query": { - "bool": { - "must": [ - { - "range": { - "timestamp": { - "gte": "{{startTime:now-24h}}", - "lte": "{{endTime:now}}", - "format": "epoch_millis" - } - } - }, - { - "term": { - "IngressBytes": 0 - } - } - ] - } - }, - "aggs": { - "5": { - "filters": { - "filters": { - "Enterprise": { - "query": { - "term": { - "EnterpriseName": "{{enterpriseName:test_org}}" - } - } - } - } - }, - "aggs": { - "DstIP": { - "terms": { - "field": "DstIp", - "size": 5, - "order": { - "EgressBytes": "desc" - } - }, - "aggs": { - "EgressPackets": { - "sum": { - "field": "EgressPackets" - } - }, - "EgressBytes": { - "sum": { - "field": "EgressBytes" - } - }, - "DestinationNSG": { - "terms": { - "field": "DestinationNSG", - "size": 5, - "order": { - "EgressBytes": "desc" - } - }, - "aggs": { - "EgressPackets": { - "sum": { - "field": "EgressPackets" - } - }, - "EgressBytes": { - "sum": { - "field": "EgressBytes" - } - }, - "DomainName": { - "terms": { - "field": "Domain", - "size": 5, - "order": { - "EgressBytes": "desc" - } - }, - "aggs": { - "EgressPackets": { - "sum": { - "field": "EgressPackets" - } - }, - "EgressBytes": { - "sum": { - "field": "EgressBytes" - } - } - } - } - } - } - } - } - } - } - } - } - } -} diff --git a/public/configurations/queries/top5-upload-users-table.json b/public/configurations/queries/top5-upload-users-table.json deleted file mode 100644 index 2952d0cc..00000000 --- a/public/configurations/queries/top5-upload-users-table.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "id": "top5-upload-users-table", - "title": "Top 5 Upload Users", - "service": "elasticsearch", - "query": { - "index": "{{index:nuage_dpi_flowstats}}", - "type": "{{type:nuage_doc_type}}", - "body": { - "size": 0, - "query": { - "bool": { - "must": [ - { - "range": { - "timestamp": { - "gte": "{{startTime:now-24h}}", - "lte": "{{endTime:now}}", - "format": "epoch_millis" - } - } - }, - { - "term": { - "EgressBytes": 0 - } - } - ] - } - }, - "aggs": { - "5": { - "filters": { - "filters": { - "Enterprise": { - "query": { - "term": { - "EnterpriseName": "{{enterpriseName:test_org}}" - } - } - } - } - }, - "aggs": { - "SourceIP": { - "terms": { - "field": "SrcIp", - "size": 5, - "order": { - "IngressBytes": "desc" - } - }, - "aggs": { - "IngressPackets": { - "sum": { - "field": "IngressPackets" - } - }, - "IngressBytes": { - "sum": { - "field": "IngressBytes" - } - }, - "SourceNSG": { - "terms": { - "field": "SourceNSG", - "size": 5, - "order": { - "IngressBytes": "desc" - } - }, - "aggs": { - "IngressPackets": { - "sum": { - "field": "IngressPackets" - } - }, - "IngressBytes": { - "sum": { - "field": "IngressBytes" - } - }, - "DomainName": { - "terms": { - "field": "Domain", - "size": 5, - "order": { - "IngressBytes": "desc" - } - }, - "aggs": { - "IngressPackets": { - "sum": { - "field": "IngressPackets" - } - }, - "IngressBytes": { - "sum": { - "field": "IngressBytes" - } - } - } - } - } - } - } - } - } - } - } - } - } -} diff --git a/public/configurations/queries/top5-users-table.json b/public/configurations/queries/top5-users-table.json deleted file mode 100644 index abd1d65b..00000000 --- a/public/configurations/queries/top5-users-table.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "id":"top5-users-table", - "title":"Top 5 Users", - "service":"elasticsearch", - "query":{ - "index":"{{index:nuage_dpi_flowstats}}", - "type":"{{type:nuage_doc_type}}", - "body":{ - "size":0, - "query":{ - "bool":{ - "must":[ - { - "range":{ - "timestamp":{ - "gte":"{{startTime:now-24h}}", - "lte":"{{endTime:now}}", - "format":"epoch_millis" - } - } - } - ] - } - }, - "aggs":{ - "5":{ - "filters":{ - "filters":{ - "Enterprise":{ - "query":{ - "term":{ - "EnterpriseName":"{{enterpriseName:test_org}}" - } - } - } - } - }, - "aggs":{ - "SourceIP":{ - "terms":{ - "field":"SrcIp", - "size":5, - "order":{ - "TotalBytesCount":"desc" - } - }, - "aggs":{ - "TotalPacketsCount":{ - "sum":{ - "field":"TotalPacketsCount" - } - }, - "TotalBytesCount":{ - "sum":{ - "field":"TotalBytesCount" - } - }, - "SourceNSG":{ - "terms":{ - "field":"SourceNSG", - "size":5, - "order":{ - "TotalBytesCount":"desc" - } - }, - "aggs":{ - "TotalPacketsCount":{ - "sum":{ - "field":"TotalPacketsCount" - } - }, - "TotalBytesCount":{ - "sum":{ - "field":"TotalBytesCount" - } - } - } - } - } - } - } - } - } - } - } -} diff --git a/public/configurations/queries/vertical-bar-with-sla.json b/public/configurations/queries/vertical-bar-with-sla.json deleted file mode 100644 index 34f1ecc0..00000000 --- a/public/configurations/queries/vertical-bar-with-sla.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "id":"vertical-bar-with-sla", - "title":"TBD", - "service":"elasticsearch", - "query":{ - "query":{ - "term":{ - "Application":"myApp-3" - } - }, - "sort":{ - "timestamp":{ - "order":"desc" - } - }, - "_source":{ - "include":[ - "SlaStatus" - ] - }, - "size":1 - } -} diff --git a/public/configurations/queries/vnf-status-linechart.json b/public/configurations/queries/vnf-status-linechart.json deleted file mode 100644 index 4b022f8a..00000000 --- a/public/configurations/queries/vnf-status-linechart.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "id":"vnf-status-linechart", - "title":"TBD", - "service":"elasticsearch", - "query":{ - "index":"{{index:nuage_vnf}}", - "type":"{{type:nuage_doc_type}}", - "body":{ - "size":0, - "query":{ - "bool":{ - "must":[ - { - "range":{ - "timestamp":{ - "gte":"{{startTime:now-24h}}", - "lte":"{{endTime:now}}", - "format":"epoch_millis" - } - } - } - ] - } - }, - "aggs":{ - "5":{ - "filters":{ - "filters":{ - "NSG":{ - "query":{ - "term":{ - "nsg":"{{nsg:NSG-1}}" - } - } - } - } - }, - "aggs": { - "3":{ - "filters":{ - "filters":{ - "VNF":{ - "query":{ - "term":{ - "vnf": "{{vnf:NSG-1-VNF-1}}" - } - } - } - } - }, - "aggs": { - "ts": { - "date_histogram": { - "field": "timestamp", - "interval": "{{interval:1h}}" - }, - "aggs": { - "CPU": { - "avg": { - "field": "cpu" - } - }, - "MEMORY": { - "avg": { - "field": "memory" - } - }, - "DISK": { - "avg": { - "field": "disk" - } - } - } - } - } - } - } - } - } - } - } -} diff --git a/public/configurations/queries/vnf-status.json b/public/configurations/queries/vnf-status.json deleted file mode 100644 index 0242396e..00000000 --- a/public/configurations/queries/vnf-status.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "id":"vnf-status", - "title":"TBD", - "service":"elasticsearch", - "query":{ - "index":"{{index:nuage_vnf}}", - "type":"{{type:nuage_doc_type}}", - "body":{ - "size":1, - "sort": [ - { "timestamp": { "order": "desc" } } - ], - "query": { - "bool": { - "must": [ - { "term": { "nsg": "{{nsg:NSG-1}}" } }, - { "term": { "vnf": "{{vnf:NSG-1-VNF-1}}" } } - ] - } - } - } - } -} diff --git a/public/configurations/queries/vsd-from-nsgs-list.json b/public/configurations/queries/vsd-from-nsgs-list.json deleted file mode 100644 index 56743476..00000000 --- a/public/configurations/queries/vsd-from-nsgs-list.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "id":"vsd-from-nsgs-list", - "title":"Applications", - "service":"VSD", - "query":{ - "parentResource":"enterprises", - "parentID":"{{enterpriseID}}", - "resource":"nsgateways", - "filter": "personality == {{fromPersonality:NSG}}" - } -} diff --git a/public/configurations/queries/vsd-to-nsgs-list.json b/public/configurations/queries/vsd-to-nsgs-list.json deleted file mode 100644 index 66e51e62..00000000 --- a/public/configurations/queries/vsd-to-nsgs-list.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "id":"vsd-to-nsgs-list", - "title":"Applications", - "service":"VSD", - "query":{ - "parentResource":"enterprises", - "parentID":"{{enterpriseID}}", - "resource":"nsgateways", - "filter": "personality == {{toPersonality:NSG}}" - } -} diff --git a/public/configurations/queries/vss-domain-acl-dpg.json b/public/configurations/queries/vss-domain-acl-dpg.json deleted file mode 100644 index 9fc79753..00000000 --- a/public/configurations/queries/vss-domain-acl-dpg.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "id":"vss-domain-acl-dpg", - "title":"ACL hits by Destination PG", - "service":"elasticsearch", - "query":{ - "index":"{{index:nuage_flow}}", - "type":"{{type:nuage_doc_type}}", - "body":{ - "size":0, - "query":{ - "bool":{ - "must":[ - { - "range":{ - "timestamp":{ - "gte":"{{startTime:now-24h}}", - "lte":"{{endTime:now}}", - "format":"epoch_millis" - } - } - } - ] - } - }, - "aggs": { - "2": { - "filters":{ - "filters":{ - "Enterprise":{ - "query":{ - "term":{ - "nuage_metadata.enterpriseName":"{{enterpriseName:chord_enterprise}}" - } - } - } - } - }, - "aggs": { - "3": { - "filters":{ - "filters":{ - "Domain":{ - "query":{ - "term":{ - "{{domainType:nuage_metadata.domainName}}":"{{domainName:chord_domain}}" - } - } - } - } - }, - "aggs": { - "4": { - "filters": { - "filters": { - "ACL": { - "query": { - "term": { - "type": "{{actionType:DENY}}" - } - } - } - } - }, - "aggs": { - "dpg": { - "terms": { - "field": "nuage_metadata.dpgName", - "size": 5, - "order": { - "SumOf": "desc" - } - }, - "aggs": { - "SumOf": { - "sum": { - "field": "packets" - } - } - } - } - } - } - } - } - } - } - } - } - } -} diff --git a/public/configurations/queries/vss-domain-acl-spg.json b/public/configurations/queries/vss-domain-acl-spg.json deleted file mode 100644 index 4d60c7a7..00000000 --- a/public/configurations/queries/vss-domain-acl-spg.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "id":"vss-domain-acl-spg", - "title":"ACL hits by Source PG", - "service":"elasticsearch", - "query":{ - "index":"{{index:nuage_flow}}", - "type":"{{type:nuage_doc_type}}", - "body":{ - "size":0, - "query":{ - "bool":{ - "must":[ - { - "range":{ - "timestamp":{ - "gte":"{{startTime:now-24h}}", - "lte":"{{endTime:now}}", - "format":"epoch_millis" - } - } - } - ] - } - }, - "aggs": { - "2": { - "filters":{ - "filters":{ - "Enterprise":{ - "query":{ - "term":{ - "nuage_metadata.enterpriseName":"{{enterpriseName:chord_enterprise}}" - } - } - } - } - }, - "aggs": { - "3": { - "filters":{ - "filters":{ - "Domain":{ - "query":{ - "term":{ - "{{domainType:nuage_metadata.domainName}}":"{{domainName:chord_domain}}" - } - } - } - } - }, - "aggs": { - "4": { - "filters": { - "filters": { - "ACL": { - "query": { - "term": { - "type": "{{actionType:DENY}}" - } - } - } - } - }, - "aggs": { - "spg": { - "terms": { - "field": "nuage_metadata.spgName", - "size": 5, - "order": { - "SumOf": "desc" - } - }, - "aggs": { - "SumOf": { - "sum": { - "field": "packets" - } - } - } - } - } - } - } - } - } - } - } - } - } -} diff --git a/public/configurations/queries/vss-domain-acl-time.json b/public/configurations/queries/vss-domain-acl-time.json deleted file mode 100644 index 500e4f71..00000000 --- a/public/configurations/queries/vss-domain-acl-time.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "id":"vss-domain-acl-time", - "title":"ACL vs Time", - "service":"elasticsearch", - "query":{ - "index":"{{index:nuage_flow}}", - "type":"{{type:nuage_doc_type}}", - "body":{ - "size":0, - "query":{ - "bool":{ - "must":[ - { - "range":{ - "timestamp":{ - "gte":"{{startTime:now-24h}}", - "lte":"{{endTime:now}}", - "format":"epoch_millis" - } - } - } - ] - } - }, - "aggs": { - "2": { - "filters":{ - "filters":{ - "Enterprise":{ - "query":{ - "term":{ - "nuage_metadata.enterpriseName":"{{enterpriseName:chord_enterprise}}" - } - } - } - } - }, - "aggs": { - "3": { - "filters":{ - "filters":{ - "Domain":{ - "query":{ - "term":{ - "{{domainType:nuage_metadata.domainName}}":"{{domainName:chord_domain}}" - } - } - } - } - }, - "aggs": { - "4": { - "filters": { - "filters": { - "ACL": { - "query": { - "term": { - "type": "{{actionType:DENY}}" - } - } - } - } - }, - "aggs": { - "timestamp": { - "date_histogram": { - "field": "timestamp", - "interval": "{{interval:1h}}" - }, - "aggs": { - "SumOf": { - "sum": { - "field": "packets" - } - } - } - } - } - } - } - } - } - } - } - } - } -} diff --git a/public/configurations/queries/vss-domain-acl-top5.json b/public/configurations/queries/vss-domain-acl-top5.json deleted file mode 100644 index 04215f51..00000000 --- a/public/configurations/queries/vss-domain-acl-top5.json +++ /dev/null @@ -1,91 +0,0 @@ -{ - "id":"vss-domain-acl-top5", - "title":"top 5 acls", - "service":"elasticsearch", - "query":{ - "index":"{{index:nuage_flow}}", - "type":"{{type:nuage_doc_type}}", - "body":{ - "size":0, - "query":{ - "bool":{ - "must":[ - { - "range":{ - "timestamp":{ - "gte":"{{startTime:now-24h}}", - "lte":"{{endTime:now}}", - "format":"epoch_millis" - } - } - } - ] - } - }, - "aggs": { - "2": { - "filters":{ - "filters":{ - "Enterprise":{ - "query":{ - "term":{ - "nuage_metadata.enterpriseName":"{{enterpriseName:chord_enterprise}}" - } - } - } - } - }, - "aggs": { - "3": { - "filters":{ - "filters":{ - "Domain":{ - "query":{ - "term":{ - "nuage_metadata.domainName":"{{domainName:chord_domain}}" - } - } - } - } - }, - "aggs": { - "top-acls": { - "terms": { - "field": "nuage_metadata.aclId", - "size": 5 - }, - "aggs": { - "top-acl-hits": { - "top_hits": { - "sort": [ - { - "packets": { - "order": "desc", - "mode": "sum" - } - } - ], - "_source": { - "include": [ - "nuage_metadata.spgName", - "nuage_metadata.dpgName", - "sourceport", - "destinationport", - "protocol", - "type" - ] - }, - "size": 1 - } - } - } - } - } - } - } - } - } - } - } -} - diff --git a/public/configurations/queries/vss-domain-events-by-pg.json b/public/configurations/queries/vss-domain-events-by-pg.json deleted file mode 100644 index e583dc1d..00000000 --- a/public/configurations/queries/vss-domain-events-by-pg.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "id":"vss-domain-events-by-pg", - "title":"Top Security Events by Source PG", - "service":"elasticsearch", - "query":{ - "index":"{{index:nuage_event}}", - "type":"{{type:nuage_doc_type}}", - "body":{ - "size":0, - "query":{ - "bool":{ - "must":[ - { - "range":{ - "timestamp":{ - "gte":"{{startTime:now-24h}}", - "lte":"{{endTime:now}}", - "format":"epoch_millis" - } - } - } - ] - } - }, - "aggs": { - "2": { - "filters":{ - "filters":{ - "Enterprise":{ - "query":{ - "term":{ - "nuage_metadata.enterpriseName":"{{enterpriseName:chord_enterprise}}" - } - } - } - } - }, - "aggs": { - "3": { - "filters":{ - "filters":{ - "Domain":{ - "query":{ - "term":{ - "nuage_metadata.domainName":"{{domainName:chord_domain}}" - } - } - } - } - }, - "aggs": { - "PG": { - "terms": { - "field": "nuage_metadata.spgName", - "size": 5, - "order": { - "Sum of Value": "desc" - } - }, - "aggs": { - "Sum of Value": { - "sum": { - "field": "value" - } - } - } - } - } - } - } - } - } - } - } -} diff --git a/public/configurations/queries/vss-domain-events-by-type.json b/public/configurations/queries/vss-domain-events-by-type.json deleted file mode 100644 index 765fc941..00000000 --- a/public/configurations/queries/vss-domain-events-by-type.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "id":"vss-domain-events-by-type", - "title":"Top Security Events by Type", - "service":"elasticsearch", - "query":{ - "index":"{{index:nuage_event}}", - "type":"{{type:nuage_doc_type}}", - "body":{ - "size":0, - "query":{ - "bool":{ - "must":[ - { - "range":{ - "timestamp":{ - "gte":"{{startTime:now-24h}}", - "lte":"{{endTime:now}}", - "format":"epoch_millis" - } - } - } - ] - } - }, - "aggs": { - "2": { - "filters":{ - "filters":{ - "Enterprise":{ - "query":{ - "term":{ - "nuage_metadata.enterpriseName":"{{enterpriseName:chord_enterprise}}" - } - } - } - } - }, - "aggs": { - "3": { - "filters":{ - "filters":{ - "Domain":{ - "query":{ - "term":{ - "{{domainType:nuage_metadata.domainName}}":"{{domainName:chord_domain}}" - } - } - } - } - }, - "aggs": { - "EventType": { - "terms": { - "field": "type", - "size": 5, - "order": { - "Sum of Value": "desc" - } - }, - "aggs": { - "Sum of Value": { - "sum": { - "field": "value" - } - } - } - } - } - } - } - } - } - } - } -} diff --git a/public/configurations/queries/vss-domain-events-detail.json b/public/configurations/queries/vss-domain-events-detail.json deleted file mode 100644 index 836e63c7..00000000 --- a/public/configurations/queries/vss-domain-events-detail.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "id":"vss-domain-events-detail", - "title":"Event Information", - "service":"elasticsearch", - "query":{ - "index":"{{index:nuage_event}}", - "type":"{{type:nuage_doc_type}}", - "body":{ - "sort": [ - { "timestamp": { "order": "desc" } } - ], - "query": { - "bool": { - "must": [ - {"term": {"nuage_metadata.enterpriseName": "{{enterpriseName:chord_enterprise}}"} }, - {"term": {"{{domainType:nuage_metadata.domainName}}": "{{domainName}}"} }, - {"term": {"type": "{{eventType}}"} }, - {"range": { "timestamp": { "gte": "{{startTime:now-24h}}", "lte": "{{endTime:now}}", "format":"epoch_millis"} }} - ] - } - } - } - } -} diff --git a/public/configurations/queries/vss-domain-flow-table.json b/public/configurations/queries/vss-domain-flow-table.json deleted file mode 100644 index 22be0456..00000000 --- a/public/configurations/queries/vss-domain-flow-table.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "id":"vss-domain-flow-table", - "title":"Flow Information", - "service":"elasticsearch", - "query":{ - "index":"{{index:nuage_flow}}", - "type":"{{type:nuage_doc_type}}", - "body":{ - "sort": [ - { "timestamp": { "order": "desc" } } - ], - "query": { - "bool": { - "should": [ - { - "bool": { - "must": [ - {"term": {"nuage_metadata.enterpriseName": "{{enterpriseName:chord_enterprise}}"} }, - {"term": {"{{domainType:nuage_metadata.domainName}}": "{{domainName}}"} }, - {"term": {"nuage_metadata.acl_source_type": "{{source_field}}"} }, - {"term": {"nuage_metadata.acl_destination_type": "{{destination_field}}"} }, - {"term": {"nuage_metadata.acl_destination_name": "{{destination}}"} }, - {"term": {"nuage_metadata.acl_source_name": "{{source}}"} }, - {"term": {"nuage_metadata.acl_destination_name": "{{destination}}"} }, - {"range": { "timestamp": { "gte": "{{startTime:now-24h}}", "lte": "{{endTime:now}}", "format":"epoch_millis"} }} - ] - } - }, - { - "bool": { - "must": [ - {"term": {"nuage_metadata.enterpriseName": "{{enterpriseName:chord_enterprise}}"} }, - {"term": {"{{domainType:nuage_metadata.domainName}}": "{{domainName}}"} }, - {"term": {"nuage_metadata.acl_source_type": "{{source_field}}"} }, - {"term": {"nuage_metadata.acl_destination_type": "{{destination_field}}"} }, - { "term": {"nuage_metadata.acl_source_name": "{{destination}}"} }, - { "term": {"nuage_metadata.acl_destination_name": "{{source}}"} }, - {"range": { "timestamp": {"gte": "{{startTime:now-24h}}", "lte": "{{endTime:now}}", "format":"epoch_millis"} }} - ] - } - } - ] - } - } - } - } -} diff --git a/public/configurations/queries/vss-domain-flow.json b/public/configurations/queries/vss-domain-flow.json deleted file mode 100644 index f56835f5..00000000 --- a/public/configurations/queries/vss-domain-flow.json +++ /dev/null @@ -1,121 +0,0 @@ -{ - "id":"vss-domain-flow", - "title":"Flows per Domain", - "service":"elasticsearch", - "query":{ - "index":"{{index:nuage_flow}}", - "type":"{{type:nuage_doc_type}}", - "body":{ - "size":0, - "query":{ - "bool":{ - "must":[ - { - "range":{ - "timestamp":{ - "gte":"{{startTime:now-24h}}", - "lte":"{{endTime:now}}", - "format":"epoch_millis" - } - } - } - ] - } - }, - "aggs": { - "2": { - "filters":{ - "filters":{ - "Enterprise":{ - "query":{ - "term":{ - "nuage_metadata.enterpriseName":"{{enterpriseName:chord_enterprise}}" - } - } - } - } - }, - "aggs": { - "3": { - "filters":{ - "filters":{ - "Domain":{ - "query":{ - "term":{ - "{{domainType:nuage_metadata.domainName}}":"{{domainName:chord_domain}}" - } - } - } - } - }, - "aggs": { - "4": { - "filters":{ - "filters":{ - "SourceType":{ - "query":{ - "term":{ - "nuage_metadata.acl_source_type":"{{source_field:pg}}" - } - } - } - } - }, - "aggs": { - "5": { - "filters":{ - "filters":{ - "DestinationType":{ - "query":{ - "term":{ - "nuage_metadata.acl_destination_type":"{{destination_field:pg}}" - } - } - } - } - }, - "aggs": { - "source": { - "terms": { - "field": "nuage_metadata.acl_source_name", - "size": 5, - "order": { - "SumOf": "desc" - } - }, - "aggs": { - "SumOf": { - "sum": { - "field": "packets" - } - }, - "destination": { - "terms": { - "field": "nuage_metadata.acl_destination_name", - "size": 5, - "order": { - "SumOf": "desc" - } - }, - "aggs": { - "SumOf": { - "sum": { - "field": "packets" - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } -} diff --git a/public/configurations/queries/vss-domain-traffic-icmp.json b/public/configurations/queries/vss-domain-traffic-icmp.json deleted file mode 100644 index 394baaad..00000000 --- a/public/configurations/queries/vss-domain-traffic-icmp.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "id":"vss-domain-traffic-icmp", - "title":"ICMP connections vs Time", - "service":"elasticsearch", - "query":{ - "index":"{{index:nuage_flow}}", - "type":"{{type:nuage_doc_type}}", - "body":{ - "size":0, - "query":{ - "bool":{ - "must":[ - { - "range":{ - "timestamp":{ - "gte":"{{startTime:now-24h}}", - "lte":"{{endTime:now}}", - "format":"epoch_millis" - } - } - } - ] - } - }, - "aggs": { - "2": { - "filters":{ - "filters":{ - "Enterprise":{ - "query":{ - "term":{ - "nuage_metadata.enterpriseName":"{{enterpriseName:chord_enterprise}}" - } - } - } - } - }, - "aggs": { - "3": { - "filters":{ - "filters":{ - "Domain":{ - "query":{ - "term":{ - "{{domainType:nuage_metadata.domainName}}":"{{domainName:chord_domain}}" - } - } - } - } - }, - "aggs": { - "4": { - "filters": { - "filters": { - "ACLALLOW": { - "query": { - "term": { - "type": "{{actionType:ALLOW}}" - } - } - } - } - }, - "aggs": { - "5": { - "filters": { - "filters": { - "Protocol": { - "query": { - "term": { - "protocol": "ICMP" - } - } - } - } - }, - "aggs": { - "timestamp": { - "date_histogram": { - "field": "timestamp", - "interval": "{{interval:1h}}" - }, - "aggs": { - "SumOf": { - "sum": { - "field": "packets" - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } -} diff --git a/public/configurations/queries/vss-domain-traffic-tcp-conn.json b/public/configurations/queries/vss-domain-traffic-tcp-conn.json deleted file mode 100644 index 76521b1b..00000000 --- a/public/configurations/queries/vss-domain-traffic-tcp-conn.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "id":"vss-domain-traffic-tcp-conn", - "title":"TCP connections vs Time", - "service":"elasticsearch", - "query":{ - "index":"{{index:nuage_flow}}", - "type":"{{type:nuage_doc_type}}", - "body":{ - "size":0, - "query":{ - "bool":{ - "must":[ - { - "range":{ - "timestamp":{ - "gte":"{{startTime:now-24h}}", - "lte":"{{endTime:now}}", - "format":"epoch_millis" - } - } - } - ] - } - }, - "aggs": { - "2": { - "filters":{ - "filters":{ - "Enterprise":{ - "query":{ - "term":{ - "nuage_metadata.enterpriseName":"{{enterpriseName:chord_enterprise}}" - } - } - } - } - }, - "aggs": { - "3": { - "filters":{ - "filters":{ - "Domain":{ - "query":{ - "term":{ - "{{domainType:nuage_metadata.domainName}}":"{{domainName:chord_domain}}" - } - } - } - } - }, - "aggs": { - "4": { - "filters": { - "filters": { - "ACLALLOW": { - "query": { - "term": { - "type": "{{actionType:ALLOW}}" - } - } - } - } - }, - "aggs": { - "5": { - "filters": { - "filters": { - "Protocol": { - "query": { - "term": { - "protocol": "TCP" - } - } - } - } - }, - "aggs": { - "timestamp": { - "date_histogram": { - "field": "timestamp", - "interval": "{{interval:1h}}" - }, - "aggs": { - "SumOf": { - "sum": { - "field": "packets" - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } -} diff --git a/public/configurations/queries/vss-domain-traffic-tcp-multiline.json b/public/configurations/queries/vss-domain-traffic-tcp-multiline.json deleted file mode 100644 index 38a8eabc..00000000 --- a/public/configurations/queries/vss-domain-traffic-tcp-multiline.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "id":"vss-domain-traffic-tcp-multiline", - "title":"TCP traffic per Domain", - "service":"elasticsearch", - "query":{ - "index":"{{index:nuage_flow}}", - "type":"{{type:nuage_doc_type}}", - "body":{ - "size":0, - "query":{ - "bool":{ - "must":[ - { - "range":{ - "timestamp":{ - "gte":"{{startTime:now-24h}}", - "lte":"{{endTime:now}}", - "format":"epoch_millis" - } - } - } - ] - } - }, - "aggs": { - "2": { - "filters":{ - "filters":{ - "Enterprise":{ - "query":{ - "term":{ - "nuage_metadata.enterpriseName":"{{enterpriseName:chord_enterprise}}" - } - } - } - } - }, - "aggs": { - "3": { - "filters":{ - "filters":{ - "Domain":{ - "query":{ - "term":{ - "nuage_metadata.domainName":"{{domainName:chord_domain}}" - } - } - } - } - }, - "aggs": { - "timestamp": { - "date_histogram": { - "field": "timestamp", - "interval": "1h" - }, - "aggs": { - "SYN": { - "sum": { - "field": "tcpflags.SYN" - } - }, - "SYN-ACK": { - "sum": { - "field": "tcpflags.SYN-ACK" - } - }, - "ACK": { - "sum": { - "field": "tcpflags.ACK" - } - }, - "FIN": { - "sum": { - "field": "tcpflags.FIN" - } - }, - "FIN-ACK": { - "sum": { - "field": "tcpflags.FIN-ACK" - } - }, - "NULL": { - "sum": { - "field": "tcpflags.NULL" - } - }, - "RST": { - "sum": { - "field": "tcpflags.RST" - } - } - } - } - } - } - } - } - } - } - } -} \ No newline at end of file diff --git a/public/configurations/queries/vss-domain-traffic-tcp-syn.json b/public/configurations/queries/vss-domain-traffic-tcp-syn.json deleted file mode 100644 index fbd8a3e8..00000000 --- a/public/configurations/queries/vss-domain-traffic-tcp-syn.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "id":"vss-domain-traffic-tcp", - "title":"TCP traffic per Domain", - "service":"elasticsearch", - "query":{ - "index":"{{index:nuage_flow}}", - "type":"{{type:nuage_doc_type}}", - "body":{ - "size":0, - "query":{ - "bool":{ - "must":[ - { - "range":{ - "timestamp":{ - "gte":"{{startTime:now-24h}}", - "lte":"{{endTime:now}}", - "format":"epoch_millis" - } - } - } - ] - } - }, - "aggs": { - "2": { - "filters":{ - "filters":{ - "Enterprise":{ - "query":{ - "term":{ - "nuage_metadata.enterpriseName":"{{enterpriseName:chord_enterprise}}" - } - } - } - } - }, - "aggs": { - "3": { - "filters":{ - "filters":{ - "Domain":{ - "query":{ - "term":{ - "nuage_metadata.domainName":"{{domainName:chord_domain}}" - } - } - } - } - }, - "aggs": { - "timestamp": { - "date_histogram": { - "field": "timestamp", - "interval": "1h" - }, - "aggs": { - "flag": { - "sum": { - "field": "tcpflags.{{flagtype}}" - } - } - } - } - } - } - } - } - } - } - } -} \ No newline at end of file diff --git a/public/configurations/queries/vss-domain-traffic-tcp-synflood.json b/public/configurations/queries/vss-domain-traffic-tcp-synflood.json deleted file mode 100644 index eee7047c..00000000 --- a/public/configurations/queries/vss-domain-traffic-tcp-synflood.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "id":"vss-domain-traffic-tcp-synflood", - "title":"TCP-SYN Flood vs Time", - "service":"elasticsearch", - "query":{ - "index":"{{index:nuage_event}}", - "type":"{{type:nuage_doc_type}}", - "body":{ - "size":0, - "query":{ - "bool":{ - "must":[ - { - "range":{ - "timestamp":{ - "gte":"{{startTime:now-24h}}", - "lte":"{{endTime:now}}", - "format":"epoch_millis" - } - } - } - ] - } - }, - "aggs": { - "2": { - "filters":{ - "filters":{ - "Enterprise":{ - "query":{ - "term":{ - "nuage_metadata.enterpriseName":"{{enterpriseName:chord_enterprise}}" - } - } - } - } - }, - "aggs": { - "3": { - "filters":{ - "filters":{ - "Domain":{ - "query":{ - "term":{ - "{{domainType:nuage_metadata.domainName}}":"{{domainName:chord_domain}}" - } - } - } - } - }, - "aggs": { - "4": { - "filters": { - "filters": { - "TYPE": { - "query": { - "term": { - "type": "TCP_SYN_FLOOD" - } - } - } - } - }, - "aggs": { - "timestamp": { - "date_histogram": { - "field": "timestamp", - "interval": "{{interval:1h}}" - }, - "aggs": { - "SumOf": { - "sum": { - "field": "value" - } - } - } - } - } - } - } - } - } - } - } - } - } -} diff --git a/public/configurations/queries/vss-domain-traffic-top-dpg.json b/public/configurations/queries/vss-domain-traffic-top-dpg.json deleted file mode 100644 index c38dbb70..00000000 --- a/public/configurations/queries/vss-domain-traffic-top-dpg.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "id":"vss-domain-traffic-top-dpg", - "title":"Top Destination PG by Count", - "service":"elasticsearch", - "query":{ - "index":"{{index:nuage_flow}}", - "type":"{{type:nuage_doc_type}}", - "body":{ - "size":0, - "query":{ - "bool":{ - "must":[ - { - "range":{ - "timestamp":{ - "gte":"{{startTime:now-24h}}", - "lte":"{{endTime:now}}", - "format":"epoch_millis" - } - } - } - ] - } - }, - "aggs": { - "2": { - "filters":{ - "filters":{ - "Enterprise":{ - "query":{ - "term":{ - "nuage_metadata.enterpriseName":"{{enterpriseName:chord_enterprise}}" - } - } - } - } - }, - "aggs": { - "3": { - "filters":{ - "filters":{ - "Domain":{ - "query":{ - "term":{ - "{{domainType:nuage_metadata.domainName}}":"{{domainName:chord_domain}}" - } - } - } - } - }, - "aggs": { - "dpg": { - "terms": { - "field": "nuage_metadata.dpgName", - "size": 5, - "order": { - "SumOf": "desc" - } - }, - "aggs": { - "SumOf": { - "sum": { - "field": "packets" - } - } - } - } - } - } - } - } - } - } - } -} diff --git a/public/configurations/queries/vss-domain-traffic-top-spg.json b/public/configurations/queries/vss-domain-traffic-top-spg.json deleted file mode 100644 index 766aee82..00000000 --- a/public/configurations/queries/vss-domain-traffic-top-spg.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "id":"vss-domain-traffic-top-spg", - "title":"Top Source PG by Count", - "service":"elasticsearch", - "query":{ - "index":"{{index:nuage_flow}}", - "type":"{{type:nuage_doc_type}}", - "body":{ - "size":0, - "query":{ - "bool":{ - "must":[ - { - "range":{ - "timestamp":{ - "gte":"{{startTime:now-24h}}", - "lte":"{{endTime:now}}", - "format":"epoch_millis" - } - } - } - ] - } - }, - "aggs": { - "2": { - "filters":{ - "filters":{ - "Enterprise":{ - "query":{ - "term":{ - "nuage_metadata.enterpriseName":"{{enterpriseName:chord_enterprise}}" - } - } - } - } - }, - "aggs": { - "3": { - "filters":{ - "filters":{ - "Domain":{ - "query":{ - "term":{ - "{{domainType:nuage_metadata.domainName}}":"{{domainName:chord_domain}}" - } - } - } - } - }, - "aggs": { - "spg": { - "terms": { - "field": "nuage_metadata.spgName", - "size": 5, - "order": { - "SumOf": "desc" - } - }, - "aggs": { - "SumOf": { - "sum": { - "field": "packets" - } - } - } - } - } - } - } - } - } - } - } -} diff --git a/public/configurations/queries/vss-domain-traffic-udp.json b/public/configurations/queries/vss-domain-traffic-udp.json deleted file mode 100644 index d7249ab1..00000000 --- a/public/configurations/queries/vss-domain-traffic-udp.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "id":"vss-domain-traffic-udp", - "title":"UDP vs Time", - "service":"elasticsearch", - "query":{ - "index":"{{index:nuage_flow}}", - "type":"{{type:nuage_doc_type}}", - "body":{ - "size":0, - "query":{ - "bool":{ - "must":[ - { - "range":{ - "timestamp":{ - "gte":"{{startTime:now-24h}}", - "lte":"{{endTime:now}}", - "format":"epoch_millis" - } - } - } - ] - } - }, - "aggs": { - "2": { - "filters":{ - "filters":{ - "Enterprise":{ - "query":{ - "term":{ - "nuage_metadata.enterpriseName":"{{enterpriseName:chord_enterprise}}" - } - } - } - } - }, - "aggs": { - "3": { - "filters":{ - "filters":{ - "Domain":{ - "query":{ - "term":{ - "{{domainType:nuage_metadata.domainName}}":"{{domainName:chord_domain}}" - } - } - } - } - }, - "aggs": { - "4": { - "filters": { - "filters": { - "ACLALLOW": { - "query": { - "term": { - "type": "{{actionType:ALLOW}}" - } - } - } - } - }, - "aggs": { - "5": { - "filters": { - "filters": { - "Protocol": { - "query": { - "term": { - "protocol": "UDP" - } - } - } - } - }, - "aggs": { - "timestamp": { - "date_histogram": { - "field": "timestamp", - "interval": "{{interval:1h}}" - }, - "aggs": { - "SumOf": { - "sum": { - "field": "packets" - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } -} diff --git a/public/configurations/queries/vss-ent-acldeny-time.json b/public/configurations/queries/vss-ent-acldeny-time.json deleted file mode 100644 index e15e6489..00000000 --- a/public/configurations/queries/vss-ent-acldeny-time.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "id":"vss-enterprise-acldeny-time", - "title":"ACL Deny vs Time", - "service":"elasticsearch", - "query":{ - "index":"{{index:nuage_flow}}", - "type":"{{type:nuage_doc_type}}", - "body":{ - "size":0, - "query":{ - "bool":{ - "must":[ - { - "range":{ - "timestamp":{ - "gte":"{{startTime:now-24h}}", - "lte":"{{endTime:now}}", - "format":"epoch_millis" - } - } - } - ] - } - }, - "aggs": { - "2": { - "filters":{ - "filters":{ - "Enterprise":{ - "query":{ - "term":{ - "nuage_metadata.enterpriseName":"{{enterpriseName:chord_enterprise}}" - } - } - } - } - }, - "aggs": { - "4": { - "filters": { - "filters": { - "ACLDENY": { - "query": { - "term": { - "type": "DENY" - } - } - } - } - }, - "aggs": { - "timestamp": { - "date_histogram": { - "field": "timestamp", - "interval": "{{interval:1h}}" - }, - "aggs": { - "SumOf": { - "sum": { - "field": "packets" - } - } - } - } - } - } - } - } - } - } - } -} diff --git a/public/configurations/queries/vss-enterprise-acldeny-metric.json b/public/configurations/queries/vss-enterprise-acldeny-metric.json deleted file mode 100644 index 6dca2686..00000000 --- a/public/configurations/queries/vss-enterprise-acldeny-metric.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "id":"vss-enterprise-acldeny-metric", - "title":"ACL Deny count per enterprise", - "service":"elasticsearch", - "query":{ - "index":"{{index:nuage_event}}", - "type":"{{type:nuage_doc_type}}", - "body":{ - "size": 0, - "aggs": { - "2": { - "filters":{ - "filters":{ - "Domain":{ - "query":{ - "term":{ - "nuage_metadata.enterpriseName":"{{enterpriseName:chord_enterprise}}" - } - } - } - } - }, - "aggs": { - "timezones": { - "filters": { - "filters": { - "Prev 24": { - "range": { - "timestamp": { - "gte": "now-48h", - "lte": "now-24h" - } - } - }, - "Last 24": { - "range": { - "timestamp": { - "gte": "now-24h", - "lte": "now" - } - } - } - } - }, - "aggs": { - "types": { - "filters": { - "filters": { - "type": { - "query": { - "term": { - "type": "ACL_DENY" - } - } - } - } - } - } - } - } - } - } - } - } - } -} diff --git a/public/configurations/queries/vss-enterprise-alerts-metric.json b/public/configurations/queries/vss-enterprise-alerts-metric.json deleted file mode 100644 index e0f84802..00000000 --- a/public/configurations/queries/vss-enterprise-alerts-metric.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "id":"vss-enterprise-alerts-metric", - "title":"Alerts count per enterprise", - "service":"elasticsearch", - "query":{ - "index":"{{index:nuage_event}}", - "type":"{{type:nuage_doc_type}}", - "body":{ - "size": 0, - "aggs": { - "2": { - "filters":{ - "filters":{ - "Domain":{ - "query":{ - "term":{ - "nuage_metadata.enterpriseName":"{{enterpriseName:chord_enterprise}}" - } - } - } - } - }, - "aggs": { - "timezones": { - "filters": { - "filters": { - "Prev 24": { - "range": { - "timestamp": { - "gte": "now-48h", - "lte": "now-24h" - } - } - }, - "Last 24": { - "range": { - "timestamp": { - "gte": "now-24h", - "lte": "now" - } - } - } - } - }, - "aggs": { - "types": { - "filters": { - "filters": { - "type": { - "query": { - "term": { - "type": "TCA_EVENT" - } - } - } - } - } - } - } - } - } - } - } - } - } -} diff --git a/public/configurations/queries/vss-enterprise-events-metric.json b/public/configurations/queries/vss-enterprise-events-metric.json deleted file mode 100644 index de666aee..00000000 --- a/public/configurations/queries/vss-enterprise-events-metric.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "id":"vss-enterprise-events-metric", - "title":"Events count per enterprise", - "service":"elasticsearch", - "query":{ - "index":"{{index:nuage_event}}", - "type":"{{type:nuage_doc_type}}", - "body":{ - "size": 0, - "aggs": { - "2": { - "filters":{ - "filters":{ - "Domain":{ - "query":{ - "term":{ - "nuage_metadata.enterpriseName":"{{enterpriseName:chord_enterprise}}" - } - } - } - } - }, - "aggs": { - "timezones": { - "filters": { - "filters": { - "Prev 24": { - "range": { - "timestamp": { - "gte": "{{prevStartTime:now-48h}}", - "lte": "{{startTime:now-24h}}" - } - } - }, - "Last 24": { - "range": { - "timestamp": { - "gte": "{{startTime:now-24h}}", - "lte": "{{endTime:now}}" - } - } - } - } - } - } - } - } - } - } - } -} diff --git a/public/configurations/queries/vss-enterprise-flows-metric.json b/public/configurations/queries/vss-enterprise-flows-metric.json deleted file mode 100644 index b1a1fd20..00000000 --- a/public/configurations/queries/vss-enterprise-flows-metric.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "id":"vss-enterprise-flows-metric", - "title":"Flows count per enterprise", - "service":"elasticsearch", - "query":{ - "index":"{{index:nuage_flow}}", - "type":"{{type:nuage_doc_type}}", - "body":{ - "size": 0, - "aggs": { - "2": { - "filters":{ - "filters":{ - "Domain":{ - "query":{ - "term":{ - "nuage_metadata.enterpriseName":"{{enterpriseName:chord_enterprise}}" - } - } - } - } - }, - "aggs": { - "timezones": { - "filters": { - "filters": { - "Prev 24": { - "range": { - "timestamp": { - "gte": "now-48h", - "lte": "now-24h" - } - } - }, - "Last 24": { - "range": { - "timestamp": { - "gte": "now-24h", - "lte": "now" - } - } - } - } - }, - "aggs": { - "SumOf": { - "sum": { - "field": "packets" - } - } - } - } - } - } - } - } - } -} diff --git a/public/configurations/queries/vss-enterprise-pg-metric.json b/public/configurations/queries/vss-enterprise-pg-metric.json deleted file mode 100644 index a2a760fb..00000000 --- a/public/configurations/queries/vss-enterprise-pg-metric.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "id":"vss-enterprise-pg-metric", - "title":"Distinct PG count per enterprise", - "service":"elasticsearch", - "query":{ - "index":"{{index:nuage_flow}}", - "type":"{{type:nuage_doc_type}}", - "body":{ - "size": 0, - "aggs": { - "2": { - "filters":{ - "filters":{ - "Domain":{ - "query":{ - "term":{ - "nuage_metadata.enterpriseName":"{{enterpriseName:chord_enterprise}}" - } - } - } - } - }, - "aggs": { - "timezones": { - "filters": { - "filters": { - "Prev 24": { - "range": { - "timestamp": { - "gte": "now-48h", - "lte": "now-24h" - } - } - }, - "Last 24": { - "range": { - "timestamp": { - "gte": "now-24h", - "lte": "now" - } - } - } - } - }, - "aggs": { - "pg_count": { - "cardinality": { - "field": "nuage_metadata.spgName" - } - } - } - } - } - } - } - } - } -} diff --git a/public/configurations/queries/vss-top-domains-blocked-traffic.json b/public/configurations/queries/vss-top-domains-blocked-traffic.json deleted file mode 100644 index a4a10fc3..00000000 --- a/public/configurations/queries/vss-top-domains-blocked-traffic.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "id":"vss-topdomains-blocked-traffic", - "title":"Top Domains with Blocked Traffic", - "service":"elasticsearch", - "query":{ - "index":"{{index:nuage_flow}}", - "type":"{{type:nuage_doc_type}}", - "body":{ - "size":0, - "query":{ - "bool":{ - "must":[ - { - "range":{ - "timestamp":{ - "gte":"{{startTime:now-24h}}", - "lte":"{{endTime:now}}", - "format":"epoch_millis" - } - } - } - ] - } - }, - "aggs": { - "2": { - "filters":{ - "filters":{ - "Enterprise":{ - "query":{ - "term":{ - "nuage_metadata.enterpriseName":"{{enterpriseName:chord_enterprise}}" - } - } - } - } - }, - "aggs": { - "4": { - "filters": { - "filters": { - "ACLDENY": { - "query": { - "term": { - "type": "DENY" - } - } - } - } - }, - "aggs": { - "domains": { - "terms": { - "field": "nuage_metadata.domainName", - "size": 5, - "order": { - "SumOf": "desc" - } - }, - "aggs": { - "SumOf": { - "sum": { - "field": "packets" - } - } - } - } - } - } - } - } - } - } - } -} diff --git a/public/configurations/queries/vss-top-sec-events.json b/public/configurations/queries/vss-top-sec-events.json deleted file mode 100644 index 00ed0768..00000000 --- a/public/configurations/queries/vss-top-sec-events.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "id":"vss-top-sec-events", - "title":"Top Security Events by Type", - "service":"elasticsearch", - "query":{ - "index":"{{index:nuage_event}}", - "type":"{{type:nuage_doc_type}}", - "body":{ - "size":0, - "query":{ - "bool":{ - "must":[ - { - "range":{ - "timestamp":{ - "gte":"{{startTime:now-24h}}", - "lte":"{{endTime:now}}", - "format":"epoch_millis" - } - } - } - ] - } - }, - "aggs": { - "2": { - "filters":{ - "filters":{ - "Enterprise":{ - "query":{ - "term":{ - "nuage_metadata.enterpriseName":"{{enterpriseName:chord_enterprise}}" - } - } - } - } - }, - "aggs": { - "SumOf": { - "sum": { - "field": "value" - } - }, - "EventType": { - "terms": { - "field": "type", - "size": 5, - "order": { - "SumOf": "desc" - } - }, - "aggs": { - "SumOf": { - "sum": { - "field": "value" - } - } - } - } - } - } - } - } - } -} diff --git a/public/configurations/visualizations/aar-domain-probe-path.json b/public/configurations/visualizations/aar-domain-probe-path.json deleted file mode 100644 index 04cb79c2..00000000 --- a/public/configurations/visualizations/aar-domain-probe-path.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "id": "aar-domain-probe-path", - "graph": "ChordGraph", - "title": "Path Performance Measurements", - "description": "Domain level top 10 NSG Path Performance Measurements. Computation: Count of NSGs with highest counts of probe records for the displayed time span.", - "author": "Ronak Shah and Curran Kelleher", - "creationDate": "11/02/2016", - "data": { - "chordSourceColumn": "snsg", - "chordDestinationColumn": "dnsg", - "colorColumn": "snsg" - }, - "listeners": [{ - "params": { - "snsg": "snsg", - "dnsg": "dnsg" - } - }], - "query": "aar-domain-probe-path" -} diff --git a/public/configurations/visualizations/aar-domain-probe-table-dest-to-src.json b/public/configurations/visualizations/aar-domain-probe-table-dest-to-src.json deleted file mode 100644 index b9312eb1..00000000 --- a/public/configurations/visualizations/aar-domain-probe-table-dest-to-src.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "id": "aar-domain-probe-table-dest-to-src", - "graph": "Table", - "title": "{{dnsg}} ({{toTitlePersonality}}) to {{snsg}} ({{fromTitlePersonality}}) Probe Detail", - "description": "Domain level, 10 most recent Path Performance Measurements from remote NSG or NSGUBR as source to local NSG or NSGUBR as destination. Computation: Order by time in descending order.", - "author": "Ronak Shah", - "creationDate": "11/02/2016", - "data": { - "columns": [ - { "column": "timestamp", "label": "Timestamp", "timeFormat": "%b %d, %y %X"}, - { "column": "SrcUplink", "label": "Source Uplink" }, - { "column": "DstUplink", "label": "Destination Uplink" }, - { "column": "UnderlayName", "label": "Underlay Name" }, - { "column": "PerfMonitor", "label": "Perf Monitor" }, - { "column": "AvgJitter", "label": "Avg Jitter", "format": ",.2f" }, - { "column": "AvgDelay", "label": "Avg Latency", "format": ",.2f" }, - { "column": "AvgPktLoss", "label": "Avg Pkt Loss", "format": ",.2f"} - ] - }, - "query": "aar-domain-probe-table-dest-to-src" -} diff --git a/public/configurations/visualizations/aar-domain-probe-table.json b/public/configurations/visualizations/aar-domain-probe-table.json deleted file mode 100644 index 7b5562a4..00000000 --- a/public/configurations/visualizations/aar-domain-probe-table.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "id": "aar-domain-probe-table", - "graph": "Table", - "title": "{{snsg}} ({{fromTitlePersonality}}) to {{dnsg}} ({{toTitlePersonality}}) Probe Detail", - "description": "Domain level, 10 most recent Path Performance Measurements from local NSG or NSGUBR as source to remote NSG or NSGUBR as destination. Computation: Order by time in descending order.", - "author": "Ronak Shah", - "creationDate": "11/02/2016", - "data": { - "columns": [ - { "column": "timestamp", "label": "Timestamp", "timeFormat": "%b %d, %y %X"}, - { "column": "SrcUplink", "label": "Source Uplink" }, - { "column": "DstUplink", "label": "Destination Uplink" }, - { "column": "UnderlayName", "label": "Underlay Name" }, - { "column": "PerfMonitor", "label": "Perf Monitor" }, - { "column": "AvgJitter", "label": "Avg Jitter", "format": ",.2f" }, - { "column": "AvgDelay", "label": "Avg Latency", "format": ",.2f" }, - { "column": "AvgPktLoss", "label": "Avg Pkt Loss", "format": ",.2f"} - ] - }, - "query": "aar-domain-probe-table" -} diff --git a/public/configurations/visualizations/aar-domain-top5-apmg.json b/public/configurations/visualizations/aar-domain-top5-apmg.json deleted file mode 100644 index 172f38a8..00000000 --- a/public/configurations/visualizations/aar-domain-top5-apmg.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "id": "aar-domain-top5-apmg", - "graph": "PieGraph", - "title": "Top 5 Application Groups (Mbps)", - "description": "Domain level top 5 Application Performance Management Groups. Computation: Sum of total Bytes sent and/or received in descending order.", - "author": "Ronak Shah", - "creationDate": "10/26/2016", - "data": { - "tooltip": [ - { "column": "APMGroup", "label": "APMGroup" }, - { "column": "Sum of MB", "label": "Total Bytes(MB)", "format": ",.2f"} - ], - "sliceColumn": "Sum of MB", - "labelColumn": "APMGroup", - "colorColumn": "APMGroup" - }, - "query": "aar-domain-top5-apmg" -} diff --git a/public/configurations/visualizations/aar-flow-sla-heatmap.json b/public/configurations/visualizations/aar-flow-sla-heatmap.json deleted file mode 100644 index cf95bc7a..00000000 --- a/public/configurations/visualizations/aar-flow-sla-heatmap.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "id": "aar-flow-sla-heatmap", - "graph": "HeatmapGraph", - "title": "Heatmap Chart Example", - "author": "Anil Chauhan", - "creationDate": "03/04/2017", - "data": { - "xColumn": "date_histo", - "xLabel": "Time", - "yColumn": "application", - "yTickGrid": false, - "yLabel": "Application", - "legendColumn": "slastatus", - "cellColumn": "slastatus", - "legend": { - "show": true, - "orientation": "horizontal", - "circleSize": 4, - "labelOffset": 2 - }, - "tooltip": [ - { "column": "date_histo", "label": "Timestamp", "timeFormat": "%b %d, %y %X"}, - { "column": "application", "label": "Application" }, - { "column": "slastatus", "label": "Status" } - ] - }, - "query": "aar-flow-sla-heatmap" -} diff --git a/public/configurations/visualizations/aar-nsg-app-from-nsg.json b/public/configurations/visualizations/aar-nsg-app-from-nsg.json deleted file mode 100644 index afbb4f7b..00000000 --- a/public/configurations/visualizations/aar-nsg-app-from-nsg.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "id": "aar-nsg-app-from-nsg", - "graph": "Table", - "title": "Application - From NSG", - "description": "This graph shows application usage per path between source and destination NSG. Computation: Sum of ingress Bytes in descending order", - "author": "Ronak Shah", - "creationDate": "10/13/2016", - "data": { - "columns": [ - { "column": "APMGroup", "label": "APM Group" }, - { "column": "Application", "label": "Application" }, - { "column": "L7Classification", "label": "L7 Classification" }, - { "column": "SrcVportName", "label": "Source Vport" }, - { "column": "SrcUplink", "label": "Source Uplink" }, - { "column": "SrcUplinkRole", "label": "Source Uplink Role" }, - { "column": "DestinationNSG", "label": "Destination NSG" }, - { "column": "SumofPackets", "label": "Total Packets", "format": ",.2s"}, - { "column": "SumofBytes", "label": "Total Bytes", "format": ",.2s" } - ] - }, - "query": "aar-nsg-app-from-nsg" -} diff --git a/public/configurations/visualizations/aar-nsg-app-linechart.json b/public/configurations/visualizations/aar-nsg-app-linechart.json deleted file mode 100644 index 3f00ce33..00000000 --- a/public/configurations/visualizations/aar-nsg-app-linechart.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "id": "aar-nsg-app-linechart", - "graph": "LineGraph", - "title": "Top 5 Discovered Applications Usage Over Time", - "description": "NSG level discovered application total bytes usage over time. Layer-7 Classification includes discovered applications including Common Name in TLS certificates when available.Computation: Sum of total Bytes sent and/or received for a given interval displayed over the configured time span. Possible values are: If time span = Last 15 minutes: interval is 1 minute, If time span = Last 24 hours: interval is 1 hour, If time span = Last 7 days: interval is 12 hours", - "author": "Ronak Shah", - "creationDate": "11/07/2016", - "data": { - "xColumn": "ts", - "yColumn": "SumOf", - "yTickFormat": ".2s", - "xLabel": "Time", - "yLabel": "{{metric:Total Bytes}}", - "stroke": { - "color": "#f76159", - "width": "2px" - }, - "colors": [ - "#6b94ec", - "#e78ac3", - "#f9b13d", - "#b3d645", - "#ffd92f", - "#aa97f2", - "#f76159", - "#d9d9d9" - ], - "tooltip": [ - { "column": "L7Classification" } - ], - "linesColumn": "L7Classification" - }, - "filterOptions": { - "Metric": { - "parameter": "metric", - "default": "TotalBytesCount", - "options": [ - { - "label": "Total Bytes", - "value": "TotalBytesCount", - "default": true - }, - { - "label": "Total Packets", - "value": "TotalPacketsCount" - } - ] - } - }, - "query": "aar-nsg-app-linechart" -} diff --git a/public/configurations/visualizations/aar-nsg-app-to-nsg.json b/public/configurations/visualizations/aar-nsg-app-to-nsg.json deleted file mode 100644 index 5500112b..00000000 --- a/public/configurations/visualizations/aar-nsg-app-to-nsg.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "id": "aar-nsg-app-to-nsg", - "graph": "Table", - "title": "Application - To NSG", - "description": "NSG level report of applications connected to remote NSGs sending traffic to local (this) NSG. Computation: Sum of ingress Bytes in descending order.", - "author": "Ronak Shah", - "creationDate": "11/07/2016", - "data": { - "columns": [ - { "column": "APMGroup", "label": "APM Group" }, - { "column": "Application", "label": "Application" }, - { "column": "L7Classification", "label": "L7 Classification" }, - { "column": "DestVportName", "label": "Destination Vport" }, - { "column": "DstUplink", "label": "Destination Uplink" }, - { "column": "DstUplinkRole", "label": "Destination Uplink Role" }, - { "column": "DestinationNSG", "label": "Destination NSG" }, - { "column": "SumofPackets", "label": "Total Packets", "format": ",.2s"}, - { "column": "SumofBytes", "label": "Total Bytes", "format": ",.2s" } - ] - }, - "query": "aar-nsg-app-to-nsg" -} diff --git a/public/configurations/visualizations/aar-nsg-gauge-chart.json b/public/configurations/visualizations/aar-nsg-gauge-chart.json deleted file mode 100644 index 15d717b7..00000000 --- a/public/configurations/visualizations/aar-nsg-gauge-chart.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "id": "aar-nsg-gauge-chart", - "graph": "GaugeGraph", - "title": "Gauge Chart Example", - "author": "Anil Chauhan", - "creationDate": "07/04/2017", - "data": { - "maxValue": "100", - "currentValue": "10", - "gauzeTicks": "10" - }, - "query": "aar-flow-sla-heatmap" -} diff --git a/public/configurations/visualizations/aar-nsg-line-chart.json b/public/configurations/visualizations/aar-nsg-line-chart.json deleted file mode 100644 index 1fa3fa5e..00000000 --- a/public/configurations/visualizations/aar-nsg-line-chart.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "id": "aar-nsg-line-chart", - "graph": "LineGraph", - "title": "Multi-Line Chart Example", - "author": "Curran Kelleher", - "creationDate": "11/08/2016", - "data": { - "xColumn": "ts", - "xLabel": "Time", - "yColumn": "SumOf", - "yLabel": "Total MB", - "yTicks": 5, - "linesColumn": "L7Classification" - }, - "query": "aar-nsg-app-linechart" -} diff --git a/public/configurations/visualizations/aar-nsg-sla-from-nsg.json b/public/configurations/visualizations/aar-nsg-sla-from-nsg.json deleted file mode 100644 index c6aff5b0..00000000 --- a/public/configurations/visualizations/aar-nsg-sla-from-nsg.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "id": "aar-nsg-sla-from-nsg", - "graph": "Table", - "title": "SLA - From NSG", - "description": "All SLA violation during the last time interval, that caused a path from this NSG to switch. Computation: Ordered by time in descending order.", - "author": "Ronak Shah", - "creationDate": "11/08/2016", - "data": { - "columns": [ - { "column": "ts", "label": "Timestamp", "timeFormat": "%b %d, %y %X"}, - { "column": "DestinationNSG", "label": "Destination NSG" }, - { "column": "Application", "label": "Application" }, - { "column": "APMGroup", "label": "APM Group" }, - { "column": "ViolationType", "label": "Violation Type" } - ] - }, - "query": "aar-nsg-sla-from-nsg" -} diff --git a/public/configurations/visualizations/aar-nsg-sla-to-nsg.json b/public/configurations/visualizations/aar-nsg-sla-to-nsg.json deleted file mode 100644 index d491989b..00000000 --- a/public/configurations/visualizations/aar-nsg-sla-to-nsg.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "id": "aar-nsg-sla-to-nsg", - "graph": "Table", - "title": "SLA - To NSG", - "description": "All SLA violation during the last time interval, that caused a path from this NSG to switch. Computation: Ordered by time in descending order.", - "author": "Ronak Shah", - "creationDate": "11/08/2016", - "data": { - "columns": [ - { "column": "ts", "label": "Timestamp", "timeFormat": "%b %d, %y %X"}, - { "column": "SourceNSG", "label": "Source NSG" }, - { "column": "Application", "label": "Application" }, - { "column": "APMGroup", "label": "APM Group" }, - { "column": "ViolationType", "label": "Violation Type" } - ] - }, - "query": "aar-nsg-sla-to-nsg" -} diff --git a/public/configurations/visualizations/aar-nsg-top10-app.json b/public/configurations/visualizations/aar-nsg-top10-app.json deleted file mode 100644 index 38c777bb..00000000 --- a/public/configurations/visualizations/aar-nsg-top10-app.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "id": "aar-nsg-top10-app", - "graph": "PieGraph", - "title": "Top 10 Applications", - "description": "NSG level top 10 applications. Computation: Sum of total Bytes sent and/or received in descending order.", - "author": "Ronak Shah", - "creationDate": "10/26/2016", - "data": { - "sliceColumn": "Sum of MB", - "labelColumn": "Application", - "pieInnerRadius": 0.5, - "tooltip": [ - { "column": "Application", "label": "Application" }, - { "column": "Sum of MB", "label": "Total MB", "format": ",.2f"} - ] - }, - "query": "aar-nsg-top10-app" -} diff --git a/public/configurations/visualizations/aar-nsg-top5-talkers-download.json b/public/configurations/visualizations/aar-nsg-top5-talkers-download.json deleted file mode 100644 index 0b0373d6..00000000 --- a/public/configurations/visualizations/aar-nsg-top5-talkers-download.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "id": "aar-nsg-top5-talkers-download", - "graph": "Table", - "title": "Top 5 Users (Download)", - "description": "NSG level top 5 users (IP addresses) receiving traffic from the network. Computation: Sum of egress Bytes for any traffic destined to this client IP in descending order.", - "author": "Ronak Shah", - "creationDate": "10/26/2016", - "data": { - "columns": [ - { "column": "DestinationIP", "label": "Client IP" }, - { "column": "DomainName", "label": "Domain" }, - { "column": "Packets", "label": "Packets", "format": ",.2s" }, - { "column": "Bytes", "label": "Bytes", "format": ",.2s" } - ] - }, - "query": "aar-nsg-top5-talkers-download" -} diff --git a/public/configurations/visualizations/aar-nsg-top5-talkers-upload.json b/public/configurations/visualizations/aar-nsg-top5-talkers-upload.json deleted file mode 100644 index 36869ee6..00000000 --- a/public/configurations/visualizations/aar-nsg-top5-talkers-upload.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "id": "aar-nsg-top5-talkers-upload", - "graph": "Table", - "title": "Top 5 Users (Upload)", - "description": "NSG level top 5 users (IP addresses) sending traffic to the network. Computation: Sum of ingress Bytes sourced from this client IP to any destination in descending order.", - "author": "Ronak Shah", - "creationDate": "10/26/2016", - "data": { - "columns": [ - { "column": "SourceIP", "label": "Client IP" }, - { "column": "DomainName", "label": "Domain" }, - { "column": "Packets", "label": "Packets", "format": ",.2s" }, - { "column": "Bytes", "label": "Bytes", "format": ",.2s" } - ] - }, - "query": "aar-nsg-top5-talkers-upload" -} diff --git a/public/configurations/visualizations/aar-slastatus-enterprise.json b/public/configurations/visualizations/aar-slastatus-enterprise.json deleted file mode 100644 index 5d81a81a..00000000 --- a/public/configurations/visualizations/aar-slastatus-enterprise.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "id": "aar-slastatus-enterprise", - "graph": "PieGraph", - "title": "SLA Status", - "description": "Enterprise level representation of Application SLA status. Computation: Possible values are: In SLA, Out of SLA and/or Not monitored.", - "author": "Ronak Shah", - "creationDate": "10/19/2016", - "data": { - "sliceColumn": "doc_count", - "labelColumn": "slastatus", - "tooltip": [ - { "column": "slastatus", "label": "SLA Status" }, - { "column": "doc_count", "label": "Count", "format": ",.2s"} - ] - }, - "query": "aar-slastatus-enterprise" -} diff --git a/public/configurations/visualizations/app-specific-date-histogram.json b/public/configurations/visualizations/app-specific-date-histogram.json deleted file mode 100644 index 83c4b509..00000000 --- a/public/configurations/visualizations/app-specific-date-histogram.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "id": "app-specific-date-histogram", - "graph": "BarGraph", - "title": "L7Classification ({{app}}) Date Histogram", - "description": "Bandwidth usage per application across domains. Layer-7 Classification includes discovered applications including Common Name in TLS certificates when available. Computation: Sum of total Bytes sent and/or received for a given interval displayed over the configured timespan. Possible values are: If time span = Last 15 minutes: interval is 1 minute, If time span = Last 24 hours: interval is 1 hour, If time span = Last 7 days: interval is 12 hours", - "author": "Curran Kelleher", - "creationDate": "10/14/2016", - "data": { - "dateHistogram": true, - "interval": "30m", - "xColumn": "date-histo", - "yColumn": "SumOfBytes", - "yTickFormat": ".2s", - "colorColumn": "date-histo", - "xLabel": "Time", - "yLabel": "Total Bytes" - }, - "query": "app-specific-vertical-bar" -} diff --git a/public/configurations/visualizations/app-specific-line-chart.json b/public/configurations/visualizations/app-specific-line-chart.json deleted file mode 100644 index 3a12effc..00000000 --- a/public/configurations/visualizations/app-specific-line-chart.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "id": "app-specific-line-chart", - "graph": "LineGraph", - "title": "App-specific Line Chart", - "author": "Curran Kelleher", - "creationDate": "10/14/2016", - "data": { - "xColumn": "key", - "yColumn": "1", - "colorColumn": "key" - }, - "query": "app-specific-vertical-bar" -} diff --git a/public/configurations/visualizations/effective-score.json b/public/configurations/visualizations/effective-score.json deleted file mode 100644 index b0f5267a..00000000 --- a/public/configurations/visualizations/effective-score.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "id": "effective-score", - "graph": "SimpleTextGraph", - "title": "Effective Score", - "author": "Christophe SERAFIN", - "creationDate": "11/01/2016", - "script": "effective-score", - "data": { - "circle": true, - "circleColor": "#4097FF", - "targetedColumn": "name" - } -} diff --git a/public/configurations/visualizations/newly-discovered-applications-with-circle.json b/public/configurations/visualizations/newly-discovered-applications-with-circle.json deleted file mode 100644 index 85292d5c..00000000 --- a/public/configurations/visualizations/newly-discovered-applications-with-circle.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "id": "newly-discovered-applications", - "title": "Newly Discovered Applications", - "query": "newly-discovered-applications", - "graph": "SimpleTextGraph", - "data": { - "circle": true, - "circleColor": "#4097FF" - }, - "listeners": [{ - "redirect": "/dashboards/appsOverview" - }] -} diff --git a/public/configurations/visualizations/newly-discovered-applications.json b/public/configurations/visualizations/newly-discovered-applications.json deleted file mode 100644 index ccb71cdc..00000000 --- a/public/configurations/visualizations/newly-discovered-applications.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "id": "newly-discovered-applications", - "title": "Newly Discovered Default Applications", - "query": "aar-default-app-l7", - "graph": "SimpleTextGraph", - "data": { - "targetedColumn":"value" - } -} diff --git a/public/configurations/visualizations/number-of-apm-groups.json b/public/configurations/visualizations/number-of-apm-groups.json deleted file mode 100644 index 738617d4..00000000 --- a/public/configurations/visualizations/number-of-apm-groups.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "id": "number-of-apm-groups", - "title": "APM Groups", - "query": "number-of-apm-groups", - "graph": "SimpleTextGraph", - "showTitleBar": false, - "data": { - "borderRadius": "0", - "titlePosition": "bottom", - "textAlign": "center", - "margin": { - "top": "10px", - "bottom": "0", - "left": "auto", - "right": "auto" - }, - "padding": { - "top": "0", - "bottom": "0", - "left": "5px", - "right": "5px" - }, - "fontSize": "4em", - "fontColor": "#6b6b6b", - "innerWidth": 1, - "innerHeight": 0.6, - "colors": [ - "#ffffff" - ] - } -} diff --git a/public/configurations/visualizations/number-of-applications.json b/public/configurations/visualizations/number-of-applications.json deleted file mode 100644 index 846c7f93..00000000 --- a/public/configurations/visualizations/number-of-applications.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "id": "number-of-applications", - "title": "Applications", - "query": "number-of-applications", - "graph": "SimpleTextGraph", - "showTitleBar": false, - "data": { - "borderRadius": "0", - "titlePosition": "bottom", - "textAlign": "center", - "margin": { - "top": "10px", - "bottom": "0", - "left": "auto", - "right": "auto" - }, - "padding": { - "top": "0", - "bottom": "0", - "left": "5px", - "right": "5px" - }, - "fontSize": "4em", - "fontColor": "#6b6b6b", - "innerWidth": 1, - "innerHeight": 0.6, - "colors": [ - "#ffffff" - ] - } -} diff --git a/public/configurations/visualizations/number-of-npms.json b/public/configurations/visualizations/number-of-npms.json deleted file mode 100644 index 6655f6cc..00000000 --- a/public/configurations/visualizations/number-of-npms.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "id": "number-of-npms", - "title": "NPMs", - "query": "number-of-npms", - "graph": "SimpleTextGraph", - "showTitleBar": false, - "data": { - "borderRadius": "0", - "titlePosition": "bottom", - "textAlign": "center", - "margin": { - "top": "10px", - "bottom": "0", - "left": "auto", - "right": "auto" - }, - "padding": { - "top": "0", - "bottom": "0", - "left": "5px", - "right": "5px" - }, - "fontSize": "4em", - "fontColor": "#6b6b6b", - "innerWidth": 1, - "innerHeight": 0.6, - "colors": [ - "#ffffff" - ] - } -} diff --git a/public/configurations/visualizations/number-of-performance-monitors.json b/public/configurations/visualizations/number-of-performance-monitors.json deleted file mode 100644 index 6a30733f..00000000 --- a/public/configurations/visualizations/number-of-performance-monitors.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "id": "number-of-performance-monitors", - "title": "Performance Monitors", - "query": "number-of-performance-monitors", - "graph": "SimpleTextGraph", - "showTitleBar": false, - "data": { - "borderRadius": "0", - "titlePosition": "bottom", - "textAlign": "center", - "margin": { - "top": "10px", - "bottom": "0", - "left": "auto", - "right": "auto" - }, - "padding": { - "top": "0", - "bottom": "0", - "left": "5px", - "right": "5px" - }, - "fontSize": "4em", - "fontColor": "#6b6b6b", - "innerWidth": 1, - "innerHeight": 0.6, - "colors": [ - "#ffffff" - ] - } -} diff --git a/public/configurations/visualizations/top20-talkers-domain.json b/public/configurations/visualizations/top20-talkers-domain.json deleted file mode 100644 index 20361a2d..00000000 --- a/public/configurations/visualizations/top20-talkers-domain.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "id": "top20-talkers-domain", - "graph": "Table", - "title": "Top 20 Talkers", - "description": "Domain level top 20 discovered and configured applications. Computation: Sum of total Bytes sent and/or received in descending order.", - "author": "Ronak Shah", - "creationDate": "10/14/2016", - "data": { - "columns": [ - { "column": "Application", "label": "Application" }, - { "column": "L7Classification", "label": "L7-Classification" }, - { "column": "SrcVportName", "label": "Source Vport-Name"}, - { "column": "SourceNSG", "label": "Source-NSG"}, - { "column": "DestinationNSG", "label": ""}, - { "column": "1", "label": "Total Bytes", "format": ",.2s" }, - { "column": "11", "label": "Total Packets", "format": ",.2s" } - ] - }, - "listeners": [ - { - "redirect": "/dashboards/aarNSGDetail", - "params": { - "snsg": "SourceNSG" - } - }], - "listeners": [ - { - "redirect": "/dashboards/aarNSGDetail", - "params": { - "snsg": "DestinationNSG" - } - }], - "query": "top20-talkers-domain-table" -} diff --git a/public/configurations/visualizations/top20-talkers-enterprise-defaultapp.json b/public/configurations/visualizations/top20-talkers-enterprise-defaultapp.json deleted file mode 100644 index 6df41475..00000000 --- a/public/configurations/visualizations/top20-talkers-enterprise-defaultapp.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "id": "top20-talkers-enterprise-defaultapp-table", - "graph": "Table", - "title": "Top 20 Discovered Applications (Default Application Group)", - "description": "Enterprise level top 20 discovered applications. Layer-7 Classification includes discovered applications including Common Name in TLS certificates when available. Computation: Sum of total Bytes sent and/or received in descending order. Click on a row to load the date histogram for this application.", - "author": "Ronak Shah", - "creationDate": "10/14/2016", - "data": { - "columns": [ - { "column": "DomainName", "label": "Domain"}, - { "column": "L7Classification", "label": "L7 Classification" }, - { "column": "1", "label": "Total Bytes", "format": ",.2s" } - ] - }, - "listeners": [ - { - "params": { - "app": "L7Classification" - } - }], - - "query": "top20-talkers-enterprise-defaultapp-table" -} diff --git a/public/configurations/visualizations/top20-talkers-enterprise.json b/public/configurations/visualizations/top20-talkers-enterprise.json deleted file mode 100644 index 34a528d4..00000000 --- a/public/configurations/visualizations/top20-talkers-enterprise.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "id": "top20-talkers-enterprise", - "graph": "Table", - "title": "Top 20 Applications", - "description": "Enterprise level top 20 applications. Layer-7 Classification includes discovered applications including Common Name in TLS certificates when available. Computation: Sum of total Bytes sent and/or received in descending order. Click on a row to load the date histogram for this application.", - "author": "Ronak Shah", - "creationDate": "10/14/2016", - "data": { - "columns": [ - { "column": "Application", "label": "Application" }, - { "column": "APMGroup", "label": "APM-Group" }, - { "column": "DomainName", "label": "Domain"}, - { "column": "L7Classification", "label": "L7 Classification" }, - { "column": "1", "label": "Total Bytes", "format": ",.2s" } - ] - }, - "listeners": [ - { - "params": { - "app": "L7Classification" - } - }], - - "query": "top20-talkers-enterprise-table" -} diff --git a/public/configurations/visualizations/top5-app-donut.json b/public/configurations/visualizations/top5-app-donut.json deleted file mode 100644 index a159bc9e..00000000 --- a/public/configurations/visualizations/top5-app-donut.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "id": "top5-app-donut", - "graph": "PieGraph", - "title": "Top 5 Apps Donut", - "author": "Curran Kelleher", - "creationDate": "10/19/2016", - "refreshInterval": 10000, - "data": { - "sliceColumn": "Sum of MB", - "labelColumn": "L7Classification", - "pieInnerRadius": 0.5 - }, - "query": "top5-app-vertical-bar" -} diff --git a/public/configurations/visualizations/top5-app-horizontal-bar.json b/public/configurations/visualizations/top5-app-horizontal-bar.json deleted file mode 100644 index 5c2e6e59..00000000 --- a/public/configurations/visualizations/top5-app-horizontal-bar.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "id": "top5-app-vertical-bar", - "graph": "BarGraph", - "title": "Top 5 Apps", - "description": "This graph will show something that is really useful for administrators", - "author": "Curran Kelleher", - "creationDate": "10/13/2016", - "data": { - "xColumn": "Sum of MB", - "yColumn": "L7Classification", - "orientation": "horizontal", - "colors": [ - "#7da3f7", - "#fec26a", - "#e78ac3", - "#f79e99" - ], - "xTicks": 5, - "xTickGrid": true, - "yTickGrid": false - }, - "query": "top5-app-vertical-bar" -} diff --git a/public/configurations/visualizations/top5-app-pie.json b/public/configurations/visualizations/top5-app-pie.json deleted file mode 100644 index 03eb97de..00000000 --- a/public/configurations/visualizations/top5-app-pie.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "id": "top5-app-pie", - "graph": "PieGraph", - "title": "Top 5 Apps Pie", - "author": "Curran Kelleher", - "creationDate": "10/19/2016", - "data": { - "sliceColumn": "Sum of MB", - "labelColumn": "L7Classification", - "tooltip": [ - { "column": "L7Classification", "label": "L7 Classification" }, - { "column": "Sum of MB", "format": ",.1f"} - ], - "percentages": true, - "percentagesFormat": ",.1%", - "pieLabelRadius": 0.55, - "pieOuterRadius": 0.95, - "legend": { - "show": true, - "orientation": "horizontal", - "circleSize": 4, - "labelOffset": 2 - } - }, - "listeners": [{ - "redirect": "/dashboards/dateHistogramExample", - "params": { - "app": "L7Classification" - } - }], - "query": "top5-app-vertical-bar" -} diff --git a/public/configurations/visualizations/top5-app-table.json b/public/configurations/visualizations/top5-app-table.json deleted file mode 100644 index 0164b939..00000000 --- a/public/configurations/visualizations/top5-app-table.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "id": "top5-app-table", - "graph": "Table", - "title": "Top 5 Apps", - "author": "Curran Kelleher", - "creationDate": "10/10/2016", - "data": { - "columns": [ - { "column": "L7Classification", "label": "L7Classification" }, - { "column": "Sum of MB" }, - { "column": "doc_count", "label": "Document Count", "format": ",.2f" } - ] - }, - "listeners": [{ - "redirect": "/dashboards/dateHistogramExample", - "params": { - "app": "Application" - } - }], - "query": "top5-app-vertical-bar" -} diff --git a/public/configurations/visualizations/top5-app-vertical-bar-domain.json b/public/configurations/visualizations/top5-app-vertical-bar-domain.json deleted file mode 100644 index 5923b2dd..00000000 --- a/public/configurations/visualizations/top5-app-vertical-bar-domain.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "id": "top5-app-vertical-bar-domain", - "graph": "BarGraph", - "title": "Top 5 Defined Applications", - "description": "Domain level top 5 defined applications. Computation: Sum of total Bytes sent and/or received in descending order.", - "author": "Ronak Shah", - "creationDate": "10/14/2016", - "data": { - "colors": [ - "#7da3f7", - "#fec26a", - "#e78ac3", - "#f79e99", - "#b3d645" - ], - "tooltip": [ - { "column": "Application", "label": "Application" }, - { "column": "SumofBytes", "label": "Total Bytes", "format": ",.2s"} - ], - "xLabel": "Application", - "yLabel": "Total Bytes", - "yTickFormat": ".2s", - "xColumn": "Application", - "yColumn": "SumofBytes" - }, - "query": "top5-app-vertical-bar-domain" -} diff --git a/public/configurations/visualizations/top5-app-vertical-bar.json b/public/configurations/visualizations/top5-app-vertical-bar.json deleted file mode 100644 index 3da7b32b..00000000 --- a/public/configurations/visualizations/top5-app-vertical-bar.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "id": "top5-app-vertical-bar", - "graph": "BarGraph", - "title": "Top 5 Discovered Applications", - "description": "Enterprise level top 5 discovered applications. Computation: Sum of total Bytes sent and/or received in descending order across all domains.", - "author": "Curran Kelleher", - "creationDate": "10/13/2016", - "data": { - "xColumn": "L7Classification", - "xLabel": "Application", - "yColumn": "Sum of MB", - "yLabel": "Total Bytes", - "yTicks": 5, - "yTickFormat": ".2s", - "colors": [ - "#7da3f7", - "#b3d645", - "#fec26a", - "#e78ac3", - "#f79e99" - ], - "tooltip": [ - { "column": "L7Classification", "label": "L7 Signature" }, - { "column": "Sum of MB", "format": ",.2s"} - ] - }, - "listeners": [ - { - "redirect": "/dashboards/aarEnterpriseDetail", - "params": { - "app": "L7Classification" - } - } - ], - "query": "top5-app-vertical-bar" -} diff --git a/public/configurations/visualizations/top5-download-users-table.json b/public/configurations/visualizations/top5-download-users-table.json deleted file mode 100644 index 467127b2..00000000 --- a/public/configurations/visualizations/top5-download-users-table.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "id": "top5-download-users-table", - "graph": "Table", - "title": "Top 5 Download Users", - "description": "Enterprise level top 5 download users (IP addresses). Computation: Sum of Egress Bytes for any traffic destined to this Client IP in descending order.", - "author": "Ronak Shah", - "creationDate": "10/13/2016", - "data": { - "columns": [ - { "column": "DstIP", "label": "Client IP" }, - { "column": "DestinationNSG", "label": "NSG" }, - { "column": "DomainName", "label": "Domain" }, - { "column": "EgressPackets", "label": "Packets", "format": ",.2s"}, - { "column": "EgressBytes", "label": "Bytes", "format": ",.2s" } - ] - }, - "query": "top5-download-users-table" -} diff --git a/public/configurations/visualizations/top5-upload-users-table.json b/public/configurations/visualizations/top5-upload-users-table.json deleted file mode 100644 index 88decda4..00000000 --- a/public/configurations/visualizations/top5-upload-users-table.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "id": "top5-upload-users-table", - "graph": "Table", - "title": "Top 5 Upload Users", - "description": "Enterprise level top 5 upload users (IP addresses) across domains. Computation: Sum of Ingress Bytes sourced from IP to any destination in descending order.", - "author": "Ronak Shah", - "creationDate": "10/13/2016", - "data": { - "columns": [ - { "column": "SourceIP", "label": "Client IP" }, - { "column": "SourceNSG", "label": "NSG" }, - { "column": "DomainName", "label": "Domain" }, - { "column": "IngressPackets", "label": "Packets", "format": ",.2s"}, - { "column": "IngressBytes", "label": "Bytes", "format": ",.2s" } - ] - }, - "query": "top5-upload-users-table" -} diff --git a/public/configurations/visualizations/top5-users-table.json b/public/configurations/visualizations/top5-users-table.json deleted file mode 100644 index c06dcb23..00000000 --- a/public/configurations/visualizations/top5-users-table.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "id": "top5-users-table", - "graph": "Table", - "title": "Top 5 Users", - "description": "Enterprise level top 5 users (IP addresses). Computation: Sum of total Bytes sent and/or received in descending order.", - "author": "Ronak Shah", - "creationDate": "10/13/2016", - "data": { - "columns": [ - { "column": "SourceIP", "label": "Source IP" }, - { "column": "SourceNSG", "label": "Source NSG" }, - { "column": "TotalPacketsCount", "label": "Total Packets", "format": ",.2s"}, - { "column": "TotalBytesCount", "label": "Total Bytes", "format": ",.2s" } - ] - }, - "query": "top5-users-table" -} diff --git a/public/configurations/visualizations/vnf-cpu-status.json b/public/configurations/visualizations/vnf-cpu-status.json deleted file mode 100644 index 803a09db..00000000 --- a/public/configurations/visualizations/vnf-cpu-status.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "id": "vnf-cpu-status", - "graph": "GaugeGraph", - "title": "CPU utilization", - "description": "CPU utilization for approx last 5 min", - "author": "Ronak Shah", - "creationDate": "04/13/2017", - "data": { - "maxValue": "100", - "currentColumn": "cpu", - "gauzeTicks": "10" - }, - "query": "vnf-status" -} diff --git a/public/configurations/visualizations/vnf-disk-status.json b/public/configurations/visualizations/vnf-disk-status.json deleted file mode 100644 index 76597bfe..00000000 --- a/public/configurations/visualizations/vnf-disk-status.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "id": "vnf-disk-status", - "graph": "GaugeGraph", - "title": "Disk utilization", - "description": "Latest disk utilization recorded", - "author": "Ronak Shah", - "creationDate": "04/13/2017", - "data": { - "maxValue": "100", - "currentColumn": "disk", - "gauzeTicks": "10" - }, - "query": "vnf-status" -} diff --git a/public/configurations/visualizations/vnf-memory-status.json b/public/configurations/visualizations/vnf-memory-status.json deleted file mode 100644 index 75918122..00000000 --- a/public/configurations/visualizations/vnf-memory-status.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "id": "vnf-memory-status", - "graph": "GaugeGraph", - "title": "Memory utilization", - "description": "Latest memory utilization recorded", - "author": "Ronak Shah", - "creationDate": "04/13/2017", - "data": { - "maxValue": "100", - "currentColumn": "memory", - "gauzeTicks": "10", - "gaugeCtrSuffix": "" - }, - "query": "vnf-status" -} diff --git a/public/configurations/visualizations/vnf-status-linechart.json b/public/configurations/visualizations/vnf-status-linechart.json deleted file mode 100644 index 89966c03..00000000 --- a/public/configurations/visualizations/vnf-status-linechart.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "id": "vnf-status-linechart", - "graph": "MultiLineGraph", - "title": "VNF Utilization vs time", - "description": "Memory, disk and CPU utilization over a period of time", - "author": "Ronak Shah", - "creationDate": "11/08/2016", - "data": { - "xColumn": "ts", - "xLabel": "Time", - "yColumn": ["CPU", "MEMORY", "DISK"], - "yTickFormat": ",.0f", - "yLabel": "", - "yTicks": 5, - "linesColumn": ["CPU", "MEMORY", "DISK"], - "legend": { - "orientation": "vertical", - "show": true, - "circleSize": 5, - "labelOffset": 5 - }, - "tooltip": [ - { "column": "columnType", "label": "Type"}, - { "column": "yColumn", "label": "Value", "format": "0.2f"}, - { "column": "ts", "label": "Timestamp"} - ] - }, - "query": "vnf-status-linechart" -} diff --git a/public/configurations/visualizations/vsd-from-nsgs-table.json b/public/configurations/visualizations/vsd-from-nsgs-table.json deleted file mode 100644 index d5a70b73..00000000 --- a/public/configurations/visualizations/vsd-from-nsgs-table.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "id": "vsd-from-nsgs-table", - "graph": "Table", - "title": "From {{fromTitlePersonality}}", - "author": "Christophe SERAFIN", - "creationDate": "23/01/2016", - "data": { - "columns": [ - { "column": "ID"}, - { "column": "name" } - ] - }, - "listeners": [{ - "params": { - "snsg": "name", - "sPersonality": "personality" - } - }], - "filterOptions": { - "Personality": { - "parameter": "fromPersonality", - "default": "NSG", - "options": [ - { - "label": "NSG", - "value": "NSG", - "forceOptions": { - "fromTitlePersonality": "NSG" - } - }, - { - "label": "NSG-BR", - "value": "NSGBR", - "forceOptions": { - "fromTitlePersonality": "NSG-BR" - } - }, - { - "label": "NSG-UBR", - "value": "NSGDUC", - "forceOptions": { - "fromTitlePersonality": "NSG-UBR" - } - } - ] - } - }, - "query": "vsd-from-nsgs-list" -} diff --git a/public/configurations/visualizations/vsd-to-nsgs-table.json b/public/configurations/visualizations/vsd-to-nsgs-table.json deleted file mode 100644 index 85e6608a..00000000 --- a/public/configurations/visualizations/vsd-to-nsgs-table.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "id": "vsd-to-nsgs-table", - "graph": "Table", - "title": "To {{toTitlePersonality}}", - "author": "Christophe SERAFIN", - "creationDate": "23/01/2016", - "data": { - "columns": [ - { "column": "ID"}, - { "column": "name" } - ] - }, - "listeners": [{ - "params": { - "dnsg": "name", - "dPersonality": "personality" - } - }], - "filterOptions": { - "Personality": { - "parameter": "toPersonality", - "default": "NSG", - "options": [ - { - "label": "NSG", - "value": "NSG", - "forceOptions": { - "toTitlePersonality": "NSG" - } - }, - { - "label": "NSG-BR", - "value": "NSGBR", - "forceOptions": { - "toTitlePersonality": "NSG-BR" - } - }, - { - "label": "NSG-UBR", - "value": "NSGDUC", - "forceOptions": { - "toTitlePersonality": "NSG-UBR" - } - } - ] - } - }, - "query": "vsd-to-nsgs-list" -} diff --git a/public/configurations/visualizations/vss-domain-acl-dpg.json b/public/configurations/visualizations/vss-domain-acl-dpg.json deleted file mode 100644 index 5f9a6197..00000000 --- a/public/configurations/visualizations/vss-domain-acl-dpg.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "id": "vss-domain-acl-dpg", - "graph": "BarGraph", - "title": "ACL Hits by Destination Policy Groups - {{actionType:DENY}}", - "description": "This barchart represents top 5 destination policygroups per ACL hits for a given period of time. By default its aggregated on deny hits count. One can select other ACL actions i.e from the drop down menu on this dashboard.", - "author": "Ronak Shah", - "creationDate": "10/18/2016", - "data": { - "xColumn": "dpg", - "yColumn": "SumOf", - "colors": [ - "#fec26a" - ], - "tooltip": [ - { "column": "dpg", "label": "PG" }, - { "column": "SumOf", "label": "ACL Hits", "format": ",.1f"} - ], - "xTickGrid": false, - "yTickGrid": true, - "yTickFormat": ".2s", - "xLabel": "Destination Policy Groups", - "yLabel": "Total # of ACL Hits" - }, - "query": "vss-domain-acl-dpg" -} diff --git a/public/configurations/visualizations/vss-domain-acl-spg.json b/public/configurations/visualizations/vss-domain-acl-spg.json deleted file mode 100644 index 1e407e26..00000000 --- a/public/configurations/visualizations/vss-domain-acl-spg.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "id": "vss-domain-acl-spg", - "graph": "BarGraph", - "title": "ACL Hits by Source Policy Group - {{actionType:DENY}}", - "description": "This horizontal barchart represents top 5 source policygroups per ACL hits for a given period of time. By default its aggregated on deny hits count. One can select other ACL actions i.e from the drop down menu on this dashboard.", - "author": "Ronak Shah", - "creationDate": "10/18/2016", - "data": { - "xColumn": "SumOf", - "yColumn": "spg", - "orientation": "horizontal", - "tooltip": [ - { "column": "spg", "label": "PG" }, - { "column": "SumOf", "label": "ACL Hits", "format": ",.1f"} - ], - "xTickGrid": true, - "yTickGrid": false, - "xTickFormat": ".2s", - "xLabel": "Total # of ACL Hits", - "yLabel": "Source Policy Groups" - }, - "query": "vss-domain-acl-spg" -} diff --git a/public/configurations/visualizations/vss-domain-acl-time.json b/public/configurations/visualizations/vss-domain-acl-time.json deleted file mode 100644 index a0a73e27..00000000 --- a/public/configurations/visualizations/vss-domain-acl-time.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "id": "vss-domain-acl-time", - "graph": "LineGraph", - "title": "ACL Hits vs Time - {{actionType:DENY}}", - "description": "This line graph represents total no of ACL deny received for this domain over a period of specified time. By default it shows ACL Deny hits. One can select other ACL actions i.e from the drop down menu on this dashboard.", - "author": "Ronak Shah", - "creationDate": "10/18/2016", - "data": { - "xColumn": "timestamp", - "yColumn": "SumOf", - "stroke": { - "color": "#f76159", - "width": "2px" - }, - "xTickGrid": false, - "yTickGrid": true, - "yTickFormat": ".2s", - "xLabel": "Time", - "yLabel": "Total # ACL Hits", - "xColumn": "timestamp", - "yColumn": "SumOf", - "brushEnabled": false - }, - "query": "vss-domain-acl-time" -} diff --git a/public/configurations/visualizations/vss-domain-acl-top5.json b/public/configurations/visualizations/vss-domain-acl-top5.json deleted file mode 100644 index b4ef2992..00000000 --- a/public/configurations/visualizations/vss-domain-acl-top5.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "id": "vss-domain-acl-top5", - "graph": "Table", - "title": "Top 5 ACL by # hits", - "description": "Top 5 ACL by # of hits in this domain", - "author": "Ronak Shah", - "creationDate": "11/29/2016", - "data": { - "columns": [ - { "column": "top-acls", "label": "ACL ID" }, - { "column": "top-acl-hits.sort", "label": "# Packets" }, - { "column": "top-acl-hits.type", "label": "Type" }, - { "column": "top-acl-hits.protocol", "label": "Protocol" }, - { "column": "top-acl-hits.sourceport", "label": "Source Port" }, - { "column": "top-acl-hits.destinationport", "label": "Dest Port" }, - { "column": "top-acl-hits.nuage_metadata.spgName", "label": "Source PG" }, - { "column": "top-acl-hits.nuage_metadata.dpgName", "label": "Dest PG" } - ] - }, - "query": "vss-domain-acl-top5" -} diff --git a/public/configurations/visualizations/vss-domain-events-by-pg.json b/public/configurations/visualizations/vss-domain-events-by-pg.json deleted file mode 100644 index 342e3c9b..00000000 --- a/public/configurations/visualizations/vss-domain-events-by-pg.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "id": "vss-domain-events-by-pg", - "graph": "BarGraph", - "title": "Count of Security Events by Source Policy Group", - "author": "Ronak Shah", - "creationDate": "10/18/2016", - "data": { - "xColumn": "PG", - "yColumn": "Sum of Value", - "xTickGrid": false, - "yTickGrid": true, - "yTickFormat": ".2s", - "xLabel": "Source Policy Groups", - "yLabel": "Total # of Events" - }, - "listeners": [{ - "params": { - "spg": "PG" - } - }], - "query": "vss-domain-events-by-pg" -} diff --git a/public/configurations/visualizations/vss-domain-events-by-type.json b/public/configurations/visualizations/vss-domain-events-by-type.json deleted file mode 100644 index c508da35..00000000 --- a/public/configurations/visualizations/vss-domain-events-by-type.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "id": "vss-domain-events-by-type", - "graph": "BarGraph", - "title": "Count of Security Events by Event Type", - "description": "This horizontal barchart represents top 5 security events per total count of events registered, for this domain over a given period of time. When any of the bar is clicked, the table showing detail information (in reverse chronological order) about that event appears on this dashboard.", - "author": "Ronak Shah", - "creationDate": "10/18/2016", - "data": { - "xColumn": "Sum of Value", - "yColumn": "EventType", - "colorColumn": "EventType", - "orientation": "horizontal", - "colors": [ - "#ff4d4d", - "#ff8533", - "#7da3f7" - ], - "tooltip": [ - { "column": "EventType", "label": "Event" }, - { "column": "Sum of Value", "label": "Count", "format": ",.1f"} - ], - "xTickGrid": true, - "yTickGrid": false, - "xTickFormat": ".2s", - "xTicks": 5, - "xLabel": "Total # of Events", - "yLabel": "Event Type" - }, - "listeners": [{ - "params": { - "eventType": "EventType" - } - }], - "query": "vss-domain-events-by-type" -} diff --git a/public/configurations/visualizations/vss-domain-events-detail.json b/public/configurations/visualizations/vss-domain-events-detail.json deleted file mode 100644 index cc64954f..00000000 --- a/public/configurations/visualizations/vss-domain-events-detail.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "id": "vss-domain-events-detail", - "graph": "Table", - "title": "Event Detail - {{eventType}}", - "description": "Detail for selected event in reverse chronological order within context of this domain.", - "author": "Ronak Shah", - "creationDate": "11/15/2016", - "data": { - "columns": [ - { "column": "timestamp", "label": "Timestamp", "timeFormat": "%b %d, %y %X"}, - { "column": "value", "label": "Value" }, - { "column": "nuage_metadata.vportId", "label": "Vport UUID" }, - { "column": "nuage_metadata.subnetName", "label": "Subnet Name" }, - { "column": "nuage_metadata.zoneName", "label": "Zone Name" } - ] - }, - "query": "vss-domain-events-detail" -} diff --git a/public/configurations/visualizations/vss-domain-flow-fixed-weight.json b/public/configurations/visualizations/vss-domain-flow-fixed-weight.json deleted file mode 100644 index 7290fa88..00000000 --- a/public/configurations/visualizations/vss-domain-flow-fixed-weight.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "id": "vss-domain-flow", - "graph": "ChordGraph", - "title": "Flows per Domain", - "author": "Ronak Shah and Curran Kelleher", - "creationDate": "11/3/2016", - "data": { - "chordSourceColumn": "spg", - "chordDestinationColumn": "dpg", - "colorColumn": "spg" - }, - "query": "vss-domain-flow" -} diff --git a/public/configurations/visualizations/vss-domain-flow-table.json b/public/configurations/visualizations/vss-domain-flow-table.json deleted file mode 100644 index 5ffa87d0..00000000 --- a/public/configurations/visualizations/vss-domain-flow-table.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "id": "vss-domain-flow-table", - "graph": "Table", - "title": "Flow detail between {{source:Source}} and {{destination:Destination}}", - "description": "Detail in a reverse chronological order about flows between selected source and destination.", - "author": "Ronak Shah", - "creationDate": "11/02/2016", - "data": { - "columns": [ - { "column": "sourceip", "label": "Source IP" }, - { "column": "destinationip", "label": "Destination IP" }, - { "column": "protocol", "label": "Protocol" }, - { "column": "sourceport", "label": "Source Port" }, - { "column": "destinationport", "label": "Dest Port" }, - { "column": "type", "label": "Type"}, - { "column": "timestamp", "label": "Timestamp", "timeFormat": "%b %d, %y %X"}, - { "column": "packets", "label": "Packets" } - ] - }, - "query": "vss-domain-flow-table" -} diff --git a/public/configurations/visualizations/vss-domain-flow.json b/public/configurations/visualizations/vss-domain-flow.json deleted file mode 100644 index 6e5f4ab1..00000000 --- a/public/configurations/visualizations/vss-domain-flow.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "id": "vss-domain-flow", - "graph": "ChordGraph", - "title": "Flows per Domain", - "description": "This chord diagram represents flow information between source and destination. Every chord represents total packets sent and received between source an destination. Chord's thickness is directly proportional to no of packets exchanged. The color of the chord represents the color of destination to which the first flow was registered. When clicked on a particular chord, the table showing detail (in a reverse chronological order) about flows between that source and destination will appear next to the chord diagram.", - "author": "Ronak Shah and Curran Kelleher", - "creationDate": "10/25/2016", - "data": { - "chordWeightColumn": "SumOf", - "chordSourceColumn": "source", - "chordDestinationColumn": "destination", - "colorColumn": "source", - "tooltip": [ - { "column": "value", "format": ",", "label": "MB"} - ] - }, - "listeners": [{ - "params": { - "source": "source", - "destination": "destination" - } - }], - "query": "vss-domain-flow" -} diff --git a/public/configurations/visualizations/vss-domain-traffic-icmp.json b/public/configurations/visualizations/vss-domain-traffic-icmp.json deleted file mode 100644 index 3f06ec69..00000000 --- a/public/configurations/visualizations/vss-domain-traffic-icmp.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "id": "vss-domain-traffic-icmp", - "graph": "LineGraph", - "title": "ICMP vs Time", - "description": "This line graph represents total no of ICMP Packets received for this domain over a period of specified time. By default it shows allowed traffic. One can select other deny action i.e from the drop down menu on this dashboard to show denied traffic.", - "author": "Ronak Shah", - "creationDate": "10/18/2016", - "data": { - "xColumn": "timestamp", - "yColumn": "SumOf", - "stroke": { - "color": "#fec26a", - "width": "2px" - }, - "xTickGrid": false, - "yTickGrid": true, - "yTickFormat": ".2s", - "xLabel": "Time", - "yLabel": "Total # of ICMP Packets" - }, - "query": "vss-domain-traffic-icmp" -} diff --git a/public/configurations/visualizations/vss-domain-traffic-tcp-conn.json b/public/configurations/visualizations/vss-domain-traffic-tcp-conn.json deleted file mode 100644 index abcf4e17..00000000 --- a/public/configurations/visualizations/vss-domain-traffic-tcp-conn.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "id": "vss-domain-traffic-tcp-conn", - "graph": "LineGraph", - "title": "TCP vs Time", - "description": "This line graph represents total no of TCP Packets received for this domain over a period of specified time. By default it shows allowed traffic. One can select other deny action i.e from the drop down menu on this dashboard to show denied traffic.", - "author": "Ronak Shah", - "creationDate": "10/18/2016", - "data": { - "xColumn": "timestamp", - "yColumn": "SumOf", - "stroke": { - "color": "#b3d645", - "width": "2px" - }, - "xTickGrid": false, - "yTickGrid": true, - "yTickFormat": ".2s", - "xLabel": "Time", - "yLabel": "Total # of TCP Packets" - }, - "query": "vss-domain-traffic-tcp-conn" -} diff --git a/public/configurations/visualizations/vss-domain-traffic-tcp-syn.json b/public/configurations/visualizations/vss-domain-traffic-tcp-syn.json deleted file mode 100644 index cafa92ec..00000000 --- a/public/configurations/visualizations/vss-domain-traffic-tcp-syn.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "id": "vss-domain-traffic-tcp-syn", - "graph": "LineGraph", - "title": "TCP-{{flagtype}} vs Time", - "description": "This line graph represents total no of TCP SYN Packets received for this domain over a period of specified time. By default it shows allowed traffic. One can select other deny action i.e from the drop down menu on this dashboard to show denied traffic.", - "author": "Ronak Shah", - "creationDate": "2/28/2016", - "data": { - "xColumn": "timestamp", - "yColumn": "flag", - "stroke": { - "color": "#fec26a", - "width": "2px" - }, - "xTickGrid": false, - "yTickGrid": true, - "yTickFormat": ".2s", - "xLabel": "Time", - "yLabel": "Total # of TCP-{{flagtype}} Packets" - }, - "filterOptions": { - "Flag-Type": { - "parameter": "flagtype", - "default": "SYN", - "options": [ - { - "label": "SYN", - "value": "SYN", - "default": true - }, - { - "label": "SYN-ACK", - "value": "SYN-ACK" - }, - { - "label": "FIN", - "value": "FIN", - "default": true - }, - { - "label": "FIN-ACK", - "value": "FIN-ACK" - }, - { - "label": "NULL", - "value": "NULL", - "default": true - }, - { - "label": "RST", - "value": "RST" - } - ] - } - }, - "query": "vss-domain-traffic-tcp-syn" -} diff --git a/public/configurations/visualizations/vss-domain-traffic-tcp-synflood.json b/public/configurations/visualizations/vss-domain-traffic-tcp-synflood.json deleted file mode 100644 index 3e218d55..00000000 --- a/public/configurations/visualizations/vss-domain-traffic-tcp-synflood.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "id": "vss-domain-traffic-tcp-synflood", - "graph": "LineGraph", - "title": "TCP-SYN Flood vs Time", - "description": "This line graph represents total no of TCP SYN-FLOOD received for this domain over a period of specified time.", - "author": "Ronak Shah", - "creationDate": "10/18/2016", - "data": { - "xColumn": "timestamp", - "yColumn": "SumOf", - "stroke": { - "color": "#f76159", - "width": "2px" - }, - "xTickGrid": false, - "yTickGrid": true, - "yTickFormat": ".2s", - "xLabel": "Time", - "yLabel": "Total # of TCP SYN-FLOOD" - }, - "query": "vss-domain-traffic-tcp-synflood" -} diff --git a/public/configurations/visualizations/vss-domain-traffic-top-dpg.json b/public/configurations/visualizations/vss-domain-traffic-top-dpg.json deleted file mode 100644 index c47b1fab..00000000 --- a/public/configurations/visualizations/vss-domain-traffic-top-dpg.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "id": "vss-domain-traffic-top-dpg", - "graph": "BarGraph", - "title": "Top Destination Policy Groups by Count", - "description": "This barchart represents top 5 destination policy groups by total no of packets registered in a given time.", - "author": "Ronak Shah", - "creationDate": "10/18/2016", - "data": { - "xColumn": "dpg", - "yColumn": "SumOf", - "colorColumn": "dpg", - "colors": [ - "#fec26a" - ], - "tooltip": [ - { "column": "dpg", "label": "PG" }, - { "column": "SumOf", "label": "Packets", "format": ",.1f"} - ], - "xTickGrid": false, - "yTickGrid": true, - "yTickFormat": ".2s", - "xLabel": "Destination Policy Groups", - "yLabel": "Total # of Packets" - }, - "query": "vss-domain-traffic-top-dpg" -} diff --git a/public/configurations/visualizations/vss-domain-traffic-top-spg.json b/public/configurations/visualizations/vss-domain-traffic-top-spg.json deleted file mode 100644 index 0676a120..00000000 --- a/public/configurations/visualizations/vss-domain-traffic-top-spg.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "id": "vss-domain-traffic-top-spg", - "graph": "BarGraph", - "title": "Top Source Policy Groups by Count", - "description": "This horizontal barchart represents top 5 source policy groups by total no of packets registered in a given time.", - "author": "Ronak Shah", - "creationDate": "10/18/2016", - "data": { - "xColumn": "SumOf", - "yColumn": "spg", - "colorColumn": "spg", - "orientation": "horizontal", - "tooltip": [ - { "column": "spg", "label": "PG" }, - { "column": "SumOf", "label": "Packets", "format": ",.1f"} - ], - "xTickGrid": true, - "yTickGrid": false, - "xTickFormat": ".2s", - "xLabel": "Total # of Packets", - "yLabel": "Source Policy Groups" - }, - "query": "vss-domain-traffic-top-spg" -} diff --git a/public/configurations/visualizations/vss-domain-traffic-udp.json b/public/configurations/visualizations/vss-domain-traffic-udp.json deleted file mode 100644 index d15bc3b8..00000000 --- a/public/configurations/visualizations/vss-domain-traffic-udp.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "id": "vss-domain-traffic-udp", - "graph": "LineGraph", - "title": "UDP vs Time", - "author": "Ronak Shah", - "description": "This line graph represents total no of UDP Packets received for this domain over a period of specified time. By default it shows allowed traffic. One can select other deny action i.e from the drop down menu on this dashboard to show denied traffic.", - "creationDate": "10/18/2016", - "data": { - "xColumn": "timestamp", - "yColumn": "SumOf", - "stroke": { - "width": "2px" - }, - "xTickGrid": false, - "yTickGrid": true, - "yTickFormat": ".2s", - "xLabel": "Time", - "yLabel": "Total # of UDP Packets" - }, - "query": "vss-domain-traffic-udp" -} diff --git a/public/configurations/visualizations/vss-ent-acldeny-time.json b/public/configurations/visualizations/vss-ent-acldeny-time.json deleted file mode 100644 index 753dc40e..00000000 --- a/public/configurations/visualizations/vss-ent-acldeny-time.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "id": "vss-ent-acldeny-time", - "graph": "LineGraph", - "title": "ACL Deny vs Time", - "description": "This line graph represents total no of ACL deny received for this enterprise over a period of specified time.", - "author": "Ronak Shah", - "creationDate": "10/17/2016", - "data": { - "xColumn": "timestamp", - "yColumn": "SumOf", - "stroke": { - "color": "#f76159", - "width": "2px" - }, - "xTickGrid": false, - "yTickGrid": true, - "yTickFormat": ".2s", - "xLabel": "Time", - "yLabel": "Total # ACL Deny" - }, - "query": "vss-ent-acldeny-time" -} diff --git a/public/configurations/visualizations/vss-enterprise-acldeny-metric.json b/public/configurations/visualizations/vss-enterprise-acldeny-metric.json deleted file mode 100644 index 80b86280..00000000 --- a/public/configurations/visualizations/vss-enterprise-acldeny-metric.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "id": "vss-enterprise-acldeny-metric", - "title": "# ACL-Deny (24h)", - "query": "vss-enterprise-acldeny-metric", - "graph": "VariationTextGraph", - "showTitleBar": false, - "data": { - "titlePosition": "top", - "target":{ - "column": "timezones", - "value": "Last 24", - "field": "doc_count" - } - } -} diff --git a/public/configurations/visualizations/vss-enterprise-alerts-metric.json b/public/configurations/visualizations/vss-enterprise-alerts-metric.json deleted file mode 100644 index f487531e..00000000 --- a/public/configurations/visualizations/vss-enterprise-alerts-metric.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "id": "vss-enterprise-alerts-metric", - "title": "# TCA Alerts (24h)", - "query": "vss-enterprise-alerts-metric", - "graph": "VariationTextGraph", - "showTitleBar": false, - "data": { - "titlePosition": "top", - "target":{ - "column": "timezones", - "value": "Last 24", - "field": "doc_count" - } - } -} diff --git a/public/configurations/visualizations/vss-enterprise-events-metric.json b/public/configurations/visualizations/vss-enterprise-events-metric.json deleted file mode 100644 index b9c68d43..00000000 --- a/public/configurations/visualizations/vss-enterprise-events-metric.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "id": "vss-enterprise-events-metric", - "title": "# Events (24h)", - "query": "vss-enterprise-events-metric", - "graph": "VariationTextGraph", - "showTitleBar": false, - "data": { - "titlePosition": "top", - "target":{ - "column": "timezones", - "value": "Last 24", - "field": "doc_count" - } - } -} diff --git a/public/configurations/visualizations/vss-enterprise-flows-metric.json b/public/configurations/visualizations/vss-enterprise-flows-metric.json deleted file mode 100644 index 9af0b0bc..00000000 --- a/public/configurations/visualizations/vss-enterprise-flows-metric.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "id": "vss-enterprise-flows-metric", - "title": "# Packets (24h)", - "query": "vss-enterprise-flows-metric", - "graph": "VariationTextGraph", - "showTitleBar": false, - "data": { - "titlePosition": "top", - "target":{ - "column": "timezones", - "value": "Last 24", - "field": "value" - } - } -} diff --git a/public/configurations/visualizations/vss-enterprise-pg-metric.json b/public/configurations/visualizations/vss-enterprise-pg-metric.json deleted file mode 100644 index 8161e7ae..00000000 --- a/public/configurations/visualizations/vss-enterprise-pg-metric.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "id": "vss-enterprise-pg-metric", - "title": "# PGs (24h)", - "query": "vss-enterprise-pg-metric", - "graph": "VariationTextGraph", - "showTitleBar": false, - "data": { - "titlePosition": "top", - "target":{ - "column": "timezones", - "value": "Last 24", - "field": "value" - } - } -} diff --git a/public/configurations/visualizations/vss-top-domains-blocked-traffic.json b/public/configurations/visualizations/vss-top-domains-blocked-traffic.json deleted file mode 100644 index 93a227a4..00000000 --- a/public/configurations/visualizations/vss-top-domains-blocked-traffic.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "id": "vss-top-domains-blocked-traffic", - "graph": "BarGraph", - "title": "Top 5 Domains by blocked traffic", - "description": "Top 5 domains per enterprise based on blocked (acl-deny) traffic for given period. When clicked on a given domain bar, it will redirect to that domain's dashboard page.", - "author": "Ronak Shah", - "creationDate": "10/17/2016", - "data": { - "xColumn": "SumOf", - "yColumn": "domains", - "colorColumn": "domains", - "orientation": "horizontal", - "tooltip": [ - { "column": "domains", "label": "Domain" }, - { "column": "SumOf", "label": "# ACL Deny", "format": ",.1f"} - ], - "colors": [ - "#7da3f7", - "#fec26a", - "#e78ac3", - "#f79e99" - ], - "xTickGrid": true, - "yTickGrid": false, - "xTickFormat": ".2s", - "xTicks": 8, - "xLabel": "Total # ACL Deny", - "yLabel": "Domains" - }, - "listeners": [ - { - "redirect": "/dashboards/vssDomainACL", - "params": { - "domainName": "domains" - } - }], - "query": "vss-top-domains-blocked-traffic" -} diff --git a/public/configurations/visualizations/vss-top-sec-events.json b/public/configurations/visualizations/vss-top-sec-events.json deleted file mode 100644 index 256a76c9..00000000 --- a/public/configurations/visualizations/vss-top-sec-events.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "id": "vss-top-sec-events", - "graph": "PieGraph", - "title": "Top Security Events", - "description": "Top 5 security events for this enterprise in a given period of time", - "author": "Ronak Shah", - "creationDate": "10/17/2016", - "data": { - "sliceColumn": "SumOf", - "labelColumn": "EventType", - "colorColumn": "EventType", - "tooltip": [ - { "column": "EventType", "label": "Event" }, - { "column": "SumOf", "label": "Count", "format": ",.1f"} - ], - "percentages": true, - "percentagesFormat": ",.1%", - "pieLabelRadius": 0.55, - "pieOuterRadius": 0.95, - "colorLegend": true - }, - "query": "vss-top-sec-events" -} diff --git a/server/app/configurations/dashboards/kitchenSink.json b/server/app/configurations/dashboards/kitchenSink.json index 35b37cb9..c72069e3 100644 --- a/server/app/configurations/dashboards/kitchenSink.json +++ b/server/app/configurations/dashboards/kitchenSink.json @@ -102,6 +102,15 @@ "h": 15, "minW": 2, "minH": 12 + }, + { + "id": "aar-flow-sla-heatmap", + "x": 9, + "y": 15, + "w": 6, + "h": 15, + "minW": 2, + "minH": 12 } ] diff --git a/public/configurations/dashboards/medals.json b/server/app/configurations/dashboards/medals.json similarity index 100% rename from public/configurations/dashboards/medals.json rename to server/app/configurations/dashboards/medals.json diff --git a/public/configurations/dashboards/medalsPerCountry.json b/server/app/configurations/dashboards/medalsPerCountry.json similarity index 100% rename from public/configurations/dashboards/medalsPerCountry.json rename to server/app/configurations/dashboards/medalsPerCountry.json diff --git a/public/configurations/queries/medalsEvolution.json b/server/app/configurations/queries/medalsEvolution.json similarity index 100% rename from public/configurations/queries/medalsEvolution.json rename to server/app/configurations/queries/medalsEvolution.json diff --git a/public/configurations/queries/medalsEvolutionPerCountry.json b/server/app/configurations/queries/medalsEvolutionPerCountry.json similarity index 100% rename from public/configurations/queries/medalsEvolutionPerCountry.json rename to server/app/configurations/queries/medalsEvolutionPerCountry.json diff --git a/public/configurations/queries/medalsPerCountry.json b/server/app/configurations/queries/medalsPerCountry.json similarity index 100% rename from public/configurations/queries/medalsPerCountry.json rename to server/app/configurations/queries/medalsPerCountry.json diff --git a/public/configurations/queries/medalsTable.json b/server/app/configurations/queries/medalsTable.json similarity index 100% rename from public/configurations/queries/medalsTable.json rename to server/app/configurations/queries/medalsTable.json diff --git a/public/configurations/queries/top5Countries.json b/server/app/configurations/queries/top5Countries.json similarity index 100% rename from public/configurations/queries/top5Countries.json rename to server/app/configurations/queries/top5Countries.json diff --git a/server/app/configurations/queries/vnf-status-linechart.json b/server/app/configurations/queries/vnf-status-linechart.json index 0e5534ba..4b022f8a 100644 --- a/server/app/configurations/queries/vnf-status-linechart.json +++ b/server/app/configurations/queries/vnf-status-linechart.json @@ -58,17 +58,17 @@ "CPU": { "avg": { "field": "cpu" - } + } }, "MEMORY": { "avg": { "field": "memory" - } + } }, "DISK": { "avg": { "field": "disk" - } + } } } } diff --git a/public/configurations/visualizations/medalsEvolution.json b/server/app/configurations/visualizations/medalsEvolution.json similarity index 100% rename from public/configurations/visualizations/medalsEvolution.json rename to server/app/configurations/visualizations/medalsEvolution.json diff --git a/public/configurations/visualizations/medalsEvolutionPerCountry.json b/server/app/configurations/visualizations/medalsEvolutionPerCountry.json similarity index 100% rename from public/configurations/visualizations/medalsEvolutionPerCountry.json rename to server/app/configurations/visualizations/medalsEvolutionPerCountry.json diff --git a/public/configurations/visualizations/medalsPerCountry.json b/server/app/configurations/visualizations/medalsPerCountry.json similarity index 100% rename from public/configurations/visualizations/medalsPerCountry.json rename to server/app/configurations/visualizations/medalsPerCountry.json diff --git a/public/configurations/visualizations/medalsRepartition.json b/server/app/configurations/visualizations/medalsRepartition.json similarity index 100% rename from public/configurations/visualizations/medalsRepartition.json rename to server/app/configurations/visualizations/medalsRepartition.json diff --git a/public/configurations/visualizations/medalsTable.json b/server/app/configurations/visualizations/medalsTable.json similarity index 100% rename from public/configurations/visualizations/medalsTable.json rename to server/app/configurations/visualizations/medalsTable.json diff --git a/public/configurations/visualizations/top5Countries.json b/server/app/configurations/visualizations/top5Countries.json similarity index 100% rename from public/configurations/visualizations/top5Countries.json rename to server/app/configurations/visualizations/top5Countries.json diff --git a/server/app/controllers/dashboards.controller.js b/server/app/controllers/dashboards.controller.js index bab14900..01c5dd21 100644 --- a/server/app/controllers/dashboards.controller.js +++ b/server/app/controllers/dashboards.controller.js @@ -1,6 +1,7 @@ import BaseController from './base.controller'; import {DirectoryTypes, FetchManager} from '../lib/utils/fetch'; +import { ServiceManager } from "../lib/servicemanager/index" class DashboardsController extends BaseController { index = async (req, res, next) => { @@ -11,9 +12,15 @@ class DashboardsController extends BaseController { if(dasboardData.visualizations) { dasboardData.visualizations.forEach((visualization, index, array) => { - dasboardData.visualizations[index].visualization = FetchManager.fetchAndParseJSON(visualization.id, DirectoryTypes.VISUALIZATION); - if(dasboardData.visualizations[index].visualization.query) - dasboardData.visualizations[index].query = FetchManager.fetchAndParseJSON(dasboardData.visualizations[index].visualization.query, DirectoryTypes.QUERY); + let viz = FetchManager.fetchAndParseJSON(visualization.id, DirectoryTypes.VISUALIZATION); + + if(viz.query) { + viz.queryConfiguration = FetchManager.fetchAndParseJSON(viz.query, DirectoryTypes.QUERY); + } else if(viz.script) { + viz.queryConfiguration = ServiceManager.executeScript(viz.script); + } + + dasboardData.visualizations[index].visualization = viz; }); } diff --git a/server/app/controllers/visualizations.controller.js b/server/app/controllers/visualizations.controller.js index 6b9d4d9f..2f1ca17c 100644 --- a/server/app/controllers/visualizations.controller.js +++ b/server/app/controllers/visualizations.controller.js @@ -6,6 +6,24 @@ import { ServiceManager } from "../lib/servicemanager/index" import { parameterizedConfiguration } from '../lib/utils/configurations' class VisualizationsController extends BaseController { + + index = async (req, res, next) => { + let { visualization } = req.params; + + try { + let visualizationConfig = FetchManager.fetchAndParseJSON(visualization, DirectoryTypes.VISUALIZATION); + if(visualizationConfig && visualizationConfig.query) { + visualizationConfig.queryConfiguration = FetchManager.fetchAndParseJSON(visualizationConfig.query, DirectoryTypes.QUERY); + } else if(visualizationConfig.script) { + visualizationConfig.queryConfiguration = ServiceManager.executeScript(visualizationConfig.script); + } + + res.json(visualizationConfig); + } catch(err) { + next(err); + } + } + fetch = async (req, res, next) => { let { visualization } = req.params; let context = req.body; diff --git a/server/app/routes.js b/server/app/routes.js index b463e228..4ac3449d 100644 --- a/server/app/routes.js +++ b/server/app/routes.js @@ -12,7 +12,8 @@ routes.get('/', IndexController.index); // Users routes.get('/dashboards/:dashboard', DashboardsController.index); -routes.post('/visualizations/:visualization', VisualizationsController.fetch); +routes.get('/visualizations/:visualization', VisualizationsController.index); +routes.post('/visualizations/fetch/:visualization', VisualizationsController.fetch); routes.use(errorHandler); diff --git a/src/components/Dashboard/index.js b/src/components/Dashboard/index.js index 79b0cb50..0e392e9c 100644 --- a/src/components/Dashboard/index.js +++ b/src/components/Dashboard/index.js @@ -176,6 +176,7 @@ export class DashboardView extends React.Component { id={visualization.id} registerResize={this.registerResize.bind(this)} showInDashboard={true} + configuration={visualization} /> ) diff --git a/src/components/Graphs/GaugeGraph/index.js b/src/components/Graphs/GaugeGraph/index.js index fb77a41e..3104e056 100644 --- a/src/components/Graphs/GaugeGraph/index.js +++ b/src/components/Graphs/GaugeGraph/index.js @@ -93,7 +93,6 @@ export default class GaugeGraph extends AbstractGraph { colors } = this.getConfiguredProperties(); - console.log('Data', this.getConfiguredProperties(), data); const angles = { min: -90, max: 90 diff --git a/src/components/Graphs/HeatmapGraph/index.js b/src/components/Graphs/HeatmapGraph/index.js index 268f76d8..06151a11 100644 --- a/src/components/Graphs/HeatmapGraph/index.js +++ b/src/components/Graphs/HeatmapGraph/index.js @@ -11,8 +11,7 @@ import { scaleTime, select, map, - min, - utcHour + min } from "d3"; import {properties} from "./default.config" diff --git a/src/components/Graphs/LineGraph/index.js b/src/components/Graphs/LineGraph/index.js index 6d6e2562..c841887c 100644 --- a/src/components/Graphs/LineGraph/index.js +++ b/src/components/Graphs/LineGraph/index.js @@ -1,6 +1,5 @@ import React from "react"; import XYGraph from "../XYGraph"; -import { Actions } from "../../App/redux/actions"; import { connect } from "react-redux"; import { diff --git a/src/components/Graphs/MultiLineGraph/index.js b/src/components/Graphs/MultiLineGraph/index.js index 505530cb..86814f30 100644 --- a/src/components/Graphs/MultiLineGraph/index.js +++ b/src/components/Graphs/MultiLineGraph/index.js @@ -1,6 +1,5 @@ import React from "react"; import XYGraph from "../XYGraph"; -import { Actions } from "../../App/redux/actions"; import { connect } from "react-redux"; import { @@ -14,7 +13,6 @@ import { select, brushX, voronoi, - merge, event } from "d3"; @@ -42,7 +40,6 @@ class LineGraph extends XYGraph { chartHeightToPixel, chartWidthToPixel, circleToPixel, - colorColumn, colors, legend, linesColumn, @@ -107,7 +104,6 @@ class LineGraph extends XYGraph { let xAxisHeight = xLabel ? chartHeightToPixel : 0; let legendWidth = legend.show && legendsData.length >= 1 ? this.longestLabelLength(legendsData, legendFn) * chartWidthToPixel : 0; - let xLabelWidth = this.longestLabelLength(data, xLabelFn) * chartWidthToPixel; let yLabelWidth = this.longestLabelLength(filterDatas, yLabelFn) * chartWidthToPixel; let leftMargin = margin.left + yLabelWidth; diff --git a/src/components/Visualization/index.js b/src/components/Visualization/index.js index 86bd24e6..c635dcef 100644 --- a/src/components/Visualization/index.js +++ b/src/components/Visualization/index.js @@ -117,41 +117,26 @@ class VisualizationView extends React.Component { setPageTitle } = this.props; - if (!configuration) + if (!configuration || !configuration.id) return; if (!showInDashboard) setPageTitle("Visualization"); - const queryName = configuration.query, - scriptName = configuration.script; - - if (scriptName) { - const { executeScriptIfNeeded, context } = this.props; - executeScriptIfNeeded(scriptName, context); - } - - if (queryName) { - this.props.fetchQueryIfNeeded(queryName).then(() => { - const { queryConfiguration, executeQueryIfNeeded, context } = this.props; - - if (!queryConfiguration) - return; - - executeQueryIfNeeded(queryConfiguration, context).then( - () => { - this.setState({ - parameterizable: true, - }); - }, - (error) => { - this.setState({ - parameterizable: false, - }); - } - ); - }); - } + const { context, queryConfiguration, executeIfNeeded } = this.props; + + executeIfNeeded(configuration, context, queryConfiguration).then( + () => { + this.setState({ + parameterizable: true, + }); + }, + (error) => { + this.setState({ + parameterizable: false, + }); + } + ); // Handle configured listeners (e.g. navigate when clicking on a bar). if(configuration.listeners) { @@ -238,7 +223,6 @@ class VisualizationView extends React.Component { renderVisualization() { const { configuration, - queryConfiguration, response } = this.props; @@ -249,7 +233,7 @@ class VisualizationView extends React.Component { return this.renderCardWithInfo("Oops, " + response.error, "meh-o"); } - const data = ServiceManager.tabify(queryConfiguration, response.results); + const data = response.results; if (!data || !data.length) { return this.renderCardWithInfo("No data to visualize", "bar-chart"); @@ -446,7 +430,6 @@ class VisualizationView extends React.Component { } const mapStateToProps = (state, ownProps) => { - const configurationID = ownProps.id || ownProps.params.id, context = state.interface.get(InterfaceActionKeyStore.CONTEXT), configuration = state.configurations.getIn([ @@ -455,6 +438,7 @@ const mapStateToProps = (state, ownProps) => { ConfigurationsActionKeyStore.DATA ]); + const props = { id: configurationID, context: context, @@ -469,25 +453,12 @@ const mapStateToProps = (state, ownProps) => { // Expose the query template as a JS object if it is available. if (configuration) { - let queryConfiguration = state.configurations.getIn([ - ConfigurationsActionKeyStore.QUERIES, - configuration.get("query") - ]); - - if (queryConfiguration && !queryConfiguration.get( - ConfigurationsActionKeyStore.IS_FETCHING - )) { - queryConfiguration = queryConfiguration.get( - ConfigurationsActionKeyStore.DATA - ); - - props.queryConfiguration = queryConfiguration ? queryConfiguration.toJS() : null; - } - + props.queryConfiguration = configuration.get('queryConfiguration') ? configuration.get('queryConfiguration').toJS() : null; const scriptName = configuration.get("script"); // Expose received response if it is available if (props.queryConfiguration || scriptName) { + const query = props.queryConfiguration ? props.queryConfiguration : scriptName; const requestID = ServiceManager.getRequestID(query, context); @@ -495,6 +466,7 @@ const mapStateToProps = (state, ownProps) => { ServiceActionKeyStore.REQUESTS, requestID ]); + if (response && !response.get(ServiceActionKeyStore.IS_FETCHING)) props.response = response.toJS(); } @@ -520,19 +492,8 @@ const actionCreators = (dispatch) => ({ )); }, - fetchQueryIfNeeded: function(id) { - return dispatch(ConfigurationsActions.fetchIfNeeded( - id, - ConfigurationsActionKeyStore.QUERIES - )); - }, - - executeQueryIfNeeded: function(queryConfiguration, context) { - return dispatch(ServiceActions.fetchIfNeeded(queryConfiguration, context)); - }, - - executeScriptIfNeeded: function(scriptName, context) { - return dispatch(ServiceActions.fetchIfNeeded(scriptName, context)); + executeIfNeeded: function(configuration, context, queryConfiguration) { + return dispatch(ServiceActions.fetchIfNeeded(configuration, context, queryConfiguration)); } }); diff --git a/src/configs/nuage/elasticsearch/elasticsearch.spec.js b/src/configs/nuage/elasticsearch/elasticsearch.spec.js deleted file mode 100644 index 8dcdbba8..00000000 --- a/src/configs/nuage/elasticsearch/elasticsearch.spec.js +++ /dev/null @@ -1,83 +0,0 @@ -import { ElasticSearchService, getCurrentConfig } from "./index"; -import { Map } from "immutable"; -import { ActionKeyStore } from "./redux/actions"; - - -describe('Elastic Search service', () => { - it('should expose certain methods and have an id', () => { - let expectedProperties = [ - "id", - "fetch", - "ping", - "getRequestID", - "tabify" - ]; - expect(Object.keys(ElasticSearchService)).toEqual(expectedProperties) - expect(ElasticSearchService.id).toEqual("elasticsearch") - }); -}); - - -describe('Elastic Search getRequestID', () => { - it('should return a stringify version of the query without parameters', () => { - let query = { - id: "ABC" - }, - context = { - enterpriseName: "Nuage Networks" - }; - expect(ElasticSearchService.getRequestID(query, context)).toEqual("ABC"); - }); - - it('should return a stringify version of the query with all used parameters', () => { - let query = { - id: "ABC", - query: { - randomFilter: "{{enterpriseName}}" - } - }, - context = { - enterpriseName: "Nuage Networks" - }; - expect(ElasticSearchService.getRequestID(query, context)).toEqual("ABC[{\"enterpriseName\":\"Nuage Networks\"}]"); - }); - -}); - - -describe('Elastic Search config', () => { - it('should have no default host', () => { - - const fakeState = { - ES: new Map() - }; - - delete process.env.REACT_APP_ELASTICSEARCH_HOST; - let config = getCurrentConfig(fakeState); - expect(config.host).toEqual(undefined); - }); - - it('should fetch information from the environment variable host', () => { - process.env.REACT_APP_ELASTICSEARCH_HOST = "https://www.google.com"; - - const fakeState = { - ES: new Map() - }; - - let config = getCurrentConfig(fakeState); - expect(config.host).toEqual("https://www.google.com"); - }); - - it('should fetch information from the specified context', () => { - process.env.REACT_APP_ELASTICSEARCH_HOST = "https://www.google.com"; - - const fakeState = { - ES: Map({ - [ActionKeyStore.ES_HOST]: "http://eshost:9200" - }) - }; - - let config = getCurrentConfig(fakeState); - expect(config.host).toEqual("http://eshost:9200"); - }); -}); diff --git a/src/configs/nuage/elasticsearch/index.js b/src/configs/nuage/elasticsearch/index.js index 49e9e216..2b6edf1f 100644 --- a/src/configs/nuage/elasticsearch/index.js +++ b/src/configs/nuage/elasticsearch/index.js @@ -1,77 +1,5 @@ -import elasticsearch from "elasticsearch"; -import tabify from "./tabify"; -import { ActionKeyStore } from "./redux/actions"; import { getUsedParameters } from "../../../utils/configurations"; -var client = null; -let config = function () { - return { - host: null, - log: 'trace', - apiVersion: '2.2', - sniffOnStart: true, - sniffInterval: 60000, - sniffOnConnectionFault: true - } -} - -export const getCurrentConfig = function (state) { - let currentConfig = config() - - currentConfig.host = state.ES.get(ActionKeyStore.ES_HOST) || process.env.REACT_APP_ELASTICSEARCH_HOST; - - return currentConfig; -} - -let ESClient = function (state) { - var config = getCurrentConfig(state); - - if (!config.host){ - throw new Error("The ElasticSearch host is not configured. You can configure the ElasticSearch host by setting the environment variable REACT_APP_ELASTICSEARCH_HOST at compile time. For development with a local ElasticSearch instance running on the default port, you can put the following in your .bashrc or .profile startup script: 'export REACT_APP_ELASTICSEARCH_HOST=http://localhost:9200'"); - } - - return new elasticsearch.Client(config); -} - -const fetch = function (queryConfiguration, state) { - - if (client == null) { - client = ESClient(state) ; - } - - if (!client) - return Promise.reject(); - - return new Promise((resolve, reject) => { - client.search(queryConfiguration.query).then(function (body) { - resolve(body); - }, function (error) { - if (!error.body) - reject("no active Elastic Search host"); - else - reject(error.body.error.reason + ": " + error.body.error["resource.id"]); - }); - }); -} - -const ping = function (queryConfiguration, state) { - var client = ESClient(); // eslint-disable-line - - if (!client) - return Promise.reject(); - - return new Promise((resolve, reject) => { - client.search(queryConfiguration.query).then(function (body) { - resolve(body); - }, function (error) { - if (!error.body) - reject("no active Elastic Search host"); - else - reject(error.body.error.reason + ": " + error.body.error["resource.id"]); - }); - }); -} - /* Computes the request ID based on the queryConfiguration that are actually used */ const getRequestID = function (queryConfiguration, context) { @@ -84,8 +12,5 @@ const getRequestID = function (queryConfiguration, context) { export const ElasticSearchService = { id: "elasticsearch", - fetch: fetch, - ping: ping, - getRequestID: getRequestID, - tabify: tabify + getRequestID: getRequestID } diff --git a/src/configs/nuage/elasticsearch/redux/actions.js b/src/configs/nuage/elasticsearch/redux/actions.js deleted file mode 100644 index cfe5a4d2..00000000 --- a/src/configs/nuage/elasticsearch/redux/actions.js +++ /dev/null @@ -1,16 +0,0 @@ -export const ActionTypes = { - ESHOST_ACTION_SET_SETTINGS: "ESHOST_ACTION_SET_SETTINGS", -}; - -export const ActionKeyStore = { - ES_HOST: "eshost" -}; - -export const Actions = { - setSettings: function(ES_HOST) { - return { - type: ActionTypes.ESHOST_ACTION_SET_SETTINGS, - ES_HOST: ES_HOST - } - } -}; diff --git a/src/configs/nuage/elasticsearch/redux/reducer.js b/src/configs/nuage/elasticsearch/redux/reducer.js deleted file mode 100644 index 7875a5b3..00000000 --- a/src/configs/nuage/elasticsearch/redux/reducer.js +++ /dev/null @@ -1,27 +0,0 @@ -import { Map } from "immutable"; -import { ActionTypes, ActionKeyStore } from "./actions"; - -let initialState = Map() // eslint-disable-line - .set(ActionKeyStore.ES_HOST, null); - -function setSettings(state, host) { - if (!host) - return state; - - return state.set(ActionKeyStore.ES_HOST, host); -} - - -function ESReducer(state = initialState, action) { - - switch (action.type) { - case ActionTypes.ESHOST_ACTION_SET_SETTINGS: - return setSettings(state, action.ES_HOST); - - default: - return state; - } -}; - - -export default ESReducer; diff --git a/src/configs/nuage/elasticsearch/tabify.js b/src/configs/nuage/elasticsearch/tabify.js deleted file mode 100644 index 909a10a6..00000000 --- a/src/configs/nuage/elasticsearch/tabify.js +++ /dev/null @@ -1,166 +0,0 @@ -/* - This utility will convert the nested data structure - returned from an ElasticSearch query into a tabular - data structure represented as an array of row objects. - - Inspired by Kibana's implementation, found at - https://github.com/elastic/kibana/blob/master/src/ui/public/agg_response/tabify/tabify.js -*/ -export default function tabify(response) { - let table; - - if (response.aggregations) { - const tree = collectBucket(response.aggregations); - table = flatten(tree); - - } else if (response.hits) { - table = response.hits.hits.map((d) => d._source); - - } else if (Array.isArray(response)) { - table = response; - - } else { - throw new Error("Tabify() invoked with invalid result set. Result set must have either 'aggregations' or 'hits' defined."); - } - - if (process.env.NODE_ENV === "development") { - console.log("Results from tabify (first 3 rows only):"); - - // This one shows where there are "undefined" values. - console.log(table) - - // This one shows the full structure pretty-printed. - console.log(JSON.stringify(table.slice(0, 3), null, 2)) - } - - return table; -} - -function collectBucket(node, stack=[]) { - if (!node) - return; - - const keys = Object.keys(node); - - // Use old school `for` so we can break control flow by returning. - for(let i = 0; i < keys.length; i++) { - const key = keys[i]; - const value = node[key]; - - if (typeof value === 'object') { - - if ("hits" in value && Array.isArray(value.hits) && value.hits.length === 1) { - if ("sort" in value.hits[0]) { - value.hits[0]._source['sort'] = value.hits[0].sort[0]; - } - return value.hits[0]._source; - } - - if (Array.isArray(value)) { - return extractTree(value, [...stack, key]); - } - - // Here we are sure to have an object - if (key === "buckets" && Object.keys(value).length > 1) - { - return extractBuckets(value, [...stack, key]); - } - return collectBucket(value, [...stack, key]); - } - } - - return node; -} - -function extractBuckets(buckets, stack) { - const keys = Object.keys(buckets); - let results = []; - - for(let i = 0; i < keys.length; i++) { - const key = keys[i]; - const value = buckets[key]; - - let currentObject = collectBucket({[key]: value}); - - if (!currentObject) - continue; - - currentObject[stack[stack.length - 2]] = key; - results.push(currentObject) - } - - return results; -} - -function extractTree(buckets, stack) { - return buckets.map((bucket) => { - return Object.keys(bucket).reduce(function (tree, key) { - let value = bucket[key]; - - if (typeof value === "object") { - if("value" in value){ - value = value.value; - } else { - value = collectBucket(value, [...stack, key]); - } - } - - if(key === "key"){ - key = stack[stack.length - 2] - } - - tree[key] = value; - - return tree; - }, {}); - }); -} - -function flatten(tree, parentNode={}){ - - if (!tree) - return []; - - if (!Array.isArray(tree)) - tree = [tree]; - - return tree - - // Have the child node inherit values from the parent. - .map((childNode) => Object.assign({}, parentNode, childNode)) - - // Each node object here has values inherited from its parent. - .map((node) => { - - // Detect properties whose values are arrays. - const childTrees = Object.keys(node) - .map((key) => { - const value = node[key]; - if (Array.isArray(value)) { - return value; - } - return false; - }) - .filter((d) => d); - - switch (childTrees.length) { - - // Leaf node case, return the node. - case 0: - return node; - - // Non-leaf node case, recurse on the child nodes. - case 1: - const childTree = childTrees[0]; - if(childTree.length === 0){ - return node; - } - return flatten(childTree, node); - default: - throw new Error("This case should never happen"); - } - }) - - // Flatten the nested arrays. - .reduce((a, b) => a.concat(b), []); -} diff --git a/src/configs/nuage/elasticsearch/tabify.spec.js b/src/configs/nuage/elasticsearch/tabify.spec.js deleted file mode 100644 index dcaaf695..00000000 --- a/src/configs/nuage/elasticsearch/tabify.spec.js +++ /dev/null @@ -1,476 +0,0 @@ -import tabify from './tabify'; - - -describe('ElasticSearch', () => { - it('should tabify list of objects', () => { - const response = { - "took": 8, - "timed_out": false, - "_shards": { - "total": 5, - "successful": 5, - "failed": 0 - }, - "hits": { - "total": 144000, - "max_score": 0, - "hits": [] - }, - "aggregations": { - "2": { - "buckets": { - "Enterprise": { - "4": { - "buckets": { - "ACLDENY": { - "doc_count": 51840, - "timestamp": { - "buckets": [ - { - "key_as_string": "2016-10-19T22:00:00.000Z", - "key": 1476914400000, - "doc_count": 1620, - "SumOf": { - "value": 1223694 - } - }, - { - "key_as_string": "2016-10-19T23:00:00.000Z", - "key": 1476918000000, - "doc_count": 2160, - "SumOf": { - "value": 1621468 - } - }, - { - "key_as_string": "2016-10-20T00:00:00.000Z", - "key": 1476921600000, - "doc_count": 2160, - "SumOf": { - "value": 1609771 - } - } - ] - } - } - } - }, - "doc_count": 144000 - } - } - } - } - } - - const expectedResults = [ - { - "key_as_string": "2016-10-19T22:00:00.000Z", - "timestamp": 1476914400000, - "doc_count": 1620, - "SumOf": 1223694 - }, - { - "key_as_string": "2016-10-19T23:00:00.000Z", - "timestamp": 1476918000000, - "doc_count": 2160, - "SumOf": 1621468 - }, - { - "key_as_string": "2016-10-20T00:00:00.000Z", - "timestamp": 1476921600000, - "doc_count": 2160, - "SumOf": 1609771 - } - ] - - expect(tabify(response)).toEqual(expectedResults); - }); - - - it('should tabify list of single object', () => { - const response = { - "took": 6, - "timed_out": false, - "_shards": { - "total": 5, - "successful": 5, - "failed": 0 - }, - "hits": { - "total": 144000, - "max_score": 0, - "hits": [] - }, - "aggregations": { - "2": { - "buckets": { - "Enterprise": { - "4": { - "buckets": { - "ACLDENY": { - "doc_count": 51840, - "domains": { - "doc_count_error_upper_bound": 0, - "sum_other_doc_count": 0, - "buckets": [ - { - "key": "chord_domain", - "doc_count": 51840, - "SumOf": { - "value": 38920591 - } - } - ] - } - } - } - }, - "doc_count": 144000 - } - } - } - } - } - - const expectedResults = [ - { - "domains": "chord_domain", - "doc_count": 51840, - "SumOf": 38920591 - } - ] - - expect(tabify(response)).toEqual(expectedResults); - }); - - it('should tabify a weird thing', () => { - const response = { - "took": 12, - "timed_out": false, - "_shards": { - "total": 5, - "successful": 5, - "failed": 0 - }, - "hits": { - "total": 144000, - "max_score": 0, - "hits": [] - }, - "aggregations": { - "2": { - "buckets": { - "Enterprise": { - "doc_count": 144000, - "SumOf": { - "value": 2158541661 - }, - "EventType": { - "doc_count_error_upper_bound": 0, - "sum_other_doc_count": 0, - "buckets": [ - { - "key": "TCA_EVENT", - "doc_count": 59040, - "SumOf": { - "value": 884851403 - } - }, - { - "key": "ACL_DENY", - "doc_count": 47520, - "SumOf": { - "value": 712882070 - } - }, - { - "key": "TCP_SYN_FLOOD", - "doc_count": 37440, - "SumOf": { - "value": 560808188 - } - } - ] - } - } - } - } - } - } - - const expectedResults = [ - {"value": 2158541661} - ] - - expect(tabify(response)).toEqual(expectedResults); - }); - - it('should tabify an empty list', () => { - const response = { - "took": 14, - "timed_out": false, - "_shards": { - "total": 15, - "successful": 15, - "failed": 0 - }, - "hits": { - "total": 669887, - "max_score": 0, - "hits": [] - }, - "aggregations": { - "1": { - "buckets": { - "Enterprise": { - "doc_count": 669887, - "slastatus": { - "doc_count_error_upper_bound": 0, - "sum_other_doc_count": 0, - "buckets": [] - } - } - } - } - } - } - - const expectedResults = [] - - expect(tabify(response)).toEqual(expectedResults); - }); - - it('should tabify an object', () => { - const response = { - "took": 4, - "timed_out": false, - "_shards": { - "total": 5, - "successful": 5, - "failed": 0 - }, - "hits": { - "total": 144000, - "max_score": 0, - "hits": [] - }, - "aggregations": { - "2": { - "buckets": { - "Domain": { - "doc_count": 144000, - "timezones": { - "buckets": { - "Prev 24": { - "doc_count": 0, - "types": { - "buckets": { - "type": { - "doc_count": 10 - } - } - } - }, - "Last 24": { - "doc_count": 0, - "types": { - "buckets": { - "type": { - "doc_count": 20 - } - } - } - } - } - } - } - } - } - } - } - - const expectedResults = [ - { "timezones": "Prev 24", "doc_count": 10 }, - { "timezones": "Last 24", "doc_count": 20 } - ] - - expect(tabify(response)).toEqual(expectedResults); - }); - - it('should tabify hits within aggregation', () => { - const response = { - "took": 13628, - "timed_out": false, - "_shards": { - "total": 5, - "successful": 5, - "failed": 0 - }, - "hits": { - "total": 10080000, - "max_score": 0, - "hits": [] - }, - "aggregations": { - "2": { - "buckets": { - "Enterprise": { - "3": { - "buckets": { - "Domain": { - "doc_count": 2880000, - "top-acls": { - "doc_count_error_upper_bound": 4557, - "sum_other_doc_count": 1404000, - "buckets": [ - { - "key": "55cd911d-aa9b-4647-b4dc-68a63122aa7c", - "doc_count": 10080, - "top-acl-hits": { - "hits": { - "total": 10080, - "max_score": null, - "hits": [ - { - "_index": "nuage_flow", - "_type": "nuage_doc_type", - "_id": "AVeZZov_c3SvEs9LIN_2", - "_score": null, - "_source": { - "destinationport": 3, - "sourceport": 5, - "protocol": "TCP", - "nuage_metadata": { - "dpgName": "PG15", - "spgName": "PG9" - } - }, - "sort": [ - 1000 - ] - } - ] - } - } - }, - { - "key": "ba6ee261-3aa1-439f-be90-102136300472", - "doc_count": 7200, - "top-acl-hits": { - "hits": { - "total": 7200, - "max_score": null, - "hits": [ - { - "_index": "nuage_flow", - "_type": "nuage_doc_type", - "_id": "AVeZZfnvc3SvEs9LIA9v", - "_score": null, - "_source": { - "destinationport": 1, - "sourceport": 4, - "protocol": "UDP", - "nuage_metadata": { - "dpgName": "PG15", - "spgName": "PG18" - } - }, - "sort": [ - 1000 - ] - } - ] - } - } - }, - { - "key": "fd4ba772-608c-4ea2-84cc-701214385856", - "doc_count": 7200, - "top-acl-hits": { - "hits": { - "total": 7200, - "max_score": null, - "hits": [ - { - "_index": "nuage_flow", - "_type": "nuage_doc_type", - "_id": "AVeZXy8tc3SvEs9LFwT9", - "_score": null, - "_source": { - "destinationport": 3, - "sourceport": 3, - "protocol": "TCP", - "nuage_metadata": { - "dpgName": "PG8", - "spgName": "PG9" - } - }, - "sort": [ - 1000 - ] - } - ] - } - } - } - ] - } - } - } - }, - "doc_count": 10080000 - } - } - } - } - }; - - const expectedResults = [ - { - "top-acls": "55cd911d-aa9b-4647-b4dc-68a63122aa7c", - "doc_count": 10080, - "top-acl-hits": { - "destinationport": 3, - "sourceport": 5, - "protocol": "TCP", - "sort": 1000, - "nuage_metadata": { - "dpgName": "PG15", - "spgName": "PG9" - } - } - }, - { - "top-acls": "ba6ee261-3aa1-439f-be90-102136300472", - "doc_count": 7200, - "top-acl-hits": { - "destinationport": 1, - "sourceport": 4, - "protocol": "UDP", - "sort": 1000, - "nuage_metadata": { - "dpgName": "PG15", - "spgName": "PG18" - } - } - }, - { - "top-acls": "fd4ba772-608c-4ea2-84cc-701214385856", - "doc_count": 7200, - "top-acl-hits": { - "destinationport": 3, - "sourceport": 3, - "protocol": "TCP", - "sort": 1000, - "nuage_metadata": { - "dpgName": "PG8", - "spgName": "PG9" - } - } - } - ]; - - expect(tabify(response)).toEqual(expectedResults); - }); - -}); diff --git a/src/configs/nuage/vsd/index.js b/src/configs/nuage/vsd/index.js index d7b32c58..eaf86750 100644 --- a/src/configs/nuage/vsd/index.js +++ b/src/configs/nuage/vsd/index.js @@ -1,43 +1,5 @@ -import $ from "jquery"; - -import { ActionKeyStore } from "./redux/actions"; import { parameterizedConfiguration } from "../../../utils/configurations"; -const config = { - api_version: "5.0", - end_point_prefix: "/nuage/api/" -} - -const getHeaders = (token, organization, filter, page, orderBy, proxyUser) => { - - // Default headers - let headers = { - "Accept": "*/*", - "Content-Type": "application/json", - "X-Nuage-Organization":"csp", - } - - if (token) - headers["Authorization"] = "XREST " + token - - if (organization) - headers["X-Nuage-Organization"] = organization - - if (filter) - headers["X-Nuage-Filter"] = filter - - if (orderBy) - headers["X-Nuage-OrderBy"] = orderBy - - if (page) - headers["X-Nuage-Page"] = page - - if (proxyUser) - headers["X-Nuage-ProxyUser"] = proxyUser - - // console.error(headers); - return headers -} export const getURLEndpoint = (configuration) => { @@ -66,124 +28,7 @@ export const getRequestID = (configuration, context) => { return URL + "-" + tmpConfiguration.query.filter; } -const getURL = (configuration, api) => { - const lastIndex = api.length - 1; - - let base_url = api[lastIndex] === "/" ? api.substring(0, lastIndex) : api; - base_url += config.end_point_prefix + "v" + config.api_version.replace(".", "_") + "/"; - - return base_url + getURLEndpoint(configuration); -} - -const makeRequest = (url, headers) => { - // Encapsulates $.get in a Promise to ensure all services are having the same behavior - return new Promise((resolve, reject) => { - $.get({ - url: url, - headers: headers - }) - .done((response) => { - return resolve(response) - }) - .fail((error) => { - return reject(error) - }); - }); -} - -const getMockResponse = (configuration) => { - - let parent = configuration.query.parentResource, - parentID = configuration.query.parentID, - resource = configuration.query.resource; - - if (!resource && !parentID) { - switch (parent) { - case "enterprises": - return [ - { - "ID": "54334da-6507-484e-8d5b-11d44c4a852e", - "lastUpdatedBy":"3321e4da-6507-484e-8d5b-11d44c4a852e", - "name":"Nuage Networks", - } - ]; - default: - throw new Error("You should set a default value for = " + parent); - } - } - - if (!resource) { - // case of type enterprises/id - switch (parent) { - case "enterprises": - return [ - { - ID: parentID, - name: "Enterprise Test", - } - ] - default: - throw new Error("You should set a default value for = " + parent); - } - } - - switch (resource) { - case "nsgateways": - // case of enterprises/id/domains - return [ - { - ID: "98545-1232-3432", - name: "NSG 1", - personality: "NSG" - }, - { - ID: "906767-432432-89343", - name: "NSG 2", - personality: "NSG" - } - ] - default: - // case of enterprises/id/domains - return [ - { - ID: "12345-1232-3432", - name: "Domain 1", - }, - { - ID: "432980-432432-89343", - name: "Domain 2", - }, - { - ID: "54365-4387-948305", - name: "Domain 3", - } - ] - } -} - -export const VSDServiceTest = { - makeRequest: makeRequest, - getURL: getURL -} - -const fetch = (configuration, state) => { - let token = state.VSD.get(ActionKeyStore.TOKEN), - api = state.VSD.get(ActionKeyStore.API) || process.env.REACT_APP_VSD_API_ENDPOINT, - organization = state.VSD.get(ActionKeyStore.ORGANIZATION); - - if (!api || !token) - return Promise.reject("No VSD API endpoint specified. To configure the VSD API endpoint, provide the endpoint URL via the environment variable REACT_APP_VSD_API_ENDPOINT at compile time. For a development environment, you can set an invalid value, which will cause the system to provide mock data for testing. For example, you can add the following line to your .bashrc or .profile startup script: 'export REACT_APP_VSD_API_ENDPOINT=http://something.invalid'"); - - const url = VSDServiceTest.getURL(configuration, api), - headers = getHeaders(token, organization, configuration.query.filter); - - return VSDServiceTest.makeRequest(url, headers); -} - export const VSDService = { id: "VSD", - config: config, - getRequestID: getRequestID, - getMockResponse: getMockResponse, - fetch: fetch + getRequestID: getRequestID } diff --git a/src/configs/nuage/vsd/redux/actions.js b/src/configs/nuage/vsd/redux/actions.js deleted file mode 100644 index 8dffedde..00000000 --- a/src/configs/nuage/vsd/redux/actions.js +++ /dev/null @@ -1,20 +0,0 @@ -export const ActionTypes = { - VSD_ACTION_SET_SETTINGS: "VSD_ACTION_SET_SETTINGS", -}; - -export const ActionKeyStore = { - TOKEN: "token", - API: "api", - ORGANIZATION: "organization", -}; - -export const Actions = { - setSettings: function(token, API, organization) { - return { - type: ActionTypes.VSD_ACTION_SET_SETTINGS, - token: token, - API: API, - organization: organization - } - } -}; diff --git a/src/configs/nuage/vsd/redux/reducer.js b/src/configs/nuage/vsd/redux/reducer.js deleted file mode 100644 index 806e1947..00000000 --- a/src/configs/nuage/vsd/redux/reducer.js +++ /dev/null @@ -1,30 +0,0 @@ -import { Map } from "immutable"; -import { ActionTypes, ActionKeyStore } from "./actions"; - -let initialState = Map() // eslint-disable-line - .set(ActionKeyStore.TOKEN, null) - .set(ActionKeyStore.API, null); - -function setSettings(state, token, API, organization) { - if (!token && !API) - return state; - - return state.set(ActionKeyStore.TOKEN, token) - .set(ActionKeyStore.API, API) - .set(ActionKeyStore.ORGANIZATION, organization); -} - - -function VSDReducer(state = initialState, action) { - - switch (action.type) { - case ActionTypes.VSD_ACTION_SET_SETTINGS: - return setSettings(state, action.token, action.API, action.organization); - - default: - return state; - } -}; - - -export default VSDReducer; diff --git a/src/configs/nuage/vsd/vsd.spec.js b/src/configs/nuage/vsd/vsd.spec.js deleted file mode 100644 index 1b480d59..00000000 --- a/src/configs/nuage/vsd/vsd.spec.js +++ /dev/null @@ -1,158 +0,0 @@ -import configureMockStore from 'redux-mock-store'; -import thunk from 'redux-thunk'; -import $ from 'jquery'; -import "whatwg-fetch"; -import { VSDService, VSDServiceTest } from "./index"; -import { Map } from "immutable"; -import nock from 'nock'; - -import { ActionKeyStore } from "./redux/actions"; - -const middlewares = [thunk]; -const mockStore = configureMockStore(middlewares); - - -xdescribe('VSD service', () => { - it('should expose certain methods and have an id', () => { - let expectedProperties = [ - "id", - "config", - "getRequestID", - "getMockResponse", - "fetch" - ]; - expect(Object.keys(VSDService)).toEqual(expectedProperties) - expect(VSDService.id).toEqual("VSD") - }); - - it('should expose certain methods for tests', () => { - let expectedProperties = [ - "makeRequest", - "getURL", - ]; - expect(Object.keys(VSDServiceTest)).toEqual(expectedProperties) - }); -}); - - -xdescribe('VSDService getRequestID', () => { - it('should return the URL', () => { - let configuration = { - query: { - parentResource: "enterprises", - parentID: "{{enterpriseID}}", - resource: "{{children}}" - }}, - context = { - enterpriseID: "1234", - children: "domains", - }; - expect(VSDService.getRequestID(configuration, context)).toEqual("enterprises/1234/domains"); - }); - - it('should return defaut URL when context does not match', () => { - let configuration = { - query: { - parentResource: "enterprises", - parentID: "1234", - resource: "domains" - }}, - context = {}; - expect(VSDService.getRequestID(configuration, context)).toEqual("enterprises/1234/domains"); - }); - - it('should return null when context does not allow to parameterize configuration', () => { - let configuration = { - query: { - parentResource: "enterprises", - parentID: "{{enterpriseID}}", - resource: "domains" - }}, - context = { - enterpriseName: "ABC" - }; - expect(VSDService.getRequestID(configuration, context)).toEqual(undefined); - }); -}); - - -describe('VSDService fetch', () => { - it('should fetch information from the default host', () => { - process.env.REACT_APP_VSD_API_ENDPOINT = "http://localhost:8001/"; - - let configuration = { - query: { - parentResource: "enterprises", - parentID: "1234", - resource: "domains" - } - }; - - const headers = { - "Accept": "*/*", - "Authorization": "XREST 1234", - "Content-Type": "application/json", - "X-Nuage-Organization": "csp" - } - - const fakeState = { - VSD: Map({ - token: "1234", - }) - }; - - VSDServiceTest.makeRequest = jasmine.createSpy("makeRequest").and.callFake(() => { - return Promise.resolve(); - }); - - // VSDServiceTest.getURL = jasmine.createSpy("getURL").and.callFake(() => { - // return Promise.resolve(); - // }); - - return VSDService.fetch(configuration, fakeState).then( - (results) => { - // expect(VSDServiceTest.getURL).toHaveBeenCalledWith(null); - expect(VSDServiceTest.makeRequest).toHaveBeenCalled(); - expect(VSDServiceTest.makeRequest).toHaveBeenCalledWith("http://localhost:8001/nuage/api/v4_0/enterprises/1234/domains", headers); - } - ); - }); - - - xit('should update the organization if provided', () => { - process.env.REACT_APP_VSD_API_ENDPOINT = "http://localhost:8001/"; - - let configuration = { - query: { - parentResource: "enterprises", - parentID: "1234", - resource: "domains" - } - }; - - const headers = { - "Accept": "*/*", - "Authorization": "XREST 1234", - "Content-Type": "application/json", - "X-Nuage-Organization": "enterprise" - } - - const fakeState = { - VSD: Map({ - token: "1234", - [ActionKeyStore.ORGANIZATION]: "enterprise" - }) - }; - - VSDServiceTest.makeRequest = jasmine.createSpy("makeRequest").and.callFake(() => { - return Promise.resolve(); - }); - - return VSDService.fetch(configuration, fakeState).then( - (results) => { - expect(VSDServiceTest.makeRequest).toHaveBeenCalled(); - expect(VSDServiceTest.makeRequest).toHaveBeenCalledWith("http://localhost:8001/nuage/api/v4_0/enterprises/1234/domains", headers); - } - ); - }); -}); diff --git a/src/redux/store.js b/src/redux/store.js index 6cd6b4d9..aecf6204 100644 --- a/src/redux/store.js +++ b/src/redux/store.js @@ -7,26 +7,18 @@ import createLogger from "redux-logger"; import { updateContextMiddleware, updateVisualizationTypeMiddleware } from "./middlewares"; import configurationsReducer from "../services/configurations/redux/reducer"; -import ESReducer from "../configs/nuage/elasticsearch/redux/reducer"; import interfaceReducer from "../components/App/redux/reducer"; import messageBoxReducer from "../components/MessageBox/redux/reducer"; import serviceReducer from "../services/servicemanager/redux/reducer"; -import VSDReducer from "../configs/nuage/vsd/redux/reducer"; - -import { Actions as VSDActions, ActionKeyStore as VSDActionKeyStore} from "../configs/nuage/vsd/redux/actions" -import { Actions as ESActions, ActionKeyStore as ESActionKeyStore} from "../configs/nuage/elasticsearch/redux/actions" -import { Actions as ServiceActions } from "../services/servicemanager/redux/actions"; const loggerMiddleware = createLogger(); const appReducer = combineReducers({ configurations: configurationsReducer, - ES: ESReducer, interface: interfaceReducer, messageBox: messageBoxReducer, router: routerStateReducer, - services: serviceReducer, - VSD: VSDReducer, + services: serviceReducer }); const rootReducer = (state, action) => { @@ -46,25 +38,24 @@ const createStoreWithRouterAndMiddleware = compose( let store = createStoreWithRouterAndMiddleware(rootReducer); store.subscribe(function() { - const state = store.getState(); - - if (state.router) { + //const state = store.getState(); + /*if (state.router) { if (state.router.location.query.token && state.router.location.query.token !== state.VSD.get(VSDActionKeyStore.TOKEN)) store.dispatch(VSDActions.setSettings(state.router.location.query.token, state.router.location.query.api, state.router.location.query.org)); if (state.router.location.query.eshost && state.router.location.query.eshost !== state.ES.get(ESActionKeyStore.ES_HOST)) store.dispatch(ESActions.setSettings(state.router.location.query.eshost)); - } + }*/ // Try to fetch the enterprises to verify the given token - let configuration = { + /*let configuration = { service: "VSD", query: { parentResource: "enterprises", } } - store.dispatch(ServiceActions.fetchIfNeeded(configuration, null, true)) // No context and force cache + store.dispatch(ServiceActions.fetchIfNeeded(configuration, null, null, true)) // No context and force cache*/ }); export default store; diff --git a/src/services/configurations/index.js b/src/services/configurations/index.js index 0cf5dc5a..2de0888c 100644 --- a/src/services/configurations/index.js +++ b/src/services/configurations/index.js @@ -4,11 +4,12 @@ import { checkStatus, parseJSON } from "../common"; const config = { path: process.env.PUBLIC_URL + "/configurations/", + api: process.env.REACT_APP_API_URL, cachingTime: 30000, // (ms) -> default 30s } const fetchConfiguration = function (id, configType) { - let url = config.path + configType + "/" + id + ".json"; + let url = config.api + configType + "/" + id; return fetch(url) .then(checkStatus) diff --git a/src/services/configurations/redux/actions.js b/src/services/configurations/redux/actions.js index 1767d582..0c24021e 100644 --- a/src/services/configurations/redux/actions.js +++ b/src/services/configurations/redux/actions.js @@ -21,8 +21,7 @@ export const ActionKeyStore = { the configuration files will be fetched. */ DASHBOARDS: "dashboards", - VISUALIZATIONS: "visualizations", - QUERIES: "queries" + VISUALIZATIONS: "visualizations" }; /* @@ -34,7 +33,6 @@ export const ActionKeyStore = { ActionKeyStore.DASHBOARDS ActionKeyStore.VISUALIZATIONS - ActionKeyStore.QUERIES */ function fetch (id, configType) { @@ -91,6 +89,7 @@ function didStartRequest (id, configType) { configType: configType }; }; + function didReceiveResponse (id, configType, data) { return { type: ActionTypes.CONFIG_DID_RECEIVE_RESPONSE, @@ -99,6 +98,7 @@ function didReceiveResponse (id, configType, data) { data: data }; }; + function didReceiveError (id, configType, error) { return { type: ActionTypes.CONFIG_DID_RECEIVE_ERROR, diff --git a/src/services/configurations/redux/reducer.js b/src/services/configurations/redux/reducer.js index ddedf95b..f006f3bb 100644 --- a/src/services/configurations/redux/reducer.js +++ b/src/services/configurations/redux/reducer.js @@ -6,8 +6,7 @@ import { ConfigurationService } from "../index" let initialState = Map() // eslint-disable-line // .set(,) // Usefull if we need to set some elastic search configuration information .set(ActionKeyStore.DASHBOARDS, Map()) // eslint-disable-line - .set(ActionKeyStore.VISUALIZATIONS, Map()) // eslint-disable-line - .set(ActionKeyStore.QUERIES, Map()); // eslint-disable-line + .set(ActionKeyStore.VISUALIZATIONS, Map()); function didStartRequest(state, id, configType) { @@ -18,10 +17,21 @@ function didReceiveResponse(state, id, configType, data) { const currentDate = Date.now(), expirationDate = currentDate + ConfigurationService.config.cachingTime; - return state + let newState = state .setIn([configType, id, ActionKeyStore.IS_FETCHING], false) .setIn([configType, id, ActionKeyStore.DATA], fromJS(data)) .setIn([configType, id, ActionKeyStore.EXPIRATION_DATE], expirationDate); + + if(configType === ActionKeyStore.DASHBOARDS && data.visualizations) { + for (let viz of fromJS(data.visualizations)) { + newState = newState + .setIn([ActionKeyStore.VISUALIZATIONS, viz.get('id'), ActionKeyStore.IS_FETCHING], false) + .setIn([ActionKeyStore.VISUALIZATIONS, viz.get('id'), ActionKeyStore.DATA], viz.get('visualization')) + .setIn([ActionKeyStore.VISUALIZATIONS, viz.get('id'), ActionKeyStore.EXPIRATION_DATE], expirationDate); + } + } + + return newState; } function didReceiveError(state, id, configType, error) { diff --git a/src/services/servicemanager/index.js b/src/services/servicemanager/index.js index deb69f47..24a8460c 100644 --- a/src/services/servicemanager/index.js +++ b/src/services/servicemanager/index.js @@ -2,8 +2,12 @@ import { ElasticSearchService } from "../../configs/nuage/elasticsearch/index"; import { VSDService } from "../../configs/nuage/vsd/index"; import { MemoryService } from "../memory"; +import "whatwg-fetch"; +import { checkStatus, parseJSON } from "../common"; + let config = { timingCache: 5000, + api: process.env.REACT_APP_API_URL, } /* @@ -56,47 +60,21 @@ const getRequestID = function (queryConfiguration, context) { return service.getRequestID(queryConfiguration, context); } -/* - Tabify the results according to the service that has been used - - Arguments: - * serviceName: the service name - * response: the response results - - Returns: - An array of results -*/ -const tabify = function (queryConfiguration, response) { - const serviceName = queryConfiguration ? queryConfiguration.service : "VSD"; // In case of scripts... - - const service = getService(serviceName) +const fetchData = function(visualizationId, context) { + let url = config.api + "visualizations/fetch/" + visualizationId; - if (!service || !service.hasOwnProperty("tabify")) - return response; - - return service.tabify(response); + return fetch(url, { + method: 'POST', + body: JSON.stringify(context) + }) + .then(checkStatus) + .then(parseJSON); } - -// TODO: Temporary - Replace this part in the middleware -const executeScript = function (scriptName, context) { - // TODO: For now, let's put the script in the treeview as discussed on 11/03 - // Later, this part should be done in our middleware - let url = "./scripts/" + scriptName + ".js", - main = require(url).main; - - if (main) - return main(context); - - return false; -} - - export const ServiceManager = { - config: config, - register: register, - getService: getService, - getRequestID: getRequestID, - executeScript: executeScript, - tabify: tabify, + config, + register, + getService, + getRequestID, + fetchData } diff --git a/src/services/servicemanager/redux/actions.js b/src/services/servicemanager/redux/actions.js index 6b3679be..a97b757d 100644 --- a/src/services/servicemanager/redux/actions.js +++ b/src/services/servicemanager/redux/actions.js @@ -1,5 +1,4 @@ import { ServiceManager } from "../index" -import { parameterizedConfiguration } from "../../../utils/configurations"; export const ActionTypes = { SERVICE_MANAGER_DID_START_REQUEST: "SERVICE_MANAGER_DID_START_REQUEST", @@ -15,28 +14,6 @@ export const ActionKeyStore = { EXPIRATION_DATE: "expirationDate", }; -// TODO: Temporary - Replace this part in the middleware -function executeScript(scriptName, context) { - - const requestID = ServiceManager.getRequestID(scriptName, context); - - return (dispatch) => { - dispatch(didStartRequest(requestID)); - - return ServiceManager.executeScript(scriptName, context) - .then( - (results) => { - dispatch(didReceiveResponse(requestID, results)); - return Promise.resolve(results); - }, - (error) => { - dispatch(didReceiveError(requestID, error)); - return Promise.resolve(); - }); - } -} - - /* Make a query on the service based on the service name. @@ -45,40 +22,22 @@ function executeScript(scriptName, context) { * context: the context if the query should be parameterized * forceCache: a boolean to force storing the value for a long period */ -function fetch(query, context, forceCache) { - let service = ServiceManager.getService(query.service); +function fetch(configuration, context, queryConfiguration, forceCache) { + let service = ServiceManager.getService(configuration.queryConfiguration.service); return (dispatch, getState) => { - let requestID = service.getRequestID(query, context); - - if (context) { - const pQuery = parameterizedConfiguration(query, context); - - if (pQuery) - query = pQuery; - else - return Promise.reject("Provided context does not allow to parameterized query " + query.id); - } - + let requestID = service.getRequestID(queryConfiguration, context); dispatch(didStartRequest(requestID)); - return service.fetch(query, getState()) + return ServiceManager.fetchData(configuration.id, context) .then( (results) => { dispatch(didReceiveResponse(requestID, results)); return Promise.resolve(results); }, (error) => { - if (process.env.NODE_ENV === "development" && service.hasOwnProperty("getMockResponse")) { - const response = service.getMockResponse(query); - dispatch(didReceiveResponse(requestID, response, forceCache)); - return Promise.resolve(response); - } - else - { - dispatch(didReceiveError(requestID, error)); - return Promise.resolve(); - } + dispatch(didReceiveError(requestID, error)); + return Promise.resolve(); }); } @@ -94,17 +53,16 @@ function shouldFetch(request) { return !request.get(ActionKeyStore.IS_FETCHING) && currentDate > expireDate; } -function fetchIfNeeded(query, context, forceCache) { - +function fetchIfNeeded(configuration, context, queryConfiguration, forceCache) { // TODO: Temporary - Replace this part in the middleware - const isScript = typeof(query) === "string"; + const isScript = configuration.query ? false : true; let requestID; if (isScript) - requestID = ServiceManager.getRequestID(query, context); + requestID = ServiceManager.getRequestID(queryConfiguration, context); else { - let service = ServiceManager.getService(query.service); - requestID = service.getRequestID(query, context); + let service = ServiceManager.getService(configuration.queryConfiguration.service); + requestID = service.getRequestID(queryConfiguration, context); } return (dispatch, getState) => { @@ -115,10 +73,7 @@ function fetchIfNeeded(query, context, forceCache) { request = state.services.getIn([ActionKeyStore.REQUESTS, requestID]); if (shouldFetch(request)) { - if (isScript) - return dispatch(executeScript(query, context, forceCache)); - else - return dispatch(fetch(query, context, forceCache)); + return dispatch(fetch(configuration, context, queryConfiguration, forceCache)); } else { return Promise.resolve(); From b25797b1ac645b2e57d3999812c016f96169b2b7 Mon Sep 17 00:00:00 2001 From: nxanil Date: Tue, 30 May 2017 18:53:44 +0530 Subject: [PATCH 10/70] Moving Memory Service to Middleware --- .../app/configurations/memory/database.json | 4862 +++++++++++++++++ .../medalsEvolutionPerCountry.json | 2 +- .../app/controllers/dashboards.controller.js | 2 +- server/app/lib/servicemanager/index.js | 2 + server/app/lib/services/memory/index.js | 33 + server/app/lib/utils/fetch.js | 3 +- src/components/Visualization/index.js | 3 +- 7 files changed, 4903 insertions(+), 4 deletions(-) create mode 100644 server/app/configurations/memory/database.json create mode 100644 server/app/lib/services/memory/index.js diff --git a/server/app/configurations/memory/database.json b/server/app/configurations/memory/database.json new file mode 100644 index 00000000..2d59586a --- /dev/null +++ b/server/app/configurations/memory/database.json @@ -0,0 +1,4862 @@ +[ + { + "medalType": "Gold", + "country": "Austria", + "nbMedals": 2, + "year": "1896" + }, + { + "medalType": "Gold", + "country": "China", + "nbMedals": 0, + "year": "1896" + }, + { + "medalType": "Gold", + "country": "France", + "nbMedals": 5, + "year": "1896" + }, + { + "medalType": "Gold", + "country": "Germany", + "nbMedals": 6, + "year": "1896" + }, + { + "medalType": "Gold", + "country": "Great Britain", + "nbMedals": 2, + "year": "1896" + }, + { + "medalType": "Gold", + "country": "Italy", + "nbMedals": 0, + "year": "1896" + }, + { + "medalType": "Gold", + "country": "Russia", + "nbMedals": 0, + "year": "1896" + }, + { + "medalType": "Gold", + "country": "South Korea", + "nbMedals": 0, + "year": "1896" + }, + { + "medalType": "Gold", + "country": "Ukraine", + "nbMedals": 0, + "year": "1896" + }, + { + "medalType": "Gold", + "country": "United States", + "nbMedals": 11, + "year": "1896" + }, + { + "medalType": "Silver", + "country": "Austria", + "nbMedals": 1, + "year": "1896" + }, + { + "medalType": "Silver", + "country": "China", + "nbMedals": 0, + "year": "1896" + }, + { + "medalType": "Silver", + "country": "France", + "nbMedals": 4, + "year": "1896" + }, + { + "medalType": "Silver", + "country": "Germany", + "nbMedals": 5, + "year": "1896" + }, + { + "medalType": "Silver", + "country": "Great Britain", + "nbMedals": 3, + "year": "1896" + }, + { + "medalType": "Silver", + "country": "Italy", + "nbMedals": 0, + "year": "1896" + }, + { + "medalType": "Silver", + "country": "Russia", + "nbMedals": 0, + "year": "1896" + }, + { + "medalType": "Silver", + "country": "South Korea", + "nbMedals": 0, + "year": "1896" + }, + { + "medalType": "Silver", + "country": "Ukraine", + "nbMedals": 0, + "year": "1896" + }, + { + "medalType": "Silver", + "country": "United States", + "nbMedals": 7, + "year": "1896" + }, + { + "medalType": "Bronze", + "country": "Austria", + "nbMedals": 2, + "year": "1896" + }, + { + "medalType": "Bronze", + "country": "China", + "nbMedals": 0, + "year": "1896" + }, + { + "medalType": "Bronze", + "country": "France", + "nbMedals": 2, + "year": "1896" + }, + { + "medalType": "Bronze", + "country": "Germany", + "nbMedals": 2, + "year": "1896" + }, + { + "medalType": "Bronze", + "country": "Great Britain", + "nbMedals": 2, + "year": "1896" + }, + { + "medalType": "Bronze", + "country": "Italy", + "nbMedals": 0, + "year": "1896" + }, + { + "medalType": "Bronze", + "country": "Russia", + "nbMedals": 0, + "year": "1896" + }, + { + "medalType": "Bronze", + "country": "South Korea", + "nbMedals": 0, + "year": "1896" + }, + { + "medalType": "Bronze", + "country": "Ukraine", + "nbMedals": 0, + "year": "1896" + }, + { + "medalType": "Bronze", + "country": "United States", + "nbMedals": 2, + "year": "1896" + }, + { + "medalType": "Gold", + "country": "Austria", + "nbMedals": 0, + "year": "1900" + }, + { + "medalType": "Gold", + "country": "China", + "nbMedals": 0, + "year": "1900" + }, + { + "medalType": "Gold", + "country": "France", + "nbMedals": 26, + "year": "1900" + }, + { + "medalType": "Gold", + "country": "Germany", + "nbMedals": 4, + "year": "1900" + }, + { + "medalType": "Gold", + "country": "Great Britain", + "nbMedals": 15, + "year": "1900" + }, + { + "medalType": "Gold", + "country": "Italy", + "nbMedals": 2, + "year": "1900" + }, + { + "medalType": "Gold", + "country": "Russia", + "nbMedals": 0, + "year": "1900" + }, + { + "medalType": "Gold", + "country": "South Korea", + "nbMedals": 0, + "year": "1900" + }, + { + "medalType": "Gold", + "country": "Ukraine", + "nbMedals": 0, + "year": "1900" + }, + { + "medalType": "Gold", + "country": "United States", + "nbMedals": 19, + "year": "1900" + }, + { + "medalType": "Silver", + "country": "Austria", + "nbMedals": 3, + "year": "1900" + }, + { + "medalType": "Silver", + "country": "China", + "nbMedals": 0, + "year": "1900" + }, + { + "medalType": "Silver", + "country": "France", + "nbMedals": 41, + "year": "1900" + }, + { + "medalType": "Silver", + "country": "Germany", + "nbMedals": 2, + "year": "1900" + }, + { + "medalType": "Silver", + "country": "Great Britain", + "nbMedals": 6, + "year": "1900" + }, + { + "medalType": "Silver", + "country": "Italy", + "nbMedals": 2, + "year": "1900" + }, + { + "medalType": "Silver", + "country": "Russia", + "nbMedals": 0, + "year": "1900" + }, + { + "medalType": "Silver", + "country": "South Korea", + "nbMedals": 0, + "year": "1900" + }, + { + "medalType": "Silver", + "country": "Ukraine", + "nbMedals": 0, + "year": "1900" + }, + { + "medalType": "Silver", + "country": "United States", + "nbMedals": 14, + "year": "1900" + }, + { + "medalType": "Bronze", + "country": "Austria", + "nbMedals": 3, + "year": "1900" + }, + { + "medalType": "Bronze", + "country": "China", + "nbMedals": 0, + "year": "1900" + }, + { + "medalType": "Bronze", + "country": "France", + "nbMedals": 34, + "year": "1900" + }, + { + "medalType": "Bronze", + "country": "Germany", + "nbMedals": 2, + "year": "1900" + }, + { + "medalType": "Bronze", + "country": "Great Britain", + "nbMedals": 9, + "year": "1900" + }, + { + "medalType": "Bronze", + "country": "Italy", + "nbMedals": 0, + "year": "1900" + }, + { + "medalType": "Bronze", + "country": "Russia", + "nbMedals": 0, + "year": "1900" + }, + { + "medalType": "Bronze", + "country": "South Korea", + "nbMedals": 0, + "year": "1900" + }, + { + "medalType": "Bronze", + "country": "Ukraine", + "nbMedals": 0, + "year": "1900" + }, + { + "medalType": "Bronze", + "country": "United States", + "nbMedals": 14, + "year": "1900" + }, + { + "medalType": "Gold", + "country": "Austria", + "nbMedals": 0, + "year": "1904" + }, + { + "medalType": "Gold", + "country": "China", + "nbMedals": 0, + "year": "1904" + }, + { + "medalType": "Gold", + "country": "France", + "nbMedals": 0, + "year": "1904" + }, + { + "medalType": "Gold", + "country": "Germany", + "nbMedals": 4, + "year": "1904" + }, + { + "medalType": "Gold", + "country": "Great Britain", + "nbMedals": 1, + "year": "1904" + }, + { + "medalType": "Gold", + "country": "Italy", + "nbMedals": 0, + "year": "1904" + }, + { + "medalType": "Gold", + "country": "Russia", + "nbMedals": 0, + "year": "1904" + }, + { + "medalType": "Gold", + "country": "South Korea", + "nbMedals": 0, + "year": "1904" + }, + { + "medalType": "Gold", + "country": "Ukraine", + "nbMedals": 0, + "year": "1904" + }, + { + "medalType": "Gold", + "country": "United States", + "nbMedals": 78, + "year": "1904" + }, + { + "medalType": "Silver", + "country": "Austria", + "nbMedals": 0, + "year": "1904" + }, + { + "medalType": "Silver", + "country": "China", + "nbMedals": 0, + "year": "1904" + }, + { + "medalType": "Silver", + "country": "France", + "nbMedals": 0, + "year": "1904" + }, + { + "medalType": "Silver", + "country": "Germany", + "nbMedals": 4, + "year": "1904" + }, + { + "medalType": "Silver", + "country": "Great Britain", + "nbMedals": 1, + "year": "1904" + }, + { + "medalType": "Silver", + "country": "Italy", + "nbMedals": 0, + "year": "1904" + }, + { + "medalType": "Silver", + "country": "Russia", + "nbMedals": 0, + "year": "1904" + }, + { + "medalType": "Silver", + "country": "South Korea", + "nbMedals": 0, + "year": "1904" + }, + { + "medalType": "Silver", + "country": "Ukraine", + "nbMedals": 0, + "year": "1904" + }, + { + "medalType": "Silver", + "country": "United States", + "nbMedals": 82, + "year": "1904" + }, + { + "medalType": "Bronze", + "country": "Austria", + "nbMedals": 1, + "year": "1904" + }, + { + "medalType": "Bronze", + "country": "China", + "nbMedals": 0, + "year": "1904" + }, + { + "medalType": "Bronze", + "country": "France", + "nbMedals": 0, + "year": "1904" + }, + { + "medalType": "Bronze", + "country": "Germany", + "nbMedals": 5, + "year": "1904" + }, + { + "medalType": "Bronze", + "country": "Great Britain", + "nbMedals": 0, + "year": "1904" + }, + { + "medalType": "Bronze", + "country": "Italy", + "nbMedals": 0, + "year": "1904" + }, + { + "medalType": "Bronze", + "country": "Russia", + "nbMedals": 0, + "year": "1904" + }, + { + "medalType": "Bronze", + "country": "South Korea", + "nbMedals": 0, + "year": "1904" + }, + { + "medalType": "Bronze", + "country": "Ukraine", + "nbMedals": 0, + "year": "1904" + }, + { + "medalType": "Bronze", + "country": "United States", + "nbMedals": 79, + "year": "1904" + }, + { + "medalType": "Gold", + "country": "Austria", + "nbMedals": 0, + "year": "1908" + }, + { + "medalType": "Gold", + "country": "China", + "nbMedals": 0, + "year": "1908" + }, + { + "medalType": "Gold", + "country": "France", + "nbMedals": 5, + "year": "1908" + }, + { + "medalType": "Gold", + "country": "Germany", + "nbMedals": 3, + "year": "1908" + }, + { + "medalType": "Gold", + "country": "Great Britain", + "nbMedals": 56, + "year": "1908" + }, + { + "medalType": "Gold", + "country": "Italy", + "nbMedals": 2, + "year": "1908" + }, + { + "medalType": "Gold", + "country": "Russia", + "nbMedals": 0, + "year": "1908" + }, + { + "medalType": "Gold", + "country": "South Korea", + "nbMedals": 0, + "year": "1908" + }, + { + "medalType": "Gold", + "country": "Ukraine", + "nbMedals": 0, + "year": "1908" + }, + { + "medalType": "Gold", + "country": "United States", + "nbMedals": 23, + "year": "1908" + }, + { + "medalType": "Silver", + "country": "Austria", + "nbMedals": 0, + "year": "1908" + }, + { + "medalType": "Silver", + "country": "China", + "nbMedals": 0, + "year": "1908" + }, + { + "medalType": "Silver", + "country": "France", + "nbMedals": 5, + "year": "1908" + }, + { + "medalType": "Silver", + "country": "Germany", + "nbMedals": 5, + "year": "1908" + }, + { + "medalType": "Silver", + "country": "Great Britain", + "nbMedals": 51, + "year": "1908" + }, + { + "medalType": "Silver", + "country": "Italy", + "nbMedals": 2, + "year": "1908" + }, + { + "medalType": "Silver", + "country": "Russia", + "nbMedals": 0, + "year": "1908" + }, + { + "medalType": "Silver", + "country": "South Korea", + "nbMedals": 0, + "year": "1908" + }, + { + "medalType": "Silver", + "country": "Ukraine", + "nbMedals": 0, + "year": "1908" + }, + { + "medalType": "Silver", + "country": "United States", + "nbMedals": 12, + "year": "1908" + }, + { + "medalType": "Bronze", + "country": "Austria", + "nbMedals": 1, + "year": "1908" + }, + { + "medalType": "Bronze", + "country": "China", + "nbMedals": 0, + "year": "1908" + }, + { + "medalType": "Bronze", + "country": "France", + "nbMedals": 9, + "year": "1908" + }, + { + "medalType": "Bronze", + "country": "Germany", + "nbMedals": 5, + "year": "1908" + }, + { + "medalType": "Bronze", + "country": "Great Britain", + "nbMedals": 39, + "year": "1908" + }, + { + "medalType": "Bronze", + "country": "Italy", + "nbMedals": 0, + "year": "1908" + }, + { + "medalType": "Bronze", + "country": "Russia", + "nbMedals": 0, + "year": "1908" + }, + { + "medalType": "Bronze", + "country": "South Korea", + "nbMedals": 0, + "year": "1908" + }, + { + "medalType": "Bronze", + "country": "Ukraine", + "nbMedals": 0, + "year": "1908" + }, + { + "medalType": "Bronze", + "country": "United States", + "nbMedals": 12, + "year": "1908" + }, + { + "medalType": "Gold", + "country": "Austria", + "nbMedals": 0, + "year": "1912" + }, + { + "medalType": "Gold", + "country": "China", + "nbMedals": 0, + "year": "1912" + }, + { + "medalType": "Gold", + "country": "France", + "nbMedals": 7, + "year": "1912" + }, + { + "medalType": "Gold", + "country": "Germany", + "nbMedals": 5, + "year": "1912" + }, + { + "medalType": "Gold", + "country": "Great Britain", + "nbMedals": 10, + "year": "1912" + }, + { + "medalType": "Gold", + "country": "Italy", + "nbMedals": 3, + "year": "1912" + }, + { + "medalType": "Gold", + "country": "Russia", + "nbMedals": 0, + "year": "1912" + }, + { + "medalType": "Gold", + "country": "South Korea", + "nbMedals": 0, + "year": "1912" + }, + { + "medalType": "Gold", + "country": "Ukraine", + "nbMedals": 0, + "year": "1912" + }, + { + "medalType": "Gold", + "country": "United States", + "nbMedals": 25, + "year": "1912" + }, + { + "medalType": "Silver", + "country": "Austria", + "nbMedals": 2, + "year": "1912" + }, + { + "medalType": "Silver", + "country": "China", + "nbMedals": 0, + "year": "1912" + }, + { + "medalType": "Silver", + "country": "France", + "nbMedals": 4, + "year": "1912" + }, + { + "medalType": "Silver", + "country": "Germany", + "nbMedals": 13, + "year": "1912" + }, + { + "medalType": "Silver", + "country": "Great Britain", + "nbMedals": 15, + "year": "1912" + }, + { + "medalType": "Silver", + "country": "Italy", + "nbMedals": 1, + "year": "1912" + }, + { + "medalType": "Silver", + "country": "Russia", + "nbMedals": 0, + "year": "1912" + }, + { + "medalType": "Silver", + "country": "South Korea", + "nbMedals": 0, + "year": "1912" + }, + { + "medalType": "Silver", + "country": "Ukraine", + "nbMedals": 0, + "year": "1912" + }, + { + "medalType": "Silver", + "country": "United States", + "nbMedals": 19, + "year": "1912" + }, + { + "medalType": "Bronze", + "country": "Austria", + "nbMedals": 2, + "year": "1912" + }, + { + "medalType": "Bronze", + "country": "China", + "nbMedals": 0, + "year": "1912" + }, + { + "medalType": "Bronze", + "country": "France", + "nbMedals": 3, + "year": "1912" + }, + { + "medalType": "Bronze", + "country": "Germany", + "nbMedals": 7, + "year": "1912" + }, + { + "medalType": "Bronze", + "country": "Great Britain", + "nbMedals": 16, + "year": "1912" + }, + { + "medalType": "Bronze", + "country": "Italy", + "nbMedals": 2, + "year": "1912" + }, + { + "medalType": "Bronze", + "country": "Russia", + "nbMedals": 0, + "year": "1912" + }, + { + "medalType": "Bronze", + "country": "South Korea", + "nbMedals": 0, + "year": "1912" + }, + { + "medalType": "Bronze", + "country": "Ukraine", + "nbMedals": 0, + "year": "1912" + }, + { + "medalType": "Bronze", + "country": "United States", + "nbMedals": 19, + "year": "1912" + }, + { + "medalType": "Gold", + "country": "Austria", + "nbMedals": 0, + "year": "1920" + }, + { + "medalType": "Gold", + "country": "China", + "nbMedals": 0, + "year": "1920" + }, + { + "medalType": "Gold", + "country": "France", + "nbMedals": 9, + "year": "1920" + }, + { + "medalType": "Gold", + "country": "Germany", + "nbMedals": 0, + "year": "1920" + }, + { + "medalType": "Gold", + "country": "Great Britain", + "nbMedals": 15, + "year": "1920" + }, + { + "medalType": "Gold", + "country": "Italy", + "nbMedals": 13, + "year": "1920" + }, + { + "medalType": "Gold", + "country": "Russia", + "nbMedals": 0, + "year": "1920" + }, + { + "medalType": "Gold", + "country": "South Korea", + "nbMedals": 0, + "year": "1920" + }, + { + "medalType": "Gold", + "country": "Ukraine", + "nbMedals": 0, + "year": "1920" + }, + { + "medalType": "Gold", + "country": "United States", + "nbMedals": 41, + "year": "1920" + }, + { + "medalType": "Silver", + "country": "Austria", + "nbMedals": 0, + "year": "1920" + }, + { + "medalType": "Silver", + "country": "China", + "nbMedals": 0, + "year": "1920" + }, + { + "medalType": "Silver", + "country": "France", + "nbMedals": 19, + "year": "1920" + }, + { + "medalType": "Silver", + "country": "Germany", + "nbMedals": 0, + "year": "1920" + }, + { + "medalType": "Silver", + "country": "Great Britain", + "nbMedals": 15, + "year": "1920" + }, + { + "medalType": "Silver", + "country": "Italy", + "nbMedals": 5, + "year": "1920" + }, + { + "medalType": "Silver", + "country": "Russia", + "nbMedals": 0, + "year": "1920" + }, + { + "medalType": "Silver", + "country": "South Korea", + "nbMedals": 0, + "year": "1920" + }, + { + "medalType": "Silver", + "country": "Ukraine", + "nbMedals": 0, + "year": "1920" + }, + { + "medalType": "Silver", + "country": "United States", + "nbMedals": 27, + "year": "1920" + }, + { + "medalType": "Bronze", + "country": "Austria", + "nbMedals": 0, + "year": "1920" + }, + { + "medalType": "Bronze", + "country": "China", + "nbMedals": 0, + "year": "1920" + }, + { + "medalType": "Bronze", + "country": "France", + "nbMedals": 13, + "year": "1920" + }, + { + "medalType": "Bronze", + "country": "Germany", + "nbMedals": 0, + "year": "1920" + }, + { + "medalType": "Bronze", + "country": "Great Britain", + "nbMedals": 13, + "year": "1920" + }, + { + "medalType": "Bronze", + "country": "Italy", + "nbMedals": 5, + "year": "1920" + }, + { + "medalType": "Bronze", + "country": "Russia", + "nbMedals": 0, + "year": "1920" + }, + { + "medalType": "Bronze", + "country": "South Korea", + "nbMedals": 0, + "year": "1920" + }, + { + "medalType": "Bronze", + "country": "Ukraine", + "nbMedals": 0, + "year": "1920" + }, + { + "medalType": "Bronze", + "country": "United States", + "nbMedals": 27, + "year": "1920" + }, + { + "medalType": "Gold", + "country": "Austria", + "nbMedals": 0, + "year": "1924" + }, + { + "medalType": "Gold", + "country": "China", + "nbMedals": 0, + "year": "1924" + }, + { + "medalType": "Gold", + "country": "France", + "nbMedals": 13, + "year": "1924" + }, + { + "medalType": "Gold", + "country": "Germany", + "nbMedals": 0, + "year": "1924" + }, + { + "medalType": "Gold", + "country": "Great Britain", + "nbMedals": 9, + "year": "1924" + }, + { + "medalType": "Gold", + "country": "Italy", + "nbMedals": 8, + "year": "1924" + }, + { + "medalType": "Gold", + "country": "Russia", + "nbMedals": 0, + "year": "1924" + }, + { + "medalType": "Gold", + "country": "South Korea", + "nbMedals": 0, + "year": "1924" + }, + { + "medalType": "Gold", + "country": "Ukraine", + "nbMedals": 0, + "year": "1924" + }, + { + "medalType": "Gold", + "country": "United States", + "nbMedals": 45, + "year": "1924" + }, + { + "medalType": "Silver", + "country": "Austria", + "nbMedals": 3, + "year": "1924" + }, + { + "medalType": "Silver", + "country": "China", + "nbMedals": 0, + "year": "1924" + }, + { + "medalType": "Silver", + "country": "France", + "nbMedals": 15, + "year": "1924" + }, + { + "medalType": "Silver", + "country": "Germany", + "nbMedals": 0, + "year": "1924" + }, + { + "medalType": "Silver", + "country": "Great Britain", + "nbMedals": 13, + "year": "1924" + }, + { + "medalType": "Silver", + "country": "Italy", + "nbMedals": 3, + "year": "1924" + }, + { + "medalType": "Silver", + "country": "Russia", + "nbMedals": 0, + "year": "1924" + }, + { + "medalType": "Silver", + "country": "South Korea", + "nbMedals": 0, + "year": "1924" + }, + { + "medalType": "Silver", + "country": "Ukraine", + "nbMedals": 0, + "year": "1924" + }, + { + "medalType": "Silver", + "country": "United States", + "nbMedals": 27, + "year": "1924" + }, + { + "medalType": "Bronze", + "country": "Austria", + "nbMedals": 1, + "year": "1924" + }, + { + "medalType": "Bronze", + "country": "China", + "nbMedals": 0, + "year": "1924" + }, + { + "medalType": "Bronze", + "country": "France", + "nbMedals": 10, + "year": "1924" + }, + { + "medalType": "Bronze", + "country": "Germany", + "nbMedals": 0, + "year": "1924" + }, + { + "medalType": "Bronze", + "country": "Great Britain", + "nbMedals": 12, + "year": "1924" + }, + { + "medalType": "Bronze", + "country": "Italy", + "nbMedals": 5, + "year": "1924" + }, + { + "medalType": "Bronze", + "country": "Russia", + "nbMedals": 0, + "year": "1924" + }, + { + "medalType": "Bronze", + "country": "South Korea", + "nbMedals": 0, + "year": "1924" + }, + { + "medalType": "Bronze", + "country": "Ukraine", + "nbMedals": 0, + "year": "1924" + }, + { + "medalType": "Bronze", + "country": "United States", + "nbMedals": 27, + "year": "1924" + }, + { + "medalType": "Gold", + "country": "Austria", + "nbMedals": 2, + "year": "1928" + }, + { + "medalType": "Gold", + "country": "China", + "nbMedals": 0, + "year": "1928" + }, + { + "medalType": "Gold", + "country": "France", + "nbMedals": 6, + "year": "1928" + }, + { + "medalType": "Gold", + "country": "Germany", + "nbMedals": 10, + "year": "1928" + }, + { + "medalType": "Gold", + "country": "Great Britain", + "nbMedals": 3, + "year": "1928" + }, + { + "medalType": "Gold", + "country": "Italy", + "nbMedals": 7, + "year": "1928" + }, + { + "medalType": "Gold", + "country": "Russia", + "nbMedals": 0, + "year": "1928" + }, + { + "medalType": "Gold", + "country": "South Korea", + "nbMedals": 0, + "year": "1928" + }, + { + "medalType": "Gold", + "country": "Ukraine", + "nbMedals": 0, + "year": "1928" + }, + { + "medalType": "Gold", + "country": "United States", + "nbMedals": 22, + "year": "1928" + }, + { + "medalType": "Silver", + "country": "Austria", + "nbMedals": 0, + "year": "1928" + }, + { + "medalType": "Silver", + "country": "China", + "nbMedals": 0, + "year": "1928" + }, + { + "medalType": "Silver", + "country": "France", + "nbMedals": 10, + "year": "1928" + }, + { + "medalType": "Silver", + "country": "Germany", + "nbMedals": 7, + "year": "1928" + }, + { + "medalType": "Silver", + "country": "Great Britain", + "nbMedals": 10, + "year": "1928" + }, + { + "medalType": "Silver", + "country": "Italy", + "nbMedals": 5, + "year": "1928" + }, + { + "medalType": "Silver", + "country": "Russia", + "nbMedals": 0, + "year": "1928" + }, + { + "medalType": "Silver", + "country": "South Korea", + "nbMedals": 0, + "year": "1928" + }, + { + "medalType": "Silver", + "country": "Ukraine", + "nbMedals": 0, + "year": "1928" + }, + { + "medalType": "Silver", + "country": "United States", + "nbMedals": 18, + "year": "1928" + }, + { + "medalType": "Bronze", + "country": "Austria", + "nbMedals": 1, + "year": "1928" + }, + { + "medalType": "Bronze", + "country": "China", + "nbMedals": 0, + "year": "1928" + }, + { + "medalType": "Bronze", + "country": "France", + "nbMedals": 5, + "year": "1928" + }, + { + "medalType": "Bronze", + "country": "Germany", + "nbMedals": 14, + "year": "1928" + }, + { + "medalType": "Bronze", + "country": "Great Britain", + "nbMedals": 7, + "year": "1928" + }, + { + "medalType": "Bronze", + "country": "Italy", + "nbMedals": 7, + "year": "1928" + }, + { + "medalType": "Bronze", + "country": "Russia", + "nbMedals": 0, + "year": "1928" + }, + { + "medalType": "Bronze", + "country": "South Korea", + "nbMedals": 0, + "year": "1928" + }, + { + "medalType": "Bronze", + "country": "Ukraine", + "nbMedals": 0, + "year": "1928" + }, + { + "medalType": "Bronze", + "country": "United States", + "nbMedals": 16, + "year": "1928" + }, + { + "medalType": "Gold", + "country": "Austria", + "nbMedals": 1, + "year": "1932" + }, + { + "medalType": "Gold", + "country": "China", + "nbMedals": 0, + "year": "1932" + }, + { + "medalType": "Gold", + "country": "France", + "nbMedals": 10, + "year": "1932" + }, + { + "medalType": "Gold", + "country": "Germany", + "nbMedals": 3, + "year": "1932" + }, + { + "medalType": "Gold", + "country": "Great Britain", + "nbMedals": 4, + "year": "1932" + }, + { + "medalType": "Gold", + "country": "Italy", + "nbMedals": 12, + "year": "1932" + }, + { + "medalType": "Gold", + "country": "Russia", + "nbMedals": 0, + "year": "1932" + }, + { + "medalType": "Gold", + "country": "South Korea", + "nbMedals": 0, + "year": "1932" + }, + { + "medalType": "Gold", + "country": "Ukraine", + "nbMedals": 0, + "year": "1932" + }, + { + "medalType": "Gold", + "country": "United States", + "nbMedals": 41, + "year": "1932" + }, + { + "medalType": "Silver", + "country": "Austria", + "nbMedals": 1, + "year": "1932" + }, + { + "medalType": "Silver", + "country": "China", + "nbMedals": 0, + "year": "1932" + }, + { + "medalType": "Silver", + "country": "France", + "nbMedals": 5, + "year": "1932" + }, + { + "medalType": "Silver", + "country": "Germany", + "nbMedals": 12, + "year": "1932" + }, + { + "medalType": "Silver", + "country": "Great Britain", + "nbMedals": 7, + "year": "1932" + }, + { + "medalType": "Silver", + "country": "Italy", + "nbMedals": 12, + "year": "1932" + }, + { + "medalType": "Silver", + "country": "Russia", + "nbMedals": 0, + "year": "1932" + }, + { + "medalType": "Silver", + "country": "South Korea", + "nbMedals": 0, + "year": "1932" + }, + { + "medalType": "Silver", + "country": "Ukraine", + "nbMedals": 0, + "year": "1932" + }, + { + "medalType": "Silver", + "country": "United States", + "nbMedals": 32, + "year": "1932" + }, + { + "medalType": "Bronze", + "country": "Austria", + "nbMedals": 3, + "year": "1932" + }, + { + "medalType": "Bronze", + "country": "China", + "nbMedals": 0, + "year": "1932" + }, + { + "medalType": "Bronze", + "country": "France", + "nbMedals": 4, + "year": "1932" + }, + { + "medalType": "Bronze", + "country": "Germany", + "nbMedals": 5, + "year": "1932" + }, + { + "medalType": "Bronze", + "country": "Great Britain", + "nbMedals": 5, + "year": "1932" + }, + { + "medalType": "Bronze", + "country": "Italy", + "nbMedals": 12, + "year": "1932" + }, + { + "medalType": "Bronze", + "country": "Russia", + "nbMedals": 0, + "year": "1932" + }, + { + "medalType": "Bronze", + "country": "South Korea", + "nbMedals": 0, + "year": "1932" + }, + { + "medalType": "Bronze", + "country": "Ukraine", + "nbMedals": 0, + "year": "1932" + }, + { + "medalType": "Bronze", + "country": "United States", + "nbMedals": 30, + "year": "1932" + }, + { + "medalType": "Gold", + "country": "Austria", + "nbMedals": 4, + "year": "1936" + }, + { + "medalType": "Gold", + "country": "China", + "nbMedals": 0, + "year": "1936" + }, + { + "medalType": "Gold", + "country": "France", + "nbMedals": 7, + "year": "1936" + }, + { + "medalType": "Gold", + "country": "Germany", + "nbMedals": 33, + "year": "1936" + }, + { + "medalType": "Gold", + "country": "Great Britain", + "nbMedals": 4, + "year": "1936" + }, + { + "medalType": "Gold", + "country": "Italy", + "nbMedals": 8, + "year": "1936" + }, + { + "medalType": "Gold", + "country": "Russia", + "nbMedals": 0, + "year": "1936" + }, + { + "medalType": "Gold", + "country": "South Korea", + "nbMedals": 0, + "year": "1936" + }, + { + "medalType": "Gold", + "country": "Ukraine", + "nbMedals": 0, + "year": "1936" + }, + { + "medalType": "Gold", + "country": "United States", + "nbMedals": 24, + "year": "1936" + }, + { + "medalType": "Silver", + "country": "Austria", + "nbMedals": 6, + "year": "1936" + }, + { + "medalType": "Silver", + "country": "China", + "nbMedals": 0, + "year": "1936" + }, + { + "medalType": "Silver", + "country": "France", + "nbMedals": 6, + "year": "1936" + }, + { + "medalType": "Silver", + "country": "Germany", + "nbMedals": 26, + "year": "1936" + }, + { + "medalType": "Silver", + "country": "Great Britain", + "nbMedals": 7, + "year": "1936" + }, + { + "medalType": "Silver", + "country": "Italy", + "nbMedals": 9, + "year": "1936" + }, + { + "medalType": "Silver", + "country": "Russia", + "nbMedals": 0, + "year": "1936" + }, + { + "medalType": "Silver", + "country": "South Korea", + "nbMedals": 0, + "year": "1936" + }, + { + "medalType": "Silver", + "country": "Ukraine", + "nbMedals": 0, + "year": "1936" + }, + { + "medalType": "Silver", + "country": "United States", + "nbMedals": 20, + "year": "1936" + }, + { + "medalType": "Bronze", + "country": "Austria", + "nbMedals": 3, + "year": "1936" + }, + { + "medalType": "Bronze", + "country": "China", + "nbMedals": 0, + "year": "1936" + }, + { + "medalType": "Bronze", + "country": "France", + "nbMedals": 6, + "year": "1936" + }, + { + "medalType": "Bronze", + "country": "Germany", + "nbMedals": 30, + "year": "1936" + }, + { + "medalType": "Bronze", + "country": "Great Britain", + "nbMedals": 3, + "year": "1936" + }, + { + "medalType": "Bronze", + "country": "Italy", + "nbMedals": 5, + "year": "1936" + }, + { + "medalType": "Bronze", + "country": "Russia", + "nbMedals": 0, + "year": "1936" + }, + { + "medalType": "Bronze", + "country": "South Korea", + "nbMedals": 0, + "year": "1936" + }, + { + "medalType": "Bronze", + "country": "Ukraine", + "nbMedals": 0, + "year": "1936" + }, + { + "medalType": "Bronze", + "country": "United States", + "nbMedals": 12, + "year": "1936" + }, + { + "medalType": "Gold", + "country": "Austria", + "nbMedals": 1, + "year": "1948" + }, + { + "medalType": "Gold", + "country": "China", + "nbMedals": 0, + "year": "1948" + }, + { + "medalType": "Gold", + "country": "France", + "nbMedals": 10, + "year": "1948" + }, + { + "medalType": "Gold", + "country": "Germany", + "nbMedals": 0, + "year": "1948" + }, + { + "medalType": "Gold", + "country": "Great Britain", + "nbMedals": 3, + "year": "1948" + }, + { + "medalType": "Gold", + "country": "Italy", + "nbMedals": 8, + "year": "1948" + }, + { + "medalType": "Gold", + "country": "Russia", + "nbMedals": 0, + "year": "1948" + }, + { + "medalType": "Gold", + "country": "South Korea", + "nbMedals": 0, + "year": "1948" + }, + { + "medalType": "Gold", + "country": "Ukraine", + "nbMedals": 0, + "year": "1948" + }, + { + "medalType": "Gold", + "country": "United States", + "nbMedals": 38, + "year": "1948" + }, + { + "medalType": "Silver", + "country": "Austria", + "nbMedals": 0, + "year": "1948" + }, + { + "medalType": "Silver", + "country": "China", + "nbMedals": 0, + "year": "1948" + }, + { + "medalType": "Silver", + "country": "France", + "nbMedals": 6, + "year": "1948" + }, + { + "medalType": "Silver", + "country": "Germany", + "nbMedals": 0, + "year": "1948" + }, + { + "medalType": "Silver", + "country": "Great Britain", + "nbMedals": 14, + "year": "1948" + }, + { + "medalType": "Silver", + "country": "Italy", + "nbMedals": 11, + "year": "1948" + }, + { + "medalType": "Silver", + "country": "Russia", + "nbMedals": 0, + "year": "1948" + }, + { + "medalType": "Silver", + "country": "South Korea", + "nbMedals": 0, + "year": "1948" + }, + { + "medalType": "Silver", + "country": "Ukraine", + "nbMedals": 0, + "year": "1948" + }, + { + "medalType": "Silver", + "country": "United States", + "nbMedals": 27, + "year": "1948" + }, + { + "medalType": "Bronze", + "country": "Austria", + "nbMedals": 3, + "year": "1948" + }, + { + "medalType": "Bronze", + "country": "China", + "nbMedals": 0, + "year": "1948" + }, + { + "medalType": "Bronze", + "country": "France", + "nbMedals": 13, + "year": "1948" + }, + { + "medalType": "Bronze", + "country": "Germany", + "nbMedals": 0, + "year": "1948" + }, + { + "medalType": "Bronze", + "country": "Great Britain", + "nbMedals": 6, + "year": "1948" + }, + { + "medalType": "Bronze", + "country": "Italy", + "nbMedals": 8, + "year": "1948" + }, + { + "medalType": "Bronze", + "country": "Russia", + "nbMedals": 0, + "year": "1948" + }, + { + "medalType": "Bronze", + "country": "South Korea", + "nbMedals": 2, + "year": "1948" + }, + { + "medalType": "Bronze", + "country": "Ukraine", + "nbMedals": 0, + "year": "1948" + }, + { + "medalType": "Bronze", + "country": "United States", + "nbMedals": 19, + "year": "1948" + }, + { + "medalType": "Gold", + "country": "Austria", + "nbMedals": 0, + "year": "1952" + }, + { + "medalType": "Gold", + "country": "China", + "nbMedals": 0, + "year": "1952" + }, + { + "medalType": "Gold", + "country": "France", + "nbMedals": 6, + "year": "1952" + }, + { + "medalType": "Gold", + "country": "Germany", + "nbMedals": 0, + "year": "1952" + }, + { + "medalType": "Gold", + "country": "Great Britain", + "nbMedals": 1, + "year": "1952" + }, + { + "medalType": "Gold", + "country": "Italy", + "nbMedals": 8, + "year": "1952" + }, + { + "medalType": "Gold", + "country": "Russia", + "nbMedals": 0, + "year": "1952" + }, + { + "medalType": "Gold", + "country": "South Korea", + "nbMedals": 0, + "year": "1952" + }, + { + "medalType": "Gold", + "country": "Ukraine", + "nbMedals": 0, + "year": "1952" + }, + { + "medalType": "Gold", + "country": "United States", + "nbMedals": 40, + "year": "1952" + }, + { + "medalType": "Silver", + "country": "Austria", + "nbMedals": 1, + "year": "1952" + }, + { + "medalType": "Silver", + "country": "China", + "nbMedals": 0, + "year": "1952" + }, + { + "medalType": "Silver", + "country": "France", + "nbMedals": 6, + "year": "1952" + }, + { + "medalType": "Silver", + "country": "Germany", + "nbMedals": 7, + "year": "1952" + }, + { + "medalType": "Silver", + "country": "Great Britain", + "nbMedals": 2, + "year": "1952" + }, + { + "medalType": "Silver", + "country": "Italy", + "nbMedals": 9, + "year": "1952" + }, + { + "medalType": "Silver", + "country": "Russia", + "nbMedals": 0, + "year": "1952" + }, + { + "medalType": "Silver", + "country": "South Korea", + "nbMedals": 0, + "year": "1952" + }, + { + "medalType": "Silver", + "country": "Ukraine", + "nbMedals": 0, + "year": "1952" + }, + { + "medalType": "Silver", + "country": "United States", + "nbMedals": 19, + "year": "1952" + }, + { + "medalType": "Bronze", + "country": "Austria", + "nbMedals": 1, + "year": "1952" + }, + { + "medalType": "Bronze", + "country": "China", + "nbMedals": 0, + "year": "1952" + }, + { + "medalType": "Bronze", + "country": "France", + "nbMedals": 6, + "year": "1952" + }, + { + "medalType": "Bronze", + "country": "Germany", + "nbMedals": 17, + "year": "1952" + }, + { + "medalType": "Bronze", + "country": "Great Britain", + "nbMedals": 8, + "year": "1952" + }, + { + "medalType": "Bronze", + "country": "Italy", + "nbMedals": 4, + "year": "1952" + }, + { + "medalType": "Bronze", + "country": "Russia", + "nbMedals": 0, + "year": "1952" + }, + { + "medalType": "Bronze", + "country": "South Korea", + "nbMedals": 2, + "year": "1952" + }, + { + "medalType": "Bronze", + "country": "Ukraine", + "nbMedals": 0, + "year": "1952" + }, + { + "medalType": "Bronze", + "country": "United States", + "nbMedals": 17, + "year": "1952" + }, + { + "medalType": "Gold", + "country": "Austria", + "nbMedals": 0, + "year": "1956" + }, + { + "medalType": "Gold", + "country": "China", + "nbMedals": 0, + "year": "1956" + }, + { + "medalType": "Gold", + "country": "France", + "nbMedals": 4, + "year": "1956" + }, + { + "medalType": "Gold", + "country": "Germany", + "nbMedals": 6, + "year": "1956" + }, + { + "medalType": "Gold", + "country": "Great Britain", + "nbMedals": 6, + "year": "1956" + }, + { + "medalType": "Gold", + "country": "Italy", + "nbMedals": 8, + "year": "1956" + }, + { + "medalType": "Gold", + "country": "Russia", + "nbMedals": 0, + "year": "1956" + }, + { + "medalType": "Gold", + "country": "South Korea", + "nbMedals": 0, + "year": "1956" + }, + { + "medalType": "Gold", + "country": "Ukraine", + "nbMedals": 0, + "year": "1956" + }, + { + "medalType": "Gold", + "country": "United States", + "nbMedals": 32, + "year": "1956" + }, + { + "medalType": "Silver", + "country": "Austria", + "nbMedals": 0, + "year": "1956" + }, + { + "medalType": "Silver", + "country": "China", + "nbMedals": 0, + "year": "1956" + }, + { + "medalType": "Silver", + "country": "France", + "nbMedals": 4, + "year": "1956" + }, + { + "medalType": "Silver", + "country": "Germany", + "nbMedals": 13, + "year": "1956" + }, + { + "medalType": "Silver", + "country": "Great Britain", + "nbMedals": 7, + "year": "1956" + }, + { + "medalType": "Silver", + "country": "Italy", + "nbMedals": 8, + "year": "1956" + }, + { + "medalType": "Silver", + "country": "Russia", + "nbMedals": 0, + "year": "1956" + }, + { + "medalType": "Silver", + "country": "South Korea", + "nbMedals": 1, + "year": "1956" + }, + { + "medalType": "Silver", + "country": "Ukraine", + "nbMedals": 0, + "year": "1956" + }, + { + "medalType": "Silver", + "country": "United States", + "nbMedals": 25, + "year": "1956" + }, + { + "medalType": "Bronze", + "country": "Austria", + "nbMedals": 2, + "year": "1956" + }, + { + "medalType": "Bronze", + "country": "China", + "nbMedals": 0, + "year": "1956" + }, + { + "medalType": "Bronze", + "country": "France", + "nbMedals": 6, + "year": "1956" + }, + { + "medalType": "Bronze", + "country": "Germany", + "nbMedals": 7, + "year": "1956" + }, + { + "medalType": "Bronze", + "country": "Great Britain", + "nbMedals": 11, + "year": "1956" + }, + { + "medalType": "Bronze", + "country": "Italy", + "nbMedals": 9, + "year": "1956" + }, + { + "medalType": "Bronze", + "country": "Russia", + "nbMedals": 0, + "year": "1956" + }, + { + "medalType": "Bronze", + "country": "South Korea", + "nbMedals": 1, + "year": "1956" + }, + { + "medalType": "Bronze", + "country": "Ukraine", + "nbMedals": 0, + "year": "1956" + }, + { + "medalType": "Bronze", + "country": "United States", + "nbMedals": 17, + "year": "1956" + }, + { + "medalType": "Gold", + "country": "Austria", + "nbMedals": 1, + "year": "1960" + }, + { + "medalType": "Gold", + "country": "China", + "nbMedals": 0, + "year": "1960" + }, + { + "medalType": "Gold", + "country": "France", + "nbMedals": 0, + "year": "1960" + }, + { + "medalType": "Gold", + "country": "Germany", + "nbMedals": 12, + "year": "1960" + }, + { + "medalType": "Gold", + "country": "Great Britain", + "nbMedals": 2, + "year": "1960" + }, + { + "medalType": "Gold", + "country": "Italy", + "nbMedals": 13, + "year": "1960" + }, + { + "medalType": "Gold", + "country": "Russia", + "nbMedals": 0, + "year": "1960" + }, + { + "medalType": "Gold", + "country": "South Korea", + "nbMedals": 0, + "year": "1960" + }, + { + "medalType": "Gold", + "country": "Ukraine", + "nbMedals": 0, + "year": "1960" + }, + { + "medalType": "Gold", + "country": "United States", + "nbMedals": 34, + "year": "1960" + }, + { + "medalType": "Silver", + "country": "Austria", + "nbMedals": 1, + "year": "1960" + }, + { + "medalType": "Silver", + "country": "China", + "nbMedals": 0, + "year": "1960" + }, + { + "medalType": "Silver", + "country": "France", + "nbMedals": 2, + "year": "1960" + }, + { + "medalType": "Silver", + "country": "Germany", + "nbMedals": 19, + "year": "1960" + }, + { + "medalType": "Silver", + "country": "Great Britain", + "nbMedals": 6, + "year": "1960" + }, + { + "medalType": "Silver", + "country": "Italy", + "nbMedals": 10, + "year": "1960" + }, + { + "medalType": "Silver", + "country": "Russia", + "nbMedals": 0, + "year": "1960" + }, + { + "medalType": "Silver", + "country": "South Korea", + "nbMedals": 0, + "year": "1960" + }, + { + "medalType": "Silver", + "country": "Ukraine", + "nbMedals": 0, + "year": "1960" + }, + { + "medalType": "Silver", + "country": "United States", + "nbMedals": 21, + "year": "1960" + }, + { + "medalType": "Bronze", + "country": "Austria", + "nbMedals": 0, + "year": "1960" + }, + { + "medalType": "Bronze", + "country": "China", + "nbMedals": 0, + "year": "1960" + }, + { + "medalType": "Bronze", + "country": "France", + "nbMedals": 3, + "year": "1960" + }, + { + "medalType": "Bronze", + "country": "Germany", + "nbMedals": 11, + "year": "1960" + }, + { + "medalType": "Bronze", + "country": "Great Britain", + "nbMedals": 12, + "year": "1960" + }, + { + "medalType": "Bronze", + "country": "Italy", + "nbMedals": 13, + "year": "1960" + }, + { + "medalType": "Bronze", + "country": "Russia", + "nbMedals": 0, + "year": "1960" + }, + { + "medalType": "Bronze", + "country": "South Korea", + "nbMedals": 0, + "year": "1960" + }, + { + "medalType": "Bronze", + "country": "Ukraine", + "nbMedals": 0, + "year": "1960" + }, + { + "medalType": "Bronze", + "country": "United States", + "nbMedals": 16, + "year": "1960" + }, + { + "medalType": "Gold", + "country": "Austria", + "nbMedals": 0, + "year": "1964" + }, + { + "medalType": "Gold", + "country": "China", + "nbMedals": 0, + "year": "1964" + }, + { + "medalType": "Gold", + "country": "France", + "nbMedals": 1, + "year": "1964" + }, + { + "medalType": "Gold", + "country": "Germany", + "nbMedals": 10, + "year": "1964" + }, + { + "medalType": "Gold", + "country": "Great Britain", + "nbMedals": 4, + "year": "1964" + }, + { + "medalType": "Gold", + "country": "Italy", + "nbMedals": 10, + "year": "1964" + }, + { + "medalType": "Gold", + "country": "Russia", + "nbMedals": 0, + "year": "1964" + }, + { + "medalType": "Gold", + "country": "South Korea", + "nbMedals": 0, + "year": "1964" + }, + { + "medalType": "Gold", + "country": "Ukraine", + "nbMedals": 0, + "year": "1964" + }, + { + "medalType": "Gold", + "country": "United States", + "nbMedals": 36, + "year": "1964" + }, + { + "medalType": "Silver", + "country": "Austria", + "nbMedals": 0, + "year": "1964" + }, + { + "medalType": "Silver", + "country": "China", + "nbMedals": 0, + "year": "1964" + }, + { + "medalType": "Silver", + "country": "France", + "nbMedals": 8, + "year": "1964" + }, + { + "medalType": "Silver", + "country": "Germany", + "nbMedals": 22, + "year": "1964" + }, + { + "medalType": "Silver", + "country": "Great Britain", + "nbMedals": 12, + "year": "1964" + }, + { + "medalType": "Silver", + "country": "Italy", + "nbMedals": 10, + "year": "1964" + }, + { + "medalType": "Silver", + "country": "Russia", + "nbMedals": 0, + "year": "1964" + }, + { + "medalType": "Silver", + "country": "South Korea", + "nbMedals": 2, + "year": "1964" + }, + { + "medalType": "Silver", + "country": "Ukraine", + "nbMedals": 0, + "year": "1964" + }, + { + "medalType": "Silver", + "country": "United States", + "nbMedals": 26, + "year": "1964" + }, + { + "medalType": "Bronze", + "country": "Austria", + "nbMedals": 0, + "year": "1964" + }, + { + "medalType": "Bronze", + "country": "China", + "nbMedals": 0, + "year": "1964" + }, + { + "medalType": "Bronze", + "country": "France", + "nbMedals": 6, + "year": "1964" + }, + { + "medalType": "Bronze", + "country": "Germany", + "nbMedals": 18, + "year": "1964" + }, + { + "medalType": "Bronze", + "country": "Great Britain", + "nbMedals": 2, + "year": "1964" + }, + { + "medalType": "Bronze", + "country": "Italy", + "nbMedals": 7, + "year": "1964" + }, + { + "medalType": "Bronze", + "country": "Russia", + "nbMedals": 0, + "year": "1964" + }, + { + "medalType": "Bronze", + "country": "South Korea", + "nbMedals": 1, + "year": "1964" + }, + { + "medalType": "Bronze", + "country": "Ukraine", + "nbMedals": 0, + "year": "1964" + }, + { + "medalType": "Bronze", + "country": "United States", + "nbMedals": 28, + "year": "1964" + }, + { + "medalType": "Gold", + "country": "Austria", + "nbMedals": 0, + "year": "1968" + }, + { + "medalType": "Gold", + "country": "China", + "nbMedals": 0, + "year": "1968" + }, + { + "medalType": "Gold", + "country": "France", + "nbMedals": 7, + "year": "1968" + }, + { + "medalType": "Gold", + "country": "Germany", + "nbMedals": 0, + "year": "1968" + }, + { + "medalType": "Gold", + "country": "Great Britain", + "nbMedals": 5, + "year": "1968" + }, + { + "medalType": "Gold", + "country": "Italy", + "nbMedals": 3, + "year": "1968" + }, + { + "medalType": "Gold", + "country": "Russia", + "nbMedals": 0, + "year": "1968" + }, + { + "medalType": "Gold", + "country": "South Korea", + "nbMedals": 0, + "year": "1968" + }, + { + "medalType": "Gold", + "country": "Ukraine", + "nbMedals": 0, + "year": "1968" + }, + { + "medalType": "Gold", + "country": "United States", + "nbMedals": 45, + "year": "1968" + }, + { + "medalType": "Silver", + "country": "Austria", + "nbMedals": 2, + "year": "1968" + }, + { + "medalType": "Silver", + "country": "China", + "nbMedals": 0, + "year": "1968" + }, + { + "medalType": "Silver", + "country": "France", + "nbMedals": 3, + "year": "1968" + }, + { + "medalType": "Silver", + "country": "Germany", + "nbMedals": 0, + "year": "1968" + }, + { + "medalType": "Silver", + "country": "Great Britain", + "nbMedals": 5, + "year": "1968" + }, + { + "medalType": "Silver", + "country": "Italy", + "nbMedals": 4, + "year": "1968" + }, + { + "medalType": "Silver", + "country": "Russia", + "nbMedals": 0, + "year": "1968" + }, + { + "medalType": "Silver", + "country": "South Korea", + "nbMedals": 1, + "year": "1968" + }, + { + "medalType": "Silver", + "country": "Ukraine", + "nbMedals": 0, + "year": "1968" + }, + { + "medalType": "Silver", + "country": "United States", + "nbMedals": 28, + "year": "1968" + }, + { + "medalType": "Bronze", + "country": "Austria", + "nbMedals": 2, + "year": "1968" + }, + { + "medalType": "Bronze", + "country": "China", + "nbMedals": 0, + "year": "1968" + }, + { + "medalType": "Bronze", + "country": "France", + "nbMedals": 5, + "year": "1968" + }, + { + "medalType": "Bronze", + "country": "Germany", + "nbMedals": 0, + "year": "1968" + }, + { + "medalType": "Bronze", + "country": "Great Britain", + "nbMedals": 3, + "year": "1968" + }, + { + "medalType": "Bronze", + "country": "Italy", + "nbMedals": 9, + "year": "1968" + }, + { + "medalType": "Bronze", + "country": "Russia", + "nbMedals": 0, + "year": "1968" + }, + { + "medalType": "Bronze", + "country": "South Korea", + "nbMedals": 1, + "year": "1968" + }, + { + "medalType": "Bronze", + "country": "Ukraine", + "nbMedals": 0, + "year": "1968" + }, + { + "medalType": "Bronze", + "country": "United States", + "nbMedals": 34, + "year": "1968" + }, + { + "medalType": "Gold", + "country": "Austria", + "nbMedals": 0, + "year": "1972" + }, + { + "medalType": "Gold", + "country": "China", + "nbMedals": 0, + "year": "1972" + }, + { + "medalType": "Gold", + "country": "France", + "nbMedals": 2, + "year": "1972" + }, + { + "medalType": "Gold", + "country": "Germany", + "nbMedals": 0, + "year": "1972" + }, + { + "medalType": "Gold", + "country": "Great Britain", + "nbMedals": 4, + "year": "1972" + }, + { + "medalType": "Gold", + "country": "Italy", + "nbMedals": 5, + "year": "1972" + }, + { + "medalType": "Gold", + "country": "Russia", + "nbMedals": 0, + "year": "1972" + }, + { + "medalType": "Gold", + "country": "South Korea", + "nbMedals": 0, + "year": "1972" + }, + { + "medalType": "Gold", + "country": "Ukraine", + "nbMedals": 0, + "year": "1972" + }, + { + "medalType": "Gold", + "country": "United States", + "nbMedals": 33, + "year": "1972" + }, + { + "medalType": "Silver", + "country": "Austria", + "nbMedals": 1, + "year": "1972" + }, + { + "medalType": "Silver", + "country": "China", + "nbMedals": 0, + "year": "1972" + }, + { + "medalType": "Silver", + "country": "France", + "nbMedals": 4, + "year": "1972" + }, + { + "medalType": "Silver", + "country": "Germany", + "nbMedals": 0, + "year": "1972" + }, + { + "medalType": "Silver", + "country": "Great Britain", + "nbMedals": 5, + "year": "1972" + }, + { + "medalType": "Silver", + "country": "Italy", + "nbMedals": 3, + "year": "1972" + }, + { + "medalType": "Silver", + "country": "Russia", + "nbMedals": 0, + "year": "1972" + }, + { + "medalType": "Silver", + "country": "South Korea", + "nbMedals": 1, + "year": "1972" + }, + { + "medalType": "Silver", + "country": "Ukraine", + "nbMedals": 0, + "year": "1972" + }, + { + "medalType": "Silver", + "country": "United States", + "nbMedals": 31, + "year": "1972" + }, + { + "medalType": "Bronze", + "country": "Austria", + "nbMedals": 2, + "year": "1972" + }, + { + "medalType": "Bronze", + "country": "China", + "nbMedals": 0, + "year": "1972" + }, + { + "medalType": "Bronze", + "country": "France", + "nbMedals": 7, + "year": "1972" + }, + { + "medalType": "Bronze", + "country": "Germany", + "nbMedals": 0, + "year": "1972" + }, + { + "medalType": "Bronze", + "country": "Great Britain", + "nbMedals": 9, + "year": "1972" + }, + { + "medalType": "Bronze", + "country": "Italy", + "nbMedals": 10, + "year": "1972" + }, + { + "medalType": "Bronze", + "country": "Russia", + "nbMedals": 0, + "year": "1972" + }, + { + "medalType": "Bronze", + "country": "South Korea", + "nbMedals": 0, + "year": "1972" + }, + { + "medalType": "Bronze", + "country": "Ukraine", + "nbMedals": 0, + "year": "1972" + }, + { + "medalType": "Bronze", + "country": "United States", + "nbMedals": 30, + "year": "1972" + }, + { + "medalType": "Gold", + "country": "Austria", + "nbMedals": 0, + "year": "1976" + }, + { + "medalType": "Gold", + "country": "China", + "nbMedals": 0, + "year": "1976" + }, + { + "medalType": "Gold", + "country": "France", + "nbMedals": 2, + "year": "1976" + }, + { + "medalType": "Gold", + "country": "Germany", + "nbMedals": 0, + "year": "1976" + }, + { + "medalType": "Gold", + "country": "Great Britain", + "nbMedals": 3, + "year": "1976" + }, + { + "medalType": "Gold", + "country": "Italy", + "nbMedals": 2, + "year": "1976" + }, + { + "medalType": "Gold", + "country": "Russia", + "nbMedals": 0, + "year": "1976" + }, + { + "medalType": "Gold", + "country": "South Korea", + "nbMedals": 1, + "year": "1976" + }, + { + "medalType": "Gold", + "country": "Ukraine", + "nbMedals": 0, + "year": "1976" + }, + { + "medalType": "Gold", + "country": "United States", + "nbMedals": 34, + "year": "1976" + }, + { + "medalType": "Silver", + "country": "Austria", + "nbMedals": 0, + "year": "1976" + }, + { + "medalType": "Silver", + "country": "China", + "nbMedals": 0, + "year": "1976" + }, + { + "medalType": "Silver", + "country": "France", + "nbMedals": 3, + "year": "1976" + }, + { + "medalType": "Silver", + "country": "Germany", + "nbMedals": 0, + "year": "1976" + }, + { + "medalType": "Silver", + "country": "Great Britain", + "nbMedals": 5, + "year": "1976" + }, + { + "medalType": "Silver", + "country": "Italy", + "nbMedals": 7, + "year": "1976" + }, + { + "medalType": "Silver", + "country": "Russia", + "nbMedals": 0, + "year": "1976" + }, + { + "medalType": "Silver", + "country": "South Korea", + "nbMedals": 1, + "year": "1976" + }, + { + "medalType": "Silver", + "country": "Ukraine", + "nbMedals": 0, + "year": "1976" + }, + { + "medalType": "Silver", + "country": "United States", + "nbMedals": 35, + "year": "1976" + }, + { + "medalType": "Bronze", + "country": "Austria", + "nbMedals": 1, + "year": "1976" + }, + { + "medalType": "Bronze", + "country": "China", + "nbMedals": 0, + "year": "1976" + }, + { + "medalType": "Bronze", + "country": "France", + "nbMedals": 4, + "year": "1976" + }, + { + "medalType": "Bronze", + "country": "Germany", + "nbMedals": 0, + "year": "1976" + }, + { + "medalType": "Bronze", + "country": "Great Britain", + "nbMedals": 5, + "year": "1976" + }, + { + "medalType": "Bronze", + "country": "Italy", + "nbMedals": 4, + "year": "1976" + }, + { + "medalType": "Bronze", + "country": "Russia", + "nbMedals": 0, + "year": "1976" + }, + { + "medalType": "Bronze", + "country": "South Korea", + "nbMedals": 4, + "year": "1976" + }, + { + "medalType": "Bronze", + "country": "Ukraine", + "nbMedals": 0, + "year": "1976" + }, + { + "medalType": "Bronze", + "country": "United States", + "nbMedals": 25, + "year": "1976" + }, + { + "medalType": "Gold", + "country": "Austria", + "nbMedals": 1, + "year": "1980" + }, + { + "medalType": "Gold", + "country": "China", + "nbMedals": 0, + "year": "1980" + }, + { + "medalType": "Gold", + "country": "France", + "nbMedals": 6, + "year": "1980" + }, + { + "medalType": "Gold", + "country": "Germany", + "nbMedals": 0, + "year": "1980" + }, + { + "medalType": "Gold", + "country": "Great Britain", + "nbMedals": 5, + "year": "1980" + }, + { + "medalType": "Gold", + "country": "Italy", + "nbMedals": 8, + "year": "1980" + }, + { + "medalType": "Gold", + "country": "Russia", + "nbMedals": 0, + "year": "1980" + }, + { + "medalType": "Gold", + "country": "South Korea", + "nbMedals": 0, + "year": "1980" + }, + { + "medalType": "Gold", + "country": "Ukraine", + "nbMedals": 0, + "year": "1980" + }, + { + "medalType": "Gold", + "country": "United States", + "nbMedals": 0, + "year": "1980" + }, + { + "medalType": "Silver", + "country": "Austria", + "nbMedals": 2, + "year": "1980" + }, + { + "medalType": "Silver", + "country": "China", + "nbMedals": 0, + "year": "1980" + }, + { + "medalType": "Silver", + "country": "France", + "nbMedals": 5, + "year": "1980" + }, + { + "medalType": "Silver", + "country": "Germany", + "nbMedals": 0, + "year": "1980" + }, + { + "medalType": "Silver", + "country": "Great Britain", + "nbMedals": 7, + "year": "1980" + }, + { + "medalType": "Silver", + "country": "Italy", + "nbMedals": 3, + "year": "1980" + }, + { + "medalType": "Silver", + "country": "Russia", + "nbMedals": 0, + "year": "1980" + }, + { + "medalType": "Silver", + "country": "South Korea", + "nbMedals": 0, + "year": "1980" + }, + { + "medalType": "Silver", + "country": "Ukraine", + "nbMedals": 0, + "year": "1980" + }, + { + "medalType": "Silver", + "country": "United States", + "nbMedals": 0, + "year": "1980" + }, + { + "medalType": "Bronze", + "country": "Austria", + "nbMedals": 1, + "year": "1980" + }, + { + "medalType": "Bronze", + "country": "China", + "nbMedals": 0, + "year": "1980" + }, + { + "medalType": "Bronze", + "country": "France", + "nbMedals": 3, + "year": "1980" + }, + { + "medalType": "Bronze", + "country": "Germany", + "nbMedals": 0, + "year": "1980" + }, + { + "medalType": "Bronze", + "country": "Great Britain", + "nbMedals": 9, + "year": "1980" + }, + { + "medalType": "Bronze", + "country": "Italy", + "nbMedals": 4, + "year": "1980" + }, + { + "medalType": "Bronze", + "country": "Russia", + "nbMedals": 0, + "year": "1980" + }, + { + "medalType": "Bronze", + "country": "South Korea", + "nbMedals": 0, + "year": "1980" + }, + { + "medalType": "Bronze", + "country": "Ukraine", + "nbMedals": 0, + "year": "1980" + }, + { + "medalType": "Bronze", + "country": "United States", + "nbMedals": 0, + "year": "1980" + }, + { + "medalType": "Gold", + "country": "Austria", + "nbMedals": 1, + "year": "1984" + }, + { + "medalType": "Gold", + "country": "China", + "nbMedals": 15, + "year": "1984" + }, + { + "medalType": "Gold", + "country": "France", + "nbMedals": 5, + "year": "1984" + }, + { + "medalType": "Gold", + "country": "Germany", + "nbMedals": 0, + "year": "1984" + }, + { + "medalType": "Gold", + "country": "Great Britain", + "nbMedals": 5, + "year": "1984" + }, + { + "medalType": "Gold", + "country": "Italy", + "nbMedals": 14, + "year": "1984" + }, + { + "medalType": "Gold", + "country": "Russia", + "nbMedals": 0, + "year": "1984" + }, + { + "medalType": "Gold", + "country": "South Korea", + "nbMedals": 6, + "year": "1984" + }, + { + "medalType": "Gold", + "country": "Ukraine", + "nbMedals": 0, + "year": "1984" + }, + { + "medalType": "Gold", + "country": "United States", + "nbMedals": 83, + "year": "1984" + }, + { + "medalType": "Silver", + "country": "Austria", + "nbMedals": 1, + "year": "1984" + }, + { + "medalType": "Silver", + "country": "China", + "nbMedals": 8, + "year": "1984" + }, + { + "medalType": "Silver", + "country": "France", + "nbMedals": 7, + "year": "1984" + }, + { + "medalType": "Silver", + "country": "Germany", + "nbMedals": 0, + "year": "1984" + }, + { + "medalType": "Silver", + "country": "Great Britain", + "nbMedals": 11, + "year": "1984" + }, + { + "medalType": "Silver", + "country": "Italy", + "nbMedals": 6, + "year": "1984" + }, + { + "medalType": "Silver", + "country": "Russia", + "nbMedals": 0, + "year": "1984" + }, + { + "medalType": "Silver", + "country": "South Korea", + "nbMedals": 6, + "year": "1984" + }, + { + "medalType": "Silver", + "country": "Ukraine", + "nbMedals": 0, + "year": "1984" + }, + { + "medalType": "Silver", + "country": "United States", + "nbMedals": 61, + "year": "1984" + }, + { + "medalType": "Bronze", + "country": "Austria", + "nbMedals": 1, + "year": "1984" + }, + { + "medalType": "Bronze", + "country": "China", + "nbMedals": 9, + "year": "1984" + }, + { + "medalType": "Bronze", + "country": "France", + "nbMedals": 16, + "year": "1984" + }, + { + "medalType": "Bronze", + "country": "Germany", + "nbMedals": 0, + "year": "1984" + }, + { + "medalType": "Bronze", + "country": "Great Britain", + "nbMedals": 21, + "year": "1984" + }, + { + "medalType": "Bronze", + "country": "Italy", + "nbMedals": 12, + "year": "1984" + }, + { + "medalType": "Bronze", + "country": "Russia", + "nbMedals": 0, + "year": "1984" + }, + { + "medalType": "Bronze", + "country": "South Korea", + "nbMedals": 7, + "year": "1984" + }, + { + "medalType": "Bronze", + "country": "Ukraine", + "nbMedals": 0, + "year": "1984" + }, + { + "medalType": "Bronze", + "country": "United States", + "nbMedals": 30, + "year": "1984" + }, + { + "medalType": "Gold", + "country": "Austria", + "nbMedals": 1, + "year": "1988" + }, + { + "medalType": "Gold", + "country": "China", + "nbMedals": 5, + "year": "1988" + }, + { + "medalType": "Gold", + "country": "France", + "nbMedals": 6, + "year": "1988" + }, + { + "medalType": "Gold", + "country": "Germany", + "nbMedals": 0, + "year": "1988" + }, + { + "medalType": "Gold", + "country": "Great Britain", + "nbMedals": 5, + "year": "1988" + }, + { + "medalType": "Gold", + "country": "Italy", + "nbMedals": 6, + "year": "1988" + }, + { + "medalType": "Gold", + "country": "Russia", + "nbMedals": 0, + "year": "1988" + }, + { + "medalType": "Gold", + "country": "South Korea", + "nbMedals": 12, + "year": "1988" + }, + { + "medalType": "Gold", + "country": "Ukraine", + "nbMedals": 0, + "year": "1988" + }, + { + "medalType": "Gold", + "country": "United States", + "nbMedals": 36, + "year": "1988" + }, + { + "medalType": "Silver", + "country": "Austria", + "nbMedals": 0, + "year": "1988" + }, + { + "medalType": "Silver", + "country": "China", + "nbMedals": 11, + "year": "1988" + }, + { + "medalType": "Silver", + "country": "France", + "nbMedals": 4, + "year": "1988" + }, + { + "medalType": "Silver", + "country": "Germany", + "nbMedals": 0, + "year": "1988" + }, + { + "medalType": "Silver", + "country": "Great Britain", + "nbMedals": 10, + "year": "1988" + }, + { + "medalType": "Silver", + "country": "Italy", + "nbMedals": 4, + "year": "1988" + }, + { + "medalType": "Silver", + "country": "Russia", + "nbMedals": 0, + "year": "1988" + }, + { + "medalType": "Silver", + "country": "South Korea", + "nbMedals": 10, + "year": "1988" + }, + { + "medalType": "Silver", + "country": "Ukraine", + "nbMedals": 0, + "year": "1988" + }, + { + "medalType": "Silver", + "country": "United States", + "nbMedals": 31, + "year": "1988" + }, + { + "medalType": "Bronze", + "country": "Austria", + "nbMedals": 0, + "year": "1988" + }, + { + "medalType": "Bronze", + "country": "China", + "nbMedals": 12, + "year": "1988" + }, + { + "medalType": "Bronze", + "country": "France", + "nbMedals": 6, + "year": "1988" + }, + { + "medalType": "Bronze", + "country": "Germany", + "nbMedals": 0, + "year": "1988" + }, + { + "medalType": "Bronze", + "country": "Great Britain", + "nbMedals": 9, + "year": "1988" + }, + { + "medalType": "Bronze", + "country": "Italy", + "nbMedals": 4, + "year": "1988" + }, + { + "medalType": "Bronze", + "country": "Russia", + "nbMedals": 0, + "year": "1988" + }, + { + "medalType": "Bronze", + "country": "South Korea", + "nbMedals": 11, + "year": "1988" + }, + { + "medalType": "Bronze", + "country": "Ukraine", + "nbMedals": 0, + "year": "1988" + }, + { + "medalType": "Bronze", + "country": "United States", + "nbMedals": 27, + "year": "1988" + }, + { + "medalType": "Gold", + "country": "Austria", + "nbMedals": 0, + "year": "1992" + }, + { + "medalType": "Gold", + "country": "China", + "nbMedals": 16, + "year": "1992" + }, + { + "medalType": "Gold", + "country": "France", + "nbMedals": 8, + "year": "1992" + }, + { + "medalType": "Gold", + "country": "Germany", + "nbMedals": 33, + "year": "1992" + }, + { + "medalType": "Gold", + "country": "Great Britain", + "nbMedals": 5, + "year": "1992" + }, + { + "medalType": "Gold", + "country": "Italy", + "nbMedals": 6, + "year": "1992" + }, + { + "medalType": "Gold", + "country": "Russia", + "nbMedals": 0, + "year": "1992" + }, + { + "medalType": "Gold", + "country": "South Korea", + "nbMedals": 12, + "year": "1992" + }, + { + "medalType": "Gold", + "country": "Ukraine", + "nbMedals": 0, + "year": "1992" + }, + { + "medalType": "Gold", + "country": "United States", + "nbMedals": 37, + "year": "1992" + }, + { + "medalType": "Silver", + "country": "Austria", + "nbMedals": 2, + "year": "1992" + }, + { + "medalType": "Silver", + "country": "China", + "nbMedals": 22, + "year": "1992" + }, + { + "medalType": "Silver", + "country": "France", + "nbMedals": 5, + "year": "1992" + }, + { + "medalType": "Silver", + "country": "Germany", + "nbMedals": 21, + "year": "1992" + }, + { + "medalType": "Silver", + "country": "Great Britain", + "nbMedals": 3, + "year": "1992" + }, + { + "medalType": "Silver", + "country": "Italy", + "nbMedals": 5, + "year": "1992" + }, + { + "medalType": "Silver", + "country": "Russia", + "nbMedals": 0, + "year": "1992" + }, + { + "medalType": "Silver", + "country": "South Korea", + "nbMedals": 5, + "year": "1992" + }, + { + "medalType": "Silver", + "country": "Ukraine", + "nbMedals": 0, + "year": "1992" + }, + { + "medalType": "Silver", + "country": "United States", + "nbMedals": 34, + "year": "1992" + }, + { + "medalType": "Bronze", + "country": "Austria", + "nbMedals": 0, + "year": "1992" + }, + { + "medalType": "Bronze", + "country": "China", + "nbMedals": 16, + "year": "1992" + }, + { + "medalType": "Bronze", + "country": "France", + "nbMedals": 16, + "year": "1992" + }, + { + "medalType": "Bronze", + "country": "Germany", + "nbMedals": 28, + "year": "1992" + }, + { + "medalType": "Bronze", + "country": "Great Britain", + "nbMedals": 12, + "year": "1992" + }, + { + "medalType": "Bronze", + "country": "Italy", + "nbMedals": 8, + "year": "1992" + }, + { + "medalType": "Bronze", + "country": "Russia", + "nbMedals": 0, + "year": "1992" + }, + { + "medalType": "Bronze", + "country": "South Korea", + "nbMedals": 12, + "year": "1992" + }, + { + "medalType": "Bronze", + "country": "Ukraine", + "nbMedals": 0, + "year": "1992" + }, + { + "medalType": "Bronze", + "country": "United States", + "nbMedals": 37, + "year": "1992" + }, + { + "medalType": "Gold", + "country": "Austria", + "nbMedals": 0, + "year": "1996" + }, + { + "medalType": "Gold", + "country": "China", + "nbMedals": 16, + "year": "1996" + }, + { + "medalType": "Gold", + "country": "France", + "nbMedals": 15, + "year": "1996" + }, + { + "medalType": "Gold", + "country": "Germany", + "nbMedals": 20, + "year": "1996" + }, + { + "medalType": "Gold", + "country": "Great Britain", + "nbMedals": 1, + "year": "1996" + }, + { + "medalType": "Gold", + "country": "Italy", + "nbMedals": 13, + "year": "1996" + }, + { + "medalType": "Gold", + "country": "Russia", + "nbMedals": 26, + "year": "1996" + }, + { + "medalType": "Gold", + "country": "South Korea", + "nbMedals": 7, + "year": "1996" + }, + { + "medalType": "Gold", + "country": "Ukraine", + "nbMedals": 9, + "year": "1996" + }, + { + "medalType": "Gold", + "country": "United States", + "nbMedals": 44, + "year": "1996" + }, + { + "medalType": "Silver", + "country": "Austria", + "nbMedals": 1, + "year": "1996" + }, + { + "medalType": "Silver", + "country": "China", + "nbMedals": 22, + "year": "1996" + }, + { + "medalType": "Silver", + "country": "France", + "nbMedals": 7, + "year": "1996" + }, + { + "medalType": "Silver", + "country": "Germany", + "nbMedals": 18, + "year": "1996" + }, + { + "medalType": "Silver", + "country": "Great Britain", + "nbMedals": 8, + "year": "1996" + }, + { + "medalType": "Silver", + "country": "Italy", + "nbMedals": 10, + "year": "1996" + }, + { + "medalType": "Silver", + "country": "Russia", + "nbMedals": 21, + "year": "1996" + }, + { + "medalType": "Silver", + "country": "South Korea", + "nbMedals": 15, + "year": "1996" + }, + { + "medalType": "Silver", + "country": "Ukraine", + "nbMedals": 2, + "year": "1996" + }, + { + "medalType": "Silver", + "country": "United States", + "nbMedals": 32, + "year": "1996" + }, + { + "medalType": "Bronze", + "country": "Austria", + "nbMedals": 2, + "year": "1996" + }, + { + "medalType": "Bronze", + "country": "China", + "nbMedals": 12, + "year": "1996" + }, + { + "medalType": "Bronze", + "country": "France", + "nbMedals": 15, + "year": "1996" + }, + { + "medalType": "Bronze", + "country": "Germany", + "nbMedals": 27, + "year": "1996" + }, + { + "medalType": "Bronze", + "country": "Great Britain", + "nbMedals": 6, + "year": "1996" + }, + { + "medalType": "Bronze", + "country": "Italy", + "nbMedals": 12, + "year": "1996" + }, + { + "medalType": "Bronze", + "country": "Russia", + "nbMedals": 16, + "year": "1996" + }, + { + "medalType": "Bronze", + "country": "South Korea", + "nbMedals": 5, + "year": "1996" + }, + { + "medalType": "Bronze", + "country": "Ukraine", + "nbMedals": 12, + "year": "1996" + }, + { + "medalType": "Bronze", + "country": "United States", + "nbMedals": 25, + "year": "1996" + }, + { + "medalType": "Gold", + "country": "Austria", + "nbMedals": 2, + "year": "2000" + }, + { + "medalType": "Gold", + "country": "China", + "nbMedals": 28, + "year": "2000" + }, + { + "medalType": "Gold", + "country": "France", + "nbMedals": 13, + "year": "2000" + }, + { + "medalType": "Gold", + "country": "Germany", + "nbMedals": 13, + "year": "2000" + }, + { + "medalType": "Gold", + "country": "Great Britain", + "nbMedals": 11, + "year": "2000" + }, + { + "medalType": "Gold", + "country": "Italy", + "nbMedals": 13, + "year": "2000" + }, + { + "medalType": "Gold", + "country": "Russia", + "nbMedals": 32, + "year": "2000" + }, + { + "medalType": "Gold", + "country": "South Korea", + "nbMedals": 8, + "year": "2000" + }, + { + "medalType": "Gold", + "country": "Ukraine", + "nbMedals": 3, + "year": "2000" + }, + { + "medalType": "Gold", + "country": "United States", + "nbMedals": 37, + "year": "2000" + }, + { + "medalType": "Silver", + "country": "Austria", + "nbMedals": 1, + "year": "2000" + }, + { + "medalType": "Silver", + "country": "China", + "nbMedals": 16, + "year": "2000" + }, + { + "medalType": "Silver", + "country": "France", + "nbMedals": 14, + "year": "2000" + }, + { + "medalType": "Silver", + "country": "Germany", + "nbMedals": 17, + "year": "2000" + }, + { + "medalType": "Silver", + "country": "Great Britain", + "nbMedals": 10, + "year": "2000" + }, + { + "medalType": "Silver", + "country": "Italy", + "nbMedals": 8, + "year": "2000" + }, + { + "medalType": "Silver", + "country": "Russia", + "nbMedals": 28, + "year": "2000" + }, + { + "medalType": "Silver", + "country": "South Korea", + "nbMedals": 10, + "year": "2000" + }, + { + "medalType": "Silver", + "country": "Ukraine", + "nbMedals": 10, + "year": "2000" + }, + { + "medalType": "Silver", + "country": "United States", + "nbMedals": 24, + "year": "2000" + }, + { + "medalType": "Bronze", + "country": "Austria", + "nbMedals": 0, + "year": "2000" + }, + { + "medalType": "Bronze", + "country": "China", + "nbMedals": 14, + "year": "2000" + }, + { + "medalType": "Bronze", + "country": "France", + "nbMedals": 11, + "year": "2000" + }, + { + "medalType": "Bronze", + "country": "Germany", + "nbMedals": 26, + "year": "2000" + }, + { + "medalType": "Bronze", + "country": "Great Britain", + "nbMedals": 7, + "year": "2000" + }, + { + "medalType": "Bronze", + "country": "Italy", + "nbMedals": 13, + "year": "2000" + }, + { + "medalType": "Bronze", + "country": "Russia", + "nbMedals": 29, + "year": "2000" + }, + { + "medalType": "Bronze", + "country": "South Korea", + "nbMedals": 10, + "year": "2000" + }, + { + "medalType": "Bronze", + "country": "Ukraine", + "nbMedals": 10, + "year": "2000" + }, + { + "medalType": "Bronze", + "country": "United States", + "nbMedals": 32, + "year": "2000" + }, + { + "medalType": "Gold", + "country": "Austria", + "nbMedals": 2, + "year": "2004" + }, + { + "medalType": "Gold", + "country": "China", + "nbMedals": 32, + "year": "2004" + }, + { + "medalType": "Gold", + "country": "France", + "nbMedals": 11, + "year": "2004" + }, + { + "medalType": "Gold", + "country": "Germany", + "nbMedals": 13, + "year": "2004" + }, + { + "medalType": "Gold", + "country": "Great Britain", + "nbMedals": 9, + "year": "2004" + }, + { + "medalType": "Gold", + "country": "Italy", + "nbMedals": 10, + "year": "2004" + }, + { + "medalType": "Gold", + "country": "Russia", + "nbMedals": 28, + "year": "2004" + }, + { + "medalType": "Gold", + "country": "South Korea", + "nbMedals": 9, + "year": "2004" + }, + { + "medalType": "Gold", + "country": "Ukraine", + "nbMedals": 8, + "year": "2004" + }, + { + "medalType": "Gold", + "country": "United States", + "nbMedals": 36, + "year": "2004" + }, + { + "medalType": "Silver", + "country": "Austria", + "nbMedals": 4, + "year": "2004" + }, + { + "medalType": "Silver", + "country": "China", + "nbMedals": 17, + "year": "2004" + }, + { + "medalType": "Silver", + "country": "France", + "nbMedals": 9, + "year": "2004" + }, + { + "medalType": "Silver", + "country": "Germany", + "nbMedals": 16, + "year": "2004" + }, + { + "medalType": "Silver", + "country": "Great Britain", + "nbMedals": 9, + "year": "2004" + }, + { + "medalType": "Silver", + "country": "Italy", + "nbMedals": 11, + "year": "2004" + }, + { + "medalType": "Silver", + "country": "Russia", + "nbMedals": 26, + "year": "2004" + }, + { + "medalType": "Silver", + "country": "South Korea", + "nbMedals": 12, + "year": "2004" + }, + { + "medalType": "Silver", + "country": "Ukraine", + "nbMedals": 5, + "year": "2004" + }, + { + "medalType": "Silver", + "country": "United States", + "nbMedals": 39, + "year": "2004" + }, + { + "medalType": "Bronze", + "country": "Austria", + "nbMedals": 1, + "year": "2004" + }, + { + "medalType": "Bronze", + "country": "China", + "nbMedals": 14, + "year": "2004" + }, + { + "medalType": "Bronze", + "country": "France", + "nbMedals": 13, + "year": "2004" + }, + { + "medalType": "Bronze", + "country": "Germany", + "nbMedals": 20, + "year": "2004" + }, + { + "medalType": "Bronze", + "country": "Great Britain", + "nbMedals": 12, + "year": "2004" + }, + { + "medalType": "Bronze", + "country": "Italy", + "nbMedals": 11, + "year": "2004" + }, + { + "medalType": "Bronze", + "country": "Russia", + "nbMedals": 36, + "year": "2004" + }, + { + "medalType": "Bronze", + "country": "South Korea", + "nbMedals": 9, + "year": "2004" + }, + { + "medalType": "Bronze", + "country": "Ukraine", + "nbMedals": 9, + "year": "2004" + }, + { + "medalType": "Bronze", + "country": "United States", + "nbMedals": 26, + "year": "2004" + }, + { + "medalType": "Gold", + "country": "Austria", + "nbMedals": 0, + "year": "2008" + }, + { + "medalType": "Gold", + "country": "China", + "nbMedals": 51, + "year": "2008" + }, + { + "medalType": "Gold", + "country": "France", + "nbMedals": 7, + "year": "2008" + }, + { + "medalType": "Gold", + "country": "Germany", + "nbMedals": 16, + "year": "2008" + }, + { + "medalType": "Gold", + "country": "Great Britain", + "nbMedals": 19, + "year": "2008" + }, + { + "medalType": "Gold", + "country": "Italy", + "nbMedals": 8, + "year": "2008" + }, + { + "medalType": "Gold", + "country": "Russia", + "nbMedals": 23, + "year": "2008" + }, + { + "medalType": "Gold", + "country": "South Korea", + "nbMedals": 13, + "year": "2008" + }, + { + "medalType": "Gold", + "country": "Ukraine", + "nbMedals": 7, + "year": "2008" + }, + { + "medalType": "Gold", + "country": "United States", + "nbMedals": 36, + "year": "2008" + }, + { + "medalType": "Silver", + "country": "Austria", + "nbMedals": 1, + "year": "2008" + }, + { + "medalType": "Silver", + "country": "China", + "nbMedals": 21, + "year": "2008" + }, + { + "medalType": "Silver", + "country": "France", + "nbMedals": 16, + "year": "2008" + }, + { + "medalType": "Silver", + "country": "Germany", + "nbMedals": 10, + "year": "2008" + }, + { + "medalType": "Silver", + "country": "Great Britain", + "nbMedals": 13, + "year": "2008" + }, + { + "medalType": "Silver", + "country": "Italy", + "nbMedals": 9, + "year": "2008" + }, + { + "medalType": "Silver", + "country": "Russia", + "nbMedals": 21, + "year": "2008" + }, + { + "medalType": "Silver", + "country": "South Korea", + "nbMedals": 10, + "year": "2008" + }, + { + "medalType": "Silver", + "country": "Ukraine", + "nbMedals": 5, + "year": "2008" + }, + { + "medalType": "Silver", + "country": "United States", + "nbMedals": 38, + "year": "2008" + }, + { + "medalType": "Bronze", + "country": "Austria", + "nbMedals": 2, + "year": "2008" + }, + { + "medalType": "Bronze", + "country": "China", + "nbMedals": 28, + "year": "2008" + }, + { + "medalType": "Bronze", + "country": "France", + "nbMedals": 18, + "year": "2008" + }, + { + "medalType": "Bronze", + "country": "Germany", + "nbMedals": 15, + "year": "2008" + }, + { + "medalType": "Bronze", + "country": "Great Britain", + "nbMedals": 15, + "year": "2008" + }, + { + "medalType": "Bronze", + "country": "Italy", + "nbMedals": 10, + "year": "2008" + }, + { + "medalType": "Bronze", + "country": "Russia", + "nbMedals": 29, + "year": "2008" + }, + { + "medalType": "Bronze", + "country": "South Korea", + "nbMedals": 8, + "year": "2008" + }, + { + "medalType": "Bronze", + "country": "Ukraine", + "nbMedals": 15, + "year": "2008" + }, + { + "medalType": "Bronze", + "country": "United States", + "nbMedals": 36, + "year": "2008" + }, + { + "medalType": "Gold", + "country": "Austria", + "nbMedals": 0, + "year": "2012" + }, + { + "medalType": "Gold", + "country": "China", + "nbMedals": 38, + "year": "2012" + }, + { + "medalType": "Gold", + "country": "France", + "nbMedals": 11, + "year": "2012" + }, + { + "medalType": "Gold", + "country": "Germany", + "nbMedals": 11, + "year": "2012" + }, + { + "medalType": "Gold", + "country": "Great Britain", + "nbMedals": 29, + "year": "2012" + }, + { + "medalType": "Gold", + "country": "Italy", + "nbMedals": 8, + "year": "2012" + }, + { + "medalType": "Gold", + "country": "Russia", + "nbMedals": 24, + "year": "2012" + }, + { + "medalType": "Gold", + "country": "South Korea", + "nbMedals": 13, + "year": "2012" + }, + { + "medalType": "Gold", + "country": "Ukraine", + "nbMedals": 6, + "year": "2012" + }, + { + "medalType": "Gold", + "country": "United States", + "nbMedals": 46, + "year": "2012" + }, + { + "medalType": "Silver", + "country": "Austria", + "nbMedals": 0, + "year": "2012" + }, + { + "medalType": "Silver", + "country": "China", + "nbMedals": 27, + "year": "2012" + }, + { + "medalType": "Silver", + "country": "France", + "nbMedals": 11, + "year": "2012" + }, + { + "medalType": "Silver", + "country": "Germany", + "nbMedals": 19, + "year": "2012" + }, + { + "medalType": "Silver", + "country": "Great Britain", + "nbMedals": 17, + "year": "2012" + }, + { + "medalType": "Silver", + "country": "Italy", + "nbMedals": 9, + "year": "2012" + }, + { + "medalType": "Silver", + "country": "Russia", + "nbMedals": 25, + "year": "2012" + }, + { + "medalType": "Silver", + "country": "South Korea", + "nbMedals": 8, + "year": "2012" + }, + { + "medalType": "Silver", + "country": "Ukraine", + "nbMedals": 5, + "year": "2012" + }, + { + "medalType": "Silver", + "country": "United States", + "nbMedals": 29, + "year": "2012" + }, + { + "medalType": "Bronze", + "country": "Austria", + "nbMedals": 0, + "year": "2012" + }, + { + "medalType": "Bronze", + "country": "China", + "nbMedals": 23, + "year": "2012" + }, + { + "medalType": "Bronze", + "country": "France", + "nbMedals": 12, + "year": "2012" + }, + { + "medalType": "Bronze", + "country": "Germany", + "nbMedals": 14, + "year": "2012" + }, + { + "medalType": "Bronze", + "country": "Great Britain", + "nbMedals": 19, + "year": "2012" + }, + { + "medalType": "Bronze", + "country": "Italy", + "nbMedals": 11, + "year": "2012" + }, + { + "medalType": "Bronze", + "country": "Russia", + "nbMedals": 32, + "year": "2012" + }, + { + "medalType": "Bronze", + "country": "South Korea", + "nbMedals": 7, + "year": "2012" + }, + { + "medalType": "Bronze", + "country": "Ukraine", + "nbMedals": 9, + "year": "2012" + }, + { + "medalType": "Bronze", + "country": "United States", + "nbMedals": 29, + "year": "2012" + } +] diff --git a/server/app/configurations/visualizations/medalsEvolutionPerCountry.json b/server/app/configurations/visualizations/medalsEvolutionPerCountry.json index 52ba8fc4..c928eb44 100644 --- a/server/app/configurations/visualizations/medalsEvolutionPerCountry.json +++ b/server/app/configurations/visualizations/medalsEvolutionPerCountry.json @@ -1,5 +1,5 @@ { - "id": "medalsPerCountryPerCountry", + "id": "medalsEvolutionPerCountry", "graph": "LineGraph", "title": "Medals Evolution for {{country:country}} since 1896", "description": "Evolution of medals since the beggining of the olympic games", diff --git a/server/app/controllers/dashboards.controller.js b/server/app/controllers/dashboards.controller.js index 01c5dd21..e93db494 100644 --- a/server/app/controllers/dashboards.controller.js +++ b/server/app/controllers/dashboards.controller.js @@ -1,5 +1,5 @@ import BaseController from './base.controller'; -import {DirectoryTypes, FetchManager} from '../lib/utils/fetch'; +import { DirectoryTypes, FetchManager } from '../lib/utils/fetch'; import { ServiceManager } from "../lib/servicemanager/index" diff --git a/server/app/lib/servicemanager/index.js b/server/app/lib/servicemanager/index.js index 03c080e9..4ed05940 100644 --- a/server/app/lib/servicemanager/index.js +++ b/server/app/lib/servicemanager/index.js @@ -1,5 +1,6 @@ import { ElasticSearchService } from "../services/elasticsearch/index"; import { VSDService } from "../services/vsd/index"; +import { MemoryService } from "../services/memory/index"; let config = { timingCache: 5000, @@ -11,6 +12,7 @@ let config = { let services = { elasticsearch: ElasticSearchService, VSD: VSDService, + memory: MemoryService }; /* diff --git a/server/app/lib/services/memory/index.js b/server/app/lib/services/memory/index.js new file mode 100644 index 00000000..92ac6b2a --- /dev/null +++ b/server/app/lib/services/memory/index.js @@ -0,0 +1,33 @@ +import { getUsedParameters } from '../../utils/configurations'; +import { DirectoryTypes, FetchManager } from '../../utils/fetch'; + +import { taffy } from 'taffydb'; + +const fetch = (parameters) => { + let databaseConfig = FetchManager.fetchAndParseJSON('database', DirectoryTypes.MEMORY) + + if(!databaseConfig) + return Promise.reject(); + + let db = taffy(databaseConfig); + + + let query = db().filter(parameters.query); + + if (parameters.sortBy) + query = query.order(parameters.sortBy); + + if (parameters.limit) + query = query.limit(parameters.limit); + + const results = query.get(); + + return new Promise((resolve, reject) => { + resolve(results); + }); +} + +export const MemoryService = { + id: 'memory', + fetch: fetch +} diff --git a/server/app/lib/utils/fetch.js b/server/app/lib/utils/fetch.js index b7a01147..e48689bb 100644 --- a/server/app/lib/utils/fetch.js +++ b/server/app/lib/utils/fetch.js @@ -6,7 +6,8 @@ import path from 'path'; export const DirectoryTypes = { DASHBOARD: 'dashboards', QUERY: 'queries', - VISUALIZATION: 'visualizations' + VISUALIZATION: 'visualizations', + MEMORY: 'memory' } const configPath = `${Constants.baseDir}/app/configurations`; diff --git a/src/components/Visualization/index.js b/src/components/Visualization/index.js index c635dcef..180a8c71 100644 --- a/src/components/Visualization/index.js +++ b/src/components/Visualization/index.js @@ -52,7 +52,7 @@ class VisualizationView extends React.Component { } componentWillMount() { - this.initialize(this.props.id); + } componentDidMount = () => { @@ -61,6 +61,7 @@ class VisualizationView extends React.Component { showInDashboard } = this.props; + this.initialize(this.props.id); this.updateSize(); // If present, register the resize callback From 3453c94ada61867428b220db8d569ff86e78c78b Mon Sep 17 00:00:00 2001 From: nxanil Date: Thu, 15 Jun 2017 18:18:52 +0530 Subject: [PATCH 11/70] Routing Issue --- src/App.js | 2 +- src/components/Visualization/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/App.js b/src/App.js index ac6a4762..e822c849 100644 --- a/src/App.js +++ b/src/App.js @@ -16,7 +16,7 @@ class App extends Component { - + diff --git a/src/components/Visualization/index.js b/src/components/Visualization/index.js index 7cb19aa7..0f6d13d8 100644 --- a/src/components/Visualization/index.js +++ b/src/components/Visualization/index.js @@ -311,7 +311,7 @@ class VisualizationView extends React.Component { return false; } - const data = ServiceManager.tabify(queryConfiguration, response.results); + const data = response.results; if (!data || !data.length) { return null; From 201e44b3c822a0c7cb479f8c0fd61cc26e0f79d2 Mon Sep 17 00:00:00 2001 From: nxanil Date: Fri, 16 Jun 2017 14:25:42 +0530 Subject: [PATCH 12/70] API changes - To handle miss configured visualizations --- .../app/controllers/dashboards.controller.js | 27 ++++++++++++------- src/components/Dashboard/index.js | 9 ++++++- 2 files changed, 26 insertions(+), 10 deletions(-) diff --git a/server/app/controllers/dashboards.controller.js b/server/app/controllers/dashboards.controller.js index e93db494..00db81cb 100644 --- a/server/app/controllers/dashboards.controller.js +++ b/server/app/controllers/dashboards.controller.js @@ -9,19 +9,28 @@ class DashboardsController extends BaseController { try { let dasboardData = FetchManager.fetchAndParseJSON(dashboard, DirectoryTypes.DASHBOARD); - + let visualizations = []; + let viz = null; if(dasboardData.visualizations) { dasboardData.visualizations.forEach((visualization, index, array) => { - let viz = FetchManager.fetchAndParseJSON(visualization.id, DirectoryTypes.VISUALIZATION); - - if(viz.query) { - viz.queryConfiguration = FetchManager.fetchAndParseJSON(viz.query, DirectoryTypes.QUERY); - } else if(viz.script) { - viz.queryConfiguration = ServiceManager.executeScript(viz.script); + try { + viz = FetchManager.fetchAndParseJSON(visualization.id, DirectoryTypes.VISUALIZATION); + + if(viz.query) { + viz.queryConfiguration = FetchManager.fetchAndParseJSON(viz.query, DirectoryTypes.QUERY); + } else if(viz.script) { + viz.queryConfiguration = ServiceManager.executeScript(viz.script); + } + + dasboardData.visualizations[index].visualization = viz; + visualizations.push(dasboardData.visualizations[index]); + } catch(err) { + //LOG ALL THE ERRORS HERE FOR ANY MISS CONFIGURATIONS } - - dasboardData.visualizations[index].visualization = viz; }); + dasboardData.visualizations = visualizations; + } else { + dasboardData.visualizations = []; } res.json(dasboardData); diff --git a/src/components/Dashboard/index.js b/src/components/Dashboard/index.js index ad98b343..5c7b748c 100644 --- a/src/components/Dashboard/index.js +++ b/src/components/Dashboard/index.js @@ -25,7 +25,10 @@ import { contextualize } from "../../utils/configurations" import { defaultFilterOptions } from "./default.js" +import { Card, CardText } from 'material-ui/Card'; + import style from "./styles"; +import visualizationStyle from "../Visualization/styles" export class DashboardView extends React.Component { @@ -136,7 +139,11 @@ export class DashboardView extends React.Component { if (error) { return ( -
{error}
+ +
Oops, Configuration Error: {error}
+
); } From ea7ff81c216c386cba3be87be04590e6a9381d0b Mon Sep 17 00:00:00 2001 From: nxanil Date: Tue, 20 Jun 2017 12:47:05 +0530 Subject: [PATCH 13/70] VSD Implementation --- server/.env.example | 1 + .../app/controllers/dashboards.controller.js | 2 +- .../controllers/visualizations.controller.js | 11 +++++---- server/app/lib/services/vsd/index.js | 24 +++++++++---------- server/package.json | 3 ++- src/components/Dashboard/index.js | 2 +- src/configs/nuage/vsd/index.js | 1 - src/redux/store.js | 1 + src/services/servicemanager/index.js | 3 +++ src/services/servicemanager/redux/actions.js | 4 ++-- src/utils/configurations.js | 2 +- 11 files changed, 30 insertions(+), 24 deletions(-) diff --git a/server/.env.example b/server/.env.example index 9a440d55..d37bf02b 100644 --- a/server/.env.example +++ b/server/.env.example @@ -2,3 +2,4 @@ APP_SERVER_PORT=8010 APP_SERVER_IP=localhost APP_ELASTICSEARCH_HOST=http://localhost:9200 APP_VSD_API_ENDPOINT=https://vsd.com:8443/nuage/api/ +NODE_TLS_REJECT_UNAUTHORIZED=0 diff --git a/server/app/controllers/dashboards.controller.js b/server/app/controllers/dashboards.controller.js index 00db81cb..9a7512a5 100644 --- a/server/app/controllers/dashboards.controller.js +++ b/server/app/controllers/dashboards.controller.js @@ -33,7 +33,7 @@ class DashboardsController extends BaseController { dasboardData.visualizations = []; } - res.json(dasboardData); + return res.json(dasboardData); } catch(err) { next(err); } diff --git a/server/app/controllers/visualizations.controller.js b/server/app/controllers/visualizations.controller.js index 2f1ca17c..cd33fa70 100644 --- a/server/app/controllers/visualizations.controller.js +++ b/server/app/controllers/visualizations.controller.js @@ -18,7 +18,7 @@ class VisualizationsController extends BaseController { visualizationConfig.queryConfiguration = ServiceManager.executeScript(visualizationConfig.script); } - res.json(visualizationConfig); + return res.json(visualizationConfig); } catch(err) { next(err); } @@ -55,7 +55,7 @@ class VisualizationsController extends BaseController { if (pQuery) queryConfig = pQuery; else - res.json([]); + return res.json([]); } //Executing the Service Fetch to reterive the response. @@ -63,9 +63,10 @@ class VisualizationsController extends BaseController { if(service.tabify) result = service.tabify(result); - res.json(result); - }, function(error) { - next(this.formatError(error, 422)); + return res.json(result); + }, function(err) { + //return res.json([]); + next(err); }) } catch(err) { diff --git a/server/app/lib/services/vsd/index.js b/server/app/lib/services/vsd/index.js index d0648e41..bdf9b639 100644 --- a/server/app/lib/services/vsd/index.js +++ b/server/app/lib/services/vsd/index.js @@ -1,10 +1,10 @@ -import $ from "jquery"; +import { rp } from "request-promise"; import { ActionKeyStore } from "./redux/actions"; import { parameterizedConfiguration } from "../../utils/configurations"; const config = { - api_version: "5.0", + api_version: "4.0", end_point_prefix: "/nuage/api/" } @@ -35,7 +35,6 @@ const getHeaders = (token, organization, filter, page, orderBy, proxyUser) => { if (proxyUser) headers["X-Nuage-ProxyUser"] = proxyUser - // console.error(headers); return headers } @@ -77,15 +76,16 @@ const getURL = (configuration, api) => { const makeRequest = (url, headers) => { // Encapsulates $.get in a Promise to ensure all services are having the same behavior + var rp = require('request-promise'); return new Promise((resolve, reject) => { - $.get({ + rp({ url: url, headers: headers }) - .done((response) => { - return resolve(response) + .then((response) => { + return resolve(JSON.parse(response)) }) - .fail((error) => { + .catch((error) => { return reject(error) }); }); @@ -166,13 +166,13 @@ export const VSDServiceTest = { getURL: getURL } -const fetch = (configuration, state) => { - let token = state.VSD.get(ActionKeyStore.TOKEN), - api = state.VSD.get(ActionKeyStore.API) || process.env.REACT_APP_VSD_API_ENDPOINT, - organization = state.VSD.get(ActionKeyStore.ORGANIZATION); +const fetch = (configuration, context) => { + let token = context.TOKEN, + api = context.API || process.env.REACT_APP_VSD_API_ENDPOINT, + organization = context.organization; if (!api || !token) - return Promise.reject("No VSD API endpoint specified. To configure the VSD API endpoint, provide the endpoint URL via the environment variable REACT_APP_VSD_API_ENDPOINT at compile time. For a development environment, you can set an invalid value, which will cause the system to provide mock data for testing. For example, you can add the following line to your .bashrc or .profile startup script: 'export REACT_APP_VSD_API_ENDPOINT=http://something.invalid'"); + return Promise.reject({message: "No VSD API endpoint specified. To configure the VSD API endpoint, provide the endpoint URL via the environment variable REACT_APP_VSD_API_ENDPOINT at compile time. For a development environment, you can set an invalid value, which will cause the system to provide mock data for testing. For example, you can add the following line to your .bashrc or .profile startup script: 'export REACT_APP_VSD_API_ENDPOINT=http://something.invalid'"}); const url = VSDServiceTest.getURL(configuration, api), headers = getHeaders(token, organization, configuration.query.filter); diff --git a/server/package.json b/server/package.json index 3a40c558..4dbabd24 100644 --- a/server/package.json +++ b/server/package.json @@ -24,7 +24,8 @@ "helmet": "^3.1.0", "lodash": "^4.16.4", "method-override": "^2.3.6", - "morgan": "^1.7.0" + "morgan": "^1.7.0", + "request-promise": "^4.2.1" }, "devDependencies": { "babel-cli": "^6.18.0", diff --git a/src/components/Dashboard/index.js b/src/components/Dashboard/index.js index 5c7b748c..1093476c 100644 --- a/src/components/Dashboard/index.js +++ b/src/components/Dashboard/index.js @@ -25,7 +25,7 @@ import { contextualize } from "../../utils/configurations" import { defaultFilterOptions } from "./default.js" -import { Card, CardText } from 'material-ui/Card'; +import { Card } from 'material-ui/Card'; import style from "./styles"; import visualizationStyle from "../Visualization/styles" diff --git a/src/configs/nuage/vsd/index.js b/src/configs/nuage/vsd/index.js index eaf86750..c7718943 100644 --- a/src/configs/nuage/vsd/index.js +++ b/src/configs/nuage/vsd/index.js @@ -16,7 +16,6 @@ export const getURLEndpoint = (configuration) => { export const getRequestID = (configuration, context) => { const tmpConfiguration = parameterizedConfiguration(configuration, context); - if (!tmpConfiguration) return; diff --git a/src/redux/store.js b/src/redux/store.js index aecf6204..3d68cf25 100644 --- a/src/redux/store.js +++ b/src/redux/store.js @@ -38,6 +38,7 @@ const createStoreWithRouterAndMiddleware = compose( let store = createStoreWithRouterAndMiddleware(rootReducer); store.subscribe(function() { + //const state = store.getState(); /*if (state.router) { diff --git a/src/services/servicemanager/index.js b/src/services/servicemanager/index.js index 24a8460c..6c6ab46e 100644 --- a/src/services/servicemanager/index.js +++ b/src/services/servicemanager/index.js @@ -65,6 +65,9 @@ const fetchData = function(visualizationId, context) { return fetch(url, { method: 'POST', + headers: { + 'Content-Type': 'application/json' + }, body: JSON.stringify(context) }) .then(checkStatus) diff --git a/src/services/servicemanager/redux/actions.js b/src/services/servicemanager/redux/actions.js index a97b757d..57d6dd56 100644 --- a/src/services/servicemanager/redux/actions.js +++ b/src/services/servicemanager/redux/actions.js @@ -58,9 +58,9 @@ function fetchIfNeeded(configuration, context, queryConfiguration, forceCache) { const isScript = configuration.query ? false : true; let requestID; - if (isScript) + if (isScript) { requestID = ServiceManager.getRequestID(queryConfiguration, context); - else { + } else { let service = ServiceManager.getService(configuration.queryConfiguration.service); requestID = service.getRequestID(queryConfiguration, context); } diff --git a/src/utils/configurations.js b/src/utils/configurations.js index 6c388985..6e8ee867 100644 --- a/src/utils/configurations.js +++ b/src/utils/configurations.js @@ -46,7 +46,7 @@ export const parameterizedConfiguration = (configuration, context) => { */ export const getUsedParameters = (configuration, context) => { const parameters = parse(configuration).parameters; - + let queryParams = {}; for (let i in parameters) { From 77c170aa07edd82b4882979caa006c350474ef46 Mon Sep 17 00:00:00 2001 From: nxanil Date: Tue, 20 Jun 2017 12:57:01 +0530 Subject: [PATCH 14/70] Configuration Scripts changes --- .../configurations/dashboards/wifiBranch.json | 35 +++++++- .../queries/wifi-branch-active-clients.json | 84 ++++++++----------- .../queries/wifi-branch-active-ssids.json | 84 ++++++++----------- .../wifi-branch-ssid-signal-lastseen.json | 10 +++ .../queries/wifi-branch-table.json | 36 ++++---- .../medalsEvolutionPerCountry.json | 2 +- .../wifi-branch-active-clients.json | 6 +- .../wifi-branch-active-ssids.json | 6 +- .../wifi-branch-ssid-linechart.json | 3 +- .../wifi-branch-ssid-signal-lastseen.json | 2 +- .../visualizations/wifi-branch-table.json | 4 +- 11 files changed, 143 insertions(+), 129 deletions(-) diff --git a/server/app/configurations/dashboards/wifiBranch.json b/server/app/configurations/dashboards/wifiBranch.json index ec42345c..aa342397 100644 --- a/server/app/configurations/dashboards/wifiBranch.json +++ b/server/app/configurations/dashboards/wifiBranch.json @@ -52,5 +52,38 @@ "minW": 6, "minH": 12 } - ] + ], + "filterOptions": { + "Time interval": { + "parameter": "startTime", + "default": "now-15m", + "options": [ + { + "label": "Last 15 min", + "value": "now-15m", + "default": true, + "forceOptions": { + "interval": "1m", + "prevStartTime": "now-30m" + } + }, + { + "label": "Last 24h", + "value": "now-24h", + "forceOptions": { + "interval": "1h", + "prevStartTime": "now-48h" + } + }, + { + "label": "Last 7 days", + "value": "now-7d", + "forceOptions": { + "interval": "12h", + "prevStartTime": "now-14d" + } + } + ] + } + } } diff --git a/server/app/configurations/queries/wifi-branch-active-clients.json b/server/app/configurations/queries/wifi-branch-active-clients.json index 2f2c9b56..927806a4 100644 --- a/server/app/configurations/queries/wifi-branch-active-clients.json +++ b/server/app/configurations/queries/wifi-branch-active-clients.json @@ -7,64 +7,50 @@ "type":"{{type:nuage_doc_type}}", "body": { "size":0, - "aggs":{ - "5":{ - "filters":{ - "filters":{ - "Enterprise":{ - "query":{ - "term":{ - "enterpriseName":"{{enterpriseName:wifi_enterprise}}" - } - } + "query":{ + "bool":{ + "must":[ + { + "term":{ + "enterpriseName":"{{enterpriseName:wifi_enterprise}}" + } + }, + { + "term":{ + "nsg":"{{nsg:wifi_nsg}}" } } - }, - "aggs": { - "4": { - "filters":{ - "filters":{ - "NSG":{ - "query":{ - "term":{ - "nsg":"{{nsg:wifi_nsg}}" - } - } + ] + } + }, + "aggs": { + "timezones": { + "filters": { + "filters": { + "Last 10": { + "range": { + "timestamp": { + "gte": "now-10m", + "lte": "now" } } }, - "aggs": { - "timezones": { - "filters": { - "filters": { - "Last 10": { - "range": { - "timestamp": { - "gte": "now-10m", - "lte": "now" - } - } - }, - "Last 24": { - "range": { - "timestamp": { - "gte": "now-24h", - "lte": "now" - } - } - } - } - }, - "aggs":{ - "Clients":{ - "cardinality":{ - "field":"client_mac" - } - } + "Last 24": { + "range": { + "timestamp": { + "gte": "now-24h", + "lte": "now" } } } } + }, + "aggs":{ + "Clients":{ + "cardinality":{ + "field":"client_mac" + } + } } } } diff --git a/server/app/configurations/queries/wifi-branch-active-ssids.json b/server/app/configurations/queries/wifi-branch-active-ssids.json index fcd0f711..37eafbdb 100644 --- a/server/app/configurations/queries/wifi-branch-active-ssids.json +++ b/server/app/configurations/queries/wifi-branch-active-ssids.json @@ -7,64 +7,50 @@ "type":"{{type:nuage_doc_type}}", "body": { "size":0, - "aggs":{ - "5":{ - "filters":{ - "filters":{ - "Enterprise":{ - "query":{ - "term":{ - "enterpriseName":"{{enterpriseName:wifi_enterprise}}" - } - } + "query":{ + "bool":{ + "must":[ + { + "term":{ + "enterpriseName":"{{enterpriseName:wifi_enterprise}}" + } + }, + { + "term":{ + "nsg":"{{nsg:wifi_nsg}}" } } - }, - "aggs": { - "4": { - "filters":{ - "filters":{ - "NSG":{ - "query":{ - "term":{ - "nsg":"{{nsg:wifi_nsg}}" - } - } + ] + } + }, + "aggs": { + "timezones": { + "filters": { + "filters": { + "Last 10": { + "range": { + "timestamp": { + "gte": "now-10m", + "lte": "now" } } }, - "aggs": { - "timezones": { - "filters": { - "filters": { - "Last 10": { - "range": { - "timestamp": { - "gte": "now-10m", - "lte": "now" - } - } - }, - "Last 24": { - "range": { - "timestamp": { - "gte": "now-24h", - "lte": "now" - } - } - } - } - }, - "aggs":{ - "SSID":{ - "cardinality":{ - "field":"ssid" - } - } + "Last 24": { + "range": { + "timestamp": { + "gte": "now-24h", + "lte": "now" } } } } + }, + "aggs":{ + "SSID":{ + "cardinality":{ + "field":"ssid-name" + } + } } } } diff --git a/server/app/configurations/queries/wifi-branch-ssid-signal-lastseen.json b/server/app/configurations/queries/wifi-branch-ssid-signal-lastseen.json index ce3ecb3a..6f1cda7b 100644 --- a/server/app/configurations/queries/wifi-branch-ssid-signal-lastseen.json +++ b/server/app/configurations/queries/wifi-branch-ssid-signal-lastseen.json @@ -22,6 +22,16 @@ "term": { "ssid-name": "{{ssid}}" } + }, + { + "term":{ + "enterpriseName":"{{enterpriseName:wifi_enterprise}}" + } + }, + { + "term":{ + "nsg":"{{nsg:wifi_nsg}}" + } } ] } diff --git a/server/app/configurations/queries/wifi-branch-table.json b/server/app/configurations/queries/wifi-branch-table.json index c892cd37..ffaae968 100644 --- a/server/app/configurations/queries/wifi-branch-table.json +++ b/server/app/configurations/queries/wifi-branch-table.json @@ -18,6 +18,16 @@ "format":"epoch_millis" } } + }, + { + "term":{ + "enterpriseName":"{{enterpriseName:wifi_enterprise}}" + } + }, + { + "term":{ + "nsg":"{{nsg:wifi_nsg}}" + } } ] } @@ -25,32 +35,14 @@ "aggs": { "SSID": { "terms": { - "field": "ssid-name", - "size": 0, - "order": { - "SumofBytes": "desc" - } + "field": "ssid-name" }, "aggs": { - "SumofBytes": { - "sum": { - "field": "rx_bytes" - } - }, "Client": { "terms": { - "field": "client_mac", - "size": 0, - "order": { - "SumofBytes": "desc" - } + "field": "client_mac" }, "aggs": { - "SumofBytes": { - "sum": { - "field": "rx_bytes" - } - }, "IP": { "terms": { "field": "client_ip", @@ -61,7 +53,9 @@ "aggs": { "SumofBytes": { "sum": { - "field": "rx_bytes" + "script": { + "inline": "doc['rx_bytes'].value + doc['tx_bytes'].value" + } } } } diff --git a/server/app/configurations/visualizations/medalsEvolutionPerCountry.json b/server/app/configurations/visualizations/medalsEvolutionPerCountry.json index 63589cef..36c54a59 100644 --- a/server/app/configurations/visualizations/medalsEvolutionPerCountry.json +++ b/server/app/configurations/visualizations/medalsEvolutionPerCountry.json @@ -1,5 +1,5 @@ { - "id": "medalsEvolutionPerCountry", + "id": "medalsPerCountryPerCountry", "graph": "LineGraph", "title": "Medals Evolution for {{country:country}} since 1896", "description": "Evolution of medals since the beggining of the olympic games", diff --git a/server/app/configurations/visualizations/wifi-branch-active-clients.json b/server/app/configurations/visualizations/wifi-branch-active-clients.json index 61c4acbe..57797752 100644 --- a/server/app/configurations/visualizations/wifi-branch-active-clients.json +++ b/server/app/configurations/visualizations/wifi-branch-active-clients.json @@ -2,14 +2,16 @@ "id": "wifi-branch-active-clients", "title": "Active Clients", "query": "wifi-branch-active-clients", + "description": "Active clients for last 10 min and last 24hrs", "graph": "VariationTextGraph", - "showTitleBar": false, + "showTitleBar": true, "data": { "titlePosition": "top", "target":{ "column": "timezones", "value": "Last 10", "field": "value" - } + }, + "absolute": true } } diff --git a/server/app/configurations/visualizations/wifi-branch-active-ssids.json b/server/app/configurations/visualizations/wifi-branch-active-ssids.json index d8ad3cac..3cbaa310 100644 --- a/server/app/configurations/visualizations/wifi-branch-active-ssids.json +++ b/server/app/configurations/visualizations/wifi-branch-active-ssids.json @@ -1,15 +1,17 @@ { "id": "wifi-branch-active-ssids", "title": "Active SSIDs", + "description": "Active SSIDs for last 10 min and last 24hrs", "query": "wifi-branch-active-ssids", "graph": "VariationTextGraph", - "showTitleBar": false, + "showTitleBar": true, "data": { "titlePosition": "top", "target":{ "column": "timezones", "value": "Last 10", "field": "value" - } + }, + "absolute": true } } \ No newline at end of file diff --git a/server/app/configurations/visualizations/wifi-branch-ssid-linechart.json b/server/app/configurations/visualizations/wifi-branch-ssid-linechart.json index 6e6ec424..df09ebdd 100644 --- a/server/app/configurations/visualizations/wifi-branch-ssid-linechart.json +++ b/server/app/configurations/visualizations/wifi-branch-ssid-linechart.json @@ -2,10 +2,11 @@ "id": "wifi-branch-ssid-linechart", "graph": "LineGraph", "title": "Usage - {{ssid}}", - "description": "TBD", + "description": "Usage over a period of time", "author": "Ronak Shah", "creationDate": "04/07/2017", "data": { + "dateHistogram": true, "xColumn": "ts", "xLabel": "Time", "yColumn": "SumOf", diff --git a/server/app/configurations/visualizations/wifi-branch-ssid-signal-lastseen.json b/server/app/configurations/visualizations/wifi-branch-ssid-signal-lastseen.json index 1ffef388..b8d662bd 100644 --- a/server/app/configurations/visualizations/wifi-branch-ssid-signal-lastseen.json +++ b/server/app/configurations/visualizations/wifi-branch-ssid-signal-lastseen.json @@ -2,7 +2,7 @@ "id": "wifi-branch-ssid-signal-lastseen", "graph": "Table", "title": "User Information - {{ ssid }}", - "description": "TBD", + "description": "SSID signal specific information", "author": "Ronak Shah", "creationDate": "04/07/2017", "data": { diff --git a/server/app/configurations/visualizations/wifi-branch-table.json b/server/app/configurations/visualizations/wifi-branch-table.json index 45b1c140..4cec4977 100644 --- a/server/app/configurations/visualizations/wifi-branch-table.json +++ b/server/app/configurations/visualizations/wifi-branch-table.json @@ -2,7 +2,7 @@ "id": "wifi-branch-table", "graph": "Table", "title": "Wifi Branch Table", - "description": "TBD", + "description": "SSIDs, Clients and Usage table", "author": "Ronak Shah", "creationDate": "04/07/2017", "data": { @@ -10,7 +10,7 @@ { "column": "SSID", "label": "SSID"}, { "column": "Client", "label": "Client" }, { "column": "IP", "label": "IP" }, - { "column": "SumofBytes", "label": "Total Usage" } + { "column": "SumofBytes", "label": "Total Usage", "format": ",.2s" } ] }, "listeners": [{ From adafd3835b11179c6f3ea5883b6ad02bc8ae99b8 Mon Sep 17 00:00:00 2001 From: nxanil Date: Tue, 20 Jun 2017 12:59:10 +0530 Subject: [PATCH 15/70] Deleting Configuration from Frontend --- .../configurations/dashboards/wifiBranch.json | 89 ---------------- .../queries/wifi-branch-active-clients.json | 59 ----------- .../queries/wifi-branch-active-ssids.json | 59 ----------- .../queries/wifi-branch-ssid-linechart.json | 100 ------------------ .../wifi-branch-ssid-signal-lastseen.json | 41 ------- .../queries/wifi-branch-table.json | 70 ------------ .../wifi-branch-active-clients.json | 17 --- .../wifi-branch-active-ssids.json | 17 --- .../wifi-branch-ssid-linechart.json | 26 ----- .../wifi-branch-ssid-signal-lastseen.json | 16 --- .../visualizations/wifi-branch-table.json | 22 ---- 11 files changed, 516 deletions(-) delete mode 100644 public/configurations/dashboards/wifiBranch.json delete mode 100644 public/configurations/queries/wifi-branch-active-clients.json delete mode 100644 public/configurations/queries/wifi-branch-active-ssids.json delete mode 100644 public/configurations/queries/wifi-branch-ssid-linechart.json delete mode 100644 public/configurations/queries/wifi-branch-ssid-signal-lastseen.json delete mode 100644 public/configurations/queries/wifi-branch-table.json delete mode 100644 public/configurations/visualizations/wifi-branch-active-clients.json delete mode 100644 public/configurations/visualizations/wifi-branch-active-ssids.json delete mode 100644 public/configurations/visualizations/wifi-branch-ssid-linechart.json delete mode 100644 public/configurations/visualizations/wifi-branch-ssid-signal-lastseen.json delete mode 100644 public/configurations/visualizations/wifi-branch-table.json diff --git a/public/configurations/dashboards/wifiBranch.json b/public/configurations/dashboards/wifiBranch.json deleted file mode 100644 index aa342397..00000000 --- a/public/configurations/dashboards/wifiBranch.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "id": "wifiBranch", - "author": "Ronak Shah", - "creationDate": "04/07/2017", - "title": "WIFI Branch", - "settings": { - "verticalCompact": false - }, - "visualizations": [ - { - "id": "wifi-branch-active-ssids", - "x": 0, - "y": 0, - "w": 2, - "h": 5, - "minW": 2, - "minH": 5 - }, - { - "id": "wifi-branch-active-clients", - "x": 2, - "y": 0, - "w": 2, - "h": 5, - "minW": 2, - "minH": 5 - }, - { - "id": "wifi-branch-table", - "x": 0, - "y": 5, - "w": 6, - "h": 12, - "minW": 6, - "minH": 12 - }, - { - "id": "wifi-branch-ssid-linechart", - "x": 0, - "y": 17, - "w": 10, - "h": 12, - "minW": 10, - "minH": 12 - }, - { - "id": "wifi-branch-ssid-signal-lastseen", - "x": 6, - "y": 5, - "w": 6, - "h": 12, - "minW": 6, - "minH": 12 - } - ], - "filterOptions": { - "Time interval": { - "parameter": "startTime", - "default": "now-15m", - "options": [ - { - "label": "Last 15 min", - "value": "now-15m", - "default": true, - "forceOptions": { - "interval": "1m", - "prevStartTime": "now-30m" - } - }, - { - "label": "Last 24h", - "value": "now-24h", - "forceOptions": { - "interval": "1h", - "prevStartTime": "now-48h" - } - }, - { - "label": "Last 7 days", - "value": "now-7d", - "forceOptions": { - "interval": "12h", - "prevStartTime": "now-14d" - } - } - ] - } - } -} diff --git a/public/configurations/queries/wifi-branch-active-clients.json b/public/configurations/queries/wifi-branch-active-clients.json deleted file mode 100644 index 927806a4..00000000 --- a/public/configurations/queries/wifi-branch-active-clients.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "id":"wifi-branch-active-clients", - "title":"TBD", - "service":"elasticsearch", - "query":{ - "index":"{{index:nuage_wifi}}", - "type":"{{type:nuage_doc_type}}", - "body": { - "size":0, - "query":{ - "bool":{ - "must":[ - { - "term":{ - "enterpriseName":"{{enterpriseName:wifi_enterprise}}" - } - }, - { - "term":{ - "nsg":"{{nsg:wifi_nsg}}" - } - } - ] - } - }, - "aggs": { - "timezones": { - "filters": { - "filters": { - "Last 10": { - "range": { - "timestamp": { - "gte": "now-10m", - "lte": "now" - } - } - }, - "Last 24": { - "range": { - "timestamp": { - "gte": "now-24h", - "lte": "now" - } - } - } - } - }, - "aggs":{ - "Clients":{ - "cardinality":{ - "field":"client_mac" - } - } - } - } - } - } - } -} diff --git a/public/configurations/queries/wifi-branch-active-ssids.json b/public/configurations/queries/wifi-branch-active-ssids.json deleted file mode 100644 index 37eafbdb..00000000 --- a/public/configurations/queries/wifi-branch-active-ssids.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "id":"wifi-branch-active-ssids", - "title":"TBD", - "service":"elasticsearch", - "query":{ - "index":"{{index:nuage_wifi}}", - "type":"{{type:nuage_doc_type}}", - "body": { - "size":0, - "query":{ - "bool":{ - "must":[ - { - "term":{ - "enterpriseName":"{{enterpriseName:wifi_enterprise}}" - } - }, - { - "term":{ - "nsg":"{{nsg:wifi_nsg}}" - } - } - ] - } - }, - "aggs": { - "timezones": { - "filters": { - "filters": { - "Last 10": { - "range": { - "timestamp": { - "gte": "now-10m", - "lte": "now" - } - } - }, - "Last 24": { - "range": { - "timestamp": { - "gte": "now-24h", - "lte": "now" - } - } - } - } - }, - "aggs":{ - "SSID":{ - "cardinality":{ - "field":"ssid-name" - } - } - } - } - } - } - } -} diff --git a/public/configurations/queries/wifi-branch-ssid-linechart.json b/public/configurations/queries/wifi-branch-ssid-linechart.json deleted file mode 100644 index 89c4cd15..00000000 --- a/public/configurations/queries/wifi-branch-ssid-linechart.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "id":"wifi-branch-ssid-linechart", - "title":"TBD", - "service":"elasticsearch", - "query":{ - "index":"{{index:nuage_wifi}}", - "type":"{{type:nuage_doc_type}}", - "body":{ - "size":0, - "query":{ - "bool":{ - "must":[ - { - "range":{ - "timestamp":{ - "gte":"{{startTime:now-24h}}", - "lte":"{{endTime:now}}", - "format":"epoch_millis" - } - } - } - ] - } - }, - "aggs":{ - "5":{ - "filters":{ - "filters":{ - "Enterprise":{ - "query":{ - "term":{ - "enterpriseName":"{{enterpriseName:wifi_enterprise}}" - } - } - } - } - }, - "aggs": { - "4": { - "filters":{ - "filters":{ - "NSG":{ - "query":{ - "term":{ - "nsg":"{{nsg:wifi_nsg}}" - } - } - } - } - }, - "aggs": { - "3": { - "filters":{ - "filters":{ - "SSID":{ - "query":{ - "term":{ - "ssid-name":"{{ssid}}" - } - } - } - } - }, - "aggs": { - "ts": { - "date_histogram": { - "field": "timestamp", - "interval": "{{interval:1h}}" - }, - "aggs": { - "Users": { - "terms": { - "field": "client_mac", - "size": 0, - "order": { - "SumOf": "desc" - } - }, - "aggs": { - "SumOf": { - "sum": { - "script": { - "inline": "doc['rx_bytes'].value + doc['tx_bytes'].value" - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } - } -} diff --git a/public/configurations/queries/wifi-branch-ssid-signal-lastseen.json b/public/configurations/queries/wifi-branch-ssid-signal-lastseen.json deleted file mode 100644 index 6f1cda7b..00000000 --- a/public/configurations/queries/wifi-branch-ssid-signal-lastseen.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "id":"wifi-branch-ssid-signal-lastseen", - "title":"TBD", - "service":"elasticsearch", - "query":{ - "index":"{{index:nuage_wifi}}", - "type":"{{type:nuage_doc_type}}", - "body":{ - "query":{ - "bool":{ - "must":[ - { - "range":{ - "timestamp":{ - "gte":"now-1m", - "lte":"now", - "format":"epoch_millis" - } - } - }, - { - "term": { - "ssid-name": "{{ssid}}" - } - }, - { - "term":{ - "enterpriseName":"{{enterpriseName:wifi_enterprise}}" - } - }, - { - "term":{ - "nsg":"{{nsg:wifi_nsg}}" - } - } - ] - } - } - } - } -} diff --git a/public/configurations/queries/wifi-branch-table.json b/public/configurations/queries/wifi-branch-table.json deleted file mode 100644 index ffaae968..00000000 --- a/public/configurations/queries/wifi-branch-table.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "id":"wifi-branch-table", - "title":"TBD", - "service":"elasticsearch", - "query":{ - "index":"{{index:nuage_wifi}}", - "type":"{{type:nuage_doc_type}}", - "body":{ - "size":0, - "query":{ - "bool":{ - "must":[ - { - "range":{ - "timestamp":{ - "gte":"{{startTime:now-24h}}", - "lte":"{{endTimeTime:now}}", - "format":"epoch_millis" - } - } - }, - { - "term":{ - "enterpriseName":"{{enterpriseName:wifi_enterprise}}" - } - }, - { - "term":{ - "nsg":"{{nsg:wifi_nsg}}" - } - } - ] - } - }, - "aggs": { - "SSID": { - "terms": { - "field": "ssid-name" - }, - "aggs": { - "Client": { - "terms": { - "field": "client_mac" - }, - "aggs": { - "IP": { - "terms": { - "field": "client_ip", - "order": { - "SumofBytes": "desc" - } - }, - "aggs": { - "SumofBytes": { - "sum": { - "script": { - "inline": "doc['rx_bytes'].value + doc['tx_bytes'].value" - } - } - } - } - } - } - } - } - } - } - } - } -} \ No newline at end of file diff --git a/public/configurations/visualizations/wifi-branch-active-clients.json b/public/configurations/visualizations/wifi-branch-active-clients.json deleted file mode 100644 index 57797752..00000000 --- a/public/configurations/visualizations/wifi-branch-active-clients.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "id": "wifi-branch-active-clients", - "title": "Active Clients", - "query": "wifi-branch-active-clients", - "description": "Active clients for last 10 min and last 24hrs", - "graph": "VariationTextGraph", - "showTitleBar": true, - "data": { - "titlePosition": "top", - "target":{ - "column": "timezones", - "value": "Last 10", - "field": "value" - }, - "absolute": true - } -} diff --git a/public/configurations/visualizations/wifi-branch-active-ssids.json b/public/configurations/visualizations/wifi-branch-active-ssids.json deleted file mode 100644 index 3cbaa310..00000000 --- a/public/configurations/visualizations/wifi-branch-active-ssids.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "id": "wifi-branch-active-ssids", - "title": "Active SSIDs", - "description": "Active SSIDs for last 10 min and last 24hrs", - "query": "wifi-branch-active-ssids", - "graph": "VariationTextGraph", - "showTitleBar": true, - "data": { - "titlePosition": "top", - "target":{ - "column": "timezones", - "value": "Last 10", - "field": "value" - }, - "absolute": true - } -} \ No newline at end of file diff --git a/public/configurations/visualizations/wifi-branch-ssid-linechart.json b/public/configurations/visualizations/wifi-branch-ssid-linechart.json deleted file mode 100644 index df09ebdd..00000000 --- a/public/configurations/visualizations/wifi-branch-ssid-linechart.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "id": "wifi-branch-ssid-linechart", - "graph": "LineGraph", - "title": "Usage - {{ssid}}", - "description": "Usage over a period of time", - "author": "Ronak Shah", - "creationDate": "04/07/2017", - "data": { - "dateHistogram": true, - "xColumn": "ts", - "xLabel": "Time", - "yColumn": "SumOf", - "yLabel": "Total Usage", - "yTicks": 5, - "linesColumn": "Users", - "zeroStart": false, - "tooltip": [ - { "column": "Users", "label": "user" }, - { "column": "SumOf", "label": "Usage(rx/tx bytes)"} - ], - "stroke": { - "width": "2px" - } - }, - "query": "wifi-branch-ssid-linechart" -} diff --git a/public/configurations/visualizations/wifi-branch-ssid-signal-lastseen.json b/public/configurations/visualizations/wifi-branch-ssid-signal-lastseen.json deleted file mode 100644 index b8d662bd..00000000 --- a/public/configurations/visualizations/wifi-branch-ssid-signal-lastseen.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "id": "wifi-branch-ssid-signal-lastseen", - "graph": "Table", - "title": "User Information - {{ ssid }}", - "description": "SSID signal specific information", - "author": "Ronak Shah", - "creationDate": "04/07/2017", - "data": { - "columns": [ - { "column": "client_mac", "label": "User"}, - { "column": "signal_strength", "label": "Signal (dB)" }, - { "column": "inactive_time", "label": "Last Seen" } - ] - }, - "query": "wifi-branch-ssid-signal-lastseen" -} diff --git a/public/configurations/visualizations/wifi-branch-table.json b/public/configurations/visualizations/wifi-branch-table.json deleted file mode 100644 index 4cec4977..00000000 --- a/public/configurations/visualizations/wifi-branch-table.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "id": "wifi-branch-table", - "graph": "Table", - "title": "Wifi Branch Table", - "description": "SSIDs, Clients and Usage table", - "author": "Ronak Shah", - "creationDate": "04/07/2017", - "data": { - "columns": [ - { "column": "SSID", "label": "SSID"}, - { "column": "Client", "label": "Client" }, - { "column": "IP", "label": "IP" }, - { "column": "SumofBytes", "label": "Total Usage", "format": ",.2s" } - ] - }, - "listeners": [{ - "params": { - "ssid": "SSID" - } - }], - "query": "wifi-branch-table" -} From 98bab26ad340eedf867513d52ac3cea6800af628 Mon Sep 17 00:00:00 2001 From: nxanil Date: Tue, 20 Jun 2017 15:37:06 +0530 Subject: [PATCH 16/70] Fixes for Middleware Testing --- server/app/lib/services/vsd/index.js | 5 +++-- src/configs/nuage/scripts/vnf-simulator/vnf_simulator.py | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/server/app/lib/services/vsd/index.js b/server/app/lib/services/vsd/index.js index bdf9b639..c7a6d154 100644 --- a/server/app/lib/services/vsd/index.js +++ b/server/app/lib/services/vsd/index.js @@ -83,10 +83,11 @@ const makeRequest = (url, headers) => { headers: headers }) .then((response) => { - return resolve(JSON.parse(response)) + return resolve(response ? JSON.parse(response) : []) }) .catch((error) => { - return reject(error) + console.log(error) + return reject({message: error}) }); }); } diff --git a/src/configs/nuage/scripts/vnf-simulator/vnf_simulator.py b/src/configs/nuage/scripts/vnf-simulator/vnf_simulator.py index 1842c351..2febcc90 100644 --- a/src/configs/nuage/scripts/vnf-simulator/vnf_simulator.py +++ b/src/configs/nuage/scripts/vnf-simulator/vnf_simulator.py @@ -37,6 +37,7 @@ def writeToES(es_data): # Start with 24 hours a go startTime = int(time.time()) * 1000 - (24 * 60 * 60 * 1000) for i in range(1440): + es_data['enterpriseName'] = 'enterprise-1'; es_data['timestamp'] = startTime + (i * 300000) es_data['cpu'] = random.randint(0, 100) es_data['memory'] = random.randint(0, 100) From 5ad4a97895f232013a75e287344c180083757f9c Mon Sep 17 00:00:00 2001 From: nxanil Date: Thu, 27 Jul 2017 00:18:58 +0530 Subject: [PATCH 17/70] Added prefix and param eshost option --- .env.example | 1 + server/app/configurations/constants.js | 2 +- .../app/lib/services/elasticsearch/index.js | 19 ++++++++++--------- server/package.json | 1 + 4 files changed, 13 insertions(+), 10 deletions(-) create mode 100644 .env.example diff --git a/.env.example b/.env.example new file mode 100644 index 00000000..b385b31b --- /dev/null +++ b/.env.example @@ -0,0 +1 @@ +REACT_APP_API_URL=http://localhost:8010/reports/api/ diff --git a/server/app/configurations/constants.js b/server/app/configurations/constants.js index 0de90be9..0c7d98d3 100644 --- a/server/app/configurations/constants.js +++ b/server/app/configurations/constants.js @@ -14,7 +14,7 @@ const defaultConfig = { release: require('../../package.json').version, baseDir: path.normalize(__dirname + '/../..'), - apiPrefix: '/api', + apiPrefix: '/reports/api', }; export default defaultConfig; diff --git a/server/app/lib/services/elasticsearch/index.js b/server/app/lib/services/elasticsearch/index.js index dc1b158e..d837ccf5 100644 --- a/server/app/lib/services/elasticsearch/index.js +++ b/server/app/lib/services/elasticsearch/index.js @@ -3,9 +3,9 @@ import tabify from "./tabify"; import { getUsedParameters } from "../../utils/configurations"; var client = null; -let config = function () { +let config = function (eshost) { return { - host: process.env.APP_ELASTICSEARCH_HOST ? process.env.APP_ELASTICSEARCH_HOST : null, + host: eshost ? eshost : (process.env.APP_ELASTICSEARCH_HOST ? process.env.APP_ELASTICSEARCH_HOST : null), log: 'trace', apiVersion: '2.2', sniffOnStart: true, @@ -14,13 +14,13 @@ let config = function () { } } -export const getCurrentConfig = function () { - let currentConfig = config() +export const getCurrentConfig = function (eshost) { + let currentConfig = config(eshost) return currentConfig; } -let ESClient = function () { - var config = getCurrentConfig(); +let ESClient = function (eshost) { + var config = getCurrentConfig(eshost); if (!config.host){ throw new Error("The ElasticSearch host is not configured. You can configure the ElasticSearch host by setting the environment variable REACT_APP_ELASTICSEARCH_HOST at compile time. For development with a local ElasticSearch instance running on the default port, you can put the following in your .bashrc or .profile startup script: 'export REACT_APP_ELASTICSEARCH_HOST=http://localhost:9200'"); @@ -29,11 +29,12 @@ let ESClient = function () { return new elasticsearch.Client(config); } -const fetch = function (queryConfiguration) { - var client = ESClient() // eslint-disable-line +const fetch = function (queryConfiguration, context) { + var eshost = context.eshost ? context.eshost : null; + var client = ESClient(eshost) // eslint-disable-line if (client == null) { - client = ESClient() ; + client = ESClient(eshost) ; } if (!client) diff --git a/server/package.json b/server/package.json index 4dbabd24..c2671c9c 100644 --- a/server/package.json +++ b/server/package.json @@ -25,6 +25,7 @@ "lodash": "^4.16.4", "method-override": "^2.3.6", "morgan": "^1.7.0", + "request": "^2.81.0", "request-promise": "^4.2.1" }, "devDependencies": { From c641989abebbcfa09e68ec7a3bd54fcc0e6ed96c Mon Sep 17 00:00:00 2001 From: nxanil Date: Thu, 27 Jul 2017 00:27:28 +0530 Subject: [PATCH 18/70] Added default URI for API_URL --- src/services/configurations/index.js | 2 +- src/services/servicemanager/index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/services/configurations/index.js b/src/services/configurations/index.js index 2de0888c..18ed1ebc 100644 --- a/src/services/configurations/index.js +++ b/src/services/configurations/index.js @@ -4,7 +4,7 @@ import { checkStatus, parseJSON } from "../common"; const config = { path: process.env.PUBLIC_URL + "/configurations/", - api: process.env.REACT_APP_API_URL, + api: process.env.REACT_APP_API_URL ? process.env.REACT_APP_API_URL : "http://localhost:8010/reports/api/", cachingTime: 30000, // (ms) -> default 30s } diff --git a/src/services/servicemanager/index.js b/src/services/servicemanager/index.js index 6c6ab46e..896d7a9f 100644 --- a/src/services/servicemanager/index.js +++ b/src/services/servicemanager/index.js @@ -7,7 +7,7 @@ import { checkStatus, parseJSON } from "../common"; let config = { timingCache: 5000, - api: process.env.REACT_APP_API_URL, + api: process.env.REACT_APP_API_URL ? process.env.REACT_APP_API_URL : "http://localhost:8010/reports/api/", } /* From 4d0f66d039c49fbec1f54273b4e04db283a1dd01 Mon Sep 17 00:00:00 2001 From: ronakmshah Date: Wed, 26 Jul 2017 14:01:12 -0700 Subject: [PATCH 19/70] changing middlware api endpoints --- server/app/configurations/constants.js | 6 +++--- server/app/server.js | 2 +- src/services/configurations/index.js | 2 +- src/services/servicemanager/index.js | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/server/app/configurations/constants.js b/server/app/configurations/constants.js index 0c7d98d3..df53fd77 100644 --- a/server/app/configurations/constants.js +++ b/server/app/configurations/constants.js @@ -9,12 +9,12 @@ const defaultConfig = { production: process.env.NODE_ENV === 'production', }; }, - port: process.env.APP_SERVER_PORT || 8010, - ip: process.env.APP_SERVER_IP || '0.0.0.0', + port: process.env.MIDDLEWARE_SERVER_PORT || 8010, + ip: process.env.MIDDLEWARE_SERVER_IP || 'localhost', release: require('../../package.json').version, baseDir: path.normalize(__dirname + '/../..'), - apiPrefix: '/reports/api', + apiPrefix: '/middleware/api', }; export default defaultConfig; diff --git a/server/app/server.js b/server/app/server.js index dd786e43..f2f9948c 100644 --- a/server/app/server.js +++ b/server/app/server.js @@ -31,7 +31,7 @@ app.use(methodOverride()); // Mount API routes app.use(Constants.apiPrefix, routes); -app.listen(Constants.port, () => { +app.listen(Constants.port, Constants.ip, () => { // eslint-disable-next-line no-console console.log(` Port: ${Constants.port} diff --git a/src/services/configurations/index.js b/src/services/configurations/index.js index 18ed1ebc..a00ada05 100644 --- a/src/services/configurations/index.js +++ b/src/services/configurations/index.js @@ -4,7 +4,7 @@ import { checkStatus, parseJSON } from "../common"; const config = { path: process.env.PUBLIC_URL + "/configurations/", - api: process.env.REACT_APP_API_URL ? process.env.REACT_APP_API_URL : "http://localhost:8010/reports/api/", + api: process.env.REACT_APP_API_URL ? process.env.REACT_APP_API_URL : "http://localhost:8010/middleware/api", cachingTime: 30000, // (ms) -> default 30s } diff --git a/src/services/servicemanager/index.js b/src/services/servicemanager/index.js index 896d7a9f..cb33bff9 100644 --- a/src/services/servicemanager/index.js +++ b/src/services/servicemanager/index.js @@ -7,7 +7,7 @@ import { checkStatus, parseJSON } from "../common"; let config = { timingCache: 5000, - api: process.env.REACT_APP_API_URL ? process.env.REACT_APP_API_URL : "http://localhost:8010/reports/api/", + api: process.env.REACT_APP_API_URL ? process.env.REACT_APP_API_URL : "http://localhost:8010/middleware/api/", } /* From 4273e10bc3d6eab41272d1393b8851571ce6b20b Mon Sep 17 00:00:00 2001 From: nxanil Date: Fri, 4 Aug 2017 12:56:50 +0530 Subject: [PATCH 20/70] Setup of testing framework - Created dashboard --- .../dashboards/testDashboard1.json | 99 +++++++++++++++++++ .../app/configurations/dataset/database.json | 78 +++++++++++++++ .../queries/test-bar-graph.json | 5 + .../queries/test-chord-graph.json | 5 + .../queries/test-heatmap-graph.json | 5 + .../queries/test-line-graph.json | 5 + .../queries/test-multi-line-graph.json | 5 + .../queries/test-pie-graph.json | 5 + .../queries/test-simple-text-graph.json | 2 + .../configurations/queries/test-table.json | 5 + .../queries/test-variation-text-graph.json | 6 ++ .../visualizations/test-bar-graph.json | 36 +++++++ .../visualizations/test-chord-graph.json | 13 +++ .../visualizations/test-gauge-graph.json | 13 +++ .../visualizations/test-heatmap-graph.json | 28 ++++++ .../visualizations/test-line-graph.json | 26 +++++ .../visualizations/test-multi-line-graph.json | 30 ++++++ .../visualizations/test-pie-graph.json | 32 ++++++ .../test-simple-text-graph.json | 13 +++ .../visualizations/test-table.json | 18 ++++ .../test-variation-text-graph.json | 15 +++ server/app/lib/servicemanager/index.js | 4 +- server/app/lib/services/dataset/index.js | 33 +++++++ server/app/lib/utils/fetch.js | 3 +- src/services/dataset/index.js | 55 +++++++++++ src/services/servicemanager/index.js | 4 +- 26 files changed, 540 insertions(+), 3 deletions(-) create mode 100644 server/app/configurations/dashboards/testDashboard1.json create mode 100644 server/app/configurations/dataset/database.json create mode 100644 server/app/configurations/queries/test-bar-graph.json create mode 100644 server/app/configurations/queries/test-chord-graph.json create mode 100644 server/app/configurations/queries/test-heatmap-graph.json create mode 100644 server/app/configurations/queries/test-line-graph.json create mode 100644 server/app/configurations/queries/test-multi-line-graph.json create mode 100644 server/app/configurations/queries/test-pie-graph.json create mode 100644 server/app/configurations/queries/test-simple-text-graph.json create mode 100644 server/app/configurations/queries/test-table.json create mode 100644 server/app/configurations/queries/test-variation-text-graph.json create mode 100644 server/app/configurations/visualizations/test-bar-graph.json create mode 100644 server/app/configurations/visualizations/test-chord-graph.json create mode 100644 server/app/configurations/visualizations/test-gauge-graph.json create mode 100644 server/app/configurations/visualizations/test-heatmap-graph.json create mode 100644 server/app/configurations/visualizations/test-line-graph.json create mode 100644 server/app/configurations/visualizations/test-multi-line-graph.json create mode 100644 server/app/configurations/visualizations/test-pie-graph.json create mode 100644 server/app/configurations/visualizations/test-simple-text-graph.json create mode 100644 server/app/configurations/visualizations/test-table.json create mode 100644 server/app/configurations/visualizations/test-variation-text-graph.json create mode 100644 server/app/lib/services/dataset/index.js create mode 100644 src/services/dataset/index.js diff --git a/server/app/configurations/dashboards/testDashboard1.json b/server/app/configurations/dashboards/testDashboard1.json new file mode 100644 index 00000000..50ae4596 --- /dev/null +++ b/server/app/configurations/dashboards/testDashboard1.json @@ -0,0 +1,99 @@ +{ + "id": "testDashboard1", + "author": "Anil Chauhan", + "creationDate": "08/03/2017", + "title": "Test Dashboard", + "visualizations": [ + { + "id": "test-bar-graph", + "x": 0, + "y": 0, + "w": 3, + "h": 15, + "minW": 2, + "minH": 12 + }, + { + "id": "test-table", + "x": 3, + "y": 0, + "w": 6, + "h": 15, + "minW": 2, + "minH": 12 + }, + { + "id": "test-pie-graph", + "x": 9, + "y": 0, + "w": 3, + "h": 15, + "minW": 2, + "minH": 12 + }, + { + "id": "test-chord-graph", + "x": 0, + "y": 15, + "w": 3, + "h": 15, + "minW": 2, + "minH": 12 + }, + { + "id": "test-simple-text-graph", + "x": 3, + "y": 15, + "w": 3, + "h": 15, + "minW": 2, + "minH": 12 + }, + { + "id": "test-line-graph", + "x": 6, + "y": 15, + "w": 3, + "h": 15, + "minW": 2, + "minH": 12, + "graph": "LineGraph" + }, + { + "id": "test-gauge-graph", + "x": 9, + "y": 15, + "w": 3, + "h": 15, + "minW": 2, + "minH": 12 + }, + { + "id": "test-multi-line-graph", + "x": 0, + "y": 30, + "w": 6, + "h": 15, + "minW": 2, + "minH": 12 + }, + { + "id": "test-variation-text-graph", + "x": 6, + "y": 30, + "w": 3, + "h": 15, + "minW": 2, + "minH": 12 + }, + { + "id": "test-heatmap-graph", + "x": 0, + "y": 45, + "w": 6, + "h": 15, + "minW": 2, + "minH": 12 + } + ] +} diff --git a/server/app/configurations/dataset/database.json b/server/app/configurations/dataset/database.json new file mode 100644 index 00000000..b8f681eb --- /dev/null +++ b/server/app/configurations/dataset/database.json @@ -0,0 +1,78 @@ +[ + { + "timestamp": 1500883469000, + "messageType": 2, + "Application": "Default Application", + "SumofBytes": 364150370, + "APMGroup": "myAG-0", + "Sum of MB": 347.280855178833, + "L7Classification": "WEBEX", + "doc_count": 10743, + "key_as_string": "2017-07-27T03:00:00.000Z", + "SlaStatus": "InSla", + "SumOf": 49000, + "timezones": "Last 24", + "key": 1499166000000, + "CPU":56.72727272727273, + "DISK":43.09090909090909, + "MEMORY":50.54545454545455, + "value": 2422791762 + }, + { + "timestamp": 1500883470000, + "messageType": 2, + "Application": "1 Application", + "SumofBytes": 364150370, + "APMGroup": "myAG-0", + "Sum of MB": 348.280855178833, + "L7Classification": "NETFLIX", + "doc_count": 10743, + "key_as_string": "2017-07-27T03:30:00.000Z", + "SlaStatus": "InSla", + "SumOf": 50000, + "timezones": "Prev 24", + "key": 1499166000000, + "CPU":58.72727272727273, + "DISK":45.09090909090909, + "MEMORY":52.54545454545455, + "value": 3143532309 + }, + { + "timestamp": 1500883471000, + "messageType": 2, + "Application": "2 Application", + "SumofBytes": 364150370, + "APMGroup": "myAG-0", + "Sum of MB": 349.280855178833, + "L7Classification": "CISCOVPN", + "doc_count": 11642, + "key_as_string": "2017-07-27T03:15:00.000Z", + "SlaStatus": "InSla", + "SumOf": 51000, + "timezones": "Last 24", + "key": 1499166000000, + "CPU":59.72727272727273, + "DISK":46.09090909090909, + "MEMORY":53.54545454545455, + "value": 23 + }, + { + "timestamp": 1500883472000, + "messageType": 2, + "Application": "3 Application", + "SumofBytes": 364150370, + "APMGroup": "myAG-0", + "Sum of MB": 350.280855178833, + "L7Classification": "MSOffice365", + "doc_count": 14326, + "key_as_string": "2017-07-27T03:45:00.000Z", + "SlaStatus": "InSla", + "SumOf": 52000, + "timezones": "Prev 24", + "key": 1499166000000, + "CPU":60.72727272727273, + "DISK":47.09090909090909, + "MEMORY":54.54545454545455, + "value": 33 + } +] \ No newline at end of file diff --git a/server/app/configurations/queries/test-bar-graph.json b/server/app/configurations/queries/test-bar-graph.json new file mode 100644 index 00000000..7843ef25 --- /dev/null +++ b/server/app/configurations/queries/test-bar-graph.json @@ -0,0 +1,5 @@ +{ + "id": "test-bar-graph", + "title": "BarGraph", + "service": "dataset" +} \ No newline at end of file diff --git a/server/app/configurations/queries/test-chord-graph.json b/server/app/configurations/queries/test-chord-graph.json new file mode 100644 index 00000000..6b35c374 --- /dev/null +++ b/server/app/configurations/queries/test-chord-graph.json @@ -0,0 +1,5 @@ +{ + "id":"test-chord-graph", + "title":"ChordGraph", + "service": "dataset" +} diff --git a/server/app/configurations/queries/test-heatmap-graph.json b/server/app/configurations/queries/test-heatmap-graph.json new file mode 100644 index 00000000..a61ae9c1 --- /dev/null +++ b/server/app/configurations/queries/test-heatmap-graph.json @@ -0,0 +1,5 @@ +{ + "id": "test-heatmap-graph", + "title": "HeatmapGraph", + "service": "dataset" +} \ No newline at end of file diff --git a/server/app/configurations/queries/test-line-graph.json b/server/app/configurations/queries/test-line-graph.json new file mode 100644 index 00000000..188d6737 --- /dev/null +++ b/server/app/configurations/queries/test-line-graph.json @@ -0,0 +1,5 @@ +{ + "id":"test-line-graph", + "title":"LineGraph", + "service": "dataset" +} diff --git a/server/app/configurations/queries/test-multi-line-graph.json b/server/app/configurations/queries/test-multi-line-graph.json new file mode 100644 index 00000000..9813acbd --- /dev/null +++ b/server/app/configurations/queries/test-multi-line-graph.json @@ -0,0 +1,5 @@ +{ + "id": "test-multi-line-graph", + "title": "MultiLineGraph", + "service": "dataset" +} \ No newline at end of file diff --git a/server/app/configurations/queries/test-pie-graph.json b/server/app/configurations/queries/test-pie-graph.json new file mode 100644 index 00000000..8ae1e41c --- /dev/null +++ b/server/app/configurations/queries/test-pie-graph.json @@ -0,0 +1,5 @@ +{ + "id": "test-table", + "title": "PieGraph", + "service": "dataset" +} \ No newline at end of file diff --git a/server/app/configurations/queries/test-simple-text-graph.json b/server/app/configurations/queries/test-simple-text-graph.json new file mode 100644 index 00000000..7a73a41b --- /dev/null +++ b/server/app/configurations/queries/test-simple-text-graph.json @@ -0,0 +1,2 @@ +{ +} \ No newline at end of file diff --git a/server/app/configurations/queries/test-table.json b/server/app/configurations/queries/test-table.json new file mode 100644 index 00000000..a47b803e --- /dev/null +++ b/server/app/configurations/queries/test-table.json @@ -0,0 +1,5 @@ +{ + "id": "test-table", + "title": "Top 5 Applications", + "service": "dataset" +} \ No newline at end of file diff --git a/server/app/configurations/queries/test-variation-text-graph.json b/server/app/configurations/queries/test-variation-text-graph.json new file mode 100644 index 00000000..190ecb31 --- /dev/null +++ b/server/app/configurations/queries/test-variation-text-graph.json @@ -0,0 +1,6 @@ +{ + "id": "test-variation-text-graph", + "title": "VariationTextGraph", + "service": "dataset", + "limit": 2 +} \ No newline at end of file diff --git a/server/app/configurations/visualizations/test-bar-graph.json b/server/app/configurations/visualizations/test-bar-graph.json new file mode 100644 index 00000000..8090db1f --- /dev/null +++ b/server/app/configurations/visualizations/test-bar-graph.json @@ -0,0 +1,36 @@ +{ + "id": "test-bar-graph", + "graph": "BarGraph", + "title": "BarGraph", + "description": "Enterprise level top 5 discovered applications. Computation: Sum of total Bytes sent and/or received in descending order across all domains.", + "author": "Anil Chauhan", + "creationDate": "08/03/2017", + "data": { + "xColumn": "L7Classification", + "xLabel": "Application", + "yColumn": "Sum of MB", + "yLabel": "Total Bytes", + "yTicks": 5, + "yTickFormat": ".2s", + "colors": [ + "#7da3f7", + "#b3d645", + "#fec26a", + "#e78ac3", + "#f79e99" + ], + "tooltip": [ + { "column": "L7Classification", "label": "L7 Signature" }, + { "column": "Sum of MB", "format": ",.2s"} + ] + }, + "listeners": [ + { + "redirect": "/dashboards/aarEnterpriseDetail", + "params": { + "app": "L7Classification" + } + } + ], + "query": "test-bar-graph" +} \ No newline at end of file diff --git a/server/app/configurations/visualizations/test-chord-graph.json b/server/app/configurations/visualizations/test-chord-graph.json new file mode 100644 index 00000000..b87d8e66 --- /dev/null +++ b/server/app/configurations/visualizations/test-chord-graph.json @@ -0,0 +1,13 @@ +{ + "id": "test-chord-graph", + "graph": "ChordGraph", + "title": "ChordGraph", + "author": "Anil Chauhan", + "creationDate": "08/03/2017", + "data": { + "chordSourceColumn": "spg", + "chordDestinationColumn": "dpg", + "colorColumn": "spg" + }, + "query": "test-chord-graph" +} diff --git a/server/app/configurations/visualizations/test-gauge-graph.json b/server/app/configurations/visualizations/test-gauge-graph.json new file mode 100644 index 00000000..7a240feb --- /dev/null +++ b/server/app/configurations/visualizations/test-gauge-graph.json @@ -0,0 +1,13 @@ +{ + "id": "test-gauge-graph", + "graph": "GaugeGraph", + "title": "GaugeGraph", + "author": "Anil Chauhan", + "creationDate": "08/03/2017", + "data": { + "maxValue": "100", + "currentValue": "10", + "gauzeTicks": "10" + }, + "query": "test-heatmap-graph" +} \ No newline at end of file diff --git a/server/app/configurations/visualizations/test-heatmap-graph.json b/server/app/configurations/visualizations/test-heatmap-graph.json new file mode 100644 index 00000000..abd7c46f --- /dev/null +++ b/server/app/configurations/visualizations/test-heatmap-graph.json @@ -0,0 +1,28 @@ +{ + "id": "test-heatmap-graph", + "graph": "HeatmapGraph", + "title": "HeatmapGraph", + "author": "Anil Chauhan", + "creationDate": "08/03/2017", + "data": { + "xColumn": "timestamp", + "xLabel": "Time", + "yColumn": "application", + "yTickGrid": false, + "yLabel": "Application", + "legendColumn": "slastatus", + "cellColumn": "slastatus", + "legend": { + "show": true, + "orientation": "horizontal", + "circleSize": 4, + "labelOffset": 2 + }, + "tooltip": [ + { "column": "date_histo", "label": "Timestamp", "timeFormat": "%b %d, %y %X"}, + { "column": "application", "label": "Application" }, + { "column": "slastatus", "label": "Status" } + ] + }, + "query": "test-heatmap-graph" +} diff --git a/server/app/configurations/visualizations/test-line-graph.json b/server/app/configurations/visualizations/test-line-graph.json new file mode 100644 index 00000000..09f3f612 --- /dev/null +++ b/server/app/configurations/visualizations/test-line-graph.json @@ -0,0 +1,26 @@ +{ + "id": "test-line-graph", + "graph": "LineGraph", + "title": "LineGraph", + "description": "This line graph represents total no of ACL deny received for this domain over a period of specified time. By default it shows ACL Deny hits. One can select other ACL actions i.e from the drop down menu on this dashboard.", + "author": "Anil Chauhan", + "creationDate": "08/03/2017", + "data": { + "dateHistogram": true, + "xColumn": "timestamp", + "yColumn": "SumOf", + "stroke": { + "color": "#f76159", + "width": "2px" + }, + "xTickGrid": false, + "yTickGrid": true, + "yTickFormat": ".2s", + "xLabel": "Time", + "yLabel": "Total # ACL Hits", + "xColumn": "timestamp", + "yColumn": "SumOf", + "brushEnabled": false + }, + "query": "test-line-graph" +} \ No newline at end of file diff --git a/server/app/configurations/visualizations/test-multi-line-graph.json b/server/app/configurations/visualizations/test-multi-line-graph.json new file mode 100644 index 00000000..72b6efdf --- /dev/null +++ b/server/app/configurations/visualizations/test-multi-line-graph.json @@ -0,0 +1,30 @@ +{ + "id": "test-multi-line-graph", + "graph": "MultiLineGraph", + "title": "MultiLineGraph", + "description": "Memory, disk and CPU utilization over a period of time selected in interval", + "author": "Anil Chauhan", + "creationDate": "08/03/2017", + "data": { + "dateHistogram": true, + "xColumn": "timestamp", + "xLabel": "Time", + "yColumn": ["CPU", "MEMORY", "DISK"], + "yTickFormat": ",.0f", + "yLabel": "", + "yTicks": 5, + "linesColumn": ["CPU", "MEMORY", "DISK"], + "legend": { + "orientation": "vertical", + "show": true, + "circleSize": 5, + "labelOffset": 5 + }, + "tooltip": [ + { "column": "columnType", "label": "Type"}, + { "column": "yColumn", "label": "Value", "format": "0.2f"}, + { "column": "timestamp", "label": "Timestamp"} + ] + }, + "query": "test-multi-line-graph" +} \ No newline at end of file diff --git a/server/app/configurations/visualizations/test-pie-graph.json b/server/app/configurations/visualizations/test-pie-graph.json new file mode 100644 index 00000000..3b666719 --- /dev/null +++ b/server/app/configurations/visualizations/test-pie-graph.json @@ -0,0 +1,32 @@ +{ + "id": "test-pie-graph", + "graph": "PieGraph", + "title": "PieGraph", + "author": "Anil Chauhan", + "creationDate": "08/03/2017", + "data": { + "sliceColumn": "Sum of MB", + "labelColumn": "L7Classification", + "tooltip": [ + { "column": "L7Classification", "label": "L7 Classification" }, + { "column": "Sum of MB", "format": ",.1f"} + ], + "percentages": true, + "percentagesFormat": ",.1%", + "pieLabelRadius": 0.55, + "pieOuterRadius": 0.95, + "legend": { + "show": true, + "orientation": "horizontal", + "circleSize": 4, + "labelOffset": 2 + } + }, + "listeners": [{ + "redirect": "/dashboards/dateHistogramExample", + "params": { + "app": "L7Classification" + } + }], + "query": "test-pie-graph" +} diff --git a/server/app/configurations/visualizations/test-simple-text-graph.json b/server/app/configurations/visualizations/test-simple-text-graph.json new file mode 100644 index 00000000..9d0fe4b1 --- /dev/null +++ b/server/app/configurations/visualizations/test-simple-text-graph.json @@ -0,0 +1,13 @@ +{ + "id": "test-simple-text-graph", + "graph": "SimpleTextGraph", + "title": "SimpleTextGraph", + "author": "Anil Chauhan", + "creationDate": "08/03/2017", + "script": "effective-score", + "data": { + "circle": true, + "circleColor": "#4097FF", + "targetedColumn": "name" + } +} \ No newline at end of file diff --git a/server/app/configurations/visualizations/test-table.json b/server/app/configurations/visualizations/test-table.json new file mode 100644 index 00000000..a4adb3b3 --- /dev/null +++ b/server/app/configurations/visualizations/test-table.json @@ -0,0 +1,18 @@ +{ + "id": "test-table", + "graph": "Table", + "title": "Table", + "description": "Detail for selected event in reverse chronological order within context of this domain.", + "author": "Anil Chauhan", + "creationDate": "08/03/2017", + "data": { + "columns": [ + { "column": "timestamp", "label": "Timestamp", "timeFormat": "%b %d, %y %X"}, + { "column": "messageType", "label": "Message Type" }, + { "column": "SumofBytes", "label": "Sum of Bytes" }, + { "column": "APMGroup", "label": "APM Group" }, + { "column": "doc_count", "label": "Doc Count" } + ] + }, + "query": "test-table" +} \ No newline at end of file diff --git a/server/app/configurations/visualizations/test-variation-text-graph.json b/server/app/configurations/visualizations/test-variation-text-graph.json new file mode 100644 index 00000000..95ccfad8 --- /dev/null +++ b/server/app/configurations/visualizations/test-variation-text-graph.json @@ -0,0 +1,15 @@ +{ + "id": "test-variation-text-graph", + "title": "VariationTextGraph", + "query": "test-variation-text-graph", + "graph": "VariationTextGraph", + "showTitleBar": true, + "data": { + "titlePosition": "top", + "target":{ + "column": "timezones", + "value": "Last 24", + "field": "doc_count" + } + } +} \ No newline at end of file diff --git a/server/app/lib/servicemanager/index.js b/server/app/lib/servicemanager/index.js index 4ed05940..49d7714e 100644 --- a/server/app/lib/servicemanager/index.js +++ b/server/app/lib/servicemanager/index.js @@ -1,6 +1,7 @@ import { ElasticSearchService } from "../services/elasticsearch/index"; import { VSDService } from "../services/vsd/index"; import { MemoryService } from "../services/memory/index"; +import { DatasetService } from "../services/dataset/index"; let config = { timingCache: 5000, @@ -12,7 +13,8 @@ let config = { let services = { elasticsearch: ElasticSearchService, VSD: VSDService, - memory: MemoryService + memory: MemoryService, + dataset: DatasetService }; /* diff --git a/server/app/lib/services/dataset/index.js b/server/app/lib/services/dataset/index.js new file mode 100644 index 00000000..4dc5b0d2 --- /dev/null +++ b/server/app/lib/services/dataset/index.js @@ -0,0 +1,33 @@ +import { getUsedParameters } from '../../utils/configurations'; +import { DirectoryTypes, FetchManager } from '../../utils/fetch'; + +import { taffy } from 'taffydb'; + +const fetch = (parameters) => { + let databaseConfig = FetchManager.fetchAndParseJSON('database', DirectoryTypes.DATASET) + + if(!databaseConfig) + return Promise.reject(); + + let db = taffy(databaseConfig); + + + let query = db().filter(parameters.query); + + if (parameters.sortBy) + query = query.order(parameters.sortBy); + + if (parameters.limit) + query = query.limit(parameters.limit); + + const results = query.get(); + + return new Promise((resolve, reject) => { + resolve(results); + }); +} + +export const DatasetService = { + id: 'dataset', + fetch: fetch +} \ No newline at end of file diff --git a/server/app/lib/utils/fetch.js b/server/app/lib/utils/fetch.js index e48689bb..22be95e6 100644 --- a/server/app/lib/utils/fetch.js +++ b/server/app/lib/utils/fetch.js @@ -7,7 +7,8 @@ export const DirectoryTypes = { DASHBOARD: 'dashboards', QUERY: 'queries', VISUALIZATION: 'visualizations', - MEMORY: 'memory' + MEMORY: 'memory', + DATASET: 'dataset' } const configPath = `${Constants.baseDir}/app/configurations`; diff --git a/src/services/dataset/index.js b/src/services/dataset/index.js new file mode 100644 index 00000000..6408adc9 --- /dev/null +++ b/src/services/dataset/index.js @@ -0,0 +1,55 @@ +import $ from 'jquery'; +import { getUsedParameters } from '../../utils/configurations'; +import { taffy } from 'taffydb'; + +const config = { + path: '/database.json', +} + +let database = null; + +const loadDataBaseFile = () => { + if (database) + return Promise.resolve(database); + + let url = process.env.PUBLIC_URL + config.path; + + return $.get({ + url: url + }).then((response) => { + database = taffy(response); + return database + }); +} + +export const getRequestID = (configuration, context) => { + const parameters = getUsedParameters(configuration, context); + + if (Object.keys(parameters).length === 0) + return configuration.id; + + return configuration.id + '[' + JSON.stringify(parameters) + ']'; +} + +const fetch = (parameters, state) => { + return loadDataBaseFile().then((db) => { + let query = db().filter(parameters.query); + if (parameters.sortBy) + query = query.order(parameters.sortBy); + + if (parameters.limit) + query = query.limit(parameters.limit); + + const results = query.get(); + + // console.error(JSON.stringify(results.slice(0, 3), null, 2)); + return Promise.resolve(results); + }); +} + +export const DatasetService = { + id: 'dataset', + config: config, + getRequestID: getRequestID, + fetch: fetch +} diff --git a/src/services/servicemanager/index.js b/src/services/servicemanager/index.js index cb33bff9..b651ebbc 100644 --- a/src/services/servicemanager/index.js +++ b/src/services/servicemanager/index.js @@ -1,6 +1,7 @@ import { ElasticSearchService } from "../../configs/nuage/elasticsearch/index"; import { VSDService } from "../../configs/nuage/vsd/index"; import { MemoryService } from "../memory"; +import { DatasetService } from "../dataset"; import "whatwg-fetch"; import { checkStatus, parseJSON } from "../common"; @@ -16,7 +17,8 @@ let config = { let services = { elasticsearch: ElasticSearchService, VSD: VSDService, - memory: MemoryService + memory: MemoryService, + dataset: DatasetService }; /* From 0e975e7317201b6b576f69b48556e10e48e4ef2a Mon Sep 17 00:00:00 2001 From: nxanil Date: Tue, 8 Aug 2017 11:48:32 +0530 Subject: [PATCH 21/70] Reduce json fields and make changes in visualization's columns --- .../app/configurations/dataset/database.json | 36 +------------------ .../queries/test-simple-text-graph.json | 3 ++ .../visualizations/test-bar-graph.json | 10 +++--- .../visualizations/test-heatmap-graph.json | 2 +- .../visualizations/test-line-graph.json | 4 +-- .../visualizations/test-pie-graph.json | 10 +++--- .../test-simple-text-graph.json | 10 ++---- .../visualizations/test-table.json | 7 ++-- .../test-variation-text-graph.json | 2 +- 9 files changed, 24 insertions(+), 60 deletions(-) diff --git a/server/app/configurations/dataset/database.json b/server/app/configurations/dataset/database.json index b8f681eb..9867fc9c 100644 --- a/server/app/configurations/dataset/database.json +++ b/server/app/configurations/dataset/database.json @@ -1,18 +1,10 @@ [ { "timestamp": 1500883469000, - "messageType": 2, "Application": "Default Application", - "SumofBytes": 364150370, - "APMGroup": "myAG-0", - "Sum of MB": 347.280855178833, - "L7Classification": "WEBEX", - "doc_count": 10743, "key_as_string": "2017-07-27T03:00:00.000Z", "SlaStatus": "InSla", - "SumOf": 49000, "timezones": "Last 24", - "key": 1499166000000, "CPU":56.72727272727273, "DISK":43.09090909090909, "MEMORY":50.54545454545455, @@ -20,18 +12,10 @@ }, { "timestamp": 1500883470000, - "messageType": 2, "Application": "1 Application", - "SumofBytes": 364150370, - "APMGroup": "myAG-0", - "Sum of MB": 348.280855178833, - "L7Classification": "NETFLIX", - "doc_count": 10743, "key_as_string": "2017-07-27T03:30:00.000Z", "SlaStatus": "InSla", - "SumOf": 50000, "timezones": "Prev 24", - "key": 1499166000000, "CPU":58.72727272727273, "DISK":45.09090909090909, "MEMORY":52.54545454545455, @@ -39,18 +23,9 @@ }, { "timestamp": 1500883471000, - "messageType": 2, "Application": "2 Application", - "SumofBytes": 364150370, - "APMGroup": "myAG-0", - "Sum of MB": 349.280855178833, - "L7Classification": "CISCOVPN", - "doc_count": 11642, "key_as_string": "2017-07-27T03:15:00.000Z", "SlaStatus": "InSla", - "SumOf": 51000, - "timezones": "Last 24", - "key": 1499166000000, "CPU":59.72727272727273, "DISK":46.09090909090909, "MEMORY":53.54545454545455, @@ -58,21 +33,12 @@ }, { "timestamp": 1500883472000, - "messageType": 2, "Application": "3 Application", - "SumofBytes": 364150370, - "APMGroup": "myAG-0", - "Sum of MB": 350.280855178833, - "L7Classification": "MSOffice365", - "doc_count": 14326, "key_as_string": "2017-07-27T03:45:00.000Z", "SlaStatus": "InSla", - "SumOf": 52000, - "timezones": "Prev 24", - "key": 1499166000000, "CPU":60.72727272727273, "DISK":47.09090909090909, "MEMORY":54.54545454545455, - "value": 33 + "value": 364150370 } ] \ No newline at end of file diff --git a/server/app/configurations/queries/test-simple-text-graph.json b/server/app/configurations/queries/test-simple-text-graph.json index 7a73a41b..97089c88 100644 --- a/server/app/configurations/queries/test-simple-text-graph.json +++ b/server/app/configurations/queries/test-simple-text-graph.json @@ -1,2 +1,5 @@ { + "id":"test-simple-text-graph", + "title":"SimpleTextGraph", + "service": "dataset" } \ No newline at end of file diff --git a/server/app/configurations/visualizations/test-bar-graph.json b/server/app/configurations/visualizations/test-bar-graph.json index 8090db1f..93294243 100644 --- a/server/app/configurations/visualizations/test-bar-graph.json +++ b/server/app/configurations/visualizations/test-bar-graph.json @@ -6,9 +6,9 @@ "author": "Anil Chauhan", "creationDate": "08/03/2017", "data": { - "xColumn": "L7Classification", + "xColumn": "Application", "xLabel": "Application", - "yColumn": "Sum of MB", + "yColumn": "CPU", "yLabel": "Total Bytes", "yTicks": 5, "yTickFormat": ".2s", @@ -20,15 +20,15 @@ "#f79e99" ], "tooltip": [ - { "column": "L7Classification", "label": "L7 Signature" }, - { "column": "Sum of MB", "format": ",.2s"} + { "column": "Application", "label": "Application" }, + { "column": "CPU", "format": ",.2s"} ] }, "listeners": [ { "redirect": "/dashboards/aarEnterpriseDetail", "params": { - "app": "L7Classification" + "app": "Application" } } ], diff --git a/server/app/configurations/visualizations/test-heatmap-graph.json b/server/app/configurations/visualizations/test-heatmap-graph.json index abd7c46f..71da668f 100644 --- a/server/app/configurations/visualizations/test-heatmap-graph.json +++ b/server/app/configurations/visualizations/test-heatmap-graph.json @@ -19,7 +19,7 @@ "labelOffset": 2 }, "tooltip": [ - { "column": "date_histo", "label": "Timestamp", "timeFormat": "%b %d, %y %X"}, + { "column": "timestamp", "label": "Timestamp", "timeFormat": "%b %d, %y %X"}, { "column": "application", "label": "Application" }, { "column": "slastatus", "label": "Status" } ] diff --git a/server/app/configurations/visualizations/test-line-graph.json b/server/app/configurations/visualizations/test-line-graph.json index 09f3f612..ae7588b8 100644 --- a/server/app/configurations/visualizations/test-line-graph.json +++ b/server/app/configurations/visualizations/test-line-graph.json @@ -8,7 +8,7 @@ "data": { "dateHistogram": true, "xColumn": "timestamp", - "yColumn": "SumOf", + "yColumn": "value", "stroke": { "color": "#f76159", "width": "2px" @@ -19,7 +19,7 @@ "xLabel": "Time", "yLabel": "Total # ACL Hits", "xColumn": "timestamp", - "yColumn": "SumOf", + "yColumn": "value", "brushEnabled": false }, "query": "test-line-graph" diff --git a/server/app/configurations/visualizations/test-pie-graph.json b/server/app/configurations/visualizations/test-pie-graph.json index 3b666719..bbe41725 100644 --- a/server/app/configurations/visualizations/test-pie-graph.json +++ b/server/app/configurations/visualizations/test-pie-graph.json @@ -5,11 +5,11 @@ "author": "Anil Chauhan", "creationDate": "08/03/2017", "data": { - "sliceColumn": "Sum of MB", - "labelColumn": "L7Classification", + "sliceColumn": "value", + "labelColumn": "Application", "tooltip": [ - { "column": "L7Classification", "label": "L7 Classification" }, - { "column": "Sum of MB", "format": ",.1f"} + { "column": "Application", "label": "Application" }, + { "column": "value", "format": ",.1f"} ], "percentages": true, "percentagesFormat": ",.1%", @@ -25,7 +25,7 @@ "listeners": [{ "redirect": "/dashboards/dateHistogramExample", "params": { - "app": "L7Classification" + "app": "Application" } }], "query": "test-pie-graph" diff --git a/server/app/configurations/visualizations/test-simple-text-graph.json b/server/app/configurations/visualizations/test-simple-text-graph.json index 9d0fe4b1..b96c5f65 100644 --- a/server/app/configurations/visualizations/test-simple-text-graph.json +++ b/server/app/configurations/visualizations/test-simple-text-graph.json @@ -1,13 +1,9 @@ { "id": "test-simple-text-graph", - "graph": "SimpleTextGraph", "title": "SimpleTextGraph", - "author": "Anil Chauhan", - "creationDate": "08/03/2017", - "script": "effective-score", + "query": "test-simple-text-graph", + "graph": "SimpleTextGraph", "data": { - "circle": true, - "circleColor": "#4097FF", - "targetedColumn": "name" + "targetedColumn":"value" } } \ No newline at end of file diff --git a/server/app/configurations/visualizations/test-table.json b/server/app/configurations/visualizations/test-table.json index a4adb3b3..75fbbdce 100644 --- a/server/app/configurations/visualizations/test-table.json +++ b/server/app/configurations/visualizations/test-table.json @@ -8,10 +8,9 @@ "data": { "columns": [ { "column": "timestamp", "label": "Timestamp", "timeFormat": "%b %d, %y %X"}, - { "column": "messageType", "label": "Message Type" }, - { "column": "SumofBytes", "label": "Sum of Bytes" }, - { "column": "APMGroup", "label": "APM Group" }, - { "column": "doc_count", "label": "Doc Count" } + { "column": "Application", "label": "Application" }, + { "column": "MEMORY", "label": "MEMORY" }, + { "column": "value", "label": "Value" } ] }, "query": "test-table" diff --git a/server/app/configurations/visualizations/test-variation-text-graph.json b/server/app/configurations/visualizations/test-variation-text-graph.json index 95ccfad8..149c12d9 100644 --- a/server/app/configurations/visualizations/test-variation-text-graph.json +++ b/server/app/configurations/visualizations/test-variation-text-graph.json @@ -9,7 +9,7 @@ "target":{ "column": "timezones", "value": "Last 24", - "field": "doc_count" + "field": "value" } } } \ No newline at end of file From b3b9f8c76288d800bcea2b65e713aa8c46e80c0c Mon Sep 17 00:00:00 2001 From: nxanil Date: Thu, 10 Aug 2017 19:29:54 +0530 Subject: [PATCH 22/70] Fixed heatmap issue --- .../visualizations/test-heatmap-graph.json | 23 +++++++++++++------ 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/server/app/configurations/visualizations/test-heatmap-graph.json b/server/app/configurations/visualizations/test-heatmap-graph.json index 71da668f..1eb5e681 100644 --- a/server/app/configurations/visualizations/test-heatmap-graph.json +++ b/server/app/configurations/visualizations/test-heatmap-graph.json @@ -1,11 +1,11 @@ { - "id": "test-heatmap-graph", + "id": "aar-flow-sla-heatmap", "graph": "HeatmapGraph", - "title": "HeatmapGraph", + "title": "{{snsg}} ({{fromPersonality}}) to {{dnsg}} ({{toPersonality}}) Sla HeatMap", "author": "Anil Chauhan", - "creationDate": "08/03/2017", + "creationDate": "03/04/2017", "data": { - "xColumn": "timestamp", + "xColumn": "date_histo", "xLabel": "Time", "yColumn": "application", "yTickGrid": false, @@ -23,6 +23,15 @@ { "column": "application", "label": "Application" }, { "column": "slastatus", "label": "Status" } ] - }, - "query": "test-heatmap-graph" -} + + }, + "listeners": [ + { + "params": { + "appName": "application", + "queryStartTime": "timestamp" + } + } + ], + "query": "aar-flow-sla-heatmap" +} \ No newline at end of file From 84f4fd71c7bb943feaebe908bdfedf4c1dc55f69 Mon Sep 17 00:00:00 2001 From: nxanil Date: Wed, 16 Aug 2017 14:11:54 +0530 Subject: [PATCH 23/70] Fixed missing column issue in heatmap graph --- .../visualizations/test-heatmap-graph.json | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/server/app/configurations/visualizations/test-heatmap-graph.json b/server/app/configurations/visualizations/test-heatmap-graph.json index 1eb5e681..a9a4cea8 100644 --- a/server/app/configurations/visualizations/test-heatmap-graph.json +++ b/server/app/configurations/visualizations/test-heatmap-graph.json @@ -3,15 +3,15 @@ "graph": "HeatmapGraph", "title": "{{snsg}} ({{fromPersonality}}) to {{dnsg}} ({{toPersonality}}) Sla HeatMap", "author": "Anil Chauhan", - "creationDate": "03/04/2017", + "creationDate": "08/03/2017", "data": { - "xColumn": "date_histo", + "xColumn": "timestamp", "xLabel": "Time", - "yColumn": "application", + "yColumn": "Application", "yTickGrid": false, "yLabel": "Application", - "legendColumn": "slastatus", - "cellColumn": "slastatus", + "legendColumn": "SlaStatus", + "cellColumn": "SlaStatus", "legend": { "show": true, "orientation": "horizontal", @@ -20,18 +20,18 @@ }, "tooltip": [ { "column": "timestamp", "label": "Timestamp", "timeFormat": "%b %d, %y %X"}, - { "column": "application", "label": "Application" }, - { "column": "slastatus", "label": "Status" } + { "column": "Application", "label": "Application" }, + { "column": "SlaStatus", "label": "Status" } ] }, "listeners": [ { "params": { - "appName": "application", + "appName": "Application", "queryStartTime": "timestamp" } } ], - "query": "aar-flow-sla-heatmap" -} \ No newline at end of file + "query": "test-heatmap-graph" +} From b7b5564d8d16c8ef5871320ce7bf12eb20b0b4e3 Mon Sep 17 00:00:00 2001 From: nxanil Date: Wed, 16 Aug 2017 14:19:32 +0530 Subject: [PATCH 24/70] Named test heatmap chart --- .../app/configurations/visualizations/test-heatmap-graph.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/app/configurations/visualizations/test-heatmap-graph.json b/server/app/configurations/visualizations/test-heatmap-graph.json index a9a4cea8..e88a8324 100644 --- a/server/app/configurations/visualizations/test-heatmap-graph.json +++ b/server/app/configurations/visualizations/test-heatmap-graph.json @@ -1,7 +1,7 @@ { - "id": "aar-flow-sla-heatmap", + "id": "test-heatmap-graph", "graph": "HeatmapGraph", - "title": "{{snsg}} ({{fromPersonality}}) to {{dnsg}} ({{toPersonality}}) Sla HeatMap", + "title": "HeatmapGraph", "author": "Anil Chauhan", "creationDate": "08/03/2017", "data": { From 4fee887a4e0819e256f056c6cfa39c25074b56bf Mon Sep 17 00:00:00 2001 From: nxanil Date: Wed, 16 Aug 2017 15:26:50 +0530 Subject: [PATCH 25/70] Added card id --- src/components/Visualization/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/Visualization/index.js b/src/components/Visualization/index.js index 312dff10..ad64c7d6 100644 --- a/src/components/Visualization/index.js +++ b/src/components/Visualization/index.js @@ -419,7 +419,8 @@ class VisualizationView extends React.Component { render() { const { configuration, - context + context, + id } = this.props; if (!this.state.parameterizable || !configuration) @@ -453,6 +454,7 @@ class VisualizationView extends React.Component { style={Object.assign({}, style.card, configStyle.card)} containerStyle={style.cardContainer} ref={this.cardTextReference} + id={id} > { this.renderTitleBarIfNeeded() } { this.renderFiltersToolBar() } From ed2076213a1996a386654aa70902331ca7a62d42 Mon Sep 17 00:00:00 2001 From: nxanil Date: Fri, 18 Aug 2017 15:26:30 +0530 Subject: [PATCH 26/70] Setup of testing framework - Added functionality to load data json file dynamically --- .../dashboards/{testDashboard1.json => testDashboard.json} | 2 +- server/app/lib/services/dataset/index.js | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) rename server/app/configurations/dashboards/{testDashboard1.json => testDashboard.json} (98%) diff --git a/server/app/configurations/dashboards/testDashboard1.json b/server/app/configurations/dashboards/testDashboard.json similarity index 98% rename from server/app/configurations/dashboards/testDashboard1.json rename to server/app/configurations/dashboards/testDashboard.json index 50ae4596..21eee7a0 100644 --- a/server/app/configurations/dashboards/testDashboard1.json +++ b/server/app/configurations/dashboards/testDashboard.json @@ -1,5 +1,5 @@ { - "id": "testDashboard1", + "id": "testDashboard", "author": "Anil Chauhan", "creationDate": "08/03/2017", "title": "Test Dashboard", diff --git a/server/app/lib/services/dataset/index.js b/server/app/lib/services/dataset/index.js index 4dc5b0d2..6249889f 100644 --- a/server/app/lib/services/dataset/index.js +++ b/server/app/lib/services/dataset/index.js @@ -3,9 +3,11 @@ import { DirectoryTypes, FetchManager } from '../../utils/fetch'; import { taffy } from 'taffydb'; -const fetch = (parameters) => { - let databaseConfig = FetchManager.fetchAndParseJSON('database', DirectoryTypes.DATASET) +const fetch = (parameters, context) => { + + let file = context[DirectoryTypes.DATASET] ? context[DirectoryTypes.DATASET] : "database"; + let databaseConfig = FetchManager.fetchAndParseJSON(file, DirectoryTypes.DATASET); if(!databaseConfig) return Promise.reject(); From 11455ffa2cbb94f2dde1b4d0cc5d633333a4e387 Mon Sep 17 00:00:00 2001 From: nxanil Date: Mon, 21 Aug 2017 20:39:00 +0530 Subject: [PATCH 27/70] Setup of testing framework - Added custom filters for taffydb --- .../configurations/queries/test-table.json | 9 ++- server/app/lib/services/dataset/index.js | 4 +- server/app/lib/utils/taffyFilters.js | 64 +++++++++++++++++++ 3 files changed, 75 insertions(+), 2 deletions(-) create mode 100644 server/app/lib/utils/taffyFilters.js diff --git a/server/app/configurations/queries/test-table.json b/server/app/configurations/queries/test-table.json index a47b803e..9b73f6b8 100644 --- a/server/app/configurations/queries/test-table.json +++ b/server/app/configurations/queries/test-table.json @@ -1,5 +1,12 @@ { "id": "test-table", "title": "Top 5 Applications", - "service": "dataset" + "service": "dataset", + "query": { + "timestamp": { + "gte": "{{startTime:now-24h}}", + "lte": "{{endTime:now}}", + "fieldType": "timestamp" + } + } } \ No newline at end of file diff --git a/server/app/lib/services/dataset/index.js b/server/app/lib/services/dataset/index.js index 6249889f..3c6a1451 100644 --- a/server/app/lib/services/dataset/index.js +++ b/server/app/lib/services/dataset/index.js @@ -1,5 +1,6 @@ import { getUsedParameters } from '../../utils/configurations'; import { DirectoryTypes, FetchManager } from '../../utils/fetch'; +import { TaffyFilter } from '../../utils/taffyFilters'; import { taffy } from 'taffydb'; @@ -13,8 +14,9 @@ const fetch = (parameters, context) => { let db = taffy(databaseConfig); + let params = parameters.query ? TaffyFilter.converter(parameters.query) : {}; - let query = db().filter(parameters.query); + let query = db().filter(params); if (parameters.sortBy) query = query.order(parameters.sortBy); diff --git a/server/app/lib/utils/taffyFilters.js b/server/app/lib/utils/taffyFilters.js new file mode 100644 index 00000000..226102ab --- /dev/null +++ b/server/app/lib/utils/taffyFilters.js @@ -0,0 +1,64 @@ +const TimeUnit = { + MINUTE: 'm', + HOURS: 'h', + DAYS: 'd' +} + +const Fields = { + TIMESTAMP : "timestamp" +} + +const convertIntoTimestamp = function (field) { + let time = 0; + let unit = 0; + let params = {}; + let currentTime = Math.round((new Date()).getTime()); + + for(let key in field) { + + if(!field[key].toString().includes("now")) { + params[key] = field[key]; + continue; + } + + let match = parseInt(field[key].match(/\d+/)); + time = isNaN(match) ? 0 : match; + + if(time) { + switch (field[key].slice(-1)) { + case TimeUnit.DAYS: + unit = 24*60*60*1000; + break; + case TimeUnit.HOURS: + unit = 60*60*1000; + break; + default: + unit = 60*1000; + } + } + + params[key] = eval(currentTime - (time * unit)); + } + + return params; +} + +const converter = function (parameters) { + let params = {}; + for(let key in parameters) { + let fieldType = parameters[key].fieldType; + delete parameters[key].fieldType; + switch (fieldType) { + case Fields.TIMESTAMP: + params[key] = convertIntoTimestamp(parameters[key]); + break; + default: + params[key] = parameters[key] + } + } + return params; +} + +export const TaffyFilter = { + converter: converter +} From 3461567e8d9bd573dd55e2b7a66cd1e3988cf010 Mon Sep 17 00:00:00 2001 From: SS Date: Wed, 30 Aug 2017 14:00:23 +0530 Subject: [PATCH 28/70] testing framework done --- .env | 2 + package.json | 8 +- public/uploads/2/8/17/checkout.png | Bin 0 -> 2355 bytes server/.env.example | 6 + .../configurations/queries/test-table.json | 9 +- server/app/controllers/test.controller.js | 23 +++ server/app/lib/database/database.js | 10 ++ server/app/middleware/connection.js | 6 + server/app/models/test.model.js | 149 ++++++++++++++++++ server/app/routes.js | 7 +- server/package.json | 1 + src/App.js | 12 +- src/components/Graphs/HeatmapGraph/index.js | 1 - src/components/Testing/DataSets.js | 89 +++++++++++ src/components/Testing/EditReports.js | 100 ++++++++++++ src/components/Testing/ReportDetails.js | 100 ++++++++++++ src/components/Testing/index.js | 93 +++++++++++ src/components/Testing/style.js | 30 ++++ src/components/Visualization/index.js | 1 - 19 files changed, 628 insertions(+), 19 deletions(-) create mode 100644 .env create mode 100644 public/uploads/2/8/17/checkout.png create mode 100644 server/app/controllers/test.controller.js create mode 100644 server/app/lib/database/database.js create mode 100644 server/app/middleware/connection.js create mode 100644 server/app/models/test.model.js create mode 100644 src/components/Testing/DataSets.js create mode 100644 src/components/Testing/EditReports.js create mode 100644 src/components/Testing/ReportDetails.js create mode 100644 src/components/Testing/index.js create mode 100644 src/components/Testing/style.js diff --git a/.env b/.env new file mode 100644 index 00000000..3e083783 --- /dev/null +++ b/.env @@ -0,0 +1,2 @@ +REACT_APP_API_URL=http://localhost:8010/middleware/api/ +IMAGE_UPLOADS_URL=/public/uploads/ \ No newline at end of file diff --git a/package.json b/package.json index 9ea183c5..8a84037f 100644 --- a/package.json +++ b/package.json @@ -22,11 +22,11 @@ "jquery": "3.1.0", "json-templates": "1.5.0", "material-ui": "0.15.4", - "react": "15.3.2", - "react-copy-to-clipboard": "^4.2.3", - "react-csv": "^1.0.8", + "react": "^15.3.2", + "react-bootstrap": "^0.31.2", "react-copy-to-clipboard": "^4.3.1", - "react-dom": "15.3.2", + "react-csv": "^1.0.8", + "react-dom": "^15.3.2", "react-fontawesome": "1.3.1", "react-grid-layout": "0.13.9", "react-interval": "1.3.3", diff --git a/public/uploads/2/8/17/checkout.png b/public/uploads/2/8/17/checkout.png new file mode 100644 index 0000000000000000000000000000000000000000..31f9c91703c5cd3c4e44f8be78b90951c831b309 GIT binary patch literal 2355 zcmV-33C#A1P)KHEPCt#Y ze%Dh{`RwcKORyZToH1Yq%))?K7%&SBz-MP??%l;~)ee4o!6ARWP`?ik9oa;VU%|27 z9d}n7mxdutS=|IYTXlk;^0-z|TQyy2t6;we$1(uEX2A79?FBz?f}>X>P#xgQ;CKyS zFBz~MO}#~iS_Jz!fbBD2Gq8i;=SZ1f7et!wrvUVV0cS&%8hWoZ))Q{ZW~b3YOas_k z1{~Me2ZzC?fqraSqv-(#A3Jf#6qhmGXc=w{PXsB0MAx3czQWvUt7jE_idL#aR5Ug^>TtHS;u7eZ3bXz zfX^F9f8H2wso^PF&C@SHBF)F0SrZq4^D+@$&)WliXry%U?@Lw5u?65 z`9+O!X{lQ1khNtlKh`I0HO2^q4ww~sVFryzUuPD|o(~4I@yVvSQGfisXa>rr51ugG z#{F@rvah)Yb4o-ub+V`OSh7$2TU{X-KZznZ{%t)26KWj$Ypd>df7afn(y`1jromT5w3Nqd^{x?RrkTO)xU)N zQ00Yb7POhtnzL;%9)FhCV3;vtxN&VBD&J2*T8dGo6q)E7hD#puO%=dBBGDopxN*on zfp1b$gQ52nwt1H6PnU4Pp|8FpwwZ31(O?SNJH+U9VW7pZ=a;Y+=K;P(PlpKhqDq0h zBw(tq%K*l%T#bc0g001dCK}c{WBOn6Z37cpyg`ntTZ);s24idQlWW!yYB0B4!!eW#wNNgk_0$S_fGcu3K{0r-;u7%j--d=Z*!9ik4^MgRubT4OG~iyQ6;X#{BJUwGsPy>()-& z<--D#_VdK&bW?ooLRpB>?*a?BgNFq8Wcwq32OPgAi4kBdS?6drfB|#)d=N|l%(OEH ziIlIK8AyTkh(2Valm}y*aqcv-0)&j569fF8h6x|10?OWIc^lJGv;2Ax`F(MBy1T2N z$blAlz*XcSrfqv)-qs4>(gV7r&#s;YpaagCnLzfzc`ycvKqA=Hmm+ zGkXj;TP`#;DOr&k?xO2-d5&3#f<`=dr7XQd6<#+ym%^)nHeY}L^*#BQS(U5}+7}K>jE9o82(VY+^L+KtEQ8M- zCZg?5PEglU$2OxvRdihxz$PXdvl??#lVw;4*nU!!YcE8y!yKetU7=SiCj~f5gMT4@ zQK=c@jDhzn-7w_%T@|Qx5>{%h%=$Jbs`fL^^;IqW199AbnfPGrCTCqLFMKp`EnxtN zCH=q$FI_OvX89@|!T!!`eGP^u5_?zSr88wyFx#Jq-(a`P&~$ep_TakIk84g*dy4?S zBY$brsuPy>_5^;1p7%0~Mm#y5uV z11d_9eW450nGb#@=KZAK`$$>!SSMV#CcPP?!X1s=%CJ~#oo;1#ZtF=wGug64C|6VH zFN)Ix3oA4}1>INDYcVlt2#&YP!^|gDZ6|z7&=e;{?x8+dy-~Fx__H9m<|rZIN{hML z=X;C|!Hwb~Zt3ryY=l8efBjXJ@PUs!zUcC3;(p4!H;HOQeF}0AIos3Vy^MLB(ZqP{ z%>lzK(}KquA?Gi#PVKzHleFbAZ%npjEoV8vbeeFUij;23T7GX5G~t}`*w-%8Dot6d zZa#Yy_>1$7J8G_&nwEb9_&#m&1QbB{eZuzr?xo4gzHGiAI%=xr7w9t&>(aOJCO13# zgCTt9pv!Jh<=gn6>LxmFt_OndI}TlfTdK}b{@sOUkSVQMa!o3&Ico+mLq>tyEMPX* zjhSUUzzn%jxHy0Ta!1hE;z2Rb?c3bwjsqAVdkQkoBZI7M<+=42I`r~nc_Xrk3D>S+ z47#@AHj@YIX>(e?t5Y$_!#dyQhNr=CZI(CqU7XgUfyM5g5nk2TyapczV3Q;E&C=J7 zo9Y;Z7i8(BQ*zClZE6%S%W(+ { + console.log("Query Ran: " + DB.last_query()); + if (err) return console.error("Uh oh! Couldn't get results: " + err.msg); + res.json({ + results: response, + }); + } + ); + } + + updateDataSet(req, res) { + var report_id = req.params.report_id; + var dashboard_id = req.params.dashboard_id; + var dashboard_dataset_id = req.params.dashboard_dataset_id; + var updateStatus = req.params.status; + DB.where('rd.report_id',report_id) + .where('rd.dashboard_id',dashboard_id) + .where('rd.dashboard_dataset_id',dashboard_dataset_id) + .from('t_report_detail rd') + .set('status',updateStatus) + .update(null, null, null, (err, data) => { + if (err) return console.error(err); + this.successResponse(data, res); + + }); + } + + deleteReports(req, res) { + var report_id = req.params.report_id; + DB.delete('t_reports', {id: report_id}, (err, data) => { + if (err) return console.error(err); + this.successResponse('success', res); + }); + } + + + reportsDetail(req, res) { + var report_id = req.params.report_id; + console.log(report_id); + const select = ['rd.report_id','rd.dashboard_id dashboardsId','rd.dashboard_dataset_id dataSetId', 'dd.datafile', 'dd.name dataset_name', 'dd.description', 'dd.context','d.name dashboardname','d.url dashboardUrl','r.start_time','r.end_time','r.created_at','GROUP_CONCAT(rd.dashboard_id) dashboardIds','GROUP_CONCAT(rd.dashboard_dataset_id) datasetIds','GROUP_CONCAT(dd.datafile) dataFiles','GROUP_CONCAT(dd.name) datasetName','GROUP_CONCAT(dd.description) datasetDesc','GROUP_CONCAT(dd.context) datasetContext',]; + DB.select( select ).from('t_report_detail rd') + .join('t_dashboards d', 'rd.dashboard_id=d.id') + .join('t_dashboard_dataset dd', 'rd.dashboard_dataset_id=dd.id') + .join('t_reports r', 'r.id=rd.report_id') + .group_by(['rd.dashboard_id']) + .where('rd.report_id',report_id) + .get((err,response) => { + console.log("Query Ran: " + DB.last_query()); + //console.log(response); + if (err) { + this.errorResponse(err.msg, res); + } else if(typeof response !== 'undefined' && response.length==0) { + this.errorResponse('Not Found', res); + } + var dashboardIds = []; + + var dataSets = []; + var counter = 0; + for(let resValues in response) { + counter++; + var finalresult = { + dataset : [], + }; + var dataSetName = []; + var dashboardIdSet = []; + var dataSetIds = []; + var dataAllFiles = []; + var dataAllSetDesc = []; + var datasetContextAll = []; + + var dataIds = response[resValues].datasetIds.split(','); + for(let d of dataIds) { + dataSetIds.push(d); + } + var dataNames = response[resValues].datasetName.split(','); + for(let dN of dataNames) { + dataSetName.push(dN); + } + var dataFiles = response[resValues].dataFiles.split(','); + for(let dF of dataFiles) { + dataAllFiles.push(dF); + } + var datasetDesc = response[resValues].datasetDesc.split(','); + for(let dataDesc of datasetDesc) { + dataAllSetDesc.push(dataDesc); + } + var datasetContext = response[resValues].datasetContext.split(','); + for(let dC of datasetContext) { + datasetContextAll.push(dC); + } + + var dashboardIds = response[resValues].dashboardIds.split(','); + for(let dB of dashboardIds) { + dashboardIdSet.push(dB); + } + for(var finalData in dataIds) { + finalresult.dataset.push({ + dashboard_id : response[resValues].dashboardsId, + dataSetId : dataSetIds[finalData], + datafile : dataAllFiles[finalData], + name : dataSetName[finalData], + description : dataAllSetDesc[finalData], + context : datasetContextAll[finalData], + }); + finalresult.dashboardname = response[resValues].dashboardname; + finalresult.dashboardId = response[resValues].dashboardsId; + finalresult.report_id = response[resValues].report_id; + if(counter==1) { + finalresult.start_time = response[resValues].start_time; + finalresult.end_time = response[resValues].end_time; + finalresult.created_at = response[resValues].created_at; + finalresult.count = counter; + } + } + dataSets.push(finalresult); + } + + this.successResponse(dataSets, res); + //this.successResponse(response, res); + } + ); + } + + successResponse(response, res) { + return res.json({ + status : 200, + error : false, + results: response, + }); + } + + errorResponse(err, res) { + return res.json({ + status : 404, + error : true, + results: 'Data Not Found', + }); + } + +} + +export default new TestModel(); diff --git a/server/app/routes.js b/server/app/routes.js index 4ac3449d..0d045483 100644 --- a/server/app/routes.js +++ b/server/app/routes.js @@ -3,7 +3,7 @@ import { Router } from 'express'; import IndexController from './controllers/index.controller'; import DashboardsController from './controllers/dashboards.controller'; import VisualizationsController from './controllers/visualizations.controller'; - +import TestController from './controllers/test.controller'; import errorHandler from './middleware/error-handler'; const routes = new Router(); @@ -15,6 +15,11 @@ routes.get('/dashboards/:dashboard', DashboardsController.index); routes.get('/visualizations/:visualization', VisualizationsController.index); routes.post('/visualizations/fetch/:visualization', VisualizationsController.fetch); +routes.get('/testing/reports', TestController.reports); +routes.get('/testing/reports/:report_id', TestController.reportsDetail); +routes.get('/testing/update/reports/:report_id/:dashboard_id/:dashboard_dataset_id/:status', TestController.updateDataSet); +routes.get('/testing/reports/delete/:report_id', TestController.deleteReports); + routes.use(errorHandler); export default routes; diff --git a/server/package.json b/server/package.json index c2671c9c..ee45e3fa 100644 --- a/server/package.json +++ b/server/package.json @@ -25,6 +25,7 @@ "lodash": "^4.16.4", "method-override": "^2.3.6", "morgan": "^1.7.0", + "node-querybuilder": "^1.0.3", "request": "^2.81.0", "request-promise": "^4.2.1" }, diff --git a/src/App.js b/src/App.js index e822c849..aef6d87b 100644 --- a/src/App.js +++ b/src/App.js @@ -3,10 +3,11 @@ import { ReduxRouter } from "redux-router"; import { Route } from "react-router"; import AppContainer from "./components/App/AppContainer.js"; -import Dashboard from "./components/Dashboard" -import Visualization from "./components/Visualization" - - +import Dashboard from "./components/Dashboard"; +import Visualization from "./components/Visualization"; +import Testing from "./components/Testing"; +import ReportDetails from "./components/Testing/ReportDetails.js"; +import EditReports from "./components/Testing/EditReports.js"; class App extends Component { render() { @@ -17,6 +18,9 @@ class App extends Component { + + + diff --git a/src/components/Graphs/HeatmapGraph/index.js b/src/components/Graphs/HeatmapGraph/index.js index 0a14abad..2da6264c 100644 --- a/src/components/Graphs/HeatmapGraph/index.js +++ b/src/components/Graphs/HeatmapGraph/index.js @@ -40,7 +40,6 @@ export default class HeatmapGraph extends XYGraph { colors, legend, margin, - padding, stroke, xColumn, xLabel, diff --git a/src/components/Testing/DataSets.js b/src/components/Testing/DataSets.js new file mode 100644 index 00000000..0b1a6be0 --- /dev/null +++ b/src/components/Testing/DataSets.js @@ -0,0 +1,89 @@ +import React, { Component } from "react"; +import style from "./style"; +import { Button,Collapse } from 'react-bootstrap'; +import $ from 'jquery'; + +const initialState = { + reportsDetails : [], + open : false, + showMessage : false +}; +let config = { + timingCache: 5000, + api: process.env.REACT_APP_API_URL ? process.env.REACT_APP_API_URL : "http://localhost:8010/middleware/api/", +} +class DataSets extends Component { + + constructor() { + super(); + this.state = initialState; + this.handleSaveDataSet = this.handleSaveDataSet.bind(this); + } + + handleSaveDataSet(reportId,dashboardId,datasetId) { + var optionSelect = $('input[name=option_'+reportId+'_'+dashboardId+'_'+datasetId+']:checked').val(); + //var optionSelect = $('#pass_'+reportId+'_'+dashboardId+'_'+datasetId).val(); + let url = config.api + "testing/update/reports/"+reportId+"/"+dashboardId+"/"+datasetId+"/"+optionSelect; + fetch(url).then( + function(response){ + return response.json(); + } + ).then(jsonData => { + $('#message_'+reportId+'_'+dashboardId+'_'+datasetId).show(); + }); + } + + render() { + console.log(this.props.dataset); + if(this.props.dataset) { + var Collapsable = this.props.dataset.map((response)=> + +
+ +
+
+
Original
+
+ +
+
+
+
Captured
+
+
+
+
Action
+
+
+ Saved! +
+ Pass + Fail + +
+
+
+
+
+ ); + } + return ( +
+ {Collapsable} + +
+ ) + } +} + +export default DataSets; diff --git a/src/components/Testing/EditReports.js b/src/components/Testing/EditReports.js new file mode 100644 index 00000000..fe37cfd6 --- /dev/null +++ b/src/components/Testing/EditReports.js @@ -0,0 +1,100 @@ +import React, { Component } from "react"; +import style from "./style"; +import { Button,Collapse } from 'react-bootstrap'; +import DataSets from "./DataSets.js"; + +const initialState = { + reportsDetails : [], + open : false +}; +let config = { + timingCache: 5000, + api: process.env.REACT_APP_API_URL ? process.env.REACT_APP_API_URL : "http://localhost:8010/middleware/api/", +} +class ReportDetails extends Component { + + constructor() { + super(); + this.state = initialState; + } + + componentDidMount() { + this.getAllReports(); + } + + getAllReports() { + //alert(config.api); + let url = config.api + "testing/reports/"+this.props.params.id; + fetch(url).then( + function(response){ + return response.json(); + } + ).then(jsonData => { + this.setState({ + reportsDetails : jsonData.results + }); + }); + + } + + render() { + console.log(this.state.reportsDetails); + if(this.state.reportsDetails) { + + var Details = this.state.reportsDetails.map((res) => + +
+
+ +
+
+
+ + + + + + + + + + + + + + + +
Date{res.created_at}
Start Time{res.start_time}
End Time{res.end_time}
+
+
+
+
+
+
this.setState({ open: !this.state.open })}> +

+ + + {res.dashboardname} #{res.dashboardId} + +

+
+
+ +
+ ); + + } + return ( +
+ + + {Details} + +
+ ) + } +} + +export default ReportDetails; diff --git a/src/components/Testing/ReportDetails.js b/src/components/Testing/ReportDetails.js new file mode 100644 index 00000000..fe37cfd6 --- /dev/null +++ b/src/components/Testing/ReportDetails.js @@ -0,0 +1,100 @@ +import React, { Component } from "react"; +import style from "./style"; +import { Button,Collapse } from 'react-bootstrap'; +import DataSets from "./DataSets.js"; + +const initialState = { + reportsDetails : [], + open : false +}; +let config = { + timingCache: 5000, + api: process.env.REACT_APP_API_URL ? process.env.REACT_APP_API_URL : "http://localhost:8010/middleware/api/", +} +class ReportDetails extends Component { + + constructor() { + super(); + this.state = initialState; + } + + componentDidMount() { + this.getAllReports(); + } + + getAllReports() { + //alert(config.api); + let url = config.api + "testing/reports/"+this.props.params.id; + fetch(url).then( + function(response){ + return response.json(); + } + ).then(jsonData => { + this.setState({ + reportsDetails : jsonData.results + }); + }); + + } + + render() { + console.log(this.state.reportsDetails); + if(this.state.reportsDetails) { + + var Details = this.state.reportsDetails.map((res) => + +
+
+ +
+
+
+ + + + + + + + + + + + + + + +
Date{res.created_at}
Start Time{res.start_time}
End Time{res.end_time}
+
+
+
+
+
+
this.setState({ open: !this.state.open })}> +

+ + + {res.dashboardname} #{res.dashboardId} + +

+
+
+ +
+ ); + + } + return ( +
+ + + {Details} + +
+ ) + } +} + +export default ReportDetails; diff --git a/src/components/Testing/index.js b/src/components/Testing/index.js new file mode 100644 index 00000000..8adf02c0 --- /dev/null +++ b/src/components/Testing/index.js @@ -0,0 +1,93 @@ +import React, { Component } from "react"; +import style from "./style"; + +const initialState = { + reportsList : [] +}; +let config = { + timingCache: 5000, + api: process.env.REACT_APP_API_URL ? process.env.REACT_APP_API_URL : "http://localhost:8010/middleware/api/", +} +class Testing extends Component { + + constructor() { + super(); + this.state = initialState; + this.deleteReport = this.deleteReport.bind(this); + } + + componentDidMount() { + this.getAllReports(); + } + + getAllReports() { + let url = config.api + "testing/reports"; + fetch(url).then( + function(response){ + return response.json(); + } + ).then(jsonData => { + this.setState({ + reportsList : jsonData.results + }); + }); + } + + deleteReport(reportId) { + let url = config.api + "testing/reports/delete/"+reportId; + fetch(url).then( + function(response){ + return response.json(); + } + ).then(jsonData => { + this.getAllReports(); + }); + } + + render() { + + const tableItems = this.state.reportsList.map((reports) => + + {reports.id} + {reports.created_at} + {reports.start_time} + {reports.end_time} + {reports.total} + {reports.pass} + {reports.fail} + {reports.status.toUpperCase()} + + + + + + + ); + + return ( + +
+ + + + + + + + + + + + + + + + {tableItems} + +
#DateStart TimeEnd TimeTotal ChartsPassFailStatusAction
+
+ ) + } +} + +export default Testing; diff --git a/src/components/Testing/style.js b/src/components/Testing/style.js new file mode 100644 index 00000000..4e1cc004 --- /dev/null +++ b/src/components/Testing/style.js @@ -0,0 +1,30 @@ +const style = { + overlayContainer: { + color: "rgb(136, 136, 136)", + backgroundColor: "rgb(255, 255, 255)", + transition: "all 450ms cubic-bezier(0.23, 1, 0.32, 1) 0ms", + boxSizing: "border-box", + boxShadow: "rgb(31, 28, 31) 6px 6px 16px -11px", + borderRadius: "2px", + zIndex: "1", + border: "1px solid rgb(217, 217, 217)", + height: "100%", + width: "100%", + }, + tab : { + border: "1px solid rgb(217, 217, 217)", + borderRadius: "2px", + boxShadow: "rgb(31, 28, 31) 6px 6px 16px -11px", + padding:"10px", + cursor:"pointer" + }, + dashboardTab : { + border: "1px solid rgba(0, 0, 0, 0.04)", + marginTop:"10px" + }, + dataSetTab : { + textAlign: "center" + } +} + +export default style; diff --git a/src/components/Visualization/index.js b/src/components/Visualization/index.js index ad64c7d6..3166ee11 100644 --- a/src/components/Visualization/index.js +++ b/src/components/Visualization/index.js @@ -304,7 +304,6 @@ class VisualizationView extends React.Component { renderDownloadIcon() { const { - queryConfiguration, configuration, response } = this.props; From d73468ac21258dab277e9ee92b6cf095e85593f1 Mon Sep 17 00:00:00 2001 From: SS Date: Wed, 30 Aug 2017 14:13:56 +0530 Subject: [PATCH 29/70] removed env file --- .env | 2 -- .env.example | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) delete mode 100644 .env diff --git a/.env b/.env deleted file mode 100644 index 3e083783..00000000 --- a/.env +++ /dev/null @@ -1,2 +0,0 @@ -REACT_APP_API_URL=http://localhost:8010/middleware/api/ -IMAGE_UPLOADS_URL=/public/uploads/ \ No newline at end of file diff --git a/.env.example b/.env.example index b385b31b..d63bb2bb 100644 --- a/.env.example +++ b/.env.example @@ -1 +1,3 @@ REACT_APP_API_URL=http://localhost:8010/reports/api/ +IMAGE_UPLOADS_URL=/public/uploads/ + From 6eefc8b38f0dc2b3b16b9dab6fd869c0d4990a09 Mon Sep 17 00:00:00 2001 From: SS Date: Wed, 30 Aug 2017 18:07:47 +0530 Subject: [PATCH 30/70] testing module changes completed --- public/uploads/5/3/18/checkout.png | Bin 0 -> 2355 bytes public/uploads/6/16/37/checkout.png | Bin 0 -> 2355 bytes server/app/models/base.model.js | 9 +++++ server/app/models/test.model.js | 46 +++++++++++++----------- server/app/routes.js | 2 +- src/components/Testing/DataSets.js | 36 +++++++++---------- src/components/Testing/EditReports.js | 14 ++++---- src/components/Testing/ReportDetails.js | 16 ++++----- 8 files changed, 68 insertions(+), 55 deletions(-) create mode 100644 public/uploads/5/3/18/checkout.png create mode 100644 public/uploads/6/16/37/checkout.png create mode 100644 server/app/models/base.model.js diff --git a/public/uploads/5/3/18/checkout.png b/public/uploads/5/3/18/checkout.png new file mode 100644 index 0000000000000000000000000000000000000000..31f9c91703c5cd3c4e44f8be78b90951c831b309 GIT binary patch literal 2355 zcmV-33C#A1P)KHEPCt#Y ze%Dh{`RwcKORyZToH1Yq%))?K7%&SBz-MP??%l;~)ee4o!6ARWP`?ik9oa;VU%|27 z9d}n7mxdutS=|IYTXlk;^0-z|TQyy2t6;we$1(uEX2A79?FBz?f}>X>P#xgQ;CKyS zFBz~MO}#~iS_Jz!fbBD2Gq8i;=SZ1f7et!wrvUVV0cS&%8hWoZ))Q{ZW~b3YOas_k z1{~Me2ZzC?fqraSqv-(#A3Jf#6qhmGXc=w{PXsB0MAx3czQWvUt7jE_idL#aR5Ug^>TtHS;u7eZ3bXz zfX^F9f8H2wso^PF&C@SHBF)F0SrZq4^D+@$&)WliXry%U?@Lw5u?65 z`9+O!X{lQ1khNtlKh`I0HO2^q4ww~sVFryzUuPD|o(~4I@yVvSQGfisXa>rr51ugG z#{F@rvah)Yb4o-ub+V`OSh7$2TU{X-KZznZ{%t)26KWj$Ypd>df7afn(y`1jromT5w3Nqd^{x?RrkTO)xU)N zQ00Yb7POhtnzL;%9)FhCV3;vtxN&VBD&J2*T8dGo6q)E7hD#puO%=dBBGDopxN*on zfp1b$gQ52nwt1H6PnU4Pp|8FpwwZ31(O?SNJH+U9VW7pZ=a;Y+=K;P(PlpKhqDq0h zBw(tq%K*l%T#bc0g001dCK}c{WBOn6Z37cpyg`ntTZ);s24idQlWW!yYB0B4!!eW#wNNgk_0$S_fGcu3K{0r-;u7%j--d=Z*!9ik4^MgRubT4OG~iyQ6;X#{BJUwGsPy>()-& z<--D#_VdK&bW?ooLRpB>?*a?BgNFq8Wcwq32OPgAi4kBdS?6drfB|#)d=N|l%(OEH ziIlIK8AyTkh(2Valm}y*aqcv-0)&j569fF8h6x|10?OWIc^lJGv;2Ax`F(MBy1T2N z$blAlz*XcSrfqv)-qs4>(gV7r&#s;YpaagCnLzfzc`ycvKqA=Hmm+ zGkXj;TP`#;DOr&k?xO2-d5&3#f<`=dr7XQd6<#+ym%^)nHeY}L^*#BQS(U5}+7}K>jE9o82(VY+^L+KtEQ8M- zCZg?5PEglU$2OxvRdihxz$PXdvl??#lVw;4*nU!!YcE8y!yKetU7=SiCj~f5gMT4@ zQK=c@jDhzn-7w_%T@|Qx5>{%h%=$Jbs`fL^^;IqW199AbnfPGrCTCqLFMKp`EnxtN zCH=q$FI_OvX89@|!T!!`eGP^u5_?zSr88wyFx#Jq-(a`P&~$ep_TakIk84g*dy4?S zBY$brsuPy>_5^;1p7%0~Mm#y5uV z11d_9eW450nGb#@=KZAK`$$>!SSMV#CcPP?!X1s=%CJ~#oo;1#ZtF=wGug64C|6VH zFN)Ix3oA4}1>INDYcVlt2#&YP!^|gDZ6|z7&=e;{?x8+dy-~Fx__H9m<|rZIN{hML z=X;C|!Hwb~Zt3ryY=l8efBjXJ@PUs!zUcC3;(p4!H;HOQeF}0AIos3Vy^MLB(ZqP{ z%>lzK(}KquA?Gi#PVKzHleFbAZ%npjEoV8vbeeFUij;23T7GX5G~t}`*w-%8Dot6d zZa#Yy_>1$7J8G_&nwEb9_&#m&1QbB{eZuzr?xo4gzHGiAI%=xr7w9t&>(aOJCO13# zgCTt9pv!Jh<=gn6>LxmFt_OndI}TlfTdK}b{@sOUkSVQMa!o3&Ico+mLq>tyEMPX* zjhSUUzzn%jxHy0Ta!1hE;z2Rb?c3bwjsqAVdkQkoBZI7M<+=42I`r~nc_Xrk3D>S+ z47#@AHj@YIX>(e?t5Y$_!#dyQhNr=CZI(CqU7XgUfyM5g5nk2TyapczV3Q;E&C=J7 zo9Y;Z7i8(BQ*zClZE6%S%W(+KHEPCt#Y ze%Dh{`RwcKORyZToH1Yq%))?K7%&SBz-MP??%l;~)ee4o!6ARWP`?ik9oa;VU%|27 z9d}n7mxdutS=|IYTXlk;^0-z|TQyy2t6;we$1(uEX2A79?FBz?f}>X>P#xgQ;CKyS zFBz~MO}#~iS_Jz!fbBD2Gq8i;=SZ1f7et!wrvUVV0cS&%8hWoZ))Q{ZW~b3YOas_k z1{~Me2ZzC?fqraSqv-(#A3Jf#6qhmGXc=w{PXsB0MAx3czQWvUt7jE_idL#aR5Ug^>TtHS;u7eZ3bXz zfX^F9f8H2wso^PF&C@SHBF)F0SrZq4^D+@$&)WliXry%U?@Lw5u?65 z`9+O!X{lQ1khNtlKh`I0HO2^q4ww~sVFryzUuPD|o(~4I@yVvSQGfisXa>rr51ugG z#{F@rvah)Yb4o-ub+V`OSh7$2TU{X-KZznZ{%t)26KWj$Ypd>df7afn(y`1jromT5w3Nqd^{x?RrkTO)xU)N zQ00Yb7POhtnzL;%9)FhCV3;vtxN&VBD&J2*T8dGo6q)E7hD#puO%=dBBGDopxN*on zfp1b$gQ52nwt1H6PnU4Pp|8FpwwZ31(O?SNJH+U9VW7pZ=a;Y+=K;P(PlpKhqDq0h zBw(tq%K*l%T#bc0g001dCK}c{WBOn6Z37cpyg`ntTZ);s24idQlWW!yYB0B4!!eW#wNNgk_0$S_fGcu3K{0r-;u7%j--d=Z*!9ik4^MgRubT4OG~iyQ6;X#{BJUwGsPy>()-& z<--D#_VdK&bW?ooLRpB>?*a?BgNFq8Wcwq32OPgAi4kBdS?6drfB|#)d=N|l%(OEH ziIlIK8AyTkh(2Valm}y*aqcv-0)&j569fF8h6x|10?OWIc^lJGv;2Ax`F(MBy1T2N z$blAlz*XcSrfqv)-qs4>(gV7r&#s;YpaagCnLzfzc`ycvKqA=Hmm+ zGkXj;TP`#;DOr&k?xO2-d5&3#f<`=dr7XQd6<#+ym%^)nHeY}L^*#BQS(U5}+7}K>jE9o82(VY+^L+KtEQ8M- zCZg?5PEglU$2OxvRdihxz$PXdvl??#lVw;4*nU!!YcE8y!yKetU7=SiCj~f5gMT4@ zQK=c@jDhzn-7w_%T@|Qx5>{%h%=$Jbs`fL^^;IqW199AbnfPGrCTCqLFMKp`EnxtN zCH=q$FI_OvX89@|!T!!`eGP^u5_?zSr88wyFx#Jq-(a`P&~$ep_TakIk84g*dy4?S zBY$brsuPy>_5^;1p7%0~Mm#y5uV z11d_9eW450nGb#@=KZAK`$$>!SSMV#CcPP?!X1s=%CJ~#oo;1#ZtF=wGug64C|6VH zFN)Ix3oA4}1>INDYcVlt2#&YP!^|gDZ6|z7&=e;{?x8+dy-~Fx__H9m<|rZIN{hML z=X;C|!Hwb~Zt3ryY=l8efBjXJ@PUs!zUcC3;(p4!H;HOQeF}0AIos3Vy^MLB(ZqP{ z%>lzK(}KquA?Gi#PVKzHleFbAZ%npjEoV8vbeeFUij;23T7GX5G~t}`*w-%8Dot6d zZa#Yy_>1$7J8G_&nwEb9_&#m&1QbB{eZuzr?xo4gzHGiAI%=xr7w9t&>(aOJCO13# zgCTt9pv!Jh<=gn6>LxmFt_OndI}TlfTdK}b{@sOUkSVQMa!o3&Ico+mLq>tyEMPX* zjhSUUzzn%jxHy0Ta!1hE;z2Rb?c3bwjsqAVdkQkoBZI7M<+=42I`r~nc_Xrk3D>S+ z47#@AHj@YIX>(e?t5Y$_!#dyQhNr=CZI(CqU7XgUfyM5g5nk2TyapczV3Q;E&C=J7 zo9Y;Z7i8(BQ*zClZE6%S%W(+ { + .get('reports', (err,response) => { console.log("Query Ran: " + DB.last_query()); if (err) return console.error("Uh oh! Couldn't get results: " + err.msg); res.json({ @@ -16,14 +16,10 @@ class TestModel extends BaseController { } updateDataSet(req, res) { - var report_id = req.params.report_id; - var dashboard_id = req.params.dashboard_id; - var dashboard_dataset_id = req.params.dashboard_dataset_id; + var report_detail_id = req.params.report_detail_id; var updateStatus = req.params.status; - DB.where('rd.report_id',report_id) - .where('rd.dashboard_id',dashboard_id) - .where('rd.dashboard_dataset_id',dashboard_dataset_id) - .from('t_report_detail rd') + DB.where('rd.id',report_detail_id) + .from('report_detail rd') .set('status',updateStatus) .update(null, null, null, (err, data) => { if (err) return console.error(err); @@ -34,7 +30,7 @@ class TestModel extends BaseController { deleteReports(req, res) { var report_id = req.params.report_id; - DB.delete('t_reports', {id: report_id}, (err, data) => { + DB.delete('reports', {id: report_id}, (err, data) => { if (err) return console.error(err); this.successResponse('success', res); }); @@ -44,11 +40,11 @@ class TestModel extends BaseController { reportsDetail(req, res) { var report_id = req.params.report_id; console.log(report_id); - const select = ['rd.report_id','rd.dashboard_id dashboardsId','rd.dashboard_dataset_id dataSetId', 'dd.datafile', 'dd.name dataset_name', 'dd.description', 'dd.context','d.name dashboardname','d.url dashboardUrl','r.start_time','r.end_time','r.created_at','GROUP_CONCAT(rd.dashboard_id) dashboardIds','GROUP_CONCAT(rd.dashboard_dataset_id) datasetIds','GROUP_CONCAT(dd.datafile) dataFiles','GROUP_CONCAT(dd.name) datasetName','GROUP_CONCAT(dd.description) datasetDesc','GROUP_CONCAT(dd.context) datasetContext',]; - DB.select( select ).from('t_report_detail rd') - .join('t_dashboards d', 'rd.dashboard_id=d.id') - .join('t_dashboard_dataset dd', 'rd.dashboard_dataset_id=dd.id') - .join('t_reports r', 'r.id=rd.report_id') + const select = ['GROUP_CONCAT(rd.id) reportDetailId','GROUP_CONCAT(rd.chart_name) chartName','rd.report_id','rd.dashboard_id dashboardsId','rd.dashboard_dataset_id dataSetId', 'dd.datafile', 'dd.name dataset_name', 'dd.description', 'dd.context','d.name dashboardname','d.url dashboardUrl','r.start_time','r.end_time','r.created_at','GROUP_CONCAT(rd.dashboard_id) dashboardIds','GROUP_CONCAT(rd.dashboard_dataset_id) datasetIds','GROUP_CONCAT(dd.datafile) dataFiles','GROUP_CONCAT(dd.name) datasetName','GROUP_CONCAT(dd.description) datasetDesc','GROUP_CONCAT(dd.context) datasetContext',]; + DB.select( select ).from('report_detail rd') + .join('dashboards d', 'rd.dashboard_id=d.id') + .join('dashboard_dataset dd', 'rd.dashboard_dataset_id=dd.id') + .join('reports r', 'r.id=rd.report_id') .group_by(['rd.dashboard_id']) .where('rd.report_id',report_id) .get((err,response) => { @@ -74,11 +70,16 @@ class TestModel extends BaseController { var dataAllFiles = []; var dataAllSetDesc = []; var datasetContextAll = []; - + var reportDetailIds = []; + var chartNames = []; var dataIds = response[resValues].datasetIds.split(','); for(let d of dataIds) { dataSetIds.push(d); } + var chartName = response[resValues].chartName.split(','); + for(let cN of chartName) { + chartNames.push(cN); + } var dataNames = response[resValues].datasetName.split(','); for(let dN of dataNames) { dataSetName.push(dN); @@ -96,13 +97,16 @@ class TestModel extends BaseController { datasetContextAll.push(dC); } - var dashboardIds = response[resValues].dashboardIds.split(','); - for(let dB of dashboardIds) { - dashboardIdSet.push(dB); - } + var reportDetailId = response[resValues].reportDetailId.split(','); + for(let dI of reportDetailId) { + reportDetailIds.push(dI); + } + for(var finalData in dataIds) { finalresult.dataset.push({ dashboard_id : response[resValues].dashboardsId, + report_detail_id : reportDetailIds[finalData], + chartName : chartNames[finalData], dataSetId : dataSetIds[finalData], datafile : dataAllFiles[finalData], name : dataSetName[finalData], @@ -125,7 +129,7 @@ class TestModel extends BaseController { this.successResponse(dataSets, res); //this.successResponse(response, res); } - ); + ); } successResponse(response, res) { diff --git a/server/app/routes.js b/server/app/routes.js index 0d045483..d25e7c82 100644 --- a/server/app/routes.js +++ b/server/app/routes.js @@ -17,7 +17,7 @@ routes.post('/visualizations/fetch/:visualization', VisualizationsController.fet routes.get('/testing/reports', TestController.reports); routes.get('/testing/reports/:report_id', TestController.reportsDetail); -routes.get('/testing/update/reports/:report_id/:dashboard_id/:dashboard_dataset_id/:status', TestController.updateDataSet); +routes.get('/testing/update/reports/:report_detail_id/:status', TestController.updateDataSet); routes.get('/testing/reports/delete/:report_id', TestController.deleteReports); routes.use(errorHandler); diff --git a/src/components/Testing/DataSets.js b/src/components/Testing/DataSets.js index 0b1a6be0..db9b2fe5 100644 --- a/src/components/Testing/DataSets.js +++ b/src/components/Testing/DataSets.js @@ -13,31 +13,31 @@ let config = { api: process.env.REACT_APP_API_URL ? process.env.REACT_APP_API_URL : "http://localhost:8010/middleware/api/", } class DataSets extends Component { - + constructor() { super(); this.state = initialState; this.handleSaveDataSet = this.handleSaveDataSet.bind(this); } - handleSaveDataSet(reportId,dashboardId,datasetId) { - var optionSelect = $('input[name=option_'+reportId+'_'+dashboardId+'_'+datasetId+']:checked').val(); + handleSaveDataSet(reportId,dashboardId,datasetId,report_detail_id) { + var optionSelect = $('input[name=option_'+reportId+'_'+dashboardId+'_'+datasetId+'_'+report_detail_id+']:checked').val(); //var optionSelect = $('#pass_'+reportId+'_'+dashboardId+'_'+datasetId).val(); - let url = config.api + "testing/update/reports/"+reportId+"/"+dashboardId+"/"+datasetId+"/"+optionSelect; + let url = config.api + "testing/update/reports/"+report_detail_id+'/'+optionSelect; fetch(url).then( function(response){ return response.json(); } ).then(jsonData => { - $('#message_'+reportId+'_'+dashboardId+'_'+datasetId).show(); + $('#message_'+reportId+'_'+dashboardId+'_'+datasetId+'_'+report_detail_id).show(); }); } render() { - console.log(this.props.dataset); + //console.log(this.props.dataset); if(this.props.dataset) { - var Collapsable = this.props.dataset.map((response)=> - + var Collapsable = this.props.dataset.map((response)=> +

@@ -50,31 +50,31 @@ class DataSets extends Component {
Original
- +
Captured
-
+
Action
-
+
Saved!
- Pass - Fail -

- + ); } return ( diff --git a/src/components/Testing/EditReports.js b/src/components/Testing/EditReports.js index fe37cfd6..c7359c4b 100644 --- a/src/components/Testing/EditReports.js +++ b/src/components/Testing/EditReports.js @@ -1,6 +1,6 @@ import React, { Component } from "react"; import style from "./style"; -import { Button,Collapse } from 'react-bootstrap'; +//import { Button,Collapse } from 'react-bootstrap'; import DataSets from "./DataSets.js"; const initialState = { @@ -12,7 +12,7 @@ let config = { api: process.env.REACT_APP_API_URL ? process.env.REACT_APP_API_URL : "http://localhost:8010/middleware/api/", } class ReportDetails extends Component { - + constructor() { super(); this.state = initialState; @@ -34,7 +34,7 @@ class ReportDetails extends Component { reportsDetails : jsonData.results }); }); - + } render() { @@ -42,11 +42,11 @@ class ReportDetails extends Component { if(this.state.reportsDetails) { var Details = this.state.reportsDetails.map((res) => - +
@@ -88,8 +88,8 @@ class ReportDetails extends Component { } return (
- - + + {Details}
diff --git a/src/components/Testing/ReportDetails.js b/src/components/Testing/ReportDetails.js index fe37cfd6..92c13337 100644 --- a/src/components/Testing/ReportDetails.js +++ b/src/components/Testing/ReportDetails.js @@ -1,6 +1,6 @@ import React, { Component } from "react"; import style from "./style"; -import { Button,Collapse } from 'react-bootstrap'; +//import { Button,Collapse } from 'react-bootstrap'; import DataSets from "./DataSets.js"; const initialState = { @@ -12,7 +12,7 @@ let config = { api: process.env.REACT_APP_API_URL ? process.env.REACT_APP_API_URL : "http://localhost:8010/middleware/api/", } class ReportDetails extends Component { - + constructor() { super(); this.state = initialState; @@ -34,19 +34,19 @@ class ReportDetails extends Component { reportsDetails : jsonData.results }); }); - + } render() { - console.log(this.state.reportsDetails); + //console.log(this.state.reportsDetails); if(this.state.reportsDetails) { var Details = this.state.reportsDetails.map((res) => - +
@@ -88,8 +88,8 @@ class ReportDetails extends Component { } return (
- - + + {Details}
From 9607be3455f25795ae8346f60e2e1703c71b9682 Mon Sep 17 00:00:00 2001 From: SS Date: Thu, 31 Aug 2017 16:49:35 +0530 Subject: [PATCH 31/70] dataset image problem solved in testing --- src/components/Testing/DataSets.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/components/Testing/DataSets.js b/src/components/Testing/DataSets.js index db9b2fe5..c4c7c20d 100644 --- a/src/components/Testing/DataSets.js +++ b/src/components/Testing/DataSets.js @@ -34,7 +34,7 @@ class DataSets extends Component { } render() { - //console.log(this.props.dataset); + console.log(this.props.dataset); if(this.props.dataset) { var Collapsable = this.props.dataset.map((response)=> @@ -47,16 +47,13 @@ class DataSets extends Component {
-
+
Original
- +
-
-
Captured
-
-
+
Action
From 47d2d3ddba419cc1ef6fc83ea138541e56a7cd86 Mon Sep 17 00:00:00 2001 From: Deepak Awasthi Date: Tue, 5 Sep 2017 16:37:49 +0530 Subject: [PATCH 32/70] changes in testing pages design --- src/components/Testing/DataSets.js | 58 ++++++++++++++----------- src/components/Testing/EditReports.js | 38 ++++++++-------- src/components/Testing/ReportDetails.js | 39 +++++++++-------- src/components/Testing/index.js | 44 +++++++++++-------- src/components/Testing/style.js | 24 ++++------ 5 files changed, 108 insertions(+), 95 deletions(-) diff --git a/src/components/Testing/DataSets.js b/src/components/Testing/DataSets.js index c4c7c20d..2bd3e91b 100644 --- a/src/components/Testing/DataSets.js +++ b/src/components/Testing/DataSets.js @@ -38,38 +38,46 @@ class DataSets extends Component { if(this.props.dataset) { var Collapsable = this.props.dataset.map((response)=> -
-
+
+

- - {response.name} #{response.dataSetId} - + {response.name} #{response.dataSetId}

-
-
-
Original
-
- + + +
+
+
+
Original
+
-
- -
-
Action
-
-
- Saved! -
- Pass - Fail - +
+
Captured
+
+ +
+ +
+
+ Saved! +
+ + + + + +
+
+ +
); diff --git a/src/components/Testing/EditReports.js b/src/components/Testing/EditReports.js index c7359c4b..3783f439 100644 --- a/src/components/Testing/EditReports.js +++ b/src/components/Testing/EditReports.js @@ -43,15 +43,15 @@ class ReportDetails extends Component { var Details = this.state.reportsDetails.map((res) => -
-
-