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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b6dee4917059af9a4715bd20e3e1acb21ac54330f769ef91d81e9b7511ba526b
4
- data.tar.gz: 4c366cc1ae027b415f0458c87de49698d28d3d335297338e2bdc37c9e3038fa9
3
+ metadata.gz: a55e2d14bc3338f033bf77cfe58a119ad36abb53a04ea8013b6f8f2ea767da0e
4
+ data.tar.gz: 99bda3732ad524cca82fc4f634fe7c3991107fb8f3844b5a8d0bf7cc13b516bf
5
5
  SHA512:
6
- metadata.gz: 8218406d02bd9fd1926e688ceebf4f2596c1da6495b434650fe930e753157c006ab0ac1508530ae00d0f958b4527c0842e608ce27ba410c71369fbd4cc3a5c1e
7
- data.tar.gz: 621fc9445b9481ab5e5b6efe233bba3ff93c8ab08c9c694cadd1ce30892507a6b7a7118dc95f05442308b6a776f79653c16542a3c539031909cab9bff0fd25f3
6
+ metadata.gz: 0e53011b83ab2299387e115f82a99e38f39af7a78c53bb876aa460f45caa6cc329ad3837c3d20eb13277ddd6d64c5d52ba5df256fed785818593edf8032af799
7
+ data.tar.gz: 4af129a85daa47e234ad715a001dda1d35ed90f51983aaf8054793df7f9f6bacaa06811f1f63b4634eeb7f938e7cba4eaf6e4febe024193542f420ba43f619e3
@@ -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,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>
@@ -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
@@ -104,6 +104,7 @@ Foreman::Application.routes.draw do
104
104
  resources :rack_groups do
105
105
  member do
106
106
  get :move
107
+ get :racks
107
108
  end
108
109
  collection do
109
110
  get 'auto_complete_search'
@@ -1,3 +1,3 @@
1
1
  module ForemanDatacenter
2
- VERSION = '1.20.1'.freeze
2
+ VERSION = '1.20.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.20.1
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-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