home.html 29.3 KB
Newer Older
1
<!doctype html>
Mike Muzurakis's avatar
Mike Muzurakis committed
2
3
<html>

Markos Gogoulos's avatar
Markos Gogoulos committed
4
{% load i18n %}
Dimitris Moraitis's avatar
Dimitris Moraitis committed
5
<head>
6
    <title>~okeanos</title>
7
    
8
    <!--<meta http-equiv="X-UA-Compatible" content="IE=7">-->
9
10
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">

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

Kostas Papadimitriou's avatar
Kostas Papadimitriou committed
14
    <link rel="shortcut icon" href="{{ SYNNEFO_IMAGES_URL }}favicon.ico" />
Kostas Papadimitriou's avatar
Kostas Papadimitriou committed
15

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

20
    <link rel="stylesheet" type="text/css" href="{{ SYNNEFO_CSS_URL }}main.css"/>
Kostas Papadimitriou's avatar
Kostas Papadimitriou committed
21

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

32
    <script src="{{ SYNNEFO_JS_LIB_URL }}jquery-1.7.2.js"></script>
33
34
35
36
    <script src="{{ SYNNEFO_JS_LIB_URL}}jquery.cookie.js"></script>
    <script src="{{ SYNNEFO_JS_LIB_URL}}jquery.client.js"></script>
    <script src="{{ SYNNEFO_JS_LIB_URL}}jquery.tools.min.js"></script>
    <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

Kostas Papadimitriou's avatar
Kostas Papadimitriou committed
41

42
43
44
45
46
    <script src="{{ SYNNEFO_JS_LIB_URL}}underscore.js"></script>
    <script src="{{ SYNNEFO_JS_LIB_URL}}underscore.string.js"></script>
    <script src="{{ SYNNEFO_JS_LIB_URL}}backbone.js"></script>
    <script src="{{ SYNNEFO_JS_LIB_URL}}json2.js"></script>
    <script src="{{ SYNNEFO_JS_LIB_URL}}stacktrace.js"></script>
Kostas Papadimitriou's avatar
Kostas Papadimitriou committed
47

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

    <!--[if IE]>
53
        <script src="{{ SYNNEFO_JS_URL }}ui/ie_fixes.js"></script>
54
    <![endif]-->
Kostas Papadimitriou's avatar
Kostas Papadimitriou committed
55
    
56
    <script src="{{ SYNNEFO_JS_URL }}utils.js"></script>
57
    <script src="{{ SYNNEFO_JS_URL }}auth.js"></script>
58
59
    <script src="{{ SYNNEFO_JS_URL }}sync.js"></script>
    <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
64
65
66
67
68
69
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_vms_base_view.js"></script>
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_model_views.js"></script>
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_error_view.js"></script>
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_icon_view.js"></script>
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_single_view.js"></script>
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_list_view.js"></script>
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_networks_view.js"></script>
70
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_disks_view.js"></script>
71
72
73
74
75
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_metadata_view.js"></script>
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_feedback_view.js"></script>
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_create_view.js"></script>
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_connect_view.js"></script>
    <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
84
85
86
87
88
89
    <script>
        tmp_auth_client = new synnefo.auth.AstakosClient({
            cookie_name: '{{ auth_cookie_name }}',
            login_url: '{{ login_redirect }}'
        });
        if (!tmp_auth_client.get_user()) { tmp_auth_client.redirect_to_login(); }
    </script>
90
    {{ CLOUDBAR_CODE }}
91
    
92
    <script>
93
        // empty object for console to avoid errors in browsers that don't support it
94
95
        if (!window.console) {window.console = {}; window.console.log = window.console.info = window.console.debug =
            window.console.error = function() {}};
96
        
97
98
        //populate available image icons array
        var os_icons = {{image_icons|safe}};
99
        
