Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (33.2 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
                {% comment %}
208
                <div class="langmenu">
209
                    <a class="current_lang">en</a>
210
                {% get_available_languages as LANGUAGES %}
211
                {% for lang in LANGUAGES %}
212
                <a {% if  == lang.0 %}
213
                    class="current_lang" {% else %}  href="/lang/?l={{lang.0}}" {% endif %}>{{lang.0}}</a>
214

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

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

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

    
287
                </div>
288
            </div>
289
        </div>
290
    </div>
291

    
292
    <!-- activate tabs with JavaScript -->
293
    <script>
294

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

304
        $(document).ready(function(){
305

306
            {% if current_lang == "el" and not DEBUG %}
307
                window.location = "/lang/?l=en";
308
            {% endif %}
309

310
            // user menu interaction
311
            var resetUserMenu = function() {
312
                $(this).removeClass("hovered");
313
                $(this).removeClass("active");
314
            }
315

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

324
            $(".usermenu li").mouseenter(function(){$(this).addClass("hovered")})
325
            $(".usermenu li").mouseleave(function(){$(this).removeClass("hovered")});
326

327
            // bind menu actions
328
            $(".usermenu .logout").click(function() {
329
                synnefo.auth_client.logout();
330
            });
331

332
            $(".usermenu .api").click(function(){
333
                synnefo.ui.main.api_info_view.show();
334
            });
335

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

350
              footerHeight = 80;
351
              footerTop = ($(window).scrollTop()+$(window).height()-footerHeight)+"px";
352
              if (($(document.body).height()+footerHeight) < $(window).height()) {
353

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

371
                      $footer.css({
372
                          position: "static"
373
                      })
374
                  }
375
              }
376

377
          }
378
          _positionFooter();
379
          window.positionFooter = _.throttle(_positionFooter, 100);
380
          window.forcePositionFooter = _positionFooter;
381
          $(window).scroll(window.positionFooter).resize(window.positionFooter)
382

383
          $(window).bind("load", function() { 
384
            _positionFooter();
385
          });
386
        
387
        })
388
    </script>
389

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

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

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

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

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

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

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

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

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

    
536
    <div id="suspended-vm-overlay" class="overlay-content overlay-info hidden">
537
        <div class="description noborder">
538
          You VM has been suspended, please contact us for more details.
539
        </div>
540
    </div>
541

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

    
558
    <div class="api_overlay_template">
559
        <div class="api_overlay_content">
560
            <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>
561
        </div>
562
    </div>
563

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

    
595
    <script>
596
        $(document).ready(function() {
597
            $(".css-panes").hide();
598

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

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

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

667
            synnefo.config.translate_uuids = {{ translate_uuids|safe }};
668
            synnefo.config.user_catalog_url = {{ user_catalog_url|safe }};
669

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

693
            // user config
694
            synnefo.user = synnefo.auth_client;
695
            if (!synnefo.user.get_token()) { 
696
              synnefo.auth_client.redirect_to_login(); 
697
            }
698

699
            $(".usermenu .username").text("options");
700

701
            // images config
702
            synnefo.config.system_images_owners = {{ system_images_owners|safe }};
703
            synnefo.ui.init();
704
            synnefo.ui.main.bind("ready", function(){
705
            });
706
        });
707
    </script>
708
</body>
709
</html>