foreman_datacenter 0.1.43 → 0.1.44

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b7e0e021d00c8305524c3560bf1f5ba4accf4645
4
- data.tar.gz: d35ce635323799fa0c2ee7ff34da9f35b3f1ce26
3
+ metadata.gz: f72745bfc50655c7ce5f83cfcbee25265d0e9354
4
+ data.tar.gz: 814ca127389d52916098d29f2e797d4a6b78cc77
5
5
  SHA512:
6
- metadata.gz: db0d1da5f8fb37f9953b4fef042ddda51b249b63930bbfb2d7079bcf35075ece8706835b43b3d638f09462749b239325c19b5ddd9dc0df09c73243ba8c2767fa
7
- data.tar.gz: 646e2cb1b56d64052a4447e4572961d7ad2601021731dbd7615e6276499444ff99610f53912d49588272dba1fc6e447c5dc3a322b7acd95b32a68f4a44ec96b8
6
+ metadata.gz: 832d3469dad75df579e4b32339299982c5eae27c0bdf956654a161c5f12c93268b5ccf7fc411fec3551ba60f2d90755aa0ee48e13e0e728cb3282867c794ea11
7
+ data.tar.gz: 4704acd2f9ec6e4db2db84dcc4c124474e9327114bb3cfd012ee743543c17f807b51640ac80e426b8a9bf2c580ee6f0904c856b44c0bf0be76fb4a5d9c20ce7d
@@ -2,55 +2,57 @@
2
2
 
3
3
  <% title_actions display_link_if_authorized(
4
4
  _('Edit'),
5
- hash_for_edit_device_role_path(:id => @device_role).merge(:auth_object => @device_role, :authorizer => authorizer),
5
+ hash_for_edit_device_role_path(:id => @device_role),
6
6
  :class => 'btn btn-warning'
7
7
  ),
8
8
  display_delete_if_authorized(
9
- hash_for_device_role_path(:id => @device_role).merge(:auth_object => @device_role, :authorizer => authorizer),
9
+ hash_for_device_role_path(:id => @device_role),
10
10
  :data => { :confirm => 'Are you sure?'},
11
11
  :action => :destroy,
12
12
  :class => 'btn btn-danger'
13
13
  )
14
14
  help_path %>
15
15
 
16
- <div class="col-md-6">
17
- <!-- Rack group details -->
18
- <div class="panel panel-default">
19
- <div class="panel-heading">
20
- <strong>Device role</strong>
16
+ <div class="row">
17
+ <div class="col-md-6">
18
+ <!-- Rack group details -->
19
+ <div class="panel panel-default">
20
+ <div class="panel-heading">
21
+ <strong>Device role</strong>
22
+ </div>
23
+ <table class="table table-hover panel-body">
24
+ <tbody>
25
+ <tr>
26
+ <td>Name</td>
27
+ <td><%= h @device_role.name %></td>
28
+ </tr>
29
+ <tr>
30
+ <td>Color</td>
31
+ <td><%= @device_role.color %></td>
32
+ </tr>
33
+ <tr>
34
+ <td>Created</td>
35
+ <td><%= @device_role.created_at.to_s(:long) %></td>
36
+ </tr>
37
+ <tr>
38
+ <td>Last Updated</td>
39
+ <td><%= @device_role.updated_at.to_s(:long) %></td>
40
+ </tr>
41
+ </tbody>
42
+ </table>
21
43
  </div>
22
- <table class="table table-hover panel-body">
23
- <tbody>
24
- <tr>
25
- <td>Name</td>
26
- <td><%= h @device_role.name %></td>
27
- </tr>
28
- <tr>
29
- <td>Color</td>
30
- <td><%= @device_role.color %></td>
31
- </tr>
32
- <tr>
33
- <td>Created</td>
34
- <td><%= @device_role.created_at.to_s(:long) %></td>
35
- </tr>
36
- <tr>
37
- <td>Last Updated</td>
38
- <td><%= @device_role.updated_at.to_s(:long) %></td>
39
- </tr>
40
- </tbody>
41
- </table>
42
44
  </div>
