Statistics
| Branch: | Tag: | Revision:

root / snf-cyclades-app / synnefo / ui / templates / home.html @ 198b546d

History | View | Annotate | Download (32.8 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
    {% if SYNNEFO_FONTS_BASE_URL %}
12
    <link href="{{ SYNNEFO_FONTS_BASE_URL }}css?family=Ubuntu&subset=latin,greek" 
13
          rel="stylesheet" type="text/css" >
14
    <link href='{{ SYNNEFO_FONTS_BASE_URL }}css?family=Open+Sans&subset=latin,greek' 
15
          rel='stylesheet' type='text/css'>
16
    {% endif %}
17

    
18
    <link rel="shortcut icon" href="{{ BRANDING_FAVICON_URL }}" />
19

    
20
    {% comment %}
21
    <script type="text/javascript" src="{% url javascript_catalog %}"></script> 
22
    {% endcomment %}
23

    
24
    <link rel="stylesheet" type="text/css" 
25
          href="{{ SYNNEFO_CSS_URL }}main.css?v={{ SYNNEFO_JS_LIB_VERSION }}"/>
26

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

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

    
49

    
50
    <script src="{{ SYNNEFO_JS_LIB_URL}}underscore.js?v={{ SYNNEFO_JS_LIB_VERSION }}"></script>
51
    <script src="{{ SYNNEFO_JS_LIB_URL}}underscore.string.js?v={{ SYNNEFO_JS_LIB_VERSION }}"></script>
52
    <script src="{{ SYNNEFO_JS_LIB_URL}}rivets.conf.js"></script>
53
    <script src="{{ SYNNEFO_JS_LIB_URL}}backbone.js?v={{ SYNNEFO_JS_LIB_VERSION }}"></script>
54
    <script src="{{ SYNNEFO_JS_LIB_URL}}json2.js?v={{ SYNNEFO_JS_LIB_VERSION }}"></script>
55
    <script src="{{ SYNNEFO_JS_LIB_URL}}stacktrace.js?v={{ SYNNEFO_JS_LIB_VERSION }}"></script>
56
    <script src="{{ SYNNEFO_JS_LIB_URL}}backbone-filtered-collection.js?v={{ SYNNEFO_JS_LIB_VERSION }}"></script>
57

    
58
    <!--[if (lt IE 7)]>
59
        <script src="{{ SYNNEFO_JS_LIB_URL }}selectivizr.js?v={{ SYNNEFO_JS_LIB_VERSION }}"></script>
60
    <! [endif] -->
61

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

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

    
95
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_router.js?v={{ SYNNEFO_JS_LIB_VERSION }}"></script>
96
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_main_view.js?v={{ SYNNEFO_JS_LIB_VERSION }}"></script>
97

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

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

143

144

145
        // building statuses
146
        var BUILDING_MESSAGES = {
147
            'INIT': '{% trans "Initializing..." %}',
148
            'COPY': '{% trans "{0} of {1} ({2}%)" %}',
149
            'FINAL': '{% trans "Bulding image..." %}'
150
        }
151

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

183
        var SUGGESTED_FLAVORS = {{ suggested_flavors|safe }};
184
        var SUGGESTED_ROLES = {{ suggested_roles|safe }}
185

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

197
        var VARIOUS = {
198
            'CONFIRM' : '{% trans "Confirm" %}',
199
            'CANCEL' : '{% trans "Cancel" %}',
200
            'APPLY' : '{% trans "Apply" %}',
201
            'OFF' : '{% trans "Off" %}',
202
            'ON' : '{% trans "On" %}'
203
        };
204

    
205
    </script>
206
</head>
207

    
208
<body id="app">
209
    <div id="container">
210
        <div id="header">
211
            <div id="user">
212
                {% comment %}
213
                <div class="langmenu">
214
                    <a class="current_lang">en</a>
215
                {% get_available_languages as LANGUAGES %}
216
                {% for lang in LANGUAGES %}
217
                <a {% if  == lang.0 %}
218
                    class="current_lang" {% else %}  href="/lang/?l={{lang.0}}" {% endif %}>{{lang.0}}</a>
219

    
220
                    {% if not forloop.last %}<span class="sep">~</span>{% endif %}
221
                    {% endfor %}
222
                </div>
223
                {% endcomment %}
224
            </div>
225
            <div class="header-logo">
226
                <a href="/" title="{{ BRANDING_SERVICE_NAME }} Compute">
227
                     <img src="{{ BRANDING_COMPUTE_LOGO_URL }}" alt="{{ BRANDING_SERVICE_NAME }}"/>  
228
                </a>
229
            </div>
230
        </div>
231
        <div id="content">
232
            <div id="wrapper" class="clearfix">
233

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

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

    
292
                </div>
293
            </div>
294
        </div>
295
    </div>
296

    
297
    <!-- activate tabs with JavaScript -->
298
    <script>
299

300
        //load opera css fixes
301
        if ($.browser.opera) {
302
            $("<link/>", {
303
               rel: "stylesheet",
304
               type: "text/css",
305
               href: "{{ SYNNEFO_CSS_URL }}opera.css?v={{ SYNNEFO_JS_LIB_VERSION }}"
306
            }).appendTo("head");
307
        }
308

309
        $(document).ready(function(){
310

311
            {% if current_lang == "el" and not DEBUG %}
312
                window.location = "/lang/?l=en";
313
            {% endif %}
314

315
            // user menu interaction
316
            var resetUserMenu = function() {
317
                $(this).removeClass("hovered");
318
                $(this).removeClass("active");
319
            }
320

321
            $(".usermenu").live("click", function(){
322
                $(this).addClass("active");
323
            });
324
            $(".usermenu").bind('mouseleave', resetUserMenu);
325
            $(".usermenu").live("mouseover", function(){
326
                $(this).addClass("hovered");
327
            });
328

329
            $(".usermenu li").mouseenter(function(){$(this).addClass("hovered")})
330
            $(".usermenu li").mouseleave(function(){$(this).removeClass("hovered")});
331

332
            // bind menu actions
333
            $(".usermenu .logout").click(function() {
334
                synnefo.auth_client.logout();
335
            });
336

337
            $(".usermenu .api").click(function(){
338
                synnefo.ui.main.api_info_view.show();
339
            });
340

341
        });
342
        
343
        function positionBottomMessages() {
344
            var el = $("#multiple_actions_container");
345
        }
346
        
347
        
348
        $(document).ready(function() {
349
          // Footer position handlers
350
          var footerHeight = 0;
351
          var footerTop = 0;
352
          var $footer = $("#footer-container");
353
          function _positionFooter() {
354

355
              footerHeight = 80;
356
              footerTop = ($(window).scrollTop()+$(window).height()-footerHeight)+"px";
357
              if (($(document.body).height()+footerHeight) < $(window).height()) {
358

359
                  $footer.css({
360
                       position: "absolute"
361
                  }).css({
362
                       top: footerTop
363
                  })
364
               } else {
365
               
366
                  if ($footer.css("position") == "static") {
367
                      if ($(document.body).height() < $(window).height()) {    
368
                          $footer.css({
369
                               position: "absolute"
370
                          }).css({
371
                               top: footerTop
372
                           })
373
                       }
374
                   } else {
375

376
                      $footer.css({
377
                          position: "static"
378
                      })
379
                  }
380
              }
381

382
          }
383
          _positionFooter();
384
          window.positionFooter = _.throttle(_positionFooter, 100);
385
          window.forcePositionFooter = _positionFooter;
386
          $(window).scroll(window.positionFooter).resize(window.positionFooter)
387

388
          $(window).bind("load", function() { 
389
            _positionFooter();
390
          });
391
        
392
        })
393
    </script>
394

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

    
417
    <!-- generic overlay tpl -->
418
    <div class="overlay" id="generic-overlay-tpl">
419
        <div class="overlay-inner">
420
            <h3 class="overlay-header clearfix">
421
                <span class="subtitle"></span>
422
                <span class="title"></span>
423
                <span class="closeme">close</span></h3>
424
            <div class="container">
425
                <div class="content">
426
                </div>
427
            </div>
428
            <div class="footer"></div>
429
        </div>
430
    </div>
431

    
432
    <div id="error-overlay-content" class="hidden">
433
        <div class="error-nav hidden clearfix">
434
            <span class="indicator"><span class="num">1</span> <span
435
                    class="ind-msg">new error occured</span></span>
436
            <span class="show-next nav-btn">{% trans "next" %}</span>
437
            <span class="show-prev nav-btn">{% trans "previous" %}</span>
438
        </div>
439
        <div class="message"><p></p></div>
440
        <div class="error-details">
441
            <span class="key">{% trans "Module" %}</span>
442
            <span class="value error-module"></span>
443

    
444
            <span class="key">{% trans "Code" %}</span>
445
            <span class="value error-code"></span>
446

    
447
            <span class="key">{% trans "Type" %}</span>
448
            <span class="value error-type"></span>
449

    
450
            <span class="key details">{% trans "Details" %}</span>
451
            <div class="value error-more-details"><p></p></div>
452
        </div>
453
        
454
        <!--<div class="navigation">-->
455
            <!--<span class="next-error">{% trans "next error" %}</span>-->
456
            <!--<span class="previous-error">{% trans "previous error" %}</span>-->
457
        <!--</div>-->
458
        
459
        <!--<div class="date">-->
460
            <!--<span class="error-date"></span>-->
461
        <!--</div>-->
462

    
463
        <div class="actions">
464
            <span class="show-details">{% trans "Show details" %}</span>
465
            <span class="hide-details">{% trans "Hide details" %}</span>
466
            <span class="report-error">{% trans "Send report" %}</span>
467
            <span class="reload-app">{% trans "Reload" %}</span>
468
        </div>
469
    </div>
470
    <div id="feedback-overlay-content" class="hidden overlay-content feedback-form">
471
        <div class="description messages noborder">
472
            <p class="success-message hidden">
473
            {% trans "thank you for submiting your feedback" %}
474
            </p>
475
            <p class="error-message hidden">
476
                {% trans "some error occured submiting submiting your feedback, please try again later" %}
477
            </p>
478
            <p class="sending-message hidden">
479
            {% blocktrans %}Sending feedback...{% endblocktrans %}
480
            </p>
481
        </div>
482
        <div class="form">
483
            <div class="form-field">
484
                <label for{% trans "Please  your  here, provide  many  as " %}</label
485
                <textarea ="feedback-message"> 
486
                </textarea>
487
            </div>
488
            <div class="form-actions clearfix noborder">
489
                <span class="form-action submit">{% trans "send feedback" %}</span>
490
            </div>
491
        </div>
492
    </div>
493
    <div class="modal" id="feedback-form" class="feedback notification-box">
494
      <h3 class="popup-header overlay-header">
495
        <span class="header-box">{% trans "Send feedback" %}</span>
496
      </h3>
497
      <div class="popup-body">
498
        <div class="popup-body-inner">
499
          <div class="form-container">
500
            <form id="feedback-form">
501
              <label for="feedback-msg">{% trans "Please describe your problem here, provide as many details as possible" %}</label>
502
              <div class="description"></div>
503
              <div class="empty-error-msg">{% trans "Please provide some feedback" %}</div>
504
              <textarea name="feedback-msg" class="feedback-text"></textarea>
505

    
506
              <input type="checkbox" name="submit-submit-data" class='submit-data' />
507
              <input type="submit" value="{% trans "submit " %}" class="submit" />
508
              <textarea name="feedback-data" class="data-text"></textarea>
509
            </form>
510
          </div>
511

    
512
          <div class="message sending">{% trans "submiting your data....." %}</div>
513
          <div class="message success">
514
            {% trans "thank you for submiting your feedback" %}
515
            <span class="close-msg-box"> {% trans "close feedback" %}</span></div>
516
          <div class="message errormsg">
517
            {% trans "some error occured submiting submiting your feedback, please try again later" %}
518
            <span class="close-msg-box"> {% trans "close feedback" %}</span></div>
519
        </div>
520
      </div>
521
    </div>
522
    
523
    <div id="details-overlay" class="overlay-content overlay-info hidden">
524
        <div class="description intro">
525
            <p></p>
526
        </div>
527
        <div class="description subinfo">
528
            <p></p>
529
        </div>
530
    </div>
531

    
532
    <div id="suspended-vm-overlay" class="overlay-content overlay-info hidden">
533
        <div class="description noborder">
534
          Your VM has been suspended, please contact us for more details.
535
        </div>
536
    </div>
537

    
538
    <div id="api-info-overlay" class="overlay-content overlay-info hidden">
539
        <div class="description">
540
            <p>{% blocktrans with EXTERNAL_CLIENT_URL as EXTERNAL_CLIENT_URL %}Use the following API key along with the <a
541
                href="{{ EXTERNAL_CLIENT_URL }}">./kamaki</a> client to manage
542
            your cloud resources from outside this page.{% endblocktrans %}</p>
543
        </div>
544
        <div class="copy-content">
545
            <p></p>
546
        </div>
547
        <div class="description subinfo">
548
            <p>
549
            {% blocktrans %} The API key provides full access to your <em>{{ BRANDING_SERVICE_NAME }}</em> account, so always keep it private.{% endblocktrans %}
550
            </p>
551
        </div>
552
    </div>
553

    
554
    <div class="api_overlay_template">
555
        <div class="api_overlay_content">
556
            <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>
557
        </div>
558
    </div>
559

    
560
    <div class="modal" id="notification-box" class="notification-box">
561
        <h3 class="popup-header">
562
            <span class="header-box"></span>
563
        </h3>
564
        <div class="popup-body">
565
            <div class="popup-body-inner">
566
                <div class="machine-now-building"></div>
567
                <div class="popup-separator"></div>
568
                <div class="password-container">
569
                    <div class="password"></div>
570
                </div>
571
                <div class="sub-text"></div>
572
            </div>
573
        </div>
574
    </div>
575
    
576
    <div id="loading-view" class="hidden clearfix">
577
        <div class="header clearfix images off">Loading images...<span></span></div>
578
        <div class="header clearfix flavors off">Loading flavors...<span></span></div>
579
        <div class="header clearfix resources off">Loading resources...<span></span></div>
580
        <div class="header clearfix projects off">Loading projects...<span></span></div>
581
        <div class="header clearfix quotas off">Loading quotas...<span></span></div>
582
        <div class="header clearfix vms off">Loading machines...<span></span></div>
583
        <div class="header clearfix networks off">Loading networks...<span></span></div>
584
        <div class="header clearfix layout off">Rendering layout...<span></span></div>
585
    </div>
586
    <div id="user_custom_images" class="overlay-content overlay-content hidden">
587
        {% include "partials/custom_images.html" %}
588
    </div>
589
    {% include "partials/vm_resize.html" %}
590
    {% include "footer.html" %}
591

    
592
    <script>
593
        $(document).ready(function() {
594
            $(".css-panes").hide();
595

596
            // TODO: match <= 1.9.1
597
            if ($.browser.mozilla && $.browser.version.substr(0,3) == "1.9") {
598
                synnefo.config.overlay_speed = 0;
599
                $.fx.off = true;
600
            }
601
            
602
            // synnefo js config
603
            synnefo.VERSION = "{{ synnefo_version }}";
604
            synnefo.config.update_interval = {{ update_interval }};
605
            synnefo.config.update_interval_increase = {{ update_interval_increase }};
606
            synnefo.config.fast_interval = {{ update_interval_fast }};
607
            synnefo.config.update_interval_increase_after_calls = {{ update_interval_increase_after_calls }};
608
            synnefo.config.update_interval_max = {{ update_interval_max }};
609
            synnefo.config.delay_on_blur = {{ delay_on_blur }};
610
            synnefo.config.update_hidden_views = {{ update_hidden_views }};
611
            synnefo.config.handle_window_exceptions = {{ handle_window_exceptions }};
612
            synnefo.config.ajax_timeout = {{ timeout }};
613
            synnefo.config.skip_timeouts = {{ skip_timeouts }};
614
            synnefo.config.machines_icons_url = '{{ SYNNEFO_IMAGES_URL }}icons/machines/';
615
            synnefo.config.vm_name_template = {{ vm_name_template|safe }};
616
            synnefo.config.flavors_disk_templates_info = {{ flavors_disk_templates_info|safe }};
617
            synnefo.config.vm_image_common_metadata = {{ vm_image_common_metadata|safe }};
618
            synnefo.config.hotplug_enabled = {{ hotplug_enabled|safe }};
619

620
            synnefo.config.diagnostics_update_interval = {{ diagnostics_update_interval }};
621
            // override diagnostic messages display
622
            synnefo.config.diagnostic_messages_tpls = {
623
              'image-helper-task-start': "{% trans "Running task 'MESSAGE'" %}"
624
            };
625
            // what messages to display based on vm status
626
            synnefo.config.diagnostics_status_messages_map = {
627
                'BUILD': ['image-helper-task-start', 'image-info'],
628
                'ERROR': ['image-error']
629
            };
630

631
            synnefo.config.api_urls = {
632
                'userdata': '{% url ui_userdata %}', 
633
                'compute':  {{ compute_api_url|safe }}, 
634
                'network':  {{ network_api_url|safe }}, 
635
                'glance': {{ glance_api_url|safe }},
636
                'accounts': {{ accounts_api_url|safe }},
637
            };
638
            
639
            // TODO: configurable userdata urls in models.js
640
            synnefo.config.userdata_keys_url = '{% url ui_keys_collection %}';
641
            synnefo.config.userdata_keys_limit = {{ userdata_keys_limit }};
642
            
643
            // media config
644
            synnefo.config.media_url = '{{ UI_MEDIA_URL }}';
645
            synnefo.config.js_url = '{{ SYNNEFO_JS_URL }}';
646
            synnefo.config.images_url = '{{ SYNNEFO_IMAGES_URL }}';
647
            synnefo.config.image_deleted_title = {{ image_deleted_title|safe }};
648
            synnefo.config.changes_since_alignment = {{ changes_since_alignment }};
649
            synnefo.config.image_deleted_size_title = {{ image_deleted_size_title|safe }};
650
            synnefo.config.use_glance = {{ use_glance }};
651
            synnefo.config.indicators_icons_url = '{{ SYNNEFO_IMAGES_URL }}icons/indicators/';
652
            synnefo.config.machines_icons_url = '{{ SYNNEFO_IMAGES_URL }}icons/machines/';
653
            synnefo.config.ui_console_url = '{% url ui_machines_console %}';
654
            synnefo.config.ui_connect_url = '{% url ui_machines_connect %}';
655
            synnefo.config.ssh_support_osfamily_exclude_list = {{ ssh_support_osfamily_exclude_list|safe }};
656
            synnefo.config.unknown_os = {{ unknown_os|safe }};
657
            synnefo.config.os_created_users = {{ os_created_users|safe }};
658
            synnefo.config.feedback_post_url = {{ feedback_post_url|safe }};
659
            
660
            synnefo.config.logout_redirect = {{ logout_redirect|safe }};
661
            synnefo.config.login_redirect = {{ login_redirect|safe }};
662
            synnefo.config.auth_cookie_name = '{{ auth_cookie_name }}';
663

664
            synnefo.config.translate_uuids = {{ translate_uuids|safe }};
665
            synnefo.config.user_catalog_url = {{ user_catalog_url|safe }};
666

667
            synnefo.config.network_suggested_subnets = {{ network_suggested_subnets|safe }};
668
            synnefo.config.network_available_types = {{ network_available_types|safe }};
669
            synnefo.config.network_allow_duplicate_vm_nics = {{ network_allow_duplicate_vm_nics }};
670
            synnefo.config.network_strict_destroy = {{ network_strict_destroy }};
671
            synnefo.config.network_allow_multiple_destory = {{ network_allow_multiple_destroy }};
672
            synnefo.config.group_public_networks = {{ group_public_networks }};
673
            synnefo.config.no_fqdn_message = {{ no_fqdn_message|safe }};
674
            synnefo.config.automatic_network_range_format = {{ automatic_network_range_format|safe }};
675
            synnefo.config.custom_image_help_url = '{{ custom_image_help_url|safe }}';
676
            synnefo.config.forced_server_networks = {{ forced_server_networks|safe }};
677
            
678
            synnefo.auth_client = new synnefo.auth.AstakosClient({
679
                login_url: synnefo.config.login_redirect,
680
                logout_url: synnefo.config.logout_redirect,
681
                cookie_name: synnefo.config.auth_cookie_name,
682
                skip_redirects: {{ auth_skip_redirects|safe }},
683
                logout_callback: function(client) {
684
                    Backbone.history.navigate(client.config.logout_url);
685
                    window.location = client.config.logout_url; 
686
                }
687
            });
688

689
            // user config
690
            synnefo.user = synnefo.auth_client;
691
            if (!synnefo.user.get_token()) { 
692
              synnefo.auth_client.redirect_to_login(); 
693
            }
694

695
            $(".usermenu .username").text("options");
696

697
            // images config
698
            synnefo.config.system_images_owners = {{ system_images_owners|safe }};
699
            synnefo.ui.init();
700
            synnefo.ui.main.bind("ready", function(){
701
            });
702
        });
703
    </script>
704
</body>
705
</html>