Statistics
| Branch: | Tag: | Revision:

root / snf-app / synnefo / ui / templates / home.html @ 6c32043b

History | View | Annotate | Download (26.8 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 7)]>
26
        <style type="text/css" media="all">@import url({{ SYNNEFO_CSS_URL }}ie7.css);</style>
27
    <![endif]-->
28

    
29
    <script src="{{ SYNNEFO_JS_LIB_URL }}jquery-1.7.1.js"></script>
30
    <script src="{{ SYNNEFO_JS_LIB_URL}}jquery.cookie.js"></script>
31
    <script src="{{ SYNNEFO_JS_LIB_URL}}jquery.client.js"></script>
32
    <script src="{{ SYNNEFO_JS_LIB_URL}}jquery.tools.min.js"></script>
33
    <script src="{{ SYNNEFO_JS_LIB_URL}}jquery.dataTables.min.js"></script>
34
    <script src="{{ SYNNEFO_JS_LIB_URL}}jquery.pagination.js"></script>
35
    <script src="{{ SYNNEFO_JS_LIB_URL}}jquery.zclip.js"></script>
36
    <script src="{{ SYNNEFO_JS_LIB_URL}}jquery.base64.js"></script>
37

    
38

    
39
    <script src="{{ SYNNEFO_JS_LIB_URL}}underscore.js"></script>
40
    <script src="{{ SYNNEFO_JS_LIB_URL}}underscore.string.js"></script>
41
    <script src="{{ SYNNEFO_JS_LIB_URL}}backbone.js"></script>
42
    <script src="{{ SYNNEFO_JS_LIB_URL}}json2.js"></script>
43
    <script src="{{ SYNNEFO_JS_LIB_URL}}stacktrace.js"></script>
44

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

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

    
59
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_vms_base_view.js"></script>
60
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_model_views.js"></script>
61
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_error_view.js"></script>
62
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_icon_view.js"></script>
63
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_single_view.js"></script>
64
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_list_view.js"></script>
65
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_networks_view.js"></script>
66
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_metadata_view.js"></script>
67
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_feedback_view.js"></script>
68
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_invitations_view.js"></script>
69
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_create_view.js"></script>
70
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_connect_view.js"></script>
71
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_public_keys_view.js"></script>
72
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_custom_images.js"></script>
73

    
74
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_router.js"></script>
75
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_main_view.js"></script>
76

    
77
    <!-- the following views require refactor -->
78
    <script src="{{ SYNNEFO_JS_URL }}invitations.js"></script>
79
    <script src="{{ SYNNEFO_JS_URL }}synnefo.js"></script>
80
    
81
    <script>
82
        // empty object for console to avoid errors in browsers that don't support it
83
        if (!window.console) {window.console = {}; window.console.log = window.console.info = window.console.debug =
84
            window.console.error = function() {}};
85
        
86
        //populate available image icons array
87
        var os_icons = {{image_icons|safe}};
88
        
89
        // timeout value from settings.py
90
        var TIMEOUT = {{ timeout }};
91
        var TIMEOUTS_OCCURED = 0;
92
        var SKIP_TIMEOUTS = 1;
93
        var UPDATE_INTERVAL = {{ update_interval }};
94
        var LOGOUT_REDIRECT = '{{ logout_redirect }}';
95
        var INVITATIONS_URL = "{% url invitations %}";
96
        var INVITATIONS_TITLE = "{% trans "Invite people" %}";
97
        var APP_DEBUG = {% if DEBUG %}true{% else %}false{% endif %};
98
        var FEEDBACK_URL = "{% url feedback %}";
99
        var FEEDBACK_TITLE = "{% trans "Send feedback" %}";
100
        var API_OVERLAY_TITLE = "{% trans "API access" %}";
101
        var API_OVERLAY_SUBCONTENT = "{% trans "The API key provides full access to your <em>~okeanos</em> account, so always keep it private." %}";
102

