qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oru...@apache.org
Subject qpid-broker-j git commit: QPID-8092: [Broker-J][Web Management Console] Fix label for max history of file loggers
Date Thu, 01 Feb 2018 17:07:04 GMT
Repository: qpid-broker-j
Updated Branches:
  refs/heads/master 424614770 -> f561984e7


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/f561984e
Tree: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/tree/f561984e
Diff: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/diff/f561984e

Branch: refs/heads/master
Commit: f561984e7d8ec7e96c7682350bb2c483287d65b8
Parents: 4246147
Author: Alex Rudyy <orudyy@apache.org>
Authored: Thu Feb 1 17:06:43 2018 +0000
Committer: Alex Rudyy <orudyy@apache.org>
Committed: Thu Feb 1 17:06:43 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/f561984e/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/f561984e/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/f561984e/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/f561984e/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