Statistics
| Branch: | Tag: | Revision:

root / snf-cyclades-app / synnefo / ui / templates / home.html @ 7237e429

History | View | Annotate | Download (33.9 kB)

1
<!doctype html>
2
<html>
3

    
4
{% load i18n %}
5
<head>
6
    <title>{{ BRANDING_SERVICE_NAME }}</title>
7
    
8
    <!--<meta http-equiv="X-UA-Compatible" content="IE=7">-->
9
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
10

    
11
    <link href="https://fonts.googleapis.com/css?family=Ubuntu&subset=latin,greek" rel="stylesheet" type="text/css" >
12
    <link href='https://fonts.googleapis.com/css?family=Open+Sans&subset=latin,greek' rel='stylesheet' type='text/css'>
13

    
14
    <link rel="shortcut icon" href="{{ BRANDING_FAVICON_URL }}" />
15

    
16
    {% comment %}
17
    <script type="text/javascript" src="{% url javascript_catalog %}"></script> 
18
    {% endcomment %}
19

    
20
    <link rel="stylesheet" type="text/css" 
21
          href="{{ SYNNEFO_CSS_URL }}main.css?v={{ SYNNEFO_JS_LIB_VERSION }}"/>
22

    
23
    <!--[if IE]>
24
        <style type="text/css" media="all">@import url({{ SYNNEFO_CSS_URL }}ie.css?v={{ SYNNEFO_JS_LIB_VERSION }});</style>
25
    <![endif]-->
26
    <!--[if (lte IE 8)]>
27
        <style type="text/css" media="all">@import url({{ SYNNEFO_CSS_URL }}ie8.css?v={{ SYNNEFO_JS_LIB_VERSION }});</style>
28
    <![endif]-->
29
    <!--[if (lte IE 7)]>
30
        <style type="text/css" media="all">@import url({{ SYNNEFO_CSS_URL }}ie7.css?v={{ SYNNEFO_JS_LIB_VERSION }});</style>
31
    <![endif]-->
32

    
33
    <script src="{{ SYNNEFO_JS_LIB_URL}}jquery-1.7.2.js"></script>
34
    <script src="{{ SYNNEFO_JS_LIB_URL}}jquery.cookie.js"></script>
35
    <script src="{{ SYNNEFO_JS_LIB_URL}}jquery.client.js"></script>
36
    <script src="{{ SYNNEFO_JS_LIB_URL}}jquery.tools.min.js"></script>
37
    <script src="{{ SYNNEFO_JS_LIB_URL}}jquery.dataTables.min.js"></script>
38
    <script src="{{ SYNNEFO_JS_LIB_URL}}jquery.pagination.js"></script>
39
    <script src="{{ SYNNEFO_JS_LIB_URL}}jquery.zclip.js"></script>
40
    <script src="{{ SYNNEFO_JS_LIB_URL}}jquery.base64.js"></script>
41
    <script src="{{ SYNNEFO_JS_LIB_URL}}rivets.js"></script>
42
    <script src="{{ SYNNEFO_JS_LIB_URL}}filereader.js"></script>
43
    <script src="{{ SYNNEFO_JS_LIB_URL}}filesaver.js"></script>
44

    
45

    
46
    <script src="{{ SYNNEFO_JS_LIB_URL}}underscore.js?v={{ SYNNEFO_JS_LIB_VERSION }}"></script>
47
    <script src="{{ SYNNEFO_JS_LIB_URL}}underscore.string.js?v={{ SYNNEFO_JS_LIB_VERSION }}"></script>
48
    <script src="{{ SYNNEFO_JS_LIB_URL}}rivets.conf.js"></script>
49
    <script src="{{ SYNNEFO_JS_LIB_URL}}backbone.js?v={{ SYNNEFO_JS_LIB_VERSION }}"></script>
50
    <script src="{{ SYNNEFO_JS_LIB_URL}}json2.js?v={{ SYNNEFO_JS_LIB_VERSION }}"></script>
51
    <script src="{{ SYNNEFO_JS_LIB_URL}}stacktrace.js?v={{ SYNNEFO_JS_LIB_VERSION }}"></script>
52
    <script src="{{ SYNNEFO_JS_LIB_URL}}backbone-filtered-collection.js?v={{ SYNNEFO_JS_LIB_VERSION }}"></script>
53

    
54
    <!--[if (lt IE 7)]>
55
        <script src="{{ SYNNEFO_JS_LIB_URL }}selectivizr.js?v={{ SYNNEFO_JS_LIB_VERSION }}"></script>
56
    <! [endif] -->
57

    
58
    <!--[if IE]>
