forked from fd/webistrano
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed host page templates and designs.
- Loading branch information
Showing
8 changed files
with
125 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,7 @@ | |||
<div class="control-group"> | |||
<%= form.label :name, class: "control-label" %> | |||
<div class="controls"> | |||
<%= form.text_field :name, :style => 'width: 330px' %> | |||
DNS name or IP address | |||
</div> | |||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,24 +1,27 @@ | |||
<% if @stages.empty? %> | <% if @stages.empty? %> | ||
No deployments for this host. | <p>No deployments for this host.</p> | ||
<% else %> | <% else %> | ||
<table class="sortable"> | <table class="table table-striped"> | ||
<tr> | <thead> | ||
<th>Project</th> | <tr> | ||
<th>Stage</th> | <th>Project</th> | ||
<th>Role</th> | <th>Stage</th> | ||
</tr> | <th>Role</th> | ||
<% for stage in @stages %> | |||
<tr class="<%= cycle :even, :odd, :name => 'stages' %>"> | |||
<td valign="top"><%= link_to stage.project.name, stage.project %></td> | |||
<td valign="top"><%= link_to stage.name, [stage.project, stage] %></td> | |||
<td valign="top"> | |||
<% for role in stage.roles.find(:all, :conditions => ['host_id = ?', @host.id]) %> | |||
<%= role.name %> | |||
<%= role.role_attribute_hash.inspect unless role.role_attribute_hash.blank? %> | |||
<br /> | |||
<% end %> | |||
</td> | |||
</tr> | </tr> | ||
<% end %> | </thead> | ||
<tbody> | |||
<% @stages.each do |stage| %> | |||
<tr> | |||
<td><%= link_to stage.project.name, stage.project %></td> | |||
<td><%= link_to stage.name, [stage.project, stage] %></td> | |||
<td> | |||
<% stage.roles.find(:all, :conditions => ['host_id = ?', @host.id]).each do |role| %> | |||
<%= role.name %> | |||
<%= role.role_attribute_hash.inspect unless role.role_attribute_hash.blank? %> | |||
<% end %> | |||
</td> | |||
</tr> | |||
<% end %> | |||
</tbody> | |||
</table> | </table> | ||
<% end %> | <% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,28 +1,26 @@ | |||
<% flashed_errors(:host) %> | <% content_for :page_title do %> | ||
<% @page_title = "Edit host #{@host.name}" %> | |||
<%= form_for(:host, :url => host_path(@host), :html => { :method => :put }) do |f| %> | <h1>Edit host <%= @host.name %></h1> | ||
<p> | |||
<b>Name (DNS name or IP address)</b><br /> | |||
<%= f.text_field :name, :style => 'width: 330px' %> | |||
</p> | |||
|
|||
<%= link_to 'Back to host', @host, :class => 'arrow_link ontheright', :style => 'margin-right: 330px' %> | |||
|
|||
<p> | |||
<%= submit_tag "Update" %> | |||
</p> | |||
<% end %> | <% end %> | ||
<% content_for(:breadcrumb) do %> | <% content_for :breadcrumb do %> | ||
<%= breadcrumb_box do %> | <%= breadcrumb_box do %> | ||
<%= link_to "Back to host", @host, :style => "float:right", :class => "arrow_link" %> | <%= link_to "Hosts", hosts_path %> | ||
<%= link_to "Hosts", hosts_path %> > | <span class="divider">»</span> | ||
Host <%= link_to @host.name, @host %> > | <%= link_to @host.name, @host %> | ||
<span class="divider">»</span> | |||
Edit | Edit | ||
<% end %> | <% end %> | ||
<% end %> | <% end %> | ||
<% content_for(:page_title) do %> | <% flashed_errors(:host) %> | ||
<% @page_title = "Edit host #{@host.name}" %> |
|
||
<h2>Edit host <%= @host.name %></h2> | <section> | ||
<% end %> | <%= form_for @host, html: { class: "form-horizontal" } do |f| %> | ||
<%= render partial: 'form', locals: { form: f } %> | |||
<div class="form-actions"> | |||
<%= f.submit class: "btn btn-primary" %> | |||
<%= link_to 'Back to host', host_path(@host), :class => 'btn' %> | |||
</div> | |||
<% end %> | |||
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,36 +1,40 @@ | |||
<h2>Hosts</h2> | <% content_for :page_title do %> | ||
|
<% @page_title = "Hosts" %> | ||
<fieldset class="fieldset"> | <h1>Hosts</h1> | ||
<legend> <%= pluralize(Host.count, 'Host')%> listed</legend> | <% end %> | ||
|
|||
<table class="sortable"> | |||
<tr> | |||
<th width="34%">Name</th> | |||
<th width="33%">#Stages</th> | |||
<th width="33%">#Roles</th> | |||
</tr> | |||
<% for host in @hosts %> | |||
<tr class="<%= cycle :even, :odd %>"> | |||
<td><%= link_to host.name, host %></td> | |||
<td><%= host.stages.count %></td> | |||
<td><%= host.roles.count %></td> | |||
<% if current_user.admin? %> | |||
<td><%= link_to 'Edit', [:edit, host] %></td> | |||
<td><%= link_to 'Delete', host, :data => { :confirm => 'Are you sure?' }, :method => :delete %></td> | |||
<% end %> | |||
</tr> | |||
<% end %> | |||
</table> | |||
<% content_for(:breadcrumb) do %> | <% content_for :breadcrumb do %> | ||
<%= breadcrumb_box do %> | <%= breadcrumb_box do %> | ||
<%= link_to "Hosts", hosts_path %> | <%= link_to "Hosts", hosts_path %> | ||
<% end %> | <% end %> | ||
<% end %> | <% end %> | ||
|
|
||
<% if current_user.admin? %> | <section> | ||
<br /> | <h2><%= pluralize(Host.count, 'Host')%> listed</h2> | ||
<%= link_to 'New host', new_host_path, :class => 'arrow_link' %> | <table class="table table-striped"> | ||
<% end %> | <thead> | ||
<tr> | |||
<th>Name</th> | |||
<th>Stages</th> | |||
<th>Roles</th> | |||
</tr> | |||
</thead> | |||
<tbody> | |||
<% @hosts.each do |host| %> | |||
<tr> | |||
<td><%= link_to host.name, host %></td> | |||
<td><%= host.stages.count %></td> | |||
<td><%= host.roles.count %></td> | |||
<% if current_user.admin? %> | |||
<td><%= link_to 'Edit', [:edit, host] %></td> | |||
<td><%= link_to 'Delete', host, data: { confirm: 'Are you sure?' }, method: :delete %></td> | |||
<% end %> | |||
</tr> | |||
<% end %> | |||
</tbody> | |||
</table> | |||
|
|
||
</fieldset> | <% if current_user.admin? %> | ||
<p><%= link_to 'New host', new_host_path %></p> | |||
<% end %> | |||
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,27 +1,24 @@ | |||
<% flashed_errors(:host) %> | <% content_for :breadcrumb do %> | ||
<%= form_for(:host, :url => hosts_path) do |f| %> | |||
<p> | |||
<b>Name (DNS name or IP address)</b><br /> | |||
<%= f.text_field :name, :style => 'width: 330px' %> | |||
</p> | |||
|
|||
<%= link_to 'Back to hosts', hosts_path, :class => 'arrow_link ontheright', :style => 'margin-right: 330px' %> | |||
|
|||
<p> | |||
<%= submit_tag "Create host" %> | |||
</p> | |||
<% end %> | |||
<% content_for(:breadcrumb) do %> | |||
<%= breadcrumb_box do %> | <%= breadcrumb_box do %> | ||
<%= link_to "Manage hosts", hosts_path, :style => "float:right", :class => "arrow_link" %> | <%= link_to "Hosts", hosts_path %> | ||
<%= link_to "Hosts", hosts_path %> > | <span class="divider">»</span> | ||
New | New | ||
<% end %> | <% end %> | ||
<% end %> | <% end %> | ||
<% content_for(:page_title) do %> | <% content_for :page_title do %> | ||
<% @page_title = "New host" %> | <% @page_title = "New host" %> | ||
<h2>New host</h2> | <h1>New host</h1> | ||
<% end %> | <% end %> | ||
<% flashed_errors(:host) %> | |||
|
|||
<section> | |||
<%= form_for @host, html: { class: "form-horizontal" } do |f| %> | |||
<%= render partial: 'form', locals: { form: f } %> | |||
<div class="form-actions"> | |||
<%= f.submit class: "btn btn-primary" %> | |||
<%= link_to 'Back to host', hosts_path, :class => 'btn' %> | |||
</div> | |||
<% end %> | |||
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,46 +1,37 @@ | |||
<div class="special_box"> | <% content_for :page_title do %> | ||
<div class="special_box_top"></div> | <% @page_title = "Host #{@host.name}" %> | ||
<div class="special_box_middle host_box"></div> | <h1>Host <%= @host.name %></h1> | ||
<div class="special_box_bottom"></div> | <% end %> | ||
</div> | |||
<div class="box"> | <% content_for :breadcrumb do %> | ||
<dl> | <%= breadcrumb_box do %> | ||
<%= link_to "Hosts", hosts_path %> | |||
<span class="divider">»</span> | |||
<%= link_to @host.name, host_path(@host) %> | |||
<% end %> | |||
<% end %> | |||
|
|||
<section> | |||
<dl class="dl-horizontal"> | |||
<dt>Name:</dt> | <dt>Name:</dt> | ||
<dd><%= @host.name %></dd> | <dd><%= @host.name %></dd> | ||
|
|
||
<dt>#Stages:</dt> | <dt>Stages:</dt> | ||
<dd><%= @host.stages.uniq.size %></dd> | <dd><%= @host.stages.uniq.size %></dd> | ||
|
|
||
<dt>#Roles:</dt> | <dt>Roles:</dt> | ||
<dd><%= @host.roles.count %></dd> | <dd><%= @host.roles.count %></dd> | ||
</dl> | </dl> | ||
|
|
||
<% if current_user.admin? %> | <% if current_user.admin? %> | ||
<p> | <div> | ||
<%= link_to 'Edit Host', edit_host_path(@host), :class => 'arrow_link' %> | | <%= link_to 'Edit Host', edit_host_path(@host), :class => 'arrow_link' %> | | ||
<%= link_to 'Delete', host_path(@host), :data => { :confirm => 'Are you sure?' }, :method => :delete, :class => 'arrow_link' %> | <%= link_to 'Delete', host_path(@host), :data => { :confirm => 'Are you sure?' }, :method => :delete, :class => 'arrow_link' %> | ||
</p> | </div> | ||
<% end %> | |||
</div> | |||
|
|||
<div class="clear"></div> | |||
<br> | |||
|
|||
<fieldset class="fieldset"> | |||
<legend>Stages</legend> | |||
<%= render(:partial => 'stages')%> | |||
</fieldset> | |||
|
|||
<% content_for(:breadcrumb) do %> | |||
<%= breadcrumb_box do %> | |||
<%= link_to "Manage hosts", hosts_path, :style => "float:right", :class => "arrow_link" %> | |||
<%= link_to "Hosts", hosts_path %> > | |||
Host <%= link_to @host.name, host_path(@host) %> | |||
<% end %> | <% end %> | ||
<% end %> | </section> | ||
|
|
||
<% content_for(:page_title) do %> | <section> | ||
<% @page_title = "Host #{@host.name}" %> | <h2>Stages</h2> | ||
<h2>Host <%= @host.name %></h2> | <%= render partial: 'stages' %> | ||
<% end %> | </section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.