summaryrefslogtreecommitdiffstats
path: root/ogcp/templates/commands.html
blob: 48630ea894862158efd5745c74305d5a011e7507 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
{% extends 'base.html' %}
{% import "macros.html" as macros %}

{% block nav_commands %}active{% endblock %}

{% block container %}
    <form id="scopesForm">
        <input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
    </form>
    {{ super() }}
</form>
{% endblock %}

{% block sidebar %}
  {{ macros.scopes_tree_collapse(scopes, sidebar_state, 'commands') }}
{% endblock %}

{% block commands %}
{% if current_user.is_authenticated %}
  <div class="dropdown btn">
    <button class="btn btn-secondary btn-light dropdown-toggle{% block nav_client %}{% endblock %}" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-expanded="false">
	    {{ _('Client') }}
    </button>
    <div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
    <input class="btn btn-light dropdown-item{% block nav_client_refresh %}{% endblock %}" type="submit" value="{{ _('Refresh') }}"
           form="scopesForm" formaction="{{ url_for('action_refresh') }}" formmethod="post">
    <input class="btn btn-light dropdown-item{% block nav_client_session %}{% endblock %}" type="submit" value="{{ _('Boot OS') }}"
           form="scopesForm" formaction="{{ url_for('action_session') }}" formmethod="get">
    <input class="btn btn-light dropdown-item{% block nav_client_cache %}{% endblock %}" type="submit" value="{{ _('Manage cache') }}"
           form="scopesForm" formaction="{{ url_for('action_client_cache') }}" formmethod="get">
    <input class="btn btn-light dropdown-item{% block nav_client_details %}{% endblock %}" type="submit" value="{{ _('Client details') }}"
           form="scopesForm" formaction="{{ url_for('action_client_info') }}" formmethod="get">
    </div>
  </div>

  <div class="dropdown btn">
    <button class="btn btn-secondary btn-light dropdown-toggle{% block nav_setup %}{% endblock %}" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-expanded="false">
	    {{ _('Setup') }}
    </button>
    <div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
    <input class="btn btn-light dropdown-item{% block nav_setup_set_bootmode %}{% endblock %}" type="submit" value="{{ _('Set boot mode') }}"
           form="scopesForm" formaction="{{ url_for('action_mode') }}" formmethod="get">
    <input class="btn btn-light dropdown-item{% block nav_setup_set_oglive %}{% endblock %}" type="submit" value="{{ _('Set ogLive') }}"
           form="scopesForm" formaction="{{ url_for('action_oglive') }}" formmethod="get">
    <input class="btn btn-light dropdown-item{% block nav_setup_setup %}{% endblock %}" type="submit" value="{{ _('Partition & Format') }}"
           form="scopesForm" formaction="{{ url_for('action_setup_select') }}" formmethod="get">
    </div>
  </div>

  <div class="dropdown btn">
    <button class="btn btn-secondary btn-light dropdown-toggle{% block nav_power %}{% endblock %}" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-expanded="false">
	    {{ _('Power') }}
    </button>
    <div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
    <input class="btn btn-light dropdown-item{% block nav_power_wol %}{% endblock %}" type="submit" value="{{ _('Power on (WoL)') }}"
           form="scopesForm" formaction="{{ url_for('action_wol') }}" formmethod="get">
    <input class="btn btn-light dropdown-item{% block nav_power_poweroff %}{% endblock %}" type="submit" value="{{ _('Power off') }}"
           form="scopesForm" formaction="{{ url_for('action_poweroff') }}" formmethod="get">
    <input class="btn btn-light dropdown-item{% block nav_power_reboot %}{% endblock %}" type="submit" value="{{ _('Reboot') }}"
           form="scopesForm" formaction="{{ url_for('action_reboot') }}" formmethod="get">
    </div>
  </div>

  <div class="dropdown btn">
    <button class="btn btn-secondary btn-light dropdown-toggle{% block nav_image %}{% endblock %}" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-expanded="false">
	    {{ _('Image') }}
    </button>
    <div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
    {% if current_user.get_permission('IMAGE', 'ADD') %}
    <input class="btn btn-light dropdown-item{% block nav_image_create %}{% endblock %}" type="submit" value="{{ _('Create image') }}"
           form="scopesForm" formaction="{{ url_for('action_image_create') }}" formmethod="get">
    {% endif %}
    {% if current_user.get_permission('IMAGE', 'UPDATE') %}
    <input class="btn btn-light dropdown-item {% block nav_image_update %}{% endblock %}" type="submit" value="{{ _('Update image') }}"
           form="scopesForm" formaction="{{ url_for('action_image_update') }}" formmethod="get">
    {% endif %}
    <input class="btn btn-light dropdown-item{% block nav_image_restore %}{% endblock %}" type="submit" value="{{ _('Restore image') }}"
           form="scopesForm" formaction="{{ url_for('action_image_restore') }}" formmethod="get">
    <input class="btn btn-light dropdown-item{% block nav_image_fetch %}{% endblock %}" type="submit" value="{{ _('Fetch image') }}"
           form="scopesForm" formaction="{{ url_for('action_image_fetch') }}" formmethod="get">
    </div>
  </div>

  <div class="dropdown btn">
    <button class="btn btn-secondary btn-light dropdown-toggle{% block nav_inventory %}{% endblock %}" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-expanded="false">
	    {{ _('Inventory') }}
    </button>
    <div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
    <input class="btn btn-light dropdown-item{% block nav_inventory_hardware %}{% endblock %}" type="submit" value="{{ _('Hardware') }}"
           form="scopesForm" formaction="{{ url_for('action_hardware') }}" formmethod="get">
    <input class="btn btn-light dropdown-item{% block nav_inventory_software %}{% endblock %}" type="submit" value="{{ _('Software') }}"
           form="scopesForm" formaction="{{ url_for('action_software') }}" formmethod="get">
    </div>
  </div>

  <div class="dropdown btn">
    <button class="btn btn-secondary btn-light dropdown-toggle{% block nav_script %}{% endblock %}" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-expanded="false">
	    {{ _('Script') }}
    </button>
    <div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
       <input class="btn btn-light dropdown-item{% block nav_run_script %}{% endblock %}" type="submit" value="{{ _('Run') }}"
              form="scopesForm" formaction="{{ url_for('action_run_script') }}" formmethod="get">
       <input class="btn btn-light dropdown-item{% block nav_display_output %}{% endblock %}" type="submit" value="{{ _('Display output') }}"
              form="scopesForm" formaction="{{ url_for('action_script_display_output') }}" formmethod="get">
    </div>
  </div>

  <div class="dropdown btn">
    <button class="btn btn-secondary btn-light dropdown-toggle{% block nav_logs %}{% endblock %}" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-expanded="false">
      Logs
    </button>
    <div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
    <input class="btn btn-light dropdown-item{% block nav_logs_log %}{% endblock %}" type="submit" value="{{ _('System log') }}"
           form="scopesForm" formaction="{{ url_for('action_legacy_log') }}" formmethod="get">
    <input class="btn btn-light dropdown-item{% block nav_logs_rt %}{% endblock %}" type="submit" value="{{ _('Real time log') }}"
           form="scopesForm" formaction="{{ url_for('action_legacy_rt_log') }}" formmethod="get" formtarget="_blank">
    </div>
  </div>
{% endif %}
  {% if btn_back %}
    <button class="btn btn-danger ml-3" type="button" id="backButton" onclick="history.back()">
      {{ _("Back") }}
    </button>
  {% endif %}
{% endblock %}

{% block content %}
  {{ macros.selected_clients() }}
{% endblock %}