You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ea...@apache.org on 2017/11/15 20:30:14 UTC
qpid-dispatch git commit: DISPATCH-801 Add aggregate column back into
Entities page
Repository: qpid-dispatch
Updated Branches:
refs/heads/master c2a935fc8 -> 052d60d40
DISPATCH-801 Add aggregate column back into Entities page
Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/052d60d4
Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/052d60d4
Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/052d60d4
Branch: refs/heads/master
Commit: 052d60d4074a570720c5196f664483200bcee40b
Parents: c2a935f
Author: Ernest Allen <ea...@redhat.com>
Authored: Wed Nov 15 15:29:46 2017 -0500
Committer: Ernest Allen <ea...@redhat.com>
Committed: Wed Nov 15 15:29:46 2017 -0500
----------------------------------------------------------------------
console/stand-alone/plugin/css/plugin.css | 29 +++++++++++
console/stand-alone/plugin/js/qdrCharts.js | 7 +--
console/stand-alone/plugin/js/qdrList.js | 62 ++++++++++++++++++++++-
console/stand-alone/plugin/js/qdrOverview.js | 6 ++-
4 files changed, 94 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/052d60d4/console/stand-alone/plugin/css/plugin.css
----------------------------------------------------------------------
diff --git a/console/stand-alone/plugin/css/plugin.css b/console/stand-alone/plugin/css/plugin.css
index fcacd56..e903c79 100644
--- a/console/stand-alone/plugin/css/plugin.css
+++ b/console/stand-alone/plugin/css/plugin.css
@@ -838,6 +838,35 @@ span:not(.fancytree-has-children).allocator .fancytree-icon:before {
font-family: FontAwesome;
content: "\f170";
}
+span:not(.fancytree-has-children).policy .fancytree-icon:before {
+ font-family: FontAwesome;
+ content: "\f256";
+}
+span:not(.fancytree-has-children).logStats .fancytree-icon:before {
+ font-family: FontAwesome;
+ content: "\f080";
+}
+span:not(.fancytree-has-children).autoLink .fancytree-icon:before {
+ font-family: FontAwesome;
+ content: "\f0c1";
+}
+span:not(.fancytree-has-children).authServicePlugin .fancytree-icon:before {
+ font-family: FontAwesome;
+ content: "\f0c1";
+}
+span:not(.fancytree-has-children).sslProfile .fancytree-icon:before {
+ font-family: FontAwesome;
+ content: "\f023";
+}
+span:not(.fancytree-has-children).vhost .fancytree-icon:before {
+ font-family: FontAwesome;
+ content: "\f108";
+}
+span:not(.fancytree-has-children).vhostStats .fancytree-icon:before {
+ font-family: FontAwesome;
+ content: "\f080";
+}
+
.ngCellText {
/* color: #333333; */
http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/052d60d4/console/stand-alone/plugin/js/qdrCharts.js
----------------------------------------------------------------------
diff --git a/console/stand-alone/plugin/js/qdrCharts.js b/console/stand-alone/plugin/js/qdrCharts.js
index 7766457..3cec385 100644
--- a/console/stand-alone/plugin/js/qdrCharts.js
+++ b/console/stand-alone/plugin/js/qdrCharts.js
@@ -32,14 +32,9 @@ var QDR = (function (QDR) {
if (!QDRService.management.connection.is_connected()) {
// we are not connected. we probably got here from a bookmark or manual page reload
- QDR.redirectWhenConnected($locaion, "charts");
+ QDR.redirectWhenConnected($location, "charts");
return;
}
- // we are currently connected. setup a handler to get notified if we are ever disconnected
- QDRService.management.connection.addDisconnectAction( function () {
- QDR.redirectWhenConnected($locaion, "charts")
- $scope.$apply();
- })
$scope.svgCharts = [];
// create an svg object for each chart
http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/052d60d4/console/stand-alone/plugin/js/qdrList.js
----------------------------------------------------------------------
diff --git a/console/stand-alone/plugin/js/qdrList.js b/console/stand-alone/plugin/js/qdrList.js
index 861b0fa..3abac5e 100644
--- a/console/stand-alone/plugin/js/qdrList.js
+++ b/console/stand-alone/plugin/js/qdrList.js
@@ -304,7 +304,7 @@ var QDR = (function(QDR) {
var updatedDetails = false;
if (tableRows.length == 0) {
var newNode = {
- addClass: "no-data",
+ extraClasses: "no-data",
typeName: "none",
title: "no data",
key: node.key + ".1"
@@ -424,6 +424,25 @@ var QDR = (function(QDR) {
return (old.name === attr) ? old.graph && old.rawValue != row[attr].value : false;
})
var schemaEntity = schemaProps($scope.selectedEntity, attr, $scope.currentNode)
+/*
+[{
+ "type": "value",
+ "rateWindow": 1000,
+ "areaColor": "#cbe7f3",
+ "lineColor": "#058dc7",
+ "visibleDuration": 10,
+ "userTitle": null,
+ "dashboard": true,
+ "hdash": false,
+ "instance": 1,
+ "name": "Lqdhello",
+ "attr": "deliveriesFromContainer",
+ "nodeId": "amqp:/_topo/0/QDR.A/$management",
+ "entity": "router.address",
+ "interval": 1000,
+ "duration": 10
+}]
+*/
details.push( {
attributeName: QDRService.utilities.humanify(attr),
attributeValue: attr === 'port' ? row[attr].value : QDRService.utilities.pretty(row[attr].value),
@@ -432,6 +451,8 @@ var QDR = (function(QDR) {
rawValue: row[attr].value,
graph: row[attr].graph,
title: row[attr].title,
+ chartExists: (QDRChartService.findCharts({name: row.name.value, attr: attr, nodeId: $scope.currentNode.id, entity: $scope.selectedEntity}).length > 0),
+ //chartExists: QDRChartService.findChartRequest($scope.currentNode.id, $scope.selectedEntity) !== null,
aggregateValue: QDRService.utilities.pretty(row[attr].aggregate),
aggregateTip: row[attr].aggregateTip,
@@ -447,6 +468,7 @@ var QDR = (function(QDR) {
$scope.detailsObject[attr] = row[attr].value;
})
$scope.detailFields = details;
+ aggregateColumn();
}
// called from html ng-style="getTableHeight()"
@@ -665,6 +687,42 @@ var QDR = (function(QDR) {
doDialog('tmplListChart.html', chart);
}
+ var aggregateColumn = function () {
+ if ((aggregateEntities.indexOf($scope.selectedEntity) > -1 && $scope.detailCols.length != 3) ||
+ (aggregateEntities.indexOf($scope.selectedEntity) == -1 && $scope.detailCols.length != 2)) {
+ // column defs have to be reassigned and not spliced, so no push/pop
+ $scope.detailCols = [
+ {
+ field: 'attributeName',
+ displayName: 'Attribute',
+ cellTemplate: '<div title="{{row.entity.title}}" class="listAttrName ui-grid-cell-contents">{{COL_FIELD CUSTOM_FILTERS | pretty}}<button ng-if="row.entity.graph" title="Click to view/add a graph" ng-click="grid.appScope.addToGraph(row.entity)" ng-class="{\'btn-success\': row.entity.chartExists}" class="btn"><i ng-class="{\'icon-bar-chart\': row.entity.graph == true }"></i></button></div>'
+ },
+ {
+ field: 'attributeValue',
+ displayName: 'Value',
+ cellTemplate: '<div class="ui-grid-cell-contents" ng-class="{\'changed\': row.entity.changed == 1}">{{COL_FIELD CUSTOM_FILTERS | pretty}}</div>'
+ }
+ ]
+ if (aggregateEntities.indexOf($scope.selectedEntity) > -1) {
+ $scope.detailCols.push(
+ {
+ width: '10%',
+ field: 'aggregateValue',
+ displayName: 'Aggregate',
+ cellTemplate: '<div class="hastip ui-grid-cell-contents" alt="{{row.entity.aggregateTip}}" ng-class="{\'changed\': row.entity.changed == 1}">{{COL_FIELD CUSTOM_FILTERS}} <button title="Click to view/add a graph" ng-if="row.entity.graph" ng-click="grid.appScope.addAllToGraph(row.entity)" ng-class="{\'btn-success\': row.entity.chartExists}" class="btn"><i ng-class="{\'icon-bar-chart\': row.entity.graph == true }"></i></button></div>',
+ cellClass: 'aggregate'
+ }
+ )
+ }
+ }
+ if ($scope.selectedRecordName === "")
+ $scope.detailCols = [];
+
+ $scope.details.columnDefs = $scope.detailCols
+ if ($scope.gridApi)
+ $scope.gridApi.core.notifyDataChange( uiGridConstants.dataChange.COLUMN );
+ }
+
$scope.gridApi = undefined;
// the table on the right of the page contains a row for each field in the selected record in the table on the left
$scope.desiredTableHeight = 340;
@@ -675,7 +733,7 @@ var QDR = (function(QDR) {
{
field: 'attributeName',
displayName: 'Attribute',
- cellTemplate: '<div title="{{row.entity.title}}" class="listAttrName ui-grid-cell-contents">{{COL_FIELD CUSTOM_FILTERS | pretty}}<button ng-if="row.entity.graph" title="Click to view/add a graph" ng-click="grid.appScope.addToGraph(row.entity)" class="btn btn-success"><i ng-class="{\'icon-bar-chart\': row.entity.graph == true }"></i></button></div>'
+ cellTemplate: '<div title="{{row.entity.title}}" class="listAttrName ui-grid-cell-contents">{{COL_FIELD CUSTOM_FILTERS | pretty}}<button ng-if="row.entity.graph" title="Click to view/add a graph" ng-click="grid.appScope.addToGraph(row.entity)" ng-class="{\'btn-success\': row.entity.chartExists}" class="btn"><i ng-class="{\'icon-bar-chart\': row.entity.graph == true }"></i></button></div>'
},
{
field: 'attributeValue',
http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/052d60d4/console/stand-alone/plugin/js/qdrOverview.js
----------------------------------------------------------------------
diff --git a/console/stand-alone/plugin/js/qdrOverview.js b/console/stand-alone/plugin/js/qdrOverview.js
index b1aabdc..5a0b06f 100644
--- a/console/stand-alone/plugin/js/qdrOverview.js
+++ b/console/stand-alone/plugin/js/qdrOverview.js
@@ -1364,7 +1364,9 @@ return;
var expandGridToContent = function (type, rows) {
var tree = $("#overtree").fancytree("getTree")
- var node = tree.getActiveNode()
+ var node = null
+ if (tree && tree.getActiveNode)
+ node = tree.getActiveNode()
if (node) {
if (node.data.type === type) {
var height = (rows+1) * 30 + 40 // header is 40px
@@ -1486,7 +1488,7 @@ return;
// utility function called by each top level tree node when it needs to populate its child nodes
var updateLeaves = function (leaves, entity, worker) {
var tree = $("#overtree").fancytree("getTree"), node;
- if (tree) {
+ if (tree && tree.getNodeByKey) {
node = tree.getNodeByKey(entity)
}
if (!tree || !node) {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org