43
- </div>
44
45
 
45
- <div class="col-md-6">
46
- <!-- Stats -->
47
- <div class="panel panel-default">
48
- <div class="panel-heading"><strong>Stats</strong></div>
49
- <table class="table table-hover panel-body">
50
- <tr>
51
- <td>Devices</td>
52
- <td><%= @device_role.devices.length %></td>
53
- </tr>
54
- </table>
46
+ <div class="col-md-6">
47
+ <!-- Stats -->
48
+ <div class="panel panel-default">
49
+ <div class="panel-heading"><strong>Stats</strong></div>
50
+ <table class="table table-hover panel-body">
51
+ <tr>
52
+ <td>Devices</td>
53
+ <td><%= @device_role.devices.length %></td>
54
+ </tr>
55
+ </table>
56
+ </div>
55
57
  </div>
56
58
  </div>
@@ -2,356 +2,358 @@
2
2
 
3
3
  <% title_actions display_link_if_authorized(
4
4
  _('Edit'),
5
- hash_for_edit_device_type_path(:id => @device_type).merge(:auth_object => @device_type, :authorizer => authorizer),
5
+ hash_for_edit_device_type_path(:id => @device_type),
6
6
  :class => 'btn btn-warning'
7
7
  ),
8
8
  display_delete_if_authorized(
9
- hash_for_device_type_path(:id => @device_type).merge(:auth_object => @device_type, :authorizer => authorizer),
9
+ hash_for_device_type_path(:id => @device_type),
10
10
  :data => { :confirm => 'Are you sure?'},
11
11
  :action => :destroy,
12
12
  :class => 'btn btn-danger'
13
13
  )
14
14
  help_path %>
15
15
 
16
- <div class="col-md-6">
17
- <!-- Chassis -->
18
- <div class="panel panel-default">
19
- <div class="panel-heading">
20
- <strong>Chassis</strong>
16
+ <div class="row">
17
+ <div class="col-md-6">
18
+ <!-- Chassis -->
19
+ <div class="panel panel-default">
20
+ <div class="panel-heading">
21
+ <strong>Chassis</strong>
22
+ </div>
23
+ <table class="table table-hover panel-body">
24
+ <tbody>
25
+ <tr>
26
+ <td>Manufacturer</td>
27
+ <td><%= h @device_type.manufacturer.name %></td>
28
+ </tr>
29
+ <tr>
30
+ <td>Model Name</td>
31
+ <td><%= h @device_type.model %></td>
32
+ </tr>
33
+ <tr>
34
+ <td>Height (U)</td>
35
+ <td><%= @device_type.u_height %></td>
36
+ </tr>
37
+ <tr>
38
+ <td>Full Depth</td>
39
+ <td><%= @device_type.is_full_depth ? 'Yes' : 'No' %></td>
40
+ </tr>
41
+ </tbody>
42
+ </table>
21
43
  </div>
22
- <table class="table table-hover panel-body">
23
- <tbody>
24
- <tr>
25
- <td>Manufacturer</td>
26
- <td><%= h @device_type.manufacturer.name %></td>
27
- </tr>
28
- <tr>
29
- <td>Model Name</td>
30
- <td><%= h @device_type.model %></td>
31
- </tr>
32
- <tr>
33
- <td>Height (U)</td>
34
- <td><%= @device_type.u_height %></td>
35
- </tr>
36
- <tr>
37
- <td>Full Depth</td>
38
- <td><%= @device_type.is_full_depth ? 'Yes' : 'No' %></td>
39
- </tr>
40
- </tbody>
41
- </table>
42
- </div>
43
44
 
