Statistics
| Branch: | Tag: | Revision:

root / snf-cyclades-app / synnefo / ui / templates / home.html @ 3796f345

History | View | Annotate | Download (29.3 kB)

1
<!doctype html>
2
<html>
3

    
4
{% load i18n %}
5
<head>
6
    <title>~okeanos</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="{{ SYNNEFO_IMAGES_URL }}favicon.ico" />
15

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

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

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

    
32
    <script src="{{ SYNNEFO_JS_LIB_URL }}jquery-1.7.2.js"></script>
33
    <script src="{{ SYNNEFO_JS_LIB_URL}}jquery.cookie.js"></script>
34
    <script src="{{ SYNNEFO_JS_LIB_URL}}jquery.client.js"></script>
35
    <script src="{{ SYNNEFO_JS_LIB_URL}}jquery.tools.min.js"></script>
36
    <script src="{{ SYNNEFO_JS_LIB_URL}}jquery.dataTables.min.js"></script>
37
    <script src="{{ SYNNEFO_JS_LIB_URL}}jquery.pagination.js"></script>
38
    <script src="{{ SYNNEFO_JS_LIB_URL}}jquery.zclip.js"></script>
39
    <script src="{{ SYNNEFO_JS_LIB_URL}}jquery.base64.js"></script>
40

    
41

    
42
    <script src="{{ SYNNEFO_JS_LIB_URL}}underscore.js"></script>
43
    <script src="{{ SYNNEFO_JS_LIB_URL}}underscore.string.js"></script>
44
    <script src="{{ SYNNEFO_JS_LIB_URL}}backbone.js"></script>
45
    <script src="{{ SYNNEFO_JS_LIB_URL}}json2.js"></script>
46
    <script src="{{ SYNNEFO_JS_LIB_URL}}stacktrace.js"></script>
47

    
48
    <!--[if (lt IE 7)]>
49
        <script src="{{ SYNNEFO_JS_LIB_URL }}selectivizr.js"></script>
50
    <! [endif] -->
51

    
52
    <!--[if IE]>
53
        <script src="{{ SYNNEFO_JS_URL }}ui/ie_fixes.js"></script>
54
    <![endif]-->
55
    
56
    <script src="{{ SYNNEFO_JS_URL }}utils.js"></script>
57
    <script src="{{ SYNNEFO_JS_URL }}auth.js"></script>
58
    <script src="{{ SYNNEFO_JS_URL }}sync.js"></script>
59
    <script src="{{ SYNNEFO_JS_URL }}models.js"></script>
60
    <script src="{{ SYNNEFO_JS_URL }}glance_models.js"></script>
61
    <script src="{{ SYNNEFO_JS_URL }}views.js"></script>
62

    
63
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_vms_base_view.js"></script>
64
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_model_views.js"></script>
65
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_error_view.js"></script>
66
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_icon_view.js"></script>
67
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_single_view.js"></script>
68
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_list_view.js"></script>
69
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_networks_view.js"></script>
70
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_disks_view.js"></script>
71
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_metadata_view.js"></script>
72
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_feedback_view.js"></script>
73
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_create_view.js"></script>
74
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_connect_view.js"></script>
75
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_public_keys_view.js"></script>
76
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_custom_images.js"></script>
77

    
78
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_router.js"></script>
79
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_main_view.js"></script>
80

    
81
    <!-- the following views require refactor -->
82
    <script src="{{ SYNNEFO_JS_URL }}synnefo.js"></script>
83
    <script>
84
        tmp_auth_client = new synnefo.auth.AstakosClient({
85
            cookie_name: '{{ auth_cookie_name }}',
86
            login_url: '{{ login_redirect }}'
87
        });
88
        if (!tmp_auth_client.get_user()) { tmp_auth_client.redirect_to_login(); }
89
    </script>
90
    {{ CLOUDBAR_CODE }}
91
    
