qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kw...@apache.org
Subject [3/3] qpid-broker-j git commit: QPID-8092: [Broker-J][Web Management Console] Fix label for max history of file loggers
Date Fri, 02 Feb 2018 12:53:09 GMT
QPID-8092: [Broker-J][Web Management Console] Fix label for max history of file loggers


Project: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/commit/87e9c7f4
Tree: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/tree/87e9c7f4
Diff: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/diff/87e9c7f4

Branch: refs/heads/7.0.x
Commit: 87e9c7f41f88b24ae90988e20db19a3fb4ec2924
Parents: d0736c5
Author: Alex Rudyy <orudyy@apache.org>
Authored: Thu Feb 1 17:06:43 2018 +0000
Committer: Keith Wall <kwall@apache.org>
Committed: Fri Feb 2 12:52:54 2018 +0000

----------------------------------------------------------------------
 .../management/logger/brokerlogger/file/show.js | 10 ++++++++--
 .../logger/virtualhostlogger/file/show.js       | 10 ++++++++--
 .../main/java/resources/logger/file/add.html    | 21 ++++++++++++++------
 .../main/java/resources/logger/file/show.html   |  3 ++-
 4 files changed, 33 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/87e9c7f4/broker-plugins/logging-logback/src/main/java/resources/js/qpid/management/logger/brokerlogger/file/show.js
