From f8bcdb26b38945cc93896132f4f4f766ca6f6381 Mon Sep 17 00:00:00 2001
From: Jens Langhammer
Date: Tue, 9 Feb 2021 17:04:55 +0100
Subject: [PATCH] web: PBResponse -> AKResponse
---
web/src/api/Applications.ts | 6 +++---
web/src/api/Client.ts | 2 +-
web/src/api/EventNotification.ts | 6 +++---
web/src/api/EventRules.ts | 6 +++---
web/src/api/EventTransports.ts | 6 +++---
web/src/api/Events.ts | 6 +++---
web/src/api/Flows.ts | 12 ++++++------
web/src/api/Outposts.ts | 6 +++---
web/src/api/Policies.ts | 8 ++++----
web/src/api/PolicyBindings.ts | 6 +++---
web/src/api/PropertyMapping.ts | 6 +++---
web/src/api/Providers.ts | 6 +++---
web/src/api/Sources.ts | 6 +++---
web/src/api/Users.ts | 4 ++--
web/src/elements/notifications/NotificationDrawer.ts | 4 ++--
web/src/elements/policies/BoundPoliciesList.ts | 4 ++--
web/src/elements/table/Table.ts | 6 +++---
web/src/pages/LibraryPage.ts | 4 ++--
.../pages/admin-overview/cards/WorkerStatusCard.ts | 4 ++--
web/src/pages/applications/ApplicationListPage.ts | 4 ++--
web/src/pages/events/EventListPage.ts | 4 ++--
web/src/pages/events/RuleListPage.ts | 4 ++--
web/src/pages/events/TransportListPage.ts | 4 ++--
web/src/pages/flows/BoundStagesList.ts | 4 ++--
web/src/pages/outposts/OutpostListPage.ts | 4 ++--
.../property-mappings/PropertyMappingListPage.ts | 4 ++--
web/src/pages/providers/ProviderListPage.ts | 4 ++--
web/src/pages/sources/LDAPSourceViewPage.ts | 3 ++-
web/src/pages/sources/SourcesListPage.ts | 9 ++++++---
29 files changed, 78 insertions(+), 74 deletions(-)
diff --git a/web/src/api/Applications.ts b/web/src/api/Applications.ts
index 9d8cb11db..cf10fdca0 100644
--- a/web/src/api/Applications.ts
+++ b/web/src/api/Applications.ts
@@ -1,4 +1,4 @@
-import { DefaultClient, PBResponse, QueryArguments } from "./Client";
+import { DefaultClient, AKResponse, QueryArguments } from "./Client";
import { Provider } from "./Providers";
export class Application {
@@ -22,8 +22,8 @@ export class Application {
return DefaultClient.fetch(["core", "applications", slug]);
}
- static list(filter?: QueryArguments): Promise> {
- return DefaultClient.fetch>(["core", "applications"], filter);
+ static list(filter?: QueryArguments): Promise> {
+ return DefaultClient.fetch>(["core", "applications"], filter);
}
static adminUrl(rest: string): string {
diff --git a/web/src/api/Client.ts b/web/src/api/Client.ts
index ffac8d47a..581e94732 100644
--- a/web/src/api/Client.ts
+++ b/web/src/api/Client.ts
@@ -94,7 +94,7 @@ export interface PBPagination {
end_index: number;
}
-export interface PBResponse {
+export interface AKResponse {
pagination: PBPagination;
results: Array;
diff --git a/web/src/api/EventNotification.ts b/web/src/api/EventNotification.ts
index c9673a7b2..c1171e319 100644
--- a/web/src/api/EventNotification.ts
+++ b/web/src/api/EventNotification.ts
@@ -1,4 +1,4 @@
-import { DefaultClient, QueryArguments, PBResponse } from "./Client";
+import { DefaultClient, QueryArguments, AKResponse } from "./Client";
import { Event } from "./Events";
export class Notification {
@@ -17,8 +17,8 @@ export class Notification {
return DefaultClient.fetch(["events", "notifications", pk]);
}
- static list(filter?: QueryArguments): Promise> {
- return DefaultClient.fetch>(["events", "notifications"], filter);
+ static list(filter?: QueryArguments): Promise> {
+ return DefaultClient.fetch>(["events", "notifications"], filter);
}
static markSeen(pk: string): Promise<{seen: boolean}> {
diff --git a/web/src/api/EventRules.ts b/web/src/api/EventRules.ts
index 221ea34f5..e93e49994 100644
--- a/web/src/api/EventRules.ts
+++ b/web/src/api/EventRules.ts
@@ -1,4 +1,4 @@
-import { DefaultClient, QueryArguments, PBResponse } from "./Client";
+import { DefaultClient, QueryArguments, AKResponse } from "./Client";
import { Group } from "./Groups";
export class Rule {
@@ -16,8 +16,8 @@ export class Rule {
return DefaultClient.fetch(["events", "rules", pk]);
}
- static list(filter?: QueryArguments): Promise> {
- return DefaultClient.fetch>(["events", "rules"], filter);
+ static list(filter?: QueryArguments): Promise> {
+ return DefaultClient.fetch>(["events", "rules"], filter);
}
static adminUrl(rest: string): string {
diff --git a/web/src/api/EventTransports.ts b/web/src/api/EventTransports.ts
index ddcfb3b02..e40ac1b1b 100644
--- a/web/src/api/EventTransports.ts
+++ b/web/src/api/EventTransports.ts
@@ -1,4 +1,4 @@
-import { DefaultClient, QueryArguments, PBResponse } from "./Client";
+import { DefaultClient, QueryArguments, AKResponse } from "./Client";
export class Transport {
pk: string;
@@ -15,8 +15,8 @@ export class Transport {
return DefaultClient.fetch(["events", "transports", pk]);
}
- static list(filter?: QueryArguments): Promise> {
- return DefaultClient.fetch>(["events", "transports"], filter);
+ static list(filter?: QueryArguments): Promise> {
+ return DefaultClient.fetch>(["events", "transports"], filter);
}
static adminUrl(rest: string): string {
diff --git a/web/src/api/Events.ts b/web/src/api/Events.ts
index 78fcb63e0..bc1cafb41 100644
--- a/web/src/api/Events.ts
+++ b/web/src/api/Events.ts
@@ -1,4 +1,4 @@
-import { DefaultClient, PBResponse, QueryArguments } from "./Client";
+import { DefaultClient, AKResponse, QueryArguments } from "./Client";
export interface EventUser {
pk: number;
@@ -28,8 +28,8 @@ export class Event {
return DefaultClient.fetch(["events", "events", pk]);
}
- static list(filter?: QueryArguments): Promise> {
- return DefaultClient.fetch>(["events", "events"], filter);
+ static list(filter?: QueryArguments): Promise> {
+ return DefaultClient.fetch>(["events", "events"], filter);
}
// events/events/top_per_user/?filter_action=authorize_application
diff --git a/web/src/api/Flows.ts b/web/src/api/Flows.ts
index 87f6d735c..49ac4c7d4 100644
--- a/web/src/api/Flows.ts
+++ b/web/src/api/Flows.ts
@@ -1,4 +1,4 @@
-import { DefaultClient, PBResponse, QueryArguments } from "./Client";
+import { DefaultClient, AKResponse, QueryArguments } from "./Client";
export enum FlowDesignation {
Authentication = "authentication",
@@ -34,12 +34,12 @@ export class Flow {
return DefaultClient.fetch<{ diagram: string }>(["flows", "instances", slug, "diagram"]);
}
- static list(filter?: QueryArguments): Promise> {
- return DefaultClient.fetch>(["flows", "instances"], filter);
+ static list(filter?: QueryArguments): Promise> {
+ return DefaultClient.fetch>(["flows", "instances"], filter);
}
static cached(): Promise {
- return DefaultClient.fetch>(["flows", "cached"]).then(r => {
+ return DefaultClient.fetch>(["flows", "cached"]).then(r => {
return r.pagination.count;
});
}
@@ -76,8 +76,8 @@ export class FlowStageBinding {
return DefaultClient.fetch(["flows", "bindings", slug]);
}
- static list(filter?: QueryArguments): Promise> {
- return DefaultClient.fetch>(["flows", "bindings"], filter);
+ static list(filter?: QueryArguments): Promise> {
+ return DefaultClient.fetch>(["flows", "bindings"], filter);
}
static adminUrl(rest: string): string {
diff --git a/web/src/api/Outposts.ts b/web/src/api/Outposts.ts
index 9205b8911..6a84cb833 100644
--- a/web/src/api/Outposts.ts
+++ b/web/src/api/Outposts.ts
@@ -1,4 +1,4 @@
-import { DefaultClient, PBResponse, QueryArguments } from "./Client";
+import { DefaultClient, AKResponse, QueryArguments } from "./Client";
import { Provider } from "./Providers";
export interface OutpostHealth {
@@ -26,8 +26,8 @@ export class Outpost {
return DefaultClient.fetch(["outposts", "outposts", pk]);
}
- static list(filter?: QueryArguments): Promise> {
- return DefaultClient.fetch>(["outposts", "outposts"], filter);
+ static list(filter?: QueryArguments): Promise> {
+ return DefaultClient.fetch>(["outposts", "outposts"], filter);
}
static health(pk: string): Promise {
diff --git a/web/src/api/Policies.ts b/web/src/api/Policies.ts
index 88e2bb073..7e5d78eeb 100644
--- a/web/src/api/Policies.ts
+++ b/web/src/api/Policies.ts
@@ -1,4 +1,4 @@
-import { DefaultClient, BaseInheritanceModel, PBResponse, QueryArguments } from "./Client";
+import { DefaultClient, BaseInheritanceModel, AKResponse, QueryArguments } from "./Client";
export class Policy implements BaseInheritanceModel {
pk: string;
@@ -15,12 +15,12 @@ export class Policy implements BaseInheritanceModel {
return DefaultClient.fetch(["policies", "all", pk]);
}
- static list(filter?: QueryArguments): Promise> {
- return DefaultClient.fetch>(["policies", "all"], filter);
+ static list(filter?: QueryArguments): Promise> {
+ return DefaultClient.fetch>(["policies", "all"], filter);
}
static cached(): Promise {
- return DefaultClient.fetch>(["policies", "cached"]).then(r => {
+ return DefaultClient.fetch>(["policies", "cached"]).then(r => {
return r.pagination.count;
});
}
diff --git a/web/src/api/PolicyBindings.ts b/web/src/api/PolicyBindings.ts
index 44a158019..fda494443 100644
--- a/web/src/api/PolicyBindings.ts
+++ b/web/src/api/PolicyBindings.ts
@@ -1,4 +1,4 @@
-import { DefaultClient, PBResponse, QueryArguments } from "./Client";
+import { DefaultClient, AKResponse, QueryArguments } from "./Client";
import { Policy } from "./Policies";
export class PolicyBinding {
@@ -18,8 +18,8 @@ export class PolicyBinding {
return DefaultClient.fetch(["policies", "bindings", pk]);
}
- static list(filter?: QueryArguments): Promise> {
- return DefaultClient.fetch>(["policies", "bindings"], filter);
+ static list(filter?: QueryArguments): Promise> {
+ return DefaultClient.fetch>(["policies", "bindings"], filter);
}
static adminUrl(rest: string): string {
diff --git a/web/src/api/PropertyMapping.ts b/web/src/api/PropertyMapping.ts
index cc75e6f2e..1a61133f5 100644
--- a/web/src/api/PropertyMapping.ts
+++ b/web/src/api/PropertyMapping.ts
@@ -1,4 +1,4 @@
-import { DefaultClient, PBResponse, QueryArguments } from "./Client";
+import { DefaultClient, AKResponse, QueryArguments } from "./Client";
export class PropertyMapping {
pk: string;
@@ -16,8 +16,8 @@ export class PropertyMapping {
return DefaultClient.fetch(["propertymappings", "all", pk]);
}
- static list(filter?: QueryArguments): Promise> {
- return DefaultClient.fetch>(["propertymappings", "all"], filter);
+ static list(filter?: QueryArguments): Promise> {
+ return DefaultClient.fetch>(["propertymappings", "all"], filter);
}
static adminUrl(rest: string): string {
diff --git a/web/src/api/Providers.ts b/web/src/api/Providers.ts
index 7444aeb0c..6d1f56e17 100644
--- a/web/src/api/Providers.ts
+++ b/web/src/api/Providers.ts
@@ -1,4 +1,4 @@
-import { BaseInheritanceModel, DefaultClient, PBResponse, QueryArguments } from "./Client";
+import { BaseInheritanceModel, DefaultClient, AKResponse, QueryArguments } from "./Client";
export class Provider implements BaseInheritanceModel {
pk: number;
@@ -20,8 +20,8 @@ export class Provider implements BaseInheritanceModel {
return DefaultClient.fetch(["providers", "all", id.toString()]);
}
- static list(filter?: QueryArguments): Promise> {
- return DefaultClient.fetch>(["providers", "all"], filter);
+ static list(filter?: QueryArguments): Promise> {
+ return DefaultClient.fetch>(["providers", "all"], filter);
}
static adminUrl(rest: string): string {
diff --git a/web/src/api/Sources.ts b/web/src/api/Sources.ts
index 6d48d7081..749dfb031 100644
--- a/web/src/api/Sources.ts
+++ b/web/src/api/Sources.ts
@@ -1,4 +1,4 @@
-import { BaseInheritanceModel, DefaultClient, PBResponse, QueryArguments } from "./Client";
+import { BaseInheritanceModel, DefaultClient, AKResponse, QueryArguments } from "./Client";
export class Source implements BaseInheritanceModel {
pk: string;
@@ -19,8 +19,8 @@ export class Source implements BaseInheritanceModel {
return DefaultClient.fetch
diff --git a/web/src/pages/sources/SourcesListPage.ts b/web/src/pages/sources/SourcesListPage.ts
index 45e719ac1..f64e21ea9 100644
--- a/web/src/pages/sources/SourcesListPage.ts
+++ b/web/src/pages/sources/SourcesListPage.ts
@@ -1,10 +1,13 @@
import { gettext } from "django";
-import { customElement, html, LitElement, property, TemplateResult } from "lit-element";
-import { DefaultClient, PBResponse } from "../../api/Client";
+import { customElement, html, property, TemplateResult } from "lit-element";
+import { AKResponse } from "../../api/Client";
import { Source } from "../../api/Sources";
import { TableColumn } from "../../elements/table/Table";
import { TablePage } from "../../elements/table/TablePage";
+import "../../elements/buttons/ModalButton";
+import "../../elements/buttons/SpinnerButton";
+
@customElement("ak-source-list")
export class SourceListPage extends TablePage