103
        STATE_TEXTS = {
104
            'UNKNOWN': '{% trans "Unknown" %}',
105
            'BUILD':  '{% trans "Building..." %}',
106
            'FIREWALL':  '{% trans "Firewall change..." %}',
107
            'REBOOT': '{% trans "Rebooting..." %}',
108
            'STOPPED':'{% trans "Stopped" %}',
109
            'ACTIVE': '{% trans "Running" %}',
110
            'ERROR':  '{% trans "Error" %}',
111
            'DELETE': '',
112
            'DESTROY': '{% trans "Destroying..." %}',
113
            'BUILD_INIT':  '{% trans "Building..." %}',
114
            'BUILD_COPY':  '{% trans "Building..." %}',
115
            'BUILD_FINAL':  '{% trans "Building..." %}',
116
            'SHUTDOWN': '{% trans "Shutting down..." %}',
117
            'START': '{% trans "Starting..." %}',
118
            'CONNECT': '{% trans "Connecting..." %}',
119
            'DISCONNECT': '{% trans "Disconnecting..." %}'
120
        }
121

122

123

124
        // building statuses
125
        var BUILDING_MESSAGES = {
126
            'INIT': '{% trans "Initializing..." %}',
127
            'COPY': '{% trans "{0} of {1} ({2}%)" %}',
128
            'FINAL': '{% trans "Finalizing..." %}'
129
        }
130

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

162
        var SUGGESTED_FLAVORS = {{ suggested_flavors|safe }};
163
        var SUGGESTED_ROLES = {{ suggested_roles|safe }}
164

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

176
        var VARIOUS = {
177
            'CONFIRM' : '{% trans "Confirm" %}',
178
            'CANCEL' : '{% trans "Cancel" %}',
179
            'APPLY' : '{% trans "Apply" %}',
180
            'OFF' : '{% trans "Off" %}',
181
            'ON' : '{% trans "On" %}'
182
        };
183

    
184
    </script>
185
</head>
186

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

    
211
                    {% if not forloop.last %}<span class="sep">~</span>{% endif %}
212
                    {% endfor %}
213
                {% endcomment %}
214
                </div>
215
            </div>
216
            <div class="header-logo">
217
                <a href="/">
218
                    <img src="{{ SYNNEFO_IMAGES_URL }}okeanos-logo-alpha.png" alt="okeanos (alpha)"/>
219
                </a>
220
            </div>
221
        </div>
222
        <div id="content">
223
            <div id="wrapper" class="clearfix">
224

    
225
                <div class="panes-menu clearfix">
226
                <!-- tabs -->
227
                <div class="tab-name">{% trans "machines" %}</div>
228
                <ul class="css-tabs">
229
                    <li><a href="machines" title="{% trans "manage  virtual " %}"
230
                        class="primary" id="machines_view_link">
231
                        <img src="{{ SYNNEFO_IMAGES_URL }}machines-icon.png" /></a></li>
232
                    <li><a href="networks" title="{% trans "configure " %}"
233
                        class="primary" id="networks_view_link">
234
                        <img src="{{ SYNNEFO_IMAGES_URL }}networks-icon.png" /></a></li>
235
                    <li class="hidden"><a href="disks" title="{% trans "manage  storage " %}"
236
                        class="primary" id="disks_view_link">
237
                        <img src="{{ SYNNEFO_IMAGES_URL }}disks-icon.png" /></a></li>
238
                </ul>
239
                </div>
240
                <div class="css-panes">
241
                    <div id="machines-pane" class="pane" style="display:block;">
242
                        {% include "partials/machines.html" %}
243
                    </div>
244
                    <div id="networks-pane" class="pane">
245
                        {% include "partials/networks.html" %}
246
                    </div>
247
                    <div id="disks-pane" class="pane"></div>
248

    
249
                    <div class="confirm_multiple clearfix" id="multiple_actions_container">
250
                        <div class="confirm_multiple_actions confirm-all-cont global hidden confirm_multiple_cont clearfix">
