foreman_templates 9.2.0 → 9.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/db/migrate/20211122154929_templates_settings_category_to_dsl.rb +1 -1
- data/lib/foreman_templates/engine.rb +1 -1
- data/lib/foreman_templates/version.rb +1 -1
- data/package.json +10 -36
- data/webpack/__mocks__/foremanReact/common/I18n.js +1 -0
- data/webpack/__tests__/helpers.test.js +1 -1
- data/webpack/components/NewTemplateSync/NewTemplateSync.js +2 -1
- data/webpack/components/NewTemplateSync/__tests__/NewTemplateSync.test.js +1 -1
- data/webpack/components/NewTemplateSync/__tests__/NewTemplateSyncReducer.test.js +1 -1
- data/webpack/components/NewTemplateSync/__tests__/NewTemplateSyncSelectors.test.js +1 -1
- data/webpack/components/NewTemplateSync/components/ButtonTooltip.js +8 -14
- data/webpack/components/NewTemplateSync/components/NewTemplateSyncForm/__tests__/NewTemplateSyncFormSelectors.test.js +1 -1
- data/webpack/components/NewTemplateSync/components/__tests__/SyncSettingField.test.js +1 -1
- data/webpack/components/NewTemplateSync/components/__tests__/SyncSettingFields.test.js +1 -1
- data/webpack/components/NewTemplateSync/components/__tests__/SyncTypeRadios.test.js +1 -1
- data/webpack/components/NewTemplateSync/components/__tests__/TextButtonField.test.js +1 -1
- data/webpack/components/PageNotFound.js +1 -0
- data/webpack/components/PermissionDenied.js +1 -0
- data/webpack/components/TemplateSyncResult/__tests__/TemplateSyncResult.test.js +1 -1
- data/webpack/components/TemplateSyncResult/__tests__/TemplateSyncResultReducer.test.js +1 -1
- data/webpack/components/TemplateSyncResult/components/FinishedSyncResult.js +3 -2
- data/webpack/components/TemplateSyncResult/components/SyncedTemplate/InfoItem.js +4 -8
- data/webpack/components/TemplateSyncResult/components/SyncedTemplate/StringInfoItem.js +1 -0
- data/webpack/components/TemplateSyncResult/components/SyncedTemplate/helpers.test.js +1 -1
- data/webpack/components/TemplateSyncResult/components/__tests__/SyncResultList.test.js +1 -1
- data/webpack/components/TemplateSyncResult/components/__tests__/SyncedTemplate.test.js +1 -1
- data/webpack/testSetup.js +1 -1
- metadata +18 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d10e7500d6a4e3b0c4334823c306d9464f8b90ecbc24f350fdaa7efbecca2541
|
4
|
+
data.tar.gz: f4aa56a7a5642b61db628ae173015d7055c0e43c83333b65451d3bdb69df542b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e6aa838a9f67873f841e301c6e990cf9203e514c559682d07fddcfa295b159790832089b2c1ec4c922bbdb282dee0c10a6441907d883a62edd12fe2421bc833d
|
7
|
+
data.tar.gz: 1ce8a6c5337db333e2cac800f77cab2ed01ae2a5a418db714ee42b231cd1ab20a09a571a2347e03bbecfb1788aceb87c536e11b6405962287fd49b33a29a0c9b
|
@@ -1,5 +1,5 @@
|
|
1
1
|
class TemplatesSettingsCategoryToDsl < ActiveRecord::Migration[6.0]
|
2
2
|
def up
|
3
|
-
Setting.where(category: 'Setting::TemplateSync').update_all(category: 'Setting')
|
3
|
+
Setting.where(category: 'Setting::TemplateSync').update_all(category: 'Setting') if column_exists?(:settings, :category)
|
4
4
|
end
|
5
5
|
end
|
@@ -24,7 +24,7 @@ module ForemanTemplates
|
|
24
24
|
|
25
25
|
initializer 'foreman_templates.register_plugin', :before => :finisher_hook do
|
26
26
|
Foreman::Plugin.register :foreman_templates do
|
27
|
-
requires_foreman '>= 3.
|
27
|
+
requires_foreman '>= 3.3'
|
28
28
|
|
29
29
|
apipie_documented_controllers ["#{ForemanTemplates::Engine.root}/app/controllers/api/v2/*.rb"]
|
30
30
|
|
data/package.json
CHANGED
@@ -7,8 +7,8 @@
|
|
7
7
|
"test": "test"
|
8
8
|
},
|
9
9
|
"scripts": {
|
10
|
-
"test": "
|
11
|
-
"lint": "
|
10
|
+
"test": "tfm-test --plugin",
|
11
|
+
"lint": "tfm-lint --plugin -d /webpack"
|
12
12
|
},
|
13
13
|
"repository": {
|
14
14
|
"type": "git",
|
@@ -21,45 +21,19 @@
|
|
21
21
|
},
|
22
22
|
"homepage": "https://github.com/theforeman/foreman_templates",
|
23
23
|
"peerDependencies": {
|
24
|
-
"@theforeman/vendor": "
|
24
|
+
"@theforeman/vendor": "^10.1.0"
|
25
25
|
},
|
26
26
|
"devDependencies": {
|
27
27
|
"@babel/core": "^7.7.0",
|
28
|
-
"@theforeman/
|
29
|
-
"@theforeman/
|
30
|
-
"@theforeman/vendor-dev": "^
|
28
|
+
"@theforeman/builder": "^10.1.0",
|
29
|
+
"@theforeman/eslint-plugin-foreman": "^10.1.0",
|
30
|
+
"@theforeman/vendor-dev": "^10.1.0",
|
31
|
+
"@theforeman/test": "^10.1.0",
|
32
|
+
"@theforeman/stories": "^10.1.0",
|
31
33
|
"babel-eslint": "^10.0.0",
|
32
|
-
"babel-jest": "^24.9.0",
|
33
|
-
"enzyme": "^3.7.0",
|
34
|
-
"enzyme-adapter-react-16": "^1.7.0",
|
35
|
-
"enzyme-to-json": "^3.3.5",
|
36
34
|
"eslint": "^6.8.0",
|
37
|
-
"eslint-plugin-patternfly-react": "
|
35
|
+
"eslint-plugin-patternfly-react": "0.2.0",
|
38
36
|
"identity-obj-proxy": "^3.0.0",
|
39
|
-
"
|
40
|
-
"prettier": "^1.19.1",
|
41
|
-
"react-redux-test-utils": "^0.1.1"
|
42
|
-
},
|
43
|
-
"jest": {
|
44
|
-
"verbose": true,
|
45
|
-
"moduleDirectories": [
|
46
|
-
"node_modules/@theforeman/vendor-core/node_modules",
|
47
|
-
"node_modules",
|
48
|
-
"webpack"
|
49
|
-
],
|
50
|
-
"transform": {
|
51
|
-
"^.+\\.js$": "babel-jest"
|
52
|
-
},
|
53
|
-
"setupFiles": [
|
54
|
-
"raf/polyfill",
|
55
|
-
"./webpack/testSetup.js"
|
56
|
-
],
|
57
|
-
"testPathIgnorePatterns": [
|
58
|
-
"/node_modules/",
|
59
|
-
"<rootDir>/foreman/"
|
60
|
-
],
|
61
|
-
"moduleNameMapper": {
|
62
|
-
"^.+\\.(css|scss)$": "identity-obj-proxy"
|
63
|
-
}
|
37
|
+
"prettier": "^1.19.1"
|
64
38
|
}
|
65
39
|
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export const translate = s => s;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import { testSelectorsSnapshotWithFixtures } from '
|
2
|
+
import { testSelectorsSnapshotWithFixtures } from '@theforeman/test';
|
3
3
|
import withProtectedView from '../withProtectedView';
|
4
4
|
|
5
5
|
const ProtectedComponent = () => <div>Protected component</div>;
|
@@ -1,7 +1,8 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import { LoadingState } from 'patternfly-react';
|
3
|
-
import PageLayout from 'foremanReact/routes/common/PageLayout/PageLayout';
|
4
3
|
import PropTypes from 'prop-types';
|
4
|
+
import PageLayout from 'foremanReact/routes/common/PageLayout/PageLayout';
|
5
|
+
import { translate as __ } from 'foremanReact/common/I18n';
|
5
6
|
|
6
7
|
import NewTemplateSyncForm from './components/NewTemplateSyncForm';
|
7
8
|
import './NewTemplateSync.scss';
|
@@ -1,20 +1,14 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import { Tooltip
|
2
|
+
import { Tooltip } from '@patternfly/react-core';
|
3
|
+
import { RedoIcon } from '@patternfly/react-icons';
|
3
4
|
import PropTypes from 'prop-types';
|
5
|
+
import { translate as __ } from 'foremanReact/common/I18n';
|
4
6
|
|
5
|
-
const ButtonTooltip =
|
6
|
-
|
7
|
-
<
|
8
|
-
|
9
|
-
|
10
|
-
);
|
11
|
-
|
12
|
-
return (
|
13
|
-
<OverlayTrigger overlay={tooltip} trigger={['hover', 'focus']}>
|
14
|
-
<Icon type="fa" name="refresh" />
|
15
|
-
</OverlayTrigger>
|
16
|
-
);
|
17
|
-
};
|
7
|
+
const ButtonTooltip = ({ tooltipId }) => (
|
8
|
+
<Tooltip id={tooltipId} content={__('Use default value from settings')}>
|
9
|
+
<RedoIcon />
|
10
|
+
</Tooltip>
|
11
|
+
);
|
18
12
|
|
19
13
|
ButtonTooltip.propTypes = {
|
20
14
|
tooltipId: PropTypes.string.isRequired,
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { testReducerSnapshotWithFixtures } from '
|
1
|
+
import { testReducerSnapshotWithFixtures } from '@theforeman/test';
|
2
2
|
|
3
3
|
import reducer, { initialState } from '../TemplateSyncResultReducer';
|
4
4
|
import { importTemplates } from '../__fixtures__/templateSyncResult.fixtures';
|
@@ -1,11 +1,12 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import PropTypes from 'prop-types';
|
3
3
|
import { capitalize } from 'lodash';
|
4
|
+
import { LinkContainer } from 'react-router-bootstrap';
|
5
|
+
import { Button } from 'patternfly-react';
|
4
6
|
|
7
|
+
import { translate as __ } from 'foremanReact/common/I18n';
|
5
8
|
import PageLayout from 'foremanReact/routes/common/PageLayout/PageLayout';
|
6
|
-
import { LinkContainer } from 'react-router-bootstrap';
|
7
9
|
|
8
|
-
import { Button } from 'patternfly-react';
|
9
10
|
import SyncResultList from './SyncResultList';
|
10
11
|
|
11
12
|
const titleString = (type, repo, branch, gitUser, fileRepoStartWith) => {
|
@@ -1,17 +1,13 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import { ListView
|
2
|
+
import { ListView } from 'patternfly-react';
|
3
|
+
import { Tooltip } from '@patternfly/react-core';
|
3
4
|
import PropTypes from 'prop-types';
|
4
5
|
|
5
6
|
const InfoItem = ({ itemId, children, tooltipText }) => {
|
6
7
|
const overlay = (
|
7
|
-
<
|
8
|
-
overlay={tooltipText ? <Tooltip id={itemId}>{tooltipText}</Tooltip> : ''}
|
9
|
-
placement="top"
|
10
|
-
trigger={['hover', 'focus']}
|
11
|
-
rootClose={false}
|
12
|
-
>
|
8
|
+
<Tooltip content={tooltipText || ''} id={itemId}>
|
13
9
|
{children}
|
14
|
-
</
|
10
|
+
</Tooltip>
|
15
11
|
);
|
16
12
|
return (
|
17
13
|
<ListView.InfoItem key={itemId} className="additional-info-wide">
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import EllipsisWithTooltip from 'react-ellipsis-with-tooltip';
|
3
3
|
import PropTypes from 'prop-types';
|
4
|
+
import { translate as __ } from 'foremanReact/common/I18n';
|
4
5
|
|
5
6
|
import InfoItem from './InfoItem';
|
6
7
|
import { itemIteratorId } from './helpers';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { testComponentSnapshotsWithFixtures } from '
|
1
|
+
import { testComponentSnapshotsWithFixtures } from '@theforeman/test';
|
2
2
|
|
3
3
|
import SyncResultList from '../SyncResultList';
|
4
4
|
import { importTemplates } from '../../__fixtures__/templateSyncResult.fixtures';
|
data/webpack/testSetup.js
CHANGED
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.
|
4
|
+
version: 9.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Greg Sutcliffe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-06-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: diffy
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rdoc
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
55
69
|
description: Engine to synchronise provisioning templates from GitHub
|
56
70
|
email: gsutclif@redhat.com
|
57
71
|
executables: []
|
@@ -97,6 +111,7 @@ files:
|
|
97
111
|
- webpack/ForemanTemplates.js
|
98
112
|
- webpack/Routes.js
|
99
113
|
- webpack/__mocks__/foremanReact/Root/Context/ForemanContext.js
|
114
|
+
- webpack/__mocks__/foremanReact/common/I18n.js
|
100
115
|
- webpack/__mocks__/foremanReact/common/helpers.js
|
101
116
|
- webpack/__mocks__/foremanReact/components/Layout/LayoutSelectors.js
|
102
117
|
- webpack/__mocks__/foremanReact/components/Pagination/index.js
|
@@ -200,7 +215,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
200
215
|
- !ruby/object:Gem::Version
|
201
216
|
version: '0'
|
202
217
|
requirements: []
|
203
|
-
rubygems_version: 3.1.
|
218
|
+
rubygems_version: 3.1.6
|
204
219
|
signing_key:
|
205
220
|
specification_version: 4
|
206
221
|
summary: Template-syncing engine for Foreman
|