DISPATCH-465 Change the hawtio console's name to dispatch-hawtio-console
diff --git a/console/hawtio/README.md b/console/hawtio/README.md
index f501ecb..cc79c21 100644
--- a/console/hawtio/README.md
+++ b/console/hawtio/README.md
@@ -17,13 +17,14 @@
$ mvn clean install
-The dispatch-hawtio-console-<version>.war file should now be in the target directory.
+The dispatch-hawtio-console-<version>-SNAPSHOT.war file should now be in the target directory.
## Apache Tomcat installation
-Copy the dispatch-hawtio-console-<version>.war file as the following name
+Copy the dispatch-hawtio-console-<version>-SNAPSHOT.war file as the following name
- dispatch-plugin.war
+ dispatch-hawtio-console.war
+
to the deploy directory of Apache Tomcat or similar Java web container. Ensure the hawtio.war file is present in the same directory. Point a browser at http://\<tomcat-host:port\>/hawtio
Dispatch Router should be available as a tab in the console.
diff --git a/console/hawtio/pom.xml b/console/hawtio/pom.xml
index 29ae286..a7c5080 100644
--- a/console/hawtio/pom.xml
+++ b/console/hawtio/pom.xml
@@ -53,7 +53,7 @@
as we build that dynamically using maven-antrun-plugin below. -->
<!-- plugin-context is what context this plugin will handle requests on
in the application server -->
- <plugin-context>/dispatch-plugin</plugin-context>
+ <plugin-context>/${artifactId}</plugin-context>
<!-- plugin-name is the name of our plugin, affects the name used for
the plugin's mbean -->
diff --git a/console/hawtio/src/main/webapp/plugin/js/dispatchPlugin.js b/console/hawtio/src/main/webapp/plugin/js/dispatchPlugin.js
index 567bb0d..7176be2 100644
--- a/console/hawtio/src/main/webapp/plugin/js/dispatchPlugin.js
+++ b/console/hawtio/src/main/webapp/plugin/js/dispatchPlugin.js
@@ -31,7 +31,7 @@
*
* The name of this plugin
*/
- QDR.pluginName = 'dispatch_plugin';
+ QDR.pluginName = 'dispatch_hawtio_console';
QDR.pluginRoot = "/" + QDR.pluginName;
/**
* @property log
@@ -48,7 +48,7 @@
* The top level path of this plugin on the server
*
*/
- QDR.contextPath = "/dispatch-plugin/";
+ QDR.contextPath = "/dispatch-hawtio-console/";
/**
* @property templatePath
@@ -70,7 +70,7 @@
* workspace, viewRegistry and layoutFull used by the
* run function
*/
- QDR.module = angular.module('dispatch_plugin', ['bootstrap', 'hawtio-ui', 'hawtio-forms', 'ui.bootstrap.dialog', 'hawtioCore'])
+ QDR.module = angular.module(QDR.pluginName, ['bootstrap', 'hawtio-ui', 'hawtio-forms', 'ui.bootstrap.dialog', 'hawtioCore'])
.config(function($routeProvider) {
/**
* Here we define the route for our plugin. One note is
@@ -79,25 +79,25 @@
* routeProvider has been configured with.
*/
$routeProvider
- .when('/dispatch_plugin', {
+ .when('/' + QDR.pluginName, {
templateUrl: QDR.templatePath + 'qdrConnect.html'
})
- .when('/dispatch_plugin/overview', {
+ .when('/' + QDR.pluginName + '/overview', {
templateUrl: QDR.templatePath + 'qdrOverview.html'
})
- .when('/dispatch_plugin/topology', {
+ .when('/' + QDR.pluginName + '/topology', {
templateUrl: QDR.templatePath + 'qdrTopology.html'
})
- .when('/dispatch_plugin/list', {
+ .when('/' + QDR.pluginName + '/list', {
templateUrl: QDR.templatePath + 'qdrList.html'
})
- .when('/dispatch_plugin/schema', {
+ .when('/' + QDR.pluginName + '/schema', {
templateUrl: QDR.templatePath + 'qdrSchema.html'
})
- .when('/dispatch_plugin/charts', {
+ .when('/' + QDR.pluginName + '/charts', {
templateUrl: QDR.templatePath + 'qdrCharts.html'
})
- .when('/dispatch_plugin/connect', {
+ .when('/' + QDR.pluginName + '/connect', {
templateUrl: QDR.templatePath + 'qdrConnect.html'
})
})
@@ -168,7 +168,7 @@
QDR.module.run(function(workspace, viewRegistry, layoutFull, $rootScope, $location, localStorage, QDRService, QDRChartService) {
QDR.log.info("*************creating Dispatch Console************");
var curPath = $location.path()
- if (curPath !== '/dispatch_plugin') {
+ if (curPath !== '/' + QDR.pluginName) {
var toPath = QDR.pluginRoot + "/connect";
$location.path(toPath);
if (curPath.startsWith(QDR.pluginRoot)) {
@@ -189,7 +189,7 @@
// tell hawtio that we have our own custom layout for
// our view
- viewRegistry["dispatch_plugin"] = QDR.templatePath + "qdrLayout.html";
+ viewRegistry[QDR.pluginName] = QDR.templatePath + "qdrLayout.html";
var settings = angular.fromJson(localStorage[QDR.SETTINGS_KEY]);
QDRService.addConnectAction(function() {
@@ -270,8 +270,8 @@
content: "Dispatch Router",
title: "Dispatch console",
isValid: function(workspace) { return true; },
- href: function() { return "#/dispatch_plugin"; },
- isActive: function(workspace) { return workspace.isLinkActive("dispatch_plugin"); }
+ href: function() { return "#/" + QDR.pluginName; },
+ isActive: function(workspace) { return workspace.isLinkActive(QDR.pluginName); }
});
});
diff --git a/console/hawtio/src/main/webapp/plugin/js/navbar.js b/console/hawtio/src/main/webapp/plugin/js/navbar.js
index 8cfecdf..dfdcb3a 100644
--- a/console/hawtio/src/main/webapp/plugin/js/navbar.js
+++ b/console/hawtio/src/main/webapp/plugin/js/navbar.js
@@ -34,39 +34,31 @@
content: '<i class="icon-cogs"></i> Connect',
title: "Connect to a router",
isValid: function () { return true; },
- href: "#/dispatch_plugin/connect"
+ href: "#/" + QDR.pluginName + "/connect"
},
{
content: '<i class="fa fa-home"></i> Overview',
title: "View router overview",
isValid: function (QDRService) { return QDRService.isConnected(); },
- href: "#/dispatch_plugin/overview"
+ href: "#/" + QDR.pluginName + "/overview"
},
{
content: '<i class="icon-list "></i> Entities',
title: "View the attributes of the router entities",
isValid: function (QDRService) { return QDRService.isConnected(); },
- href: "#/dispatch_plugin/list"
+ href: "#/" + QDR.pluginName + "/list"
},
{
content: '<i class="icon-star-empty"></i> Topology',
title: "View router network topology",
isValid: function (QDRService) { return QDRService.isConnected(); },
- href: "#/dispatch_plugin/topology"
+ href: "#/" + QDR.pluginName + "/topology"
},
-/*
- {
- content: '<i class="icon-bar-chart"></i> Charts',
- title: "View charts",
- isValid: function (QDRService, $location) { return QDRService.isConnected(); },
- href: "#/dispatch_plugin/charts"
- },
-*/
{
content: '<i class="icon-align-left"></i> Schema',
title: "View dispatch schema",
isValid: function (QDRService) { return QDRService.isConnected(); },
- href: "#/dispatch_plugin/schema",
+ href: "#/" + QDR.pluginName + "/schema",
right: true
}
@@ -95,7 +87,7 @@
};
$scope.hasChart = function (link) {
- if (link.href == "#/dispatch_plugin/charts") {
+ if (link.href == "#/" + QDR.pluginName + "/charts") {
return QDRChartService.charts.some(function (c) { return c.dashboard });
}
}
diff --git a/console/hawtio/src/main/webapp/plugin/js/qdrCharts.js b/console/hawtio/src/main/webapp/plugin/js/qdrCharts.js
index ea29e63..f37018f 100644
--- a/console/hawtio/src/main/webapp/plugin/js/qdrCharts.js
+++ b/console/hawtio/src/main/webapp/plugin/js/qdrCharts.js
@@ -33,7 +33,7 @@
if (!QDRService.connected && !$routeParams.chid) {
// we are not connected. we probably got here from a bookmark or manual page reload
- $location.path("/dispatch_plugin/connect")
+ $location.path("/" + QDR.pluginName + "/connect")
$location.search('org', "charts");
return;
}