diff --git a/client/app/scripts/actions/app-actions.js b/client/app/scripts/actions/app-actions.js index 1e06472d77..9c823b70fa 100644 --- a/client/app/scripts/actions/app-actions.js +++ b/client/app/scripts/actions/app-actions.js @@ -869,3 +869,10 @@ export function getImagesForService(orgId, serviceId) { }); }; } + +export function setMonitorState(monitor) { + return { + type: ActionTypes.MONITOR_STATE, + monitor + }; +} diff --git a/client/app/scripts/components/app.js b/client/app/scripts/components/app.js index 20826a6e9c..e48c6c368b 100644 --- a/client/app/scripts/components/app.js +++ b/client/app/scripts/components/app.js @@ -28,6 +28,7 @@ import { unpinMetric, toggleHelp, setGraphView, + setMonitorState, setTableView, setResourceView, shutdown, @@ -63,6 +64,8 @@ class App extends React.Component { constructor(props, context) { super(props, context); + this.props.dispatch(setMonitorState(this.props.monitor)); + this.setViewportDimensions = this.setViewportDimensions.bind(this); this.handleResize = debounce(this.setViewportDimensions, VIEWPORT_RESIZE_DEBOUNCE_INTERVAL); @@ -257,4 +260,8 @@ function mapStateToProps(state) { }; } +App.defaultProps = { + monitor: false +}; + export default connect(mapStateToProps)(App); diff --git a/client/app/scripts/components/node-details/node-details-health-link-item.js b/client/app/scripts/components/node-details/node-details-health-link-item.js index e0c45b47a1..696d26bc50 100644 --- a/client/app/scripts/components/node-details/node-details-health-link-item.js +++ b/client/app/scripts/components/node-details/node-details-health-link-item.js @@ -65,12 +65,12 @@ class NodeDetailsHealthLinkItem extends React.Component { render() { const { - id, url, pausedAt, ...props + id, url, monitor, pausedAt, ...props } = this.props; const metricColor = getMetricColor(id); const labelColor = this.state.hovered && !props.valueEmpty && darkenColor(metricColor); - const timedUrl = appendTime(url, pausedAt); + const timedUrl = monitor === true ? appendTime(url, pausedAt) : ''; return (