92
    <script>
93
        // empty object for console to avoid errors in browsers that don't support it
94
        if (!window.console) {window.console = {}; window.console.log = window.console.info = window.console.debug =
95
            window.console.error = function() {}};
96
        
97
        //populate available image icons array
98
        var os_icons = {{image_icons|safe}};
99
        
100
        // timeout value from settings.py
101
        var TIMEOUT = {{ timeout }};
102
        var TIMEOUTS_OCCURED = 0;
103
        var SKIP_TIMEOUTS = {{ skip_timeouts }};
104
        var UPDATE_INTERVAL = {{ update_interval }};
105
        var APP_DEBUG = {% if DEBUG %}true{% else %}false{% endif %};
106
        var FEEDBACK_URL = "{% url ui_feedback %}";
107
        var FEEDBACK_TITLE = "{% trans "Send feedback" %}";
108
        var API_OVERLAY_TITLE = "{% trans "API access" %}";
109
        var API_OVERLAY_SUBCONTENT = "{% trans "The API key provides full access to your <em>~okeanos</em> account, so always keep it private." %}";
110

111
        STATE_TEXTS = {
112
            'UNKNOWN': '{% trans "Unknown" %}',
113
            'BUILD':  '{% trans "Building..." %}',
114
            'FIREWALL':  '{% trans "Firewall change..." %}',
115
            'REBOOT': '{% trans "Rebooting..." %}',
116
            'STOPPED':'{% trans "Stopped" %}',
117
            'ACTIVE': '{% trans "Running" %}',
118
            'ERROR':  '{% trans "Error" %}',
119
            'DELETE': '',
120
            'DESTROY': '{% trans "Destroying..." %}',
121
            'BUILD_INIT':  '{% trans "Building..." %}',
122
            'BUILD_COPY':  '{% trans "Building..." %}',
123
            'BUILD_FINAL':  '{% trans "Building..." %}',
124
            'SHUTDOWN': '{% trans "Shutting down..." %}',
125
            'START': '{% trans "Starting..." %}',
126
            'CONNECT': '{% trans "Connecting..." %}',
127
            'DISCONNECT': '{% trans "Disconnecting..." %}'
128
        }
129

130

131

132
        // building statuses
133
        var BUILDING_MESSAGES = {
134
            'INIT': '{% trans "Initializing..." %}',
135
            'COPY': '{% trans "{0} of {1} ({2}%)" %}',
136
            'FINAL': '{% trans "Bulding image..." %}'
137
        }
138

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

170
        var SUGGESTED_FLAVORS = {{ suggested_flavors|safe }};
171
        var SUGGESTED_ROLES = {{ suggested_roles|safe }}
172

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

184
        var VARIOUS = {
185
            'CONFIRM' : '{% trans "Confirm" %}',
186
            'CANCEL' : '{% trans "Cancel" %}',
187
            'APPLY' : '{% trans "Apply" %}',
188
            'OFF' : '{% trans "Off" %}',
189
            'ON' : '{% trans "On" %}'
190
        };
191

    
192
    </script>
193
</head>
194

    
195
<body id="app">
196
    <!--<img id="okeanos-image" src="{{ SYNNEFO_IMAGES_URL }}body-bg2.png" />-->
197
    <div id="container">
198
        <div id="header">
199
            <div id="user">
200
                <div class="usermenu">
201
                    <div class="username"></div>
202
                    <ul class="useractions">
203
                        <!--<li class="feedback"><a class="action" href="#">{% trans "send feedback..." %}</a></li>-->
204
                        <li class="api"><a class="action" href="#">{% trans "API access..." %}</a></li>
205
                        <li class="public_keys"><a class="action" href="#">{% trans "ssh public keys..." %}</a></li>
206
                        <!--<li class="custom_images"><a class="action" href="#">{% trans "custom images..." %}</a></li>-->