44
- <!-- Function -->
45
- <div class="panel panel-default">
46
- <div class="panel-heading">
47
- <strong>Function</strong>
45
+ <!-- Function -->
46
+ <div class="panel panel-default">
47
+ <div class="panel-heading">
48
+ <strong>Function</strong>
49
+ </div>
50
+ <table class="table table-hover panel-body">
51
+ <tbody>
52
+ <tr>
53
+ <td class="col-sm-3 text-right">
54
+ <% if @device_type.is_console_server %>
55
+ <span class="glyphicon glyphicon-ok text-success"></span>
56
+ <% else %>
57
+ <span class="glyphicon glyphicon-remove text-danger"></span>
58
+ <% end %>
59
+ </td>
60
+ <td class="col-sm-10">
61
+ <strong>Console Server</strong>
62
+ <br>
63
+ <% if @device_type.is_console_server %>
64
+ <small class="text-muted">This device has console server ports</small>
65
+ <% else %>
66
+ <small class="text-muted">This device does not have console server ports</small>
67
+ <% end %>
68
+ </td>
69
+ </tr>
70
+ <tr>
71
+ <td class="col-sm-3 text-right">
72
+ <% if @device_type.is_pdu %>
73
+ <span class="glyphicon glyphicon-ok text-success"></span>
74
+ <% else %>
75
+ <span class="glyphicon glyphicon-remove text-danger"></span>
76
+ <% end %>
77
+ </td>
78
+ <td class="col-sm-10">
79
+ <strong>PDU</strong>
80
+ <br>
81
+ <% if @device_type.is_pdu %>
82
+ <small class="text-muted">This device has power outlets</small>
83
+ <% else %>
84
+ <small class="text-muted">This device does not have power outlets</small>
85
+ <% end %>
86
+ </td>
87
+ </tr>
88
+ <tr>
89
+ <td class="col-sm-3 text-right">
90
+ <% if @device_type.is_network_device %>
91
+ <span class="glyphicon glyphicon-ok text-success"></span>
92
+ <% else %>
93
+ <span class="glyphicon glyphicon-remove text-danger"></span>
94
+ <% end %>
95
+ </td>
96
+ <td class="col-sm-10">
97
+ <strong>Network Device</strong>
98
+ <br>
99
+ <% if @device_type.is_network_device %>
100
+ <small class="text-muted">This device has non-management network interfaces</small>
101
+ <% else %>
102
+ <small class="text-muted">This device does not have non-management network interfaces</small>
103
+ <% end %>
104
+ </td>
105
+ </tr>
106
+ <tr>
107
+ <td class="col-sm-3 text-right">
108
+ <% if @device_type.parent? %>
109
+ <label class="label label-info">Parent</label>
110
+ <% elsif @device_type.child? %>
111
+ <label class="label label-primary">Child</label>
112
+ <% else %>
113
+ <label class="label label-default">None</label>
114
+ <% end %>
115
+ </td>
116
+ <td class="col-sm-10">
117
+ <strong>Parent/Child</strong>
118
+ <br>
119
+ <% if @device_type.parent? %>
120
+ <small class="text-muted">This device has device bays for mounting child devices</small>
121
+ <% elsif @device_type.child? %>
122
+ <small class="text-muted">This device can only be mounted in a parent device</small>
123
+ <% else %>
124
+ <small class="text-muted">This device does not have device bays</small>
125
+ <% end %>
126
+ </td>
127
+ </tr>
128
+ </tbody>
129
+ </table>
48
130
  </div>
