foreman_datacenter 1.19.1 → 1.19.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/api/v2/foreman_datacenter/device_interfaces_controller.rb +0 -1
- data/app/controllers/foreman_datacenter/rack_groups_controller.rb +6 -1
- data/app/views/foreman_datacenter/rack_groups/racks.html.erb +20 -0
- data/app/views/foreman_datacenter/rack_groups/welcome.html.erb +2 -0
- data/app/views/foreman_datacenter/racks/welcome.html.erb +2 -0
- data/config/routes.rb +1 -0
- data/lib/foreman_datacenter/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6449047029017bf88de353f11fa475083dc71ce6f4e54a1f39aeda8f58748db5
|
4
|
+
data.tar.gz: 9b3b6a208b9136a88f298fe4d770158d40107d3301b18b8aaeb346974c63fc24
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 03a3b8a23127de9352686bc9907ce30c0bbbe74007903253c42041d9e0d5c3fee04ceca167cb38cf97cec63f2bc3ae9a8229e5734cdb4d03044a17c92e9c1f3e
|
7
|
+
data.tar.gz: 5c457b2b995b4c055d1902ac06b27edc263e593c6eb57e7a666a88438b6a398f1fba2196ddbc55604c453ae1f9da04ba44f2685d1f2d2f50037b83b61bb3877f
|
@@ -3,7 +3,7 @@ module ForemanDatacenter
|
|
3
3
|
include Foreman::Controller::AutoCompleteSearch
|
4
4
|
include ForemanDatacenter::Controller::Parameters::RackGroup
|
5
5
|
|
6
|
-
before_action :find_resource, only: [:show, :edit, :update, :destroy, :move]
|
6
|
+
before_action :find_resource, only: [:show, :edit, :update, :destroy, :move, :racks]
|
7
7
|
|
8
8
|
def index
|
9
9
|
@rack_groups = resource_base_search_and_page.includes(:site, :racks)
|
@@ -58,6 +58,11 @@ module ForemanDatacenter
|
|
58
58
|
process_error object: @rack_group, error_msg: 'Current Rack Group haven\'t any Racks.' if @racks.empty?
|
59
59
|
end
|
60
60
|
|
61
|
+
def racks
|
62
|
+
@racks = @rack_group.racks.includes(:devices)
|
63
|
+
process_error redirect: rack_groups_path(@rack_group), error_msg: 'Current Rack Group haven\'t any Racks.' if @racks.empty?
|
64
|
+
end
|
65
|
+
|
61
66
|
def update_associated_objects
|
62
67
|
begin
|
63
68
|
@rack_group = ForemanDatacenter::RackGroup.find(request.env['HTTP_REFERER'].split('/')[-2])
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<% stylesheet 'foreman_datacenter/datacenter' %>
|
2
|
+
<% stylesheet 'foreman_datacenter/device_roles' %>
|
3
|
+
|
4
|
+
<% title h(@rack_group.name) %>
|
5
|
+
|
6
|
+
<%= breadcrumbs(items: [{caption: _('Rack Group %s') % @rack_group.name, url: rack_group_path(@rack_group)}, {caption: _('Racks Overview')}]) %>
|
7
|
+
|
8
|
+
<% @racks.in_groups_of(3).each do |g| %>
|
9
|
+
<div class="row">
|
10
|
+
<% g.compact.each do |rack| %>
|
11
|
+
<div class="col-md-4">
|
12
|
+
<!-- Devices -->
|
13
|
+
<%= render "foreman_datacenter/racks/device_position", rack: rack %>
|
14
|
+
</div>
|
15
|
+
<% end %>
|
16
|
+
</div>
|
17
|
+
<% end %>
|
18
|
+
<div><h6 class="text-right"><%= _("* side is not defined") %></h6></div>
|
19
|
+
<div><h6 class="text-right"><%= _("** size is not defined") %></h6></div>
|
20
|
+
|
data/config/routes.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_datacenter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.19.
|
4
|
+
version: 1.19.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pavel Ivanov
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2019-05-
|
12
|
+
date: 2019-05-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: prawn
|
@@ -458,6 +458,7 @@ files:
|
|
458
458
|
- app/views/foreman_datacenter/rack_groups/index.html.erb
|
459
459
|
- app/views/foreman_datacenter/rack_groups/move.html.erb
|
460
460
|
- app/views/foreman_datacenter/rack_groups/new.html.erb
|
461
|
+
- app/views/foreman_datacenter/rack_groups/racks.html.erb
|
461
462
|
- app/views/foreman_datacenter/rack_groups/show.html.erb
|
462
463
|
- app/views/foreman_datacenter/rack_groups/welcome.html.erb
|
463
464
|
- app/views/foreman_datacenter/racks/_device_position.html.erb
|