Page MenuHomeGRNET

No OneTemporary

File Metadata

Created
Thu, Apr 24, 4:11 PM
diff --git a/app/views/hosts/_fd_config.html.erb b/app/views/hosts/_fd_config.html.erb
new file mode 100644
index 0000000..add31c9
--- /dev/null
+++ b/app/views/hosts/_fd_config.html.erb
@@ -0,0 +1,23 @@
+<div class="col-xs-4">
+ <h3>Client FileDeamon Config</h3>
+ <pre class="pre">
+<%= @host.bacula_fd_filedeamon_config %>
+ </pre>
+</div>
+<div class="col-xs-4">
+ <h3>Client Director Config</h3>
+ <pre class="pre">
+<%= @host.bacula_fd_director_config %>
+ </pre>
+</div>
+<div class="col-xs-4">
+ <h3>Client Messages Config</h3>
+ <pre class="pre">
+<%= @host.bacula_fd_messages_config %>
+ </pre>
+</div>
+
+<div class='col-xs-10'>
+ <%= link_to 'Download Config', fd_config_host_path(@host, token: current_user.token),
+ class: "btn btn-success", role: "button", download: 'fd_config' %>
+</div>
diff --git a/app/views/hosts/_header.html.erb b/app/views/hosts/_header.html.erb
new file mode 100644
index 0000000..d2e68d6
--- /dev/null
+++ b/app/views/hosts/_header.html.erb
@@ -0,0 +1,31 @@
+<div class="row right">
+ <% if @host.can_be_disabled? %>
+ <%= link_to 'Disable client', disable_host_path(@host), method: :post,
+ data: { confirm: 'This will disable the client. Are you sure?' },
+ class: "btn btn-warning", role: "button" %>
+ <% end %>
+
+ <%= link_to 'Remove client', host_path(@host), method: :delete,
+ data: { confirm: 'This will remove the client from Bacula. Are you sure?' },
+ class: "btn btn-danger", role: "button" %>
+</div>
+
+<h2>Configuration for <%= @host.name %>
+ <small><%= host_status_label(@host) %></small>
+</h2>
+
+<br/>
+
+<ul class="nav nav-tabs" role='tablist'>
+ <li role="presentation" class="active">
+ <a aria-controls='details' role='tab' data-toggle='tab' href="#details">Client Details</a>
+ </li>
+ <li role="presentation">
+ <a aria-controls='jobs' role='tab' data-toggle='tab' href="#jobs">Jobs</a>
+ </li>
+ <li role="presentation">
+ <a aria-controls='fd-config'role='tab' data-toggle='tab' href="#fd-config">FD Config</a>
+ </li>
+</ul>
+
+<br/>
diff --git a/app/views/hosts/show.html.erb b/app/views/hosts/show.html.erb
index ae9961b..5b0811d 100644
--- a/app/views/hosts/show.html.erb
+++ b/app/views/hosts/show.html.erb
@@ -1,56 +1,20 @@
<%= notifier(@host.display_message) unless @host.deployed? %>
-<div class="row right">
- <% if @host.can_be_disabled? %>
- <%= link_to 'Disable client', disable_host_path(@host), method: :post,
- data: { confirm: 'This will disable the client. Are you sure?' },
- class: "btn btn-warning", role: "button" %>
- <% end %>
-
- <%= link_to 'Remove client', host_path(@host), method: :delete,
- data: { confirm: 'This will remove the client from Bacula. Are you sure?' },
- class: "btn btn-danger", role: "button" %>
-</div>
-
-<h2>Configuration for <%= @host.name %>
- <small><%= host_status_label(@host) %></small>
-</h2>
-
-<br/>
+<%= render partial: 'header' %>
<div class="row">
- <div class="col-xs-4">
- <h3>Host Details</h3>
- </div>
- <div class="col-xs-6">
- <h3>Jobs</h3>
- </div>
-</div>
-<div class="row">
- <%= render partial: "host_details" %>
- <%= render partial: "jobs/job_templates" %>
-</div>
-
- <div class="row">
- <div class="col-xs-4">
- <h3>Client FileDeamon Config</h3>
- <pre class="pre">
-<%= @host.bacula_fd_filedeamon_config %>
- </pre>
+ <div id='host-tabs' class='tab-content'>
+ <div role="tabpanel" class="tab-pane active" id="details">
+ <%= render partial: "host_details" %>
</div>
- <div class="col-xs-4">
- <h3>Client Director Config</h3>
- <pre class="pre">
-<%= @host.bacula_fd_director_config %>
- </pre>
+ <div role="tabpanel" class="tab-pane" id="jobs">
+ <%= render partial: "jobs/job_templates" %>
</div>
- <div class="col-xs-4">
- <h3>Client Messages Config</h3>
- <pre class="pre">
-<%= @host.bacula_fd_messages_config %>
- </pre>
+ <div role="tabpanel" class="tab-pane" id="fd-config">
+ <%= render partial: "fd_config" %>
</div>
-
</div>
+</div>
+
<%= render partial: 'jobs/modals' %>

Event Timeline