foreman_datacenter 0.1.13 → 0.1.14

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: 849351f650ad4c2513970b6b17e13ea6ac73b5a3
4
- data.tar.gz: bbad7a0ac336ab434e52ec58e02fa9c7fc348b2b
3
+ metadata.gz: f2635b9749edcbb7f851c930b1a98ee55e08e7cc
4
+ data.tar.gz: 213d3c51deb8379ebeae9a6cc91c949247bb52ca
5
5
  SHA512:
6
- metadata.gz: 2256af34aea744ac4864d135d1bcd26ddf3f9a231725ee665bd0da7ac821806b6bbc6258a69e17b67cfe813cf2eb81df6c4f710bc9b54281c75fc34b92845fb9
7
- data.tar.gz: b2506c66f219ff9d3ca0ad9e7f37adb497ae0476526099e232c22fb0d0197dad7b1cddd8340a4cf12eab8f683ea7daf6c178f005ef0b0348439e697ec4e742c8
6
+ metadata.gz: b4bc37e022fc70353fc20446f8aeec1cc1b0eef16e099f30a540eb0be8a475fabf275b9d2224fd75ad6a5d259366b644b9e9ab224d6bb5f17280d19612a39fea
7
+ data.tar.gz: 257dadcfcc6d14328b7d3f992fdc42bdd88aac4fcde1765c10d6a7c2df31c7290d4761b184ceef992ad20662b6c4a3c4900dc1d9672ed736ae7bf32e5ea23b20
@@ -105,8 +105,8 @@ module ForemanDatacenter
105
105
 
106
106
  def device_params
107
107
  params[:device].permit(:device_type_id, :device_role_id, :platform_id,
108
- :name, :serial, :rack_id, :position, :face,
109
- :status, :primary_ip4, :primary_ip6, :comments,
108
+ :name, :serial, :rack_id, :position, :side,
109
+ :face, :status, :primary_ip4, :primary_ip6, :comments,
110
110
  :host_id)
111
111
  end
112
112
 
@@ -29,6 +29,7 @@ module ForemanDatacenter
29
29
  has_one :site, :through => :rack
30
30
 
31
31
  enum face: [:front, :rear]
32
+ enum side: [:left, :right, :full]
32
33
  enum status: [:active, :offline]
33
34
 
34
35
  validates :device_type_id, presence: true
@@ -54,6 +54,8 @@
54
54
  </div>
55
55
  <%= selectable_f f, :face, ForemanDatacenter::Device.faces.keys,
56
56
  { include_blank: 'Choose a rack face', label: 'Rack face' } %>
57
+ <%= selectable_f f, :side, ForemanDatacenter::Device.sides.keys,
58
+ { include_blank: 'Choose a rack side', label: 'Rack side' } %>
57
59
  <%= text_f f, :position, type: 'number', min: 0,
58
60
  help_inline: 'For multi-U devices, this is the lowest occupied rack unit.' %>
59
61
  </div>
@@ -54,7 +54,7 @@
54
54
  </tr>
55
55
  <tr>
56
56
  <td>Position</td>
57
- <td><%= @device.position %> / <%= @device.face %></td>
57
+ <td><%= @device.position %> / <%= @device.face %> / <%= @device.side %></td>
58
58
  </tr>
59
59
  <tr>
60
60
  <td>Device Type</td>
@@ -0,0 +1,5 @@
1
+ class AddSideToDevice < ActiveRecord::Migration
2
+ def change
3
+ add_column :devices, :side, :integer, null: true
4
+ end
5
+ end
@@ -1,3 +1,3 @@
1
1
  module ForemanDatacenter
2
- VERSION = '0.1.13'.freeze
2
+ VERSION = '0.1.14'.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.13
4
+ version: 0.1.14
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-14 00:00:00.000000000 Z
11
+ date: 2017-08-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: deface
@@ -313,6 +313,7 @@ files:
313
313
  - db/migrate/20160906205605_rename_field_in_management_devices.rb
314
314
  - db/migrate/20160909205537_add_name_index_to_racks.rb
315
315
  - db/migrate/20160920221011_remove_index_from_devices.rb
316
+ - db/migrate/20170824122025_add_side_to_device.rb
316
317
  - lib/foreman_datacenter.rb
317
318
  - lib/foreman_datacenter/engine.rb
318
319
  - lib/foreman_datacenter/version.rb