Skip to content
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

DRAFT: feat(RHINENG-2085): Detect when user has not access to all hosts #1982

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions src/PresentationalComponents/PoliciesTable/Columns.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import React from 'react';
import React, { Fragment } from 'react';
import propTypes from 'prop-types';
import { TextContent } from '@patternfly/react-core';
import { TextContent, Tooltip } from '@patternfly/react-core';
import { fitContent } from '@patternfly/react-table';
import { LinkWithPermission as Link } from 'PresentationalComponents';
import { GreySmallText, SystemsCountWarning } from 'PresentationalComponents';
import { renderComponent } from 'Utilities/helpers';
import { OutlinedQuestionCircleIcon } from '@patternfly/react-icons';

const PolicyNameCell = ({ id, policy, policyType }) => (
<TextContent>
Expand Down Expand Up @@ -48,7 +49,21 @@ export const OperatingSystem = {
};

export const Systems = {
title: 'Systems',
title: (
<Tooltip
position="top"
content={
<Fragment>
This count only reflects the systems you have permission to access.
</Fragment>
}
>
<span className="pf-c-table__text">
Systems &nbsp;
<OutlinedQuestionCircleIcon className="grey-icon" />
</span>
</Tooltip>
),
props: {
width: 15,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,7 @@ exports[`PoliciesTable expect to render without error 1`] = `
"policyType": "United States Government Standard",
"refId": "xccdf_org.ssgproject.content_profile_ospp23",
"testResultHostCount": 8,
"totalHostCount": 10,
"totalHostCount": 1,
},
{
"__typename": "Profile",
Expand Down Expand Up @@ -1013,7 +1013,7 @@ exports[`PoliciesTable expect to render without error 1`] = `
"policyType": "PCI-DSS v3 Control Baseline for Red Hat Enterprise Linux 73",
"refId": "xccdf_org.ssgproject.content_profile_pci-dss3",
"testResultHostCount": 8,
"totalHostCount": 10,
"totalHostCount": 1,
},
{
"__typename": "Profile",
Expand All @@ -1039,7 +1039,7 @@ exports[`PoliciesTable expect to render without error 1`] = `
"policyType": "United States Government Configuration Baseline2",
"refId": "xccdf_org.ssgproject.content_profile_ospp2",
"testResultHostCount": 8,
"totalHostCount": 10,
"totalHostCount": 1,
},
{
"__typename": "Profile",
Expand All @@ -1065,7 +1065,7 @@ exports[`PoliciesTable expect to render without error 1`] = `
"policyType": "C2S for Red Hat Enterprise Linux 7",
"refId": "xccdf_org.ssgproject.content_profile_C2S",
"testResultHostCount": 8,
"totalHostCount": 10,
"totalHostCount": 1,
},
{
"__typename": "Profile",
Expand All @@ -1091,7 +1091,7 @@ exports[`PoliciesTable expect to render without error 1`] = `
"policyType": "Criminal Justice Information Services (CJIS) Security Policy",
"refId": "xccdf_org.ssgproject.content_profile_cjis",
"testResultHostCount": 8,
"totalHostCount": 10,
"totalHostCount": 1,
},
{
"__typename": "Profile",
Expand All @@ -1117,7 +1117,7 @@ exports[`PoliciesTable expect to render without error 1`] = `
"policyType": "Unclassified Information in Non-federal Information Systems and Organizations (NIST 800-171)",
"refId": "xccdf_org.ssgproject.content_profile_nist-800-171-cui",
"testResultHostCount": 8,
"totalHostCount": 10,
"totalHostCount": 1,
},
{
"__typename": "Profile",
Expand All @@ -1143,7 +1143,7 @@ exports[`PoliciesTable expect to render without error 1`] = `
"policyType": "PCI-DSS v3 Control Baseline for Red Hat Enterprise Linux 7",
"refId": "xccdf_org.ssgproject.content_profile_pci-dss",
"testResultHostCount": 8,
"totalHostCount": 10,
"totalHostCount": 1,
},
{
"__typename": "Profile",
Expand All @@ -1169,7 +1169,7 @@ exports[`PoliciesTable expect to render without error 1`] = `
"policyType": "Red Hat Corporate Profile for Certified Cloud Providers (RH CCP)",
"refId": "xccdf_org.ssgproject.content_profile_rht-ccp",
"testResultHostCount": 8,
"totalHostCount": 10,
"totalHostCount": 1,
},
{
"__typename": "Profile",
Expand All @@ -1195,7 +1195,7 @@ exports[`PoliciesTable expect to render without error 1`] = `
"policyType": "Health Insurance Portability and Accountability Act (HIPAA)",
"refId": "xccdf_org.ssgproject.content_profile_hipaa",
"testResultHostCount": 8,
"totalHostCount": 10,
"totalHostCount": 1,
},
{
"__typename": "Profile",
Expand All @@ -1221,7 +1221,7 @@ exports[`PoliciesTable expect to render without error 1`] = `
"policyType": "United States Government Configuration Baseline",
"refId": "xccdf_org.ssgproject.content_profile_ospp",
"testResultHostCount": 8,
"totalHostCount": 10,
"totalHostCount": 1,
},
{
"__typename": "Profile",
Expand All @@ -1247,7 +1247,7 @@ exports[`PoliciesTable expect to render without error 1`] = `
"policyType": "Standard System Security Profile for Red Hat Enterprise Linux 7",
"refId": "xccdf_org.ssgproject.content_profile_standard",
"testResultHostCount": 8,
"totalHostCount": 10,
"totalHostCount": 1,
},
{
"__typename": "Profile",
Expand All @@ -1273,7 +1273,7 @@ exports[`PoliciesTable expect to render without error 1`] = `
"policyType": "DISA STIG for Red Hat Enterprise Linux 7",
"refId": "xccdf_org.ssgproject.content_profile_stig-rhel7-disa",
"testResultHostCount": 8,
"totalHostCount": 10,
"totalHostCount": 1,
},
{
"__typename": "Profile",
Expand All @@ -1299,7 +1299,7 @@ exports[`PoliciesTable expect to render without error 1`] = `
"policyType": "PCI-DSS v3 Control Baseline for Red Hat Enterprise Linux 72",
"refId": "xccdf_org.ssgproject.content_profile_pci-dss2",
"testResultHostCount": 8,
"totalHostCount": 10,
"totalHostCount": 1,
},
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ exports[`ReportDetailsDescription expect to render without error 1`] = `
"policyType": "United States Government Standard",
"refId": "xccdf_org.ssgproject.content_profile_ospp23",
"testResultHostCount": 8,
"totalHostCount": 10,
"totalHostCount": 1,
}
}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ exports[`operatingSystemFilter expect to return results 1`] = `
"policyType": "United States Government Standard",
"refId": "xccdf_org.ssgproject.content_profile_ospp23",
"testResultHostCount": 8,
"totalHostCount": 10,
"totalHostCount": 1,
},
{
"__typename": "Profile",
Expand Down Expand Up @@ -194,7 +194,7 @@ exports[`operatingSystemFilter expect to return results 1`] = `
"policyType": "PCI-DSS v3 Control Baseline for Red Hat Enterprise Linux 73",
"refId": "xccdf_org.ssgproject.content_profile_pci-dss3",
"testResultHostCount": 8,
"totalHostCount": 10,
"totalHostCount": 1,
},
{
"__typename": "Profile",
Expand All @@ -220,7 +220,7 @@ exports[`operatingSystemFilter expect to return results 1`] = `
"policyType": "United States Government Configuration Baseline2",
"refId": "xccdf_org.ssgproject.content_profile_ospp2",
"testResultHostCount": 8,
"totalHostCount": 10,
"totalHostCount": 1,
},
{
"__typename": "Profile",
Expand All @@ -246,7 +246,7 @@ exports[`operatingSystemFilter expect to return results 1`] = `
"policyType": "C2S for Red Hat Enterprise Linux 7",
"refId": "xccdf_org.ssgproject.content_profile_C2S",
"testResultHostCount": 8,
"totalHostCount": 10,
"totalHostCount": 1,
},
{
"__typename": "Profile",
Expand All @@ -272,7 +272,7 @@ exports[`operatingSystemFilter expect to return results 1`] = `
"policyType": "Criminal Justice Information Services (CJIS) Security Policy",
"refId": "xccdf_org.ssgproject.content_profile_cjis",
"testResultHostCount": 8,
"totalHostCount": 10,
"totalHostCount": 1,
},
{
"__typename": "Profile",
Expand All @@ -298,7 +298,7 @@ exports[`operatingSystemFilter expect to return results 1`] = `
"policyType": "Unclassified Information in Non-federal Information Systems and Organizations (NIST 800-171)",
"refId": "xccdf_org.ssgproject.content_profile_nist-800-171-cui",
"testResultHostCount": 8,
"totalHostCount": 10,
"totalHostCount": 1,
},
{
"__typename": "Profile",
Expand All @@ -324,7 +324,7 @@ exports[`operatingSystemFilter expect to return results 1`] = `
"policyType": "PCI-DSS v3 Control Baseline for Red Hat Enterprise Linux 7",
"refId": "xccdf_org.ssgproject.content_profile_pci-dss",
"testResultHostCount": 8,
"totalHostCount": 10,
"totalHostCount": 1,
},
{
"__typename": "Profile",
Expand All @@ -350,7 +350,7 @@ exports[`operatingSystemFilter expect to return results 1`] = `
"policyType": "Red Hat Corporate Profile for Certified Cloud Providers (RH CCP)",
"refId": "xccdf_org.ssgproject.content_profile_rht-ccp",
"testResultHostCount": 8,
"totalHostCount": 10,
"totalHostCount": 1,
},
{
"__typename": "Profile",
Expand All @@ -376,7 +376,7 @@ exports[`operatingSystemFilter expect to return results 1`] = `
"policyType": "Health Insurance Portability and Accountability Act (HIPAA)",
"refId": "xccdf_org.ssgproject.content_profile_hipaa",
"testResultHostCount": 8,
"totalHostCount": 10,
"totalHostCount": 1,
},
{
"__typename": "Profile",
Expand All @@ -402,7 +402,7 @@ exports[`operatingSystemFilter expect to return results 1`] = `
"policyType": "United States Government Configuration Baseline",
"refId": "xccdf_org.ssgproject.content_profile_ospp",
"testResultHostCount": 8,
"totalHostCount": 10,
"totalHostCount": 1,
},
{
"__typename": "Profile",
Expand All @@ -428,7 +428,7 @@ exports[`operatingSystemFilter expect to return results 1`] = `
"policyType": "Standard System Security Profile for Red Hat Enterprise Linux 7",
"refId": "xccdf_org.ssgproject.content_profile_standard",
"testResultHostCount": 8,
"totalHostCount": 10,
"totalHostCount": 1,
},
{
"__typename": "Profile",
Expand All @@ -454,7 +454,7 @@ exports[`operatingSystemFilter expect to return results 1`] = `
"policyType": "DISA STIG for Red Hat Enterprise Linux 7",
"refId": "xccdf_org.ssgproject.content_profile_stig-rhel7-disa",
"testResultHostCount": 8,
"totalHostCount": 10,
"totalHostCount": 1,
},
{
"__typename": "Profile",
Expand All @@ -480,7 +480,7 @@ exports[`operatingSystemFilter expect to return results 1`] = `
"policyType": "PCI-DSS v3 Control Baseline for Red Hat Enterprise Linux 72",
"refId": "xccdf_org.ssgproject.content_profile_pci-dss2",
"testResultHostCount": 8,
"totalHostCount": 10,
"totalHostCount": 1,
},
]
`;
Expand Down Expand Up @@ -513,7 +513,7 @@ exports[`policyNameFilter expect to return results 1`] = `
"policyType": "Unclassified Information in Non-federal Information Systems and Organizations (NIST 800-171)",
"refId": "xccdf_org.ssgproject.content_profile_nist-800-171-cui",
"testResultHostCount": 8,
"totalHostCount": 10,
"totalHostCount": 1,
},
]
`;
Expand Down
Loading