foreman_puppet 6.1.0 → 6.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/foreman_puppet/locale/ca/foreman_puppet.js +3 -3
  3. data/app/assets/javascripts/foreman_puppet/locale/cs_CZ/foreman_puppet.js +3 -3
  4. data/app/assets/javascripts/foreman_puppet/locale/de/foreman_puppet.js +3 -3
  5. data/app/assets/javascripts/foreman_puppet/locale/en/foreman_puppet.js +3 -3
  6. data/app/assets/javascripts/foreman_puppet/locale/en_GB/foreman_puppet.js +3 -3
  7. data/app/assets/javascripts/foreman_puppet/locale/es/foreman_puppet.js +3 -3
  8. data/app/assets/javascripts/foreman_puppet/locale/fr/foreman_puppet.js +3 -3
  9. data/app/assets/javascripts/foreman_puppet/locale/gl/foreman_puppet.js +3 -3
  10. data/app/assets/javascripts/foreman_puppet/locale/it/foreman_puppet.js +3 -3
  11. data/app/assets/javascripts/foreman_puppet/locale/ja/foreman_puppet.js +3 -3
  12. data/app/assets/javascripts/foreman_puppet/locale/ka/foreman_puppet.js +3 -3
  13. data/app/assets/javascripts/foreman_puppet/locale/ko/foreman_puppet.js +3 -3
  14. data/app/assets/javascripts/foreman_puppet/locale/nl_NL/foreman_puppet.js +3 -3
  15. data/app/assets/javascripts/foreman_puppet/locale/pl/foreman_puppet.js +3 -3
  16. data/app/assets/javascripts/foreman_puppet/locale/pt_BR/foreman_puppet.js +3 -3
  17. data/app/assets/javascripts/foreman_puppet/locale/ru/foreman_puppet.js +3 -3
  18. data/app/assets/javascripts/foreman_puppet/locale/sv_SE/foreman_puppet.js +3 -3
  19. data/app/assets/javascripts/foreman_puppet/locale/zh_CN/foreman_puppet.js +3 -3
  20. data/app/assets/javascripts/foreman_puppet/locale/zh_TW/foreman_puppet.js +3 -3
  21. data/app/views/foreman_puppet/layouts/application_react.html.erb +1 -2
  22. data/lib/foreman_puppet/version.rb +1 -1
  23. data/locale/Makefile +3 -3
  24. data/locale/en/foreman_puppet.edit.po +0 -1146
  25. data/locale/foreman_puppet.pot +39 -33
  26. data/webpack/src/Extends/Host/PuppetTab/Routes.js +1 -1
  27. data/webpack/src/Extends/Host/PuppetTab/SubTabs/Reports/components/ConfigStatusCard/ConfigStatusCardActions.js +10 -0
  28. data/webpack/src/Extends/Host/PuppetTab/SubTabs/Reports/components/ConfigStatusCard/ConfigStatusCardConstants.js +1 -0
  29. data/webpack/src/Extends/Host/PuppetTab/SubTabs/Reports/components/ConfigStatusCard/index.js +186 -0
  30. data/webpack/src/Extends/Host/PuppetTab/SubTabs/Reports/components/ConfigStatusCard/styles.scss +3 -0
  31. data/webpack/src/Extends/Host/PuppetTab/SubTabs/Reports/index.js +4 -0
  32. data/webpack/src/Extends/Host/PuppetTab/index.js +4 -2
  33. data/webpack/src/Extends/Host/PuppetTab/styles.scss +9 -0
  34. metadata +71 -100
  35. data/locale/ca/foreman_puppet.edit.po +0 -1150
  36. data/locale/ca/foreman_puppet.po.time_stamp +0 -0
  37. data/locale/cs_CZ/foreman_puppet.edit.po +0 -1155
  38. data/locale/cs_CZ/foreman_puppet.po.time_stamp +0 -0
  39. data/locale/de/foreman_puppet.edit.po +0 -1177
  40. data/locale/de/foreman_puppet.po.time_stamp +0 -0
  41. data/locale/en/foreman_puppet.po.time_stamp +0 -0
  42. data/locale/en_GB/foreman_puppet.edit.po +0 -1152
  43. data/locale/en_GB/foreman_puppet.po.time_stamp +0 -0
  44. data/locale/es/foreman_puppet.edit.po +0 -1161
  45. data/locale/es/foreman_puppet.po.time_stamp +0 -0
  46. data/locale/fr/foreman_puppet.edit.po +0 -1170
  47. data/locale/fr/foreman_puppet.po.time_stamp +0 -0
  48. data/locale/gl/foreman_puppet.edit.po +0 -1150
  49. data/locale/gl/foreman_puppet.po.time_stamp +0 -0
  50. data/locale/it/foreman_puppet.edit.po +0 -1155
  51. data/locale/it/foreman_puppet.po.time_stamp +0 -0
  52. data/locale/ja/foreman_puppet.edit.po +0 -1162
  53. data/locale/ja/foreman_puppet.po.time_stamp +0 -0
  54. data/locale/ka/foreman_puppet.edit.po +0 -1160
  55. data/locale/ka/foreman_puppet.po.time_stamp +0 -0
  56. data/locale/ko/foreman_puppet.edit.po +0 -1151
  57. data/locale/ko/foreman_puppet.po.time_stamp +0 -0
  58. data/locale/nl_NL/foreman_puppet.edit.po +0 -1155
  59. data/locale/nl_NL/foreman_puppet.po.time_stamp +0 -0
  60. data/locale/pl/foreman_puppet.edit.po +0 -1154
  61. data/locale/pl/foreman_puppet.po.time_stamp +0 -0
  62. data/locale/pt_BR/foreman_puppet.edit.po +0 -1159
  63. data/locale/pt_BR/foreman_puppet.po.time_stamp +0 -0
  64. data/locale/ru/foreman_puppet.edit.po +0 -1159
  65. data/locale/ru/foreman_puppet.po.time_stamp +0 -0
  66. data/locale/sv_SE/foreman_puppet.edit.po +0 -1154
  67. data/locale/sv_SE/foreman_puppet.po.time_stamp +0 -0
  68. data/locale/zh_CN/foreman_puppet.edit.po +0 -1163
  69. data/locale/zh_CN/foreman_puppet.po.time_stamp +0 -0
  70. data/locale/zh_TW/foreman_puppet.edit.po +0 -1153
  71. data/locale/zh_TW/foreman_puppet.po.time_stamp +0 -0
