flows: add API to clear cache

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer
2021-03-23 10:37:41 +01:00
parent b6d797fc78
commit 6961089425
8 changed files with 76 additions and 89 deletions

View File

@ -9,7 +9,7 @@ import { DEFAULT_CONFIG } from "../../../api/Config";
export class FlowCacheStatusCard extends AdminStatusCard<number> {
getPrimaryValue(): Promise<number> {
return new FlowsApi(DEFAULT_CONFIG).flowsInstancesCached({}).then((value) => {
return new FlowsApi(DEFAULT_CONFIG).flowsInstancesCacheInfo({}).then((value) => {
return value.count || 0;
});
}

View File

@ -10,7 +10,7 @@ import { DEFAULT_CONFIG } from "../../../api/Config";
export class PolicyCacheStatusCard extends AdminStatusCard<number> {
getPrimaryValue(): Promise<number> {
return new PoliciesApi(DEFAULT_CONFIG).policiesAllCached({}).then((value) => {
return new PoliciesApi(DEFAULT_CONFIG).policiesAllCacheInfo({}).then((value) => {
return value.count || 0;
});
}