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 release 1.0.0, Sync Test to Stage #417

Merged
merged 26 commits into from
Sep 16, 2020
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
7322940
fix(table,tableSkeleton): issues/10 align content prop to pf (#372)
cdcabrera Aug 10, 2020
d37ab77
fix(inventoryListSelectors): issues/10 itemCount, deep equals (#372)
cdcabrera Aug 10, 2020
5f1ca14
feat(inventoryList,views): issues/10 display inventory list (#372)
cdcabrera Aug 10, 2020
497771c
fix(graphCard,c3GraphCard): issues/10 align card component (#372)
cdcabrera Aug 11, 2020
a3bc804
fix(rhsmApiTypes): issues/380 api query types (#381)
cdcabrera Aug 20, 2020
10eea39
fix(apiQueries,reduxHelpers): issues/380 query schema (#381)
cdcabrera Aug 20, 2020
850eb65
fix(graphCard): issues/380 graph refresh on query (#384)
cdcabrera Aug 21, 2020
27182b4
feat(messageView): issues/320 app-level maintenance mode (#379)
zanewoodfin Aug 21, 2020
f3aee0e
fix(inventoryListSelectors): issues/10 last seen date context (#382)
cdcabrera Aug 21, 2020
12b4b25
fix(inventoryList): issues/10 missing platform component (#385)
cdcabrera Aug 21, 2020
c889548
fix(testing): platform component import exceptions (#386)
cdcabrera Aug 21, 2020
ef0333a
fix(graphCard,chartArea): issues/365 increase stroke width (#392)
zanewoodfin Aug 28, 2020
00c001b
fix(tableSkeleton): allow table with zero rows (#390)
cdcabrera Aug 25, 2020
65b65f0
feat(guestsList): issues/10 display infinite table listing (#390)
cdcabrera Aug 12, 2020
7000f43
fix(guestsList): issues/10 increase paging limit (#390)
cdcabrera Sep 2, 2020
f67c60c
style(pageLayout): issues/391 remove gray padding (#401)
zanewoodfin Sep 2, 2020
a8a580b
fix(pagination): issues/400 page reset on limit update (#405)
cdcabrera Sep 3, 2020
a3159d1
chore(rhsmServices): expand system inventory mock (#405)
cdcabrera Sep 3, 2020
713a55f
feat(authentication): issues/373 use platform not authorized (#402)
zanewoodfin Sep 3, 2020
3b7995a
fix(openshiftView): issues/383 apply uom query filter (#408)
cdcabrera Sep 3, 2020
e0517fa
fix(pagination,toolbar): issues/400 page reset filter update (#412)
cdcabrera Sep 8, 2020
77ec6bd
fix(guestsList): avoid boolean, remove nullish coalescing op (#413)
cdcabrera Sep 9, 2020
63a72f9
chore(build): expand changelog displayed commits (#415)
cdcabrera Sep 10, 2020
58c1fb9
fix(openshiftView,rhelView): issues/421 viewId to productLabel (#423)
cdcabrera Sep 15, 2020
b34870b
fix(inventoryList): issues/421 correct prop attr (#423)
cdcabrera Sep 14, 2020
fa546b3
fix(inventoryListSelectors): issues/421 combine query (#423)
cdcabrera Sep 14, 2020
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
18 changes: 15 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,12 @@
"!src/index.js",
"!src/setupTests.js",
"!src/components/app.js",
"!src/helpers/index.js",
"!src/common/index.js",
"!src/redux/index.js",
"!src/redux/store.js",
"!src/redux/middleware/**",
"!src/redux/actions/index.js",
"!src/redux/common/index.js",
"!src/redux/reducers/index.js",
"!src/redux/selectors/index.js"
],
Expand All @@ -48,7 +49,18 @@
"standard-version": {
"skip": {
"tag": true
}
},
"types": [{
"type": "feat", "section": "Features"
},{
"type": "fix", "section": "Bug Fixes"
},{
"type": "refactor", "section": "Code Refactoring"
},{
"type": "perf", "section": "Performance Improvements"
},{
"type": "style", "section": "Styles"
}]
},
"scripts": {
"api:dev": "mock -p 5000 -w ./src/services",
Expand Down Expand Up @@ -83,7 +95,7 @@
"@patternfly/react-styles": "4.5.0",
"@patternfly/react-table": "4.12.1",
"@patternfly/react-tokens": "4.6.0",
"@redhat-cloud-services/frontend-components": "2.3.11",
"@redhat-cloud-services/frontend-components": "2.3.13",
"@redhat-cloud-services/frontend-components-notifications": "2.1.1",
"@redhat-cloud-services/frontend-components-utilities": "2.1.0",
"axios": "^0.19.2",
Expand Down
18 changes: 15 additions & 3 deletions public/locales/en-US.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"curiosity-auth": {
"pending": "Authenticating...",
"authorizedTitle": "You do not have access to {{appName}}.",
"authorizedCopy": "Contact your organization administrator for more information."
"maintenanceCopy": "We are currently undergoing scheduled maintenance and will be back shortly. Thank you for your patience."
},
"curiosity-graph": {
"cardHeading": "CPU usage",
Expand Down Expand Up @@ -42,11 +41,22 @@
"tooltipSummary": "Your subscription data facets. With one level of column and row headers."
},
"curiosity-inventory": {
"cardHeading": "Current systems",
"tableAriaLabel": "{{appName}} systems inventory table.",
"tableSummary": "A generated table with one level of column headers.",
"tableEmptyInventoryTitle": "No results found",
"tableEmptyInventoryMessage": "No results match the filter criteria. Remove filters or clear all filters to show results.",
"tableSkeletonAriaLabel": "Loading"
"tableSkeletonAriaLabel": "Loading",
"hardwareType_hypervisor": "Hypervisor",
"hardwareType_physical": "Physical",
"hardwareType_virtual": "Virtual",
"header": "{{context}}",
"header_cores": "Cores",
"header_displayName": "Name",
"header_hardwareType": "Infrastructure",
"header_inventoryId": "UUID",
"header_sockets": "Sockets",
"header_lastSeen": "Last seen"
},
"curiosity-toolbar": {
"category": "Filter by",
Expand All @@ -59,6 +69,8 @@
"slaPremium": "Premium",
"slaSelfSupport": "Self-Support",
"slaStandard": "Standard",
"uom_cores": "Cores",
"uom_sockets": "Sockets",
"usageDevelopment": "Development/Test",
"usageDisaster": "Disaster Recovery",
"usageProduction": "Production",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ exports[`Authentication Component should render a non-connected component error:
t={[Function]}
>
<MessageView
icon={[Function]}
message="t(curiosity-auth.authorizedCopy, ...)"
icon={null}
message={null}
pageTitle={null}
title="t(curiosity-auth.authorizedTitle, [object Object])"
title={null}
>
<PageLayout>
<PageHeader
Expand Down Expand Up @@ -100,73 +100,113 @@ exports[`Authentication Component should render a non-connected component error:
</PageHeader>
<PageSection
className="curiosity"
padding={
Object {
"default": "noPadding",
}
}
>
<section
className="pf-c-page__main-section curiosity"
className="pf-c-page__main-section pf-m-no-padding curiosity"
>
<EmptyState
className="fadein"
<PageSection
key=".1"
variant="full"
>
<div
className="pf-c-empty-state fadein"
>
<div
className="pf-c-empty-state__content"
<Section>
<section
className=""
>
<EmptyStateIcon
icon={[Function]}

<NotAuthorized
serviceName="Subscription Watch"
>
<LockIcon
aria-hidden="true"
className="pf-c-empty-state__icon"
color="currentColor"
noVerticalAlign={false}
size="sm"
<EmptyState
className="ins-c-not-authorized"
variant="full"
>
<svg
aria-hidden="true"
aria-labelledby={null}
className="pf-c-empty-state__icon"
fill="currentColor"
height="1em"
role="img"
style={
Object {
"verticalAlign": "-0.125em",
}
}
viewBox="0 0 448 512"
width="1em"
<div
className="pf-c-empty-state ins-c-not-authorized"
>
<path
d="M400 224h-24v-72C376 68.2 307.8 0 224 0S72 68.2 72 152v72H48c-26.5 0-48 21.5-48 48v192c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V272c0-26.5-21.5-48-48-48zm-104 0H152v-72c0-39.7 32.3-72 72-72s72 32.3 72 72v72z"
transform=""
/>
</svg>
</LockIcon>
</EmptyStateIcon>
<Title
headingLevel="h2"
size="lg"
>
<h2
className="pf-c-title pf-m-lg"
>
t(curiosity-auth.authorizedTitle, [object Object])
</h2>
</Title>
<EmptyStateBody>
<div
className="pf-c-empty-state__body"
>
t(curiosity-auth.authorizedCopy, ...)
</div>
</EmptyStateBody>
</div>
</div>
</EmptyState>
<div
className="pf-c-empty-state__content"
>
<EmptyStateIcon
icon={[Function]}
>
<LockIcon
aria-hidden="true"
className="pf-c-empty-state__icon"
color="currentColor"
noVerticalAlign={false}
size="sm"
>
<svg
aria-hidden="true"
aria-labelledby={null}
className="pf-c-empty-state__icon"
fill="currentColor"
height="1em"
role="img"
style={
Object {
"verticalAlign": "-0.125em",
}
}
viewBox="0 0 448 512"
width="1em"
>
<path
d="M400 224h-24v-72C376 68.2 307.8 0 224 0S72 68.2 72 152v72H48c-26.5 0-48 21.5-48 48v192c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V272c0-26.5-21.5-48-48-48zm-104 0H152v-72c0-39.7 32.3-72 72-72s72 32.3 72 72v72z"
transform=""
/>
</svg>
</LockIcon>
</EmptyStateIcon>
<Title
headingLevel="h5"
size="lg"
>
<h5
className="pf-c-title pf-m-lg"
>
You do not have access to
Subscription Watch
</h5>
</Title>
<EmptyStateBody>
<div
className="pf-c-empty-state__body"
>
Contact your organization administrator(s) for more information.
</div>
</EmptyStateBody>
<Button
component="a"
href="."
variant="primary"
>
<a
aria-disabled={false}
aria-label={null}
className="pf-c-button pf-m-primary"
data-ouia-component-id={0}
data-ouia-component-type="PF4/Button"
data-ouia-safe={true}
disabled={null}
href="."
type={null}
>
Go to landing page
</a>
</Button>
</div>
</div>
</EmptyState>
</NotAuthorized>

</section>
</Section>
</PageSection>
</section>
</PageSection>
</PageLayout>
Expand All @@ -185,22 +225,30 @@ exports[`Authentication Component should render a non-connected component pendin

exports[`Authentication Component should return a message on 401 error: 401 error 1`] = `
<MessageView
icon={[Function]}
message="t(curiosity-auth.authorizedCopy, ...)"
icon={null}
message={null}
pageTitle={null}
title="t(curiosity-auth.authorizedTitle, [object Object])"
/>
title={null}
>
<NotAuthorized
serviceName="Subscription Watch"
/>
</MessageView>
`;

exports[`Authentication Component should return a redirect on 418 error: 418 error 1`] = `"418 redirect"`;

exports[`Authentication Component should return a redirect on a specific 403 error and error code: 403 error 1`] = `
<MessageView
icon={[Function]}
message="t(curiosity-auth.authorizedCopy, ...)"
icon={null}
message={null}
pageTitle={null}
title="t(curiosity-auth.authorizedTitle, [object Object])"
/>
title={null}
>
<NotAuthorized
serviceName="Subscription Watch"
/>
</MessageView>
`;

exports[`Authentication Component should return a redirect on a specific 403 error and error code: 403 redirect error 1`] = `"403 redirect"`;
20 changes: 14 additions & 6 deletions src/components/authentication/authentication.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import { BinocularsIcon, LockIcon } from '@patternfly/react-icons';
import { BinocularsIcon } from '@patternfly/react-icons';
import { Maintenance } from '@redhat-cloud-services/frontend-components/components/cjs/Maintenance';
import { NotAuthorized } from '@redhat-cloud-services/frontend-components/components/cjs/NotAuthorized';
import { connectRouter, reduxActions, reduxSelectors } from '../../redux';
import { rhsmApiTypes } from '../../types';
import { helpers } from '../../common';
Expand Down Expand Up @@ -52,6 +54,14 @@ class Authentication extends Component {
render() {
const { children, session, t } = this.props;

if (helpers.UI_DISABLED) {
return (
<MessageView>
<Maintenance description={t('curiosity-auth.maintenanceCopy', '...')} />
</MessageView>
);
}

if (session.authorized) {
return <React.Fragment>{children}</React.Fragment>;
}
Expand All @@ -71,11 +81,9 @@ class Authentication extends Component {
}

return (
<MessageView
title={t('curiosity-auth.authorizedTitle', { appName: helpers.UI_DISPLAY_NAME })}
message={t('curiosity-auth.authorizedCopy', '...')}
icon={LockIcon}
/>
<MessageView>
<NotAuthorized serviceName={helpers.UI_DISPLAY_NAME} />
</MessageView>
);
}
}
Expand Down
Loading