Skip to content
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

Merge release-9.x to develop #895

Closed
wants to merge 52 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
a24be7a
build(deps-dev): bump @babel/core from 7.22.9 to 7.22.10
dependabot[bot] Aug 7, 2023
17d3723
build(deps-dev): bump sass from 1.64.1 to 1.65.1
dependabot[bot] Aug 10, 2023
5b2a6b9
build(deps-dev): bump @types/node from 18.17.1 to 18.17.5
dependabot[bot] Aug 14, 2023
7dc90fe
build(deps-dev): bump prettier from 3.0.0 to 3.0.2
dependabot[bot] Aug 15, 2023
4eea1cb
OPG-461: Add node.id to ipinterface query results
synqotik Aug 16, 2023
20e98cd
OPG-461: Various fixes
synqotik Aug 16, 2023
9c0188c
Merge pull request #845 from OpenNMS/jira/OPG-461-nodeid-in-ipinterfa…
synqotik Aug 16, 2023
6a6bdc2
OPG-460: Add SNMP Primary ifindex and Primary IP Address to node tabl…
synqotik Aug 16, 2023
aa63bd8
OPG-448: Dashboard converter was outputting extra bracket
synqotik Aug 17, 2023
c7d5967
Merge pull request #837 from OpenNMS/dependabot/npm_and_yarn/release-…
Aug 17, 2023
e428b91
Merge pull request #842 from OpenNMS/dependabot/npm_and_yarn/release-…
Aug 17, 2023
5d99fb1
Merge pull request #841 from OpenNMS/dependabot/npm_and_yarn/release-…
Aug 17, 2023
549c642
Merge pull request #843 from OpenNMS/dependabot/npm_and_yarn/release-…
Aug 17, 2023
5bdc62b
Merge pull request #846 from OpenNMS/jira/OPG-460-nodetable-fix-columns
synqotik Aug 17, 2023
d3ffb01
Merge pull request #847 from OpenNMS/jira/OPG-448-converter-output-ex…
synqotik Aug 17, 2023
25807e1
build(deps-dev): bump @swc/jest from 0.2.27 to 0.2.29
dependabot[bot] Aug 17, 2023
43fa9e9
build(deps-dev): bump tslib from 2.6.1 to 2.6.2
dependabot[bot] Aug 18, 2023
d484f24
build(deps-dev): bump @testing-library/jest-dom from 5.17.0 to 6.1.2
dependabot[bot] Aug 24, 2023
821850a
build(deps-dev): bump @types/node from 18.17.5 to 18.17.11
dependabot[bot] Aug 25, 2023
4c157b8
Merge pull request #848 from OpenNMS/dependabot/npm_and_yarn/release-…
Aug 28, 2023
fb432a6
Merge pull request #852 from OpenNMS/dependabot/npm_and_yarn/release-…
Aug 28, 2023
7780b2b
Merge pull request #856 from OpenNMS/dependabot/npm_and_yarn/release-…
Aug 28, 2023
2e3aefd
Merge pull request #859 from OpenNMS/dependabot/npm_and_yarn/release-…
Aug 28, 2023
c00dece
build(deps-dev): bump @grafana/eslint-config from 6.0.0 to 6.0.1
dependabot[bot] Aug 28, 2023
ae308bb
build(deps-dev): bump jest-environment-jsdom from 29.6.2 to 29.6.4
dependabot[bot] Aug 28, 2023
44ff4a7
build(deps-dev): bump @types/jquery from 3.5.16 to 3.5.18
dependabot[bot] Sep 4, 2023
e27b3a8
OPG-463: EntityDS retain limit of 0. Add relevant unit tests
synqotik Sep 5, 2023
19e2396
Merge pull request #868 from OpenNMS/jira/OPG-463-entityds-limit-zero
synqotik Sep 6, 2023
3419fdd
build(deps-dev): bump @babel/core from 7.22.10 to 7.22.17
dependabot[bot] Sep 8, 2023
2da3123
OPG-454: Allow flow query with multi-valued withHost
synqotik Sep 8, 2023
06f5d1b
Merge pull request #862 from OpenNMS/dependabot/npm_and_yarn/release-…
Sep 12, 2023
64bab17
Merge pull request #864 from OpenNMS/dependabot/npm_and_yarn/release-…
Sep 12, 2023
3e61ea6
Merge pull request #866 from OpenNMS/dependabot/npm_and_yarn/release-…
Sep 12, 2023
ef7dd93
Merge pull request #869 from OpenNMS/dependabot/npm_and_yarn/release-…
Sep 12, 2023
b89b8f2
build(deps-dev): bump @types/node from 18.17.11 to 18.17.15
dependabot[bot] Sep 12, 2023
b7f3947
Merge pull request #871 from OpenNMS/dependabot/npm_and_yarn/release-…
Sep 12, 2023
da3d37c
build(deps): bump opennms.js
Sep 12, 2023
9023332
Merge pull request #870 from OpenNMS/jira/OPG-454-flows-multiple-hosts
synqotik Sep 12, 2023
d7c0eed
build(deps-dev): bump jest-environment-jsdom from 29.6.4 to 29.7.0
dependabot[bot] Sep 12, 2023
968f33d
build(deps-dev): bump prettier from 3.0.2 to 3.0.3
dependabot[bot] Sep 12, 2023
98444ee
build(deps-dev): bump @testing-library/jest-dom from 6.1.2 to 6.1.3
dependabot[bot] Sep 12, 2023
c1de7c0
build(deps-dev): bump which from 3.0.1 to 4.0.0
dependabot[bot] Sep 12, 2023
f4af39f
build(deps-dev): bump sass from 1.65.1 to 1.66.1
dependabot[bot] Sep 12, 2023
f938e5c
Merge pull request #872 from OpenNMS/dependabot/npm_and_yarn/release-…
Sep 13, 2023
2535973
Merge pull request #873 from OpenNMS/dependabot/npm_and_yarn/release-…
Sep 13, 2023
7f2a015
Merge pull request #874 from OpenNMS/dependabot/npm_and_yarn/release-…
Sep 13, 2023
44e1fb3
Merge pull request #875 from OpenNMS/dependabot/npm_and_yarn/release-…
Sep 13, 2023
0567dc4
Merge pull request #876 from OpenNMS/dependabot/npm_and_yarn/release-…
Sep 13, 2023
a62cfc9
OPG-464: Add nodeID to EntityDS SnmpInterfaces queries, IP nodeId column
synqotik Sep 29, 2023
d405325
OPG-464: Bump snapshot version to 9.0.10-SNAPSHOT
synqotik Oct 2, 2023
b812263
Merge pull request #893 from OpenNMS/jira/OPG-464-entity-ds-issues
synqotik Oct 2, 2023
26791c2
Merge branch 'release-9.x' into synqotik/merge-9x-to-develop
synqotik Oct 3, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
455 changes: 273 additions & 182 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@swc/core": "^1.2.144",
"@swc/helpers": "^0.5.1",
"@swc/jest": "^0.2.23",
"@testing-library/jest-dom": "^5.16.2",
"@testing-library/jest-dom": "^6.1.2",
"@testing-library/react": "^12.1.4",
"@types/flot": "0.0.32",
"@types/glob": "^8.0.0",
Expand All @@ -48,7 +48,7 @@
"recursive-copy": "^2.0.13",
"replace-in-file-webpack-plugin": "^1.0.6",
"rimraf": "^5.0.0",
"sass": "1.64.1",
"sass": "1.66.1",
"sass-loader": "13.3.2",
"specit": "^1.4.4",
"style-loader": "3.3.3",
Expand All @@ -61,7 +61,7 @@
"webpack": "^5.69.1",
"webpack-cli": "^5.0.2",
"webpack-livereload-plugin": "^3.0.2",
"which": "^3.0.0"
"which": "^4.0.0"
},
"engines": {
"node": ">=14"
Expand Down
7 changes: 4 additions & 3 deletions src/datasources/entity-ds/EntityClause.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ export const EntityClause = ({
if (attribute?.value?.type?.i === 'TIMESTAMP') {
type = 'datetime-local'
} else if (attribute?.value?.type?.i === 'INTEGER') {
type = 'number'
// leaving this as 'text' for now, otherwise user cannot input template variable
// type = 'number'
}
return type;
}
Expand Down Expand Up @@ -128,8 +129,8 @@ export const EntityClause = ({
<Segment
allowEmptyValue={false}
value={clause.comparator}
onChange={(text) => {
setComparator(index, text);
onChange={val => {
setComparator(index, val)
}}
options={comparatorOptions}
/>
Expand Down
22 changes: 17 additions & 5 deletions src/datasources/entity-ds/EntityClauseEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,38 @@ export const EntityClauseEditor = ({ setFilter, loading, propertiesAsArray, clau

// Build the filter. This could be extracted to a helper function.
clauses.forEach((d, i) => {
if ((d.type === OnmsEntityType.AND || d.type === OnmsEntityType.FIRST) && clauses[i].comparator?.value) {
// comparator could be: '{ id, label }' or else '{ value: { i, l } }'
let comparatorValue = clauses[i].comparator?.value

if (!comparatorValue && clauses[i].comparator?.id) {
comparatorValue = {
id: clauses[i].comparator.id,
label: clauses[i].comparator.label,
l: clauses[i].comparator.label,
i: clauses[i].comparator.id
}
}

if ((d.type === OnmsEntityType.AND || d.type === OnmsEntityType.FIRST) && comparatorValue) {
updatedFilter.withAndRestriction(
new API.Restriction(
clauses[i].attribute?.value?.id,
clauses[i].comparator?.value,
comparatorValue,
clauses[i].comparedString || clauses[i].comparedValue.value
)
)
} else if (d.type === OnmsEntityType.OR && clauses[i].comparator?.value) {
} else if (d.type === OnmsEntityType.OR && comparatorValue) {
updatedFilter.withOrRestriction(
new API.Restriction(
clauses[i].attribute?.value?.id,
clauses[i].comparator?.value,
comparatorValue,
clauses[i].comparedString || clauses[i].comparedValue.value
)
)
}
})

setFilter(updatedFilter);
setFilter(updatedFilter)
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [clauses])

Expand Down
4 changes: 3 additions & 1 deletion src/datasources/entity-ds/EntityQueryEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
} from '@grafana/ui'
import { SelectableValue } from '@grafana/data';
import { useEntityProperties } from '../../hooks/useEntityProperties';
import { isInteger } from '../../lib/utils'
import { EntityClauseEditor } from './EntityClauseEditor';
import { EntityOrderByEditor } from './EntityOrderByEditor';
import { defaultClause } from './constants';
Expand Down Expand Up @@ -63,6 +64,7 @@ const clausesReducer = (clauses: OnmsEntityClause[], action: Action): OnmsEntity
default:
throw new Error("shouldn't get here")
}

return newClauses
}

Expand All @@ -78,7 +80,7 @@ export const EntityQueryEditor: React.FC<EntityQueryEditorProps> = ({ onChange,
const [clauses, dispatchClauses] = useReducer(clausesReducer, query.clauses || [{ ...defaultClause }])
const [loading, setLoading] = useState(false)
const [filter, setFilter] = useState(query?.filter || getSmallerAPIFilter())
const [limit, setLimit] = useState(query?.filter?.limit || 99)
const [limit, setLimit] = useState(isInteger(query?.filter?.limit) ? query.filter.limit : 99)
const [featuredAttributes, setFeaturedAttributes] = useState(true)
const { propertiesLoading, propertiesAsArray } = useEntityProperties(value.label || '', featuredAttributes, client)

Expand Down
9 changes: 3 additions & 6 deletions src/datasources/entity-ds/queries/queryBuilder.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { TemplateSrv } from '@grafana/runtime'
import { API } from 'opennms'
import { EntityQuery, EntityQueryRequest, FilterEditorData } from './../types'
import { getAttributeMapping } from './attributeMappings'
import { ALL_SELECTION_VALUE, EntityTypes } from '../../../constants/constants'
import { isInteger } from '../../../lib/utils'
import { getAttributeMapping } from './attributeMappings'
import { getFilterId } from '../EntityHelper'

const isAllVariable = (templateVar, templateSrv) => {
Expand All @@ -14,10 +15,6 @@ const isMultiVariable = (templateVar) => {
return !!(templateVar?.multi || templateVar?.isMulti)
}

const isNumber = (num: any) => {
return ((parseInt(num, 10) + '') === (num + ''))
}

const isEmptyNodeRestriction = (clause: API.Clause) => {
const restriction = clause.restriction
return restriction.attribute === 'node' && restriction.value === '{}'
Expand Down Expand Up @@ -86,7 +83,7 @@ const subtituteNodeRestriction = (clause: API.Clause) => {
new API.Clause(new API.Restriction('node.foreignId', restriction.comparator, nodeCriteria[1]), API.Operators.AND),
)
clause.restriction = replacement
} else if (isNumber(restriction.value)) {
} else if (isInteger(restriction.value)) {
clause.restriction = new API.Restriction('node.id', restriction.comparator, restriction.value)
} else {
console.warn('Found a "node" criteria but it does not appear to be a node ID nor a foreignSource:foreignId tuple.', restriction)
Expand Down
6 changes: 4 additions & 2 deletions src/datasources/entity-ds/queries/queryIPInterfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const columns = Object.freeze([
{ text: 'ID', resource: 'id' },
{ text: 'IP Address', resource: 'ipAddress', featured: true, },
{ text: 'Hostname', resource: 'hostname', featured: true, },
{ text: 'Node ID', resource: 'node.id' },
{ text: 'Is Down?', resource: 'isDown', },
{ text: 'Is Managed?', resource: 'isManaged', },
{ text: 'Last Capsd Poll', resource: 'lastCapsdPoll', },
Expand All @@ -17,7 +18,7 @@ const columns = Object.freeze([
{ text: 'SNMP ifAlias', resource: 'snmpInterface.ifAlias' },
{ text: 'SNMP ifDescr', resource: 'snmpInterface.ifDescr' },
{ text: 'SNMP ifIndex', resource: 'snmpInterface.ifIndex' },
{ text: 'SNMP PhysAddr', resource: 'snmpInterface.physAddr' },
{ text: 'SNMP PhysAddr', resource: 'snmpInterface.physAddr' }
] as OnmsColumn[]);

export const getIPInterfaceColumns = () => columns
Expand All @@ -36,6 +37,7 @@ export const queryIPInterfaces = async (client: ClientDelegate, filter: API.Filt
iface.id,
iface.ipAddress?.correctForm(),
iface.hostname,
iface.node?.id,
iface.isDown,
iface.isManaged?.toDisplayString(),
iface.lastCapsdPoll,
Expand All @@ -46,7 +48,7 @@ export const queryIPInterfaces = async (client: ClientDelegate, filter: API.Filt
iface.snmpInterface?.ifAlias,
iface.snmpInterface?.ifDescr,
iface.snmpInterface?.ifIndex,
iface.snmpInterface?.physAddr?.toString(),
iface.snmpInterface?.physAddr?.toString()
];
});

Expand Down
36 changes: 27 additions & 9 deletions src/datasources/entity-ds/queries/queryNodes.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ClientDelegate } from "lib/client_delegate";
import { OnmsNode } from "opennms/src/model/OnmsNode";
import { ClientDelegate } from 'lib/client_delegate'
import { OnmsNode } from 'opennms/src/model/OnmsNode'
import { API } from 'opennms'
import { OnmsColumn, OnmsTableData } from '../types'

Expand Down Expand Up @@ -34,15 +34,31 @@ const columns = Object.freeze([

export const getNodeColumns = () => columns

const getSnmpPrimaryInterface = (node: OnmsNode) => {
if (node.ipInterfaces) {
const primary = node.ipInterfaces.filter(iface => {
return !!iface.snmpPrimary?.isPrimary()
})?.[0]

return primary
}

return undefined
}

export const queryNodes = async (client: ClientDelegate, filter: API.Filter): Promise<OnmsTableData> => {
let nodes: OnmsNode[] = [];
let nodes: OnmsNode[] = []

try {
nodes = await client.findNodes(filter, true)
} catch (e) {
console.error(e);
console.error(e)
}
const rows = nodes?.map((node) => {
const primaryIpInterface = getSnmpPrimaryInterface(node)
const ifIndex = primaryIpInterface?.snmpInterfaceId
const ipAddress = primaryIpInterface?.ipAddress?.correctForm() || ''

return [
node.id,
node.label,
Expand All @@ -51,10 +67,10 @@ export const queryNodes = async (client: ClientDelegate, filter: API.Filter): Pr
node.foreignId,
node.location,
node.createTime,
node.parent ? node.parent.id : undefined,
node.parent ? node.parent.foreignSource : undefined,
node.parent ? node.parent.foreignId : undefined,
node.type ? node.type.toDisplayString() : undefined,
node.parent ? node.parent.id : '',
node.parent ? node.parent.foreignSource : '',
node.parent ? node.parent.foreignId : '',
node.type ? node.type.toDisplayString() : '',
node.sysObjectId,
node.sysName,
node.sysDescription,
Expand All @@ -64,7 +80,9 @@ export const queryNodes = async (client: ClientDelegate, filter: API.Filter): Pr
node.netBiosDomain,
node.operatingSystem,
node.lastCapsdPoll,
node.categories ? node.categories.map(cat => cat.name) : undefined,
ifIndex || '',
ipAddress,
node.categories ? node.categories.map(cat => cat.name) : ''
]
})

Expand Down
22 changes: 12 additions & 10 deletions src/datasources/entity-ds/queries/querySNMPInterfaces.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { OnmsColumn, OnmsTableData } from '../types'
import { OnmsSnmpInterface } from "opennms/src/model/OnmsSnmpInterface";
import { ClientDelegate } from "lib/client_delegate";
import { API } from 'opennms'
import { OnmsSnmpInterface } from "opennms/src/model/OnmsSnmpInterface"
import { OnmsColumn, OnmsTableData } from '../types'
import { ClientDelegate } from "lib/client_delegate"

const columns = Object.freeze([
{ text: 'ID', resource: 'id' },
{ text: 'Index', resource: 'ifIndex' },
{ text: 'Node ID', resource: 'nodeId' },
{ text: 'Description', resource: 'ifDescr', featured: true },
{ text: 'Type', resource: 'ifType' },
{ text: 'Name', resource: 'ifName', featured: true },
Expand All @@ -18,23 +19,24 @@ const columns = Object.freeze([
{ text: 'Polled?', resource: 'poll' },
{ text: 'Last SNMP Poll', resource: 'lastSnmpPoll' },
{ text: 'Physical Address', resource: 'physAddr' }
] as OnmsColumn[]);
] as OnmsColumn[])

export const getSNMPInterfaceColumns = () => columns

export const querySNMPInterfaces = async (client: ClientDelegate, filter: API.Filter): Promise<OnmsTableData> => {
let ifaces: OnmsSnmpInterface[] = [];
let ifaces: OnmsSnmpInterface[] = []

try {
ifaces = await client.findSnmpInterfaces(filter);
ifaces = await client.findSnmpInterfaces(filter)
} catch (e) {
console.error(e);
console.error(e)
}

const rows = ifaces?.map((iface: OnmsSnmpInterface) => {
return [
iface.id,
iface.ifIndex,
iface.nodeId,
iface.ifDescr,
iface.ifType,
iface.ifName,
Expand All @@ -46,9 +48,9 @@ export const querySNMPInterfaces = async (client: ClientDelegate, filter: API.Fi
iface.collect?.toDisplayString(),
iface.poll,
iface.lastSnmpPoll,
iface.physAddr?.toString(),
];
});
iface.physAddr?.toString()
]
})

return {
name: 'snmpInterfaces',
Expand Down
42 changes: 31 additions & 11 deletions src/datasources/flow-ds/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ import { Model } from 'opennms'
import { ClientDelegate } from 'lib/client_delegate'
import { dscpLabel, dscpSelectOptions } from '../../lib/tos_helper'
import {
swapColumns,
getMultiValues,
getNodeFilterMap,
getNumberOrDefault,
getNodeAsResourceQuery,
isMultiValueString,
isString,
swapColumns,
valueOrDefault
} from 'lib/utils'
import { SimpleOpenNMSRequest } from 'lib/simpleRequest'
Expand Down Expand Up @@ -600,17 +602,20 @@ const getTimeRange = (options: FlowQueryRequest<FlowQuery>) => {
*/
const parseActiveFunctionsAndValues = (func: SelectableValue<string>, queryData: FlowQueryData, oldData: FlowParsedQueryRow, index: number) => {
const data = { ...oldData }
let inputParams: string | undefined = ''
let inputParams: string | string[] | undefined = ''

if (func.label) {
const fullFunction = FlowFunctions.get(func.label)

if ((fullFunction?.parameter || fullFunction?.parameter === '') && queryData.functionParameters) { //If there's a parameter, get it.
if ((fullFunction?.parameter || fullFunction?.parameter === '') && queryData.functionParameters) { // if there's a parameter, get it
inputParams = queryData.functionParameters[index]
} else if (fullFunction?.parameterOptions && queryData?.parameterOptions) { //If there's an option set, get it.
} else if (fullFunction?.parameterOptions && queryData?.parameterOptions) { // if there's an option set, get it
inputParams = queryData.parameterOptions?.[index]?.label
}

// Note, at this point, the parameter or option could be a multi-valued value like '{0.0.0.0,0.0.0.1}'
// In some (all?) cases the parameter needs to be changed to a string[] before passing on to opennms-js dao

data.queryFunctions.push({ [func.label]: inputParams })
}

Expand Down Expand Up @@ -799,6 +804,16 @@ const buildSeriesFlowQueryParams = (functionName: string, functionParams: FlowFu

for (let key of funcNames) {
if (item[key]) {
// opennms-js dao expects 'withHost' value to be a string[].
// If the value was a multi-valued template variable like '{0.0.0.0,0.0.0.1}',
// it needs to be turned into a string[].
// Could be the case with others as well
if (key === 'withHost') {
if (isMultiValueString(item[key])) {
return getMultiValues(item[key])
}
}

return item[key]
}
}
Expand Down Expand Up @@ -1037,13 +1052,18 @@ const metricFindExporterNodes = async ({ client, simpleRequest }, service: FlowT
}

const metricFindInterfacesOnExporterNode = async ({ client, simpleRequest }, service: FlowTemplateVariableQueryService) => {
const node = await simpleRequest.getNodeByIdOrFsFsId(service.nodeId);
const exporter = await client.getExporter(node.id);
let results = [] as any[];
exporter.interfaces.forEach(iff => {
results.push({ text: iff.name + "(" + iff.index + ")", value: iff.index, expandable: true });
});
return results;
let results = [] as any[]
const nodeIds = isMultiValueString(service.nodeId) ? getMultiValues(service.nodeId) : [service.nodeId]

for (let nodeId of nodeIds) {
const node = await simpleRequest.getNodeByIdOrFsFsId(nodeId)
const exporter = await client.getExporter(node.id)
exporter.interfaces.forEach(iff => {
results.push({ text: `${iff.name}(${iff.index})`, value: iff.index, expandable: true })
})
}

return results
}

const metricFindDscpOnExporterNodeAndInterface = async ({ client, simpleRequest }, service: FlowTemplateVariableQueryService) => {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/dashboard-convert/performanceDs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ const convertStringPropertyQuery = (source: any) => {

// 'label' and 'name' will be filled in at runtime
const resourceState = {
id: `node[${legacyNodeId}].${legacyResourceId}]`,
id: `node[${legacyNodeId}].${legacyResourceId}`,
label: legacyResourceId,
parentId: `node[${legacyNodeId}]`
}
Expand Down
Loading