foreman_remote_execution 16.2.2 → 16.3.0

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 (44) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/foreman_remote_execution/locale/de/foreman_remote_execution.js +10 -10
  3. data/app/assets/javascripts/foreman_remote_execution/locale/en_GB/foreman_remote_execution.js +9 -9
  4. data/app/assets/javascripts/foreman_remote_execution/locale/es/foreman_remote_execution.js +10 -10
  5. data/app/assets/javascripts/foreman_remote_execution/locale/fr/foreman_remote_execution.js +28 -28
  6. data/app/assets/javascripts/foreman_remote_execution/locale/ja/foreman_remote_execution.js +32 -32
  7. data/app/assets/javascripts/foreman_remote_execution/locale/ka/foreman_remote_execution.js +10 -10
  8. data/app/assets/javascripts/foreman_remote_execution/locale/ko/foreman_remote_execution.js +27 -27
  9. data/app/assets/javascripts/foreman_remote_execution/locale/pt_BR/foreman_remote_execution.js +9 -9
  10. data/app/assets/javascripts/foreman_remote_execution/locale/ru/foreman_remote_execution.js +9 -9
  11. data/app/assets/javascripts/foreman_remote_execution/locale/zh_CN/foreman_remote_execution.js +27 -27
  12. data/app/assets/javascripts/foreman_remote_execution/locale/zh_TW/foreman_remote_execution.js +9 -9
  13. data/app/controllers/api/v2/job_invocations_controller.rb +6 -1
  14. data/app/helpers/remote_execution_helper.rb +1 -7
  15. data/app/views/job_templates/index.html.erb +1 -1
  16. data/lib/foreman_remote_execution/plugin.rb +1 -1
  17. data/lib/foreman_remote_execution/version.rb +1 -1
  18. data/locale/de/LC_MESSAGES/foreman_remote_execution.mo +0 -0
  19. data/locale/de/foreman_remote_execution.po +10 -10
  20. data/locale/en_GB/LC_MESSAGES/foreman_remote_execution.mo +0 -0
  21. data/locale/en_GB/foreman_remote_execution.po +9 -9
  22. data/locale/es/LC_MESSAGES/foreman_remote_execution.mo +0 -0
  23. data/locale/es/foreman_remote_execution.po +10 -10
  24. data/locale/foreman_remote_execution.pot +66 -66
  25. data/locale/fr/LC_MESSAGES/foreman_remote_execution.mo +0 -0
  26. data/locale/fr/foreman_remote_execution.po +28 -28
  27. data/locale/ja/LC_MESSAGES/foreman_remote_execution.mo +0 -0
  28. data/locale/ja/foreman_remote_execution.po +32 -32
  29. data/locale/ka/LC_MESSAGES/foreman_remote_execution.mo +0 -0
  30. data/locale/ka/foreman_remote_execution.po +10 -10
  31. data/locale/ko/LC_MESSAGES/foreman_remote_execution.mo +0 -0
  32. data/locale/ko/foreman_remote_execution.po +27 -27
  33. data/locale/pt_BR/LC_MESSAGES/foreman_remote_execution.mo +0 -0
  34. data/locale/pt_BR/foreman_remote_execution.po +9 -9
  35. data/locale/ru/LC_MESSAGES/foreman_remote_execution.mo +0 -0
  36. data/locale/ru/foreman_remote_execution.po +9 -9
  37. data/locale/zh_CN/LC_MESSAGES/foreman_remote_execution.mo +0 -0
  38. data/locale/zh_CN/foreman_remote_execution.po +27 -27
  39. data/locale/zh_TW/LC_MESSAGES/foreman_remote_execution.mo +0 -0
  40. data/locale/zh_TW/foreman_remote_execution.po +9 -9
  41. data/webpack/JobInvocationDetail/JobInvocationConstants.js +2 -5
  42. data/webpack/JobInvocationDetail/JobInvocationHostTable.js +37 -13
  43. data/webpack/JobInvocationDetail/JobInvocationSystemStatusChart.js +7 -1
  44. metadata +2 -2
@@ -35,6 +35,7 @@ import Columns, {
35
35
  LIST_TEMPLATE_INVOCATIONS,
36
36
  STATUS_UPPERCASE,
37
37
  ALL_JOB_HOSTS,
38
+ AWAITING_STATUS_FILTER,
38
39
  } from './JobInvocationConstants';
39
40
  import { TemplateInvocation } from './TemplateInvocation';
40
41
  import { RowActions } from './TemplateInvocationComponents/TemplateActionButtons';