59
        <script src="{{ SYNNEFO_JS_URL }}ui/ie_fixes.js?v={{ SYNNEFO_JS_LIB_VERSION }}"></script>
60
    <![endif]-->
61
    
62
    <script src="{{ SYNNEFO_JS_URL }}utils.js?v={{ SYNNEFO_JS_LIB_VERSION }}"></script>
63
    <script src="{{ SYNNEFO_JS_URL }}auth.js?v={{ SYNNEFO_JS_LIB_VERSION }}"></script>
64
    <script src="{{ SYNNEFO_JS_URL }}quota.js?v={{ SYNNEFO_JS_LIB_VERSION }}"></script>
65
    <script src="{{ SYNNEFO_JS_URL }}sync.js?v={{ SYNNEFO_JS_LIB_VERSION }}"></script>
66
    <script src="{{ SYNNEFO_JS_URL }}models.js?v={{ SYNNEFO_JS_LIB_VERSION }}"></script>
67
    <script src="{{ SYNNEFO_JS_URL }}neutron.js?v={{ SYNNEFO_JS_LIB_VERSION }}"></script>
68
    <script src="{{ SYNNEFO_JS_URL }}glance_models.js?v={{ SYNNEFO_JS_LIB_VERSION }}"></script>
69
    <script src="{{ SYNNEFO_JS_URL }}views.js?v={{ SYNNEFO_JS_LIB_VERSION }}"></script>
70
    <script src="{{ SYNNEFO_JS_URL }}views_ext.js?v={{ SYNNEFO_JS_LIB_VERSION }}"></script>
71

    
72
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_vms_base_view.js?v={{ SYNNEFO_JS_LIB_VERSION }}"></script>
73
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_model_views.js?v={{ SYNNEFO_JS_LIB_VERSION }}"></script>
74
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_error_view.js?v={{ SYNNEFO_JS_LIB_VERSION }}"></script>
75
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_icon_view.js?v={{ SYNNEFO_JS_LIB_VERSION }}"></script>
76
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_single_view.js?v={{ SYNNEFO_JS_LIB_VERSION }}"></script>
77
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_list_view.js?v={{ SYNNEFO_JS_LIB_VERSION }}"></script>
78
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_networks_view.js?v={{ SYNNEFO_JS_LIB_VERSION }}"></script>
79
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_public_keys_view.js?v={{ SYNNEFO_JS_LIB_VERSION }}"></script>
80
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_disks_view.js?v={{ SYNNEFO_JS_LIB_VERSION }}"></script>
81
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_ips_view.js?v={{ SYNNEFO_JS_LIB_VERSION }}"></script>
82
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_metadata_view.js?v={{ SYNNEFO_JS_LIB_VERSION }}"></script>
83
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_feedback_view.js?v={{ SYNNEFO_JS_LIB_VERSION }}"></script>
84
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_create_view.js?v={{ SYNNEFO_JS_LIB_VERSION }}"></script>
85
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_connect_view.js?v={{ SYNNEFO_JS_LIB_VERSION }}"></script>
86
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_vm_resize_view.js?v={{ SYNNEFO_JS_LIB_VERSION }}"></script>
87
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_public_keys_view.js?v={{ SYNNEFO_JS_LIB_VERSION }}"></script>
88
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_custom_images.js?v={{ SYNNEFO_JS_LIB_VERSION }}"></script>
89

    
90
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_router.js?v={{ SYNNEFO_JS_LIB_VERSION }}"></script>
91
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_main_view.js?v={{ SYNNEFO_JS_LIB_VERSION }}"></script>
92

    
93
    <!-- the following views require refactor -->
94
    <script src="{{ SYNNEFO_JS_URL }}synnefo.js?v={{ SYNNEFO_JS_LIB_VERSION }}"></script>
95
    <script>
96
        tmp_auth_client = new synnefo.auth.AstakosClient({
97
            cookie_name: '{{ auth_cookie_name }}',
98
            login_url: {{ login_redirect|safe }}
99
        });
100
        if (!tmp_auth_client.get_token()) { tmp_auth_client.redirect_to_login(); }
101
    </script>
102
    {{ CLOUDBAR_CODE }}
103
    
104
    <script>
105
        // empty object for console to avoid errors in browsers that don't support it
106
        if (!window.console) {window.console = {}; window.console.log = window.console.info = window.console.debug =
107
            window.console.error = function() {}};
108
        
109
        //populate available image icons array
110
        var os_icons = {{image_icons|safe}};
111
        
112
        // timeout value from settings.py
113
        var TIMEOUT = {{ timeout }};
114
        var TIMEOUTS_OCCURED = 0;
115
        var SKIP_TIMEOUTS = {{ skip_timeouts }};
