Statistics
| Branch: | Tag: | Revision:

root / snf-cyclades-app / synnefo / ui / templates / home.html @ 5acb8b8a

History | View | Annotate | Download (33.3 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_public_keys_view.js?v={{ SYNNEFO_JS_LIB_VERSION }}"></script>
92
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_custom_images.js?v={{ SYNNEFO_JS_LIB_VERSION }}"></script>
93

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

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

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

142

143

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

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

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

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

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

    
204
    </script>
205
</head>
206

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    
514
              <input type="checkbox" name="submit-submit-data" class='submit-data' />
515
              <input type="submit" value="{% trans "submit " %}" class="submit" />
516
              <textarea name="feedback-data" class="data-text"></textarea>
517
            </form>
518
          </div>
519

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

    
540
    <div id="suspended-vm-overlay" class="overlay-content overlay-info hidden">
541
        <div class="description noborder">
542
          Your VM has been suspended, please contact us for more details.
543
        </div>
544
    </div>
545

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

    
562
    <div class="api_overlay_template">
563
        <div class="api_overlay_content">
564
            <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>
565
        </div>
566
    </div>
567

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

    
599
    <script>
600
        $(document).ready(function() {
601
            $(".css-panes").hide();
602

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

627
            synnefo.config.diagnostics_update_interval = {{ diagnostics_update_interval }};
628
            // override diagnostic messages display
629
            synnefo.config.diagnostic_messages_tpls = {
630
              'image-helper-task-start': "{% trans "Running task 'MESSAGE'" %}"
631
            };
632
            // what messages to display based on vm status
633
            synnefo.config.diagnostics_status_messages_map = {
634
                'BUILD': ['image-helper-task-start', 'image-info'],
635
                'ERROR': ['image-error']
636
            };
637

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

672
            synnefo.config.translate_uuids = {{ translate_uuids|safe }};
673
            synnefo.config.user_catalog_url = {{ user_catalog_url|safe }};
674

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

698
            // user config
699
            synnefo.user = synnefo.auth_client;
700
            if (!synnefo.user.get_token()) { 
701
              synnefo.auth_client.redirect_to_login(); 
702
            }
703

704
            $(".usermenu .username").text("options");
705

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