foreman_templates 7.0.4 → 7.0.5

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.
Files changed (21) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/concerns/foreman/controller/parameters/template_params.rb +1 -1
  3. data/app/models/concerns/foreman_templates/template_extensions.rb +11 -0
  4. data/app/models/setting/template_sync.rb +6 -6
  5. data/app/services/foreman_templates/action.rb +1 -1
  6. data/app/services/foreman_templates/template_exporter.rb +1 -7
  7. data/app/views/ui_template_syncs/template_export_result.rabl +1 -1
  8. data/lib/foreman_templates/engine.rb +4 -0
  9. data/lib/foreman_templates/version.rb +1 -1
  10. data/webpack/components/NewTemplateSync/__fixtures__/templateSyncSettings.fixtures.js +7 -0
  11. data/webpack/components/NewTemplateSync/__tests__/__snapshots__/NewTemplateSyncReducer.test.js.snap +5 -0
  12. data/webpack/components/NewTemplateSync/__tests__/__snapshots__/NewTemplateSyncSelectors.test.js.snap +5 -0
  13. data/webpack/components/NewTemplateSync/components/NewTemplateSyncForm/__tests__/__snapshots__/NewTemplateSyncForm.test.js.snap +10 -0
  14. data/webpack/components/NewTemplateSync/components/NewTemplateSyncForm/__tests__/__snapshots__/NewTemplateSyncFormSelectors.test.js.snap +2 -0
  15. data/webpack/components/NewTemplateSync/components/NewTemplateSyncForm/index.js +1 -4
  16. data/webpack/components/NewTemplateSync/components/SyncSettingField.js +9 -1
  17. data/webpack/components/NewTemplateSync/components/SyncSettingFields.js +22 -1
  18. data/webpack/components/NewTemplateSync/components/__tests__/__snapshots__/SyncSettingField.test.js.snap +30 -3
  19. data/webpack/components/NewTemplateSync/components/__tests__/__snapshots__/SyncSettingFields.test.js.snap +5 -0
  20. data/webpack/components/NewTemplateSync/index.js +1 -4
  21. metadata +3 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: af1ba67f8fecbac048a7e1a4cc49f7b080ab03d4
4
- data.tar.gz: bc498b963b11bacdb250a58b02e29b69ef672f4b
3
+ metadata.gz: 773f26f24c7e56569b70ae180164487a804c89a6
4
+ data.tar.gz: 13138a1fd87a675c222333e57e7c2ea78a1489c0
5
5
  SHA512:
6
- metadata.gz: '09b4a9585c049f5d3ad634fff4297445bccfeb5391d05e9c1f61c967b58016da51977a8a2c642b39563389f0a6339f053b08c2b955403ad120d4bee83d6be31e'
7
- data.tar.gz: f067aac3c5da05df39fc7159400b77be6c2f4a64cda445892a8eebdb3a03af233189d3d1a7de4e76348cb87766d54e094228ffac5e2c823f68e4097d84dec514
6
+ metadata.gz: eecbb9e4993ab19b071dfa052290e45b9ee14d50e62b99984de31ea8f28a3a9c48b19bbc06ce17ccab1fdccd325e8016dbc2e1ea7d1a5c13c9520fbd096498d0
7
+ data.tar.gz: c2091508b18ecb0396564782b809e0e9e69c1489389a0cee5397c7c9a39dab1c2e46954486efd75de2f41b41a01090d8b0db03984b60dc392edf923c9d41b9fc
@@ -7,7 +7,7 @@ module Foreman
7
7
 
8
8
  class_methods do
9
9
  def filter_params_list
10
- %i(verbose repo branch dirname filter negate metadata_export_mode dirname)
10
+ %i(verbose repo branch dirname filter negate metadata_export_mode)
11
11
  end
12
12
 
13
13
  def extra_import_params
@@ -0,0 +1,11 @@
1
+ require 'shellwords'
2
+
3
+ module ForemanTemplates
4
+ module TemplateExtensions
5
+ extend ActiveSupport::Concern
6
+
7
+ def template_file
8
+ Shellwords.escape(name.downcase.tr(' /', '_') + '.erb')
9
+ end
10
+ end
11
+ end
@@ -3,11 +3,11 @@ class Setting
3
3
  self.include_root_in_json = false
4
4
 
5
5
  def self.common_stripped_names
6
- %w(verbose repo branch dir filter negate)
6
+ %w(verbose repo branch dirname filter negate)
7
7
  end
8
8
 
9
9
  def self.import_stripped_names
