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(["sources", "all", slug]); } - static list(filter?: QueryArguments): Promise> { - return DefaultClient.fetch>(["sources", "all"], filter); + static list(filter?: QueryArguments): Promise> { + return DefaultClient.fetch>(["sources", "all"], filter); } static adminUrl(rest: string): string { diff --git a/web/src/api/Users.ts b/web/src/api/Users.ts index 46ab0e0c3..196702bf2 100644 --- a/web/src/api/Users.ts +++ b/web/src/api/Users.ts @@ -1,4 +1,4 @@ -import { DefaultClient, PBResponse } from "./Client"; +import { DefaultClient, AKResponse } from "./Client"; let _globalMePromise: Promise; @@ -22,7 +22,7 @@ export class User { } static count(): Promise { - return DefaultClient.fetch>(["core", "users"], { + return DefaultClient.fetch>(["core", "users"], { "page_size": 1 }).then(r => { return r.pagination.count; diff --git a/web/src/elements/notifications/NotificationDrawer.ts b/web/src/elements/notifications/NotificationDrawer.ts index 50ad51546..f366ec440 100644 --- a/web/src/elements/notifications/NotificationDrawer.ts +++ b/web/src/elements/notifications/NotificationDrawer.ts @@ -1,6 +1,6 @@ import { gettext } from "django"; import { css, CSSResult, customElement, html, LitElement, property, TemplateResult } from "lit-element"; -import { PBResponse } from "../../api/Client"; +import { AKResponse } from "../../api/Client"; import { Notification } from "../../api/EventNotification"; import { COMMON_STYLES } from "../../common/styles"; @@ -8,7 +8,7 @@ import { COMMON_STYLES } from "../../common/styles"; export class NotificationDrawer extends LitElement { @property({attribute: false}) - notifications?: PBResponse; + notifications?: AKResponse; @property({type: Number}) unread = 0; diff --git a/web/src/elements/policies/BoundPoliciesList.ts b/web/src/elements/policies/BoundPoliciesList.ts index 0c9273b0c..18d2aa93d 100644 --- a/web/src/elements/policies/BoundPoliciesList.ts +++ b/web/src/elements/policies/BoundPoliciesList.ts @@ -1,6 +1,6 @@ import { gettext } from "django"; import { customElement, html, property, TemplateResult } from "lit-element"; -import { PBResponse } from "../../api/Client"; +import { AKResponse } from "../../api/Client"; import { Table, TableColumn } from "../../elements/table/Table"; import { PolicyBinding } from "../../api/PolicyBindings"; @@ -14,7 +14,7 @@ export class BoundPoliciesList extends Table { @property() target?: string; - apiEndpoint(page: number): Promise> { + apiEndpoint(page: number): Promise> { return PolicyBinding.list({ target: this.target || "", ordering: "order", diff --git a/web/src/elements/table/Table.ts b/web/src/elements/table/Table.ts index b478f6b73..38b0798a7 100644 --- a/web/src/elements/table/Table.ts +++ b/web/src/elements/table/Table.ts @@ -1,6 +1,6 @@ import { gettext } from "django"; import { CSSResult, html, LitElement, property, TemplateResult } from "lit-element"; -import { PBResponse } from "../../api/Client"; +import { AKResponse } from "../../api/Client"; import { COMMON_STYLES } from "../../common/styles"; import "./TablePagination"; @@ -69,7 +69,7 @@ export class TableColumn { } export abstract class Table extends LitElement { - abstract apiEndpoint(page: number): Promise>; + abstract apiEndpoint(page: number): Promise>; abstract columns(): TableColumn[]; abstract row(item: T): TemplateResult[]; @@ -84,7 +84,7 @@ export abstract class Table extends LitElement { } @property({attribute: false}) - data?: PBResponse; + data?: AKResponse; @property({type: Number}) page = 1; diff --git a/web/src/pages/LibraryPage.ts b/web/src/pages/LibraryPage.ts index db82dd814..19e3f17d8 100644 --- a/web/src/pages/LibraryPage.ts +++ b/web/src/pages/LibraryPage.ts @@ -2,7 +2,7 @@ import { gettext } from "django"; import { css, CSSResult, customElement, html, LitElement, property, TemplateResult } from "lit-element"; import { ifDefined } from "lit-html/directives/if-defined"; import { Application } from "../api/Applications"; -import { PBResponse } from "../api/Client"; +import { AKResponse } from "../api/Client"; import { COMMON_STYLES } from "../common/styles"; import { loading, truncate } from "../utils"; @@ -52,7 +52,7 @@ export class LibraryApplication extends LitElement { @customElement("ak-library") export class LibraryPage extends LitElement { @property({attribute: false}) - apps?: PBResponse; + apps?: AKResponse; static get styles(): CSSResult[] { return COMMON_STYLES; diff --git a/web/src/pages/admin-overview/cards/WorkerStatusCard.ts b/web/src/pages/admin-overview/cards/WorkerStatusCard.ts index 1b3dad2ec..f4a62194a 100644 --- a/web/src/pages/admin-overview/cards/WorkerStatusCard.ts +++ b/web/src/pages/admin-overview/cards/WorkerStatusCard.ts @@ -1,13 +1,13 @@ import { gettext } from "django"; import { customElement } from "lit-element"; -import { DefaultClient, PBResponse } from "../../../api/Client"; +import { DefaultClient, AKResponse } from "../../../api/Client"; import { AdminStatus, AdminStatusCard } from "./AdminStatusCard"; @customElement("ak-admin-status-card-workers") export class WorkersStatusCard extends AdminStatusCard { getPrimaryValue(): Promise { - return DefaultClient.fetch>(["admin", "workers"]).then((r) => { + return DefaultClient.fetch>(["admin", "workers"]).then((r) => { return r.pagination.count; }); } diff --git a/web/src/pages/applications/ApplicationListPage.ts b/web/src/pages/applications/ApplicationListPage.ts index f70f19dfc..9c3770f92 100644 --- a/web/src/pages/applications/ApplicationListPage.ts +++ b/web/src/pages/applications/ApplicationListPage.ts @@ -1,7 +1,7 @@ import { gettext } from "django"; import { customElement, html, property, TemplateResult } from "lit-element"; import { Application } from "../../api/Applications"; -import { PBResponse } from "../../api/Client"; +import { AKResponse } from "../../api/Client"; import { TablePage } from "../../elements/table/TablePage"; import "../../elements/buttons/ModalButton"; @@ -26,7 +26,7 @@ export class ApplicationListPage extends TablePage { @property() order = "name"; - apiEndpoint(page: number): Promise> { + apiEndpoint(page: number): Promise> { return Application.list({ ordering: this.order, page: page, diff --git a/web/src/pages/events/EventListPage.ts b/web/src/pages/events/EventListPage.ts index c2da56c51..4f7edcbe6 100644 --- a/web/src/pages/events/EventListPage.ts +++ b/web/src/pages/events/EventListPage.ts @@ -1,6 +1,6 @@ import { gettext } from "django"; import { customElement, html, property, TemplateResult } from "lit-element"; -import { PBResponse } from "../../api/Client"; +import { AKResponse } from "../../api/Client"; import { Event } from "../../api/Events"; import { TableColumn } from "../../elements/table/Table"; import { TablePage } from "../../elements/table/TablePage"; @@ -27,7 +27,7 @@ export class EventListPage extends TablePage { @property() order = "-created"; - apiEndpoint(page: number): Promise> { + apiEndpoint(page: number): Promise> { return Event.list({ ordering: this.order, page: page, diff --git a/web/src/pages/events/RuleListPage.ts b/web/src/pages/events/RuleListPage.ts index 75850bce2..dff3c5cec 100644 --- a/web/src/pages/events/RuleListPage.ts +++ b/web/src/pages/events/RuleListPage.ts @@ -1,6 +1,6 @@ import { gettext } from "django"; import { customElement, html, property, TemplateResult } from "lit-element"; -import { PBResponse } from "../../api/Client"; +import { AKResponse } from "../../api/Client"; import { TablePage } from "../../elements/table/TablePage"; import "../../elements/policies/BoundPoliciesList"; @@ -29,7 +29,7 @@ export class RuleListPage extends TablePage { @property() order = "name"; - apiEndpoint(page: number): Promise> { + apiEndpoint(page: number): Promise> { return Rule.list({ ordering: this.order, page: page, diff --git a/web/src/pages/events/TransportListPage.ts b/web/src/pages/events/TransportListPage.ts index bacfb4287..fb8ed123c 100644 --- a/web/src/pages/events/TransportListPage.ts +++ b/web/src/pages/events/TransportListPage.ts @@ -1,6 +1,6 @@ import { gettext } from "django"; import { customElement, html, property, TemplateResult } from "lit-element"; -import { DefaultClient, PBResponse } from "../../api/Client"; +import { DefaultClient, AKResponse } from "../../api/Client"; import { TablePage } from "../../elements/table/TablePage"; import "../../elements/buttons/ActionButton"; @@ -27,7 +27,7 @@ export class TransportListPage extends TablePage { @property() order = "name"; - apiEndpoint(page: number): Promise> { + apiEndpoint(page: number): Promise> { return Transport.list({ ordering: this.order, page: page, diff --git a/web/src/pages/flows/BoundStagesList.ts b/web/src/pages/flows/BoundStagesList.ts index c575dc77b..3f957e735 100644 --- a/web/src/pages/flows/BoundStagesList.ts +++ b/web/src/pages/flows/BoundStagesList.ts @@ -1,6 +1,6 @@ import { gettext } from "django"; import { customElement, html, property, TemplateResult } from "lit-element"; -import { PBResponse } from "../../api/Client"; +import { AKResponse } from "../../api/Client"; import { Table, TableColumn } from "../../elements/table/Table"; import "../../elements/Tabs"; @@ -17,7 +17,7 @@ export class BoundStagesList extends Table { @property() target?: string; - apiEndpoint(page: number): Promise> { + apiEndpoint(page: number): Promise> { return FlowStageBinding.list({ target: this.target || "", ordering: "order", diff --git a/web/src/pages/outposts/OutpostListPage.ts b/web/src/pages/outposts/OutpostListPage.ts index 59dc2a3b2..d155c6596 100644 --- a/web/src/pages/outposts/OutpostListPage.ts +++ b/web/src/pages/outposts/OutpostListPage.ts @@ -1,7 +1,7 @@ import { gettext } from "django"; import { customElement, property } from "lit-element"; import { html, TemplateResult } from "lit-html"; -import { PBResponse } from "../../api/Client"; +import { AKResponse } from "../../api/Client"; import { Outpost } from "../../api/Outposts"; import { TableColumn } from "../../elements/table/Table"; import { TablePage } from "../../elements/table/TablePage"; @@ -25,7 +25,7 @@ export class OutpostListPage extends TablePage { searchEnabled(): boolean { return true; } - apiEndpoint(page: number): Promise> { + apiEndpoint(page: number): Promise> { return Outpost.list({ ordering: this.order, page: page, diff --git a/web/src/pages/property-mappings/PropertyMappingListPage.ts b/web/src/pages/property-mappings/PropertyMappingListPage.ts index 579e673b7..ba3fa5fea 100644 --- a/web/src/pages/property-mappings/PropertyMappingListPage.ts +++ b/web/src/pages/property-mappings/PropertyMappingListPage.ts @@ -1,7 +1,7 @@ import { gettext } from "django"; import { customElement, html, property, TemplateResult } from "lit-element"; import { PropertyMapping } from "../../api/PropertyMapping"; -import { PBResponse } from "../../api/Client"; +import { AKResponse } from "../../api/Client"; import { TablePage } from "../../elements/table/TablePage"; import "../../elements/buttons/ModalButton"; @@ -30,7 +30,7 @@ export class PropertyMappingListPage extends TablePage { @property({type: Boolean}) hideManaged = false; - apiEndpoint(page: number): Promise> { + apiEndpoint(page: number): Promise> { return PropertyMapping.list({ ordering: this.order, page: page, diff --git a/web/src/pages/providers/ProviderListPage.ts b/web/src/pages/providers/ProviderListPage.ts index 102b68e12..e759286cb 100644 --- a/web/src/pages/providers/ProviderListPage.ts +++ b/web/src/pages/providers/ProviderListPage.ts @@ -1,7 +1,7 @@ import { gettext } from "django"; import { customElement, html, property, TemplateResult } from "lit-element"; import { Provider } from "../../api/Providers"; -import { PBResponse } from "../../api/Client"; +import { AKResponse } from "../../api/Client"; import { TablePage } from "../../elements/table/TablePage"; import "../../elements/buttons/ModalButton"; @@ -27,7 +27,7 @@ export class ProviderListPage extends TablePage { @property() order = "name"; - apiEndpoint(page: number): Promise> { + apiEndpoint(page: number): Promise> { return Provider.list({ ordering: this.order, page: page, diff --git a/web/src/pages/sources/LDAPSourceViewPage.ts b/web/src/pages/sources/LDAPSourceViewPage.ts index 88017b404..f93fe04b1 100644 --- a/web/src/pages/sources/LDAPSourceViewPage.ts +++ b/web/src/pages/sources/LDAPSourceViewPage.ts @@ -4,6 +4,7 @@ import { COMMON_STYLES } from "../../common/styles"; import "../../elements/buttons/ModalButton"; import "../../elements/buttons/SpinnerButton"; +import "../../elements/buttons/ActionButton"; import "../../elements/CodeMirror"; import "../../elements/Tabs"; import { Page } from "../../elements/Page"; @@ -112,7 +113,7 @@ export class LDAPSourceViewPage extends Page { return gettext("Not synced in the last hour, check System tasks."); } const syncDate = new Date(ls.last_sync * 1000); - return gettext(`Last sync: ${syncDate.toLocaleString()}`) + return gettext(`Last sync: ${syncDate.toLocaleString()}`); }), "loading")}

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 { pageTitle(): string { @@ -23,7 +26,7 @@ export class SourceListPage extends TablePage { @property() order = "name"; - apiEndpoint(page: number): Promise> { + apiEndpoint(page: number): Promise> { return Source.list({ ordering: this.order, page: page,