Changed wording of single object things a bit
Message-ID: <54329358.UO3bOBl5jMcXi3Ez%lm(a)mathias-kettner.de>
User-Agent: Heirloom mailx 12.4 7/29/08
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Module: check_mk
Branch: master
Commit: 0bd00f64881553493aa6e0338dc4d4363224a9c5
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=0bd00f64881553…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Oct 6 15:02:09 2014 +0200
Fixed creating new view dashlets; Changed wording of single object things a bit
---
web/htdocs/dashboard.py | 10 ++++++----
web/htdocs/visuals.py | 8 ++++----
2 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/web/htdocs/dashboard.py b/web/htdocs/dashboard.py
index c2dcd2d..a3e5477 100644
--- a/web/htdocs/dashboard.py
+++ b/web/htdocs/dashboard.py
@@ -676,7 +676,8 @@ def page_create_view_dashlet():
if create:
import views
- url = html.makeuri([('datasource', '%s')], filename =
"create_view_dashlet_infos.py")
+ url = html.makeuri([], filename = "create_view_dashlet_infos.py")
+ url += '&datasource=%s' # %s can not be added using html.makeuri()
views.page_create_view(next_url=url)
else:
@@ -684,14 +685,15 @@ def page_create_view_dashlet():
choose_view(name)
def page_create_view_dashlet_infos():
+ import views
ds_name = html.var('datasource')
- if ds_name not in multisite_datasources:
+ if ds_name not in views.multisite_datasources:
raise MKGeneralException(_('The given datasource is not supported'))
# Create a new view by choosing the datasource and the single object types
- visuals.page_create_visual('views', _("View"),
multisite_datasources[ds_name]['infos'],
+ visuals.page_create_visual('views', _("View"),
views.multisite_datasources[ds_name]['infos'],
next_url =
'edit_dashlet.py?name=%s&type=view&datasource=%s&single_infos=%%s' %
- (html.urlencode(html.var('name'), ds_name)))
+ (html.urlencode(html.var('name')), ds_name))
def choose_view(name):
import views
diff --git a/web/htdocs/visuals.py b/web/htdocs/visuals.py
index 461a9b6..d107439 100644
--- a/web/htdocs/visuals.py
+++ b/web/htdocs/visuals.py
@@ -373,7 +373,7 @@ def page_create_visual(what, title, info_keys, next_url = None):
'of <i>multiple</i> services, a list of
<i>multiple</i> services of a <i>single</i> host or even '
'a list of services with the same name on <i>multiple</i>
hosts. When you just want to '
'create a list of objects, you do not need to make any selection in this
dialog. '
- 'If you like to create a view for a specific object of a specific type,
select the '
+ 'If you like to create a view for one specific object of a specific type,
select the '
'object type below and continue.') % what_s)
html.write('</p>')
@@ -394,7 +394,7 @@ def page_create_visual(what, title, info_keys, next_url = None):
html.begin_form('create_visual')
html.hidden_field('mode', 'create')
- forms.header(_('Select specific objects'))
+ forms.header(_('Select specific object type'))
forms.section(vs_infos.title())
vs_infos.render_input('single_infos', '')
html.help(vs_infos.help())
@@ -564,9 +564,9 @@ def page_edit_visual(what, all_visuals, custom_field_handler = None,
optional_keys = None,
elements = [
('single_infos', FixedValue(single_infos,
- title = _('Show information of single'),
+ title = _('Specific objects'),
totext = single_infos and ', '.join(single_infos) \
- or _('Not showing information for a specific
object.'),
+ or _('Showing information of multiple
objects.'),
)),
('name', TextAscii(
title = _('Unique ID'),