Statistics
| Branch: | Tag: | Revision:

root / snf-cyclades-app / synnefo / ui / templates / home.html @ 209a38bc

History | View | Annotate | Download (33 kB)

1
<!doctype html>
2
<html>
3

    
4
{% load i18n %}
5
<head>
6
    <title>{{ BRANDING_SERVICE_NAME }}</title>
7
    
8
    <!--<meta http-equiv="X-UA-Compatible" content="IE=7">-->
9
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
10

    
11
    <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="{{ BRANDING_FAVICON_URL }}" />
15

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

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

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

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

    
45

    
46
    <script src="{{ SYNNEFO_JS_LIB_URL}}underscore.js?v={{ SYNNEFO_JS_LIB_VERSION }}"></script>
47
    <script src="{{ SYNNEFO_JS_LIB_URL}}underscore.string.js?v={{ SYNNEFO_JS_LIB_VERSION }}"></script>
48
    <script src="{{ SYNNEFO_JS_LIB_URL}}rivets.conf.js"></script>
49
    <script src="{{ SYNNEFO_JS_LIB_URL}}backbone.js?v={{ SYNNEFO_JS_LIB_VERSION }}"></script>
50
    <script src="{{ SYNNEFO_JS_LIB_URL}}json2.js?v={{ SYNNEFO_JS_LIB_VERSION }}"></script>
51
    <script src="{{ SYNNEFO_JS_LIB_URL}}stacktrace.js?v={{ SYNNEFO_JS_LIB_VERSION }}"></script>
52
    <script src="{{ SYNNEFO_JS_LIB_URL}}backbone-filtered-collection.js?v={{ SYNNEFO_JS_LIB_VERSION }}"></script>
53

    
54
    <!--[if (lt IE 7)]>
55
        <script src="{{ SYNNEFO_JS_LIB_URL }}selectivizr.js?v={{ SYNNEFO_JS_LIB_VERSION }}"></script>
56
    <! [endif] -->
57

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

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

    
90
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_router.js?v={{ SYNNEFO_JS_LIB_VERSION }}"></script>
91
    <script src="{{ SYNNEFO_JS_WEB_URL }}ui_main_view.js?v={{ SYNNEFO_JS_LIB_VERSION }}"></script>
92

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

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

138

139

140
        // building statuses
141
        var BUILDING_MESSAGES = {
142
            'INIT': '{% trans "Initializing..." %}',
143
            'COPY': '{% trans "{0} of {1} ({2}%)" %}',
144
            'FINAL': '{% trans "Bulding image..." %}'
145
        }
146

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

178
        var SUGGESTED_FLAVORS = {{ suggested_flavors|safe }};
179
        var SUGGESTED_ROLES = {{ suggested_roles|safe }}
180

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

192
        var VARIOUS = {
193
            'CONFIRM' : '{% trans "Confirm" %}',
194
            'CANCEL' : '{% trans "Cancel" %}',
195
            'APPLY' : '{% trans "Apply" %}',
196
            'OFF' : '{% trans "Off" %}',
197
            'ON' : '{% trans "On" %}'
198
        };
199

    
200
    </script>
201
</head>
202

    
203
<body id="app">
204
    <div id="container">
205
        <div id="header">
206
            <div id="user">
207
                <div class="usermenu">
208
                    <div class="username"></div>
209
                    <ul class="useractions">
210
                        <!--<li class="feedback"><a class="action" href="#">{% trans "send feedback..." %}</a></li>-->
211
                        <li class="api"><a class="action" href="#">{% trans "API access..." %}</a></li>
212
                        <li class="public_ips"><a class="action" href="#">{% trans "IP addresses..." %}</a></li>
213
                        <li class="public_keys"><a class="action" href="#">{% trans "ssh public keys..." %}</a></li>
214
                        <!--<li class="custom_images"><a class="action" href="#">{% trans "custom images..." %}</a></li>-->
215
                        <!--<li class="logout last"><a class="action" href="#">{% trans "logout" %}</a></li>-->
216
                    </ul>
217
                </div>
218
                <div class="langmenu">
219
                    <a class="current_lang">en</a>
220
                    {% comment %}
221
                {% get_available_languages as LANGUAGES %}
222
                {% for lang in LANGUAGES %}
