foreman_datacenter 0.1.3 → 0.1.4

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: 2108d9581ec9752d0696faabf33613b579e9faa0
4
- data.tar.gz: 25490c98b0b06de2838a19d8e7a8c076e39b835f
3
+ metadata.gz: 3b91579d55f787d836801e7f57f7503d6ec51229
4
+ data.tar.gz: ff7936c077ac1dea3c476738378760537054e918
5
5
  SHA512:
6
- metadata.gz: a2ec3cf2a97a1311eb105ed8a3bb96270999fd2fefe718799ea6843990e0a333e62376b32baa85e9b80a7954d0a544e9b1f292f3e16047f492e868d2255e3b71
7
- data.tar.gz: 137c7d222f9103b094ed052384a312ff4a686b9997a65a468e7384a571eb6e619d227cef413664ad619f36977b7a38bf936e157fceb274e5909eb0f78cfa0576
6
+ metadata.gz: da0d848f8495e5899407713c142b65729e7f7a1b00680d2874f5f212d56a22167e84e0b170df6acac353ae3f28e769b6ff120698a4d10c30092d015abf1f7918
7
+ data.tar.gz: 789e0a3632b324a440bfdc82282963846dcd6cdfee162682e244ac107a243e88b83942e14a2a9dd08c9f797e80a39084c895114b853a690f8baf3c6a6b1b6ae4
@@ -0,0 +1,9 @@
1
+ $(function () {
2
+ $('[data-reveal-password]').click(function () {
3
+ var $button = $(this);
4
+ var password = $button.data('password');
5
+ var $container = $button.parent();
6
+ $container.empty();
7
+ $container.append('<kbd>' + password + '</kbd>');
8
+ });
9
+ });
@@ -46,7 +46,8 @@ module ForemanDatacenter
46
46
  end
47
47
 
48
48
  def management_device_params
49
- params[:management_device].permit(:device_id, :name, :login, :password)
49
+ params[:management_device].
50
+ permit(:device_id, :console_url, :login, :password)
50
51
  end
51
52
  end
52
53
  end
@@ -2,6 +2,6 @@ module ForemanDatacenter
2
2
  class ManagementDevice < ActiveRecord::Base
3
3
  belongs_to :device, :class_name => 'ForemanDatacenter::Device'
4
4
 
5
- validates :name, presence: true, length: { maximum: 255 }
5
+ validates :console_url, presence: true, length: { maximum: 255 }
6
6
  end
7
7
  end
@@ -1,4 +1,5 @@
1
1
  <% javascript 'foreman_datacenter/ajax' %>
2
+ <% javascript 'foreman_datacenter/management_devices' %>
2
3
 
3
4
  <% title @device.name %>
4
5
 
@@ -231,8 +232,8 @@
231
232
  <tbody>
232
233
  <% if @device.management_device %>
233
234
  <tr>
234
- <td>Name</td>
235
- <td><%= h @device.management_device.name %></td>
235
+ <td>Console URL</td>
236
+ <td><%= h @device.management_device.console_url %></td>
236
237
  </tr>
237
238
  <tr>
238
239
  <td>Login</td>
@@ -240,7 +241,11 @@
240
241
  </tr>
241
242
  <tr>
242
243
  <td>Password</td>
243
- <td><%= h @device.management_device.password %></td>
244
+ <td>
245
+ <button class="btn btn-primary btn-xs" data-reveal-password data-password="<%= h @device.management_device.password %>">
246
+ Reveal
247
+ </button>
248
+ </td>
244
249
  </tr>
245
250
  <% else %>
246
251
  <tr>
@@ -10,9 +10,9 @@
10
10
  </div>
11
11
  <%= f.hidden_field :device_id %>
12
12
 
13
- <%= text_f f, :name, required: true %>
13
+ <%= text_f f, :console_url, required: true %>
14
14
  <%= text_f f, :login %>
15
- <%= text_f f, :password %>
15
+ <%= text_f f, :password, type: 'password' %>
16
16
 
17
17
  <%= submit_or_cancel f, false, cancel_path: device_path(@management_device.device) %>
18
18
  <% end %>
@@ -0,0 +1,5 @@
1
+ class RenameFieldInManagementDevices < ActiveRecord::Migration
2
+ def change
3
+ rename_column :management_devices, :name, :console_url
4
+ end
5
+ end
@@ -1,3 +1,3 @@
1
1
  module ForemanDatacenter
2
- VERSION = '0.1.3'.freeze
2
+ VERSION = '0.1.4'.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.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Ivanov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-06 00:00:00.000000000 Z
11
+ date: 2016-09-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: deface
@@ -77,6 +77,7 @@ files:
77
77
  - app/assets/javascripts/foreman_datacenter/console_ports.js
78
78
  - app/assets/javascripts/foreman_datacenter/device_interface_connections.js
79
79
  - app/assets/javascripts/foreman_datacenter/devices.js
80
+ - app/assets/javascripts/foreman_datacenter/management_devices.js
80
81
  - app/assets/javascripts/foreman_datacenter/racks.js
81
82
  - app/assets/javascripts/foreman_datacenter/shared.js
82
83
  - app/assets/stylesheets/foreman_datacenter/device_interface_connections.css
@@ -278,6 +279,7 @@ files:
278
279
  - db/migrate/20160824212010_add_host_ref_to_devices.rb
279
280
  - db/migrate/20160828200938_add_ip_address_to_device_interfaces.rb
280
281
  - db/migrate/20160905211522_create_management_devices.rb
282
+ - db/migrate/20160906205605_rename_field_in_management_devices.rb
281
283
  - lib/foreman_datacenter/engine.rb
282
284
  - lib/foreman_datacenter/version.rb
283
285
  - lib/foreman_datacenter.rb