Module: check_mk
Branch: master
Commit: b86be2ee9ab0e4014824ebc303a0d1987b2d5a9a
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b86be2ee9ab0e4…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Jan 4 10:46:49 2011 +0100
Updated bug entries
---
.bugs/19 | 16 +++++++++++++---
1 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/.bugs/19 b/.bugs/19
index b2f380a..25fa115 100644
--- a/.bugs/19
+++ b/.bugs/19
@@ -1,12 +1,22 @@
Title: Kommandobox / Filter soll refresh blockieren
Component: multisite
+State: done
+Class: nastiness
+Date: 2010-12-21 16:21:40
Benefit: 2
-State: open
Cost: 3
-Date: 2010-12-21 16:21:40
-Class: nastiness
+Fun: 0
Wenn man gerade die Kommandobox, die Filter oder die View options auf hat
und der Browser macht den automatischen Refresh, dann geht das wieder zu.
Kann man nicht - wenn man die Box aufklappt - den Refresh für die Zeit
unterdrücken?
+
+2011-01-04 10:46:35: changed state open -> done
+Ist erledigt.
+
+
+View pages are not refreshed when at least one form (Filter, Commands,
+Display Options) is open
+
+Switched page refresh code from HTTP header to javascript timeouts to be more controllable
Module: check_mk
Branch: master
Commit: 76c0c7a60accf1c15ee8d76ec6229b8b081256b9
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=76c0c7a60accf1…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Jan 4 11:04:57 2011 +0100
Updated bug entries
---
.bugs/72 | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/.bugs/72 b/.bugs/72
index ee933e1..32428bf 100644
--- a/.bugs/72
+++ b/.bugs/72
@@ -1,11 +1,16 @@
Title: Quicksearch case-insensitive
Component: multisite
+State: done
+Class: feature
+Date: 2010-12-22 11:07:51
Benefit: 1
-State: open
Cost: 1
-Date: 2010-12-22 11:07:51
-Class: feature
+Fun: 0
Evtl. sollte das Case-Insensitive werden. Es spricht doch eigentlich
nix dagegen. Gefordert wird das von Leuten, die ihre Hosts mit Großbuchstaben
schreiben. Ich denke bei den Services ist es jetzt schon ci.
+
+2011-01-04 11:04:51: changed state open -> done
+Original Verhalten wieder hergestellt. Das Snapin war schonmal case insensitive.
+Ist wohl unter die Räder gekommen.
Module: check_mk
Branch: master
Commit: 40a1704c849b1738c4b1ce13c0bcb79ce291651c
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=40a1704c849b17…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Jan 4 11:05:09 2011 +0100
Sidebar: The sidebar quicksearch snapin is case insensitive again
---
ChangeLog | 1 +
web/htdocs/js/search.js | 11 +++++++++--
web/plugins/sidebar/search.py | 2 +-
3 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 3ffaf27..9a66338 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -39,6 +39,7 @@
* Sidebar: Fixed scrolling problem in IE8 with compat mode (or maybe older IE versions)
which broke the snapin titles and also the tactical overview table
* Sidebar: Fixed bulletlist positioning
+ * Sidebar: The sidebar quicksearch snapin is case insensitive again
* Fixed header displaying on views when the edit button is not shown to the user
* View pages are not refreshed when at least one form (Filter, Commands,
Display Options) is open
diff --git a/web/htdocs/js/search.js b/web/htdocs/js/search.js
index 7c6ba69..4340be0 100644
--- a/web/htdocs/js/search.js
+++ b/web/htdocs/js/search.js
@@ -100,7 +100,7 @@ function mkSearchFindUrl(aSearchObjects, objType, oField) {
for (var i in aSearchObjects) {
var objSite = aSearchObjects[i][0];
var objName = aSearchObjects[i][1];
- if (objName.indexOf(namepart) > -1) {
+ if (mkSearchMatch(objName, namepart)) {
found ++;
if (url != null) { // found second match -> not unique
url = null;
@@ -347,6 +347,12 @@ function mkSearchGetUrl(objType, objName, objSite, numMatches) {
return 'view.py?view_name=servicedesc&service=' + objName + '&site=' + objSite;
}
+// This performs a case insensitive search of a substring in a string
+// Returns true if found and false if not
+function mkSearchMatch(base, search) {
+ return base.toLowerCase().indexOf(search.toLowerCase()) > -1;
+}
+
function mkSearchAddSearchResults(aSearchObjects, objType, val) {
val = mkSearchCleanupString(val, objType);
// Build matching regex
@@ -364,7 +370,8 @@ function mkSearchAddSearchResults(aSearchObjects, objType, val) {
objName = aSearchObjects[i][1];
// if(objName.match(oMatch)) {
- if(objName.indexOf(val) > -1) {
+ // case insensitive search!
+ if(mkSearchMatch(objName, val)) {
var url = mkSearchGetUrl(objType, objName, objSite, 1);
var oResult = {
'id': 'result_' + objName,
diff --git a/web/plugins/sidebar/search.py b/web/plugins/sidebar/search.py
index d721d39..18e84b0 100644
--- a/web/plugins/sidebar/search.py
+++ b/web/plugins/sidebar/search.py
@@ -48,7 +48,7 @@ def render_searchform():
html.write('<div id="mk_side_search" onclick="mkSearchClose();">')
html.write('<input id="mk_side_search_field" type="text" name="search" autocomplete="off" />')
html.write('</div>')
- html.write("<script type='text/javascript' src='search.js'></script>\n")
+ html.write("<script type='text/javascript' src='js/search.js'></script>\n")
html.write("<script type='text/javascript'>\n")
# Store (user) hosts in JS array