@@ -8,8 +8,8 @@ msgid ""
8
8
  msgstr ""
9
9
  "Project-Id-Version: foreman_puppet 1.0.0\n"
10
10
  "Report-Msgid-Bugs-To: \n"
11
- "POT-Creation-Date: 2023-06-01 14:06+0200\n"
12
- "PO-Revision-Date: 2023-06-01 14:06+0200\n"
11
+ "POT-Creation-Date: 2023-09-18 13:52+0200\n"
12
+ "PO-Revision-Date: 2023-09-18 13:52+0200\n"
13
13
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
14
  "Language-Team: LANGUAGE <LL@li.org>\n"
15
15
  "Language: \n"
@@ -767,51 +767,65 @@ msgid "Can't find a valid Proxy with a Puppet feature"
767
767
  msgstr ""
768
768
 
769
769
  #: ../app/views/foreman_puppet/common/_puppetclasses_or_envs_changed.html.erb:1
770
+ #: ../app/views/foreman_puppet/common/_puppetclasses_or_envs_changed.html.erb:5
770
771
  msgid "Changed environments"
771
772
  msgstr ""
772
773
 
773
- #: ../app/views/foreman_puppet/common/_puppetclasses_or_envs_changed.html.erb:3
774
+ #: ../app/views/foreman_puppet/common/_puppetclasses_or_envs_changed.html.erb:4
775
+ #: ../app/views/foreman_puppet/environments/edit.html.erb:5
776
+ #: ../app/views/foreman_puppet/environments/index.html.erb:1
777
+ #: ../app/views/foreman_puppet/environments/new.html.erb:4
778
+ #: ../app/views/foreman_puppet/environments/welcome.html.erb:4
779
+ #: ../webpack/src/Components/Environments/Welcome.js:40
780
+ msgid "Puppet Environments"
781
+ msgstr ""
782
+
783
+ #: ../app/views/foreman_puppet/common/_puppetclasses_or_envs_changed.html.erb:8
774
784
  msgid "Select the changes you want to apply to Foreman"