116
        var UPDATE_INTERVAL = {{ update_interval }};
117
        var APP_DEBUG = {% if DEBUG %}true{% else %}false{% endif %};
118
        var API_OVERLAY_TITLE = "{% trans "API access" %}";
119
        var API_OVERLAY_SUBCONTENT = "{% blocktrans %}The API key provides full access to your <em>{{ BRANDING_SERVICE_NAME}}</em> account, so always keep it private.{% endblocktrans %}";
120

121
        STATE_TEXTS = {
122
            'UNKNOWN': '{% trans "Unknown" %}',
123
            'BUILD':  '{% trans "Building..." %}',
124
            'FIREWALL':  '{% trans "Firewall change..." %}',
125
            'REBOOT': '{% trans "Rebooting..." %}',
126
            'STOPPED':'{% trans "Stopped" %}',
127
            'ACTIVE': '{% trans "Running" %}',
128
            'ERROR':  '{% trans "Error" %}',
129
            'DELETE': '',
130
            'DESTROY': '{% trans "Destroying..." %}',
131
            'SHUTDOWN': '{% trans "Shutting down..." %}',
132
            'START': '{% trans "Starting..." %}',
133
            'CONNECT': '{% trans "Connecting..." %}',
134
            'DISCONNECT': '{% trans "Disconnecting..." %}',
135
            'RESIZE': '{% trans "Resizing..." %}'
136
        }
137

138

139

140
        // building statuses
141
        var BUILDING_MESSAGES = {
142
            'INIT': '{% trans "Initializing..." %}',
143
            'COPY': '{% trans "{0} of {1} ({2}%)" %}',
144
            'FINAL': '{% trans "Bulding image..." %}'
145
        }
146

147
        var ERROR_OVERRIDES = {
148
            // error message header
149
            'HEADER' : '{% trans "Error" %}',
150
            // default
151
            'DEFAULT' : '{% trans "Could not contact the service. Please check your network connectivity and try again." %}',
152
            // bad request
153
            '400' : '{% trans "Malformed request." %}',
154
            // not found
155
            '404' : '{% trans "Your request has failed. Resource not found." %}',
156
            // internal server error
157
            '500' : '{% trans "There has been an Internal Error. Our administrators have been notified." %}',
158
            // service unavailable
159
            '501' : '{% trans "This server has not been implemented yet." %}',
160
            // service unavailable
161
            '502' : '{% trans "Bad Gateway error." %}',
162
            // service unavailable
163
            '503' : '{% trans "This service is unavailable right now, please try again later." %}',
164
            // no server handshake
165
            '0' : '{% trans "Could not contact the server." %}',
166
            // no images found
167
            '-212' : '{% trans "Cannot show the Create machine wizard: No images found." %}',
168
            // no flavors found
169
            '-213' : '{% trans "Cannot show the Create machine wizard: No machine configurations found." %}',
170
            // error box title
171
            'GENERIC_POPUP_HEADER' : '{% trans "Something seems to have gone wrong :( Here is what happened:" %}',
172
            // no advanced details
173
            'NO_DETAILS' : '{% trans "Νο advanced details provided" %}',
174
            // timeout message
175
            'TIMEOUT' : '{% trans "It seems the server takes too long to respond, please check your network connectivity" %}'
176
        };
177

178
        var SUGGESTED_FLAVORS = {{ suggested_flavors|safe }};
179
        var SUGGESTED_ROLES = {{ suggested_roles|safe }}
180

181
        var SUCCESS = {
182
            'HEADER' : '{% trans "Success" %}',
183
            'DEFAULT' : '{% trans "Your request has been succefully executed." %}',
184
            'PASSWORD' : '{% trans "Password:" %}',
185
            'CREATE_VM_SUCCESS' : '{% trans "Success" %}',
186
            'CREATE_VM_SUCCESS_ONE' : '{% trans "Your new machine is now buidling... (this might take a few minutes)" %}',
187
            'CREATE_VM_SUCCESS_TWO' : '{% trans "Write down your password now:" %}',
188
            'CREATE_VM_SUCCESS_THREE' : '{% trans "You will need this later to connect to your machine." %}',
189
            'CREATE_VM_SUCCESS_FOUR' : '{% trans "After closing this window you will NOT be able to retrieve it again." %}'
190
        };
191

192
        var VARIOUS = {
193
            'CONFIRM' : '{% trans "Confirm" %}',
194
            'CANCEL' : '{% trans "Cancel" %}',
195
            'APPLY' : '{% trans "Apply" %}',
196
            'OFF' : '{% trans "Off" %}',
197
            'ON' : '{% trans "On" %}'
198
        };
199

    
200
    </script>
