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 2019/06/14 17:47:31 UTC
[qpid-dispatch] branch master updated: DISPATCH-1370 Move schema,
connect, and entities tabs to the right on console's nav bar
This is an automated email from the ASF dual-hosted git repository.
eallen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-dispatch.git
The following commit(s) were added to refs/heads/master by this push:
new 7ef9afa DISPATCH-1370 Move schema, connect, and entities tabs to the right on console's nav bar
7ef9afa is described below
commit 7ef9afa202dc7d38e80eb6cfca23f56805b45178
Author: Ernest Allen <ea...@redhat.com>
AuthorDate: Fri Jun 14 13:47:12 2019 -0400
DISPATCH-1370 Move schema, connect, and entities tabs to the right on console's nav bar
---
console/stand-alone/plugin/js/navbar.js | 150 +++++++++++++++++++-------------
1 file changed, 91 insertions(+), 59 deletions(-)
diff --git a/console/stand-alone/plugin/js/navbar.js b/console/stand-alone/plugin/js/navbar.js
index 64d41c0..6df3f7c 100644
--- a/console/stand-alone/plugin/js/navbar.js
+++ b/console/stand-alone/plugin/js/navbar.js
@@ -20,98 +20,130 @@ under the License.
export class NavBarController {
constructor(QDRService, QDRChartService, $scope, $routeParams, $location) {
- this.controllerName = 'QDR.NavBarController';
+ this.controllerName = "QDR.NavBarController";
$scope.breadcrumbs = [
{
- content: '<i class="icon-power"></i> Connect',
- title: 'Connect to a router',
- isValid: function () { return true; },
- href: '#/connect',
- name: 'Connect'
- },
- {
content: '<i class="pficon-home"></i> Overview',
- title: 'View router overview',
- isValid: function (QDRService) {return QDRService.management.connection.is_connected(); },
- href: '#/overview',
- name: 'Overview'
- },
- {
- content: '<i class="icon-list "></i> Entities',
- title: 'View the attributes of the router entities',
- isValid: function (QDRService) { return QDRService.management.connection.is_connected(); },
- href: '#/list',
- name: 'Entities'
+ title: "View router overview",
+ isValid: function(QDRService) {
+ return QDRService.management.connection.is_connected();
+ },
+ href: "#/overview",
+ name: "Overview"
},
{
content: '<i class="code-branch"></i> Topology',
- title: 'View router network topology',
- isValid: function (QDRService) { return QDRService.management.connection.is_connected(); },
- href: '#/topology',
- name: 'Topology'
+ title: "View router network topology",
+ isValid: function(QDRService) {
+ return QDRService.management.connection.is_connected();
+ },
+ href: "#/topology",
+ name: "Topology"
},
{
content: '<i class="icon-bar-chart"></i> Charts',
- title: 'View charts',
- isValid: function (QDRService) { return QDRService.management.connection.is_connected(); },
- href: '#/charts',
- name: 'Charts'
+ title: "View charts",
+ isValid: function(QDRService) {
+ return QDRService.management.connection.is_connected();
+ },
+ href: "#/charts",
+ name: "Charts"
},
{
content: '<i class="chord-diagram"></i> Message Flow',
- title: 'Chord chart',
- isValid: function (QDRService) { return QDRService.management.connection.is_connected(); },
- href: '#/chord',
- name: 'Message Flow'
+ title: "Chord chart",
+ isValid: function(QDRService) {
+ return QDRService.management.connection.is_connected();
+ },
+ href: "#/chord",
+ name: "Message Flow"
+ },
+ {
+ content: '<i class="icon-power"></i> Connect',
+ title: "Connect to a router",
+ isValid: function() {
+ return true;
+ },
+ href: "#/connect",
+ name: "Connect",
+ right: true
},
{
content: '<i class="icon-schema"></i> Schema',
- title: 'View dispatch schema',
- isValid: function (QDRService) { return QDRService.management.connection.is_connected(); },
- href: '#/schema',
- name: 'Schema'
+ title: "View dispatch schema",
+ isValid: function(QDRService) {
+ return QDRService.management.connection.is_connected();
+ },
+ href: "#/schema",
+ name: "Schema",
+ right: true
+ },
+ {
+ content: '<i class="icon-list "></i> Entities',
+ title: "View the attributes of the router entities",
+ isValid: function(QDRService) {
+ return QDRService.management.connection.is_connected();
+ },
+ href: "#/list",
+ name: "Entities",
+ right: true
}
];
$scope.isValid = function(link) {
return link.isValid(QDRService, $location);
};
-
+
$scope.isActive = function(href) {
- return href.split('#')[1] === $location.path();
+ return href.split("#")[1] === $location.path();
};
-
- $scope.isRight = function (link) {
+
+ $scope.isRight = function(link) {
return angular.isDefined(link.right);
};
-
- $scope.hasChart = function (link) {
- if (link.href == '#/charts') {
- return QDRChartService.charts.some(function (c) { return c.dashboard; });
+
+ $scope.hasChart = function(link) {
+ if (link.href == "#/charts") {
+ return QDRChartService.charts.some(function(c) {
+ return c.dashboard;
+ });
}
};
-
- $scope.isDashboardable = function () {
- return ($location.path().indexOf('schema') < 0 && $location.path().indexOf('connect') < 0);
+
+ $scope.isDashboardable = function() {
+ return (
+ $location.path().indexOf("schema") < 0 &&
+ $location.path().indexOf("connect") < 0
+ );
};
-
- $scope.addToDashboardLink = function () {
- var href = '#' + $location.path();
+
+ $scope.addToDashboardLink = function() {
+ var href = "#" + $location.path();
var size = angular.toJson({
size_x: 2,
size_y: 2
});
-
+
var routeParams = angular.toJson($routeParams);
- var title = 'Dispatch Router';
- return '/hawtio/#/dashboard/add?tab=dashboard' +
- '&href=' + encodeURIComponent(href) +
- '&routeParams=' + encodeURIComponent(routeParams) +
- '&title=' + encodeURIComponent(title) +
- '&size=' + encodeURIComponent(size);
+ var title = "Dispatch Router";
+ return (
+ "/hawtio/#/dashboard/add?tab=dashboard" +
+ "&href=" +
+ encodeURIComponent(href) +
+ "&routeParams=" +
+ encodeURIComponent(routeParams) +
+ "&title=" +
+ encodeURIComponent(title) +
+ "&size=" +
+ encodeURIComponent(size)
+ );
};
}
-
}
-NavBarController.$inject = ['QDRService', 'QDRChartService', '$scope', '$routeParams', '$location'];
-
+NavBarController.$inject = [
+ "QDRService",
+ "QDRChartService",
+ "$scope",
+ "$routeParams",
+ "$location"
+];
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org