775
785
  msgstr ""
776
786
 
777
- #: ../app/views/foreman_puppet/common/_puppetclasses_or_envs_changed.html.erb:5
787
+ #:
788
+ #: ../app/views/foreman_puppet/common/_puppetclasses_or_envs_changed.html.erb:10
778
789
  msgid "Toggle"
779
790
  msgstr ""
780
791
 
781
- #: ../app/views/foreman_puppet/common/_puppetclasses_or_envs_changed.html.erb:6
792
+ #:
793
+ #: ../app/views/foreman_puppet/common/_puppetclasses_or_envs_changed.html.erb:11
782
794
  msgid "New"
783
795
  msgstr ""
784
796
 
785
- #: ../app/views/foreman_puppet/common/_puppetclasses_or_envs_changed.html.erb:8
797
+ #:
798
+ #: ../app/views/foreman_puppet/common/_puppetclasses_or_envs_changed.html.erb:13
786
799
  msgid "Check/Uncheck new"
787
800
  msgstr ""
788
801
 
789
- #: ../app/views/foreman_puppet/common/_puppetclasses_or_envs_changed.html.erb:9
802
+ #:
803
+ #: ../app/views/foreman_puppet/common/_puppetclasses_or_envs_changed.html.erb:14
790
804
  msgid "Updated"
791
805
  msgstr ""
792
806
 
793
807
  #:
794
- #: ../app/views/foreman_puppet/common/_puppetclasses_or_envs_changed.html.erb:11
808
+ #: ../app/views/foreman_puppet/common/_puppetclasses_or_envs_changed.html.erb:16
795
809
  msgid "Check/Uncheck updated"
796
810
  msgstr ""
797
811
 
798
812
  #:
799
- #: ../app/views/foreman_puppet/common/_puppetclasses_or_envs_changed.html.erb:12
813
+ #: ../app/views/foreman_puppet/common/_puppetclasses_or_envs_changed.html.erb:17
800
814
  msgid "Obsolete"
801
815
  msgstr ""
802
816
 
803
817
  #:
804
- #: ../app/views/foreman_puppet/common/_puppetclasses_or_envs_changed.html.erb:14
818
+ #: ../app/views/foreman_puppet/common/_puppetclasses_or_envs_changed.html.erb:19
805
819
  msgid "Check/Uncheck obsolete"
806
820
  msgstr ""
807
821
 
808
822
  #:
809
- #: ../app/views/foreman_puppet/common/_puppetclasses_or_envs_changed.html.erb:22
823
+ #: ../app/views/foreman_puppet/common/_puppetclasses_or_envs_changed.html.erb:27
810
824
  msgid "Check/Uncheck all"
811
825
  msgstr ""
812
826
 
813
827
  #:
814
- #: ../app/views/foreman_puppet/common/_puppetclasses_or_envs_changed.html.erb:24
828
+ #: ../app/views/foreman_puppet/common/_puppetclasses_or_envs_changed.html.erb:29
815
829
  #: ../app/views/foreman_puppet/environments/_form.html.erb:4
816
830
  #: ../app/views/foreman_puppet/puppet_smart_proxies/_environments.html.erb:4
817
831
  #: ../app/views/hosts/select_multiple_environment.html.erb:7
@@ -820,47 +834,47 @@ msgid "Environment"
820
834
  msgstr ""
821
835
 
822
836
  #:
823
- #: ../app/views/foreman_puppet/common/_puppetclasses_or_envs_changed.html.erb:25
837
+ #: ../app/views/foreman_puppet/common/_puppetclasses_or_envs_changed.html.erb:30
824
838
  msgid "Operation"
825
839
  msgstr ""
826
840
 
827
841
  #:
