web: re-format with prettier

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer
2021-08-03 17:52:21 +02:00
parent 77ed25ae34
commit 2c60ec50be
218 changed files with 11696 additions and 8225 deletions

View File

@ -13,7 +13,6 @@ interface FlowMetrics {
@customElement("ak-admin-status-chart-flow")
export class PolicyStatusChart extends AKChart<FlowMetrics> {
getChartType(): string {
return "doughnut";
}
@ -32,9 +31,11 @@ export class PolicyStatusChart extends AKChart<FlowMetrics> {
async apiRequest(): Promise<FlowMetrics> {
const api = new FlowsApi(DEFAULT_CONFIG);
const cached = (await api.flowsInstancesCacheInfoRetrieve()).count || 0;
const count = (await api.flowsInstancesList({
pageSize: 1
})).pagination.count;
const count = (
await api.flowsInstancesList({
pageSize: 1,
})
).pagination.count;
this.centerText = count.toString();
return {
count: count - cached,
@ -44,24 +45,14 @@ export class PolicyStatusChart extends AKChart<FlowMetrics> {
getChartData(data: FlowMetrics): ChartData {
return {
labels: [
t`Total flows`,
t`Cached flows`,
],
labels: [t`Total flows`, t`Cached flows`],
datasets: [
{
backgroundColor: [
"#2b9af3",
"#3e8635",
],
backgroundColor: ["#2b9af3", "#3e8635"],
spanGaps: true,
data: [
data.count,
data.cached,
],
data: [data.count, data.cached],
},
]
],
};
}
}