49
- <table class="table table-hover panel-body">
50
- <tbody>
51
- <tr>
52
- <td class="col-sm-3 text-right">
53
- <% if @device_type.is_console_server %>
54
- <span class="glyphicon glyphicon-ok text-success"></span>
55
- <% else %>
56
- <span class="glyphicon glyphicon-remove text-danger"></span>
57
- <% end %>
58
- </td>
59
- <td class="col-sm-10">
60
- <strong>Console Server</strong>
61
- <br>
62
- <% if @device_type.is_console_server %>
63
- <small class="text-muted">This device has console server ports</small>
64
- <% else %>
65
- <small class="text-muted">This device does not have console server ports</small>
66
- <% end %>
67
- </td>
68
- </tr>
69
- <tr>
70
- <td class="col-sm-3 text-right">
71
- <% if @device_type.is_pdu %>
72
- <span class="glyphicon glyphicon-ok text-success"></span>
73
- <% else %>
74
- <span class="glyphicon glyphicon-remove text-danger"></span>
75
- <% end %>
76
- </td>
77
- <td class="col-sm-10">
78
- <strong>PDU</strong>
79
- <br>
80
- <% if @device_type.is_pdu %>
81
- <small class="text-muted">This device has power outlets</small>
82
- <% else %>
83
- <small class="text-muted">This device does not have power outlets</small>
84
- <% end %>
85
- </td>
86
- </tr>
87
- <tr>
88
- <td class="col-sm-3 text-right">
89
- <% if @device_type.is_network_device %>
90
- <span class="glyphicon glyphicon-ok text-success"></span>
91
- <% else %>
92
- <span class="glyphicon glyphicon-remove text-danger"></span>
93
- <% end %>
94
- </td>
95
- <td class="col-sm-10">
96
- <strong>Network Device</strong>
97
- <br>
98
- <% if @device_type.is_network_device %>
99
- <small class="text-muted">This device has non-management network interfaces</small>
100
- <% else %>
101
- <small class="text-muted">This device does not have non-management network interfaces</small>
102
- <% end %>
103
- </td>
104
- </tr>
105
- <tr>
106
- <td class="col-sm-3 text-right">
107
- <% if @device_type.parent? %>
108
- <label class="label label-info">Parent</label>
109
- <% elsif @device_type.child? %>
110
- <label class="label label-primary">Child</label>
111
- <% else %>
112
- <label class="label label-default">None</label>
113
- <% end %>
114
- </td>
115
- <td class="col-sm-10">
116
- <strong>Parent/Child</strong>
117
- <br>
118
- <% if @device_type.parent? %>
119
- <small class="text-muted">This device has device bays for mounting child devices</small>
120
- <% elsif @device_type.child? %>
121
- <small class="text-muted">This device can only be mounted in a parent device</small>
122
- <% else %>
123
- <small class="text-muted">This device does not have device bays</small>
124
- <% end %>
125
- </td>
126
- </tr>
127
- </tbody>
128
- </table>
129
- </div>
130
131
 
131
- <!-- Console ports -->
132
- <div class="panel panel-default">
133
- <div class="panel-heading">
134
- <%= link_to 'Add a console port', new_device_type_console_port_template_path(@device_type),
135
- class: 'btn btn-primary btn-xs pull-right'%>
136
- <strong>Console ports</strong>
132
+ <!-- Console ports -->
133
+ <div class="panel panel-default">
134
+ <div class="panel-heading">
135
+ <%= link_to 'Add a console port', new_device_type_console_port_template_path(@device_type),
136
+ class: 'btn btn-primary btn-xs pull-right'%>
137
+ <strong>Console ports</strong>
138
+ </div>
139
+ <% if @device_type.console_port_templates.empty? %>
140
+ <div class="panel-body">None</div>
141
+ <% else %>
142
+ <table class="table table-hover panel-body">
143
+ <tbody>
144
+ <% @device_type.console_port_templates.each do |console_port| %>
145
+ <tr>
146
+ <td class="col-sm-10"><%= console_port.name %></td>
147
+ <td class="col-sm-2">
148
+ <%= action_buttons(
149
+ display_delete_if_authorized(
150
+ hash_for_device_type_console_port_template_path(id: console_port, device_type_id: @device_type).merge(:auth_object => console_port, :authorizer => authorizer),
151
+ :data => { :confirm => 'Are you sure?'},
152
+ :action => :destroy
153
+ )
154
+ ) %>
155
+ </td>
156
+ </tr>
157
+ <% end %>
158
+ </tbody>
159
+ </table>
160
+ <% end %>
137
161
  </div>
138
- <% if @device_type.console_port_templates.empty? %>
139
- <div class="panel-body">None</div>
140
- <% else %>
141
- <table class="table table-hover panel-body">
142
- <tbody>
143
- <% @device_type.console_port_templates.each do |console_port| %>
144
- <tr>
145
- <td class="col-sm-10"><%= console_port.name %></td>
146
- <td class="col-sm-2">
147
- <%= action_buttons(
148
- display_delete_if_authorized(
149
- hash_for_device_type_console_port_template_path(id: console_port, device_type_id: @device_type).merge(:auth_object => console_port, :authorizer => authorizer),
150
- :data => { :confirm => 'Are you sure?'},
151
- :action => :destroy
152
- )
153
- ) %>
154
- </td>
155
- </tr>
156
- <% end %>
157
- </tbody>
158
- </table>
159
- <% end %>
160
- </div>
161
162
 
