foreman_datacenter 1.19.5 → 1.19.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/assets/javascripts/foreman_datacenter/modal.js +15 -8
- data/app/assets/stylesheets/foreman_datacenter/horizontal-scroll.css +9 -0
- data/app/controllers/api/v2/foreman_datacenter/management_devices_controller.rb +1 -1
- data/app/controllers/api/v2/foreman_datacenter/power_outlets_controller.rb +35 -35
- data/app/controllers/foreman_datacenter/device_interface_connections_controller.rb +10 -2
- data/app/controllers/foreman_datacenter/devices_controller.rb +5 -20
- data/app/controllers/foreman_datacenter/rack_groups_controller.rb +1 -1
- data/app/controllers/foreman_datacenter/sites_controller.rb +3 -2
- data/app/models/foreman_datacenter/device_interface_connection.rb +2 -2
- data/app/views/foreman_datacenter/console_ports/index.html.erb +27 -5
- data/app/views/foreman_datacenter/device_interface_connections/index.html.erb +23 -3
- data/app/views/foreman_datacenter/devices/_interface.html.erb +11 -3
- data/app/views/foreman_datacenter/platforms/show.html.erb +8 -8
- data/app/views/foreman_datacenter/rack_groups/racks.html.erb +9 -11
- data/app/views/foreman_datacenter/racks/_device_position.html.erb +1 -1
- data/app/views/foreman_datacenter/sites/racks.html.erb +23 -4
- data/db/migrate/20180725201545_add_location_id_and_organization_id_columns_to_devices.rb +1 -1
- data/lib/foreman_datacenter/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3c390e3b2775db92120cd05376f05728bf32133009d91c69433a241da1fcfc4e
|
|
4
|
+
data.tar.gz: e2a724cd89bd2ddc56196580ee065344c75b3af093495951017503ce4d25d4e0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a3e72115f3610d69e28d5e0b303b2ac76b21e08223e3b5dabdaf35b54e2bb4dea0df7d8b9a3fc6b125c8812bbc4ceea4b25485fb786f3fc8b24d7c6a7572974a
|
|
7
|
+
data.tar.gz: 8008f4a898b4661e6a4c728ba11cf347fa68cc221972c943f87e425aa00e184fcc38be291f3dce243d83a99b40b5b5e83e05cc8d25dc06189cbc158321a425aa
|
|
@@ -10,7 +10,8 @@ $(window).click(function(event) {
|
|
|
10
10
|
var patt = new RegExp(str);
|
|
11
11
|
var token = $('meta[name="csrf-token"]').attr('content');
|
|
12
12
|
if (object_type == 'device') {
|
|
13
|
-
var checkbox_label = 'Delete associated host ONLY and keep current device as UNASSIGNED!'
|
|
13
|
+
// var checkbox_label = 'Delete associated host ONLY and keep current device as UNASSIGNED!'
|
|
14
|
+
var checkbox_label = ''
|
|
14
15
|
} else {
|
|
15
16
|
var checkbox_label = 'Delete ' + object_type + ' ONLY'
|
|
16
17
|
}
|
|
@@ -18,11 +19,18 @@ $(window).click(function(event) {
|
|
|
18
19
|
if (!(patt.test(pathname))) {
|
|
19
20
|
pathname = pathname + str
|
|
20
21
|
}
|
|
21
|
-
|
|
22
22
|
var move = "<p></p>"
|
|
23
|
-
|
|
23
|
+
var checkbox = ""
|
|
24
|
+
var text = "You will permanently delete the"
|
|
25
|
+
text_ao = ""
|
|
26
|
+
if (object_type == "site" || object_type == "rack" || object_type == "rack_group") {
|
|
24
27
|
move = '<p>You also can move associated object to another <strong>' + object_type + '</strong> before you destroy it.</p> \
|
|
25
28
|
<a class="btn btn-block btn-primary modal-btn modal-btn-primary marginbottomsixteen" href="/datacenter/' + object_type + 's/' + object_id + '/move">Move associated objects</a>'
|
|
29
|
+
checkbox = '<input type="checkbox" name="object_only" id="object_only" value="true" checked="checked">'
|
|
30
|
+
text = "By unselecting checkbox you will permanently delete the"
|
|
31
|
+
text_ao = 'with \
|
|
32
|
+
<strong>ALL</strong> \
|
|
33
|
+
associated objects' + ao
|
|
26
34
|
}
|
|
27
35
|
|
|
28
36
|
var form = '<div id="myModal" class="modal"> \
|
|
@@ -37,16 +45,15 @@ $(window).click(function(event) {
|
|
|
37
45
|
<div class="modal-body"> \
|
|
38
46
|
<p>This action \
|
|
39
47
|
<strong>cannot</strong> \
|
|
40
|
-
be undone.
|
|
48
|
+
be undone. \
|
|
49
|
+
' + text + ' \
|
|
41
50
|
<strong>' + object_name + '</strong> \
|
|
42
|
-
|
|
43
|
-
<strong>ALL</strong> \
|
|
44
|
-
associated objects' + ao + ' \
|
|
51
|
+
' + text_ao + ' \
|
|
45
52
|
</p> \
|
|
46
53
|
<form class="modal-form nonpaddingbottom" action=' + pathname + ' accept-charset="UTF-8" method="post"> \
|
|
47
54
|
<input type="hidden" name="_method" value="delete"> \
|
|
48
55
|
<input type="hidden" name="authenticity_token" value=' + token + '> \
|
|
49
|
-
|
|
56
|
+
' + checkbox + ' \
|
|
50
57
|
<label>' + checkbox_label + '</label> \
|
|
51
58
|
<input type="submit" name="commit" value="I understand the consequences, delete this ' + object_type + '" class="btn btn-block btn-danger modal-btn modal-btn-danger"> \
|
|
52
59
|
</form> \
|
|
@@ -34,7 +34,7 @@ module Api
|
|
|
34
34
|
|
|
35
35
|
def create
|
|
36
36
|
@management_device = ::ForemanDatacenter::ManagementDevice.new(management_device_params)#.merge(device_id: params[]))
|
|
37
|
-
|
|
37
|
+
process_response @management_device.save
|
|
38
38
|
end
|
|
39
39
|
|
|
40
40
|
api :PUT, "/foreman_datacenter/management_devices/:id/", N_("Update a management_device")
|
|
@@ -2,14 +2,14 @@ module Api
|
|
|
2
2
|
module V2
|
|
3
3
|
module ForemanDatacenter
|
|
4
4
|
class PowerOutletsController < ForemanDatacenter::BaseController
|
|
5
|
-
|
|
5
|
+
include ::ForemanDatacenter::Controller::Parameters::PowerOutlet
|
|
6
6
|
|
|
7
7
|
before_action :find_resource, :only => %w{show update destroy connect disconnect}
|
|
8
8
|
add_scoped_search_description_for(::ForemanDatacenter::PowerOutletTemplate)
|
|
9
9
|
param_group :search_and_pagination, ::Api::V2::BaseController
|
|
10
10
|
|
|
11
11
|
api :GET, "/foreman_datacenter/power_outlets/", N_("List all PowerOutlets")
|
|
12
|
-
|
|
12
|
+
|
|
13
13
|
def index
|
|
14
14
|
@power_outlets = resource_scope_for_index
|
|
15
15
|
end
|
|
@@ -20,57 +20,57 @@ module Api
|
|
|
20
20
|
def show
|
|
21
21
|
end
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
def_param_group :power_outlet do
|
|
24
|
+
param :power_outlet, Hash, :required => true, :action_aware => true do
|
|
25
|
+
param :name, String, :required => true
|
|
26
|
+
param :device_id, :number, :desc => N_("Device ID")
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
api :POST, "/foreman_datacenter/power_outlets", N_("Create a PowerOutlet")
|
|
31
|
+
param_group :power_outlet, :as => :create
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
def create
|
|
34
|
+
@power_outlet = ::ForemanDatacenter::PowerOutlet.new(power_outlet_params)
|
|
35
|
+
process_response @power_outlet.save
|
|
36
|
+
end
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
api :PUT, "/foreman_datacenter/power_outlets/:id/", N_("Update a PowerOutlet")
|
|
39
|
+
param :id, :identifier, :required => true
|
|
40
|
+
param_group :power_outlet
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
def update
|
|
43
|
+
process_response @power_outlet.update(power_outlet_params)
|
|
44
|
+
end
|
|
45
45
|
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
api :DELETE, "/foreman_datacenter/power_outlets/:id/", N_("Delete a PowerOutlet")
|
|
47
|
+
param :id, :identifier, :required => true
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
def destroy
|
|
50
|
+
process_response @power_outlet.destroy
|
|
51
|
+
end
|
|
52
52
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
api :PATCH, "/foreman_datacenter/power_outlets/:id/connect", N_("Connect")
|
|
54
|
+
param :id, :identifier, :required => true
|
|
55
|
+
param_group :power_outlet
|
|
56
56
|
param :console_server_port_id, :number, :desc => N_("ConsoleServerPort ID"), :required => true
|
|
57
57
|
param :connection_status, :number, :desc => N_("Connections status"), :required => true
|
|
58
58
|
|
|
59
|
-
|
|
59
|
+
def connect
|
|
60
60
|
power_port = ::ForemanDatacenter::PowerPort.find(params[:power_port_id])
|
|
61
61
|
power_port.connect(
|
|
62
62
|
@power_outlet,
|
|
63
63
|
params[:connection_status]
|
|
64
64
|
)
|
|
65
|
-
|
|
65
|
+
end
|
|
66
66
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
api :PATCH, "/foreman_datacenter/power_outlets/:id/disconnect", N_("Disconnect")
|
|
68
|
+
param :id, :identifier, :required => true
|
|
69
|
+
param_group :power_outlet
|
|
70
70
|
|
|
71
|
-
|
|
71
|
+
def disconnect
|
|
72
72
|
process_response @power_outlet.power_port.disconnect
|
|
73
|
-
|
|
73
|
+
end
|
|
74
74
|
end
|
|
75
75
|
end
|
|
76
76
|
end
|
|
@@ -3,10 +3,10 @@ module ForemanDatacenter
|
|
|
3
3
|
include Foreman::Controller::AutoCompleteSearch
|
|
4
4
|
include ForemanDatacenter::Controller::Parameters::DeviceInterfaceConnection
|
|
5
5
|
|
|
6
|
-
before_action :find_resource, only: [:destroy, :planned, :connected]
|
|
6
|
+
before_action :find_resource, only: [:destroy, :planned, :connected, :edit]
|
|
7
7
|
|
|
8
8
|
def index
|
|
9
|
-
@device_interface_connections = resource_base_search_and_page.includes(:
|
|
9
|
+
@device_interface_connections = resource_base_search_and_page.includes(second_interface: [:device], first_interface: [:device])
|
|
10
10
|
end
|
|
11
11
|
|
|
12
12
|
def new
|
|
@@ -15,6 +15,10 @@ module ForemanDatacenter
|
|
|
15
15
|
)
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
+
def edit
|
|
19
|
+
@device = @device_interface_connection.first_device
|
|
20
|
+
end
|
|
21
|
+
|
|
18
22
|
def create
|
|
19
23
|
@device_interface_connection = ForemanDatacenter::DeviceInterfaceConnection.new(device_interface_connection_params.merge(interface_a: params[:device_interface_id]))
|
|
20
24
|
@device_interface_connection.first_interface = get_device_interface
|
|
@@ -52,5 +56,9 @@ module ForemanDatacenter
|
|
|
52
56
|
def get_device_interface
|
|
53
57
|
ForemanDatacenter::DeviceInterface.find(params[:device_interface_id])
|
|
54
58
|
end
|
|
59
|
+
|
|
60
|
+
def device_interface_connection_params
|
|
61
|
+
params[:foreman_datacenter_device_interface_connetction].permit(:speed)
|
|
62
|
+
end
|
|
55
63
|
end
|
|
56
64
|
end
|
|
@@ -17,11 +17,8 @@ module ForemanDatacenter
|
|
|
17
17
|
|
|
18
18
|
def show
|
|
19
19
|
@device = ForemanDatacenter::Device.includes(
|
|
20
|
-
power_ports: [:power_outlet
|
|
21
|
-
|
|
22
|
-
console_ports: [:console_server_port, :device],
|
|
23
|
-
console_server_ports: [:console_port, :device],
|
|
24
|
-
device_bays: [:installed_device],
|
|
20
|
+
power_ports: [:power_outlet],
|
|
21
|
+
console_ports: [:console_server_port],
|
|
25
22
|
comments: [:user]
|
|
26
23
|
).find(params[:id])
|
|
27
24
|
@comments = @device.comments
|
|
@@ -63,21 +60,10 @@ module ForemanDatacenter
|
|
|
63
60
|
end
|
|
64
61
|
|
|
65
62
|
def destroy
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
process_success success_redirect: "/datacenter/devices"
|
|
69
|
-
else
|
|
70
|
-
process_error object: @device
|
|
71
|
-
end
|
|
63
|
+
if @device.destroy
|
|
64
|
+
process_success success_redirect: "/datacenter/devices"
|
|
72
65
|
else
|
|
73
|
-
|
|
74
|
-
@device.host.destroy
|
|
75
|
-
new_device_name = "Unassigned device (former: #{@device.name})"
|
|
76
|
-
@device.update(name: new_device_name)
|
|
77
|
-
process_success success_redirect: '/datacenter/devices', success_msg: 'Associated host deleted'
|
|
78
|
-
else
|
|
79
|
-
process_error success_redirect: '/datacenter/devices', error_msg: 'Associated host not found'
|
|
80
|
-
end
|
|
66
|
+
process_error object: @device
|
|
81
67
|
end
|
|
82
68
|
end
|
|
83
69
|
|
|
@@ -154,4 +140,3 @@ module ForemanDatacenter
|
|
|
154
140
|
end
|
|
155
141
|
end
|
|
156
142
|
end
|
|
157
|
-
|
|
@@ -59,7 +59,7 @@ module ForemanDatacenter
|
|
|
59
59
|
end
|
|
60
60
|
|
|
61
61
|
def racks
|
|
62
|
-
@racks = @rack_group.racks.includes(:
|
|
62
|
+
@racks = @rack_group.racks.includes(devices: [:device_role])
|
|
63
63
|
process_error redirect: rack_groups_path(@rack_group), error_msg: 'Current Rack Group haven\'t any Racks.' if @racks.empty?
|
|
64
64
|
end
|
|
65
65
|
|
|
@@ -51,8 +51,9 @@ module ForemanDatacenter
|
|
|
51
51
|
end
|
|
52
52
|
|
|
53
53
|
def racks
|
|
54
|
-
@
|
|
55
|
-
|
|
54
|
+
@rack_groups = @site.rack_groups.includes(racks: [devices: [:device_role]])
|
|
55
|
+
@ungrouped_racks = @site.racks.where(rack_group_id: nil)#.includes(:device_role)
|
|
56
|
+
process_error redirect: site_path(@site), error_msg: 'Current site haven\'t any Racks.' if (@rack_groups.empty? && @ungrouped_racks.empty?)
|
|
56
57
|
end
|
|
57
58
|
|
|
58
59
|
def move
|
|
@@ -23,7 +23,7 @@ module ForemanDatacenter
|
|
|
23
23
|
scoped_search in: :second_interface, on: :name, complete_value: true, rename: :interface_b
|
|
24
24
|
|
|
25
25
|
def first_device
|
|
26
|
-
first_interface.device
|
|
26
|
+
self.try(:first_interface).try(:device)
|
|
27
27
|
end
|
|
28
28
|
|
|
29
29
|
def first_rack
|
|
@@ -35,7 +35,7 @@ module ForemanDatacenter
|
|
|
35
35
|
end
|
|
36
36
|
|
|
37
37
|
def second_device
|
|
38
|
-
|
|
38
|
+
self.try(:second_interface).try(:device)
|
|
39
39
|
end
|
|
40
40
|
|
|
41
41
|
def second_rack
|
|
@@ -14,12 +14,34 @@
|
|
|
14
14
|
<% for port in @console_ports %>
|
|
15
15
|
<tr>
|
|
16
16
|
<td>
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
<% if port.console_server_port %>
|
|
18
|
+
<%= link_to port.console_server_port.device.name,
|
|
19
|
+
device_path(port.console_server_port.device) %>
|
|
20
|
+
<% else %>
|
|
21
|
+
<%= muted_text("Device not found", "span") %>
|
|
22
|
+
<% end %>
|
|
23
|
+
</td>
|
|
24
|
+
<td>
|
|
25
|
+
<% if port.console_server_port %>
|
|
26
|
+
<%= h port.console_server_port.name %>
|
|
27
|
+
<% else %>
|
|
28
|
+
<%= muted_text("Port not found", "span") %>
|
|
29
|
+
<% end %>
|
|
30
|
+
</td>
|
|
31
|
+
<td>
|
|
32
|
+
<% if port.device %>
|
|
33
|
+
<%= link_to port.device.name, device_path(port.device) %>
|
|
34
|
+
<% else %>
|
|
35
|
+
<%= muted_text("Device not found", "span") %>
|
|
36
|
+
<% end %>
|
|
37
|
+
</td>
|
|
38
|
+
<td>
|
|
39
|
+
<% if port %>
|
|
40
|
+
<%= h port.name %>
|
|
41
|
+
<% else %>
|
|
42
|
+
<%= muted_text("Port not found", "span") %>
|
|
43
|
+
<% end %>
|
|
19
44
|
</td>
|
|
20
|
-
<td><%= h port.console_server_port.name %></td>
|
|
21
|
-
<td><%= link_to port.device.name, device_path(port.device) %></td>
|
|
22
|
-
<td><%= h port.name %></td>
|
|
23
45
|
</tr>
|
|
24
46
|
<% end %>
|
|
25
47
|
</tbody>
|
|
@@ -15,15 +15,35 @@
|
|
|
15
15
|
<% for connection in @device_interface_connections %>
|
|
16
16
|
<tr>
|
|
17
17
|
<td>
|
|
18
|
-
|
|
18
|
+
<% if connection.first_device %>
|
|
19
|
+
<%= link_to connection.first_device.name,
|
|
19
20
|
device_path(connection.first_device) %>
|
|
21
|
+
<% else %>
|
|
22
|
+
<%= muted_text("Device not found", "span") %>
|
|
23
|
+
<% end %>
|
|
20
24
|
</td>
|
|
21
|
-
<td><%= h connection.first_interface.name %></td>
|
|
22
25
|
<td>
|
|
26
|
+
<% if connection.first_device %>
|
|
27
|
+
<%= h connection.first_interface.name %>
|
|
28
|
+
<% else %>
|
|
29
|
+
<%= muted_text("Interface not found", "span") %>
|
|
30
|
+
<% end %>
|
|
31
|
+
</td>
|
|
32
|
+
<td>
|
|
33
|
+
<% if connection.second_device %>
|
|
23
34
|
<%= link_to connection.second_device.name,
|
|
24
35
|
device_path(connection.second_device) %>
|
|
36
|
+
<% else %>
|
|
37
|
+
<%= muted_text("Device not found", "span") %>
|
|
38
|
+
<% end %>
|
|
39
|
+
</td>
|
|
40
|
+
<td>
|
|
41
|
+
<% if connection.second_device %>
|
|
42
|
+
<%= h connection.second_interface.name %>
|
|
43
|
+
<% else %>
|
|
44
|
+
<%= muted_text("Interface not found", "span") %>
|
|
45
|
+
<% end %>
|
|
25
46
|
</td>
|
|
26
|
-
<td><%= h connection.second_interface.name %></td>
|
|
27
47
|
</tr>
|
|
28
48
|
<% end %>
|
|
29
49
|
</tbody>
|
|
@@ -8,11 +8,19 @@
|
|
|
8
8
|
<td><%= h interface.mac_address %></td>
|
|
9
9
|
<td><%= h interface.ip_address %></td>
|
|
10
10
|
<td>
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
<% if interface.connected_interface %>
|
|
12
|
+
<%= link_to interface.connected_interface.device.name,
|
|
13
|
+
device_path(interface.connected_interface.device) %>
|
|
14
|
+
<% else %>
|
|
15
|
+
<%= muted_text("Device not found", "span") %>
|
|
16
|
+
<% end %>
|
|
13
17
|
</td>
|
|
14
18
|
<td>
|
|
15
|
-
|
|
19
|
+
<% if interface.connected_interface %>
|
|
20
|
+
<%= h interface.connected_interface.name %>
|
|
21
|
+
<% else %>
|
|
22
|
+
<%= muted_text("Interface not found", "span") %>
|
|
23
|
+
<% end %>
|
|
16
24
|
</td>
|
|
17
25
|
<td>
|
|
18
26
|
<%= h interface.connection.id %>
|
|
@@ -12,14 +12,14 @@
|
|
|
12
12
|
:class => 'btn btn-warning'
|
|
13
13
|
),
|
|
14
14
|
display_fake_delete_if_authorized(
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
15
|
+
hash_for_platform_path(:id => @platform).merge(:auth_object => @platform, :authorizer => authorizer),
|
|
16
|
+
class: 'btn btn-danger',
|
|
17
|
+
id: 'init-modal',
|
|
18
|
+
href: '#',
|
|
19
|
+
data: { objecttype: 'platform',
|
|
20
|
+
objectid: @platform.id,
|
|
21
|
+
objectname: @platform.to_label,
|
|
22
|
+
associatedobjects: associated_objects('platform') }
|
|
23
23
|
)
|
|
24
24
|
help_path %>
|
|
25
25
|
|
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
<% stylesheet 'foreman_datacenter/datacenter' %>
|
|
2
2
|
<% stylesheet 'foreman_datacenter/device_roles' %>
|
|
3
|
+
<% stylesheet 'foreman_datacenter/horizontal-scroll' %>
|
|
3
4
|
|
|
4
5
|
<% title h(@rack_group.name) %>
|
|
5
6
|
|
|
6
7
|
<%= breadcrumbs(items: [{caption: _('Rack Group %s') % @rack_group.name, url: rack_group_path(@rack_group)}, {caption: _('Racks Overview')}]) %>
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
</div>
|
|
17
|
-
<% end %>
|
|
9
|
+
<div class="row horizontal-scroll">
|
|
10
|
+
<% @racks.each do |rack| %>
|
|
11
|
+
<div class="col-md-4">
|
|
12
|
+
<%= render "foreman_datacenter/racks/device_position", rack: rack %>
|
|
13
|
+
</div>
|
|
14
|
+
<% end %>
|
|
15
|
+
</div>
|
|
16
|
+
|
|
18
17
|
<div><h6 class="text-right"><%= _("* side is not defined") %></h6></div>
|
|
19
18
|
<div><h6 class="text-right"><%= _("** size is not defined") %></h6></div>
|
|
20
|
-
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
<% end %>
|
|
26
26
|
<% unless rack.unpositioned_devices.empty? %>
|
|
27
27
|
<tr>
|
|
28
|
-
<td class="col-md-1">Unpositioned
|
|
28
|
+
<td class="col-md-1">Unpositioned</br>Devices</td>
|
|
29
29
|
<td class="col-md-4" style="text-align:center">
|
|
30
30
|
<% rack.unpositioned_devices.each do |d| %>
|
|
31
31
|
<div class="<%= "label " + d.device_role.color.downcase.gsub(" ","") %>" style="border-radius:40px;border:0px;"> </div>
|
|
@@ -1,17 +1,36 @@
|
|
|
1
1
|
<% stylesheet 'foreman_datacenter/datacenter' %>
|
|
2
2
|
<% stylesheet 'foreman_datacenter/device_roles' %>
|
|
3
|
+
<% stylesheet 'foreman_datacenter/horizontal-scroll' %>
|
|
3
4
|
|
|
4
5
|
<% title h(@site.name) %>
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
<%= breadcrumbs(items: [{caption: _('Site %s') % @site.name, url: site_path(@site)}, {caption: _('Racks Overview')}]) %>
|
|
8
|
+
|
|
9
|
+
<% unless @rack_groups.empty? %>
|
|
10
|
+
<% @rack_groups.each do |rg| %>
|
|
11
|
+
<h2>
|
|
12
|
+
<%= rg.name %>
|
|
13
|
+
</h2>
|
|
14
|
+
<div class="row horizontal-scroll">
|
|
15
|
+
<% rg.racks.each do |rack| %>
|
|
16
|
+
<div class="col-md-4">
|
|
17
|
+
<%= render "foreman_datacenter/racks/device_position", rack: rack %>
|
|
18
|
+
</div>
|
|
19
|
+
<% end %>
|
|
20
|
+
</div>
|
|
21
|
+
<% end %>
|
|
22
|
+
<% end %>
|
|
23
|
+
|
|
24
|
+
<% unless @ungrouped_racks.empty? %>
|
|
25
|
+
<h2>Ungrouped Racks</h2>
|
|
26
|
+
<div class="row horizontal-scroll">
|
|
27
|
+
<% @ungrouped_racks.each do |rack| %>
|
|
9
28
|
<div class="col-md-4">
|
|
10
|
-
<!-- Devices -->
|
|
11
29
|
<%= render "foreman_datacenter/racks/device_position", rack: rack %>
|
|
12
30
|
</div>
|
|
13
31
|
<% end %>
|
|
14
32
|
</div>
|
|
15
33
|
<% end %>
|
|
34
|
+
|
|
16
35
|
<div><h6 class="text-right"><%= _("* side is not defined") %></h6></div>
|
|
17
36
|
<div><h6 class="text-right"><%= _("** size is not defined") %></h6></div>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
class AddLocationIdAndOrganizationIdColumnsToDevices < ActiveRecord::Migration
|
|
1
|
+
class AddLocationIdAndOrganizationIdColumnsToDevices < ActiveRecord::Migration[4.2]
|
|
2
2
|
def change
|
|
3
3
|
add_column :devices, :organization_id, :integer
|
|
4
4
|
add_column :devices, :location_id, :integer
|
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.
|
|
4
|
+
version: 1.19.6
|
|
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-
|
|
12
|
+
date: 2019-07-30 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: prawn
|
|
@@ -90,6 +90,7 @@ files:
|
|
|
90
90
|
- app/assets/stylesheets/foreman_datacenter/device_interface_connections.css
|
|
91
91
|
- app/assets/stylesheets/foreman_datacenter/device_roles.css
|
|
92
92
|
- app/assets/stylesheets/foreman_datacenter/devices.css
|
|
93
|
+
- app/assets/stylesheets/foreman_datacenter/horizontal-scroll.css
|
|
93
94
|
- app/assets/stylesheets/foreman_datacenter/modal.css
|
|
94
95
|
- app/assets/stylesheets/foreman_datacenter/title_filter.css
|
|
95
96
|
- app/controllers/api/v2/foreman_datacenter/base_controller.rb
|
|
@@ -593,7 +594,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
593
594
|
- !ruby/object:Gem::Version
|
|
594
595
|
version: '0'
|
|
595
596
|
requirements: []
|
|
596
|
-
rubygems_version: 3.0.
|
|
597
|
+
rubygems_version: 3.0.3
|
|
597
598
|
signing_key:
|
|
598
599
|
specification_version: 4
|
|
599
600
|
summary: A plugin that lets you document your servers in a datacenter
|