NMS-19489 Realtime graphing doesn't work when the Cortex TSS plugin is used#8277
NMS-19489 Realtime graphing doesn't work when the Cortex TSS plugin is used#8277Mohammad-Junid wants to merge 2 commits intodevelopfrom
Conversation
cgorantla
left a comment
There was a problem hiding this comment.
Looks good.
Can you re-target this to foundation-2023 ?
There was a problem hiding this comment.
Pull request overview
Fixes realtime graphing when the Cortex TSS plugin is used by adjusting how metadata ResourcePaths are derived for different timeseries strategies.
Changes:
- Avoid repeated
TimeSeries.getTimeseriesStrategy()calls by storing the strategy once. - Split
NEWTSvsINTEGRATIONhandling when convertingrrdRelativePathinto aResourcePath.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| pathToMetaFile = ResourcePath.get(path.split(":")); | ||
| if (strategy == Strategy.NEWTS) { | ||
| pathToMetaFile = ResourcePath.get(path.split(":")); | ||
| } else { |
There was a problem hiding this comment.
path.split(\"/+\" ) uses a regex, where + is a quantifier ("one or more slashes"). If that’s the intent, it would help readability to make it explicit (e.g., extract a named constant like SPLIT_ON_ONE_OR_MORE_SLASHES = \"/+\" or add a short comment). If the intent is to split on a single slash delimiter, use path.split(\"/\") instead to avoid confusion.
| } else { | |
| } else { | |
| // Use regex "/+" to split on one or more slashes |
| // by the ResourceStorageDao. | ||
| ResourcePath pathToMetaFile; | ||
| if (TimeSeries.getTimeseriesStrategy() == Strategy.NEWTS || TimeSeries.getTimeseriesStrategy() == Strategy.INTEGRATION) { | ||
| Strategy strategy = TimeSeries.getTimeseriesStrategy(); |
There was a problem hiding this comment.
strategy is not reassigned in this hunk; consider declaring it as final to communicate immutability and reduce accidental reassignment during future edits.
| Strategy strategy = TimeSeries.getTimeseriesStrategy(); | |
| final Strategy strategy = TimeSeries.getTimeseriesStrategy(); |
cgorantla
left a comment
There was a problem hiding this comment.
Please re-target this to foundation-2023
Fix realtime graphing issue when the Cortex TSS plugin is used