207
                        <!--<li class="logout last"><a class="action" href="#">{% trans "logout" %}</a></li>-->
208
                    </ul>
209
                </div>
210
                <div class="langmenu">
211
                    <a class="current_lang">en</a>
212
                    {% comment %}
213
                {% get_available_languages as LANGUAGES %}
214
                {% for lang in LANGUAGES %}
215
                <a {% if  == lang.0 %}
216
                    class="current_lang" {% else %}  href="/lang/?l={{lang.0}}" {% endif %}>{{lang.0}}</a>
217

    
218
                    {% if not forloop.last %}<span class="sep">~</span>{% endif %}
219
                    {% endfor %}
220
                {% endcomment %}
221
                </div>
222
            </div>
223
            <div class="header-logo">
224
                <a href="/">
225
                    <img src="{{ SYNNEFO_IMAGES_URL }}okeanos-logo-alpha.png" alt="okeanos (alpha)"/>
226
                </a>
227
            </div>
228
        </div>
229
        <div id="content">
230
            <div id="wrapper" class="clearfix">
231

    
232
                <div class="panes-menu clearfix">
233
                <!-- tabs -->
234
                <div class="tab-name">{% trans "machines" %}</div>
235
                <ul class="css-tabs">
236
                    <li><a href="machines" title="{% trans "manage  virtual " %}"
237
                        class="primary" id="machines_view_link">
238
                        <img src="{{ SYNNEFO_IMAGES_URL }}machines-icon.png" /></a></li>
239
                    <li><a href="networks" title="{% trans "configure " %}"
240
                        class="primary" id="networks_view_link">
241
                        <img src="{{ SYNNEFO_IMAGES_URL }}networks-icon.png" /></a></li>
242
                    {% comment %}
243
                    <li><a href="disks" title="{% trans "manage  storage " %}"
244
                        class="primary" id="disks_view_link">
245
                        <img src="{{ SYNNEFO_IMAGES_URL }}disks-icon.png" /></a></li>
246
                    {% endcomment %}
247
                </ul>
248
                </div>
249
                <div class="css-panes">
250
                    <div id="machines-pane" class="pane" style="display:block;">
251
                        {% include "partials/machines.html" %}
252
                    </div>
253
                    <div id="networks-pane" class="pane">
254
                        {% include "partials/networks.html" %}
255
                    </div>
256
                    <div id="disks-pane" class="pane">
257
                            {% include "partials/disks.html" %}
258
                    </div>
259

    
260
                    <div class="confirm_multiple clearfix" id="multiple_actions_container">
261
                        <div class="confirm_multiple_actions confirm-all-cont global hidden confirm_multiple_cont clearfix">
262
                            <div class="confirm-all msg">
263
                                <p>You requested multiple actions to execute (<span
264
                                    class="show">show all</span>)</p>
265
                                <button class="yes">Confirm all</button>
266
                                <button class="no">Cancel all</button>
267
                            </div>
268
                            <div class="details"></div>
269
                        </div>
270
                        <div class="ns-confirms-cont">
271
                            <div class="confirm_multiple_actions hidden confirm_multiple_cont
272
                                ns-confirm clearfix"
273
                                id="conirm_multiple_cont_template">
274
                                <div class="confirm-all msg">
275
                                    <p></p>
276
                                    <button class="yes"></button>
277
                                    <button class="no"></button>
278
                                </div>
279
                                <div class="details"></div>
280
                            </div>
281
                        </div>
282
                    </div>
283

    
284
                </div>
285
            </div>
286
        </div>
287
    </div>
288

    
289
    <!-- activate tabs with JavaScript -->
290
    <script>
291

292
        //load opera css fixes
293
        if ($.browser.opera) {
294
            $("<link/>", {
295
               rel: "stylesheet",
296
               type: "text/css",
297
               href: "{{ SYNNEFO_CSS_URL }}opera.css"
298
            }).appendTo("head");
299
        }