223
                <a {% if  == lang.0 %}
224
                    class="current_lang" {% else %}  href="/lang/?l={{lang.0}}" {% endif %}>{{lang.0}}</a>
225

    
226
                    {% if not forloop.last %}<span class="sep">~</span>{% endif %}
227
                    {% endfor %}
228
                {% endcomment %}
229
                </div>
230
            </div>
231
            <div class="header-logo">
232
                <a href="/" title="{{ BRANDING_SERVICE_NAME }} Compute">
233
                     <img src="{{ BRANDING_COMPUTE_LOGO_URL }}" alt="{{ BRANDING_SERVICE_NAME }}"/>  
234
                </a>
235
            </div>
236
        </div>
237
        <div id="content">
238
            <div id="wrapper" class="clearfix">
239

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    
394
    <!-- base notification for error/success reporting -->
395
    <a id="notification" rel="#error-success" href="#"></a>
396
    <a id="msgbox" rel="#notification-box" href="#"></a>
397
    <a id="feedbackbox" rel="#feedback-form" href="#"></a>
398

    
399
    <div class="overlay" id="generic-overlay-tpl">
400
        <div class="overlay-inner">
401
            <h3 class="overlay-header clearfix">
402
                <span class="subtitle"></span>
403
                <span class="title"></span>
404
                <span class="closeme">close</span></h3>
405
            <div class="container">
406
                <div class="content">
407
                </div>
408
            </div>
409
            <div class="footer"></div>
410
        </div>
411
    </div>
412

    
413
    <div id="error-overlay-content" class="hidden">
414
        <div class="error-nav hidden clearfix">
415
            <span class="indicator"><span class="num">1</span> <span
416
                    class="ind-msg">new error occured</span></span>
417
            <span class="show-next nav-btn">{% trans "next" %}</span>
418
            <span class="show-prev nav-btn">{% trans "previous" %}</span>
419
        </div>
420
        <div class="message"><p></p></div>
421
        <div class="error-details">
422
            <span class="key">{% trans "Module" %}</span>
423
            <span class="value error-module"></span>
424

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

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

    
431
            <span class="key details">{% trans "Details" %}</span>
432
            <div class="value error-more-details"><p></p></div>
433
        </div>
434
        
435
        <!--<div class="navigation">-->
436
            <!--<span class="next-error">{% trans "next error" %}</span>-->
437
            <!--<span class="previous-error">{% trans "previous error" %}</span>-->
438
        <!--</div>-->
439
        
440
        <!--<div class="date">-->
441
            <!--<span class="error-date"></span>-->
442
        <!--</div>-->
443

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

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

    
502
          <div class="message sending">{% trans "submiting your data....." %}</div>
503
          <div class="message success">
504
            {% trans "thank you for submiting your feedback" %}
505
            <span class="close-msg-box"> {% trans "close feedback" %}</span></div>
506
          <div class="message errormsg">
507
            {% trans "some error occured submiting submiting your feedback, please try again later" %}
508
            <span class="close-msg-box"> {% trans "close feedback" %}</span></div>
509
        </div>
510
      </div>
511
    </div>
512
    
513
    <div id="details-overlay" class="overlay-content overlay-info hidden">
514
        <div class="description intro">
515
            <p></p>
516
        </div>
517
        <div class="description subinfo">
518
            <p></p>
519
        </div>
520
    </div>
521

    
522
    <div id="suspended-vm-overlay" class="overlay-content overlay-info hidden">
523
        <div class="description noborder">
524
          You VM has been suspended, please contact us for more details.
525
        </div>
526
    </div>
527

    
528
    <div id="api-info-overlay" class="overlay-content overlay-info hidden">
529
        <div class="description">
530
            <p>{% blocktrans with EXTERNAL_CLIENT_URL as EXTERNAL_CLIENT_URL %}Use the following API key along with the <a
531
                href="{{ EXTERNAL_CLIENT_URL }}">./kamaki</a> client to manage
532
            your cloud resources from outside this page.{% endblocktrans %}</p>
533
        </div>
534
        <div class="copy-content">
535
            <p></p>
536
        </div>
537
        <div class="description subinfo">
538
            <p>
