settings_machine.html.ep 2.22 KB
Newer Older
1
2
3
<!DOCTYPE html>
<html ng-app="ravada.app">
%= include 'bootstrap/header'
Fernando Verdugo's avatar
Fernando Verdugo committed
4
<body id="page-top" data-spy="scroll" data-target="fixed-top" role="document">
Francesc Guasch's avatar
Francesc Guasch committed
5
<div id="wrapper">
6
    %= include 'bootstrap/navigation'
Francesc Guasch's avatar
Francesc Guasch committed
7
<div id="page-wrapper">
8
        <!--BASES AND DOMAINS LIST-->
Francesc Guasch's avatar
Francesc Guasch committed
9
    <div class="page-header">
Fernando Verdugo's avatar
Fernando Verdugo committed
10
        <div class="card"
Francesc Guasch's avatar
Francesc Guasch committed
11
             ng-controller="singleMachinePage" ng-init="init(<%= $id %>)">
Fernando Verdugo's avatar
Fernando Verdugo committed
12
             <div class="card-header">
fv3rdugo's avatar
fv3rdugo committed
13
%              if ($domain->is_base) {
fv3rdugo's avatar
fv3rdugo committed
14
                 <h2><%=l 'Virtual Machine' %>
fv3rdugo's avatar
fv3rdugo committed
15
                     <b><%= $domain->name %></b>
fv3rdugo's avatar
fv3rdugo committed
16
                     <%=l 'Settings' %>
fv3rdugo's avatar
fv3rdugo committed
17
18
                 </h2>
%               } else {
fv3rdugo's avatar
fv3rdugo committed
19
                 <h2><%=l 'Virtual Machine' %>
20
21
                     <a ng-hide="domain_remove_done" 
                         href="/machine/view/<%= $domain->id %>.html"><%= $domain->name %></a>
fv3rdugo's avatar
fv3rdugo committed
22
                     <%=l 'Settings' %>
23
                 </h2>
fv3rdugo's avatar
fv3rdugo committed
24
%               }
Francesc Guasch's avatar
Francesc Guasch committed
25
            </div>
Fernando Verdugo's avatar
Fernando Verdugo committed
26
            <div class="card-body">
Fernando Verdugo's avatar
Fernando Verdugo committed
27
28
29
30
31
32
33
34
				<div class="row">
					<div class="col-2">
						%= include 'main/settings_machine_tabs_head'
					</div>
					<div class="col-10">
						%= include 'main/settings_machine_tabs_body'
					</div>
				</div>
35
            </div>
Francesc Guasch's avatar
Francesc Guasch committed
36
            <div class="alert alert-danger" ng-show="error">{{error}}</div>
Francesc Guasch's avatar
Francesc Guasch committed
37
38
39
40
        </div><!-- del panel default-->
    </div><!-- del page-header -->
</div> <!-- del page-wrapper -->
</div> <!-- del wrapper -->
41
    %= include 'bootstrap/scripts'
42
    %= include 'bootstrap/messages'
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<script type="text/javascript">
if (location.hash) {
  $('a[href=\'' + location.hash + '\']').tab('show');
}
var activeTab = localStorage.getItem('activeTab');
if (activeTab) {
  $('a[href="' + activeTab + '"]').tab('show');
}

$('body').on('click', 'a[data-toggle=\'tab\']', function (e) {
  e.preventDefault()
  var tab_name = this.getAttribute('href')
  if (history.pushState) {
    history.pushState(null, null, tab_name)
  }
  else {
    location.hash = tab_name
  }
  localStorage.setItem('activeTab', tab_name)

  $(this).tab('show');
  return false;
});
$(window).on('popstate', function () {
  var anchor = location.hash ||
    $('a[data-toggle=\'tab\']').first().attr('href');
  $('a[href=\'' + anchor + '\']').tab('show');
});
</script>
72
73
</body>
</html>