Dimitris Moraitis's avatar
Dimitris Moraitis committed
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131

        STATE_TEXTS = {
            'UNKNOWN': '{% trans "Unknown" %}',
            'BUILD':  '{% trans "Building..." %}',
            'FIREWALL':  '{% trans "Firewall change..." %}',
            'REBOOT': '{% trans "Rebooting..." %}',
            'STOPPED':'{% trans "Stopped" %}',
            'ACTIVE': '{% trans "Running" %}',
            'ERROR':  '{% trans "Error" %}',
            'DELETE': '',
            'DESTROY': '{% trans "Destroying..." %}',
            'BUILD_INIT':  '{% trans "Building..." %}',
            'BUILD_COPY':  '{% trans "Building..." %}',
            'BUILD_FINAL':  '{% trans "Building..." %}',
            'SHUTDOWN': '{% trans "Shutting down..." %}',
            'START': '{% trans "Starting..." %}',
            'CONNECT': '{% trans "Connecting..." %}',
            'DISCONNECT': '{% trans "Disconnecting..." %}'
        }



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 = {
Dimitris Moraitis's avatar
Dimitris Moraitis committed
140
            // error message header
141
            'HEADER' : '{% trans "Error" %}',
Dimitris Moraitis's avatar
Dimitris Moraitis committed
142
            // default
143
            'DEFAULT' : '{% trans "Could not contact the service. Please check your network connectivity and try again." %}',
Dimitris Moraitis's avatar
Dimitris Moraitis committed
144
145
146
147
148
            // bad request
            '400' : '{% trans "Malformed request." %}',
            // not found
            '404' : '{% trans "Your request has failed. Resource not found." %}',
            // internal server error
Markos Gogoulos's avatar
Markos Gogoulos committed
149
150
151
            '500' : '{% trans "There has been an Internal Error. Our administrators have been notified." %}',
            // service unavailable
            '501' : '{% trans "This server has not been implemented yet." %}',
Dimitris Moraitis's avatar
Dimitris Moraitis committed
152
            // service unavailable
153
154
            '502' : '{% trans "Bad Gateway error." %}',
            // service unavailable
Markos Gogoulos's avatar
Markos Gogoulos committed
155
            '503' : '{% trans "This service is unavailable right now, please try again later." %}',
156
157
            // no server handshake
            '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
163
164
            // error box title
            'GENERIC_POPUP_HEADER' : '{% trans "Something seems to have gone wrong :( Here is what happened:" %}',
            // no advanced details
165
166
167
            'NO_DETAILS' : '{% trans "Νο advanced details provided" %}',
            // timeout message
            'TIMEOUT' : '{% trans "It seems the server takes too long to respond, please check your network connectivity" %}'
Dimitris Moraitis's avatar
Dimitris Moraitis committed
168
        };
169

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

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

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

192
    </script>
Dimitris Moraitis's avatar
Dimitris Moraitis committed
193
</head>
194

Kostas Papadimitriou's avatar
Kostas Papadimitriou committed
195
<body id="app">
196
    <!--<img id="okeanos-image" src="{{ SYNNEFO_IMAGES_URL }}body-bg2.png" />-->
197
    <div id="container">
198
199
        <div id="header">
            <div id="user">
200
                <div class="usermenu">
201
                    <div class="username"></div>
202
                    <ul class="useractions">
Kostas Papadimitriou's avatar
Kostas Papadimitriou committed
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>-->
Kostas Papadimitriou's avatar
Kostas Papadimitriou committed
207
                        <!--<li class="logout last"><a class="action" href="#">{% trans "logout" %}</a></li>-->
208
209
210
                    </ul>
                </div>
                <div class="langmenu">
211
212
                    <a class="current_lang">en</a>
                    {% comment %}
213
214
                {% get_available_languages as LANGUAGES %}
                {% for lang in LANGUAGES %}
215
216
217
                <a {% if current_lang == lang.0 %}
                    class="current_lang" {% else %}  href="/lang/?l={{lang.0}}" {% endif %}>{{lang.0}}</a>

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

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

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

284
285
                </div>
            </div>
Dimitris Moraitis's avatar
Dimitris Moraitis committed
286
287
        </div>
    </div>
288

Dimitris Moraitis's avatar
Dimitris Moraitis committed
289
290
    <!-- activate tabs with JavaScript -->
    <script>
291

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

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

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

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

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

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

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

329
330
331
            $(".usermenu .api").click(function(){
                synnefo.ui.main.api_info_view.show();
            });
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373

        });
        
        function positionBottomMessages() {
            var el = $("#multiple_actions_container");
        }

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

               positionFooter();
               function positionFooter() {
                   footerHeight = 80;
                   footerTop = ($(window).scrollTop()+$(window).height()-footerHeight)+"px";
                   if (($(document.body).height()+footerHeight) < $(window).height()) {

                       $footer.css({
                            position: "absolute"
                       }).css({
                            top: footerTop
                       })
                    } else {
                    
                       if ($footer.css("position") == "static") {
                           if ($(document.body).height() < $(window).height()) {    
                               $footer.css({
                                    position: "absolute"
                               }).css({
                                    top: footerTop
                                })
                            }
                        } else {

                           $footer.css({
                               position: "static"
                           })
                       }
                   }

                   }
374
               window.positionFooter = _.throttle(positionFooter, 100);
375
               $(window).scroll(positionFooter).resize(positionFooter)