539
            {% blocktrans %} The API key provides full access to your <em>{{ BRANDING_SERVICE_NAME }}</em> account, so always keep it private.{% endblocktrans %}
540
            </p>
541
        </div>
542
    </div>
543

    
544
    <div class="api_overlay_template">
545
        <div class="api_overlay_content">
546
            <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>
547
        </div>
548
    </div>
549

    
550
    <div class="modal" id="notification-box" class="notification-box">
551
        <h3 class="popup-header">
552
            <span class="header-box"></span>
553
        </h3>
554
        <div class="popup-body">
555
            <div class="popup-body-inner">
556
                <div class="machine-now-building"></div>
557
                <div class="popup-separator"></div>
558
                <div class="password-container">
559
                    <div class="password"></div>
560
                </div>
561
                <div class="sub-text"></div>
562
            </div>
563
        </div>
564
    </div>
565
    
566
    <div id="loading-view" class="hidden clearfix">
567
        <div class="header clearfix images off">Loading images...<span></span></div>
568
        <div class="header clearfix flavors off">Loading flavors...<span></span></div>
569
        <div class="header clearfix resources off">Loading resources...<span></span></div>
570
        <div class="header clearfix quotas off">Loading quotas...<span></span></div>
571
        <div class="header clearfix vms off">Loading machines...<span></span></div>
572
        <div class="header clearfix networks off">Loading networks...<span></span></div>
573
        <div class="header clearfix layout off">Rendering layout...<span></span></div>
574
    </div>
575
    <div id="user_public_keys" class="overlay-content overlay-content hidden">
576
        {% include "userdata/public_keys_view.html" %}
577
    </div>
578
    <div id="user_public_ips" class="overlay-content overlay-content hidden">
579
        {% include "partials/ips.html" %}
580
    </div>
581
    <div id="user_custom_images" class="overlay-content overlay-content hidden">
582
        {% include "partials/custom_images.html" %}
583
    </div>
584
    {% include "partials/vm_resize.html" %}
585
    {% include "footer.html" %}
586

    
587
    <script>
588
        $(document).ready(function() {
589
            $(".css-panes").hide();
590

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

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

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

658
            synnefo.config.translate_uuids = {{ translate_uuids|safe }};
659
            synnefo.config.user_catalog_url = {{ user_catalog_url|safe }};
660

661
            synnefo.config.network_suggested_subnets = {{ network_suggested_subnets|safe }};
662
            synnefo.config.network_available_types = {{ network_available_types|safe }};
663
            synnefo.config.network_allow_duplicate_vm_nics = {{ network_allow_duplicate_vm_nics }};
664
            synnefo.config.network_strict_destroy = {{ network_strict_destroy }};
665
            synnefo.config.network_allow_multiple_destory = {{ network_allow_multiple_destroy }};
666
            synnefo.config.group_public_networks = {{ group_public_networks }};
667
            synnefo.config.grouped_public_network_name = {{ grouped_public_network_name|safe }};
668
            synnefo.config.vm_hostname_format = {{ vm_hostname_format|safe }};
669
            synnefo.config.automatic_network_range_format = {{ automatic_network_range_format|safe }};
670
            synnefo.config.custom_image_help_url = '{{ custom_image_help_url|safe }}';
671
            
672
            synnefo.auth_client = new synnefo.auth.AstakosClient({
673
                login_url: synnefo.config.login_redirect,
674
                logout_url: synnefo.config.logout_redirect,
675
                cookie_name: synnefo.config.auth_cookie_name,
676
                skip_redirects: {{ auth_skip_redirects|safe }},
677
                logout_callback: function(client) {
678
                    Backbone.history.navigate(client.config.logout_url);
679
                    window.location = client.config.logout_url; 
680
                }
681
            });
682

683
            // user config
684
            synnefo.user = synnefo.auth_client;
685
            if (!synnefo.user.get_token()) { 
686
              synnefo.auth_client.redirect_to_login(); 
687
            }
688

689
            $(".usermenu .username").text("options");
690

691
            // images config
692
            synnefo.config.system_images_owners = {{ system_images_owners|safe }};
693
            synnefo.ui.init();
694
            synnefo.ui.main.bind("ready", function(){
695
            });
696
        });
697
    </script>
698
</body>
699
</html>