201
</head>
202

    
203
<body id="app">
204
    <div id="container">
205
        <div id="header">
206
            <div id="user">
207
                <div class="usermenu">
208
                    <div class="username"></div>
209
                    <ul class="useractions">
210
                        <!--<li class="feedback"><a class="action" href="#">{% trans "send feedback..." %}</a></li>-->
211
                        <li class="api"><a class="action" href="#">{% trans "API access..." %}</a></li>
212
                        <li class="public_ips"><a class="action" href="#">{% trans "IP addresses..." %}</a></li>
213
                        <li class="public_keys"><a class="action" href="#">{% trans "ssh public keys..." %}</a></li>
214
                        <!--<li class="custom_images"><a class="action" href="#">{% trans "custom images..." %}</a></li>-->
215
                        <!--<li class="logout last"><a class="action" href="#">{% trans "logout" %}</a></li>-->
216
                    </ul>
217
                </div>
218
                <div class="langmenu">
219
                    <a class="current_lang">en</a>
220
                    {% comment %}
221
                {% get_available_languages as LANGUAGES %}
222
                {% for lang in LANGUAGES %}
223
                <a {% if  == lang.0 %}
224
                    class="current_lang" {% else %}  href="/lang/?l={{lang.0}}" {% endif %}>{{lang.0}}</a>
225

    
226
                    {% if not forloop.last %}<span class="sep">~</span>{% endif %}
227
                    {% endfor %}
228
                {% endcomment %}
229
                </div>
230
            </div>
231
            <div class="header-logo">
232
                <a href="/" title="{{ BRANDING_SERVICE_NAME }} Compute">
233
                     <img src="{{ BRANDING_COMPUTE_LOGO_URL }}" alt="{{ BRANDING_SERVICE_NAME }}"/>  
234
                </a>
235
            </div>
236
        </div>
237
        <div id="content">
238
            <div id="wrapper" class="clearfix">
239

    
240
                <div class="panes-menu clearfix">
241
                <!-- tabs -->
242
                <div class="tab-name">{% trans "machines" %}</div>
243
                <ul class="css-tabs">
244
                    <li><a href="machines" title="{% trans "manage  virtual " %}"
245
                        data-hover-title="machines" class="primary" id="machines_view_link">
246
                        <img src="{{ SYNNEFO_IMAGES_URL }}machines-icon.png" /></a></li>
247
                    <li><a href="networks" title="{% trans "configure " %}"
248
                        data-hover-title="networks" class="primary" id="networks_view_link">
249
                        <img src="{{ SYNNEFO_IMAGES_URL }}networks-icon.png" /></a></li>
250
                    <li><a href="ips" title="{% trans "manage  IP " %}"
251
                        data-hover-title="ips" class="primary" id="ips_view_link">
252
                        <img src="{{ SYNNEFO_IMAGES_URL }}disks-icon.png" /></a></li>
253
                    <li><a href="public-keys" title="{% trans "manage  public " %}"
254
                        data-hover-title="public keys" class="primary" id="public_keys_view_link">
255
                        <img src="{{ SYNNEFO_IMAGES_URL }}machines-icon.png" /></a></li>
256
                </ul>
257
                </div>
258
                <div class="css-panes">
259
                    <div id="machines-pane" class="pane" style="display:block;">
260
                        {% include "partials/machines.html" %}
261
                    </div>
262
                    <div id="networks-pane" class="pane-view">
263
                        {% include "partials/networks.html" %}
264
                    </div>
265
                    <div id="disks-pane" class="pane">
266
                            {% include "partials/disks.html" %}
267
                    </div>
268
                    <div id="ips-pane" class="pane-view">
269
                            {% include "partials/ips.html" %}
270
                    </div>
271
                    <div id="public-keys-pane" class="pane-view">
272
                            {% include "partials/public_keys.html" %}
273
                    </div>
274

    
275
                    <div class="confirm_multiple clearfix" id="multiple_actions_container">
276
                        <div class="confirm_multiple_actions confirm-all-cont global hidden confirm_multiple_cont clearfix">
277
                            <div class="confirm-all msg">
278
                                <p>You requested multiple actions to execute (<span class="show">show all</span>)</p>
279
                                <button class="yes">Confirm all</button>
280
                                <button class="no">Cancel all</button>
281
                            </div>
282
                            <div class="details"></div>
283
                        </div>
284
                        <div class="ns-confirms-cont">
285
                            <div class="confirm_multiple_actions hidden confirm_multiple_cont
286
                                ns-confirm clearfix"
287
                                id="conirm_multiple_cont_template">
288
                                <div class="confirm-all msg">
289
                                    <p></p>
290
                                    <button class="yes"></button>
