[icinga-checkins] icinga.org: icinga-web/next: Filter editor label wrong

git at icinga.org git at icinga.org
Fri Apr 5 12:58:03 CEST 2013


Module: icinga-web
Branch: next
Commit: 30cb889429a828c97717c5eedff72ddb23c5b2ad
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=30cb889429a828c97717c5eedff72ddb23c5b2ad

Author: Marius Hein <marius.hein at netways.de>
Date:   Fri Apr  5 12:57:21 2013 +0200

Filter editor label wrong

Fixed static label and created dynamic one based on filter
configuration.

fixes #3927

---

 .../js/Icinga/Cronks/util/FilterTypes/Status.js    |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/app/modules/Cronks/lib/js/Icinga/Cronks/util/FilterTypes/Status.js b/app/modules/Cronks/lib/js/Icinga/Cronks/util/FilterTypes/Status.js
index 2e3ff5d..e4b0412 100644
--- a/app/modules/Cronks/lib/js/Icinga/Cronks/util/FilterTypes/Status.js
+++ b/app/modules/Cronks/lib/js/Icinga/Cronks/util/FilterTypes/Status.js
@@ -25,6 +25,9 @@
     
 var getStatusForm = function(filterCfg, radiobtns) {
 
+    // Dynamic label by config for host- or servicestatus
+    var label = String.format(_("Filter by {0}:"), filterCfg.label);
+
     return {
         xtype: 'form',
         width: 160,
@@ -32,7 +35,7 @@ var getStatusForm = function(filterCfg, radiobtns) {
         padding:5,
         items: [{
             border: false,
-            html: '<div style="font-size:12px;font-weight:bold">'+_("Filter by host status:")+'</div><br/>'
+            html: '<div style="font-size:12px;font-weight:bold">'+ label +'</div><br/>'
         },{
             xtype: 'hidden',
             name: 'field',
@@ -67,6 +70,7 @@ var getStatusForm = function(filterCfg, radiobtns) {
 }
 
 Ext.ns('Icinga.Cronks.util.FilterTypes').Hoststatus = function(filterCfg,defaults) {
+    console.log(filterCfg);
     return getStatusForm(filterCfg,[{
         checked: defaults['value'] == 0 || defaults == {},
         inputValue: 0,
@@ -117,4 +121,4 @@ Ext.ns('Icinga.Cronks.util.FilterTypes').Servicestatus = function(filterCfg,defa
        
 };
 
-})();
\ No newline at end of file
+})();





More information about the icinga-checkins mailing list