created file sync
This commit is contained in:
57
web/app/views/configuration_files/update.html.erb
Normal file
57
web/app/views/configuration_files/update.html.erb
Normal file
@@ -0,0 +1,57 @@
|
||||
<% content_for :javascript_includes do %>
|
||||
<%= javascript_include_tag "edit_configuration_file_form.js" %>
|
||||
<% end %>
|
||||
|
||||
<div class="row">
|
||||
<h3><%= @record.file_type %>
|
||||
file on
|
||||
<%= @record.server.name %>
|
||||
</h3>
|
||||
<div><%= @record.namehash %></div>
|
||||
<div>Version: v<%= @record.last_version.number %>
|
||||
(modified
|
||||
<%= distance_of_time_in_words(@record.last_version.updated_at, Time.now) %>
|
||||
ago)
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-10">
|
||||
<% command = pull_command(@record) %>
|
||||
Type this into your server's console to pull latest saved version<br />
|
||||
<%= text_field_tag 'command_pull', command, readonly: true, class: 'form-control-sm', size: command.length %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-10">
|
||||
<% command = push_command(@record) %>
|
||||
Type this into your server's console to push servers version into CHUB<br />
|
||||
<%= text_field_tag 'command_push', command, readonly: true, class: 'form-control-sm', size: command.length %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row editor">
|
||||
<div class="col-md-5">
|
||||
<div>
|
||||
<%= text_field_tag 'file_path', @record.file_path, class: 'form-control-sm', id: 'visible_file_path' , size: "100%" %>
|
||||
<br/>
|
||||
<br/>
|
||||
</div>
|
||||
<div id="editor">
|
||||
<%= @record.last_version.content %>
|
||||
</div>
|
||||
</div>
|
||||
<br/><br/>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<%= button_tag(type: "button", class: "btn btn-success", id: "save_button") do %>Save as v<%= @record.last_version.number + 1 %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<%= form_tag(update_by_form_configuration_file_url(@record), method: :put, id: "update_form") do %>
|
||||
<%= hidden_field_tag('content','', id: 'content') %>
|
||||
<%= hidden_field_tag('file_path', @record.file_path, id: 'file_path') %>
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user