828
- #: ../app/views/foreman_puppet/common/_puppetclasses_or_envs_changed.html.erb:26
842
+ #: ../app/views/foreman_puppet/common/_puppetclasses_or_envs_changed.html.erb:31
829
843
  msgid "Puppet Modules"
830
844
  msgstr ""
831
845
 
832
846
  #:
833
- #: ../app/views/foreman_puppet/common/_puppetclasses_or_envs_changed.html.erb:39
847
+ #: ../app/views/foreman_puppet/common/_puppetclasses_or_envs_changed.html.erb:44
834
848
  msgid "Check/Uncheck all %s changes"
835
849
  msgstr ""
836
850
 
837
851
  #:
838
- #: ../app/views/foreman_puppet/common/_puppetclasses_or_envs_changed.html.erb:46
852
+ #: ../app/views/foreman_puppet/common/_puppetclasses_or_envs_changed.html.erb:51
839
853
  msgid "Add:"
840
854
  msgstr ""
841
855
 
842
856
  #:
843
- #: ../app/views/foreman_puppet/common/_puppetclasses_or_envs_changed.html.erb:46
857
+ #: ../app/views/foreman_puppet/common/_puppetclasses_or_envs_changed.html.erb:51
844
858
  msgid "Remove:"
845
859
  msgstr ""
846
860
 
847
861
  #:
848
- #: ../app/views/foreman_puppet/common/_puppetclasses_or_envs_changed.html.erb:46
862
+ #: ../app/views/foreman_puppet/common/_puppetclasses_or_envs_changed.html.erb:51
849
863
  msgid "Update:"
850
864
  msgstr ""
851
865
 
852
866
  #:
853
- #: ../app/views/foreman_puppet/common/_puppetclasses_or_envs_changed.html.erb:46
867
+ #: ../app/views/foreman_puppet/common/_puppetclasses_or_envs_changed.html.erb:51
854
868
  msgid "Ignored:"
855
869
  msgstr ""
856
870
 
857
871
  #:
858
- #: ../app/views/foreman_puppet/common/_puppetclasses_or_envs_changed.html.erb:59
872
+ #: ../app/views/foreman_puppet/common/_puppetclasses_or_envs_changed.html.erb:64
859
873
  msgid "Cancel"
860
874
  msgstr ""
861
875
 
862
876
  #:
863
- #: ../app/views/foreman_puppet/common/_puppetclasses_or_envs_changed.html.erb:60
877
+ #: ../app/views/foreman_puppet/common/_puppetclasses_or_envs_changed.html.erb:65
864
878
  msgid "Update"
865
879
  msgstr ""
866
880
 
@@ -952,14 +966,6 @@ msgstr ""
952
966
  msgid "Organizations"
953
967
  msgstr ""
954
968
 
955
- #: ../app/views/foreman_puppet/environments/edit.html.erb:5
956
- #: ../app/views/foreman_puppet/environments/index.html.erb:1
957
- #: ../app/views/foreman_puppet/environments/new.html.erb:4
958
- #: ../app/views/foreman_puppet/environments/welcome.html.erb:4
959
- #: ../webpack/src/Components/Environments/Welcome.js:40
960
- msgid "Puppet Environments"
961
- msgstr ""
962
-
963
969
  #: ../app/views/foreman_puppet/environments/index.html.erb:8
964
970
  msgid "Environment|Name"
965
971
  msgstr ""
@@ -1107,7 +1113,7 @@ msgid "Puppetclass|Name"
1107
1113
  msgstr ""
1108
1114
 
1109
1115
  #: ../app/views/foreman_puppet/puppetclasses/index.html.erb:10
1110
- #: ../app/views/smart_proxies/plugins/_puppet.html.erb:4
1116
+ #: ../app/views/smart_proxies/plugins/_puppet.html.erb:3
1111
1117
  #: ../lib/foreman_puppet/register.rb:168
1112
1118
  msgid "Environments"
1113
1119
  msgstr ""
@@ -1172,11 +1178,11 @@ msgstr ""
1172
1178
  msgid "Add Combination"
1173
1179
  msgstr ""
1174
1180
 