162
- <!-- Power ports -->
163
- <div class="panel panel-default">
164
- <div class="panel-heading">
165
- <%= link_to 'Add a power port', new_device_type_power_port_template_path(@device_type),
166
- class: 'btn btn-primary btn-xs pull-right' %>
167
- <strong>Power ports</strong>
163
+ <!-- Power ports -->
164
+ <div class="panel panel-default">
165
+ <div class="panel-heading">
166
+ <%= link_to 'Add a power port', new_device_type_power_port_template_path(@device_type),
167
+ class: 'btn btn-primary btn-xs pull-right' %>
168
+ <strong>Power ports</strong>
169
+ </div>
170
+ <% if @device_type.power_port_templates.empty? %>
171
+ <div class="panel-body">None</div>
172
+ <% else %>
173
+ <table class="table table-hover panel-body">
174
+ <tbody>
175
+ <% @device_type.power_port_templates.each do |power_port| %>
176
+ <tr>
177
+ <td class="col-sm-10"><%= power_port.name %></td>
178
+ <td class="col-sm-2">
179
+ <%= action_buttons(
180
+ display_delete_if_authorized(
181
+ hash_for_device_type_power_port_template_path(id: power_port, device_type_id: @device_type).merge(:auth_object => power_port, :authorizer => authorizer),
182
+ :data => { :confirm => 'Are you sure?'},
183
+ :action => :destroy
184
+ )
185
+ ) %>
186
+ </td>
187
+ </tr>
188
+ <% end %>
189
+ </tbody>
190
+ </table>
191
+ <% end %>
168
192
  </div>
169
- <% if @device_type.power_port_templates.empty? %>
170
- <div class="panel-body">None</div>
171
- <% else %>
172
- <table class="table table-hover panel-body">
173
- <tbody>
174
- <% @device_type.power_port_templates.each do |power_port| %>
175
- <tr>
176
- <td class="col-sm-10"><%= power_port.name %></td>
177
- <td class="col-sm-2">
178
- <%= action_buttons(
179
- display_delete_if_authorized(
180
- hash_for_device_type_power_port_template_path(id: power_port, device_type_id: @device_type).merge(:auth_object => power_port, :authorizer => authorizer),
181
- :data => { :confirm => 'Are you sure?'},
182
- :action => :destroy
183
- )
184
- ) %>
185
- </td>
186
- </tr>
187
- <% end %>
188
- </tbody>
189
- </table>
190
- <% end %>
191
- </div>
192
193
 
193
- <!-- Management Interfaces -->
194
- <div class="panel panel-default">
195
- <div class="panel-heading">
196
- <%= link_to 'Add a management interface', new_management_device_type_interface_templates_path(@device_type),
197
- class: 'btn btn-primary btn-xs pull-right' %>
198
- <strong>Management Interfaces</strong>
194
+ <!-- Management Interfaces -->
195
+ <div class="panel panel-default">
196
+ <div class="panel-heading">
197
+ <%= link_to 'Add a management interface', new_management_device_type_interface_templates_path(@device_type),
198
+ class: 'btn btn-primary btn-xs pull-right' %>
199
+ <strong>Management Interfaces</strong>
200
+ </div>
201
+ <% if @device_type.management_interfaces.empty? %>
202
+ <div class="panel-body">None</div>
203
+ <% else %>
204
+ <table class="table table-hover panel-body">
205
+ <tbody>
206
+ <% @device_type.management_interfaces.each do |management_interface| %>
207
+ <tr>
208
+ <td class="col-sm-10"><%= management_interface.name %></td>
209
+ <td class="col-sm-2">
210
+ <%= action_buttons(
211
+ display_delete_if_authorized(
212
+ hash_for_device_type_interface_template_path(id: management_interface, device_type_id: @device_type).merge(:auth_object => management_interface, :authorizer => authorizer),
213
+ :data => { :confirm => 'Are you sure?'},
214
+ :action => :destroy
215
+ )
216
+ ) %>
217
+ </td>
218
+ </tr>
219
+ <% end %>
220
+ </tbody>
221
+ </table>
222
+ <% end %>
199
223
  </div>
