foreman_patch 1.1.6.alpha5 → 1.2.0.alpha1

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 (126) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/foreman_patch/api/v2/invocations_controller.rb +1 -23
  3. data/app/controllers/foreman_patch/concerns/hosts_controller_extensions.rb +41 -35
  4. data/app/helpers/foreman_patch/hosts_helper.rb +1 -1
  5. data/app/lib/actions/foreman_patch/cycle/complete.rb +41 -0
  6. data/app/lib/actions/foreman_patch/cycle/create.rb +1 -5
  7. data/app/lib/actions/foreman_patch/cycle/initiate.rb +1 -5
  8. data/app/lib/actions/foreman_patch/cycle/plan.rb +66 -0
  9. data/app/lib/actions/foreman_patch/invocation/action.rb +29 -23
  10. data/app/lib/actions/foreman_patch/invocation/patch.rb +8 -16
  11. data/app/lib/actions/foreman_patch/invocation/wait_for_host.rb +29 -4
  12. data/app/lib/actions/foreman_patch/round/patch.rb +1 -5
  13. data/app/lib/actions/foreman_patch/round/plan.rb +33 -0
  14. data/app/lib/actions/foreman_patch/window/plan.rb +43 -0
  15. data/app/lib/actions/foreman_patch/window/publish.rb +1 -5
  16. data/app/lib/actions/foreman_patch/window/resolve_hosts.rb +1 -5
  17. data/app/models/foreman_patch/invocation.rb +4 -4
  18. data/app/models/foreman_patch/round.rb +23 -4
  19. data/app/models/setting/patching.rb +57 -0
  20. data/app/services/foreman_patch/ticket/api.rb +1 -2
  21. data/app/views/foreman_patch/api/v2/invocations/base.json.rabl +1 -1
  22. data/app/views/foreman_patch/api/v2/invocations/phase.json.rabl +7 -0
  23. data/app/views/foreman_patch/api/v2/invocations/show.json.rabl +2 -2
  24. data/app/views/foreman_patch/api/v2/rounds/base.json.rabl +1 -1
  25. data/app/views/foreman_patch/api/v2/rounds/status.json.rabl +8 -2
  26. data/app/views/foreman_patch/groups/index.html.erb +1 -1
  27. data/app/views/foreman_patch/invocations/show.html.erb +26 -1
  28. data/app/views/foreman_patch/layouts/react.html.erb +1 -1
  29. data/app/views/templates/ensure_services.erb +4 -7
  30. data/config/api_routes.rb +24 -28
  31. data/config/routes/mount_engine.rb +3 -0
  32. data/config/routes/overrides.rb +10 -0
  33. data/config/routes.rb +29 -40
  34. data/db/seeds.d/100-assign_features_with_templates.rb +12 -6
  35. data/lib/foreman_patch/engine.rb +46 -11
  36. data/lib/foreman_patch/plugin.rb +47 -0
  37. data/lib/foreman_patch/version.rb +1 -1
  38. data/lib/foreman_patch.rb +2 -3
  39. data/locale/en/foreman_patch.po +1 -1
  40. data/locale/foreman_patch.pot +1 -1
  41. data/locale/gemspec.rb +1 -1
  42. data/package.json +9 -20
  43. data/public/assets/foreman_patch/cycle_plans-e5667e178ba389908f5c815b24ec0ea77c340849d56bc39c5ce72bb626bd446a.scss +6 -0
  44. data/public/assets/foreman_patch/cycle_plans-e5667e178ba389908f5c815b24ec0ea77c340849d56bc39c5ce72bb626bd446a.scss.gz +0 -0
  45. data/public/assets/foreman_patch/cycle_plans-ff3d252119622a68828ff70f4a97328303963002237dbf850e92d6a706e93667.scss.gz +0 -0
  46. data/public/assets/foreman_patch/foreman_patch-be2e2ba89548f4a490612e8a6cd1cdebc0473be89f8023a3df7612f05a75d301.css.gz +0 -0
  47. data/public/assets/foreman_patch/foreman_patch-ce5805a60c0d5f896f557ff5246e5a09172043004c850b39bea54e618df1c485.css +1 -0
  48. data/public/assets/foreman_patch/foreman_patch-ce5805a60c0d5f896f557ff5246e5a09172043004c850b39bea54e618df1c485.css.gz +0 -0
  49. data/public/assets/foreman_patch/foreman_patch.json +1 -1
  50. data/public/assets/foreman_patch/plan_edit_windows-9ba20f84f3ecf2c4eb903acd57d30ee3e16f023a79db30bc614aa22f26442ce3.js.gz +0 -0
  51. data/public/assets/foreman_patch/plan_edit_windows-e656ba411642a7f983b51958ab30ac49c056322d19295a603cff4d5e6c71c8ed.js +1 -0
  52. data/public/assets/foreman_patch/plan_edit_windows-e656ba411642a7f983b51958ab30ac49c056322d19295a603cff4d5e6c71c8ed.js.gz +0 -0
  53. data/public/webpack/foreman_patch/bundle-e45c4bb530e40506f2da.js +6 -0
  54. data/public/webpack/foreman_patch/bundle-e45c4bb530e40506f2da.js.gz +0 -0
  55. data/public/webpack/foreman_patch/bundle-e45c4bb530e40506f2da.js.map +1 -0
  56. data/public/webpack/foreman_patch/bundle-e45c4bb530e40506f2da.js.map.gz +0 -0
  57. data/public/webpack/foreman_patch/{foreman_patch-8909c3e06f012a43f769.css → foreman_patch-4a4e1a59d74af09c4b8b.css} +1 -1
  58. data/public/webpack/foreman_patch/{foreman_patch-8909c3e06f012a43f769.css.gz → foreman_patch-4a4e1a59d74af09c4b8b.css.gz} +0 -0
  59. data/public/webpack/foreman_patch/foreman_patch-4a4e1a59d74af09c4b8b.js +6 -0
  60. data/public/webpack/foreman_patch/foreman_patch-4a4e1a59d74af09c4b8b.js.gz +0 -0
  61. data/public/webpack/foreman_patch/foreman_patch-4a4e1a59d74af09c4b8b.js.map +1 -0
  62. data/public/webpack/foreman_patch/foreman_patch-4a4e1a59d74af09c4b8b.js.map.gz +0 -0
  63. data/public/webpack/foreman_patch/manifest.json +8 -13
  64. data/public/webpack/foreman_patch/manifest.json.gz +0 -0
  65. data/public/webpack/foreman_patch/{vendor-769bd77f6be96c3c37e1.js → vendor-4b77c91f1e9103179596.js} +2 -2
  66. data/public/webpack/foreman_patch/vendor-4b77c91f1e9103179596.js.gz +0 -0
  67. data/public/webpack/foreman_patch/{vendor-769bd77f6be96c3c37e1.js.map → vendor-4b77c91f1e9103179596.js.map} +1 -1
  68. data/public/webpack/foreman_patch/vendor-4b77c91f1e9103179596.js.map.gz +0 -0
  69. data/webpack/components/Invocation/Invocation.js +47 -0
  70. data/webpack/{src/Components → components}/Invocation/InvocationSelectors.js +3 -0
  71. data/webpack/components/Invocation/index.js +36 -0
  72. data/webpack/components/Invocations/Invocations.js +16 -48
  73. data/webpack/components/Invocations/InvocationsPage.js +1 -24
  74. data/webpack/components/Invocations/InvocationsSelectors.js +1 -1
  75. data/webpack/components/Invocations/components/{InvocationActions.js → InvocationItem.js} +16 -4
  76. data/webpack/components/Invocations/index.js +12 -95
  77. data/webpack/components/RoundProgress/AggregateStatus.js +5 -6
  78. data/webpack/components/RoundProgress/RoundProgress.js +6 -7
  79. data/webpack/components/RoundProgress/RoundProgressSelectors.js +2 -3
  80. data/webpack/components/common/Calendar/Calendar.js +4 -5
  81. data/webpack/components/common/Terminal/OutputLine.js +26 -0
  82. data/webpack/components/common/Terminal/Terminal.js +115 -0
  83. data/webpack/components/common/Terminal/Terminal.scss +47 -0
  84. data/webpack/index.js +0 -3
  85. metadata +91 -54
  86. data/app/controllers/foreman_patch/react_controller.rb +0 -12
  87. data/app/lib/actions/foreman_patch/invocation/process_logging.rb +0 -44
  88. data/app/lib/actions/foreman_patch/invocation/proxy_action.rb +0 -52
  89. data/app/models/foreman_patch/event.rb +0 -13
  90. data/app/views/foreman_patch/api/v2/invocations/event.json.rabl +0 -3
  91. data/db/migrate/20230706092400_nullify_group_on_delete.rb +0 -11
  92. data/db/migrate/20230707102800_create_invocation_events.rb +0 -16
  93. data/lib/foreman_patch/register.rb +0 -119
  94. data/public/webpack/foreman_patch/bundle-831173d6ae39953b2409.js +0 -6
  95. data/public/webpack/foreman_patch/bundle-831173d6ae39953b2409.js.gz +0 -0
  96. data/public/webpack/foreman_patch/bundle-831173d6ae39953b2409.js.map +0 -1
  97. data/public/webpack/foreman_patch/bundle-831173d6ae39953b2409.js.map.gz +0 -0
  98. data/public/webpack/foreman_patch/foreman_patch-8909c3e06f012a43f769.js +0 -6
  99. data/public/webpack/foreman_patch/foreman_patch-8909c3e06f012a43f769.js.gz +0 -0
  100. data/public/webpack/foreman_patch/foreman_patch-8909c3e06f012a43f769.js.map +0 -1
  101. data/public/webpack/foreman_patch/foreman_patch-8909c3e06f012a43f769.js.map.gz +0 -0
  102. data/public/webpack/foreman_patch/foreman_patch:global-d71cc6e1e759f04f631a.css +0 -1
  103. data/public/webpack/foreman_patch/foreman_patch:global-d71cc6e1e759f04f631a.css.gz +0 -0
  104. data/public/webpack/foreman_patch/foreman_patch:global-d71cc6e1e759f04f631a.js +0 -6
  105. data/public/webpack/foreman_patch/foreman_patch:global-d71cc6e1e759f04f631a.js.gz +0 -0
  106. data/public/webpack/foreman_patch/foreman_patch:global-d71cc6e1e759f04f631a.js.map +0 -1
  107. data/public/webpack/foreman_patch/foreman_patch:global-d71cc6e1e759f04f631a.js.map.gz +0 -0
  108. data/public/webpack/foreman_patch/vendor-769bd77f6be96c3c37e1.js.gz +0 -0
  109. data/public/webpack/foreman_patch/vendor-769bd77f6be96c3c37e1.js.map.gz +0 -0
  110. data/webpack/components/common/Table/index.js +0 -28
  111. data/webpack/global_index.js +0 -16
  112. data/webpack/src/Components/Invocation/Invocation.js +0 -67
  113. data/webpack/src/Components/Invocation/InvocationLogFooter.js +0 -30
  114. data/webpack/src/Components/Invocation/InvocationLogToolbar.js +0 -80
  115. data/webpack/src/Components/Invocation/index.js +0 -62
  116. data/webpack/src/Components/InvocationStatus.js +0 -50
  117. data/webpack/src/Components/Loading.js +0 -51
  118. data/webpack/src/Extends/index.js +0 -15
  119. data/webpack/src/Router/routes.js +0 -5
  120. data/webpack/src/reducers.js +0 -7
  121. /data/public/webpack/foreman_patch/{bundle-831173d6ae39953b2409.css → bundle-e45c4bb530e40506f2da.css} +0 -0
  122. /data/public/webpack/foreman_patch/{bundle-831173d6ae39953b2409.css.gz → bundle-e45c4bb530e40506f2da.css.gz} +0 -0
  123. /data/webpack/{src/Components → components}/Invocation/InvocationActions.js +0 -0
  124. /data/webpack/{src/Components → components}/Invocation/InvocationConsts.js +0 -0
  125. /data/webpack/components/Invocations/{Invocations.css → InvocationsPage.scss} +0 -0
  126. /data/webpack/components/common/Calendar/{Calendar.css → Calendar.scss} +0 -0
