Scope needs to be replaced with entityId (#2742)
"scope" can not find in serviceInventoryCache, serviceInstanceInventoryCache or endpointInventoryCache. It needs to be replaced with entityId
This commit is contained in:
parent
d95ab26308
commit
3e2fb7880d
|
|
@ -35,11 +35,14 @@ public class MetricFormatter {
|
|||
protected String getEntityName(MetricsMetaInfo meta) {
|
||||
int scope = meta.getScope();
|
||||
if (DefaultScopeDefine.inServiceCatalog(scope)) {
|
||||
return serviceInventoryCache.get(scope).getName();
|
||||
int entityId = Integer.valueOf(meta.getId());
|
||||
return serviceInventoryCache.get(entityId).getName();
|
||||
} else if (DefaultScopeDefine.inServiceInstanceCatalog(scope)) {
|
||||
return serviceInstanceInventoryCache.get(scope).getName();
|
||||
int entityId = Integer.valueOf(meta.getId());
|
||||
return serviceInstanceInventoryCache.get(entityId).getName();
|
||||
} else if (DefaultScopeDefine.inEndpointCatalog(scope)) {
|
||||
return endpointInventoryCache.get(scope).getName();
|
||||
int entityId = Integer.valueOf(meta.getId());
|
||||
return endpointInventoryCache.get(entityId).getName();
|
||||
} else if (scope == DefaultScopeDefine.ALL) {
|
||||
return "";
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue