From 06f6ae1550f878a2423975240824edde797c49c2 Mon Sep 17 00:00:00 2001 From: Andrew Couch Date: Thu, 15 Mar 2018 11:58:38 -0400 Subject: [PATCH] ui: rename customgraph to customChart Fixes: #23419 Release note: None --- pkg/ui/src/index.tsx | 4 ++-- .../customChart.styl} | 0 .../customMetric.tsx | 0 .../{customgraph => customChart}/index.tsx | 22 +++++++++---------- .../views/reports/containers/debug/index.tsx | 6 ++--- 5 files changed, 16 insertions(+), 16 deletions(-) rename pkg/ui/src/views/reports/containers/{customgraph/customgraph.styl => customChart/customChart.styl} (100%) rename pkg/ui/src/views/reports/containers/{customgraph => customChart}/customMetric.tsx (100%) rename pkg/ui/src/views/reports/containers/{customgraph => customChart}/index.tsx (93%) diff --git a/pkg/ui/src/index.tsx b/pkg/ui/src/index.tsx index 3dceb9fd0c3c..d58ecf9d7504 100644 --- a/pkg/ui/src/index.tsx +++ b/pkg/ui/src/index.tsx @@ -52,7 +52,7 @@ import Range from "src/views/reports/containers/range"; import CommandQueue from "src/views/reports/containers/commandQueue"; import Debug from "src/views/reports/containers/debug"; import ReduxDebug from "src/views/reports/containers/redux"; -import CustomGraph from "src/views/reports/containers/customgraph"; +import CustomChart from "src/views/reports/containers/customChart"; import NotFound from "src/views/app/components/NotFound"; import { alertDataSync } from "src/redux/alerts"; @@ -129,7 +129,7 @@ ReactDOM.render( - + diff --git a/pkg/ui/src/views/reports/containers/customgraph/customgraph.styl b/pkg/ui/src/views/reports/containers/customChart/customChart.styl similarity index 100% rename from pkg/ui/src/views/reports/containers/customgraph/customgraph.styl rename to pkg/ui/src/views/reports/containers/customChart/customChart.styl diff --git a/pkg/ui/src/views/reports/containers/customgraph/customMetric.tsx b/pkg/ui/src/views/reports/containers/customChart/customMetric.tsx similarity index 100% rename from pkg/ui/src/views/reports/containers/customgraph/customMetric.tsx rename to pkg/ui/src/views/reports/containers/customChart/customMetric.tsx diff --git a/pkg/ui/src/views/reports/containers/customgraph/index.tsx b/pkg/ui/src/views/reports/containers/customChart/index.tsx similarity index 93% rename from pkg/ui/src/views/reports/containers/customgraph/index.tsx rename to pkg/ui/src/views/reports/containers/customChart/index.tsx index 0af8e2a920d7..52d610c2fc01 100644 --- a/pkg/ui/src/views/reports/containers/customgraph/index.tsx +++ b/pkg/ui/src/views/reports/containers/customChart/index.tsx @@ -15,7 +15,7 @@ import { Metric, Axis, AxisUnits } from "src/views/shared/components/metricQuery import { PageConfig, PageConfigItem } from "src/views/shared/components/pageconfig"; import { CustomMetricState, CustomMetricRow } from "./customMetric"; -import "./customgraph.styl"; +import "./customChart.styl"; const axisUnitsOptions: DropdownOption[] = [ AxisUnits.Count, @@ -23,7 +23,7 @@ const axisUnitsOptions: DropdownOption[] = [ AxisUnits.Duration, ].map(au => ({ label: AxisUnits[au], value: au.toString() })); -export interface CustomGraphProps { +export interface CustomChartProps { refreshNodes: typeof refreshNodes; nodesQueryValid: boolean; nodesSummary: NodesSummary; @@ -34,7 +34,7 @@ interface UrlState { units: string; } -class CustomGraph extends React.Component { +class CustomChart extends React.Component { // Selector which computes dropdown options based on the nodes available on // the cluster. private nodeOptions = createSelector( @@ -79,7 +79,7 @@ class CustomGraph extends React.Component { ); static title() { - return "Custom Graph"; + return "Custom Chart"; } refresh(props = this.props) { @@ -92,7 +92,7 @@ class CustomGraph extends React.Component { this.refresh(); } - componentWillReceiveProps(props: CustomGraphProps & WithRouterProps) { + componentWillReceiveProps(props: CustomChartProps & WithRouterProps) { this.refresh(props); } @@ -144,21 +144,21 @@ class CustomGraph extends React.Component { }); } - // Render a graph of the currently selected metrics. - renderGraph() { + // Render a chart of the currently selected metrics. + renderChart() { const metrics = this.currentMetrics(); const units = this.currentAxisUnits(); if (_.isEmpty(metrics)) { return (
-

Click "Add Metric" to add a metric to the custom graph.

+

Click "Add Metric" to add a metric to the custom chart.

); } return (
- + { @@ -247,7 +247,7 @@ class CustomGraph extends React.Component { /> - { this.renderGraph() } + { this.renderChart() } { this.renderMetricsTable() } ); @@ -265,4 +265,4 @@ const mapDispatchToProps = { refreshNodes, }; -export default connect(mapStateToProps, mapDispatchToProps)(withRouter(CustomGraph)); +export default connect(mapStateToProps, mapDispatchToProps)(withRouter(CustomChart)); diff --git a/pkg/ui/src/views/reports/containers/debug/index.tsx b/pkg/ui/src/views/reports/containers/debug/index.tsx index d49b2e8d3657..94c32d2d1a0e 100644 --- a/pkg/ui/src/views/reports/containers/debug/index.tsx +++ b/pkg/ui/src/views/reports/containers/debug/index.tsx @@ -221,10 +221,10 @@ export default function Debug() { url="#/debug/redux" /> - +