foreman_remote_execution 2.0.10 → 3.0.0

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
  SHA256:
3
- metadata.gz: f1388b76bd51fc62c909952fde2a9e3110ce5829e5e823680b64fabf14b9911d
4
- data.tar.gz: cab4201ed3465206b4f42af6d76af8b87a207b1a67a2564a0c49523cd1a72110
3
+ metadata.gz: 8331c21b2ae7b9448ecd1d8aa077d68f2ee8d3a8225caafccd3e090dd5234451
4
+ data.tar.gz: 13b90484092acd1f0f97959b46490498eb27551597ad36e38e9f539e80c92db9
5
5
  SHA512:
6
- metadata.gz: a69676ea76f8947253f94a9d54e1b50d5d82dd9e669c77c38e01f3d5de8175995a5e08b4fdbc676d20c486b87981889ea4b662ff8b7fc47dcd3e7eb7cb72f799
7
- data.tar.gz: 67ae194c5a30d7bfb121b600bfe90ec4573c259b06350e98f1ba3551b977452b0e27fe687129af021bb14a2891909a99c83bb8ea4290b99b24d39667f06aa525
6
+ metadata.gz: e85339c30ba160c77796e360258663b4d52af4213f1dcdf84b16356cf2ff5cd83e2672c978eba29f647f441235cc94bf110783be665860351ea8d10ecc3d117d
7
+ data.tar.gz: c8cb6c2dfe3beca8cbfdc8eec8f93c5bebdb3570623ea4ad4f71975a489db8bbb2d5afc8046f485cf64cb6a79cd9dfdfbbedcb490384611ab5a435e154b30f05
data/.babelrc.js ADDED
@@ -0,0 +1,3 @@
1
+ module.exports = {
2
+ presets: ['@theforeman/builder/babel'],
3
+ };
data/.gitignore CHANGED
@@ -13,3 +13,4 @@ locale/*/*.edit.po
13
13
  locale/*/*.po.time_stamp
14
14
  Gemfile.lock
15
15
  node_modules/
16
+ package-lock.json
@@ -16,7 +16,7 @@ class ForeignInputSet < ApplicationRecord
16
16
 
17
17
  def inputs(templates_stack = [])
18
18
  return [] unless target_template
19
- if templates_stack.include?(target_template) || template&.id == target_template&.id
19
+ if templates_stack.include?(target_template)
20
20
  raise CircularDependencyError.new(N_("Circular dependency detected in foreign input set '%{template}' -> '%{target_template}'. Templates stack: %{templates_stack}"),
21
21
  :template => template.name, :target_template => target_template.name, :templates_stack => templates_stack.map(&:name).inspect)
22
22
  end
@@ -206,9 +206,7 @@ class JobInvocation < ApplicationRecord
206
206
  template_invocation = pattern_template_invocations.first
207
207
  hash_base = Hash.new { |hash, key| hash[key] = "%{#{key}}" }
208
208
  input_hash = template_invocation.input_values.reduce(hash_base) do |h, v|
209
- value = v.value
210
- value = '*' * 3 if v.template_input.respond_to?(:hidden_value) && v.template_input.hidden_value?
211
- h.update(v.template_input.name => value)
209
+ h.update(v.template_input.name => v.value)
212
210
  end
213
211
  input_hash.update(:job_category => job_category)
214
212
  input_hash.update(:template_name => template_invocation.template.name)
@@ -31,9 +31,6 @@ end
31
31
  child :template_invocations do
32
32
  attributes :template_id, :template_name
33
33
  child :input_values do
34
- attributes :template_input_name, :template_input_id
35
- node :value do |iv|
36
- iv.template_input.respond_to?(:hidden_value) && iv.template_input.hidden_value? ? '*' * 5 : iv.value
37
- end
34
+ attributes :template_input_name, :template_input_id, :value
38
35
  end
39
36
  end
@@ -8,7 +8,7 @@
8
8
  <p>
9
9
  <ul>
10
10
  <% template_invocation.input_values.joins(:template_input).each do |input_value| %>
11
- <li><b><%= input_value.template_input.name %></b>: <%= input_value.template_input.hidden_value ? '*' * 5 : trunc_with_tooltip(input_value.value, 255) %></li>
11
+ <li><b><%= input_value.template_input.name %></b>: <%= trunc_with_tooltip(input_value.value, 255) %></li>
12
12
  <% end %>
13
13
  </ul>
14
14
  </p>
@@ -33,7 +33,7 @@
33
33
  <% end %>
34
34
  </span>
35
35
  <%= selectable_f targeting_fields, :bookmark_id, @composer.available_bookmarks.map { |b| [b.name, b.id] }, :selected => @composer.targeting.bookmark_id, :include_blank => true %>
36
- <%= textarea_f targeting_fields, :search_query, :value => @composer.displayed_search_query, :rows => 5, :class => 'autocomplete-input form-control', :'data-url' => auto_complete_search_hosts_path %>
36
+ <%= autocomplete_f targeting_fields, :search_query, :search_query => @composer.displayed_search_query, :full_path => auto_complete_search_hosts_path %>
37
37
 
38
38
  <div class="form-group ">
39
39
  <label class="col-md-2 control-label"><%= _('Resolves to') %></label>
@@ -1,9 +1,9 @@
1
1
  <% if job_invocation.resolved? %>
2
- <%= form_tag job_invocation_path(job_invocation), :method => "get",:id =>"search-form" do %>
2
+ <%= form_with url: job_invocation_path(job_invocation), method: "get", id: "search-form" do |f| %>
3
3
  <div class="row">
