foreman_inventory_upload 1.0.3 → 2.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/foreman_inventory_upload/engine.rb +1 -1
- data/lib/foreman_inventory_upload/version.rb +1 -1
- data/package.json +19 -99
- data/webpack/ForemanInventoryUpload/Components/AccountList/AccountList.stories.js +5 -14
- data/webpack/ForemanInventoryUpload/Components/AccountList/Components/EmptyState/__tests__/EmptyState.test.js +1 -1
- data/webpack/ForemanInventoryUpload/Components/AccountList/Components/ErrorState/__tests__/ErrorState.test.js +1 -1
- data/webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItem/__tests__/ListItem.test.js +1 -1
- data/webpack/ForemanInventoryUpload/Components/AccountList/Components/ListItemStatus/__tests__/ListItemStatus.test.js +1 -1
- data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountList.test.js +1 -1
- data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListActions.test.js +1 -1
- data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListIntegration.test.js +1 -1
- data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListReducer.test.js +1 -1
- data/webpack/ForemanInventoryUpload/Components/AccountList/__tests__/AccountListSelectors.test.js +1 -1
- data/webpack/ForemanInventoryUpload/Components/Dashboard/Dashboard.fixtures.js +13 -9
- data/webpack/ForemanInventoryUpload/Components/Dashboard/Dashboard.stories.js +5 -15
- data/webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/Dashboard.test.js +1 -2
- data/webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardActions.test.js +15 -2
- data/webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardIntegration.test.js +1 -1
- data/webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardReducer.test.js +1 -1
- data/webpack/ForemanInventoryUpload/Components/Dashboard/__tests__/DashboardSelectors.test.js +1 -1
- data/webpack/ForemanInventoryUpload/Components/FileDownload/__tests__/FileDownload.test.js +1 -1
- data/webpack/ForemanInventoryUpload/Components/FullScreenModal/__tests__/FullScreenModal.test.js +1 -1
- data/webpack/ForemanInventoryUpload/Components/NavContainer/NavContainer.fixtures.js +5 -2
- data/webpack/ForemanInventoryUpload/Components/NavContainer/__tests__/NavContainer.test.js +1 -2
- data/webpack/ForemanInventoryUpload/Components/NavContainer/__tests__/__snapshots__/NavContainer.test.js.snap +1 -1
- data/webpack/ForemanInventoryUpload/Components/ReportGenerate/__tests__/ReportGenerate.test.js +1 -1
- data/webpack/ForemanInventoryUpload/Components/ReportUpload/__tests__/ReportUpload.test.js +1 -1
- data/webpack/ForemanInventoryUpload/Components/ScheduledRun/__tests__/ScheduledRun.test.js +1 -1
- data/webpack/ForemanInventoryUpload/Components/StatusChart/__tests__/StatusChart.test.js +1 -1
- data/webpack/ForemanInventoryUpload/Components/TabBody/__tests__/TabBody.test.js +1 -1
- data/webpack/ForemanInventoryUpload/Components/TabContainer/__tests__/TabContainer.test.js +1 -1
- data/webpack/ForemanInventoryUpload/Components/TabFooter/__tests__/TabFooter.test.js +1 -1
- data/webpack/ForemanInventoryUpload/Components/TabHeader/__tests__/TabHeader.test.js +1 -1
- data/webpack/ForemanInventoryUpload/Components/Terminal/__tests__/Terminal.test.js +1 -2
- data/webpack/ForemanInventoryUpload/ForemanInventoryUpload.test.js +1 -1
- metadata +2 -9
- data/webpack/stories/ForemanInventoryUploadReducers.js +0 -3
- data/webpack/stories/configureStore.js +0 -15
- data/webpack/stories/decorators/index.js +0 -1
- data/webpack/stories/decorators/withCardsDecorator.js +0 -14
- data/webpack/stories/index.js +0 -10
- data/webpack/stories/index.scss +0 -7
- data/webpack/test_setup.js +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0ee366e2c29cdcebb956eea276f6fe8e4c3b61d92b28c9bf3fe7b796e8d9a736
|
4
|
+
data.tar.gz: 1ce3d7dec276594d6f2051856c9b7fae0bb0fa0b46f21f84b09bf02f2bf59698
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 74b2c3da2e3e7d75cb62fafdc768b37c3261b3debb06bcba4a70c73bc63e2cf0deb183ea13d4e041b58a77f6a9667f18e998130b70a5552127f9263c981c8af2
|
7
|
+
data.tar.gz: 00aceb0db75ca118b656d20add514d7aa522f3e59c7983f740dffea0b134b7d77c2434be124d9d7ad9d5201d58459fc7a8b2b1f23d5c138f030ad4e7e363dc9c
|
@@ -22,7 +22,7 @@ module ForemanInventoryUpload
|
|
22
22
|
|
23
23
|
initializer 'foreman_inventory_upload.register_plugin', :before => :finisher_hook do |_app|
|
24
24
|
Foreman::Plugin.register :foreman_inventory_upload do
|
25
|
-
requires_foreman '
|
25
|
+
requires_foreman '> 1.24'
|
26
26
|
|
27
27
|
# Add permissions
|
28
28
|
security_block :foreman_inventory_upload do
|
data/package.json
CHANGED
@@ -4,14 +4,14 @@
|
|
4
4
|
"description": "Inventory Upload =============",
|
5
5
|
"main": "index.js",
|
6
6
|
"scripts": {
|
7
|
-
"lint": "
|
8
|
-
"test": "
|
9
|
-
"test:watch": "
|
10
|
-
"test:current": "
|
11
|
-
"
|
12
|
-
"
|
13
|
-
"
|
14
|
-
"
|
7
|
+
"lint": "tfm-lint --plugin -d /webpack",
|
8
|
+
"test": "tfm-test --plugin",
|
9
|
+
"test:watch": "tfm-test --plugin --watchAll",
|
10
|
+
"test:current": "tfm-test --plugin --watch",
|
11
|
+
"publish-coverage": "tfm-publish-coverage",
|
12
|
+
"stories": "tfm-stories --plugin",
|
13
|
+
"stories:build": "tfm-build-stories --plugin",
|
14
|
+
"stories:deploy": "surge --project .storybook-dist"
|
15
15
|
},
|
16
16
|
"repository": {
|
17
17
|
"type": "git",
|
@@ -20,106 +20,26 @@
|
|
20
20
|
"bugs": {
|
21
21
|
"url": "http://projects.theforeman.org/projects/foreman_inventory_upload/issues"
|
22
22
|
},
|
23
|
-
"
|
24
|
-
"
|
23
|
+
"peerDependencies": {
|
24
|
+
"@theforeman/vendor": ">= 4.0.2"
|
25
25
|
},
|
26
26
|
"devDependencies": {
|
27
|
-
"@
|
28
|
-
"@
|
29
|
-
"@
|
30
|
-
"
|
31
|
-
"
|
32
|
-
"
|
33
|
-
"babel-
|
34
|
-
"
|
35
|
-
"babel-plugin-dynamic-import-node": "^2.0.0",
|
36
|
-
"babel-plugin-lodash": "^3.3.4",
|
37
|
-
"babel-plugin-syntax-dynamic-import": "^6.18.0",
|
38
|
-
"babel-plugin-transform-class-properties": "^6.24.1",
|
39
|
-
"babel-plugin-transform-object-assign": "^6.8.0",
|
40
|
-
"babel-plugin-transform-object-rest-spread": "^6.8.0",
|
41
|
-
"babel-preset-env": "^1.7.0",
|
42
|
-
"babel-preset-react": "^6.5.0",
|
43
|
-
"coveralls": "^3.0.0",
|
44
|
-
"enzyme": "^3.4.0",
|
45
|
-
"enzyme-adapter-react-16": "^1.4.0",
|
46
|
-
"enzyme-to-json": "^3.2.1",
|
47
|
-
"eslint": "^4.10.0",
|
48
|
-
"eslint-import-resolver-babel-module": "^4.0.0",
|
49
|
-
"eslint-plugin-patternfly-react": "0.2.0",
|
50
|
-
"identity-obj-proxy": "^3.0.0",
|
27
|
+
"@babel/core": "^7.7.0",
|
28
|
+
"@theforeman/builder": "^4.0.2",
|
29
|
+
"@theforeman/eslint-plugin-foreman": "^4.0.2",
|
30
|
+
"@theforeman/stories": "^4.0.2",
|
31
|
+
"@theforeman/test": "^4.0.2",
|
32
|
+
"@theforeman/vendor-dev": "^4.0.2",
|
33
|
+
"babel-eslint": "^10.0.0",
|
34
|
+
"eslint": "^6.8.0",
|
51
35
|
"jed": "^1.1.1",
|
52
|
-
"jest-cli": "^23.6.0",
|
53
|
-
"jest-prop-type-error": "^1.1.0",
|
54
|
-
"node-sass": "^4.5.0",
|
55
|
-
"patternfly": "^3.58.0",
|
56
36
|
"prettier": "^1.13.5",
|
57
37
|
"raf": "^3.4.0",
|
58
|
-
"react-redux-test-utils": "^0.1.1",
|
59
|
-
"react-remarkable": "^1.1.3",
|
60
|
-
"sass-loader": "^6.0.7",
|
61
38
|
"stylelint": "^9.3.0",
|
62
39
|
"stylelint-config-standard": "^18.0.0",
|
63
40
|
"surge": "^0.20.3"
|
64
41
|
},
|
65
42
|
"dependencies": {
|
66
|
-
"
|
67
|
-
"classnames": "^2.2.5",
|
68
|
-
"lodash": "^4.17.10",
|
69
|
-
"patternfly-react": "^2.19.1",
|
70
|
-
"prop-types": "^15.6.0",
|
71
|
-
"react": "^16.4.0",
|
72
|
-
"react-dom": "^16.4.0",
|
73
|
-
"react-intl": "^2.8.0",
|
74
|
-
"react-redux": "^5.0.6",
|
75
|
-
"redux": "^3.6.0",
|
76
|
-
"redux-thunk": "^2.2.0",
|
77
|
-
"reselect": "^3.0.1",
|
78
|
-
"seamless-immutable": "^7.1.2",
|
79
|
-
"urijs": "^1.18.10",
|
80
|
-
"uuid": "^3.0.1"
|
81
|
-
},
|
82
|
-
"jest": {
|
83
|
-
"automock": true,
|
84
|
-
"verbose": true,
|
85
|
-
"testMatch": [
|
86
|
-
"**/*.test.js"
|
87
|
-
],
|
88
|
-
"testURL": "http://localhost/",
|
89
|
-
"collectCoverage": true,
|
90
|
-
"collectCoverageFrom": [
|
91
|
-
"webpack/**/*.js",
|
92
|
-
"!webpack/index.js",
|
93
|
-
"!webpack/test_setup.js",
|
94
|
-
"!webpack/**/bundle*",
|
95
|
-
"!webpack/stories/**",
|
96
|
-
"!webpack/**/*stories.js"
|
97
|
-
],
|
98
|
-
"coverageReporters": [
|
99
|
-
"lcov"
|
100
|
-
],
|
101
|
-
"unmockedModulePathPatterns": [
|
102
|
-
"webpack/",
|
103
|
-
"react",
|
104
|
-
"node_modules/"
|
105
|
-
],
|
106
|
-
"moduleNameMapper": {
|
107
|
-
"^.+\\.(png|gif|css|scss)$": "identity-obj-proxy"
|
108
|
-
},
|
109
|
-
"globals": {
|
110
|
-
"__testing__": true
|
111
|
-
},
|
112
|
-
"transform": {
|
113
|
-
"^.+\\.js$": "babel-jest"
|
114
|
-
},
|
115
|
-
"moduleDirectories": [
|
116
|
-
"node_modules",
|
117
|
-
"webpack"
|
118
|
-
],
|
119
|
-
"setupFiles": [
|
120
|
-
"raf/polyfill",
|
121
|
-
"jest-prop-type-error",
|
122
|
-
"./webpack/test_setup.js"
|
123
|
-
]
|
43
|
+
"react-intl": "^2.8.0"
|
124
44
|
}
|
125
45
|
}
|
@@ -1,18 +1,9 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import { storiesOf } from '@storybook/react';
|
3
|
-
import { withKnobs } from '@storybook/addon-knobs';
|
4
|
-
import { Provider } from 'react-redux';
|
5
|
-
import configureStore from '../../../stories/configureStore';
|
6
2
|
import AccountList from './AccountList';
|
7
3
|
|
8
|
-
|
4
|
+
export default {
|
5
|
+
title: 'AccountList',
|
6
|
+
component: AccountList,
|
7
|
+
};
|
9
8
|
|
10
|
-
|
11
|
-
.addDecorator(withKnobs)
|
12
|
-
.add('Account list', () => (
|
13
|
-
<div style={{ margin: '20px' }}>
|
14
|
-
<Provider store={store}>
|
15
|
-
<AccountList />
|
16
|
-
</Provider>
|
17
|
-
</div>
|
18
|
-
));
|
9
|
+
export const Basic = () => <AccountList />;
|
@@ -8,16 +8,20 @@ export const completed = 25;
|
|
8
8
|
|
9
9
|
export const error = 'some-error';
|
10
10
|
|
11
|
+
export const generating = {
|
12
|
+
logs,
|
13
|
+
completed,
|
14
|
+
};
|
15
|
+
|
16
|
+
export const uploading = {
|
17
|
+
logs,
|
18
|
+
completed,
|
19
|
+
files,
|
20
|
+
};
|
21
|
+
|
11
22
|
export const inventory = {
|
12
|
-
generating
|
13
|
-
|
14
|
-
completed,
|
15
|
-
},
|
16
|
-
uploading: {
|
17
|
-
logs,
|
18
|
-
completed,
|
19
|
-
files,
|
20
|
-
},
|
23
|
+
generating,
|
24
|
+
uploading,
|
21
25
|
};
|
22
26
|
|
23
27
|
export const accountID = 'some-account-ID';
|
@@ -1,19 +1,9 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import { storiesOf } from '@storybook/react';
|
3
|
-
import { withKnobs } from '@storybook/addon-knobs';
|
4
|
-
import { Provider } from 'react-redux';
|
5
|
-
import configureStore from '../../../stories/configureStore';
|
6
2
|
import Dashboard from './index';
|
7
|
-
import { generating, uploading } from './Dashboard.fixtures';
|
8
3
|
|
9
|
-
|
4
|
+
export default {
|
5
|
+
title: 'Dashboard',
|
6
|
+
component: Dashboard,
|
7
|
+
};
|
10
8
|
|
11
|
-
|
12
|
-
.addDecorator(withKnobs)
|
13
|
-
.add('Dashboard', () => (
|
14
|
-
<div style={{ margin: '20px' }}>
|
15
|
-
<Provider store={store}>
|
16
|
-
<Dashboard generating={generating} uploading={uploading} />
|
17
|
-
</Provider>
|
18
|
-
</div>
|
19
|
-
));
|
9
|
+
export const Basic = () => <Dashboard />;
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import { shallow } from '
|
3
|
-
import { testComponentSnapshotsWithFixtures } from 'react-redux-test-utils';
|
2
|
+
import { shallow, testComponentSnapshotsWithFixtures } from '@theforeman/test';
|
4
3
|
import Dashboard from '../Dashboard';
|
5
4
|
import { props } from '../Dashboard.fixtures';
|
6
5
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { testActionSnapshotWithFixtures } from '
|
1
|
+
import { testActionSnapshotWithFixtures } from '@theforeman/test';
|
2
2
|
import API from 'foremanReact/API';
|
3
3
|
import {
|
4
4
|
startPolling,
|
@@ -36,4 +36,17 @@ const fixtures = {
|
|
36
36
|
runWithGetState({ activeTab: 'reports' }, toggleFullScreen, accountID),
|
37
37
|
};
|
38
38
|
|
39
|
-
describe('Dashboard actions', () =>
|
39
|
+
describe('Dashboard actions', () => {
|
40
|
+
const { location } = window;
|
41
|
+
|
42
|
+
beforeAll(() => {
|
43
|
+
delete window.location;
|
44
|
+
window.location = { href: jest.fn() };
|
45
|
+
});
|
46
|
+
|
47
|
+
afterAll(() => {
|
48
|
+
window.location = location;
|
49
|
+
});
|
50
|
+
|
51
|
+
return testActionSnapshotWithFixtures(fixtures);
|
52
|
+
});
|
@@ -1,10 +1,13 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { noop } from 'patternfly-react';
|
3
|
+
|
1
4
|
export const props = {
|
2
5
|
items: [
|
3
6
|
{
|
4
7
|
icon: 'some-icon',
|
5
8
|
name: 'some-name',
|
6
|
-
component:
|
7
|
-
onClick:
|
9
|
+
component: () => <p>test</p>,
|
10
|
+
onClick: noop,
|
8
11
|
},
|
9
12
|
],
|
10
13
|
};
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import { mount } from '
|
3
|
-
import { testComponentSnapshotsWithFixtures } from 'react-redux-test-utils';
|
2
|
+
import { mount, testComponentSnapshotsWithFixtures } from '@theforeman/test';
|
4
3
|
import NavContainer from '../NavContainer';
|
5
4
|
import { props } from '../NavContainer.fixtures';
|
6
5
|
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import { testComponentSnapshotsWithFixtures } from '
|
3
|
-
import { mount } from 'enzyme';
|
2
|
+
import { mount, testComponentSnapshotsWithFixtures } from '@theforeman/test';
|
4
3
|
import Terminal from '../Terminal';
|
5
4
|
import { props, logs } from '../Terminal.fixtures';
|
6
5
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_inventory_upload
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Inventory upload team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-01-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: katello
|
@@ -303,13 +303,6 @@ files:
|
|
303
303
|
- webpack/__mocks__/foremanReact/common/I18n.js
|
304
304
|
- webpack/__mocks__/foremanReact/common/helpers.js
|
305
305
|
- webpack/index.js
|
306
|
-
- webpack/stories/ForemanInventoryUploadReducers.js
|
307
|
-
- webpack/stories/configureStore.js
|
308
|
-
- webpack/stories/decorators/index.js
|
309
|
-
- webpack/stories/decorators/withCardsDecorator.js
|
310
|
-
- webpack/stories/index.js
|
311
|
-
- webpack/stories/index.scss
|
312
|
-
- webpack/test_setup.js
|
313
306
|
homepage: https://github.com/theforeman/foreman_inventory_upload
|
314
307
|
licenses:
|
315
308
|
- GPL-3.0
|
@@ -1,15 +0,0 @@
|
|
1
|
-
import { applyMiddleware, compose, createStore } from 'redux';
|
2
|
-
import thunkMiddleware from 'redux-thunk';
|
3
|
-
import rootReducer from './ForemanInventoryUploadReducers';
|
4
|
-
|
5
|
-
export default function configureStore(preloadedState) {
|
6
|
-
const middlewares = [thunkMiddleware];
|
7
|
-
const middlewareEnhancer = applyMiddleware(...middlewares);
|
8
|
-
|
9
|
-
const enhancers = [middlewareEnhancer];
|
10
|
-
const composedEnhancers = compose(...enhancers);
|
11
|
-
|
12
|
-
const store = createStore(rootReducer, preloadedState, composedEnhancers);
|
13
|
-
|
14
|
-
return store;
|
15
|
-
}
|
@@ -1 +0,0 @@
|
|
1
|
-
export * from './withCardsDecorator';
|
@@ -1,14 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
|
3
|
-
export const withCardsDecorator = storyFn => (
|
4
|
-
<div
|
5
|
-
style={{
|
6
|
-
width: '100%',
|
7
|
-
height: '100vh',
|
8
|
-
backgroundColor: '#F5F5F5',
|
9
|
-
padding: '50px',
|
10
|
-
}}
|
11
|
-
>
|
12
|
-
<div style={{ width: '300px', margin: 'auto' }}>{storyFn()}</div>
|
13
|
-
</div>
|
14
|
-
);
|
data/webpack/stories/index.js
DELETED
data/webpack/stories/index.scss
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
$img-path: '~patternfly/dist/img/';
|
2
|
-
$font-path: '~patternfly/dist/fonts/';
|
3
|
-
$icon-font-path: '~patternfly/dist/fonts/';
|
4
|
-
|
5
|
-
@import '~patternfly/dist/sass/patternfly';
|
6
|
-
@import '~patternfly-react/dist/sass/patternfly-react';
|
7
|
-
@import '~font-awesome-sass/assets/stylesheets/_font-awesome';
|