-
Notifications
You must be signed in to change notification settings - Fork 8.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SECURITY_SOLUTION] Task/hostname policy response ux updates #76444
Changes from all commits
7f68b1a
618ba53
16a6126
42c96a4
ae5788d
ca741f8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -72,6 +72,12 @@ export const patternsError = (state: Immutable<EndpointState>) => state.patterns | |
const detailsPolicyAppliedResponse = (state: Immutable<EndpointState>) => | ||
state.policyResponse && state.policyResponse.Endpoint.policy.applied; | ||
|
||
/** | ||
* Returns the policy response timestamp from the endpoint after a user modifies a policy. | ||
*/ | ||
export const policyResponseTimestamp = (state: Immutable<EndpointState>) => | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can you add a response type to this function? Looks like its either the value of |
||
state.policyResponse && state.policyResponse['@timestamp']; | ||
|
||
/** | ||
* Returns the response configurations from the endpoint after a user modifies a policy. | ||
*/ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -270,17 +270,20 @@ export const EndpointList = () => { | |
); | ||
const toRouteUrl = formatUrl(toRoutePath); | ||
return ( | ||
<EndpointListNavLink | ||
name={hostname} | ||
href={toRouteUrl} | ||
route={toRoutePath} | ||
dataTestSubj="hostnameCellLink" | ||
/> | ||
<EuiToolTip content={hostname} anchorClassName="eui-fullWidth"> | ||
<EndpointListNavLink | ||
name={hostname} | ||
href={toRouteUrl} | ||
route={toRoutePath} | ||
dataTestSubj="hostnameCellLink" | ||
/> | ||
</EuiToolTip> | ||
); | ||
}, | ||
}, | ||
{ | ||
field: 'host_status', | ||
width: '9%', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i'm guessing these hardcoded widths is to make sure the values truncate with ellipsis? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it's do restrict some columns that we can predict won't be very long such as the Statuses since they can only have a handful of values. this frees up room for longer columns like hostname, timestamp, etc |
||
name: i18n.translate('xpack.securitySolution.endpoint.list.hostStatus', { | ||
defaultMessage: 'Agent Status', | ||
}), | ||
|
@@ -303,27 +306,31 @@ export const EndpointList = () => { | |
}, | ||
{ | ||
field: 'metadata.Endpoint.policy.applied', | ||
width: '15%', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. +100 points for use of |
||
name: i18n.translate('xpack.securitySolution.endpoint.list.policy', { | ||
defaultMessage: 'Integration', | ||
defaultMessage: 'Integration Policy', | ||
}), | ||
truncateText: true, | ||
// eslint-disable-next-line react/display-name | ||
render: (policy: HostInfo['metadata']['Endpoint']['policy']['applied']) => { | ||
return ( | ||
<EndpointPolicyLink | ||
policyId={policy.id} | ||
className="eui-textTruncate" | ||
data-test-subj="policyNameCellLink" | ||
> | ||
{policy.name} | ||
</EndpointPolicyLink> | ||
<EuiToolTip content={policy.name} anchorClassName="eui-fullWidth"> | ||
<EndpointPolicyLink | ||
policyId={policy.id} | ||
className="eui-textTruncate" | ||
data-test-subj="policyNameCellLink" | ||
> | ||
{policy.name} | ||
</EndpointPolicyLink> | ||
</EuiToolTip> | ||
); | ||
}, | ||
}, | ||
{ | ||
field: 'metadata.Endpoint.policy.applied', | ||
width: '9%', | ||
name: i18n.translate('xpack.securitySolution.endpoint.list.policyStatus', { | ||
defaultMessage: 'Configuration Status', | ||
defaultMessage: 'Policy Status', | ||
}), | ||
render: (policy: HostInfo['metadata']['Endpoint']['policy']['applied'], item: HostInfo) => { | ||
const toRoutePath = getEndpointDetailsPath({ | ||
|
@@ -350,6 +357,7 @@ export const EndpointList = () => { | |
}, | ||
{ | ||
field: 'metadata.host.os.name', | ||
width: '10%', | ||
name: i18n.translate('xpack.securitySolution.endpoint.list.os', { | ||
defaultMessage: 'Operating System', | ||
}), | ||
|
@@ -375,6 +383,7 @@ export const EndpointList = () => { | |
}, | ||
{ | ||
field: 'metadata.agent.version', | ||
width: '5%', | ||
name: i18n.translate('xpack.securitySolution.endpoint.list.endpointVersion', { | ||
defaultMessage: 'Version', | ||
}), | ||
|
@@ -394,6 +403,7 @@ export const EndpointList = () => { | |
}, | ||
{ | ||
field: '', | ||
width: '5%', | ||
name: i18n.translate('xpack.securitySolution.endpoint.list.actions', { | ||
defaultMessage: 'Actions', | ||
}), | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is a new component under
.../public/common
, I would suggest adding some jsdocs hereAlso - wondering why this was needed -
<FormattedDate/>
(below) did not handle this use case?