1175
- #: ../app/views/smart_proxies/plugins/_puppet.html.erb:3
1181
+ #: ../app/views/smart_proxies/plugins/_puppet.html.erb:2
1176
1182
  msgid "General"
1177
1183
  msgstr ""
1178
1184
 
1179
- #: ../app/views/smart_proxies/plugins/_puppet.html.erb:12
1185
+ #: ../app/views/smart_proxies/plugins/_puppet.html.erb:11
1180
1186
  msgid "Hosts managed:"
1181
1187
  msgstr ""
1182
1188
 
@@ -1326,7 +1332,7 @@ msgstr ""
1326
1332
  msgid "Loading parameters..."
1327
1333
  msgstr ""
1328
1334
 
1329
- #: ../webpack/src/foreman_puppet_host_form.js:102
1335
+ #: ../webpack/src/foreman_puppet_host_form.js:105
1330
1336
  msgid "Some Puppet Classes are unavailable in the selected environment"
1331
1337
  msgstr ""
1332
1338
 
@@ -6,7 +6,7 @@ import Reports from './SubTabs/Reports';
6
6
  import ENCPreview from './SubTabs/ENCPreview';
7
7
 
8
8
  const SecondaryTabRoutes = ({ hostName, hostInfo, status }) => (
9
- <Switch>
9
+ <Switch ouiaId="foreman-puppet-switch">
10
10
  <Route path={route('reports')}>
11
11
  <Reports hostName={hostName} hostInfo={hostInfo} status={status} />
12
12
  </Route>
@@ -0,0 +1,10 @@
1
+ import { API_OPERATIONS, get } from 'foremanReact/redux/API';
2
+ import { FOREMAN_PUPPET_LAST_REPORT_KEY } from './ConfigStatusCardConstants';
3
+
4
+ export const getReportByIdAction = reportId =>
5
+ get({
6
+ type: API_OPERATIONS.GET,
7
+ key: FOREMAN_PUPPET_LAST_REPORT_KEY,
8
+ url: `/api/config_reports/${reportId}`,
9
+ });
10
+ export default getReportByIdAction;
@@ -0,0 +1 @@
1
+ export const FOREMAN_PUPPET_LAST_REPORT_KEY = 'FOREMAN_PUPPET_LAST_REPORT';
@@ -0,0 +1,186 @@
1
+ import PropTypes from 'prop-types';
2
+ import React, { useCallback, useEffect } from 'react';
3
+ import {
4
+ Divider,
5
+ Flex,
6
+ FlexItem,
7
+ Button,
8
+ DescriptionList,
9
+ DescriptionListTerm,
10
+ DescriptionListGroup,
11
+ DescriptionListDescription,
12
+ } from '@patternfly/react-core';
13
+ import {
14
+ TableComposable,
15
+ TableText,
16
+ Tr,
17
+ Tbody,
18
+ Td,
19
+ } from '@patternfly/react-table';
20
+ import { useSelector, useDispatch } from 'react-redux';
21
+ import { selectAPIResponse } from 'foremanReact/redux/API/APISelectors';
22
+ import CardTemplate from 'foremanReact/components/HostDetails/Templates/CardItem/CardTemplate';
23
+ import RelativeDateTime from 'foremanReact/components/common/dates/RelativeDateTime';
24
+ import SkeletonLoader from 'foremanReact/components/common/SkeletonLoader';
25
+ import DefaultLoaderEmptyState from 'foremanReact/components/HostDetails/DetailsCard/DefaultLoaderEmptyState';
26
+ import { statusFormatter } from 'foremanReact/components/HostDetails/Tabs/ReportsTab/helpers';
27
+ import { translate as __ } from 'foremanReact/common/I18n';
28
+
29
+ import { getReportByIdAction } from './ConfigStatusCardActions';
30
+ import { FOREMAN_PUPPET_LAST_REPORT_KEY } from './ConfigStatusCardConstants';
31
+ import './styles.scss';
32
+
33
+ const cardHeaderDivider = () => (
34
+ <Divider
35
+ orientation={{
36
+ default: 'vertical',
37
+ }}
38
+ inset={{ default: 'insetMd' }}
39
+ />
40
+ );
41
+
42
+ const generateCardHeader = (allReports = [], reportsCount) =>
43
+ reportsCount > 0 ? (
44
+ <>
45
+ {__('Last configuration status')}
46
+ <Flex>
47
+ <FlexItem>
48
+ <Button
49
+ ouiaId="foreman-puppet-last-report-button"
50
+ variant="link"
51
+ component="a"
52
+ isInline
53
+ isDisabled={!allReports.length}
54
+ href={`/config_reports/${allReports[0].id}`}
55
+ >
56
+ <RelativeDateTime
57
+ date={allReports[0].reported_at}
58
+ defaultValue={__('Never')}
59
+ />
60
+ </Button>
61
+ </FlexItem>
62
+ <FlexItem>{statusFormatter('failed', allReports[0])}</FlexItem>
63
+ {cardHeaderDivider()}
64
+ <FlexItem>{statusFormatter('failed_restarts', allReports[0])}</FlexItem>
65
+ {cardHeaderDivider()}
66
+ <FlexItem>{statusFormatter('restarted', allReports[0])}</FlexItem>
67
+ {cardHeaderDivider()}
68
+ <FlexItem>{statusFormatter('applied', allReports[0])}</FlexItem>
69
+ {cardHeaderDivider()}
70
+ <FlexItem>{statusFormatter('skipped', allReports[0])}</FlexItem>
71
+ {cardHeaderDivider()}
72
+ <FlexItem>{statusFormatter('pending', allReports[0])}</FlexItem>
73
+ </Flex>
74
+ </>
75
+ ) : (
76
+ <> {__('No configuration status available')} </>
77
+ );
78
+
79
+ const createPuppetMetricsTableElement = (name, value = '--') => (
80
+ <>
81
+ <Td modifier="truncate" key={`metrics-name-${name}`}>
82
+ <TableText
83
+ className={name === 'Total' ? 'last-config-puppet-metrics-total' : ''}
84
+ >
85
+ {name}
86
+ </TableText>
87
+ </Td>
88
+ <Td modifier="truncate" key={`metrics-name-${value}`}>
89
+ <TableText
90
+ className={name === 'Total' ? 'last-config-puppet-metrics-total' : ''}
91
+ >
92
+ {value}
93
+ </TableText>
94
+ </Td>
95
+ </>
96
+ );
97
+
98
+ const createPuppetMetricsTable = (metrics = undefined) => (
99
+ <TableComposable
100
+ aria-label="foreman puppet metrics table"
101
+ variant="compact"
102
+ borders="compactBorderless"
103
+ ouiaId="foreman-puppet-metrics-table"
104
+ key="foreman-puppet-metrics-table"
105
+ >
106
+ <Tbody>
107
+ <Tr>
108
+ {createPuppetMetricsTableElement(__('Failed'), metrics.failed)}
109
+ {createPuppetMetricsTableElement(__('Changed'), metrics.changed)}
110
+ {createPuppetMetricsTableElement(__('Scheduled'), metrics.scheduled)}
111
+ </Tr>
112
+ <Tr>
113
+ {createPuppetMetricsTableElement(
114
+ __('Failed to start'),
115
+ metrics.failed_to_start
116
+ )}
117
+ {createPuppetMetricsTableElement(__('Restarted'), metrics.restarted)}
118
+ {createPuppetMetricsTableElement(
119
+ __('Corrective Change'),
120
+ metrics.corrective_change
121
+ )}
122
+ </Tr>
123
+ <Tr>
124
+ {createPuppetMetricsTableElement(__('Skipped'), metrics.skipped)}
125
+ {createPuppetMetricsTableElement(
126
+ __('Out of sync'),
127
+ metrics.out_of_sync
128
+ )}
129
+ {createPuppetMetricsTableElement(__('Total'), metrics.total)}
130
+ </Tr>
131
+ </Tbody>
132
+ </TableComposable>
133
+ );
134
+
135
+ const ConfigStatusCard = ({ hostName, parentStatus }) => {
136
+ const dispatch = useDispatch();
137
+ // get already fetched results from reports tab
138
+ const API_KEY = `get-reports-${hostName}`;
139
+ const { reports, itemCount } = useSelector(state =>
140
+ selectAPIResponse(state, API_KEY)
141
+ );
142
+
143
+ // we need to fetch the last Puppet report to get all Puppet metrics
144
+ const getLastReport = useCallback(() => {
145
+ if (hostName && reports?.length)
146
+ dispatch(getReportByIdAction(reports[0].id));
147
+ }, [hostName, reports, dispatch]);
148
+
149
+ useEffect(() => {
150
+ getLastReport();
151
+ }, [hostName, reports]);
152
+
153
+ const { metrics } = useSelector(state =>
154
+ selectAPIResponse(state, FOREMAN_PUPPET_LAST_REPORT_KEY)
155
+ );
156
+
157
+ return (
158
+ <CardTemplate header={generateCardHeader(reports, itemCount)} expandable>
159
+ <DescriptionList isCompact>
160
+ <DescriptionListGroup>
161
+ <DescriptionListTerm>{__('Puppet metrics')}</DescriptionListTerm>
162
+ <DescriptionListDescription>
163
+ <SkeletonLoader
164
+ status={parentStatus}
165
+ emptyState={<DefaultLoaderEmptyState />}
166
+ >
167
+ {metrics && createPuppetMetricsTable(metrics.resources)}
168
+ </SkeletonLoader>
169
+ </DescriptionListDescription>
170
+ </DescriptionListGroup>
171
+ </DescriptionList>
172
+ </CardTemplate>
173
+ );
174
+ };
175
+
176
+ ConfigStatusCard.propTypes = {
177
+ hostName: PropTypes.string,
178
+ parentStatus: PropTypes.string,
179
+ };
180
+
181
+ ConfigStatusCard.defaultProps = {
182
+ hostName: undefined,
183
+ parentStatus: undefined,
184
+ };
185
+
186
+ export default ConfigStatusCard;
@@ -0,0 +1,3 @@
1
+ .last-config-puppet-metrics-total {
2
+ font-weight: bold;
3
+ }
@@ -3,6 +3,7 @@ import React from 'react';
3
3
  import { Grid, GridItem } from '@patternfly/react-core';
4
4
  import ReportsTab from 'foremanReact/components/HostDetails/Tabs/ReportsTab';
5
5
  import DescriptionCard from './components/DescriptionCard';
6
+ import ConfigStatusCard from './components/ConfigStatusCard';
6
7
  import './styles.scss';
7
8
 
8
9
  const Reports = ({
@@ -18,6 +19,9 @@ const Reports = ({
18
19
  }) => (
19
20
  <div className="report-tab">
20
21
  <Grid hasGutter>
22
+ <GridItem span={8}>
23
+ <ConfigStatusCard hostName={hostName} parentStatus={status} />
24
+ </GridItem>
21
25
  <GridItem span={4}>
22
26
  <DescriptionCard
23
27
  proxyName={proxyName}
@@ -8,13 +8,15 @@ import SecondaryTabRoutes from './Routes';
8
8
  import { activeTab } from './helpers';
9
9
  import { SECONDARY_TABS } from './constants';
10
10
 
11
+ import './styles.scss';
12
+
11
13
  const PuppetTab = ({ response, status, location: { pathname } }) => {
12
14
  const hashHistory = useHistory();
13
15
  return (
14
16
  <>
15
17
  <Tabs
16
- ouiaId="puppet-tabs"
17
- className="margin-0-24"
18
+ ouiaId="foreman-puppet-host-details-tab"
19
+ className="foreman-puppet-host-details-tab"
18
20
  onSelect={(evt, subTab) => hashHistory.push(subTab)}
19
21
  isSecondary
20
22
  activeKey={activeTab(pathname)}
@@ -0,0 +1,9 @@
1
+
2
+ .pf-c-tabs.pf-m-secondary.foreman-puppet-host-details-tab {
3
+ overflow: visible;
4
+ }
5
+
6
+ .foreman-puppet-host-details-tab {
7
+ margin: 0 24px
8
+ }
9
+