@@ -1,28 +0,0 @@
1
- import React, { useCallback, useRef } from 'react';
2
- import PropTypes from 'prop-types';
3
- import { useDispatch } from 'react-redux';
4
- import { PaginationVariant, Flex, FlexItem } from '@patternfly/react-core';
5
-
6
- import { STATUS } from 'foremanReact/constants';
7
- import { useForemanSettings } from 'foremanReact/Root/Context/ForemanContext';
8
- import { translate as __ } from 'foremanReact/common/I18n';
9
-
10
- import { SelectAllCheckbox }
11
-
12
- const TableWrapper = ({
13
-
14
- }) => {
15
- const dispatch = useDispatch();
16
-
17
- return (
18
- <>
19
- <Flex style={{ alignItems: 'center' }} className="margin-16-24">
20
- { displaySelectAllCheckbox && !hideToolbar &&
21
- <FlexItem alignSelf={{ default: 'alignSelfCenter' }}>
22
- <SelectAllCheckbox
23
- </FlexItem>
24
- }
25
- </Flex>
26
- </>
27
- );
28
- }
@@ -1,16 +0,0 @@
1
- import { registerReducer } from 'foremanReact/common/MountingService';
2
- import { addGlobalFill } from 'foremanReact/components/common/Fill/GlobalFill';
3
- import { registerRoutes } from 'foremanReact/routes/RoutingService';
4
- import Routes from './src/Router/routes';
5
- import reducers from './src/reducers';
6
-
7
- // register reducers
8
- Object.entries(reducers).forEach(([key, reducer]) =>
9
- registerReducer(key, reducer)
10
- );
11
-
12
- // register client routes
13
- registerRoutes('ForemanPatch', Routes);
14
-
15
- // register fills for extending foreman core
16
- //addGlobalFill('host-overview-cards', 'Patching Details', );
@@ -1,67 +0,0 @@
1
- import React, { useRef, useState, useMemo } from 'react';
2
- import PropTypes from 'prop-types';
3
- import { translate as __ } from 'foremanReact/common/I18n';
4
-
5
- const Invocation = ({ events, status }) => {
6
- const viewerRef = useRef();
7
- const [isStderrVisible, setStderrVisible] = useState(true);
8
- const [isStdoutVisible, setStdoutVisible] = useState(true);
9
- const [isDebugVisible, setDebugVisible] = useState(false);
10
- const [followStatus, setFollowStatus] = useState(status === 'running' ? 'active' : 'disabled');
11
-
12
- const lines = useMemo(() => {
13
- return events.flatMap(event => (
14
- event.event.replace(/\r\n/, "\n").replace(/\n$/, '').split("\n").map(line => (
15
- { event_type: event.event_type, event: line, timestamp: event.timestamp }
16
- )).filter((event) => (
17
- (event.event_type === 'stdout' && isStdoutVisible) ||
18
- (event.event_type === 'stderr' && isStderrVisible) ||
19
- (event.event_type === 'debug' && isDebugVisible)
20
- ))
21
- ));
22
- }, [events, isStderrVisible, isStdoutVisible, isDebugVisible]);
23
-
24
- const onScroll = ({ scrollDirection, scrollOffsetToBottom, scrollUpdateWasRequested }) => {
25
- if (!scrollUpdateWasRequested) {
26
- if (scrollOffsetToBottom < 1) {
27
- setFollowStatus('active');
28
- } else if (scrollDirection === 'backward') {
29
- setFollowStatus('paused');
30
- }
31
- }
32
- };
33
-
34
- return (
35
- <LogViewer
36
- ref={viewerRef}
37
- theme='dark'
38
- data={lines}
39
- toolbar={<InvocationLogToolbar
40
- isDebugVisible={isDebugVisible}
41
- setDebugVisible={setDebugVisible}
42
- isStderrVisible={isStderrVisible}
43
- setStderrVisible={setStderrVisible}
44
- isStdoutVisible={isStderrVisible}
45
- setStdoutVisible={setStdoutVisible}
46
- />}
47
- footer={<InvocationLogFooter followStatus={followStatus} setFollowStatus={setFollowStatus} />}
48
- onScroll={onScroll}
49
- />
50
- );
51
- };
52
-
53
- Invocation.propTypes = {
54
- events: PropTypes.arrayOf(PropTypes.shape({
55
- event_type: PropTypes.string.isRequired,
56
- event: PropTypes.string.isRequired,
57
- timestamp: PropTypes.string.isRequired,
58
- })),
59
- status: PropTypes.string,
60
- };
61
-
62
- Invocation.defaultProps = {
63
- events: [],
64
- status: 'pending',
65
- };
66
-
67
- export default Invocation;
@@ -1,30 +0,0 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import { translate as __ } from 'foremanReact/common/I18n';
4
- import { OutlinedPlayCircleIcon } from '@patternfly/react-icons';
5
- import { Button } from '@patternfly/react-core';
6
- import classNames from 'classnames';
7
-
8
- const InvocationFooter = ({ followStatus, setFollowStatus }) => {
9
- const resumeFollowing = () => setFollowStatus('active');
10
-
11
- return (
12
- <Button className={classNames('invocation__footer', {
13
- 'invocation__footer--hidden': followStatus !== 'paused',
14
- })} onClick={resumeFollowing} isBlock >
15
- <OutlinedPlayCircleIcon />
16
- &nbsp{__('Resume following')}
17
- </Button>
18
- );
19
- };
20
-
21
- InvocationFooter.propTypes = {
22
- followStatus: PropTypes.string,
23
- setFollowStatus: PropTypes.func.isRequired,
24
- };
25
-
26
- InvocationFooter.defaultProps = {
27
- followStatus: 'disabled',
28
- };
29
-
30
- export default InvocationFooter;
@@ -1,80 +0,0 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import {
4
- Toolbar,
5
- ToolbarContent,
6
- ToolbarGroup,
7
- ToolbarItem,
8
- ToggleGroup,
9
- ToggleGroupItem
10
- } from '@patternfly/react-core';
11
- import { LogViewerSearch } from '@patternfly/react-log-viewer';
12
- import { translate as __ } from 'foremanReact/common/I18n';
13
-
14
- const InvocationLogToolbar = ({
15
- status,
16
- isDebugVisible,
17
- setDebugVisible,
18
- isStderrVisible,
19
- setStderrVisible,
20
- isStdoutVisible,
21
- setStdoutVisible,
22
- }) => {
23
- return (
24
- <Toolbar>
25
- <ToolbarContent>
26
- <ToolbarGroup alignment={{ default: 'alignLeft' }}>
27
- <ToolbarItem>
28
- <InvocationStatus status={status} />
29
- </ToolbarItem>
30
- </ToolbarGroup>
31
- <ToolbarGroup alignement={{ default: 'alignRight' }}>
32
- <ToolbarItem>
33
- <LogViewerSearch placeholder={__('Search')} />
34
- </ToolbarItem>
35
- <ToolbarItem>
36
- <ToggleGroup>
37
- <ToggleGroupItem
38
- text={__('Toggle STDERR')}
39
- isSelected={isStderrVisible}
40
- onChange={setStderrVisible}
41
- />
42
- <ToggleGroupItem
43
- text={__('Toggle STDOUT')}
44
- isSelected={isStdoutVisible}
45
- onChange={setStdoutVisible}
46
- />
47
- <ToggleGroupItem
48
- text={__('Toggle DEBUG')}
49
- isSelected={isDebugVisible}
50
- onChange={setDebugVisible}
51
- />
52
- </ToggleGroup>
53
- </ToolbarItem>
54
- </ToolbarGroup>
55
- </ToolbarContent>
56
- </Toolbar>
57
- );
58
- };
59
-
60
- InvocationLogToolbar.propTypes = {
61
- status: PropTypes.string,
62
- isDebugVisible: PropTypes.bool,
63
- setDebugVisible: PropTypes.func,
64
- isStderrVisible: PropTypes.bool,
65
- setStderrVisible: PropTypes.func,
66
- isStdoutVisible: PropTypes.bool,
67
- setStdoutVisible: PropTypes.func,
68
- };
69
-
70
- InvocationLogToolbar.defaultProps = {
71
- status: 'pending',
72
- isDebugVisible: false,
73
- setDebugVisible: Function.prototype,
74
- isStderrVisible: true,
75
- setStderrVisible: Function.prototype,
76
- isStdoutVisible: true,
77
- setStdoutVisible: Function.prototype,
78
- };
79
-
80
- export default InvocationLogToolbar;
@@ -1,62 +0,0 @@
1
- import React, { useEffect } from 'react';
2
- import PropTypes from 'prop-types';
3
- import { useSelector, useDispatch } from 'react-redux';
4
- import { Alert } from '@patternfly/react-core';
5
- import { stopInterval } from 'foremanReact/redux/middlewares/IntervalMiddleware';
6
- import Invocation from './Invocation';
7
- import {
8
- selectInvocation,
9
- selectStatus,
10
- } from './InvocationSelectors';
11
- import { getData } from './InvocationActions';
12
- import { INVOCATION } from './InvocationConsts';
13
- import Loading from '../Loading';
14
-
15
- const WrappedInvocation = ({ id }) => {
16
- const dispatch = useDispatch();
17
- const invocation = useSelector(selectInvocation);
18
- const loadingStatus = useSelector(selectStatus);
19
-
20
- const isCompleted = () => {
21
- const status = invocation.status;
22
- return (status === 'error' || status === 'warning' || status === 'success' || status === 'cancelled');
23
- };
24
-
25
- useEffect(() => {
26
- dispatch(getData(id));
27
-
28
- return () => {
29
- dispatch(stopInterval(INVOCATION));
30
- };
31
- }, [dispatch]);
32
-
33
- useEffect(() => {
34
- if (isCompleted()) {
35
- dispatch(stopInterval(INVOCATION));
36
- }
37
- }, [state, dispatch]);
38
-
39
- if (loadingStatus === STATUS.PENDING) {
40
- return <Loading />;
41
- }
42
-
43
- if (loadingStatus === STATUS.ERROR) {
44
- return (
45
- <Alert type="error">
46
- {__(
47
- 'There was an error while updating the status, try refreshing the page.'
48
- )}
49
- </Alert>
50
- );
51
- }
52
-
53
- return (
54
- <Invocation {...invocation} />
55
- );
56
- };
57
-
58
- WrappedInvocation.propTypes = {
59
- id: PropTypes.number.isRequired
60
- };
61
-
62
- export default WrappedInvocation;
@@ -1,50 +0,0 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import {
4
- ExclamationCircleIcon,
5
- ExclamationTriangleIcon,
6
- CheckCircleIcon,
7
- BanIcon,
8
- InProgressIcon,
9
- PendingIcon
10
- } from '@patternfly/react-icons';
11
- import { Label } from '@patternfly/react-core';
12
-
13
- const InvocationStatus = ({ status }) => {
14
- switch (status) {
15
- case 'error':
16
- return (
17
- <Label icon={<ExclamationCircleIcon />}>{__('failed')}</Label>
18
- );
19
- case 'warning':
20
- return (
21
- <Label icon={<ExclamationTriangleIcon />}>{__('warning')}</Label>
22
- );
23
- case 'success':
24
- return (
25
- <Label icon={<CheckCircleIcon />}>{__('success')}</Label>
26
- );
27
- case 'cancelled':
28
- return (
29
- <Label icon={<BanIcon />}>{__('success')}</Label>
30
- );
31
- case 'running':
32
- return (
33
- <Label icon={<InProgressIcon />}>{__('running')}</Label>
34
- );
35
- default:
36
- return (
37
- <Label icon={<PendingIcon />}>{__('pending')}</Label>
38
- );
39
- }
40
- };
41
-
42
- InvocationStatus.propTypes = {
43
- status: PropTypes.string,
44
- };
45
-
46
- InvocationStatus.defaultProps = {
47
- status: 'pending',
48
- };
49
-
50
- export default InvocationStatus;
@@ -1,51 +0,0 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import {
4
- Bullseye,
5
- Title,
6
- EmptyState,
7
- EmptyStateIcon,
8
- Spinner,
9
- Skeleton,
10
- } from '@patternfly/react-core';
11
- import { translate as __ } from 'foremanReact/common/I18n';
12
-
13
- const Loading = ({
14
- size,
15
- showText,
16
- loadingText,
17
- skeleton,
18
- }) => {
19
- if (skeleton) {
20
- return <Skeleton height="100%" />;
21
- }
22
-
23
- return (
24
- <Bullseye>
25
- <EmptyState>
26
- <EmptyStateIcon size={size} variant="container" component={Spinner} />
27
- {showText && (
28
- <Title size={size} headingLevel="h4" ouiaId="loading-title">
29
- {loadingText || __('Loading')}
30
- </Title>
31
- )}
32
- </EmptyState>
33
- </Bullseye>
34
- );
35
- };
36
-
37
- Loading.propTypes = {
38
- size: PropTypes.string,
39
- showText: PropTypes.bool,
40
- loadingText: PropTypes.string,
41
- skeleton: PropTypes.bool,
42
- };
43
-
44
- Loading.defaultProps = {
45
- size: 'lg',
46
- showText: true,
47
- loadingText: null,
48
- skeleton: false,
49
- };
50
-
51
- export default Loading;
@@ -1,15 +0,0 @@
1
- // This is an example of extending foreman-core's component via slot&fill
2
- // http://foreman.surge.sh/?path=/docs/introduction-slot-and-fill--page
3
- /*
4
- import React from 'react';
5
- import { addGlobalFill } from 'foremanReact/components/common/Fill/GlobalFill';
6
-
7
- addGlobalFill('slotId', 'fillId', <SomeComponent key="some-key" />, 300);
8
-
9
- addGlobalFill(
10
- 'slotId',
11
- 'fillId',
12
- { someProp: 'this is an override prop' },
13
- 300
14
- );
15
- */
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
-
3
- const routes = [];
4
-
5
- export default routes;
@@ -1,7 +0,0 @@
1
- import { combineReducers } from 'redux';
2
-
3
- const reducers = {
4
- foremanPatch: combineReducers({}),
5
- };
6
-
7
- export default reducers;