4
4
  <div class="title_filter col-md-6">
5
5
  <div class="input-group">
6
- <%= auto_complete_search(:search, params[:search].try(:squeeze, " "), :placeholder => _("Filter") + ' ...', :path => hosts_path) %>
6
+ <%= autocomplete_f(f, :search, value: params[:search].try(:squeeze, " "), placeholder: _("Filter") + ' ...', path: hosts_path, only_input: true) %>
7
7
  <span class="input-group-btn">
8
8
  <button class="btn btn-default" type="submit">
9
9
  <%= icon_text('search', content_tag(:span, _('Search'), :class => 'hidden-xs', :kind => 'fa')) %>
@@ -12,7 +12,7 @@
12
12
  <% template_invocation.input_values.joins(:template_input).each do |input_value| %>
13
13
  <tr>
14
14
  <td><b><%= input_value.template_input.name %></b></td>
15
- <td><%= input_value.template_input.hidden_value? ? '*' * 5 : input_value.value %></td>
15
+ <td><%= input_value.value %></td>
16
16
  </tr>
17
17
  <% end %>
18
18
  </tbody>
@@ -26,7 +26,7 @@ end
26
26
 
27
27
  def read_settings
28
28
  settings_path = ENV["FOREMAN_COCKPIT_SETTINGS"] || "/etc/foreman-cockpit/settings.yml"
29
- settings = YAML.safe_load(File.read(settings_path), [Symbol])
29
+ settings = YAML.safe_load(File.read(settings_path))
30
30
  LOG.level = Logger.const_get(settings.fetch(:log_level, "INFO"))
31
31
  LOG.info("Running foreman-cockpit-session with settings from #{settings_path}:\n#{settings.inspect}")
32
32
  settings
@@ -44,7 +44,7 @@ module ForemanRemoteExecution
44
44
 
45
45
  initializer 'foreman_remote_execution.register_plugin', before: :finisher_hook do |_app|
46
46
  Foreman::Plugin.register :foreman_remote_execution do
47
- requires_foreman '>= 1.24'
47
+ requires_foreman '>= 1.25'
48
48
 
49
49
  apipie_documented_controllers ["#{ForemanRemoteExecution::Engine.root}/app/controllers/api/v2/*.rb"]
50
50
 
@@ -1,3 +1,3 @@
1
1
  module ForemanRemoteExecution
2
- VERSION = '2.0.10'.freeze
2
+ VERSION = '3.0.0'.freeze
3
3
  end
data/package.json CHANGED
@@ -31,14 +31,12 @@
31
31
  "url": "http://projects.theforeman.org/projects/foreman_remote_execution/issues"
32
32
  },
33
33
  "devDependencies": {
34
- "@theforeman/vendor-dev": "^1.4.0",
35
- "babel-eslint": "^8.2.1",
36
- "babel-plugin-lodash": "^3.3.2",
37
- "babel-plugin-transform-class-properties": "^6.24.1",
38
- "babel-plugin-transform-object-assign": "^6.22.0",
39
- "babel-plugin-transform-object-rest-spread": "^6.26.0",
40
- "babel-preset-env": "^1.6.0",
41
- "babel-preset-react": "^6.24.1",
34
+ "@babel/core": "^7.7.0",
35
+ "@theforeman/env": "^3.3.2",
36
+ "@theforeman/builder": "^3.3.2",
37
+ "@theforeman/vendor-dev": "^3.3.2",
38
+ "babel-eslint": "^10.0.0",
39
+ "babel-jest": "^24.9.0",
42
40
  "enzyme": "^3.2.0",
43
41
  "enzyme-adapter-react-16": "^1.1.0",
44
42
  "enzyme-to-json": "^3.1.2",
@@ -48,9 +46,9 @@
48
46
  "eslint-plugin-jest": "^21.2.0",
49
47
  "eslint-plugin-jsx-a11y": "^6.0.2",
50
48
  "eslint-plugin-react": "^7.4.0",
51
- "jest": "^21.2.1"
49
+ "jest": "^24.9.0"
52
50
  },
53
51
  "dependencies": {
54
- "@theforeman/vendor": "^1.4.0"
52
+ "@theforeman/vendor": "^3.3.2"
55
53
  }
56
54
  }
@@ -1,4 +1,5 @@
1
- import 'babel-polyfill';
1
+ import 'core-js/shim';
2
+ import 'regenerator-runtime/runtime';
2
3
 
3
4
  import { configure } from 'enzyme';
4
5
  import Adapter from 'enzyme-adapter-react-16';
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_remote_execution
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.10
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Foreman Remote Execution team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-03 00:00:00.000000000 Z
11
+ date: 2019-12-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: deface
@@ -130,7 +130,7 @@ extra_rdoc_files:
130
130
  - README.md
131
131
  - LICENSE
132
132
  files:
133
- - ".babelrc"
133
+ - ".babelrc.js"
134
134
  - ".eslintignore"
135
135
  - ".eslintrc"
136
136
  - ".gitignore"
data/.babelrc DELETED
@@ -1,16 +0,0 @@
1
- {
2
- "presets": ["env", "react"],
3
- "plugins": [
4
- "transform-class-properties",
5
- "transform-object-rest-spread",
6
- "transform-object-assign"
7
- ],
8
- "env": {
9
- "test": {
10
- "presets": ["@theforeman/vendor-dev/babel.preset.js"]
11
- },
12
- "storybook": {
13
- "presets": ["@theforeman/vendor-dev/babel.preset.js"]
14
- }
15
- }
16
- }