Fixed little bugs for health

This commit is contained in:
porosnicuadrian
2021-07-15 17:10:38 +03:00
committed by Dan Christian Bogos
parent 5b3b0088bc
commit 85b1838b7d
3 changed files with 7 additions and 3 deletions

View File

@@ -103,7 +103,7 @@ func (apierSv1 *APIerSv1) GetFilterIndexes(arg *AttrGetFilterIndexes, reply *[]s
if tnt == utils.EmptyString {
tnt = apierSv1.Config.GeneralCfg().DefaultTenant
}
tntCtx := arg.Tenant
tntCtx := tnt
switch arg.ItemType {
case utils.MetaThresholds:
arg.ItemType = utils.CacheThresholdFilterIndexes

View File

@@ -581,7 +581,7 @@ func GetFltrIdxHealth(dm *DataManager, fltrCache, fltrIdxCache, objCache *ltcach
err = nil
continue
}
if ctx != nil ||
if ctx != nil &&
(obj.contexts == nil || !utils.IsSliceMember(*obj.contexts, *ctx)) { // check the contexts if present
key := utils.ConcatenatedKey(tntCtx, idxKey)
rply.MissingIndexes[key] = append(rply.MissingIndexes[key], itmID)

View File

@@ -1280,7 +1280,11 @@ const (
APIerSv1ComputeFilterIndexIDs = "APIerSv1.ComputeFilterIndexIDs"
APIerSv1GetAccountActionPlansIndexHealth = "APIerSv1.GetAccountActionPlansIndexHealth"
APIerSv1GetReverseDestinationsIndexHealth = "APIerSv1.GetReverseDestinationsIndexHealth"
APIerSv1GetThresholdsIndexesHealth = "APIerSv1.GetThresholdsIndexesHealth"
APIerSv1GetThresholdsIndexesHealth = "APIerSv1.GetThresholdsIndexesHealth"
APIerSv1GetResourcesIndexesHealth = "APIerSv1.GetResourcesIndexesHealth"
APIerSv1GetStatsIndexesHealth = "APIerSv1.GetStatsIndexesHealth"
APIerSv1GetRoutesIndexesHealth = "APIerSv1.GetRoutesIndexesHealth"
APIerSv1GetChargersIndexesHealth = "APIerSv1.GetChargersIndexesHealth"
APIerSv1Ping = "APIerSv1.Ping"
APIerSv1SetDispatcherProfile = "APIerSv1.SetDispatcherProfile"
APIerSv1GetDispatcherProfile = "APIerSv1.GetDispatcherProfile"