created sync for server

This commit is contained in:
Senad Uka
2016-02-21 20:53:35 +01:00
parent 6fd266d7ea
commit ae6f798d0f
7 changed files with 51 additions and 3 deletions

View File

@@ -42,12 +42,12 @@
<div class="col-md-6">
<% command = pull_command(@record) %>
CHUB -> Your Server<br />
<%= text_field_tag 'command_pull', command, readonly: true, class: 'form-control-sm', size: command.length %>
<%= text_field_tag 'command_pull', command, readonly: true, class: 'form-control-sm click-to-select-all', size: command.length %>
</div>
<div class="col-md-6">
<% command = push_command(@record) %>
Your Server -> CHUB<br />
<%= text_field_tag 'command_push', command, readonly: true, class: 'form-control-sm', size: command.length %>
<%= text_field_tag 'command_push', command, readonly: true, class: 'form-control-sm click-to-select-all', size: command.length %>
</div>
</div>

View File

@@ -14,5 +14,12 @@ CHUB
<div class="container-fluid">
<%= yield %>
</div>
<footer>
<br /> <br />
<p>
Saburly Configuration Hub (c) 2016
</p>
</footer>
</body>
</html>

View File

@@ -60,6 +60,30 @@
</tbody>
</table>
<%
pull_commands = @record.configuration_files.map do |file|
pull_command(file)
end.join("\n")
push_commands = @record.configuration_files.map do |file|
push_command(file)
end.join("\n")
%>
<h3>Sync Server: </h3>
<div class="row">
<div class="col-md-6">
CHUB -> Your Server<br />
<%= text_area_tag 'command_pull', pull_commands, readonly: true, class: 'form-control-sm click-to-select-all', size: "80x10" %>
</div>
<div class="col-md-6">
Your Server -> CHUB<br />
<%= text_area_tag 'command_push', push_commands, readonly: true, class: 'form-control-sm click-to-select-all', size: "80x10" %>
</div>
</div>
<% end %>
</div>