10
- %w(prefix associate force)
10
+ %w(prefix associate force lock)
11
11
  end
12
12
 
13
13
  def self.export_stripped_names
@@ -67,11 +67,11 @@ class Setting
67
67
  [
68
68
  self.set('template_sync_verbose', N_('Choose verbosity for Rake task importing templates'), false, N_('Verbosity')),
69
69
  self.set('template_sync_associate', N_('Associate templates to OS, organization and location'), 'new', N_('Associate'), nil, { :collection => Proc.new { self.associate_types } }),
70
- self.set('template_sync_prefix', N_('The string all imported templates should begin with'), "", N_('Prefix')),
70
+ self.set('template_sync_prefix', N_('The string that will be added as prefix to imported templates'), "", N_('Prefix')),
71
71
  self.set('template_sync_dirname', N_('The directory within the Git repo containing the templates'), '/', N_('Dirname')),
72
- self.set('template_sync_filter', N_('Import or export names matching this regex (case-insensitive; snippets are not filtered)'), '', N_('Filter')),
73
- self.set('template_sync_repo', N_('Target path to import and export. Different protocols can be used, e.g. /tmp/dir, git://example.com, https://example.com, ssh://example.com'), 'https://github.com/theforeman/community-templates.git', N_('Repo')),
74
- self.set('template_sync_negate', N_('Negate the prefix (for purging) / filter (for importing/exporting)'), false, N_('Negate')),
72
+ self.set('template_sync_filter', N_('Import/export names matching this regex (case-insensitive; snippets are not filtered)'), '', N_('Filter')),
73
+ self.set('template_sync_repo', N_('Target path to import/export. Different protocols can be used, for example /tmp/dir, git://example.com, https://example.com, ssh://example.com. When exporting to /tmp, note that production deployments may be configured to use private tmp.'), 'https://github.com/theforeman/community-templates.git', N_('Repo')),
74
+ self.set('template_sync_negate', N_('Negate the filter for import/export'), false, N_('Negate')),
75
75
  self.set('template_sync_branch', N_('Default branch in Git repo'), '', N_('Branch')),
76
76
  self.set('template_sync_metadata_export_mode', N_('Default metadata export mode, refresh re-renders metadata, keep will keep existing metadata, remove exports template without metadata'), 'refresh', N_('Metadata export mode'), nil, { :collection => Proc.new { self.metadata_export_mode_types } }),
77
77
  self.set('template_sync_force', N_('Should importing overwrite locked templates?'), false, N_('Force import')),
@@ -46,7 +46,7 @@ module ForemanTemplates
46
46
 
47
47
  def verify_path!(path)
48
48
  msg = _("Using file-based synchronization, but couldn't access %s. ") % path
49
- msg += _("Please check the access permissions/SELinux and make sure it is readable/writable for the web application user account, typically 'foreman'.")
49
+ msg += _("Please check the access permissions/SELinux and make sure it is readable/writable for the web application user account, typically '%s'.") % 'foreman'
50
50
  raise PathAccessException, msg unless Dir.exist?(path)
51
51
  end
52
52
 
@@ -1,5 +1,3 @@
1
- require 'shellwords'
2
-
3
1
  module ForemanTemplates
4
2
  class TemplateExporter < Action
5
3
  def self.setting_overrides
@@ -72,7 +70,7 @@ module ForemanTemplates
72
70
  templates.map do |template|
73
71
  current_dir = get_dump_dir(template)
74
72
  FileUtils.mkdir_p current_dir
75
- filename = File.join(current_dir, get_template_filename(template))
73
+ filename = File.join(current_dir, template.template_file)
76
74
  File.open(filename, 'w+') do |file|
77
75
  logger.debug "Writing to file #{filename}"
78
76
  bytes = file.write template.public_send(export_method)
@@ -85,10 +83,6 @@ module ForemanTemplates
85
83
  @export_result.add_exported_templates templates
86
84
  end
87
85
 
88
- def get_template_filename(template)
89
- Shellwords.escape(template.name.downcase.tr(' /', '_') + '.erb')
90
- end
91
-
92
86
  def get_dump_dir(template)
93
87
  kind = template.respond_to?(:template_kind) ? template.template_kind.try(:name) || 'snippet' : nil
94
88
  template_class_dir = template.model_name.plural
@@ -1,6 +1,6 @@
1
1
  object @template
2
2
 
3
- attributes :name
3
+ attributes :name, :template_file
4
4
 
5
5
  node(false) do |template|
6
6
  partial "ui_template_syncs/template_attrs", :object => template
@@ -50,5 +50,9 @@ module ForemanTemplates
50
50
  :turbolinks => false
51
51
  end
52
52
  end
53
+
54
+ config.to_prepare do
55
+ Template.include ForemanTemplates::TemplateExtensions
56
+ end
53
57
  end
54
58
  end
@@ -1,3 +1,3 @@
1
1
  module ForemanTemplates
2
- VERSION = '7.0.4'.freeze
2
+ VERSION = '7.0.5'.freeze
3
3
  end
@@ -5,6 +5,7 @@ export const associateSetting = Immutable({
5
5
  value: 'new',
6
6
  settingsType: 'string',
7
7
  name: 'associate',
8
+ description: 'Associate templates to OS, organization and location',
8
9
  selection: [
9
10
  { value: 'new', label: 'New' },
10
11
  { value: 'never', label: 'Never' },
@@ -17,6 +18,7 @@ export const forceSetting = Immutable({
17
18
  value: false,
18
19
  settingsType: 'bool',
19
20
  name: 'force',
21
+ description: 'Should importing overwrite locked templates?',
20
22
  });
21
23
 
22
24
  export const importSettings = [associateSetting, forceSetting];
@@ -26,6 +28,8 @@ export const filterSetting = Immutable({
26
28
  value: '',
27
29
  settingsType: 'string',
28
30
  name: 'filter',
31
+ description:
32
+ 'Import or export names matching this regex (case-insensitive; snippets are not filtered)',
29
33
  });
30
34
 
31
35
  export const negateSetting = Immutable({
@@ -33,6 +37,7 @@ export const negateSetting = Immutable({
33
37
  value: false,
34
38
  settingsType: 'bool',
35
39
  name: 'negate',
40
+ description: 'Negate the filter for import/export',
36
41
  });
37
42
 
38
43
  export const repoSetting = Immutable({
@@ -40,6 +45,8 @@ export const repoSetting = Immutable({
40
45
  value: 'https://github.com/theforeman/community-templates.git',
41
46
  settingsType: 'string',
42
47
  name: 'repo',
48
+ description:
49
+ 'Target path to import and export. Different protocols can be used, for example /tmp/dir, git://example.com, https://example.com, ssh://example.com. When exporting to /tmp, note that production deployments may be configured to use private tmp.',
43
50
  });
44
51
 
45
52
  export const exportSettings = [filterSetting, negateSetting, repoSetting];
@@ -23,18 +23,21 @@ Object {
23
23
  "error": "",
24
24
  "exportSettings": Array [
25
25
  Object {
26
+ "description": "Import or export names matching this regex (case-insensitive; snippets are not filtered)",
26
27
  "id": 47,
27
28
  "name": "filter",
28
29
  "settingsType": "string",
29
30
  "value": "",
30
31
  },
31
32
  Object {
33
+ "description": "Negate the filter for import/export",
32
34
  "id": 48,
33
35
  "name": "negate",
34
36
  "settingsType": "bool",
35
37
  "value": false,
36
38
  },
37
39
  Object {
40
+ "description": "Target path to import and export. Different protocols can be used, for example /tmp/dir, git://example.com, https://example.com, ssh://example.com. When exporting to /tmp, note that production deployments may be configured to use private tmp.",
38
41
  "id": 49,
39
42
  "name": "repo",
40
43
  "settingsType": "string",
@@ -43,6 +46,7 @@ Object {
43
46
  ],
44
47
  "importSettings": Array [
45
48
  Object {
49
+ "description": "Associate templates to OS, organization and location",
46
50
  "id": 45,
47
51
  "name": "associate",
48
52
  "selection": Array [
@@ -63,6 +67,7 @@ Object {
63
67
  "value": "new",
64
68
  },
65
69
  Object {
70
+ "description": "Should importing overwrite locked templates?",
66
71
  "id": 46,
67
72
  "name": "force",
68
73
  "settingsType": "bool",
@@ -3,18 +3,21 @@
3
3
  exports[`NewTemplateSyncSelectors should return export settings 1`] = `
4
4
  Array [
5
5
  Object {
6
+ "description": "Import or export names matching this regex (case-insensitive; snippets are not filtered)",
6
7
  "id": 47,
7
8
  "name": "filter",
8
9
  "settingsType": "string",
9
10
  "value": "",
10
11
  },
11
12
  Object {
13
+ "description": "Negate the filter for import/export",
12
14
  "id": 48,
13
15
  "name": "negate",
14
16
  "settingsType": "bool",
15
17
  "value": false,
16
18
  },
17
19
  Object {
20
+ "description": "Target path to import and export. Different protocols can be used, for example /tmp/dir, git://example.com, https://example.com, ssh://example.com. When exporting to /tmp, note that production deployments may be configured to use private tmp.",
18
21
  "id": 49,
19
22
  "name": "repo",
20
23
  "settingsType": "string",
@@ -26,6 +29,7 @@ Array [
26
29
  exports[`NewTemplateSyncSelectors should return import settings 1`] = `
27
30
  Array [
28
31
  Object {
32
+ "description": "Associate templates to OS, organization and location",
29
33
  "id": 45,
30
34
  "name": "associate",
31
35
  "selection": Array [
@@ -46,6 +50,7 @@ Array [
46
50
  "value": "new",
47
51
  },
48
52
  Object {
53
+ "description": "Should importing overwrite locked templates?",
49
54
  "id": 46,
50
55
  "name": "force",
51
56
  "settingsType": "bool",
@@ -28,18 +28,21 @@ exports[`NewTemplateSyncForm should render for export settings 1`] = `
28
28
  exportSettings={
29
29
  Array [
30
30
  Object {
31
+ "description": "Import or export names matching this regex (case-insensitive; snippets are not filtered)",
31
32
  "id": 47,
32
33
  "name": "filter",
33
34
  "settingsType": "string",
34
35
  "value": "",
35
36
  },
36
37
  Object {
38
+ "description": "Negate the filter for import/export",
37
39
  "id": 48,
38
40
  "name": "negate",
39
41
  "settingsType": "bool",
40
42
  "value": false,
41
43
  },
42
44
  Object {
45
+ "description": "Target path to import and export. Different protocols can be used, for example /tmp/dir, git://example.com, https://example.com, ssh://example.com. When exporting to /tmp, note that production deployments may be configured to use private tmp.",
43
46
  "id": 49,
44
47
  "name": "repo",
45
48
  "settingsType": "string",
@@ -50,6 +53,7 @@ exports[`NewTemplateSyncForm should render for export settings 1`] = `
50
53
  importSettings={
51
54
  Array [
52
55
  Object {
56
+ "description": "Associate templates to OS, organization and location",
53
57
  "id": 45,
54
58
  "name": "associate",
55
59
  "selection": Array [
@@ -70,6 +74,7 @@ exports[`NewTemplateSyncForm should render for export settings 1`] = `
70
74
  "value": "new",
71
75
  },
72
76
  Object {
77
+ "description": "Should importing overwrite locked templates?",
73
78
  "id": 46,
74
79
  "name": "force",
75
80
  "settingsType": "bool",
@@ -119,18 +124,21 @@ exports[`NewTemplateSyncForm should render when for import settings 1`] = `
119
124
  exportSettings={
120
125
  Array [
121
126
  Object {
127
+ "description": "Import or export names matching this regex (case-insensitive; snippets are not filtered)",
122
128
  "id": 47,
123
129
  "name": "filter",
124
130
  "settingsType": "string",
125
131
  "value": "",
126
132
  },
127
133
  Object {
134
+ "description": "Negate the filter for import/export",
128
135
  "id": 48,
129
136
  "name": "negate",
130
137
  "settingsType": "bool",
131
138
  "value": false,
132
139
  },
133
140
  Object {
141
+ "description": "Target path to import and export. Different protocols can be used, for example /tmp/dir, git://example.com, https://example.com, ssh://example.com. When exporting to /tmp, note that production deployments may be configured to use private tmp.",
134
142
  "id": 49,
135
143
  "name": "repo",
136
144
  "settingsType": "string",
@@ -141,6 +149,7 @@ exports[`NewTemplateSyncForm should render when for import settings 1`] = `
141
149
  importSettings={
142
150
  Array [
143
151
  Object {
152
+ "description": "Associate templates to OS, organization and location",
144
153
  "id": 45,
145
154
  "name": "associate",
146
155
  "selection": Array [
@@ -161,6 +170,7 @@ exports[`NewTemplateSyncForm should render when for import settings 1`] = `
161
170
  "value": "new",
162
171
  },
163
172
  Object {
173
+ "description": "Should importing overwrite locked templates?",
164
174
  "id": 46,
165
175
  "name": "force",
166
176
  "settingsType": "bool",
@@ -13,6 +13,7 @@ Object {
13
13
  exports[`NewTemplateSyncFormSelectors should return registered fields 1`] = `
14
14
  Object {
15
15
  "associate": Object {
16
+ "description": "Associate templates to OS, organization and location",
16
17
  "id": 45,
17
18
  "name": "associate",
18
19
  "selection": Array [
@@ -33,6 +34,7 @@ Object {
33
34
  "value": "new",
34
35
  },
35
36
  "force": Object {
37
+ "description": "Should importing overwrite locked templates?",
36
38
  "id": 46,
37
39
  "name": "force",
38
40
  "settingsType": "bool",
@@ -38,7 +38,4 @@ const mapStateToProps = (state, ownProps) => {
38
38
  const form = reduxForm({ form: NEW_TEMPLATE_SYNC_FORM_NAME })(
39
39
  NewTemplateSyncForm
40
40
  );
41
- export default connect(
42
- mapStateToProps,
43
- FormActions
44
- )(form);
41
+ export default connect(mapStateToProps, FormActions)(form);
@@ -24,6 +24,14 @@ const SyncSettingField = ({ setting, resetField, disabled }) => {
24
24
  resetField(settingName, settingValue);
25
25
  };
26
26
 
27
+ const tooltipContent = (
28
+ <div
29
+ dangerouslySetInnerHTML={{
30
+ __html: setting.description,
31
+ }}
32
+ />
33
+ );
34
+
27
35
  return (
28
36
  <TextButtonField
29
37
  name={setting.name}
@@ -38,7 +46,7 @@ const SyncSettingField = ({ setting, resetField, disabled }) => {
38
46
  disabled={disabled}
39
47
  fieldRequired={setting.required}
40
48
  validate={setting.validate}
41
- tooltipHelp={<FieldLevelHelp content={setting.description} />}
49
+ tooltipHelp={<FieldLevelHelp content={tooltipContent} />}
42
50
  >
43
51
  {setting.value}
44
52
  </TextButtonField>
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { memoize } from 'lodash';
2
+ import { memoize, upperFirst } from 'lodash';
3
3
  import PropTypes from 'prop-types';
4
4
 
5
5
  import SyncSettingField from './SyncSettingField';
@@ -34,12 +34,33 @@ const SyncSettingsFields = ({
34
34
  })
35
35
  : setting;
36
36
 
37
+ const modifyDescription = (setting, type) => {
38
+ if (setting.description) {
39
+ let split = setting.description.split('. ');
40
+ if (setting.name === 'repo' && type !== 'export') {
41
+ split = split.slice(0, split.length - 1);
42
+ }
43
+
44
+ split = split.join('.<br>');
45
+ return setting.set('description', split);
46
+ }
47
+ return setting;
48
+ };
49
+
50
+ const specializeDescription = (setting, type) =>
51
+ setting.set(
52
+ 'description',
53
+ upperFirst(setting.description.replace(/import\/export/i, type))
54
+ );
55
+
37
56
  const settingsAry = syncType === 'import' ? importSettings : exportSettings;
38
57
 
39
58
  return (
40
59
  <React.Fragment>
41
60
  {settingsAry
42
61
  .map(setting => addValidationToSetting(setting, validationData))
62
+ .map(setting => modifyDescription(setting, syncType))
63
+ .map(setting => specializeDescription(setting, syncType))
43
64
  .map(setting => (
44
65
  <SyncSettingField
45
66
  setting={setting}
@@ -18,6 +18,7 @@ exports[`SyncSettingField should render boolean setting as checkbox 1`] = `
18
18
  inputClassName="col-md-6"
19
19
  item={
20
20
  Object {
21
+ "description": "Should importing overwrite locked templates?",
21
22
  "id": 46,
22
23
  "name": "force",
23
24
  "settingsType": "bool",
@@ -29,7 +30,15 @@ exports[`SyncSettingField should render boolean setting as checkbox 1`] = `
29
30
  tooltipHelp={
30
31
  <FieldLevelHelp
31
32
  buttonClass=""
32
- content={null}
33
+ content={
34
+ <div
35
+ dangerouslySetInnerHTML={
36
+ Object {
37
+ "__html": "Should importing overwrite locked templates?",
38
+ }
39
+ }
40
+ />
41
+ }
33
42
  placement="top"
34
43
  rootClose={true}
35
44
  />
@@ -56,6 +65,7 @@ exports[`SyncSettingField should render setting with input field 1`] = `
56
65
  inputClassName="col-md-6"
57
66
  item={
58
67
  Object {
68
+ "description": "Import or export names matching this regex (case-insensitive; snippets are not filtered)",
59
69
  "id": 47,
60
70
  "name": "filter",
61
71
  "settingsType": "string",
@@ -67,7 +77,15 @@ exports[`SyncSettingField should render setting with input field 1`] = `
67
77
  tooltipHelp={
68
78
  <FieldLevelHelp
69
79
  buttonClass=""
70
- content={null}
80
+ content={
81
+ <div
82
+ dangerouslySetInnerHTML={
83
+ Object {
84
+ "__html": "Import or export names matching this regex (case-insensitive; snippets are not filtered)",
85
+ }
86
+ }
87
+ />
88
+ }
71
89
  placement="top"
72
90
  rootClose={true}
73
91
  />
@@ -94,6 +112,7 @@ exports[`SyncSettingField should render setting with select choices 1`] = `
94
112
  inputClassName="col-md-6"
95
113
  item={
96
114
  Object {
115
+ "description": "Associate templates to OS, organization and location",
97
116
  "id": 45,
98
117
  "name": "associate",
99
118
  "selection": Array [
@@ -119,7 +138,15 @@ exports[`SyncSettingField should render setting with select choices 1`] = `
119
138
  tooltipHelp={
120
139
  <FieldLevelHelp
121
140
  buttonClass=""
122
- content={null}
141
+ content={
142
+ <div
143
+ dangerouslySetInnerHTML={
144
+ Object {
145
+ "__html": "Associate templates to OS, organization and location",
146
+ }
147
+ }
148
+ />
149
+ }
123
150
  placement="top"
124
151
  rootClose={true}
125
152
  />
@@ -8,6 +8,7 @@ exports[`SyncSettingFields should show export settings 1`] = `
8
8
  resetField={[Function]}
9
9
  setting={
10
10
  Object {
11
+ "description": "Import or export names matching this regex (case-insensitive; snippets are not filtered)",
11
12
  "id": 47,
12
13
  "name": "filter",
13
14
  "settingsType": "string",
@@ -21,6 +22,7 @@ exports[`SyncSettingFields should show export settings 1`] = `
21
22
  resetField={[Function]}
22
23
  setting={
23
24
  Object {
25
+ "description": "Negate the filter for export",
24
26
  "id": 48,
25
27
  "name": "negate",
26
28
  "settingsType": "bool",
@@ -34,6 +36,7 @@ exports[`SyncSettingFields should show export settings 1`] = `
34
36
  resetField={[Function]}
35
37
  setting={
36
38
  Object {
39
+ "description": "Target path to import and export.<br>Different protocols can be used, for example /tmp/dir, git://example.com, https://example.com, ssh://example.com.<br>When exporting to /tmp, note that production deployments may be configured to use private tmp.",
37
40
  "id": 49,
38
41
  "name": "repo",
39
42
  "required": true,
@@ -56,6 +59,7 @@ exports[`SyncSettingFields should show import settings 1`] = `
56
59
  resetField={[Function]}
57
60
  setting={
58
61
  Object {
62
+ "description": "Associate templates to OS, organization and location",
59
63
  "id": 45,
60
64
  "name": "associate",
61
65
  "selection": Array [
@@ -83,6 +87,7 @@ exports[`SyncSettingFields should show import settings 1`] = `
83
87
  resetField={[Function]}
84
88
  setting={
85
89
  Object {
90
+ "description": "Should importing overwrite locked templates?",
86
91
  "id": 46,
87
92
  "name": "force",
88
93
  "settingsType": "bool",
@@ -20,10 +20,7 @@ const permissionList = (
20
20
  );
21
21
 
22
22
  export default withProtectedView(
23
- connect(
24
- mapStateToProps,
25
- TemplateSyncActions
26
- )(NewTemplateSync),
23
+ connect(mapStateToProps, TemplateSyncActions)(NewTemplateSync),
27
24
  PermissionDenied,
28
25
  props =>
29
26
  props.userPermissions &&
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: 7.0.4
4
+ version: 7.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Greg Sutcliffe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-24 00:00:00.000000000 Z
11
+ date: 2019-12-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: diffy
@@ -68,6 +68,7 @@ files:
68
68
  - app/controllers/template_syncs_controller.rb
69
69
  - app/controllers/ui_template_syncs_controller.rb
70
70
  - app/helpers/foreman_templates_helper.rb
71
+ - app/models/concerns/foreman_templates/template_extensions.rb
71
72
  - app/models/setting/template_sync.rb
72
73
  - app/services/foreman_templates/action.rb
73
74
  - app/services/foreman_templates/cleaner.rb