foreman_ansible 9.0.1 → 10.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/app/helpers/foreman_ansible/ansible_hostgroups_helper.rb +1 -1
  3. data/lib/foreman_ansible/register.rb +1 -1
  4. data/lib/foreman_ansible/version.rb +1 -1
  5. data/package.json +0 -1
  6. data/test/integration/hostgroup_js_test.rb +30 -0
  7. data/webpack/components/AnsibleHostDetail/AnsibleHostDetail.js +1 -0
  8. data/webpack/components/AnsibleHostDetail/components/AnsibleVariableOverrides/AnsibleVariableOverridesTable.js +10 -4
  9. data/webpack/components/AnsibleHostDetail/components/AnsibleVariableOverrides/EditableAction.js +3 -0
  10. data/webpack/components/AnsibleHostDetail/components/AnsibleVariableOverrides/EditableValueHelper.js +5 -1
  11. data/webpack/components/AnsibleHostDetail/components/JobsTab/NewRecurringJobModal.js +3 -0
  12. data/webpack/components/AnsibleHostDetail/components/JobsTab/PreviousJobsTable.js +10 -4
  13. data/webpack/components/AnsibleHostDetail/components/JobsTab/RecurringJobsTable.js +3 -3
  14. data/webpack/components/AnsibleHostDetail/components/JobsTab/index.js +5 -1
  15. data/webpack/components/AnsibleHostDetail/components/RolesTab/AllRolesModal/AllRolesTable.js +10 -4
  16. data/webpack/components/AnsibleHostDetail/components/RolesTab/AllRolesModal/index.js +1 -0
  17. data/webpack/components/AnsibleHostDetail/components/RolesTab/EditRolesModal/EditRolesForm.js +2 -1
  18. data/webpack/components/AnsibleHostDetail/components/RolesTab/EditRolesModal/index.js +7 -1
  19. data/webpack/components/AnsibleHostDetail/components/RolesTab/RolesTable.js +14 -5
  20. data/webpack/components/AnsibleHostDetail/components/RolesTab/__test__/EditRoles.test.js +2 -1
  21. data/webpack/components/AnsibleHostDetail/components/RolesTab/__test__/RolesTab.test.js +3 -1
  22. data/webpack/components/AnsibleHostDetail/components/RolesTab/index.js +27 -2
  23. data/webpack/components/AnsibleHostDetail/components/SecondaryTabRoutes.js +1 -1
  24. data/webpack/testHelper.js +12 -3
  25. metadata +20 -56
  26. data/lib/foreman_ansible/register.rb.orig +0 -257
  27. data/locale/ca/foreman_ansible.edit.po +0 -1162
  28. data/locale/ca/foreman_ansible.po.time_stamp +0 -0
  29. data/locale/cs_CZ/foreman_ansible.edit.po +0 -1207
  30. data/locale/cs_CZ/foreman_ansible.po.time_stamp +0 -0
  31. data/locale/de/foreman_ansible.edit.po +0 -1148
  32. data/locale/de/foreman_ansible.po.time_stamp +0 -0
  33. data/locale/en/foreman_ansible.edit.po +0 -1146
  34. data/locale/en/foreman_ansible.po.time_stamp +0 -0
  35. data/locale/en_GB/foreman_ansible.edit.po +0 -1155
  36. data/locale/en_GB/foreman_ansible.po.time_stamp +0 -0
  37. data/locale/es/foreman_ansible.edit.po +0 -1148
  38. data/locale/es/foreman_ansible.po.time_stamp +0 -0
  39. data/locale/fr/foreman_ansible.edit.po +0 -1148
  40. data/locale/fr/foreman_ansible.po.time_stamp +0 -0
  41. data/locale/gl/foreman_ansible.edit.po +0 -1156
  42. data/locale/gl/foreman_ansible.po.time_stamp +0 -0
  43. data/locale/it/foreman_ansible.edit.po +0 -1148
  44. data/locale/it/foreman_ansible.po.time_stamp +0 -0
  45. data/locale/ja/foreman_ansible.edit.po +0 -1148
  46. data/locale/ja/foreman_ansible.po.time_stamp +0 -0
  47. data/locale/ko/foreman_ansible.edit.po +0 -1148
  48. data/locale/ko/foreman_ansible.po.time_stamp +0 -0
  49. data/locale/nl_NL/foreman_ansible.edit.po +0 -1168
  50. data/locale/nl_NL/foreman_ansible.po.time_stamp +0 -0
  51. data/locale/pl/foreman_ansible.edit.po +0 -1180
  52. data/locale/pl/foreman_ansible.po.time_stamp +0 -0
  53. data/locale/pt_BR/foreman_ansible.edit.po +0 -1148
  54. data/locale/pt_BR/foreman_ansible.po.time_stamp +0 -0
  55. data/locale/ru/foreman_ansible.edit.po +0 -1149
  56. data/locale/ru/foreman_ansible.po.time_stamp +0 -0
  57. data/locale/sv_SE/foreman_ansible.edit.po +0 -1180
  58. data/locale/sv_SE/foreman_ansible.po.time_stamp +0 -0
  59. data/locale/zh_CN/foreman_ansible.edit.po +0 -1148
  60. data/locale/zh_CN/foreman_ansible.po.time_stamp +0 -0
  61. data/locale/zh_TW/foreman_ansible.edit.po +0 -1148
  62. data/locale/zh_TW/foreman_ansible.po.time_stamp +0 -0
  63. data/webpack/components/AnsibleHostDetail/components/JobsTab/PreviousJobsTable.js.orig +0 -151
