foreman_datacenter 0.1.15 → 0.1.16

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
  SHA1:
3
- metadata.gz: e9a5390f350683b404c37dd3de63f80cb49eb114
4
- data.tar.gz: c82a570e7156edb3fb5d65f0a5ce3ffd5be15253
3
+ metadata.gz: 2a8029e4df7adafcda4d1ade53cb167ce038883c
4
+ data.tar.gz: 90dc1540ae5df4f76c33236149316d5d3da4224b
5
5
  SHA512:
6
- metadata.gz: 6cfb19e9e727e3db78470ba625a764c6a4f8f637651be226232e327ed29de750cb9cf5a88b6a80273f370ef036bb1d18ff45b35efb6d8176bfc5228778a7b846
7
- data.tar.gz: c4f9dd9c0b58508245ba2f7a833192159f50c0044e9edb44a18c6e8984851d53eaefdb5ab7e45d024bdb5cfbcbee42ee4647facc53db2f52401c81bdb6ec6046
6
+ metadata.gz: fa814dc20d737cf509ffe3b60ddbb2975097338eb1c1e634e4d6161da0c4aab8d77131fe786cbd5abba5687f5baa3470ef49bc83b8d4e6da4d3620387dc0de84
7
+ data.tar.gz: 5d530d669dde1797c3c65c4420be55f0436abbfcb9ae66c6c4d17797d21e45779f975d9b224600c4bfd550915663a7fade4016364c7f1ca28b1669b0c05605a2
@@ -171,5 +171,11 @@ module ForemanDatacenter
171
171
  end
172
172
  end
173
173
  end
174
+
175
+ # def positions
176
+ # result = []
177
+ # size.times{ |p| result << (position + p) }
178
+ # return result
179
+ # end
174
180
  end
175
181
  end
@@ -58,6 +58,8 @@
58
58
  { include_blank: 'Choose a rack side', label: 'Rack side' } %>
59
59
  <%= text_f f, :position, type: 'number', min: 0,
60
60
  help_inline: 'For multi-U devices, this is the lowest occupied rack unit.' %>
61
+ <%= text_f f, :size, type: 'number', min: 0,
62
+ help_inline: 'For multi-U devices, how many rack units occupied by device.' %>
61
63
  </div>
62
64
  </div>
63
65
 
@@ -54,7 +54,7 @@
54
54
  </tr>
55
55
  <tr>
56
56
  <td>Position</td>
57
- <td><%= @device.position %> / <%= @device.face %> / <%= @device.side %></td>
57
+ <td><%= @device.positions.join(", ") %> / <%= @device.face %> / <%= @device.side %></td>
58
58
  </tr>
59
59
  <tr>
60
60
  <td>Device Type</td>
@@ -0,0 +1,5 @@
1
+ class AddRacksizeToDevice < ActiveRecord::Migration
2
+ def change
3
+ add_column :devices, :size, :integer, default: 1
4
+ end
5
+ end
@@ -1,3 +1,3 @@
1
1
  module ForemanDatacenter
2
- VERSION = '0.1.15'.freeze
2
+ VERSION = '0.1.16'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_datacenter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.15
4
+ version: 0.1.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Ivanov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-30 00:00:00.000000000 Z
11
+ date: 2017-09-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: deface
@@ -315,6 +315,7 @@ files:
315
315
  - db/migrate/20160909205537_add_name_index_to_racks.rb
316
316
  - db/migrate/20160920221011_remove_index_from_devices.rb
317
317
  - db/migrate/20170824122025_add_side_to_device.rb
318
+ - db/migrate/20170918202630_add_racksize_to_device.rb
318
319
  - lib/foreman_datacenter.rb
319
320
  - lib/foreman_datacenter/engine.rb
320
321
  - lib/foreman_datacenter/version.rb