251
                            <div class="confirm-all msg">
252
                                <p>You requested multiple actions to execute (<span
253
                                    class"show">show all</span>)</p>
254
                                <button class="yes">Confirm all</button>
255
                                <button class="no">Cancel all</button>
256
                            </div>
257
                            <div class="details"></div>
258
                        </div>
259
                        <div class="ns-confirms-cont">
260
                            <div class="confirm_multiple_actions hidden confirm_multiple_cont
261
                                ns-confirm clearfix"
262
                                id="conirm_multiple_cont_template">
263
                                <div class="confirm-all msg">
264
                                    <p></p>
265
                                    <button class="yes"></button>
266
                                    <button class="no"></button>
267
                                </div>
268
                                <div class="details"></div>
269
                            </div>
270
                        </div>
271
                    </div>
272

    
273
                </div>
274
            </div>
275
        </div>
276
    </div>
277

    
278
    <!-- activate tabs with JavaScript -->
279
    <script>
280

281
        //load opera css fixes
282
        if ($.browser.opera) {
283
            $("<link/>", {
284
               rel: "stylesheet",
285
               type: "text/css",
286
               href: "{{ SYNNEFO_CSS_URL }}opera.css"
287
            }).appendTo("head");
288
        }
289

290
        $(document).ready(function(){
291

292
            {% if current_lang == "el" and not DEBUG %}
293
                window.location = "/lang/?l=en";
294
            {% endif %}
295

296
            // user menu interaction
297
            var resetUserMenu = function() {
298
                $(this).removeClass("hovered");
299
                $(this).removeClass("active");
300
            }
301

302
            $(".usermenu").live("click", function(){
303
                $(this).addClass("active");
304
            });
305
            $(".usermenu").bind('mouseleave', resetUserMenu);
306
            $(".usermenu").live("mouseover", function(){
307
                $(this).addClass("hovered");
308
            });
309

310
            $(".usermenu li").mouseenter(function(){$(this).addClass("hovered")})
311
            $(".usermenu li").mouseleave(function(){$(this).removeClass("hovered")});
312

313
            // bind menu actions
314
            $(".usermenu .logout").click(function() {
315
                synnefo.ui.logout();
316
            });
317

318
            $(".usermenu .api").click(function(){
319
                synnefo.ui.main.api_info_view.show();
320
            });
321

322
        });
323
        
324
        function positionBottomMessages() {
325
            var el = $("#multiple_actions_container");
326
        }
327

328
        $(window).bind("load", function() { 
329
               var footerHeight = 0;
330
               var footerTop = 0;
331
               var $footer = $("#footer-container");
332

333
               positionFooter();
334
               function positionFooter() {
335
                   footerHeight = 80;
336
                   footerTop = ($(window).scrollTop()+$(window).height()-footerHeight)+"px";
337
                   if (($(document.body).height()+footerHeight) < $(window).height()) {
338

339
                       $footer.css({
340
                            position: "absolute"
341
                       }).css({
342
                            top: footerTop
343
                       })
344
                    } else {
345
                    
346
                       if ($footer.css("position") == "static") {
347
                           if ($(document.body).height() < $(window).height()) {    
348
                               $footer.css({
349
                                    position: "absolute"
350
                               }).css({
351
                                    top: footerTop
352
                                })
353
                            }
354
                        } else {
355

356
                           $footer.css({
357
                               position: "static"
358
                           })
359
                       }
360
                   }
361

362
                   }
363
               window.positionFooter = _.throttle(positionFooter, 100);
364
               $(window).scroll(positionFooter).resize(positionFooter)
365
        });
366
    </script>
367

    
368
    <!-- base notification for error/success reporting -->
369
    <a id="notification" rel="#error-success" href="#"></a>
370
    <a id="msgbox" rel="#notification-box" href="#"></a>
371
    <a id="feedbackbox" rel="#feedback-form" href="#"></a>
372

    
373
    <div class="overlay" id="generic-overlay-tpl">