300

301
        $(document).ready(function(){
302

303
            {% if current_lang == "el" and not DEBUG %}
304
                window.location = "/lang/?l=en";
305
            {% endif %}
306

307
            // user menu interaction
308
            var resetUserMenu = function() {
309
                $(this).removeClass("hovered");
310
                $(this).removeClass("active");
311
            }
312

313
            $(".usermenu").live("click", function(){
314
                $(this).addClass("active");
315
            });
316
            $(".usermenu").bind('mouseleave', resetUserMenu);
317
            $(".usermenu").live("mouseover", function(){
318
                $(this).addClass("hovered");
319
            });
320

321
            $(".usermenu li").mouseenter(function(){$(this).addClass("hovered")})
322
            $(".usermenu li").mouseleave(function(){$(this).removeClass("hovered")});
323

324
            // bind menu actions
325
            $(".usermenu .logout").click(function() {
326
                synnefo.auth_client.logout();
327
            });
328

329
            $(".usermenu .api").click(function(){
330
                synnefo.ui.main.api_info_view.show();
331
            });
332

333
        });
334
        
335
        function positionBottomMessages() {
336
            var el = $("#multiple_actions_container");
337
        }
338

339
        $(window).bind("load", function() { 
340
               var footerHeight = 0;
341
               var footerTop = 0;
342
               var $footer = $("#footer-container");
343

344
               positionFooter();
345
               function positionFooter() {
346
                   footerHeight = 80;
347
                   footerTop = ($(window).scrollTop()+$(window).height()-footerHeight)+"px";
348
                   if (($(document.body).height()+footerHeight) < $(window).height()) {
349

350
                       $footer.css({
351
                            position: "absolute"
352
                       }).css({
353
                            top: footerTop
354
                       })
355
                    } else {
356
                    
357
                       if ($footer.css("position") == "static") {
358
                           if ($(document.body).height() < $(window).height()) {    
359
                               $footer.css({
360
                                    position: "absolute"
361
                               }).css({
362
                                    top: footerTop
363
                                })
364
                            }
365
                        } else {
366

367
                           $footer.css({
368
                               position: "static"
369
                           })
370
                       }
371
                   }
372

373
                   }
374
               window.positionFooter = _.throttle(positionFooter, 100);
375
               $(window).scroll(positionFooter).resize(positionFooter)
376
        });
377
    </script>
378

    
379
    <!-- base notification for error/success reporting -->
380
    <a id="notification" rel="#error-success" href="#"></a>
381
    <a id="msgbox" rel="#notification-box" href="#"></a>
382
    <a id="feedbackbox" rel="#feedback-form" href="#"></a>
383

    
384
    <div class="overlay" id="generic-overlay-tpl">
385
        <div class="overlay-inner">
386
            <h3 class="overlay-header clearfix">
387
                <span class="subtitle"></span>
388
                <span class="title"></span>
389
                <span class="closeme">close</span></h3>
390
            <div class="container">
391
                <div class="content">
392
                </div>
393
            </div>
394
            <div class="footer"></div>
395
        </div>
396
    </div>
397

    
398
    <div id="error-overlay-content" class="hidden">
399
        <div class="error-nav hidden clearfix">
400
            <span class="indicator"><span class="num">1</span> <span
401
                    class="ind-msg">new error occured</span></span>
402
            <span class="show-next nav-btn">{% trans "next" %}</span>
403
            <span class="show-prev nav-btn">{% trans "previous" %}</span>
404
        </div>
405
        <div class="message"><p></p></div>
406
        <div class="error-details">
407
            <span class="key">{% trans "Module" %}</span>
408
            <span class="value error-module"></span>
409

    
410
            <span class="key">{% trans "Code" %}</span>
411
            <span class="value error-code"></span>
412

    
413
            <span class="key">{% trans "Type" %}</span>
414
            <span class="value error-type"></span>
