foreman_templates 9.0.1 → 9.0.2

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: 46560d67a9e22719b19e71c43a0298d960ef8859a37fa0fdba12d0a2ea91fa21
4
- data.tar.gz: b57fa4cf54bff7ca216d6e3a2abbbe77215e078ee7feb896053603f3d56a07fe
3
+ metadata.gz: f43c3bbc33be62b6f39ce0abfaa0475f9635d2230f4a7f6bb551e66cf7f7fb0b
4
+ data.tar.gz: 3fdf3c192b4e639bc0fdc0a98deef65f344e1be65853dbeebb876bde4592405c
5
5
  SHA512:
6
- metadata.gz: 6422b8cd5feb8b24e541dfa819aa8f063f65385fdfe4ad884e48474d1e76ad7d327c13e60336803e48de9034a299b6a01bc727966384e75e73c9162fc29cf069
7
- data.tar.gz: ddb404bc9683c683403c4a401ccacb2118dadc197b998272f70192525738fa68746f290264ead24c42a2c4ca97d49db115aafe6f8e3cac2c416eacc6ca420230
6
+ metadata.gz: 20d726f2cb66074badb1779ad8b49613ad0f2e899fd3d8db9559a9590cec9224f98d7b2828072b4dd046cf053b5799a7cfcfeafb99723efa867cb9625ac33aa9
7
+ data.tar.gz: 2a2e07c0374ce30e0ecf900262f41e33d16f0a5a494841e5a00eaf3c5c00cbec90df3cd6d785cc68c99916783245f640af3628b7d47cc365bbf8a659416643ba
@@ -43,6 +43,6 @@ class UiTemplateSyncsController < ApplicationController
43
43
  end
44
44
 
45
45
  def render_errors(messages, severity = 'danger')
46
- render :json => { :error => { :errors => { :base => messages }, :severity => severity } }, :status => :unprocessable_entity
46
+ render :json => { :error => { :errors => { :base => messages }, full_messages: messages, :severity => severity } }, :status => :unprocessable_entity
47
47
  end
48
48
  end
@@ -5,20 +5,17 @@
5
5
  <%= webpacked_plugins_css_for :foreman_templates %>
6
6
  <% end %>
7
7
 
8
- <div id="foreman-templates"/>
9
-
10
- <%= mount_react_component('ForemanTemplates',
11
- '#foreman-templates',
12
- { :apiUrls => {
13
- :exportUrl => export_ui_template_syncs_path,
14
- :syncSettingsUrl => sync_settings_ui_template_syncs_path,
15
- :importUrl => import_ui_template_syncs_path
16
- },
17
- :validationData => { :repo => ForemanTemplates::Action.repo_start_with },
18
- :editPaths => edit_paths,
19
- :fileRepoStartWith => ForemanTemplates::Action.file_repo_start_with,
20
- :userPermissions => {
21
- :import => authorized_for(:controller => :ui_template_syncs, :action => :import),
22
- :export => authorized_for(:controller => :ui_template_syncs, :action => :export)
23
- }
24
- }.to_json )%>
8
+ <%= react_component('ForemanTemplates',
9
+ { :apiUrls => {
10
+ :exportUrl => export_ui_template_syncs_path,
11
+ :syncSettingsUrl => sync_settings_ui_template_syncs_path,
12
+ :importUrl => import_ui_template_syncs_path
13
+ },
14
+ :validationData => { :repo => ForemanTemplates::Action.repo_start_with },
15
+ :editPaths => edit_paths,
16
+ :fileRepoStartWith => ForemanTemplates::Action.file_repo_start_with,
17
+ :userPermissions => {
18
+ :import => authorized_for(:controller => :ui_template_syncs, :action => :import),
19
+ :export => authorized_for(:controller => :ui_template_syncs, :action => :export)
20
+ }
21
+ })%>
@@ -1,3 +1,3 @@
1
1
  module ForemanTemplates
2
- VERSION = '9.0.1'.freeze
2
+ VERSION = '9.0.2'.freeze
3
3
  end
@@ -4,26 +4,30 @@ import PropTypes from 'prop-types';
4
4
 
5
5
  import Routes from './Routes';
6
6
 
7
- const ForemanTemplates = ({ data }) => (
7
+ const ForemanTemplates = ({
8
+ apiUrls,
9
+ validationData,
10
+ fileRepoStartWith,
11
+ userPermissions,
12
+ editPaths,
13
+ }) => (
8
14
  <Router>
9
15
  <Routes
10
- apiUrls={data.apiUrls}
11
- validationData={data.validationData}
12
- editPaths={data.editPaths}
13
- fileRepoStartWith={data.fileRepoStartWith}
14
- userPermissions={data.userPermissions}
16
+ apiUrls={apiUrls}
17
+ validationData={validationData}
18
+ editPaths={editPaths}
19
+ fileRepoStartWith={fileRepoStartWith}
20
+ userPermissions={userPermissions}
15
21
  />
16
22
  </Router>
17
23
  );
18
24
 
19
25
  ForemanTemplates.propTypes = {
20
- data: PropTypes.shape({
21
- apiUrls: PropTypes.object,
22
- validationData: PropTypes.object,
23
- editPaths: PropTypes.object,
24
- userPermissions: PropTypes.object,
25
- fileRepoStartWith: PropTypes.array,
26
- }).isRequired,
26
+ apiUrls: PropTypes.object.isRequired,
27
+ validationData: PropTypes.object.isRequired,
28
+ editPaths: PropTypes.object.isRequired,
29
+ userPermissions: PropTypes.object.isRequired,
30
+ fileRepoStartWith: PropTypes.array.isRequired,
27
31
  };
28
32
 
29
33
  export default ForemanTemplates;
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_templates
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.0.1
4
+ version: 9.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Greg Sutcliffe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-30 00:00:00.000000000 Z
11
+ date: 2021-03-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: diffy