File without changes
@@ -1,151 +0,0 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import { translate as __ } from 'foremanReact/common/I18n';
4
- import { usePaginationOptions } from 'foremanReact/components/Pagination/PaginationHooks';
5
-
6
- import RelativeDateTime from 'foremanReact/components/common/dates/RelativeDateTime';
7
-
8
- import {
9
- TableComposable,
10
- Thead,
11
- Tbody,
12
- Tr,
13
- Th,
14
- Td,
15
- } from '@patternfly/react-table';
16
- import { Flex, FlexItem, Pagination } from '@patternfly/react-core';
17
-
18
- import { decodeId } from '../../../../globalIdHelper';
19
- import withLoading from '../../../withLoading';
20
- <<<<<<< HEAD
21
- import { readableCron } from './JobsTabHelper';
22
- import {
23
- preparePerPageOptions,
24
- refreshPage,
25
- } from '../../../../helpers/paginationHelper';
26
- =======
27
- import { readableCron, readablePurpose } from './JobsTabHelper';
28
- >>>>>>> 5b01704 (Fixes #34458 - Show Hostgroup jobs on the Host Detail page)
29
-
30
- const PreviousJobsTable = ({ history, totalCount, jobs, pagination }) => {
31
- const columns = [
32
- __('Description'),
33
- __('Result'),
34
- __('State'),
35
- __('Executed at'),
36
- __('Schedule'),
37
- ];
38
-
39
- const handlePerPageSelected = (event, perPage) => {
40
- refreshPage(history, { page: 1, perPage });
41
- };
42
-
43
- const handlePageSelected = (event, page) => {
44
- refreshPage(history, { ...pagination, page });
45
- };
46
-
47
- const perPageOptions = preparePerPageOptions(usePaginationOptions());
48
-
49
- return (
50
- <React.Fragment>
51
- <h3>{__('Previously executed jobs')}</h3>
52
- <<<<<<< HEAD
53
- <Flex className="pf-u-pt-md">
54
- =======
55
- <Flex direction={{ default: 'column' }} className="pf-u-pt-md">
56
- <FlexItem align={{ default: 'alignRight' }}>
57
- <Pagination updateParamsByUrl itemCount={totalCount} variant="top" />
58
- </FlexItem>
59
- <FlexItem>
60
- <TableComposable variant="compact">
61
- <Thead>
62
- <Tr>
63
- {columns.map(col => (
64
- <Th key={col}>{col}</Th>
65
- ))}
66
- </Tr>
67
- </Thead>
68
- <Tbody>
69
- {jobs.map(job => (
70
- <Tr key={job.id}>
71
- <Td>
72
- <a
73
- onClick={() =>
74
- window.tfm.nav.pushUrl(
75
- `/job_invocations/${decodeId(job.id)}`
76
- )
77
- }
78
- >
79
- {job.description}
80
- </a>
81
- &nbsp;
82
- {readablePurpose(job.recurringLogic.purpose)}
83
- </Td>
84
- <Td>{job.task.result}</Td>
85
- <Td>{job.task.state}</Td>
86
- <Td>
87
- <RelativeDateTime date={job.startAt} />
88
- </Td>
89
- <Td>{readableCron(job.recurringLogic.cronLine)}</Td>
90
- </Tr>
91
- ))}
92
- </Tbody>
93
- </TableComposable>
94
- </FlexItem>
95
- >>>>>>> 5b01704 (Fixes #34458 - Show Hostgroup jobs on the Host Detail page)
96
- <FlexItem align={{ default: 'alignRight' }}>
97
- <Pagination
98
- itemCount={totalCount}
99
- page={pagination.page}
100
- perPage={pagination.perPage}
101
- onSetPage={handlePageSelected}
102
- onPerPageSelect={handlePerPageSelected}
103
- perPageOptions={perPageOptions}
104
- variant="top"
105
- />
106
- </FlexItem>
107
- </Flex>
108
- <TableComposable variant="compact">
109
- <Thead>
110
- <Tr>
111
- {columns.map(col => (
112
- <Th key={col}>{col}</Th>
113
- ))}
114
- </Tr>
115
- </Thead>
116
- <Tbody>
117
- {jobs.map(job => (
118
- <Tr key={job.id}>
119
- <Td>
120
- <a
121
- onClick={() =>
122
- window.tfm.nav.pushUrl(
123
- `/job_invocations/${decodeId(job.id)}`
124
- )
125
- }
126
- >
127
- {job.description}
128
- </a>
129
- </Td>
130
- <Td>{job.task.result}</Td>
131
- <Td>{job.task.state}</Td>
132
- <Td>
133
- <RelativeDateTime date={job.startAt} />
134
- </Td>
135
- <Td>{readableCron(job.recurringLogic.cronLine)}</Td>
136
- </Tr>
137
- ))}
138
- </Tbody>
139
- </TableComposable>
140
- </React.Fragment>
141
- );
142
- };
143
-
144
- PreviousJobsTable.propTypes = {
145
- jobs: PropTypes.array.isRequired,
146
- history: PropTypes.object.isRequired,
147
- totalCount: PropTypes.number.isRequired,
148
- pagination: PropTypes.object.isRequired,
149
- };
150
-
151
- export default withLoading(PreviousJobsTable);