Skip to content

Commit

Permalink
FIX: Fixed "move to target folders" after CSV import
Browse files Browse the repository at this point in the history
  • Loading branch information
LarsMichelsen committed Jan 9, 2012
1 parent c00cede commit c7f66c2
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
13 changes: 13 additions & 0 deletions .f12
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash
SITE=${SITE:-$(omd sites --bare | head -n 1)}
set -xe

sed -e "s#@BINDIR@#/omd/sites/$SITE/bin#g" \
-e "s#@VARDIR@#/omd/sites/$SITE/var/check_mk#g" \
-e "s#@CHECK_ICMP@#/omd/sites/$SITE/lib/nagios/plugins/check_icmp#g" \
-e "s#@PNPURL@#/$SITE/pnp4nagios/#g" \
-e "s#@CGIURL@#/$SITE/nagios/cgi-bin#g" \
< check_mk_templates.cfg > /tmp/check_mk_templates.cfg

sudo mv /tmp/check_mk_templates.cfg /omd/sites/$SITE/etc/nagios/conf.d
sudo omd restart $SITE nagios
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@

WATO:
* FIX: Fixed missing folders in "move to" dropdown fields
* FIX: Fixed "move to target folders" after CSV import

BI:
* improve doc/treasures/check_bi_local.py: local check that creates
Expand Down
7 changes: 6 additions & 1 deletion web/htdocs/wato.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@
# performance issues.
# ".total_hosts" -> recursive number of hosts, computed on demand by
# num_hosts_in()
# ".siteid" -> This attribute is mandatory for host objects and optional for folder
# objects. In case of hosts and single WATO setup it is always none.
#
#
# g_folder -> The folder object representing the folder the user is
Expand Down Expand Up @@ -2152,8 +2154,11 @@ def create_target_folder_from_aliaspath(aliaspath):
".folders" : {},
".files" : {},
".parent" : folder,
".siteid" : folder[".siteid"],
}

if '.siteid' in folder:
new_folder['.siteid'] = folder[".siteid"]

folder[".folders"][name] = new_folder
g_folders[new_path] = new_folder
folder = new_folder
Expand Down

0 comments on commit c7f66c2

Please sign in to comment.