-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(openShiftView,rhelView): issues/157 openshift routing
* routerTypes, apply openshift view, update route detail filter * router, expand passed values to getRouteDetail * rhelView, apply translation for titles * openshiftView, translation, mirror rhelView, filter core values * graphCard, prop for cardTitle * i18n, locale, heading, title strings
- Loading branch information
Showing
13 changed files
with
172 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { withTranslation } from 'react-i18next'; | ||
import { | ||
chart_color_blue_100 as chartColorBlueLight, | ||
chart_color_blue_300 as chartColorBlueDark | ||
} from '@patternfly/react-tokens'; | ||
import { PageHeader, PageHeaderTitle } from '@redhat-cloud-services/frontend-components'; | ||
import { PageSection } from '@patternfly/react-core'; | ||
import GraphCard from '../graphCard/graphCard'; | ||
import { helpers } from '../../common'; | ||
|
||
class OpenshiftView extends React.Component { | ||
componentDidMount() {} | ||
|
||
render() { | ||
const { routeDetail, t } = this.props; | ||
|
||
return ( | ||
<React.Fragment> | ||
<PageHeader> | ||
<PageHeaderTitle | ||
title={(routeDetail.routeItem && routeDetail.routeItem.title) || helpers.UI_DISPLAY_CONFIG_NAME} | ||
/> | ||
</PageHeader> | ||
<PageSection> | ||
<GraphCard | ||
key={routeDetail.pathParameter} | ||
filterGraphData={[ | ||
{ id: 'cores', fill: chartColorBlueLight.value, stroke: chartColorBlueDark.value }, | ||
{ id: 'threshold' } | ||
]} | ||
productId={routeDetail.pathParameter} | ||
cardTitle={t('curiosity-graph.coresHeading')} | ||
errorRoute={routeDetail.errorRoute} | ||
/> | ||
</PageSection> | ||
</React.Fragment> | ||
); | ||
} | ||
} | ||
|
||
OpenshiftView.propTypes = { | ||
routeDetail: PropTypes.shape({ | ||
pathParameter: PropTypes.string.isRequired, | ||
routeItem: PropTypes.shape({ | ||
title: PropTypes.string | ||
}), | ||
errorRoute: PropTypes.shape({ | ||
to: PropTypes.string | ||
}) | ||
}), | ||
t: PropTypes.func | ||
}; | ||
|
||
OpenshiftView.defaultProps = { | ||
routeDetail: {}, | ||
t: helpers.noopTranslate | ||
}; | ||
|
||
const TranslatedOpenshiftView = withTranslation()(OpenshiftView); | ||
|
||
export { TranslatedOpenshiftView as default, TranslatedOpenshiftView, OpenshiftView }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.