376
        });
Dimitris Moraitis's avatar
Dimitris Moraitis committed
377
    </script>
378

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

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

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

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

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

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

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

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

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

507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
    <div id="api-info-overlay" class="overlay-content overlay-info hidden">
        <div class="description">
            <p>{% blocktrans with EXTERNAL_CLIENT_URL as EXTERNAL_CLIENT_URL %}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.{% endblocktrans %}</p>
        </div>
        <div class="copy-content">
            <p></p>
        </div>
        <div class="description subinfo">
            <p>
            {% trans "The API key provides full access to your <em>~okeanos</em> account, so always keep it private." %}
            </p>
        </div>
    </div>

523
524
    <div class="api_overlay_template">
        <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
527
        </div>
    </div>
Kostas Papadimitriou's avatar
Kostas Papadimitriou committed
528
529

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

    <script>
        $(document).ready(function() {
            $(".css-panes").hide();
Kostas Papadimitriou's avatar
Kostas Papadimitriou committed
561

562
            // TODO: match <= 1.9.1
Kostas Papadimitriou's avatar
Kostas Papadimitriou committed
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
572
573
574
            synnefo.config.update_interval_increase = {{ update_interval_increase }};
            synnefo.config.fast_interval = {{ update_interval_fast }};
            synnefo.config.update_interval_increase_after_calls = {{ update_interval_increase_after_calls }};
            synnefo.config.update_interval_max = {{ update_interval_max }};
575
576
577
578
579
            synnefo.config.delay_on_blur = {{ delay_on_blur }};
            synnefo.config.update_hidden_views = {{ update_hidden_views }};
            synnefo.config.handle_window_exceptions = {{ handle_window_exceptions }};
            synnefo.config.ajax_timeout = {{ timeout }};
            synnefo.config.skip_timeouts = {{ skip_timeouts }};
580
581
            synnefo.config.machines_icons_url = '{{ SYNNEFO_IMAGES_URL }}icons/machines/';
            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
586
587
588
589
590
591
592
593
594
595

            synnefo.config.diagnostics_update_interval = {{ diagnostics_update_interval }};
            // override diagnostic messages display
            synnefo.config.diagnostic_messages_tpls = {
              'image-helper-task-start': "{% trans "Running task 'MESSAGE'" %}"
            };
            // what messages to display based on vm status
            synnefo.config.diagnostics_status_messages_map = {
                'BUILD': ['image-helper-task-start', 'image-info'],
                'ERROR': ['image-error']
            };

Kostas Papadimitriou's avatar
Kostas Papadimitriou committed
596
597
   			// TODO: make it dynamic
            synnefo.config.api_urls = {
Kostas Papadimitriou's avatar
Kostas Papadimitriou committed
598
599
                'compute':  {{ compute_api_url|safe }}, 
                'glance': {{ glance_api_url|safe }}
Kostas Papadimitriou's avatar
Kostas Papadimitriou committed
600
            };
601
            
Kostas Papadimitriou's avatar
Kostas Papadimitriou committed
602
603
            // TODO: configurable userdata urls in models.js
            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
609
            synnefo.config.media_url = '{{ UI_MEDIA_URL }}';
            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 }};
Kostas Papadimitriou's avatar
Kostas Papadimitriou committed
614
            synnefo.config.use_glance = {{ use_glance }};
615
616
            synnefo.config.indicators_icons_url = '{{ SYNNEFO_IMAGES_URL }}icons/indicators/';
            synnefo.config.machines_icons_url = '{{ SYNNEFO_IMAGES_URL }}icons/machines/';
617
618
            synnefo.config.support_ssh_os_list = {{ support_ssh_os_list|safe }};
            synnefo.config.os_created_users = {{ os_created_users|safe }};
619
620
621
622
            
            synnefo.config.logout_redirect = '{{ logout_redirect }}';
            synnefo.config.login_redirect = '{{ login_redirect }}';
            synnefo.config.auth_cookie_name = '{{ auth_cookie_name }}';
623
624
625
626
627
628

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

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

Kostas Papadimitriou's avatar
Kostas Papadimitriou committed
646
            $(".usermenu .username").text("options");
647

648
            // images config
649
            synnefo.config.system_images_owners = {{ system_images_owners|safe }};
650
            synnefo.ui.init();
651
            synnefo.ui.main.bind("ready", function(){
Kostas Papadimitriou's avatar
Kostas Papadimitriou committed
652
            });
653

654
655
        })
    </script>
Dimitris Moraitis's avatar
Dimitris Moraitis committed
656
657
</body>
</html>