{% set kwargs = handler.kwargs %} {% set admin_kwargs = kwargs.get('admin_kwargs', '') or {} %} {% set title = admin_kwargs.get('title', 'Admin') %} {% set tab_list = admin_kwargs.get('components', []) or list(kwargs.components.keys()) %} {% set tab_list = [tab for tab in tab_list if tab in kwargs.components] %} {% set current_tab = handler.path_args[0] %} {{ title }} {% import gramexadmin %} {% try %}{% set authhandler, auth_conf, data_conf = gramexadmin.get_auth_conf(admin_kwargs) %} {% except ValueError %}{% set authhandler, auth_conf, data_conf = None, {}, {} %}{% end %}
{% if not current_tab %}
{% for tab_id in tab_list %} {% set tab = kwargs.components[tab_id] %}

{{ tab.title }}

{{ tab.desc }}
{% end %}
{% elif current_tab not in tab_list %}
Unknown feature

This feature may be disabled or missing. Please go to the admin home page.

{% elif current_tab == 'users' %} {% if authhandler %}
{% else %}

User management is not enabled

{% end %} {% import json %} {% elif current_tab == 'schedule' %}
{% elif current_tab == 'alert' %}
{% elif current_tab == 'shell' %}
{% elif current_tab == 'info' %}
{% elif current_tab == 'config' %}
Work in progress
{% elif current_tab == 'logs' %}
Work in progress
{% elif current_tab == 'nlg' %} {% set action = handler.get_argument('action', '') %} {% if action == 'edit' %} {% include "../nlg/index.html" %} {% else %} {% include "../nlg/grmform.html" %} {% end %} {% end %}