@@ -63,13 +64,6 @@ const JobInvocationHostTable = ({
63
64
  const [expandedHost, setExpandedHost] = useState([]);
64
65
  const prevStatusLabel = useRef(statusLabel);
65
66
 
66
- const isHostExpanded = host => expandedHost.includes(host);
67
- const setHostExpanded = (host, isExpanding = true) =>
68
- setExpandedHost(prevExpanded => {
69
- const otherExpandedHosts = prevExpanded.filter(h => h !== host);
70
- return isExpanding ? [...otherExpandedHosts, host] : otherExpandedHosts;
71
- });
72
-
73
67
  // Page table params
74
68
  // Parse URL
75
69
  const {
@@ -150,7 +144,9 @@ const JobInvocationHostTable = ({
150
144
  ...newParams,
151
145
  };
152
146
 
153
- if (filterSearch !== '') {
147
+ if (filterSearch === AWAITING_STATUS_FILTER) {
148
+ finalParams.awaiting = 'true';
149
+ } else if (filterSearch !== '') {
154
150
  finalParams.search = filterSearch;
155
151
  }
156
152
 
@@ -311,6 +307,32 @@ const JobInvocationHostTable = ({
311
307
  </Tr>
312
308
  );
313
309
 
310
+ const isHostExpanded = host => expandedHost.includes(host.id);
311
+
312
+ const setHostExpanded = (host, isExpanding = true) =>
313
+ setExpandedHost(prevExpanded => {
314
+ const otherExpandedHosts = prevExpanded.filter(h => h !== host.id);
315
+ return isExpanding
316
+ ? [...otherExpandedHosts, host.id]
317
+ : otherExpandedHosts;
318
+ });
319
+
320
+ const pageHostIds = results.map(h => h.id);
321
+
322
+ const areAllPageRowsExpanded =
323
+ pageHostIds.length > 0 &&
324
+ pageHostIds.every(hostId => expandedHost.includes(hostId));
325
+
326
+ const onExpandAll = () => {
327
+ setExpandedHost(() => {
328
+ if (areAllPageRowsExpanded) {
329
+ return [];
330
+ }
331
+
332
+ return pageHostIds;
333
+ });
334
+ };
335
+
314
336
  return (
315
337
  <>
316
338
  {showAlert && <PopupAlert setShowAlert={setShowAlert} />}
@@ -342,6 +364,8 @@ const JobInvocationHostTable = ({
342
364
  <Table
343
365
  ouiaId="job-invocation-hosts-table"
344
366
  columns={columns}
367
+ areAllRowsExpanded={!areAllPageRowsExpanded}
368
+ onExpandAll={onExpandAll}
345
369
  customEmptyState={
346
370
  status === STATUS_UPPERCASE.RESOLVED && !results.length
347
371
  ? customEmptyState
@@ -370,14 +394,14 @@ const JobInvocationHostTable = ({
370
394
  childrenOutsideTbody
371
395
  >
372
396
  {results.map((result, rowIndex) => (
373
- <Tbody key={result.id}>
397
+ <Tbody key={result.id} isExpanded={isHostExpanded(result)}>
374
398
  <Tr ouiaId={`table-row-${result.id}`}>
375
399
  <Td
376
400
  expand={{
377
401
  rowIndex,
378
- isExpanded: isHostExpanded(result.id),
402
+ isExpanded: isHostExpanded(result),
379
403
  onToggle: () =>
380
- setHostExpanded(result.id, !isHostExpanded(result.id)),
404
+ setHostExpanded(result, !isHostExpanded(result)),
381
405
  expandId: 'host-expandable',
382
406
  }}
383
407
  />
@@ -390,7 +414,7 @@ const JobInvocationHostTable = ({
390
414
  </Td>
391
415
  </Tr>
392
416
  <Tr
393
- isExpanded={isHostExpanded(result.id)}
417
+ isExpanded={isHostExpanded(result)}
394
418
  ouiaId="table-row-expanded-sections"
395
419
  >
396
420
  <Td
@@ -409,7 +433,7 @@ const JobInvocationHostTable = ({
409
433
  hostID={result.id}
410
434
  jobID={id}
411
435
  isInTableView
412
- isExpanded={isHostExpanded(result.id)}
436
+ isExpanded={isHostExpanded(result)}
413
437
  />
414
438
  )}
415
439
  </ExpandableRowContent>
@@ -76,6 +76,12 @@ const JobInvocationSystemStatusChart = ({
76
76
  }
77
77
  };
78
78
 
79
+ const onEmptyChartClick = () => {
80
+ if (onFilterChange) {
81
+ onFilterChange(STATUS_TITLES.NOT_STARTED.id);
82
+ }
83
+ };
84
+
79
85
  return (
80
86
  <>
81
87
  <FlexItem className="chart-donut">
@@ -94,7 +100,7 @@ const JobInvocationSystemStatusChart = ({
94
100
  {
95
101
  target: 'data',
96
102
  eventHandlers: {
97
- onClick: onChartClick,
103
+ onClick: total > 0 ? onChartClick : onEmptyChartClick,
98
104
  },
99
105
  },
100
106
  ]}
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_remote_execution
3
3
  version: !ruby/object:Gem::Version
4
- version: 16.2.2
4
+ version: 16.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Foreman Remote Execution team
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-10-07 00:00:00.000000000 Z
10
+ date: 2025-10-29 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: deface