Statistics
| Branch: | Tag: | Revision:

one / src / sunstone / views / index.erb @ 05241124

History | View | Annotate | Download (4.51 KB)

1
<!DOCTYPE html>
2
<html>
3
  <head>
4
    <meta charset="utf-8">
5
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
6
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
    <title>OpenNebula Sunstone: Cloud Operations Center</title>
8

    
9
    <!--[if IE]><link rel="shortcut icon" href="images/favicon.ico"><![endif]-->
10
    <link rel="apple-touch-icon-precomposed" href="images/apple-touch-icon-precomposed.png">
11
    <link rel="icon" href="images/favicon.png">
12

    
13
    <% if session[:lang] %>
14
      <script src="locale/languages/<%= session[:lang] %>.js?v=<%= OpenNebula::VERSION %>" type="text/javascript"></script>
15
    <% end %>
16

    
17
    <% view = $views_config.view(session[:user], session[:user_gname], session[:default_view]) %>
18
    <% halt 500, "OpenNebula is unreachable" if view.nil? %>
19
    <script type="text/javascript">
20
      var csrftoken = '<%= session[:csrftoken] %>';
21
      var view = JSON.parse('<%= view.to_json %>')
22
      var available_views = JSON.parse('["<%=
23
          $views_config.available_views(session[:user], session[:user_gname]).join('","')
24
        %>"]')
25
      var all_labels = JSON.parse('["<%=
26
          $views_config.get_all_labels(session[:user_gname]).join('","')
27
        %>"]')
28
      var all_views = JSON.parse('["<%=
29
          $views_config.get_all_views.join('","')
30
        %>"]')
31

    
32
      var config = {
33
        'user_config' : {
34
            'lang' : '<%= session[:lang] %>',
35
            'vnc_wss' : '<%= session[:vnc_wss] %>',
36
            'table_order' : '<%= session[:table_order] %>',
37
            'default_view' : '<%= session[:default_view] %>',
38
            'page_length' : '<%= session[:page_length] %>'
39
        },
40
        'system_config' : {
41
            'marketplace_url' : '<%= $conf[:marketplace_url] %>',
42
            'vnc_request_password' : <%= $conf[:vnc_request_password] || false %>,
43
            'vnc_proxy_port' : '<%= $vnc.proxy_port %>',
44
            'max_upload_file_size' : <%= $conf[:max_upload_file_size] ? $conf[:max_upload_file_size] : "undefined" %>
45
        },
46
        'view' : view,
47
        'available_views' : available_views,
48
        'all_labels' : all_labels,
49
        'all_views' : all_views,
50
        'user_id' : '<%= session[:user_id] %>',
51
        'user_gid' : '<%= session[:user_gid] %>',
52
        'display_name' : '<%= session[:display_name] %>',
53
        'zone_name' : '<%= session[:zone_name] %>',
54
        'zone_id' : '<%= session[:zone_id] %>',
55
        'federation_mode' : '<%= session[:federation_mode] %>',
56
        'vm_logos' : <%= logos_conf.to_json %>,
57
        'oned_conf' : <%= oned_conf.to_json %>,
58
        'support' : <%= support.to_json %>,
59
        'upgrade' : <%= upgrade.to_json %>
60
      };
61
    </script>
62

    
63

    
64

    
65
    <% if $conf[:env] == 'dev' %>
66
    <link href="css/app.css?v=<%= OpenNebula::VERSION %>" media="screen, projector, print" rel="stylesheet" type="text/css"></link>
67
    <link href="css/custom.css?v=<%= OpenNebula::VERSION %>" media="screen, projector, print" rel="stylesheet" type="text/css"></link>
68
    <% else %>
69
    <link href="css/app.min.css?v=<%= OpenNebula::VERSION %>" media="screen, projector, print" rel="stylesheet" type="text/css"></link>
70
    <link href="css/custom.css?v=<%= OpenNebula::VERSION %>" media="screen, projector, print" rel="stylesheet" type="text/css"></link>
71
    <% end %>
72
  </head>
73
  <body class="antialiased">
74
    <div id="top-row" class="row">
75
    </div>
76

    
77
    <div class="row">
78
      <div id="menu-wrapper" class="small-6 medium-3 large-2 columns sunstone-menu-content">
79
        <div id="menu" class="row sunstone-menu-body">
80
          <ul class="vertical menu" id="navigation" data-accordion-menu>
81
          </ul>
82
        </div>
83
      <div id="footer" class="text-center large-12 columns">
84
        <a href="http://opennebula.org" target="_blank">OpenNebula 5.3.90</a>
85
        <br> by
86
        <a href="http://OpenNebula.systems" target="_blank">OpenNebula Systems</a>.
87
      </div>
88
      </div>
89

    
90
      <div class="small-12 large-10 columns sunstone-content">
91
        <div class="sunstone-header">
92
        </div>
93
      </div>
94
      <div id="upload_progress_bars" class="large-10 columns end right">
95
      </div>
96
      <div id="loading" class="text-center">
97
        <span  id="loading-content">
98
          <i class="fa fa-5x fa-spinner fa-pulse"></i>
99
        </span>
100
      </div>
101
      <div class="large-12 columns" id="dialogs"></div>
102
    </div>
103

    
104

    
105
    <% if $conf[:env] == 'dev' %>
106
      <script src="bower_components/requirejs/require.js" data-main="app/main"></script>
107
    <% else %>
108
      <script src="dist/main.js?v=<%= OpenNebula::VERSION %>"></script>
109
    <% end %>
110
  </body>
111
</html>