({
appStateReducers: state => state,
}));
+jest.mock(
+ '../../../../../../node_modules/@elastic/eui/lib/services/accessibility/html_id_generator',
+ () => ({
+ htmlIdGenerator: () => () => 'htmlId',
+ }),
+);
+
const permissionsStore = {
appStateReducers: {
userAccount: {
@@ -343,31 +350,6 @@ describe('AgentsTable component', () => {
,
);
- // Set table id to avoid snapshot changes
- const tableId = '__table_d203a723-1198-11ee-ab9b-75fc624fc672';
- wrapper.find('table')[0]['attribs']['id'] = tableId;
-
- // Set switch id to avoid snapshot changes
- const switchButtonId =
- '_show_outdated_switch_button_ic14ef503-e547-11ee-ac6e-71376e7e3fc5';
- wrapper.find('.euiSwitch__button')[0]['attribs']['aria-labelledby'] =
- switchButtonId;
- wrapper.find('.euiSwitch__button')[0]['attribs']['id'] = switchButtonId;
- const switchLabelId =
- '_show_outdated_switch_button_ic14ef503-e547-11ee-ac6e-71376e7e3fc5';
- wrapper.find('.euiSwitch__label')[0]['attribs']['id'] = switchLabelId;
-
- // Set select all checkbox id to avoid snapshot changes
- const checkBoxSelectId =
- '_selection_column-checkbox_i6bf14741-d0fa-11ee-81c4-29d002524ab5';
-
- //Mobile
- wrapper.find('.euiCheckbox__input')[0]['attribs']['id'] = checkBoxSelectId;
- wrapper.find('.euiCheckbox__label')[0]['attribs']['for'] = checkBoxSelectId;
-
- //Desktop
- wrapper.find('.euiCheckbox__input')[1]['attribs']['id'] = checkBoxSelectId;
-
expect(wrapper).toMatchSnapshot();
expect(
window.localStorage.getItem('wz-agents-overview-table-visible-fields'),
@@ -386,31 +368,6 @@ describe('AgentsTable component', () => {
,
);
- // Set table id to avoid snapshot changes
- const tableId = '__table_d203a723-1198-11ee-ab9b-75fc624fc672';
- wrapper.find('table')[0]['attribs']['id'] = tableId;
-
- // Set switch id to avoid snapshot changes
- const switchButtonId =
- '_show_outdated_switch_button_ic14ef503-e547-11ee-ac6e-71376e7e3fc5';
- wrapper.find('.euiSwitch__button')[0]['attribs']['aria-labelledby'] =
- switchButtonId;
- wrapper.find('.euiSwitch__button')[0]['attribs']['id'] = switchButtonId;
- const switchLabelId =
- '_show_outdated_switch_button_ic14ef503-e547-11ee-ac6e-71376e7e3fc5';
- wrapper.find('.euiSwitch__label')[0]['attribs']['id'] = switchLabelId;
-
- // Set select all checkbox id to avoid snapshot changes
- const checkBoxSelectId =
- '_selection_column-checkbox_i6bf14741-d0fa-11ee-81c4-29d002524ab5';
-
- //Mobile
- wrapper.find('.euiCheckbox__input')[0]['attribs']['id'] = checkBoxSelectId;
- wrapper.find('.euiCheckbox__label')[0]['attribs']['for'] = checkBoxSelectId;
-
- //Desktop
- wrapper.find('.euiCheckbox__input')[1]['attribs']['id'] = checkBoxSelectId;
-
expect(wrapper).toMatchSnapshot();
expect(
window.localStorage.getItem('wz-agents-overview-table-visible-fields'),
@@ -433,31 +390,6 @@ describe('AgentsTable component', () => {
,
);
- // Set table id to avoid snapshot changes
- const tableId = '__table_d203a723-1198-11ee-ab9b-75fc624fc672';
- wrapper.find('table')[0]['attribs']['id'] = tableId;
-
- // Set switch id to avoid snapshot changes
- const switchButtonId =
- '_show_outdated_switch_button_ic14ef503-e547-11ee-ac6e-71376e7e3fc5';
- wrapper.find('.euiSwitch__button')[0]['attribs']['aria-labelledby'] =
- switchButtonId;
- wrapper.find('.euiSwitch__button')[0]['attribs']['id'] = switchButtonId;
- const switchLabelId =
- '_show_outdated_switch_button_ic14ef503-e547-11ee-ac6e-71376e7e3fc5';
- wrapper.find('.euiSwitch__label')[0]['attribs']['id'] = switchLabelId;
-
- // Set select all checkbox id to avoid snapshot changes
- const checkBoxSelectId =
- '_selection_column-checkbox_i6bf14741-d0fa-11ee-81c4-29d002524ab5';
-
- //Mobile
- wrapper.find('.euiCheckbox__input')[0]['attribs']['id'] = checkBoxSelectId;
- wrapper.find('.euiCheckbox__label')[0]['attribs']['for'] = checkBoxSelectId;
-
- //Desktop
- wrapper.find('.euiCheckbox__input')[1]['attribs']['id'] = checkBoxSelectId;
-
expect(wrapper).toMatchSnapshot();
expect(
window.localStorage.getItem('wz-agents-overview-table-visible-fields'),
diff --git a/plugins/main/public/components/endpoints-summary/table/agents-table.tsx b/plugins/main/public/components/endpoints-summary/table/agents-table.tsx
index 16c4fa7325..1ccae446ce 100644
--- a/plugins/main/public/components/endpoints-summary/table/agents-table.tsx
+++ b/plugins/main/public/components/endpoints-summary/table/agents-table.tsx
@@ -19,6 +19,7 @@ import {
EuiCallOut,
EuiButton,
EuiSwitch,
+ EuiToolTip,
} from '@elastic/eui';
import { WzButtonPermissions } from '../../common/permissions/button';
import { withErrorBoundary } from '../../common/hocs';
@@ -211,6 +212,15 @@ export const AgentsTable = compose(
? agentList.totalItems
: selectedItems.length;
+ const switchShowOnlyOutdated = (
+
props.setShowOnlyOutdated(!props.showOnlyOutdated)}
+ />
+ );
+
const selectedtemsRenderer = (
{selectedItems.length ? (
@@ -241,12 +251,13 @@ export const AgentsTable = compose(
) : null}
- props.setShowOnlyOutdated(!props.showOnlyOutdated)}
- />
+ {props.totalOutdated ? (
+ switchShowOnlyOutdated
+ ) : (
+
+ {switchShowOnlyOutdated}
+
+ )}
);
diff --git a/plugins/main/public/components/endpoints-summary/table/upgrade-task-details-modal.tsx b/plugins/main/public/components/endpoints-summary/table/upgrade-task-details-modal.tsx
index 46cab13394..63f16fd205 100644
--- a/plugins/main/public/components/endpoints-summary/table/upgrade-task-details-modal.tsx
+++ b/plugins/main/public/components/endpoints-summary/table/upgrade-task-details-modal.tsx
@@ -64,7 +64,17 @@ export const AgentUpgradesTaskDetailsModal = ({
},
{
field: 'create_time',
- name: 'Create',
+ name: (
+
+ Create{' '}
+
+
+ ),
width: '230px',
sortable: true,
searchable: false,
@@ -73,7 +83,17 @@ export const AgentUpgradesTaskDetailsModal = ({
},
{
field: 'last_update_time',
- name: 'Last update',
+ name: (
+
+ Last update{' '}
+
+
+ ),
width: '230px',
sortable: true,
searchable: false,
diff --git a/plugins/main/public/controllers/overview/components/overview-actions/agents-selection-table.js b/plugins/main/public/controllers/overview/components/overview-actions/agents-selection-table.js
index 083782f380..149eae7f1b 100644
--- a/plugins/main/public/controllers/overview/components/overview-actions/agents-selection-table.js
+++ b/plugins/main/public/controllers/overview/components/overview-actions/agents-selection-table.js
@@ -186,7 +186,7 @@ export class AgentSelectionTable extends Component {
{/* agent name (agent id) Unpin button right aligned, require justifyContent="flexEnd" in the EuiFlexGroup */}
-
+