----------------------------------------------------------------------
diff --git a/broker-plugins/logging-logback/src/main/java/resources/js/qpid/management/logger/brokerlogger/file/show.js
b/broker-plugins/logging-logback/src/main/java/resources/js/qpid/management/logger/brokerlogger/file/show.js
index 42f7996..5fa5332 100644
--- a/broker-plugins/logging-logback/src/main/java/resources/js/qpid/management/logger/brokerlogger/file/show.js
+++ b/broker-plugins/logging-logback/src/main/java/resources/js/qpid/management/logger/brokerlogger/file/show.js
@@ -19,10 +19,11 @@
  *
  */
 define(["qpid/common/util",
+        "dojo/query",
         "dojo/text!logger/file/show.html",
         "qpid/common/TypeTabExtension",
         "qpid/management/logger/FileBrowser",
-        "dojo/domReady!"], function (util, template, TypeTabExtension, FileBrowser)
+        "dojo/domReady!"], function (util, query, template, TypeTabExtension, FileBrowser)
 {
     function BrokerFileLogger(params)
     {
@@ -39,6 +40,7 @@ define(["qpid/common/util",
             "File",
             params.metadata,
             params.data);
+        this.containerNode = params.containerNode;
     }
 
     util.extend(BrokerFileLogger, TypeTabExtension);
@@ -47,7 +49,11 @@ define(["qpid/common/util",
     {
         TypeTabExtension.prototype.update.call(this, restData);
         this.fileBrowser.update(restData);
-    }
+        query(".maxHistoryLabel", this.containerNode)[0].style.display =
+            restData && restData['rollDaily'] ? 'none' : '';
+        query(".maxHistoryRollDailyLabel", this.containerNode)[0].style.display =
+            restData && restData['rollDaily'] ? '' : 'none';
+    };
 
     return BrokerFileLogger;
 });

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/87e9c7f4/broker-plugins/logging-logback/src/main/java/resources/js/qpid/management/logger/virtualhostlogger/file/show.js
----------------------------------------------------------------------
diff --git a/broker-plugins/logging-logback/src/main/java/resources/js/qpid/management/logger/virtualhostlogger/file/show.js
b/broker-plugins/logging-logback/src/main/java/resources/js/qpid/management/logger/virtualhostlogger/file/show.js
index c069858..7c8265b 100644
--- a/broker-plugins/logging-logback/src/main/java/resources/js/qpid/management/logger/virtualhostlogger/file/show.js
+++ b/broker-plugins/logging-logback/src/main/java/resources/js/qpid/management/logger/virtualhostlogger/file/show.js
@@ -19,10 +19,11 @@
  *
  */
 define(["qpid/common/util",
+        "dojo/query",
         "dojo/text!logger/file/show.html",
         "qpid/common/TypeTabExtension",
         "qpid/management/logger/FileBrowser",
-        "dojo/domReady!"], function (util, template, TypeTabExtension, FileBrowser)
+        "dojo/domReady!"], function (util, query, template, TypeTabExtension, FileBrowser)
 {
     function VirtualHostFileLogger(params)
     {
@@ -39,6 +40,7 @@ define(["qpid/common/util",
             "File",
             params.metadata,
             params.data);
+        this.containerNode = params.containerNode;
     }
 
     util.extend(VirtualHostFileLogger, TypeTabExtension);
@@ -47,7 +49,11 @@ define(["qpid/common/util",
     {
         TypeTabExtension.prototype.update.call(this, restData);
         this.fileBrowser.update(restData);
-    }
+        query(".maxHistoryLabel", this.containerNode)[0].style.display =
+            restData && restData['rollDaily'] ? 'none' : '';
+        query(".maxHistoryRollDailyLabel", this.containerNode)[0].style.display =
+            restData && restData['rollDaily'] ? '' : 'none';
+    };
 
     return VirtualHostFileLogger;
 });

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/87e9c7f4/broker-plugins/logging-logback/src/main/java/resources/logger/file/add.html
----------------------------------------------------------------------
diff --git a/broker-plugins/logging-logback/src/main/java/resources/logger/file/add.html b/broker-plugins/logging-logback/src/main/java/resources/logger/file/add.html
index a9eeee9..17beea2 100644
--- a/broker-plugins/logging-logback/src/main/java/resources/logger/file/add.html
+++ b/broker-plugins/logging-logback/src/main/java/resources/logger/file/add.html
@@ -49,11 +49,18 @@
             <div class="clear">
                 <div class="formLabel-labelCell tableContainer-labelCell">Roll Daily:</div>
                 <div class="formLabel-controlCell tableContainer-valueCell">
-                    <input type="checkbox" id="addLogger.rollDaily"
+                    <div type="checkbox" id="addLogger.rollDaily"
                            data-dojo-type="dijit/form/CheckBox"
                            data-dojo-props="
                                   name: 'rollDaily',
-                                  required: false"/>
+                                  required: false">
+                    <script type="dojo/on" data-dojo-event="change" data-dojo-args="checked">
+require(["dijit/registry", "dojo/dom"], function(registry, dom){
+dom.byId("addLogger.maxHistory.label").style.display = checked ? 'none' : '';
+dom.byId("addLogger.maxHistory.label.roll_daily").style.display = checked ? '' : 'none';
+        });
+    </script>
+                    </div>
                     <div data-dojo-type="dijit/Tooltip"
                          data-dojo-props="connectId: ['addLogger.rollDaily'],
                                       label: 'If selected, files will be rolled over daily'">
@@ -89,15 +96,17 @@
                 </div>
             </div>
             <div class="clear">
-                <div class="formLabel-labelCell tableContainer-labelCell">Maximum Number
of Rolled Files:</div>
+                <div class="formLabel-labelCell tableContainer-labelCell">
+                    <span id="addLogger.maxHistory.label">Maximum Number of Rolled
Files</span>
+                    <span id="addLogger.maxHistory.label.roll_daily" style="display: none">Maximum
Number of Days to Keep Rolled Files</span>:</div>
                 <div class="formLabel-controlCell tableContainer-valueCell">
                     <input type="text" id="addLogger.maxHistory"
                            data-dojo-type="dijit/form/NumberTextBox"
                            data-dojo-props="
                               name: 'maxHistory',
-                              placeHolder: 'maximum number of files to keep in history',
-                              promptMessage: 'Enter the maximum number of files to keep in
history',
-                              title: 'Enter the maximum number of files to keep in history'"/>
+                              placeHolder: 'maximum history limit for rolled files',
+                              promptMessage: 'Enter maximum history limit for rolled files',
+                              title: 'Enter maximum history limit for rolled files'"/>
                 </div>
             </div>
             <div class="clear">

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/87e9c7f4/broker-plugins/logging-logback/src/main/java/resources/logger/file/show.html
----------------------------------------------------------------------
diff --git a/broker-plugins/logging-logback/src/main/java/resources/logger/file/show.html
b/broker-plugins/logging-logback/src/main/java/resources/logger/file/show.html
index 49d8a87..1aac46a 100644
--- a/broker-plugins/logging-logback/src/main/java/resources/logger/file/show.html
+++ b/broker-plugins/logging-logback/src/main/java/resources/logger/file/show.html
@@ -40,7 +40,8 @@
                     <div class="compressOldFiles formValue-valueCell"></div>
                 </div>
                 <div class="clear">
-                    <div class="formLabel-labelCell">Maximum Number of Rolled Files:</div>
+                    <div class="formLabel-labelCell"><span class="maxHistoryLabel">Maximum
Number of Rolled Files</span>
+                        <span class="maxHistoryRollDailyLabel" style="display: none">Maximum
Number of Days to Keep Rolled Files</span>:</div>
                     <div class="maxHistory formValue-valueCell"></div>
                 </div>
             </div>


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


Mime
View raw message