-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathglobal_index.js
More file actions
76 lines (66 loc) · 2.26 KB
/
Copy pathglobal_index.js
File metadata and controls
76 lines (66 loc) · 2.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
import React from 'react';
import { addGlobalFill } from 'foremanReact/components/common/Fill/GlobalFill';
import { registerReducer } from 'foremanReact/common/MountingService';
import { registerColumns } from 'foremanReact/components/HostsIndex/Columns/core';
import { translate as __ } from 'foremanReact/common/I18n';
import reducers from './src/reducers';
import { registerFills } from './src/Extends/Fills';
import { registerLegacy } from './legacy';
import HostsIndexActionsBar from './src/Extends/Hosts/ActionsBar';
import BulkChangePuppetProxy from './src/Extends/Hosts/BulkActions/BulkChangePuppetProxy';
import BulkChangePuppetCAProxy from './src/Extends/Hosts/BulkActions/BulkChangePuppetCAProxy';
import BulkRemovePuppetProxy from './src/Extends/Hosts/BulkActions/BulkRemovePuppetProxy';
import BulkRemovePuppetCAProxy from './src/Extends/Hosts/BulkActions/BulkRemovePuppetCAProxy';
const GLOBAL_FILL_PRIORITY = 100;
// register reducers
registerReducer('puppet', reducers);
// add fills
registerFills();
// TODO: the checkForUnavailablePuppetclasses is very nasty
registerLegacy();
// register columns for React hosts index page
const puppetHostsIndexColumns = [
{
columnName: 'environment',
title: __('Puppet env'),
isSorted: true,
wrapper: hostDetails => hostDetails.environment_name,
weight: 2700,
},
];
puppetHostsIndexColumns.forEach(column => {
column.tableName = 'hosts';
column.categoryName = 'Puppet';
column.categoryKey = 'puppet';
});
addGlobalFill(
'hosts-index-kebab',
'puppet-hosts-index-kebab',
<HostsIndexActionsBar key="puppet-hosts-index-kebab" />,
GLOBAL_FILL_PRIORITY
);
addGlobalFill(
'_all-hosts-modals',
'BulkChangePuppetProxy',
<BulkChangePuppetProxy key="bulk-change-puppet-proxy" />,
GLOBAL_FILL_PRIORITY
);
addGlobalFill(
'_all-hosts-modals',
'BulkChangePuppetCAProxy',
<BulkChangePuppetCAProxy key="bulk-change-puppet-ca-proxy" />,
GLOBAL_FILL_PRIORITY
);
addGlobalFill(
'_all-hosts-modals',
'BulkRemovePuppetCAProxy',
<BulkRemovePuppetCAProxy key="bulk-remove-puppet-ca-proxy" />,
GLOBAL_FILL_PRIORITY
);
addGlobalFill(
'_all-hosts-modals',
'BulkRemovePuppetProxy',
<BulkRemovePuppetProxy key="bulk-remove-puppet-proxy" />,
GLOBAL_FILL_PRIORITY
);
registerColumns(puppetHostsIndexColumns);