200
- <% if @device_type.management_interfaces.empty? %>
201
- <div class="panel-body">None</div>
202
- <% else %>
203
- <table class="table table-hover panel-body">
204
- <tbody>
205
- <% @device_type.management_interfaces.each do |management_interface| %>
206
- <tr>
207
- <td class="col-sm-10"><%= management_interface.name %></td>
208
- <td class="col-sm-2">
209
- <%= action_buttons(
210
- display_delete_if_authorized(
211
- hash_for_device_type_interface_template_path(id: management_interface, device_type_id: @device_type).merge(:auth_object => management_interface, :authorizer => authorizer),
212
- :data => { :confirm => 'Are you sure?'},
213
- :action => :destroy
214
- )
215
- ) %>
216
- </td>
217
- </tr>
218
- <% end %>
219
- </tbody>
220
- </table>
221
- <% end %>
222
224
  </div>
223
- </div>
224
225
 
225
- <div class="col-md-6">
226
- <!-- Device Bays -->
227
- <% if @device_type.parent? %>
228
- <div class="panel panel-default">
229
- <div class="panel-heading">
230
- <%= link_to 'Add a device bay', new_device_type_device_bay_template_path(@device_type),
231
- class: 'btn btn-primary btn-xs pull-right'%>
232
- <strong>Device Bays</strong>
226
+ <div class="col-md-6">
227
+ <!-- Device Bays -->
228
+ <% if @device_type.parent? %>
229
+ <div class="panel panel-default">
230
+ <div class="panel-heading">
231
+ <%= link_to 'Add a device bay', new_device_type_device_bay_template_path(@device_type),
232
+ class: 'btn btn-primary btn-xs pull-right'%>
233
+ <strong>Device Bays</strong>
234
+ </div>
235
+ <% if @device_type.device_bay_templates.empty? %>
236
+ <div class="panel-body">None</div>
237
+ <% else %>
238
+ <table class="table table-hover panel-body">
239
+ <tbody>
240
+ <% @device_type.device_bay_templates.each do |device_bay| %>
241
+ <tr>
242
+ <td class="col-sm-10"><%= device_bay.name %></td>
243
+ <td class="col-sm-10">
244
+ <%= action_buttons(
245
+ display_delete_if_authorized(
246
+ hash_for_device_type_device_bay_template_path(id: device_bay, device_type_id: @device_type).merge(:auth_object => device_bay, :authorizer => authorizer),
247
+ :data => { :confirm => 'Are you sure?'},
248
+ :action => :destroy
249
+ )
250
+ ) %>
251
+ </td>
252
+ </tr>
253
+ <% end %>
254
+ </tbody>
255
+ </table>
256
+ <% end %>
233
257
  </div>
234
- <% if @device_type.device_bay_templates.empty? %>
235
- <div class="panel-body">None</div>
236
- <% else %>
237
- <table class="table table-hover panel-body">
238
- <tbody>
239
- <% @device_type.device_bay_templates.each do |device_bay| %>
240
- <tr>
241
- <td class="col-sm-10"><%= device_bay.name %></td>
242
- <td class="col-sm-10">
243
- <%= action_buttons(
244
- display_delete_if_authorized(
245
- hash_for_device_type_device_bay_template_path(id: device_bay, device_type_id: @device_type).merge(:auth_object => device_bay, :authorizer => authorizer),
246
- :data => { :confirm => 'Are you sure?'},
247
- :action => :destroy
248
- )
249
- ) %>
250
- </td>
251
- </tr>
252
- <% end %>
253
- </tbody>
254
- </table>
255
- <% end %>
256
- </div>
257
- <% end %>
258
+ <% end %>
258
259
 
