Repository: qpid-dispatch Updated Branches: refs/heads/config-read-write 2f5ec0d89 -> 6f7107d42
DISPATCH-834 Fix for Firefox stylesheet insertion Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/6f7107d4 Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/6f7107d4 Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/6f7107d4 Branch: refs/heads/config-read-write Commit: 6f7107d4229eda1754f5cabb723ece09ca3b84af Parents: 2f5ec0d Author: Ernest Allen <eal...@redhat.com> Authored: Fri Oct 13 19:08:26 2017 -0400 Committer: Ernest Allen <eal...@redhat.com> Committed: Fri Oct 13 19:08:26 2017 -0400 ---------------------------------------------------------------------- console/config/README | 2 +- console/config/bower.json | 1 - console/config/index.html | 3 +-- console/config/js/dispatchPlugin.js | 12 ++---------- console/config/js/qdrTopology.js | 15 +++++++++++---- 5 files changed, 15 insertions(+), 18 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/6f7107d4/console/config/README ---------------------------------------------------------------------- diff --git a/console/config/README b/console/config/README index b8ef852..e4ca1ac 100644 --- a/console/config/README +++ b/console/config/README @@ -15,7 +15,7 @@ Running Install the 3rd party javascript libraries: - in the console/config/ directory run bower install -This will create a bower_components/ directory can install the needed files +This will create a bower_components/ directory and install the needed files - run ./config.py - in the address bar of a browser, enter localhost:8000 http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/6f7107d4/console/config/bower.json ---------------------------------------------------------------------- diff --git a/console/config/bower.json b/console/config/bower.json index e1479e9..47ce9b5 100644 --- a/console/config/bower.json +++ b/console/config/bower.json @@ -16,7 +16,6 @@ "dependencies": { "angular": "^1.6.2", "angular-animate": "^1.6.2", - "angular-route": "^1.6.2", "angular-resource": "^1.6.2", "angular-patternfly": "~0", "angular-sanitize": "^1.6.2", http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/6f7107d4/console/config/index.html ---------------------------------------------------------------------- diff --git a/console/config/index.html b/console/config/index.html index 64eb53a..f32a174 100644 --- a/console/config/index.html +++ b/console/config/index.html @@ -52,7 +52,7 @@ under the License. <div class="container-fluid"> <div class="row"> <div id="main-container"> - <div ng-view></div> + <div ng-include src="'html/qdrTopology.html'"></div> </div> </div> </div> @@ -67,7 +67,6 @@ under the License. <!-- Angular --> <script src="bower_components/angular/angular.min.js"></script> -<script src="bower_components/angular-route/angular-route.min.js"></script> <script src="bower_components/angular-resource/angular-resource.min.js"></script> <script src="bower_components/angular-animate/angular-animate.min.js"></script> <script src="bower_components/angular-sanitize/angular-sanitize.min.js"></script> http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/6f7107d4/console/config/js/dispatchPlugin.js ---------------------------------------------------------------------- diff --git a/console/config/js/dispatchPlugin.js b/console/config/js/dispatchPlugin.js index fa18322..55ddf20 100644 --- a/console/config/js/dispatchPlugin.js +++ b/console/config/js/dispatchPlugin.js @@ -65,7 +65,7 @@ var QDR = (function(QDR) { * * This plugin's angularjs module instance */ - QDR.module = angular.module(QDR.pluginName, ['ngAnimate', 'ngResource', 'ngRoute', 'ngSanitize', 'ui.bootstrap']); + QDR.module = angular.module(QDR.pluginName, ['ngAnimate', 'ngResource', 'ngSanitize', 'ui.bootstrap']); Core = { notification: function (severity, msg) { @@ -73,14 +73,6 @@ var QDR = (function(QDR) { } } - // set up the routing for this plugin - QDR.module.config(function($routeProvider) { - $routeProvider - .otherwise({ - templateUrl: QDR.templatePath + 'qdrTopology.html' - }) - }); - QDR.module.config(function ($compileProvider) { $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|ftp|mailto|chrome-extension|file|blob):/); $compileProvider.imgSrcSanitizationWhitelist(/^\s*(https?|ftp|mailto|chrome-extension):/); @@ -134,7 +126,7 @@ var QDR = (function(QDR) { } // one-time initialization happens in the run function // of our module - QDR.module.run( ["$rootScope", '$route', '$timeout', "$location", "$log", "QDRService", function ($rootScope, $route, $timeout, $location, $log, QDRService) { + QDR.module.run( ["$log", "QDRService", function ($log, QDRService) { QDR.log = new QDR.logger($log); QDR.log.info("*************creating config editor************"); QDRService.getSchema(function () { http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/6f7107d4/console/config/js/qdrTopology.js ---------------------------------------------------------------------- diff --git a/console/config/js/qdrTopology.js b/console/config/js/qdrTopology.js index 535bb52..4c48de3 100644 --- a/console/config/js/qdrTopology.js +++ b/console/config/js/qdrTopology.js @@ -1443,11 +1443,18 @@ var QDR = (function(QDR) { var style = document.createElement("style"); style.appendChild(document.createTextNode("")); document.head.appendChild(style); + var sheet = style.sheet ? style.sheet : style.styleSheet; for (var i=0; i<10; i++) { - //console.log("adding rule " + "circle.node.host"+i + ", fill: " + hostColors(i) + ";") - style.sheet.addRule("circle.node.host"+i, "fill: " + hostColors(i) + ";", 0); - style.sheet.addRule("circle.node.host"+i+".multi-selected", "fill: url(#host_"+i+")", 1); - style.sheet.addRule("div.node.host"+i, "background-color: " + hostColors(i) + ";", 2); + if (sheet.insertRule) { + sheet.insertRule("button {color:red}", 0); + sheet.insertRule("circle.node.host"+i+" {fill: " + hostColors(i) + ";}", 0); + sheet.insertRule("circle.node.host"+i+".multi-selected {fill: url(#host_"+i+");}", 1); + sheet.insertRule("div.node.host"+i+" {background-color: " + hostColors(i) + ";}", 2); + } else if (sheet.addRule) { // for IE < 9 + sheet.addRule("circle.node.host"+i, "fill: " + hostColors(i) + ";", 0); + sheet.addRule("circle.node.host"+i+".multi-selected", "fill: url(#host_"+i+")", 1); + sheet.addRule("div.node.host"+i, "background-color: " + hostColors(i) + ";", 2); + } } } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org For additional commands, e-mail: commits-h...@qpid.apache.org