created template selecting
This commit is contained in:
@@ -1,23 +1,26 @@
|
||||
<div class="row">
|
||||
<div class="col-md-11">
|
||||
<div class="col-md-10">
|
||||
<h2>Servers</h2>
|
||||
</div>
|
||||
<div class="col-md-1 text-right">
|
||||
<%= link_to(new_server_path) do %>
|
||||
<button class="btn btn-default pull-right">Add Server</button>
|
||||
<%= button_to(new_server_path, method: :get, class: "btn btn-default pull-right") do %>
|
||||
Add Server
|
||||
<% end %>
|
||||
</dev>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<% @page.items.each do |server| %>
|
||||
<div class="col-md-2 col-xs-6 text-md-center server-thumbnail">
|
||||
<div class="col-md-3 col-xs-6 text-md-center server-thumbnail">
|
||||
<%= link_to(server_path(server)) do %>
|
||||
<div class="thumbnail">
|
||||
<%= image_tag('ubuntu.png', size: '128', class:"img-responsive" ) %>
|
||||
<div class="caption text-md-center" >
|
||||
<div class="caption text-md-center">
|
||||
<h3 class="server-name"><%= server.name %></h3>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<br /><br />
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
30
web/app/views/servers/show.html.erb
Normal file
30
web/app/views/servers/show.html.erb
Normal file
@@ -0,0 +1,30 @@
|
||||
<div class="row">
|
||||
<div class="col-md-11">
|
||||
<h2><%= @record.name %></h2>
|
||||
<div class="small"><%= @record.namehash %>
|
||||
-
|
||||
<%= @record.operating_system.name %></div>
|
||||
<br/>
|
||||
<br/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<% if @record.configuration_files.blank? %>
|
||||
<div class="col-md-12 text-md-center">
|
||||
<p>There are no configuration files from this server in CHUB. You can create file now and pull it to the server later:<br/><br/></p>
|
||||
|
||||
<p><%= button_to(new_configuration_file_path, method: :get, params: { server_id: @record.id}, class: "btn btn-success") do %>
|
||||
Create New Configuration File
|
||||
<% end %><br/><br/>
|
||||
</p>
|
||||
|
||||
<p>Or you can initialize server with chub and upload the existing files from server by pasting this into your server's terminal:</p>
|
||||
|
||||
<% command = "sudo wget -O /usr/local/bin/chub http://chub.saburly.com/chub && sudo chub init #{@record.namehash}" %>
|
||||
|
||||
<p><%= text_field_tag 'command', command, readonly: true, class: 'form-control-sm', size: command.length %></p>
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
Reference in New Issue
Block a user