291
                                    <button class="no"></button>
292
                                </div>
293
                                <div class="details"></div>
294
                            </div>
295
                        </div>
296
                    </div>
297

    
298
                </div>
299
            </div>
300
        </div>
301
    </div>
302

    
303
    <!-- activate tabs with JavaScript -->
304
    <script>
305

306
        //load opera css fixes
307
        if ($.browser.opera) {
308
            $("<link/>", {
309
               rel: "stylesheet",
310
               type: "text/css",
311
               href: "{{ SYNNEFO_CSS_URL }}opera.css?v={{ SYNNEFO_JS_LIB_VERSION }}"
312
            }).appendTo("head");
313
        }
314

315
        $(document).ready(function(){
316

317
            {% if current_lang == "el" and not DEBUG %}
318
                window.location = "/lang/?l=en";
319
            {% endif %}
320

321
            // user menu interaction
322
            var resetUserMenu = function() {
323
                $(this).removeClass("hovered");
324
                $(this).removeClass("active");
325
            }
326

327
            $(".usermenu").live("click", function(){
328
                $(this).addClass("active");
329
            });
330
            $(".usermenu").bind('mouseleave', resetUserMenu);
331
            $(".usermenu").live("mouseover", function(){
332
                $(this).addClass("hovered");
333
            });
334

335
            $(".usermenu li").mouseenter(function(){$(this).addClass("hovered")})
336
            $(".usermenu li").mouseleave(function(){$(this).removeClass("hovered")});
337

338
            // bind menu actions
339
            $(".usermenu .logout").click(function() {
340
                synnefo.auth_client.logout();
341
            });
342

343
            $(".usermenu .api").click(function(){
344
                synnefo.ui.main.api_info_view.show();
345
            });
346

347
        });
348
        
349
        function positionBottomMessages() {
350
            var el = $("#multiple_actions_container");
351
        }
352
        
353
        
354
        $(document).ready(function() {
355
          // Footer position handlers
356
          var footerHeight = 0;
357
          var footerTop = 0;
358
          var $footer = $("#footer-container");
359
          function _positionFooter() {
360

361
              footerHeight = 80;
362
              footerTop = ($(window).scrollTop()+$(window).height()-footerHeight)+"px";
363
              if (($(document.body).height()+footerHeight) < $(window).height()) {
364

365
                  $footer.css({
366
                       position: "absolute"
367
                  }).css({
368
                       top: footerTop
369
                  })
370
               } else {
371
               
372
                  if ($footer.css("position") == "static") {
373
                      if ($(document.body).height() < $(window).height()) {    
374
                          $footer.css({
375
                               position: "absolute"
376
                          }).css({
377
                               top: footerTop
378
                           })
379
                       }
380
                   } else {
381

382
                      $footer.css({
383
                          position: "static"
384
                      })
385
                  }
386
              }
387

388
          }
389
          _positionFooter();
390
          window.positionFooter = _.throttle(_positionFooter, 100);
391
          window.forcePositionFooter = _positionFooter;
392
          $(window).scroll(window.positionFooter).resize(window.positionFooter)
393

394
          $(window).bind("load", function() { 
395
            _positionFooter();
396
          });
397
        
398
        })
399
    </script>
400

    
401
    <!-- base notification for error/success reporting -->
402
    <a id="notification" rel="#error-success" href="#"></a>
403
    <a id="msgbox" rel="#notification-box" href="#"></a>
404
    <a id="feedbackbox" rel="#feedback-form" href="#"></a>
405
    
406
    <!-- rename view tpl -->
407
    <div id="rename-view-tpl" class="hidden model-rename-view">
408
      <div class="model-name">
409
        <h3>
410
          <span data-rv-text="model.name" class="value"></span>
411
          <span class="edit-btn" data-rv-on-click="view.set_edit"></span>
412
        </h3>
413
      </div>
414
      <div class="edit">
415
        <input type="text" class="rename-input" />
416
        <div class="rename-actions">
417
          <div class="btn confirm" data-rv-on-click="view.rename"></div>
418
          <div class="btn cancel" data-rv-on-click="view.unset_edit"></div>
419
        </div>
420
      </div>
421
    </div>
422

    
423
    <!-- generic overlay tpl -->
424
    <div class="overlay" id="generic-overlay-tpl">
425
        <div class="overlay-inner">
426
            <h3 class="overlay-header clearfix">
427
                <span class="subtitle"></span>
428
                <span class="title"></span>
429
                <span class="closeme">close</span></h3>
430
            <div class="container">
431
                <div class="content">
432
                </div>
433
            </div>
434
            <div class="footer"></div>
435
        </div>
436
    </div>
