예제 #1
0
def page_create_view_dashlet_infos():
    import views
    ds_name = html.var('datasource')
    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', views.multisite_datasources[ds_name]['infos'],
        next_url = html.makeuri_contextless([
            ('name', html.var('name')),
            ('type', 'view'),
            ('datasource', ds_name),
            ('back', html.makeuri([])),
            ('next', html.makeuri_contextless([('name', html.var('name')), ('edit', '1')],'dashboard.py')),
        ], filename = 'edit_dashlet.py'))
예제 #2
0
def page_create_view_dashlet_infos():
    import views

    ds_name = html.var("datasource")
    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",
        views.multisite_datasources[ds_name]["infos"],
        next_url=html.makeuri_contextless(
            [
                ("name", html.var("name")),
                ("type", "view"),
                ("datasource", ds_name),
                ("back", html.makeuri([])),
                ("next", html.makeuri_contextless([("name", html.var("name")), ("edit", "1")], "dashboard.py")),
            ],
            filename="edit_dashlet.py",
        ),
    )
예제 #3
0
def page_create_dashboard():
    visuals.page_create_visual("dashboards", visuals.infos.keys())
예제 #4
0
def page_create_dashboard():
    visuals.page_create_visual('dashboards', visuals.infos.keys())