259
- <!-- Interfaces -->
260
- <% if @device_type.is_network_device %>
261
- <div class="panel panel-default">
262
- <div class="panel-heading">
263
- <%= link_to 'Add an interface', new_device_type_interface_template_path(@device_type),
264
- class: 'btn btn-primary btn-xs pull-right'%>
265
- <strong>Interfaces</strong>
260
+ <!-- Interfaces -->
261
+ <% if @device_type.is_network_device %>
262
+ <div class="panel panel-default">
263
+ <div class="panel-heading">
264
+ <%= link_to 'Add an interface', new_device_type_interface_template_path(@device_type),
265
+ class: 'btn btn-primary btn-xs pull-right'%>
266
+ <strong>Interfaces</strong>
267
+ </div>
268
+ <% if @device_type.network_interfaces.empty? %>
269
+ <div class="panel-body">None</div>
270
+ <% else %>
271
+ <table class="table table-hover panel-body">
272
+ <tbody>
273
+ <% @device_type.network_interfaces.each do |interface| %>
274
+ <tr>
275
+ <td class="col-sm-10"><%= interface.name %></td>
276
+ <td class="col-sm-2">
277
+ <%= action_buttons(
278
+ display_delete_if_authorized(
279
+ hash_for_device_type_interface_template_path(id: interface, device_type_id: @device_type).merge(:auth_object => interface, :authorizer => authorizer),
280
+ :data => { :confirm => 'Are you sure?'},
281
+ :action => :destroy
282
+ )
283
+ ) %>
284
+ </td>
285
+ </tr>
286
+ <% end %>
287
+ </tbody>
288
+ </table>
289
+ <% end %>
266
290
  </div>
267
- <% if @device_type.network_interfaces.empty? %>
268
- <div class="panel-body">None</div>
269
- <% else %>
270
- <table class="table table-hover panel-body">
271
- <tbody>
272
- <% @device_type.network_interfaces.each do |interface| %>
273
- <tr>
274
- <td class="col-sm-10"><%= interface.name %></td>
275
- <td class="col-sm-2">
276
- <%= action_buttons(
277
- display_delete_if_authorized(
278
- hash_for_device_type_interface_template_path(id: interface, device_type_id: @device_type).merge(:auth_object => interface, :authorizer => authorizer),
279
- :data => { :confirm => 'Are you sure?'},
280
- :action => :destroy
281
- )
282
- ) %>
283
- </td>
284
- </tr>
285
- <% end %>
286
- </tbody>
287
- </table>
288
- <% end %>
289
- </div>
290
- <% end %>
291
+ <% end %>
291
292
 
292
- <!-- Console server ports -->
293
- <% if @device_type.is_console_server %>
294
- <div class="panel panel-default">
295
- <div class="panel-heading">
296
- <%= link_to 'Add a console server port', new_device_type_console_server_port_template_path(@device_type),
297
- class: 'btn btn-primary btn-xs pull-right'%>
298
- <strong>Console Server Ports</strong>
293
+ <!-- Console server ports -->
294
+ <% if @device_type.is_console_server %>
295
+ <div class="panel panel-default">
296
+ <div class="panel-heading">
297
+ <%= link_to 'Add a console server port', new_device_type_console_server_port_template_path(@device_type),
298
+ class: 'btn btn-primary btn-xs pull-right'%>
299
+ <strong>Console Server Ports</strong>
300
+ </div>
301
+ <% if @device_type.console_server_port_templates.empty? %>
302
+ <div class="panel-body">None</div>
303
+ <% else %>
304
+ <table class="table table-hover panel-body">
305
+ <tbody>
306
+ <% @device_type.console_server_port_templates.each do |console_server_port| %>
307
+ <tr>
308
+ <td class="col-sm-10"><%= console_server_port.name %></td>
309
+ <td class="col-sm-2">
310
+ <%= action_buttons(
311
+ display_delete_if_authorized(
312
+ hash_for_device_type_console_server_port_template_path(id: console_server_port, device_type_id: @device_type).merge(:auth_object => console_server_port, :authorizer => authorizer),
313
+ :data => { :confirm => 'Are you sure?'},
314
+ :action => :destroy
315
+ )
316
+ ) %>
317
+ </td>
318
+ </tr>
319
+ <% end %>
320
+ </tbody>
321
+ </table>
322
+ <% end %>
299
323
  </div>