374
        <div class="overlay-inner">
375
            <h3 class="overlay-header clearfix">
376
                <span class="subtitle"></span>
377
                <span class="title"></span>
378
                <span class="closeme">close</span></h3>
379
            <div class="container">
380
                <div class="content">
381
                </div>
382
            </div>
383
            <div class="footer"></div>
384
        </div>
385
    </div>
386

    
387
    <div id="error-overlay-content" class="hidden">
388
        <div class="error-nav hidden clearfix">
389
            <span class="indicator"><span class="num">1</span> <span
390
                    class="ind-msg">new error occured</span></span>
391
            <span class="show-next nav-btn">{% trans "next" %}</span>
392
            <span class="show-prev nav-btn">{% trans "previous" %}</span>
393
        </div>
394
        <div class="message"><p></p></div>
395
        <div class="error-details">
396
            <span class="key">{% trans "Module" %}</span>
397
            <span class="value error-module"></span>
398

    
399
            <span class="key">{% trans "Code" %}</span>
400
            <span class="value error-code"></span>
401

    
402
            <span class="key">{% trans "Type" %}</span>
403
            <span class="value error-type"></span>
404

    
405
            <span class="key details">{% trans "Details" %}</span>
406
            <div class="value error-more-details"><p></p></div>
407
        </div>
408
        
409
        <!--<div class="navigation">-->
410
            <!--<span class="next-error">{% trans "next error" %}</span>-->
411
            <!--<span class="previous-error">{% trans "previous error" %}</span>-->
412
        <!--</div>-->
413
        
414
        <!--<div class="date">-->
415
            <!--<span class="error-date"></span>-->
416
        <!--</div>-->
417

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

    
471
                    <input type="checkbox" name="submit-submit-data" class='submit-data' />
472
                    <input type="submit" value="{% trans "submit " %}" class="submit" />
473
                    <textarea name="feedback-data" class="data-text"></textarea>
474
                </form>
475
            </div>
476

    
477
            <div class="message sending">{% trans "submiting your data....." %}</div>
478
            <div class="message success">
479
                {% trans "thank you for submiting your feedback" %}
480
                <span class="close-msg-box"> {% trans "close feedback" %}</span></div>
481
            <div class="message errormsg">
482
                {% trans "some error occured submiting submiting your feedback, please try again later" %}
483
                <span class="close-msg-box"> {% trans "close feedback" %}</span></div>
484
            </div>
485
            </div>
486
        </div>
487
    </div>
488
    
489
    <div id="api-info-overlay" class="overlay-content overlay-info hidden">
490
        <div class="description">
491
            <p>{% blocktrans with EXTERNAL_CLIENT_URL as EXTERNAL_CLIENT_URL %}Use the following API key along with the <a
492
                href="{{ EXTERNAL_CLIENT_URL }}">./kamaki</a> client to manage
493
            your cloud resources from outside this page.{% endblocktrans %}</p>
494
        </div>
495
        <div class="copy-content">
496
            <p></p>
497
        </div>
498
        <div class="description subinfo">
499
            <p>
500
            {% trans "The API key provides full access to your <em>~okeanos</em> account, so always keep it private." %}
501
            </p>
502
        </div>
503
    </div>
504

    
505
    <div class="api_overlay_template">
506
        <div class="api_overlay_content">
507
            <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>
508
        </div>
509
    </div>
510

    
511
    <div class="modal" id="notification-box" class="notification-box">
512
        <h3 class="popup-header">
513
            <span class="header-box"></span>
514
        </h3>
515
        <div class="popup-body">
516
            <div class="popup-body-inner">
517
                <div class="machine-now-building"></div>
518
                <div class="popup-separator"></div>
519
                <div class="password-container">
520
                    <div class="password"></div>
521
                </div>
522
                <div class="sub-text"></div>
523
            </div>
524
        </div>
525
    </div>
526
    
527
    <div id="loading-view" class="hidden">
