summaryrefslogtreecommitdiff
path: root/horizon/templates/horizon/jasmine/jasmine_legacy.html
blob: a3a92c601a8ee2410326ff28d69a43b8b596ae9d (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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
{% extends "horizon/jasmine/jasmine.html" %}

{% block source %}
<!-- Instead include all "horizon/_scripts.html" -->
  {% include "horizon/_script_i18n.html" %}

  <script src="{{ STATIC_URL }}bootstrap/js/bootstrap.js"></script>
  <script src="{{ STATIC_URL }}horizon/lib/jquery/jquery.tablesorter.js"></script>
  <script src="{{ STATIC_URL }}horizon/lib/hogan.js"></script>
  <script src='{{ STATIC_URL }}horizon/lib/jsencrypt/jsencrypt.js'></script>
  <script src="{{ STATIC_URL }}horizon/js/horizon.templates.js"></script>
  <script src="{{ STATIC_URL }}horizon/js/horizon.instances.js"></script>
  <script src='{{ STATIC_URL }}horizon/js/horizon.tabs.js'></script>
  <script src='{{ STATIC_URL }}horizon/js/horizon.forms.js'></script>
  <script src='{{ STATIC_URL }}horizon/js/horizon.formset_table.js'></script>
  <script src='{{ STATIC_URL }}horizon/js/horizon.messages.js'></script>
  <script src='{{ STATIC_URL }}horizon/js/horizon.modals.js'></script>
  <script src='{{ STATIC_URL }}horizon/js/horizon.tables.js'></script>
  <script src='{{ STATIC_URL }}horizon/js/horizon.quota.js'></script>
  <script src='{{ STATIC_URL }}horizon/js/horizon.string.js'></script>

  {% include "horizon/client_side/templates.html" %}

  <script>
    // Call init on DOM ready.
    $(document).ready(horizon.init);
  </script>
  <!-- The end -->
{% endblock %}

{% block spec %}
  <!-- test files -->
  <script type="text/javascript" src="{{ STATIC_URL }}horizon/tests/jasmine/modals.legacy-spec.js"></script>
  <script type="text/javascript" src="{{ STATIC_URL }}horizon/tests/jasmine/templates.legacy-spec.js"></script>
  <script type="text/javascript" src="{{ STATIC_URL }}horizon/tests/jasmine/tables.legacy-spec.js"></script>
  <script type="text/javascript" src="{{ STATIC_URL }}horizon/tests/jasmine/instances.legacy-spec.js"></script>
  <script type="text/javascript" src="{{ STATIC_URL }}horizon/tests/jasmine/messages.legacy-spec.js"></script>
  <script type="text/javascript" src="{{ STATIC_URL }}horizon/tests/jasmine/quota.legacy-spec.js"></script>
  <script type="text/javascript" src="{{ STATIC_URL }}horizon/tests/jasmine/string.legacy-spec.js"></script>
{% endblock %}

{% block content %}
    <div id="jasmine-fixture">
      <!-- Test markup; will be hidden. -->
      <div id="main_content">
        <div class="messages"></div>
        <div id="modal_wrapper"></div>
      </div>

      <table id="table1" class="datatable">
        <tbody>
          <tr><td>cat1</td></tr>
          <tr><td>dog1</td></tr>
          <tr><td>cat2</td></tr>
          <tr><td>dog2</td></tr>
        </tbody>
        <tfoot>
          <tr>
            <td colspan="1">
              <span class="table_count">Displaying 4 items</span>
            </td>
          </tr>
        </tfoot>
      </table>

      <table id="table2" class="datatable">
        <thead><tr><th><div class="table_filter" data-toggle="buttons-radio">
          <button name="cats" type="submit" value="cats" id="button_cats">Cats</button>
          <button name="dogs" type="submit" value="dogs" id="button_dogs">Dogs</button>
          <button name="big" type="submit" value="big" id="button_big">Big Animals</button>
        </div></th></tr></thead>
        <tbody>
          <tr class="category-cat"><td>cat1</td></tr>
          <tr class="category-big category-dog"  style="display: none"><td>dog1</td></tr>
          <tr class="category-big category-cat"  style="display: none"><td>cat2</td></tr>
          <tr class="category-dog"  style="display: none"><td>dog2</td></tr>
        </tbody>
        <tfoot>
          <tr>
            <td colspan="1">
              <span class="table_count">Displaying 4 items</span>
            </td>
          </tr>
        </tfoot>
      </table>

      <div id="formset" class="table_wrapper">
          <input id="id_flavors-TOTAL_FORMS" name="flavors-TOTAL_FORMS"
          type="hidden" value="3"><input id="id_flavors-INITIAL_FORMS"
          name="flavors-INITIAL_FORMS" type="hidden" value="2"><input id=
          "id_flavors-MAX_NUM_FORMS" name="flavors-MAX_NUM_FORMS" type=
          "hidden" value="1000">

          <table id="flavors" class=
          "table table-bordered table-striped datatable">
            <thead>
              <tr class='table_caption'>
                <th class='table_header' colspan='8'>
                  <h3 class='table_title'>Flavors</h3>

                  <div class="table_actions clearfix"></div>
                </th>
              </tr>

              <tr>
                <th class="sortable normal_column"><span class=
                "required">Flavor Name</span></th>

                <th class="sortable normal_column"><span class=
                "required">VCPU</span></th>

                <th class="sortable normal_column"><span class=
                "required">RAM (MB)</span></th>

                <th class="sortable normal_column"><span class=
                "required">Root Disk (GB)</span></th>

                <th class="sortable normal_column"><span>Ephemeral Disk
                (GB)</span></th>

                <th class="sortable normal_column"><span>Swap Disk
                (MB)</span></th>

                <th class="sortable normal_column"><span>Max.
                VMs</span></th>

                <th class="sortable normal_column">
                <span>Delete</span></th>
              </tr>
            </thead>

            <tbody>
              <tr class="" data-display="yyy.1" id="flavors__row__14">
                <td class="sortable normal_column"><input class=
                "input input-small" id="id_flavors-0-name" maxlength="25"
                name="flavors-0-name" type="text" value="1"> <input id=
                "id_flavors-0-id" name="flavors-0-id" type="hidden"
                value="14"></td>

                <td class="sortable normal_column"><input class=
                "input number_input_slim" id="id_flavors-0-cpu" name=
                "flavors-0-cpu" type="number" value="1"></td>

                <td class="sortable normal_column"><input class=
                "input number_input_slim" id="id_flavors-0-memory" name=
                "flavors-0-memory" type="number" value="1"></td>

                <td class="sortable normal_column"><input class=
                "input number_input_slim" id="id_flavors-0-storage" name=
                "flavors-0-storage" type="number" value="1"></td>

                <td class="sortable normal_column"><input class=
                "input number_input_slim" id=
                "id_flavors-0-ephemeral_disk" name=
                "flavors-0-ephemeral_disk" type="number"></td>

                <td class="sortable normal_column"><input class=
                "input number_input_slim" id="id_flavors-0-swap_disk"
                name="flavors-0-swap_disk" type="number"></td>

                <td class="sortable normal_column">-</td>

                <td class="sortable normal_column"><input id=
                "id_flavors-0-DELETE" name="flavors-0-DELETE" type=
                "checkbox"></td>
              </tr>

              <tr class="" data-display="yyy.2" id="flavors__row__15">
                <td class="sortable normal_column"><input class=
                "input input-small" id="id_flavors-1-name" maxlength="25"
                name="flavors-1-name" type="text" value="2"> <input id=
                "id_flavors-1-id" name="flavors-1-id" type="hidden"
                value="15"></td>

                <td class="sortable normal_column"><input class=
                "input number_input_slim" id="id_flavors-1-cpu" name=
                "flavors-1-cpu" type="number" value="2"></td>

                <td class="sortable normal_column"><input class=
                "input number_input_slim" id="id_flavors-1-memory" name=
                "flavors-1-memory" type="number" value="2"></td>

                <td class="sortable normal_column"><input class=
                "input number_input_slim" id="id_flavors-1-storage" name=
                "flavors-1-storage" type="number" value="2"></td>

                <td class="sortable normal_column"><input class=
                "input number_input_slim" id=
                "id_flavors-1-ephemeral_disk" name=
                "flavors-1-ephemeral_disk" type="number"></td>

                <td class="sortable normal_column"><input class=
                "input number_input_slim" id="id_flavors-1-swap_disk"
                name="flavors-1-swap_disk" type="number"></td>

                <td class="sortable normal_column">-</td>

                <td class="sortable normal_column"><input id=
                "id_flavors-1-DELETE" name="flavors-1-DELETE" type=
                "checkbox"></td>
              </tr>

              <tr class="current_selected">
                <td class="sortable normal_column"><input class=
                "input input-small" id="id_flavors-2-name" maxlength="25"
                name="flavors-2-name" type="text"> <input id=
                "id_flavors-2-id" name="flavors-2-id" type="hidden"></td>

                <td class="sortable normal_column"><input class=
                "input number_input_slim" id="id_flavors-2-cpu" name=
                "flavors-2-cpu" type="number"></td>

                <td class="sortable normal_column"><input class=
                "input number_input_slim" id="id_flavors-2-memory" name=
                "flavors-2-memory" type="number"></td>

                <td class="sortable normal_column"><input class=
                "input number_input_slim" id="id_flavors-2-storage" name=
                "flavors-2-storage" type="number"></td>

                <td class="sortable normal_column"><input class=
                "input number_input_slim" id=
                "id_flavors-2-ephemeral_disk" name=
                "flavors-2-ephemeral_disk" type="number"></td>

                <td class="sortable normal_column"><input class=
                "input number_input_slim" id="id_flavors-2-swap_disk"
                name="flavors-2-swap_disk" type="number"></td>

                <td class="sortable normal_column">-</td>

                <td class="sortable normal_column"><input id=
                "id_flavors-2-DELETE" name="flavors-2-DELETE" type=
                "checkbox"></td>
              </tr>
            </tbody>

            <tfoot>
              <tr>
                <td colspan="8"><span class="table_count">Displaying 3
                items</span></td>
              </tr>
            </tfoot>
          </table>
       </div>
    </div>
{% endblock %}