-
Notifications
You must be signed in to change notification settings - Fork 0
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
Gauge 2way sync #1
Conversation
7918a7e
to
d83cf27
Compare
? dataConfig[AGGREGATIONS].filter((item) => item.name !== '') | ||
: []; | ||
const dimensionsLength = dimensions.length; | ||
let xaxes = dataConfig[GROUPBY] ? dataConfig[GROUPBY] : []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can be written as let xaxes = dataConfig[GROUPBY] ?? [];
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok adding the changes
: []; | ||
const dimensionsLength = dimensions.length; | ||
let xaxes = dataConfig[GROUPBY] ? dataConfig[GROUPBY] : []; | ||
const series = dataConfig[AGGREGATIONS] ? dataConfig[AGGREGATIONS] : []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above
const xaxesLength = xaxes.length; | ||
|
||
const getAggValue = (metric: any) => { | ||
return metric.alias ? metric.alias : metric.aggregation + '' + '(' + metric.name + ')'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use template literals instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For this used the common function created by Dipra in his PR
}); | ||
} | ||
const selectedSeriesData = series.map((seriesItem: any) => { | ||
const val = getAggValue(seriesItem); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please provide a meaningful name to variable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please work on the changes
@@ -16,9 +16,10 @@ export const ConfigPanelOptionGauge = ({ | |||
handleConfigChange, | |||
}: any) => { | |||
const { dataConfig = {} } = visualizations?.data?.userConfigs; | |||
const dimensions = dataConfig?.valueOptions?.dimensions | |||
? dataConfig.valueOptions.dimensions.filter((i) => i.name !== '') | |||
const dimensions = dataConfig?.dimensions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change to dataConfig[GROUPBY] instead of dataConfig?.dimensions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything looks good, please address one minor comment and then raise external PR
Signed-off-by: Abhay Pandey <[email protected]>
Signed-off-by: Abhay Pandey <[email protected]>
Signed-off-by: Abhay Pandey <[email protected]>
Signed-off-by: Abhay Pandey <[email protected]>
Signed-off-by: Abhay Pandey <[email protected]>
a25f6a9
to
cbbb10a
Compare
Raised external PR so, closing this PR. |
Description
[Describe what this change achieves]
Issues Resolved
[List any issues this PR will resolve]
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.