{ "__inputs": [ { "name": "DS_YARDSTICK", "label": "yardstick", "description": "", "type": "datasource", "pluginId": "influxdb", "pluginName": "InfluxDB" } ], "__requires": [ { "type": "panel", "id": "text", "name": "Text", "version": "" }, { "type": "panel", "id": "graph", "name": "Graph", "version": "" }, { "type": "grafana", "id": "grafana", "name": "Grafana", "version": "3.1.1" }, { "type": "datasource", "id": "influxdb", "name": "InfluxDB", "version": "1.0.0" } ], "id": null, "title": "Prox_BM_L3FWD-4Port", "tags": [ "NSB", "Prox", "BM", "4Port", "L3Fwd" ], "style": "dark", "timezone": "browser", "editable": true, "hideControls": false, "sharedCrosshair": false, "rows": [ { "collapse": false, "editable": true, "height": "100px", "panels": [ { "content": "
OPNFV_Yardstick_NSB_PROX_BM_L3Fwd_4Port_Test
\n
\n

The application performs routing of packets with LPM based look-up method.\nThe KPI is the number of packets per second for 64 byte packets with an accepted minimal packet loss

\n
", "editable": true, "error": false, "id": 3, "isNew": true, "links": [], "mode": "html", "span": 12, "title": "", "type": "text" }, { "content": "
Prox L3Fwd VNF stats
\n", "editable": true, "error": false, "height": "40", "id": 7, "isNew": true, "links": [], "mode": "html", "span": 12, "title": "", "type": "text" } ], "title": "Row" }, { "collapse": false, "editable": true, "height": "300px", "panels": [ { "aliasColors": {}, "bars": false, "datasource": "${DS_YARDSTICK}", "editable": true, "error": false, "fill": 1, "grid": { "threshold1": 2, "threshold1Color": "rgba(216, 200, 27, 0.27)", "threshold2": 2, "threshold2Color": "rgba(234, 112, 112, 0.22)" }, "height": "300", "id": 4, "isNew": true, "legend": { "alignAsTable": true, "avg": true, "current": false, "max": true, "min": true, "rightSide": false, "show": true, "total": false, "values": true }, "lines": true, "linewidth": 2, "links": [], "nullPointMode": "connected", "percentage": false, "pointradius": 1, "points": false, "renderer": "flot", "seriesOverrides": [], "span": 12, "stack": false, "steppedLine": false, "targets": [ { "alias": "VNF packets Forward", "dsType": "influxdb", "groupBy": [ { "params": [ "$interval" ], "type": "time" }, { "params": [ "null" ], "type": "fill" } ], "measurement": "tc_prox_baremetal_l3fwd-4", "policy": "default", "refId": "A", "resultFormat": "time_series", "select": [ [ { "params": [ "vnf__0.packets_fwd" ], "type": "field" }, { "params": [], "type": "mean" } ] ], "tags": [] }, { "alias": "VNF packets in", "dsType": "influxdb", "groupBy": [ { "params": [ "$interval" ], "type": "time" }, { "params": [ "null" ], "type": "fill" } ], "measurement": "tc_prox_baremetal_l3fwd-4", "policy": "default", "refId": "C", "resultFormat": "time_series", "select": [ [ { "params": [ "vnf__0.packets_in" ], "type": "field" }, { "params": [], "type": "mean" } ] ], "tags": [] }, { "alias": "VNF packets dropped", "dsType": "influxdb", "groupBy": [ { "params": [ "$interval" ], "type": "time" }, { "params": [ "null" ], "type": "fill" } ], "measurement": "tc_prox_heat_context_l3fwd-4", "policy": "default", "refId": "B", "resultFormat": "time_series", "select": [ [ { "params": [ "vnf__0.packets_dropped" ], "type": "field" }, { "params": [], "type": "mean" } ] ], "tags": [] } ], "timeFrom": null, "timeShift": null, "title": "VNF stats: Packet In, Forward and Dropped", "tooltip": { "msResolution": true, "shared": true, "sort": 0, "value_type": "cumulative" }, "type": "graph", "xaxis": { "show": true }, "yaxes": [ { "format": "short", "label": "Packets", "logBase": 1, "max": null, "min": null, "show": true }, { "format": "short", "label": null, "logBase": 1, "max": null, "min": null, "show": true } ] }, { "content": "
Prox L3Fwd Traffic Gen stats
\n", "editable": true, "error": false, "height": "40", "id": 8, "isNew": true, "links": [], "mode": "html", "span": 12, "title": "", "type": "text" } ], "title": "New row" }, { "collapse": false, "editable": true, "height": "300px", "panels": [ { "aliasColors": {}, "bars": false, "datasource": "${DS_YARDSTICK}", "editable": true, "error": false, "fill": 1, "grid": { "threshold1": 2, "threshold1Color": "rgba(216, 200, 27, 0.27)", "threshold2": 2, "threshold2Color": "rgba(234, 112, 112, 0.22)" }, "id": 6, "isNew": true, "legend": { "alignAsTable": true, "avg": true, "current": false, "max": true, "min": true, "show": true, "total": false, "values": true }, "lines": true, "linewidth": 2, "links": [], "nullPointMode": "connected", "percentage": false, "pointradius": 5, "points": false, "renderer": "flot", "seriesOverrides": [], "span": 6, "stack": false, "steppedLine": false, "targets": [ { "alias": "TG xe-0 Out packets", "dsType": "influxdb", "groupBy": [ { "params": [ "$interval" ], "type": "time" }, { "params": [ "null" ], "type": "fill" } ], "measurement": "tc_prox_baremetal_l3fwd-4", "policy": "default", "refId": "A", "resultFormat": "time_series", "select": [ [ { "params":
'use strict';

angular.module('yardStickGui2App')
    .controller('ProjectController', ['$scope', '$state', '$stateParams', 'mainFactory', 'Upload', 'toaster', 'ngDialog', '$loading',
        function($scope, $state, $stateParams, mainFactory, Upload, toaster, ngDialog, $loading) {


            init();


            function init() {


                getProjectList();
                $scope.openCreateProject = openCreateProject;
                $scope.createName = createName;
                $scope.gotoDetail = gotoDetail;


            }

            function getProjectList() {
                $loading.start('key');
                mainFactory.projectList().get({}).$promise.then(function(response) {
                    $loading.finish('key');
                    if (response.status == 1) {
                        $scope.projectListData = response.result.projects;


                    } else {

                    }
                }, function(error) {
                    $loading.finish('key');
                    toaster.pop({
                        type: 'error',
                        title: 'fail',
                        body: 'unknow error',
                        timeout: 3000
                    });

                })
            }

            function openCreateProject() {

                ngDialog.open({
                    template: 'views/modal/projectCreate.html',
                    scope: $scope,
                    className: 'ngdialog-theme-default',
                    width: 400,
                    showClose: true,
                    closeByDocument: false
                })
            }

            function createName(name) {

                mainFactory.createProjectName().post({
                    'action': 'create_project',
                    'args': {
                        'name': name,
                    }
                }).$promise.then(function(response) {
                    if (response.status == 1) {
                        toaster.pop({
                            type: 'success',
                            title: 'create project success',
                            body: 'you can go next step',
                            timeout: 3000
                        });
                        ngDialog.close();
                        getProjectList();
                    } else {
                        toaster.pop({
                            type: 'error',
                            title: 'failed',
                            body: 'create project failed',
                            timeout: 3000
                        });
                    }

                }, function(error) {
                    toaster.pop({
                        type: 'error',
                        title: 'failed',
                        body: 'Something Wrong',
                        timeout: 3000
                    });
                })
            }

            function gotoDetail(id) {
                $state.go('app.projectdetail', { projectId: id })
            }


            $scope.openDeleteEnv = function openDeleteEnv(id, name) {
                $scope.deleteName = name;
                $scope.deleteId = id;
                ngDialog.open({
                    template: 'views/modal/deleteConfirm.html',
                    scope: $scope,
                    className: 'ngdialog-theme-default',
                    width: 500,
                    showClose: true,
                    closeByDocument: false