415

    
416
            <span class="key details">{% trans "Details" %}</span>
417
            <div class="value error-more-details"><p></p></div>
418
        </div>
419
        
420
        <!--<div class="navigation">-->
421
            <!--<span class="next-error">{% trans "next error" %}</span>-->
422
            <!--<span class="previous-error">{% trans "previous error" %}</span>-->
423
        <!--</div>-->
424
        
425
        <!--<div class="date">-->
426
            <!--<span class="error-date"></span>-->
427
        <!--</div>-->
428

    
429
        <div class="actions">
430
            <span class="show-details">{% trans "Show details" %}</span>
431
            <span class="hide-details">{% trans "Hide details" %}</span>
432
            <span class="report-error">{% trans "Send report" %}</span>
433
            <span class="reload-app">{% trans "Reload" %}</span>
434
        </div>
435
    </div>
436
    <div id="feedback-overlay-content" class="hidden overlay-content feedback-form">
437
        <div class="description">
438
            <p>
439
                {% blocktrans %}~okeanos is currently in alpha test and we would appreciate any kind of feedback.
440
                We welcome any suggestions, questions and bug reports you may have.{% endblocktrans %}
441
            </p>
442
        </div>
443
        <div class="description messages noborder">
444
            <p class="success-message hidden">
445
            {% trans "thank you for submiting your feedback" %}
446
            </p>
447
            <p class="error-message hidden">
448
                {% trans "some error occured submiting submiting your feedback, please try again later" %}
449
            </p>
450
            <p class="sending-message hidden">
451
            {% blocktrans %}Sending feedback...{% endblocktrans %}
452
            </p>
453
        </div>
454
        <div class="form">
455
            <div class="form-field">
456
                <label for{% trans "Please  your  here, provide  many  as " %}</label
457
                <textarea ="feedback-message"> 
458
                </textarea>
459
            </div>
460
            <div class="form-actions clearfix noborder">
461
                <span class="form-action submit">{% trans "send feedback" %}</span>
462
            </div>
463
        </div>
464
    </div>
465
    <div class="modal" id="feedback-form" class="feedback notification-box">
466
      <h3 class="popup-header overlay-header">
467
        <span class="header-box">{% trans "Send feedback" %}</span>
468
      </h3>
469
      <div class="popup-body">
470
        <div class="popup-body-inner">
471
          <div class="form-container">
472
            <p class="feedback-intro">
473
            {% blocktrans %}~okeanos is currently in alpha test and we would appreciate any kind of feedback.
474
            We welcome any suggestions, questions and bug reports you may have.{% endblocktrans %}</p>
475
            <form id="feedback-form">
476
              <label for="feedback-msg">{% trans "Please describe your problem here, provide as many details as possible" %}</label>
477
              <div class="description"></div>
478
              <div class="empty-error-msg">{% trans "Please provide some feedback" %}</div>
479
              <textarea name="feedback-msg" class="feedback-text"></textarea>
480

    
481
              <input type="checkbox" name="submit-submit-data" class='submit-data' />
482
              <input type="submit" value="{% trans "submit " %}" class="submit" />
483
              <textarea name="feedback-data" class="data-text"></textarea>
484
            </form>
485
          </div>
486

    
487
          <div class="message sending">{% trans "submiting your data....." %}</div>
488
          <div class="message success">
489
            {% trans "thank you for submiting your feedback" %}
490
            <span class="close-msg-box"> {% trans "close feedback" %}</span></div>
491
          <div class="message errormsg">
492
            {% trans "some error occured submiting submiting your feedback, please try again later" %}
493
            <span class="close-msg-box"> {% trans "close feedback" %}</span></div>
494
        </div>
495
      </div>
496
    </div>
497
    
498
    <div id="details-overlay" class="overlay-content overlay-info hidden">
499
        <div class="description intro">
500
            <p></p>
501
        </div>
502
        <div class="description subinfo">
