Page MenuHomeGRNET

No OneTemporary

File Metadata

Created
Fri, Aug 8, 8:43 PM
diff --git a/app/views/hosts/_host_details.html.erb b/app/views/hosts/_host_details.html.erb
index b686515..b11c548 100644
--- a/app/views/hosts/_host_details.html.erb
+++ b/app/views/hosts/_host_details.html.erb
@@ -1,117 +1,104 @@
<div class="col-xs-4">
<div class="table-responsive">
<table class="table table-striped table-bordered table-condensed">
<tr>
<td><b>Name</b></td>
<td><%= @host.name %></td>
</tr>
<tr>
<td><b>FQDN</b></td>
<td><%= @host.fqdn %></td>
</tr>
<tr>
<td><b>FDPort</b></td>
<td><%= @host.port %></td>
</tr>
<tr>
<td><b>Token</b></td>
<td>********</td>
</tr>
<tr>
<td data-toggle="tooltip" title="Defines the length of time that the File records will be available">
<b>File Retention</b> <label class="glyphicon glyphicon-question-sign"></label>
</td>
<td><%= @host.file_retention %> days</td>
</tr>
<tr>
<td data-toggle="tooltip" title="Defines the length of time that the Job records will be available">
<b>Job Retention</b> <label class="glyphicon glyphicon-question-sign"></label>
</td>
<td><%= @host.job_retention %> days</td>
</tr>
<tr>
<td data-toggle="tooltip" title="Determines if a client is backups approved">
<b>Verified</b> <label class="glyphicon glyphicon-question-sign"></label>
</td>
<td>
<% if @host.verified? %>
<span class="label label-success">yes</span>
<% else %>
<span class="label label-danger">no</span>
<% end %>
</td>
</tr>
<tr>
<td><b>Created</b></td>
<td><%= I18n.l(@host.created_at, format: :long) %></td>
</tr>
</table>
</div>
<div class='row'>
<div class='col-xs-2'>
<%= link_to edit_host_path(@host), class: "btn btn-default", role: "button" do %>
<label class="glyphicon glyphicon-edit text-primary"></label>
Edit
<% end %>
</div>
<% if @host.can_be_disabled? %>
<div class='col-xs-2'>
<%= link_to disable_host_path(@host), method: :post,
data: { confirm: 'This will disable the client. Are you sure?' },
class: "btn btn-default", role: "button" do %>
<label class="glyphicon glyphicon-ban-circle text-warning"></label>
Disable
<% end %>
</div>
<% end %>
<div class='col-xs-2'>
<%= link_to host_path(@host), method: :delete,
data: { confirm: 'This will remove your client from the Backup service. Are you sure?' },
class: "btn btn-default", role: "button" do %>
<label class="glyphicon glyphicon-trash text-danger"></label>
Remove
<% end %>
</div>
<% if @host.needs_simple_config? %>
<div class='col-xs-2'>
<%= link_to new_host_simple_config_path(@host), role: 'button', class: 'btn btn-default' do %>
<label class="glyphicon glyphicon-cog text-primary"></label>
Configure
<% end %>
</div>
<% end %>
<% if @host.needs_dispatch? %>
<div class='col-xs-4 pull-right text-right'>
<%= link_to submit_config_host_path(@host), method: :post,
class: 'btn btn-success', role: 'button' do %>
<label class="glyphicon glyphicon-cloud-upload"></label>
Deploy Changes
<% end %>
</div>
<% end %>
<% if @host.needs_revoke? %>
<div class='col-xs-4 pull-right text-right'>
<%= link_to 'Remove From Backup service', revoke_host_path(@host), method: :delete,
class: 'btn btn-danger', role: 'button' %>
</div>
<% end %>
</div>
-
- <br />
-
- <div class='row'>
- <% if @host.client %>
- <div class='col-xs-12'>
- <%= link_to client_path(@host.client), class: 'btn btn-default' do %>
- <label class="glyphicon glyphicon-menu-left text-primary"></label>
- Back to client
- <% end %>
- </div>
- <% end %>
- </div>
</div>
diff --git a/app/views/hosts/show.html.erb b/app/views/hosts/show.html.erb
index 14fd87d..1cc5579 100644
--- a/app/views/hosts/show.html.erb
+++ b/app/views/hosts/show.html.erb
@@ -1,33 +1,45 @@
<%= notifier(@host.display_message) unless @host.deployed? || @host.blocked? %>
<%= render partial: 'header' %>
<div class="row">
<div id='host-tabs' class='tab-content'>
<div role="tabpanel" class="tab-pane active" id="details">
<%= render partial: "host_details" %>
</div>
<div role="tabpanel" class="tab-pane" id="jobs">
<%= render partial: "jobs/job_templates" %>
</div>
<div role="tabpanel" class="tab-pane" id="fd-config">
<%= render partial: "fd_config" %>
</div>
</div>
</div>
+<br />
+
+<div class='row'>
+ <% if @host.client %>
+ <div class='col-xs-12'>
+ <%= link_to client_path(@host.client), class: 'btn btn-default' do %>
+ <label class="glyphicon glyphicon-menu-left text-primary"></label>
+ Back to client
+ <% end %>
+ </div>
+ <% end %>
+</div>
<%= render partial: 'jobs/modals' %>
<script type='text/javascript'>
var hash = document.location.hash;
var prefix = "tab_";
if (hash) {
$('.nav-tabs a[href="'+hash.replace(prefix,"")+'"]').tab('show');
}
// Change hash for page-reload
$('.nav-tabs a').on('shown', function (e) {
window.location.hash = e.target.hash.replace("#", "#" + prefix);
});
</script>
diff --git a/app/views/jobs/_job_templates.html.erb b/app/views/jobs/_job_templates.html.erb
index 79b64a6..0abe959 100644
--- a/app/views/jobs/_job_templates.html.erb
+++ b/app/views/jobs/_job_templates.html.erb
@@ -1,27 +1,27 @@
-<div class="col-xs-6">
+<div class="col-xs-8">
<div class="table-responsive">
<table class="table table-striped table-bordered table-condensed">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>FileSet</th>
<th>Schedule</th>
<th>Client Before Run Job</th>
<th>Client After Run Job</th>
<th>Enabled</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<%= render partial: 'jobs/job_template_details',
collection: @host.job_templates, as: :job %>
</tbody>
</table>
</div>
<%= button_or_disabled_with_label(
@host.blocked?, 'Add Job', new_host_job_path(host_id: @host.id),
class: "btn btn-default", role: "button",
icon_class: 'glyphicon glyphicon-plus', text_class: 'text-success') %>
</div>

Event Timeline