foreman_datacenter 1.20.1 → 1.20.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 +19 -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: a55e2d14bc3338f033bf77cfe58a119ad36abb53a04ea8013b6f8f2ea767da0e
|
4
|
+
data.tar.gz: 99bda3732ad524cca82fc4f634fe7c3991107fb8f3844b5a8d0bf7cc13b516bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e53011b83ab2299387e115f82a99e38f39af7a78c53bb876aa460f45caa6cc329ad3837c3d20eb13277ddd6d64c5d52ba5df256fed785818593edf8032af799
|
7
|
+
data.tar.gz: 4af129a85daa47e234ad715a001dda1d35ed90f51983aaf8054793df7f9f6bacaa06811f1f63b4634eeb7f938e7cba4eaf6e4febe024193542f420ba43f619e3
|
@@ -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,19 @@
|
|
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>
|
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.20.
|
4
|
+
version: 1.20.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
|