503
            <p></p>
504
        </div>
505
    </div>
506

    
507
    <div id="api-info-overlay" class="overlay-content overlay-info hidden">
508
        <div class="description">
509
            <p>{% blocktrans with EXTERNAL_CLIENT_URL as EXTERNAL_CLIENT_URL %}Use the following API key along with the <a
510
                href="{{ EXTERNAL_CLIENT_URL }}">./kamaki</a> client to manage
511
            your cloud resources from outside this page.{% endblocktrans %}</p>
512
        </div>
513
        <div class="copy-content">
514
            <p></p>
515
        </div>
516
        <div class="description subinfo">
517
            <p>
518
            {% trans "The API key provides full access to your <em>~okeanos</em> account, so always keep it private." %}
519
            </p>
520
        </div>
521
    </div>
522

    
523
    <div class="api_overlay_template">
524
        <div class="api_overlay_content">
525
            <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>
526
        </div>
527
    </div>
528

    
529
    <div class="modal" id="notification-box" class="notification-box">
530
        <h3 class="popup-header">
531
            <span class="header-box"></span>
532
        </h3>
533
        <div class="popup-body">
534
            <div class="popup-body-inner">
535
                <div class="machine-now-building"></div>
536
                <div class="popup-separator"></div>
537
                <div class="password-container">
538
                    <div class="password"></div>
539
                </div>
540
                <div class="sub-text"></div>
541
            </div>
542
        </div>
543
    </div>
544
    
545
    <div id="loading-view" class="hidden">
546
        <img src="{{ SYNNEFO_IMAGES_URL }}icons/indicators/small/progress.gif" />
547
        <div class="header">Loading <span>~okeanos</span></div>
548
        <div class="info hidden"></div>
549
    </div>
550
    <div id="user_public_keys" class="overlay-content overlay-content hidden">
551
        {% include "userdata/public_keys_view.html" %}
552
    </div>
553
    <div id="user_custom_images" class="overlay-content overlay-content hidden">
554
        {% include "partials/custom_images.html" %}
555
    </div>
556
    {% include "footer.html" %}
557

    
558
    <script>