528
        <img src="{{ SYNNEFO_IMAGES_URL }}icons/indicators/small/progress.gif" />
529
        <div class="header">Loading <span>~okeanos</span></div>
530
        <div class="info hidden"></div>
531
    </div>
532
    <div id="user_public_keys" class="overlay-content overlay-content hidden">
533
        {% include "userdata/public_keys_view.html" %}
534
    </div>
535
    <div id="user_custom_images" class="overlay-content overlay-content hidden">
536
        {% include "partials/custom_images.html" %}
537
    </div>
538
    {% include "footer.html" %}
539

    
540
    <script>
541
        $(document).ready(function() {
542
            $(".css-panes").hide();
543

544
            // TODO: match <= 1.9.1
545
            if ($.browser.mozilla && $.browser.version.substr(0,3) == "1.9") {
546
                synnefo.config.overlay_speed = 0;
547
                $.fx.off = true;
548
            }
549
            
550
            // synnefo js config
551
            synnefo.VERSION = "{{ synnefo_version }}";
552
            synnefo.config.update_interval = {{ update_interval }};
553
            synnefo.config.update_interval_increase = {{ update_interval_increase }};
554
            synnefo.config.fast_interval = {{ update_interval_fast }};
555
            synnefo.config.update_interval_increase_after_calls = {{ update_interval_increase_after_calls }};
556
            synnefo.config.update_interval_max = {{ update_interval_max }};
557
            synnefo.config.delay_on_blur = {{ delay_on_blur }};
558
            synnefo.config.update_hidden_views = {{ update_hidden_views }};
559
            synnefo.config.handle_window_exceptions = {{ handle_window_exceptions }};
560
            synnefo.config.ajax_timeout = {{ timeout }};
561
            synnefo.config.skip_timeouts = {{ skip_timeouts }};
562
            synnefo.config.invitations_url = "{% url invitations %}";
563
            synnefo.config.machines_icons_url = '{{ SYNNEFO_IMAGES_URL }}icons/machines/';
564
            synnefo.config.vm_name_template = {{ vm_name_template|safe }};
565
            synnefo.config.flavors_disk_templates_info = {{ flavors_disk_templates_info|safe }};
566
                           // TODO: make it dynamic
567
            synnefo.config.api_urls = {
568
                'compute':  {{ compute_api_url|safe }}, 
569
                'glance': {{ glance_api_url|safe }}
570
            };
571
            // TODO: configurable userdata urls in models.js
572
            synnefo.config.userdata_url = '/ui/userdata';
573
            synnefo.config.logout_url = '{{ logout_redirect }}';
574
            synnefo.config.userdata_keys_url = '{% url keys_collection %}';
575
            synnefo.config.userdata_keys_limit = {{ userdata_keys_limit }};
576
            // media config
577
            synnefo.config.media_url = '{{ UI_MEDIA_URL }}';
578
            synnefo.config.js_url = '{{ SYNNEFO_JS_URL }}';
579
            synnefo.config.images_url = '{{ SYNNEFO_IMAGES_URL }}';
580
            synnefo.config.use_glance = {{ use_glance }};
581
            synnefo.config.indicators_icons_url = '{{ SYNNEFO_IMAGES_URL }}icons/indicators/';
582
            synnefo.config.machines_icons_url = '{{ SYNNEFO_IMAGES_URL }}icons/machines/';
583
            synnefo.config.support_ssh_os_list = {{ support_ssh_os_list|safe }};
584
            synnefo.config.os_created_users = {{ os_created_users|safe }};
585
            // user config
586
            synnefo.user = {};
587
            synnefo.user.username = '{{ request.user.uniq }}';
588
            synnefo.user.token = $.cookie("X-Auth-Token");
589
            // images config
590
            synnefo.config.system_images_owners = {{ system_images_owners|safe }};
591
            synnefo.ui.init();
592
            synnefo.ui.main.bind("initial", function(){
593
            });
594

595
        })
596
    </script>
597
</body>
598
</html>