437

    
438
    <div id="error-overlay-content" class="hidden">
439
        <div class="error-nav hidden clearfix">
440
            <span class="indicator"><span class="num">1</span> <span
441
                    class="ind-msg">new error occured</span></span>
442
            <span class="show-next nav-btn">{% trans "next" %}</span>
443
            <span class="show-prev nav-btn">{% trans "previous" %}</span>
444
        </div>
445
        <div class="message"><p></p></div>
446
        <div class="error-details">
447
            <span class="key">{% trans "Module" %}</span>
448
            <span class="value error-module"></span>
449

    
450
            <span class="key">{% trans "Code" %}</span>
451
            <span class="value error-code"></span>
452

    
453
            <span class="key">{% trans "Type" %}</span>
454
            <span class="value error-type"></span>
455

    
456
            <span class="key details">{% trans "Details" %}</span>
457
            <div class="value error-more-details"><p></p></div>
458
        </div>
459
        
460
        <!--<div class="navigation">-->
461
            <!--<span class="next-error">{% trans "next error" %}</span>-->
462
            <!--<span class="previous-error">{% trans "previous error" %}</span>-->
463
        <!--</div>-->
464
        
465
        <!--<div class="date">-->
466
            <!--<span class="error-date"></span>-->
467
        <!--</div>-->
468

    
469
        <div class="actions">
470
            <span class="show-details">{% trans "Show details" %}</span>
471
            <span class="hide-details">{% trans "Hide details" %}</span>
472
            <span class="report-error">{% trans "Send report" %}</span>
473
            <span class="reload-app">{% trans "Reload" %}</span>
474
        </div>
475
    </div>
476
    <div id="feedback-overlay-content" class="hidden overlay-content feedback-form">
477
        <div class="description">
478
            <p>
479
                {% blocktrans %}{{ BRANDING_SERVICE_NAME }} is currently in alpha test and we would appreciate any kind of feedback.
480
                We welcome any suggestions, questions and bug reports you may have.{% endblocktrans %}
481
            </p>
482
        </div>
483
        <div class="description messages noborder">
484
            <p class="success-message hidden">
485
            {% trans "thank you for submiting your feedback" %}
486
            </p>
487
            <p class="error-message hidden">
488
                {% trans "some error occured submiting submiting your feedback, please try again later" %}
489
            </p>
490
            <p class="sending-message hidden">
491
            {% blocktrans %}Sending feedback...{% endblocktrans %}
492
            </p>
493
        </div>
494
        <div class="form">
495
            <div class="form-field">
496
                <label for{% trans "Please  your  here, provide  many  as " %}</label
497
                <textarea ="feedback-message"> 
498
                </textarea>
499
            </div>
500
            <div class="form-actions clearfix noborder">
501
                <span class="form-action submit">{% trans "send feedback" %}</span>
502
            </div>
503
        </div>
504
    </div>
505
    <div class="modal" id="feedback-form" class="feedback notification-box">
506
      <h3 class="popup-header overlay-header">
507
        <span class="header-box">{% trans "Send feedback" %}</span>
508
      </h3>
509
      <div class="popup-body">
510
        <div class="popup-body-inner">
511
          <div class="form-container">
512
            <p class="feedback-intro">
513
            {% blocktrans %}Synnefo is currently in alpha test and we would appreciate any kind of feedback.
514
            We welcome any suggestions, questions and bug reports you may have.{% endblocktrans %}</p>
515
            <form id="feedback-form">
516
              <label for="feedback-msg">{% trans "Please describe your problem here, provide as many details as possible" %}</label>
517
              <div class="description"></div>
518
              <div class="empty-error-msg">{% trans "Please provide some feedback" %}</div>
519
              <textarea name="feedback-msg" class="feedback-text"></textarea>
520

    
521
              <input type="checkbox" name="submit-submit-data" class='submit-data' />
522
              <input type="submit" value="{% trans "submit " %}" class="submit" />
523
              <textarea name="feedback-data" class="data-text"></textarea>
524
            </form>
525
          </div>
526

    
527
          <div class="message sending">{% trans "submiting your data....." %}</div>
528
          <div class="message success">
529
            {% trans "thank you for submiting your feedback" %}
530
            <span class="close-msg-box"> {% trans "close feedback" %}</span></div>
531
          <div class="message errormsg">
532
            {% trans "some error occured submiting submiting your feedback, please try again later" %}
533
            <span class="close-msg-box"> {% trans "close feedback" %}</span></div>
534
        </div>
535
      </div>
536
    </div>
537
    
538
    <div id="details-overlay" class="overlay-content overlay-info hidden">
539
        <div class="description intro">
540
            <p></p>
541
        </div>