559
        $(document).ready(function() {
560
            $(".css-panes").hide();
561

562
            // TODO: match <= 1.9.1
563
            if ($.browser.mozilla && $.browser.version.substr(0,3) == "1.9") {
564
                synnefo.config.overlay_speed = 0;
565
                $.fx.off = true;
566
            }
567
            
568
            // synnefo js config
569
            synnefo.VERSION = "{{ synnefo_version }}";
570
            synnefo.config.update_interval = {{ update_interval }};
571
            synnefo.config.update_interval_increase = {{ update_interval_increase }};
572
            synnefo.config.fast_interval = {{ update_interval_fast }};
573
            synnefo.config.update_interval_increase_after_calls = {{ update_interval_increase_after_calls }};
574
            synnefo.config.update_interval_max = {{ update_interval_max }};
575
            synnefo.config.delay_on_blur = {{ delay_on_blur }};
576
            synnefo.config.update_hidden_views = {{ update_hidden_views }};
577
            synnefo.config.handle_window_exceptions = {{ handle_window_exceptions }};
578
            synnefo.config.ajax_timeout = {{ timeout }};
579
            synnefo.config.skip_timeouts = {{ skip_timeouts }};
580
            synnefo.config.machines_icons_url = '{{ SYNNEFO_IMAGES_URL }}icons/machines/';
581
            synnefo.config.vm_name_template = {{ vm_name_template|safe }};
582
            synnefo.config.flavors_disk_templates_info = {{ flavors_disk_templates_info|safe }};
583
            synnefo.config.vm_image_common_metadata = {{ vm_image_common_metadata|safe }};
584

585
            synnefo.config.diagnostics_update_interval = {{ diagnostics_update_interval }};
586
            // override diagnostic messages display
587
            synnefo.config.diagnostic_messages_tpls = {
588
              'image-helper-task-start': "{% trans "Running task 'MESSAGE'" %}"
589
            };
590
            // what messages to display based on vm status
591
            synnefo.config.diagnostics_status_messages_map = {
592
                'BUILD': ['image-helper-task-start', 'image-info'],
593
                'ERROR': ['image-error']
594
            };
595

596
                           // TODO: make it dynamic
597
            synnefo.config.api_urls = {
598
                'compute':  {{ compute_api_url|safe }}, 
599
                'glance': {{ glance_api_url|safe }}
600
            };
601
            
602
            // TODO: configurable userdata urls in models.js
603
            synnefo.config.userdata_url = '/ui/userdata';
604
            synnefo.config.userdata_keys_url = '{% url ui_keys_collection %}';
605
            synnefo.config.userdata_keys_limit = {{ userdata_keys_limit }};
606
            
607
            // media config
608
            synnefo.config.media_url = '{{ UI_MEDIA_URL }}';
609
            synnefo.config.js_url = '{{ SYNNEFO_JS_URL }}';
610
            synnefo.config.images_url = '{{ SYNNEFO_IMAGES_URL }}';
611
            synnefo.config.image_deleted_title = {{ image_deleted_title|safe }};
612
            synnefo.config.changes_since_alignment = {{ changes_since_alignment }};
613
            synnefo.config.image_deleted_size_title = {{ image_deleted_size_title|safe }};
614
            synnefo.config.use_glance = {{ use_glance }};
615
            synnefo.config.indicators_icons_url = '{{ SYNNEFO_IMAGES_URL }}icons/indicators/';
616
            synnefo.config.machines_icons_url = '{{ SYNNEFO_IMAGES_URL }}icons/machines/';
617
            synnefo.config.support_ssh_os_list = {{ support_ssh_os_list|safe }};
618
            synnefo.config.os_created_users = {{ os_created_users|safe }};
619
            
620
            synnefo.config.logout_redirect = '{{ logout_redirect }}';
621
            synnefo.config.login_redirect = '{{ login_redirect }}';
622
            synnefo.config.auth_cookie_name = '{{ auth_cookie_name }}';
623

624
            synnefo.config.network_suggested_subnets = {{ network_suggested_subnets|safe }};
625
            synnefo.config.network_available_types = {{ network_available_types|safe }};
626
            synnefo.config.network_allow_duplicate_vm_nics = {{ network_allow_duplicate_vm_nics }};
627
            synnefo.config.network_strict_destroy = {{ network_strict_destroy }};
628
            synnefo.config.network_allow_multiple_destory = {{ network_allow_multiple_destroy }};
629
            synnefo.config.group_public_networks = {{ group_public_networks }};
630
            synnefo.config.grouped_public_network_name = {{ grouped_public_network_name|safe }};
631
            synnefo.config.vm_hostname_format = {{ vm_hostname_format|safe }};
632
            
633
            synnefo.auth_client = new synnefo.auth.AstakosClient({
634
                login_url: synnefo.config.login_redirect,
635
                logout_url: synnefo.config.logout_redirect,
636
                cookie_name: synnefo.config.auth_cookie_name,
637
                logout_callback: function(client) {
638
                    Backbone.history.navigate(client.config.logout_url);
639
                    window.location = client.config.logout_url; 
640
                }
641
            });
642

643
            // user config
644
            synnefo.user = synnefo.auth_client.get_user();
645
            if (!synnefo.user) { synnefo.auth_client.redirect_to_login(); }
646

647
            $(".usermenu .username").text("options");
648

649
            // images config
650
            synnefo.config.system_images_owners = {{ system_images_owners|safe }};
651
            synnefo.ui.init();
652
            synnefo.ui.main.bind("ready", function(){
653
            });
654

655
        })
656
    </script>
657
</body>
658
</html>