diff --git a/app/views/hosts/_host_details.html.erb b/app/views/hosts/_host_details.html.erb index 20f05e3..b686515 100644 --- a/app/views/hosts/_host_details.html.erb +++ b/app/views/hosts/_host_details.html.erb @@ -1,114 +1,117 @@
Name <%= @host.name %>
FQDN <%= @host.fqdn %>
FDPort <%= @host.port %>
Token ********
File Retention <%= @host.file_retention %> days
Job Retention <%= @host.job_retention %> days
Verified <% if @host.verified? %> yes <% else %> no <% end %>
Created <%= I18n.l(@host.created_at, format: :long) %>
<%= link_to edit_host_path(@host), class: "btn btn-default", role: "button" do %> Edit <% end %>
<% if @host.can_be_disabled? %>
<%= 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 %> Disable <% end %>
<% end %>
<%= 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 %> Remove <% end %>
<% if @host.needs_simple_config? %>
<%= link_to new_host_simple_config_path(@host), role: 'button', class: 'btn btn-default' do %> Configure <% end %>
<% end %> <% if @host.needs_dispatch? %>
<%= link_to submit_config_host_path(@host), method: :post, class: 'btn btn-success', role: 'button' do %> Deploy Changes <% end %>
<% end %> <% if @host.needs_revoke? %>
<%= link_to 'Remove From Backup service', revoke_host_path(@host), method: :delete, class: 'btn btn-danger', role: 'button' %>
<% end %>

<% if @host.client %> -
- <%= link_to "Back to #{@host.name} client".html_safe, client_path(@host.client) %> +
+ <%= link_to client_path(@host.client), class: 'btn btn-default' do %> + + Back to client + <% end %>
<% end %>
diff --git a/app/views/jobs/_fileset.html.erb b/app/views/jobs/_fileset.html.erb index 1f25a96..9b1dfd9 100644 --- a/app/views/jobs/_fileset.html.erb +++ b/app/views/jobs/_fileset.html.erb @@ -1,20 +1,22 @@ <% if job_id = (@job.try(:id) || @job_id) %> <% url_options = { job_id: job_id } %> <% else %> <% url_options = {} %> <% end %>

Fileset "<%= fileset.name %>" <%= link_to edit_host_fileset_path(@host, fileset.id, url_options) do %> <% end %>


-
+  
+
 <%= fileset.human_readable %>
-  
+
+
diff --git a/app/views/jobs/_form.html.erb b/app/views/jobs/_form.html.erb index bdc9bd2..51f955e 100644 --- a/app/views/jobs/_form.html.erb +++ b/app/views/jobs/_form.html.erb @@ -1,53 +1,53 @@ <%= bootstrap_form_for(@job, url: @job.new_record? ? host_jobs_path : host_job_path(@host, @job), layout: :horizontal, label_col: 'col-xs-5', control_col: 'col-xs-5') do |f| %> <%= f.text_field :name %> <%= select_with_errors_and_button( @job, :job_template, :fileset_id, 'Fileset', options_from_collection_for_select( @host.filesets, :id, :name, params[:fileset_id] || @job.fileset_id), new_host_fileset_path(@host, job_id: @job.id)) %> <% if !@job.restore? %> <%= select_with_errors_and_button( @job, :job_template, :schedule_id, 'Schedule', options_from_collection_for_select( @host.schedules, :id, :name, params[:schedule_id] || @job.schedule_id), new_host_schedule_path(@host, job_id: @job.id)) %> <% end %>
show advanced
-
-
+
+
<%= link_to 'Cancel', @job.persisted? ? host_job_path(@host, @job) : host_path(@job.host, anchor: :jobs), class: 'btn btn-danger', role: 'button' %>
-
+
<%= f.submit 'Submit', class: "btn btn-success" %>
<% end %> diff --git a/app/views/jobs/_job_details.html.erb b/app/views/jobs/_job_details.html.erb index ed0c5f3..99bcf9d 100644 --- a/app/views/jobs/_job_details.html.erb +++ b/app/views/jobs/_job_details.html.erb @@ -1,51 +1,51 @@ -
+
<% if @job.restore? %> <% else %> <% end %>
Name <%= @job.name %>
Type <%= @job.job_type %>
Client <%= @host.name %>
Fileset
<%= @job.fileset.human_readable %>
Restore Location <%= @job.restore_location %>
Schedule
<%= @job.schedule.human_readable %>
Client Run Before Job <%= @job.client_before_run_file %>
Client Run After Job <%= @job.client_after_run_file %>
Created <%= I18n.l(@job.created_at, format: :long) %>
Enabled <%= @job.enabled_human %>
diff --git a/app/views/jobs/_schedule.html.erb b/app/views/jobs/_schedule.html.erb index 42937b2..666f169 100644 --- a/app/views/jobs/_schedule.html.erb +++ b/app/views/jobs/_schedule.html.erb @@ -1,20 +1,22 @@ <% if job_id = (@job.try(:id) || @job_id) %> <% url_options = { job_id: job_id } %> <% else %> <% url_options = {} %> <% end %>

Schedule "<%= schedule.name %>" <%= link_to edit_host_schedule_path(@host, schedule.id, url_options) do %> <% end %>


-
+  
+
 <%= schedule.human_readable %>
-  
+
+
diff --git a/app/views/jobs/show.html.erb b/app/views/jobs/show.html.erb index 0719508..802d669 100644 --- a/app/views/jobs/show.html.erb +++ b/app/views/jobs/show.html.erb @@ -1,31 +1,31 @@

"<%= @job.name %>" Job Template

-
- <%= render partial: 'job_details' %> -
+ <%= render partial: 'job_details' %>
- <%= link_to 'Back to host', host_path(@host), - class: "btn btn-success", role: "button" %> + <%= link_to host_path(@host), class: "btn btn-default" do %> + + Back to host + <% end %>
<%= link_to edit_host_job_path(@host, @job), class: "btn btn-default", role: "button" do %> Edit <% end %>
<%= link_to host_job_path(@host, @job), method: :delete, data: { confirm: 'This will delete the job' }, class: "btn btn-default", role: "button" do %> Delete <% end %>