542
        <div class="description subinfo">
543
            <p></p>
544
        </div>
545
    </div>
546

    
547
    <div id="suspended-vm-overlay" class="overlay-content overlay-info hidden">
548
        <div class="description noborder">
549
          You VM has been suspended, please contact us for more details.
550
        </div>
551
    </div>
552

    
553
    <div id="api-info-overlay" class="overlay-content overlay-info hidden">
554
        <div class="description">
555
            <p>{% blocktrans with EXTERNAL_CLIENT_URL as EXTERNAL_CLIENT_URL %}Use the following API key along with the <a
556
                href="{{ EXTERNAL_CLIENT_URL }}">./kamaki</a> client to manage
557
            your cloud resources from outside this page.{% endblocktrans %}</p>
558
        </div>
559
        <div class="copy-content">
560
            <p></p>
561
        </div>
562
        <div class="description subinfo">
563
            <p>
564
            {% blocktrans %} The API key provides full access to your <em>{{ BRANDING_SERVICE_NAME }}</em> account, so always keep it private.{% endblocktrans %}
565
            </p>
566
        </div>
567
    </div>
568

    
569
    <div class="api_overlay_template">
570
        <div class="api_overlay_content">
571
            <p>Use the following API key along with the <a href="{{ EXTERNAL_CLIENT_URL }}">./kamaki</a> client to manage your cloud resources from outside this page.</p>
572
        </div>
573
    </div>
574

    
575
    <div class="modal" id="notification-box" class="notification-box">
576
        <h3 class="popup-header">
577
            <span class="header-box"></span>
578
        </h3>
579
        <div class="popup-body">
580
            <div class="popup-body-inner">
581
                <div class="machine-now-building"></div>
582
                <div class="popup-separator"></div>
583
                <div class="password-container">
584
                    <div class="password"></div>
585
                </div>
586
                <div class="sub-text"></div>
587
            </div>
588
        </div>
589
    </div>
590
    
591
    <div id="loading-view" class="hidden clearfix">
592
        <div class="header clearfix images off">Loading images...<span></span></div>
593
        <div class="header clearfix flavors off">Loading flavors...<span></span></div>
594
        <div class="header clearfix resources off">Loading resources...<span></span></div>
595
        <div class="header clearfix quotas off">Loading quotas...<span></span></div>
596
        <div class="header clearfix vms off">Loading machines...<span></span></div>
597
        <div class="header clearfix networks off">Loading networks...<span></span></div>
598
        <div class="header clearfix layout off">Rendering layout...<span></span></div>
599
    </div>
600
    <div id="user_custom_images" class="overlay-content overlay-content hidden">
601
        {% include "partials/custom_images.html" %}
602
    </div>
603
    {% include "partials/vm_resize.html" %}
604
    {% include "footer.html" %}
605

    
606
    <script>
