Commit 2dc87be8 authored by Fernando Verdugo's avatar Fernando Verdugo
Browse files

wip(frontend): restyling

Issue #952
parent d1a3259d
......@@ -50,7 +50,7 @@ navbar-dark bg-dark fixed-top navbar-expand-lg navbar-inverse">
% if ( !$_anonymous ) {
<li class="nav-item dropdown">
<a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><i class="fa fa-user"></i>&nbsp;<%= $_logged_in %><span class="caret"></span></a>
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdownMenuLink">
<a class="dropdown-item" href="/user_settings"><i class="fa fa-cog" aria-hidden="true"></i><%=l 'Settings' %></a>
<a class="dropdown-item" href="/logout"><i class="fa fa-fw fa-power-off"></i><%=l 'Log Out' %></a>
</div>
......
<div id="requests" class="panel panel-primary"
<div id="requests" class="card alert alert-primary"
ng-show="requests[0]"
ng-controler="requestsCtrl">
<div class="panel-heading"><b>Requests</b></div>
<div class="card-body"><b>Requests</b></div>
<div class="panel-body">
<div class="card-text alert alert-warning">
<div ng-repeat="request in requests">
<font color="darkgray">{{request.date}} |</font>
{{request.command}}
......
......@@ -21,7 +21,7 @@
<a class="btn btn-link"
href="/machine/clone/{{machine.id}}.html"
role="button">{{machine.name}}</a>
<i ng-show="!machine.is_public"><i class="far fa-eye-slash fa-xs" title="<%=l 'not public' %>"></i></i>
<i ng-show="!machine.is_public"><span class="d-inline align-baseline h6 font-weight-bold">(<%=l 'not public' %>)</span></i>
</h3>
<a ng-show="machine.screenshot" href="/machine/clone/{{machine.id}}.html"><img
ng-src="{{machine.screenshot}}" class="img-thumbnail" width="260"
......@@ -50,24 +50,24 @@
><%=l 'Yes' %></a>
</div>
<a ng-show="machine.is_active && host_action != machine.id"
class="btn btn-light"
class="btn btn-secondary text-white"
ng-click="host_action=machine.id;$parent.refresh=20"
type="button"><%=l 'action'%></a>
<div class="btn-group"
ng-show="host_action == machine.id && !host_restore"
>
<a type="button" class="btn btn-light btn-sm"
<a type="button" class="btn btn-secondary text-white btn-sm"
ng-show="machine.can_remove"
ng-click="host_restore=machine.id_clone"
><%=l 'Restore' %></a>
<a ng-show="machine.is_active" type="button"
class="btn btn-light btn-sm"
class="btn btn-secondary text-white btn-sm"
ng-click="action(machine.id_clone,'shutdown');host_action=-1"
><%=l 'Shutdown'%></a>
<a ng-show="machine.is_active && machine.can_hibernate" type="button"
class="btn btn-light btn-sm"
class="btn btn-secondary text-white btn-sm"
ng-click="action(machine.id_clone,'hibernate');host_action=-1"
><%=l 'Hibernate' %></a>
......
......@@ -10,7 +10,7 @@
<div>
<div class="page-header">
<div class="card">
<div class="card alert alert-primary">
<div class="card-header">
<h2>Request <%= $request->{command} %> <%= $request->args->{name} %> <%= $request->{status} %></h2>
<p>
......
<div class="card card.bg-primary.text-white" ng-show="requests.length > 0">
<div class="card-header">
<div class="card alert alert-primary" ng-show="requests.length > 0">
<div class="card-body font-weight-bold">
<span ng-show="pending_requests"><%=l 'Waiting for requests to complete' %> ... </span>
<span ng-show="pending_requests<1"><%=l 'Recent requests' %> ... </span>
</div>
<div class="card-body">
<div class="card-text alert alert-warning">
<div ng-repeat="request in requests">
<font color="darkgray">{{request.date}} |</font>
{{request.command}}
......
......@@ -30,26 +30,28 @@
</div>
</div>
% if ($USER->is_admin){
<hr/>
<div class="row">
<div class="col-lg-2">
<label class="control-label" for="timeout">Timeout</label>
</div>
<div class="col-lg-2">
<div class="col-lg-3">
<input name="run_timeout" type="text"
% my $timeout = '';
% $timeout = int($domain->run_timeout / 60) if $domain->run_timeout;
% $timeout = '' if $timeout eq '0';
value="<%= $timeout %>" size="5">
</div>
<div class="col-lg-6"><%=l 'The machine will shutdown after these minutes' %></div>
<div class="col-lg-7"><%=l 'The machine will shutdown after these minutes' %></div>
</div>
% }
% if ($USER->is_admin){
<div class="row">
<hr/>
<div class="row">
<div class="col-lg-2">
<label class="control-label" for="volatile_clones"><%=l 'Volatile Clones' %></label>
</div>
<div class="col-lg-2">
<div class="col-lg-3">
<input type="checkbox" name="volatile_clones"
% my $vclones = int($domain->is_volatile_clones);
% if ( $vclones ){
......@@ -57,26 +59,28 @@
% }
value="1">
</div>
<div class="col-md-6">
<div class="col-md-7">
<%=l 'Clones created from this machine will be removed on shutdown.' %>
</div>
</div>
% }
% if ($USER->is_admin){
<hr/>
<div class="row">
<div class="col-lg-2">
<label class="control-label" for="new_owner"><%=l 'Owner' %></label>
</div>
<div class="col-lg-2">
<div class="col-lg-3">
<select id="new_owner" name="id_owner" >
% for my $user (@$list_users) {
<option <%= $user->{id} eq $domain->id_owner ? "selected" : "" %> value="<%= $user->{id} %>"><%= $user->{name} %></option>
% }
</select>
</div>
<div class="col-md-6"><%=l 'Change the owner of the machine' %></div>
<div class="col-md-7"><%=l 'Change the owner of the machine' %></div>
</div>
% }
<hr/>
<div class="row">
<div class="col-md-4">
<input type="button" class="btn btn-outline-secondary mt-3" value="<%=l 'Cancel' %>" onclick = "location='/admin/machines'"/>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment