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 @@ <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 text-right'> - <%= link_to "Back to <b>#{@host.name}</b> client".html_safe, client_path(@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/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 %> <div class="panel panel-default"> <div class="panel-heading"> <h4> Fileset "<%= fileset.name %>" <%= link_to edit_host_fileset_path(@host, fileset.id, url_options) do %> <label class="glyphicon glyphicon-edit text-primary right"></label> <% end %> </h4> </div> <br /> - <pre> + <div class="panel-body"> + <pre> <%= fileset.human_readable %> - </pre> + </pre> + </div> </div> 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 %> <div class="form-group"> <a id="toggle-advanced" class="col-xs-5 col-xs-offset-5" href="#">show advanced</a> </div> <div id="advanced" class="hidden"> <%= f.text_field :client_before_run_file, label: tooltip_label('Client Run Before Job', 'A command that the backed up server will run right before the backup job starts') %> <%= f.text_field :client_after_run_file, label: tooltip_label('Client Run After Job', 'A command that the backed up server will run after the backup job has finished') %> </div> - <div class="form-group"> - <div class="col-xs-2 col-xs-offset-7"> + <div class="form-group text-right"> + <div class="col-xs-5"> <%= link_to 'Cancel', @job.persisted? ? host_job_path(@host, @job) : host_path(@job.host, anchor: :jobs), class: 'btn btn-danger', role: 'button' %> </div> - <div class="col-xs-2"> + <div class="col-xs-5"> <%= f.submit 'Submit', class: "btn btn-success" %> </div> </div> <% end %> <script type='text/javascript'> var hostId=<%= @host.id %>; var jobIdParam={}; <% if @job.id %> jobIdParam= { job_id: <%= @job.id %> }; <% end %> </script> 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 @@ -<div class="col-xs-12"> +<div class="panel-body"> <div class="table-responsive"> <table class="table table-striped table-bordered table-condensed"> <tr> <td><b>Name</b></td> <td><%= @job.name %></td> </tr> <tr> <td><b>Type</b></td> <td><%= @job.job_type %></td> </tr> <tr> <td><b>Client</b></td> <td><%= @host.name %></td> </tr> <tr> <td><b>Fileset</b></td> <td><pre><%= @job.fileset.human_readable %></pre></td> </tr> <% if @job.restore? %> <tr> <td><b>Restore Location</b></td> <td><%= @job.restore_location %></td> </tr> <% else %> <tr> <td><b>Schedule</b></td> <td> <pre><%= @job.schedule.human_readable %></pre> </td> </tr> <% end %> <tr> <td><b>Client Run Before Job</b></td> <td><%= @job.client_before_run_file %></td> </tr> <tr> <td><b>Client Run After Job</b></td> <td><%= @job.client_after_run_file %></td> </tr> <tr> <td><b>Created</b></td> <td><%= I18n.l(@job.created_at, format: :long) %></td> </tr> <tr> <td><b>Enabled</b></td> <td><%= @job.enabled_human %></td> </tr> </table> </div> </div> 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 %> <div class="panel panel-default"> <div class="panel-heading"> <h4> Schedule "<%= schedule.name %>" <%= link_to edit_host_schedule_path(@host, schedule.id, url_options) do %> <label class="glyphicon glyphicon-edit text-primary right"></label> <% end %> </h4> </div> <br /> - <pre> + <div class="panel-body"> + <pre> <%= schedule.human_readable %> - </pre> + </pre> + </div> </div> 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 @@ <div class="row"> <div class="col-xs-6"> <div class="panel panel-default"> <div class="panel-heading"> <h1>"<%= @job.name %>" Job Template</h1> </div> - <div class="row"> - <%= render partial: 'job_details' %> - </div> + <%= render partial: 'job_details' %> </div> <div class="col-xs-2 col-xs-offset-4 right"> - <%= link_to 'Back to host', host_path(@host), - class: "btn btn-success", role: "button" %> + <%= link_to host_path(@host), class: "btn btn-default" do %> + <label class="glyphicon glyphicon-menu-left text-primary"></label> + Back to host + <% end %> </div> <div class="col-xs-1"> <%= link_to edit_host_job_path(@host, @job), class: "btn btn-default", role: "button" do %> <label class="glyphicon glyphicon-edit text-primary"></label> Edit <% end %> </div> <div class="col-xs-1"> <%= link_to host_job_path(@host, @job), method: :delete, data: { confirm: 'This will delete the job' }, class: "btn btn-default", role: "button" do %> <label class="glyphicon glyphicon-ban-circle text-danger"></label> Delete <% end %> </div> </div> </div>