607
        $(document).ready(function() {
608
            $(".css-panes").hide();
609

610
            // TODO: match <= 1.9.1
611
            if ($.browser.mozilla && $.browser.version.substr(0,3) == "1.9") {
612
                synnefo.config.overlay_speed = 0;
613
                $.fx.off = true;
614
            }
615
            
616
            // synnefo js config
617
            synnefo.VERSION = "{{ synnefo_version }}";
618
            synnefo.config.update_interval = {{ update_interval }};
619
            synnefo.config.update_interval_increase = {{ update_interval_increase }};
620
            synnefo.config.fast_interval = {{ update_interval_fast }};
621
            synnefo.config.update_interval_increase_after_calls = {{ update_interval_increase_after_calls }};
622
            synnefo.config.update_interval_max = {{ update_interval_max }};
623
            synnefo.config.delay_on_blur = {{ delay_on_blur }};
624
            synnefo.config.update_hidden_views = {{ update_hidden_views }};
625
            synnefo.config.handle_window_exceptions = {{ handle_window_exceptions }};
626
            synnefo.config.ajax_timeout = {{ timeout }};
627
            synnefo.config.skip_timeouts = {{ skip_timeouts }};
628
            synnefo.config.machines_icons_url = '{{ SYNNEFO_IMAGES_URL }}icons/machines/';
629
            synnefo.config.vm_name_template = {{ vm_name_template|safe }};
630
            synnefo.config.flavors_disk_templates_info = {{ flavors_disk_templates_info|safe }};
631
            synnefo.config.vm_image_common_metadata = {{ vm_image_common_metadata|safe }};
632
            synnefo.config.private_networks_nic_hotplug = {{ private_networks_nic_hotplug|safe }};
633

634
            synnefo.config.diagnostics_update_interval = {{ diagnostics_update_interval }};
635
            // override diagnostic messages display
636
            synnefo.config.diagnostic_messages_tpls = {
637
              'image-helper-task-start': "{% trans "Running task 'MESSAGE'" %}"
638
            };
639
            // what messages to display based on vm status
640
            synnefo.config.diagnostics_status_messages_map = {
641
                'BUILD': ['image-helper-task-start', 'image-info'],
642
                'ERROR': ['image-error']
643
            };
644

645
            synnefo.config.api_urls = {
646
                'userdata': '{% url ui_userdata %}', 
647
                'compute':  {{ compute_api_url|safe }}, 
648
                'glance': {{ glance_api_url|safe }},
649
                'accounts': {{ accounts_api_url|safe }},
650
            };
651
            
652
            // TODO: configurable userdata urls in models.js
653
            synnefo.config.userdata_keys_url = '{% url ui_keys_collection %}';
654
            synnefo.config.userdata_keys_limit = {{ userdata_keys_limit }};
655
            
656
            // media config
657
            synnefo.config.media_url = '{{ UI_MEDIA_URL }}';
658
            synnefo.config.js_url = '{{ SYNNEFO_JS_URL }}';
659
            synnefo.config.images_url = '{{ SYNNEFO_IMAGES_URL }}';
660
            synnefo.config.image_deleted_title = {{ image_deleted_title|safe }};
661
            synnefo.config.changes_since_alignment = {{ changes_since_alignment }};
662
            synnefo.config.image_deleted_size_title = {{ image_deleted_size_title|safe }};
663
            synnefo.config.use_glance = {{ use_glance }};
664
            synnefo.config.indicators_icons_url = '{{ SYNNEFO_IMAGES_URL }}icons/indicators/';
665
            synnefo.config.machines_icons_url = '{{ SYNNEFO_IMAGES_URL }}icons/machines/';
666
            synnefo.config.ui_console_url = '{% url ui_machines_console %}';
667
            synnefo.config.ui_connect_url = '{% url ui_machines_connect %}';
668
            synnefo.config.support_ssh_os_list = {{ support_ssh_os_list|safe }};
669
            synnefo.config.unknown_os = {{ unknown_os|safe }};
670
            synnefo.config.os_created_users = {{ os_created_users|safe }};
671
            synnefo.config.feedback_post_url = {{ feedback_post_url|safe }};
672
            
673
            synnefo.config.logout_redirect = {{ logout_redirect|safe }};
674
            synnefo.config.login_redirect = {{ login_redirect|safe }};
675
            synnefo.config.auth_cookie_name = '{{ auth_cookie_name }}';
676

677
            synnefo.config.translate_uuids = {{ translate_uuids|safe }};
678
            synnefo.config.user_catalog_url = {{ user_catalog_url|safe }};
679

680
            synnefo.config.network_suggested_subnets = {{ network_suggested_subnets|safe }};
681
            synnefo.config.network_available_types = {{ network_available_types|safe }};
682
            synnefo.config.network_allow_duplicate_vm_nics = {{ network_allow_duplicate_vm_nics }};
683
            synnefo.config.network_strict_destroy = {{ network_strict_destroy }};
684
            synnefo.config.network_allow_multiple_destory = {{ network_allow_multiple_destroy }};
685
            synnefo.config.group_public_networks = {{ group_public_networks }};
686
            synnefo.config.grouped_public_network_name = {{ grouped_public_network_name|safe }};
687
            synnefo.config.vm_hostname_format = {{ vm_hostname_format|safe }};
688
            synnefo.config.automatic_network_range_format = {{ automatic_network_range_format|safe }};
689
            synnefo.config.custom_image_help_url = '{{ custom_image_help_url|safe }}';
690
            
691
            synnefo.auth_client = new synnefo.auth.AstakosClient({
692
                login_url: synnefo.config.login_redirect,
693
                logout_url: synnefo.config.logout_redirect,
694
                cookie_name: synnefo.config.auth_cookie_name,
695
                skip_redirects: {{ auth_skip_redirects|safe }},
696
                logout_callback: function(client) {
697
                    Backbone.history.navigate(client.config.logout_url);
698
                    window.location = client.config.logout_url; 
699
                }
700
            });
701

702
            // user config
703
            synnefo.user = synnefo.auth_client;
704
            if (!synnefo.user.get_token()) { 
705
              synnefo.auth_client.redirect_to_login(); 
706
            }
707

708
            $(".usermenu .username").text("options");
709

710
            // images config
711
            synnefo.config.system_images_owners = {{ system_images_owners|safe }};
712
            synnefo.ui.init();
713
            synnefo.ui.main.bind("ready", function(){
714
            });
715
        });
716
    </script>
717
</body>
718
</html>