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/08/05 17:27:25 UTC

[qpid-dispatch] branch master updated: DISPATCH-1376 Fix product name and copyright for console

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 f0dae4c  DISPATCH-1376 Fix product name and copyright for console
f0dae4c is described below

commit f0dae4c5d6ee65fd2a2399e131fa60930d081bc3
Author: Ernest Allen <ea...@redhat.com>
AuthorDate: Mon Aug 5 13:27:12 2019 -0400

    DISPATCH-1376 Fix product name and copyright for console
---
 console/stand-alone/console-config.json     |  4 ++--
 console/stand-alone/main.js                 |  3 +--
 console/stand-alone/plugin/js/qdrAbout.js   | 19 +++++++++++++------
 console/stand-alone/plugin/js/qdrGlobals.js | 14 ++++++--------
 4 files changed, 22 insertions(+), 18 deletions(-)

diff --git a/console/stand-alone/console-config.json b/console/stand-alone/console-config.json
index 56f5e6f..447c3bf 100644
--- a/console/stand-alone/console-config.json
+++ b/console/stand-alone/console-config.json
@@ -1,4 +1,4 @@
 {
-  "company": "Red Hat",
-  "product": "Interconnect"
+  "company": "Apache",
+  "product": "Dispatch"
 }
\ No newline at end of file
diff --git a/console/stand-alone/main.js b/console/stand-alone/main.js
index 474349b..0400876 100644
--- a/console/stand-alone/main.js
+++ b/console/stand-alone/main.js
@@ -31,7 +31,6 @@ import {
   QDRLogger,
   QDRTemplatePath,
   QDR_LAST_LOCATION,
-  QDR_CONSOLE_TITLE,
   getConfigVars
 } from "./plugin/js/qdrGlobals.js";
 import { QDRService } from "./plugin/js/qdrService.js";
@@ -302,7 +301,7 @@ import { posint } from "./plugin/js/posintDirective.js";
     $scope.console_logo = "";
     getConfigVars().then(response => {
       $timeout(function() {
-        $scope.console_logo = `${response.company} ${response.product} Console`;
+        $scope.console_logo = response.QDR_CONSOLE_TITLE;
       });
     });
     $scope.alerts = [];
diff --git a/console/stand-alone/plugin/js/qdrAbout.js b/console/stand-alone/plugin/js/qdrAbout.js
index c81b2ab..5d0b794 100644
--- a/console/stand-alone/plugin/js/qdrAbout.js
+++ b/console/stand-alone/plugin/js/qdrAbout.js
@@ -17,17 +17,24 @@ specific language governing permissions and limitations
 under the License.
 */
 
-import { QDR_CONSOLE_TITLE, QDR_CONSOLE_COPYRIGHT } from "./qdrGlobals.js";
+import { getConfigVars } from "./qdrGlobals.js";
 
 export class AboutController {
   constructor($scope, QDRService, $timeout) {
     this.controllerName = "QDR.AboutController";
 
-    $scope.additionalInfo = `Console for the ${QDR_CONSOLE_TITLE}: A high-performance, lightweight AMQP 1.0 message router, written in C and built on Qpid Proton. It provides flexible and scalable interconnect between any AMQP endpoints, whether they be clients, brokers or other AMQP-enabled services.`;
-    $scope.copyright = QDR_CONSOLE_COPYRIGHT;
-    $scope.imgAlt = QDR_CONSOLE_TITLE;
-    $scope.imgSrc = "img/logo-alt.svg";
-    $scope.title = QDR_CONSOLE_TITLE;
+    getConfigVars().then(response => {
+      $timeout(function() {
+        $scope.additionalInfo = `Console for ${
+          response.QDR_ROUTER_NAME
+        }: A high-performance, lightweight AMQP 1.0 message router, written in C and built on Qpid Proton. It provides flexible and scalable interconnect between any AMQP endpoints, whether they be clients, brokers or other AMQP-enabled services.`;
+        $scope.copyright = response.QDR_CONSOLE_COPYRIGHT;
+        $scope.imgAlt = response.QDR_CONSOLE_TITLE;
+        $scope.imgSrc = "img/logo-alt.svg";
+        $scope.title = response.QDR_CONSOLE_TITLE;
+      });
+    });
+
     $scope.productInfo = [
       { name: "Version", value: "<not connected>" },
       { name: "Server Name", value: window.location.host },
diff --git a/console/stand-alone/plugin/js/qdrGlobals.js b/console/stand-alone/plugin/js/qdrGlobals.js
index e599b6d..38c69f6 100644
--- a/console/stand-alone/plugin/js/qdrGlobals.js
+++ b/console/stand-alone/plugin/js/qdrGlobals.js
@@ -69,20 +69,18 @@ export var QDRRedirectWhenConnected = function($location, org) {
   $location.search("org", org);
 };
 
-export var QDR_CONSOLE_TITLE = "Console";
-export var QDR_ROUTER_NAME = "Router";
-export var QDR_CONSOLE_COPYRIGHT = "Copyright 2019";
-
 export var getConfigVars = () =>
   new Promise((resolve, reject) => {
     $.getJSON("console-config.json", function() {}).done(function(s) {
       console.log(
         `got x-stream text ${s.title} - ${s.router} - ${s.copyright}`
       );
-      document.title = s.title;
-      QDR_CONSOLE_TITLE = `${s.company} ${s.product} Console`;
-      QDR_ROUTER_NAME = `${s.company} ${s.product} Router`;
-      QDR_CONSOLE_COPYRIGHT = `Copyright 2019 ${s.company}`;
+      s.QDR_CONSOLE_TITLE = `${s.company} ${s.product} Console`;
+      document.title = s.QDR_CONSOLE_TITLE;
+
+      s.QDR_ROUTER_NAME = `${s.company} ${s.product} Router`;
+      s.COPYRIGHT_YEAR = "2019";
+      s.QDR_CONSOLE_COPYRIGHT = `Copyright ${s.COPYRIGHT_YEAR} ${s.company}`;
       resolve(s);
     });
   });


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org