300
- <% if @device_type.console_server_port_templates.empty? %>
301
- <div class="panel-body">None</div>
302
- <% else %>
303
- <table class="table table-hover panel-body">
304
- <tbody>
305
- <% @device_type.console_server_port_templates.each do |console_server_port| %>
306
- <tr>
307
- <td class="col-sm-10"><%= console_server_port.name %></td>
308
- <td class="col-sm-2">
309
- <%= action_buttons(
310
- display_delete_if_authorized(
311
- hash_for_device_type_console_server_port_template_path(id: console_server_port, device_type_id: @device_type).merge(:auth_object => console_server_port, :authorizer => authorizer),
312
- :data => { :confirm => 'Are you sure?'},
313
- :action => :destroy
314
- )
315
- ) %>
316
- </td>
317
- </tr>
318
- <% end %>
319
- </tbody>
320
- </table>
321
- <% end %>
322
- </div>
323
- <% end %>
324
+ <% end %>
324
325
 
325
- <!-- Power outlets -->
326
- <% if @device_type.is_pdu %>
327
- <div class="panel panel-default">
328
- <div class="panel-heading">
329
- <%= link_to 'Add a power outlet', new_device_type_power_outlet_template_path(@device_type),
330
- class: 'btn btn-primary btn-xs pull-right'%>
331
- <strong>Power Outlets</strong>
326
+ <!-- Power outlets -->
327
+ <% if @device_type.is_pdu %>
328
+ <div class="panel panel-default">
329
+ <div class="panel-heading">
330
+ <%= link_to 'Add a power outlet', new_device_type_power_outlet_template_path(@device_type),
331
+ class: 'btn btn-primary btn-xs pull-right'%>
332
+ <strong>Power Outlets</strong>
333
+ </div>
334
+ <% if @device_type.power_outlet_templates.empty? %>
335
+ <div class="panel-body">None</div>
336
+ <% else %>
337
+ <table class="table table-hover panel-body">
338
+ <tbody>
339
+ <% @device_type.power_outlet_templates.each do |power_outlet| %>
340
+ <tr>
341
+ <td class="col-sm-10"><%= power_outlet.name %> </td>
342
+ <td class="col-sm-2">
343
+ <%= action_buttons(
344
+ display_delete_if_authorized(
345
+ hash_for_device_type_power_outlet_template_path(id: power_outlet, device_type_id: @device_type).merge(:auth_object => power_outlet, :authorizer => authorizer),
346
+ :data => { :confirm => 'Are you sure?'},
347
+ :action => :destroy
348
+ )
349
+ ) %>
350
+ </td>
351
+ </tr>
352
+ <% end %>
353
+ </tbody>
354
+ </table>
355
+ <% end %>
332
356
  </div>
333
- <% if @device_type.power_outlet_templates.empty? %>
334
- <div class="panel-body">None</div>
335
- <% else %>
336
- <table class="table table-hover panel-body">
337
- <tbody>
338
- <% @device_type.power_outlet_templates.each do |power_outlet| %>
339
- <tr>
340
- <td class="col-sm-10"><%= power_outlet.name %> </td>
341
- <td class="col-sm-2">
342
- <%= action_buttons(
343
- display_delete_if_authorized(
344
- hash_for_device_type_power_outlet_template_path(id: power_outlet, device_type_id: @device_type).merge(:auth_object => power_outlet, :authorizer => authorizer),
345
- :data => { :confirm => 'Are you sure?'},
346
- :action => :destroy
347
- )
348
- ) %>
349
- </td>
350
- </tr>
351
- <% end %>
352
- </tbody>
353
- </table>
354
- <% end %>
355
- </div>
356
- <% end %>
357
+ <% end %>
358
+ </div>
357
359
  </div>