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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4000e320e81602255d6b49547063875bba5afd68677493afdbc1fdc88f366e7c
4
- data.tar.gz: 5a3410cb8b471eb1e148d5ba9ccb18d39825bd0f0e05ab652ea90954af6d40ee
3
+ metadata.gz: 6449047029017bf88de353f11fa475083dc71ce6f4e54a1f39aeda8f58748db5
4
+ data.tar.gz: 9b3b6a208b9136a88f298fe4d770158d40107d3301b18b8aaeb346974c63fc24
5
5
  SHA512:
6
- metadata.gz: 5b248afe5f040fd1c7b58353e1e89e2bff897ca1fbf792a6d4020640ef002677d8a1db1722f6a87e7506d4760ebb6cef9672220c85388979e179b721ea26373a
7
- data.tar.gz: 697deef8ae51b5c484ea275b1787bfbf847aa75ff2c4aad7e6c7bd674fac6036407c8d6599b0468261fd63d25741df32862241fa2b08329e241040b82530604a
6
+ metadata.gz: 03a3b8a23127de9352686bc9907ce30c0bbbe74007903253c42041d9e0d5c3fee04ceca167cb38cf97cec63f2bc3ae9a8229e5734cdb4d03044a17c92e9c1f3e
7
+ data.tar.gz: 5c457b2b995b4c055d1902ac06b27edc263e593c6eb57e7a666a88438b6a398f1fba2196ddbc55604c453ae1f9da04ba44f2685d1f2d2f50037b83b61bb3877f
@@ -38,7 +38,6 @@ module Api
38
38
 
39
39
  def create
40
40
  @device_interface = ::ForemanDatacenter::DeviceInterface.new(device_interface_params)
41
- @device_interface.save
42
41
  process_response @device_interface.save
43
42
  end
44
43
 
@@ -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
+
@@ -1,3 +1,5 @@
1
+ <%= breadcrumbs(items: [{caption: _('Rack Groups'), url: rack_groups_path}, {caption: ""}]) %>
2
+
1
3
  <% content_for(:title, _("Rack Groups")) %>
2
4
  <div class="blank-slate-pf">
3
5
  <div class="blank-slate-pf-icon">
@@ -1,3 +1,5 @@
1
+ <%= breadcrumbs(items: [{caption: _('Racks'), url: racks_path}, {caption: ""}]) %>
2
+
1
3
  <% content_for(:title, _("Racks")) %>
2
4
  <div class="blank-slate-pf">
3
5
  <div class="blank-slate-pf-icon">
data/config/routes.rb CHANGED
@@ -95,6 +95,7 @@ Foreman::Application.routes.draw do
95
95
  resources :racks do
96
96
  member do
97
97
  get :move
98
+ get :racks
98
99
  end
99
100
  collection do
100
101
  get 'auto_complete_search'
@@ -1,3 +1,3 @@
1
1
  module ForemanDatacenter
2
- VERSION = '1.19.1'.freeze
2
+ VERSION = '1.19.2'.freeze
3
3
  end
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.1
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-18 00:00:00.000000000 Z
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