web: cleanup routes

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-03-28 16:10:00 +02:00
parent 6f6fe6ad06
commit 956d868106
5 changed files with 5 additions and 17 deletions

View file

@ -19,10 +19,6 @@ import PFBase from "@patternfly/patternfly/patternfly-base.css";
@customElement("ak-application-view")
export class ApplicationViewPage extends LitElement {
@property()
set args(value: { [key: string]: string }) {
this.applicationSlug = value.slug;
}
@property()
set applicationSlug(value: string) {

View file

@ -13,7 +13,7 @@ import { PAGE_SIZE } from "../../constants";
import { AdminURLManager } from "../../api/legacy";
import { DEFAULT_CONFIG } from "../../api/Config";
@customElement("ak-crypto-certificatekeypair-list")
@customElement("ak-crypto-certificate-list")
export class CertificateKeyPairListPage extends TablePage<CertificateKeyPair> {
expandable = true;

View file

@ -11,10 +11,6 @@ import "./EventInfo";
@customElement("ak-event-info-page")
export class EventInfoPage extends LitElement {
@property()
set args(value: { [key: string]: string }) {
this.eventID = value.id;
}
@property()
set eventID(value: string) {

View file

@ -12,10 +12,6 @@ import "./SAMLSourceViewPage";
@customElement("ak-source-view")
export class SourceViewPage extends LitElement {
@property()
set args(value: { [key: string]: string }) {
this.sourceSlug = value.slug;
}
@property({ type: String })
set sourceSlug(slug: string) {

View file

@ -44,11 +44,11 @@ export const ROUTES: Route[] = [
}),
new Route(new RegExp("^/core/applications$"), html`<ak-application-list></ak-application-list>`),
new Route(new RegExp(`^/core/applications/(?<slug>${SLUG_REGEX})$`)).then((args) => {
return html`<ak-application-view .args=${args}></ak-application-view>`;
return html`<ak-application-view .applicationSlug=${args.slug}></ak-application-view>`;
}),
new Route(new RegExp("^/core/sources$"), html`<ak-source-list></ak-source-list>`),
new Route(new RegExp(`^/core/sources/(?<slug>${SLUG_REGEX})$`)).then((args) => {
return html`<ak-source-view .args=${args}></ak-source-view>`;
return html`<ak-source-view .sourceSlug=${args.slug}></ak-source-view>`;
}),
new Route(new RegExp("^/core/property-mappings$"), html`<ak-property-mapping-list></ak-property-mapping-list>`),
new Route(new RegExp("^/core/tokens$"), html`<ak-token-list></ak-token-list>`),
@ -67,12 +67,12 @@ export const ROUTES: Route[] = [
}),
new Route(new RegExp("^/events/log$"), html`<ak-event-list></ak-event-list>`),
new Route(new RegExp(`^/events/log/(?<id>${UUID_REGEX})$`)).then((args) => {
return html`<ak-event-info-page .args=${args}></ak-event-info-page>`;
return html`<ak-event-info-page .eventID=${args.id}></ak-event-info-page>`;
}),
new Route(new RegExp("^/events/transports$"), html`<ak-event-transport-list></ak-event-transport-list>`),
new Route(new RegExp("^/events/rules$"), html`<ak-event-rule-list></ak-event-rule-list>`),
new Route(new RegExp("^/outpost/outposts$"), html`<ak-outpost-list></ak-outpost-list>`),
new Route(new RegExp("^/outpost/service-connections$"), html`<ak-outpost-service-connection-list></ak-outpost-service-connection-list>`),
new Route(new RegExp("^/crypto/certificates$"), html`<ak-crypto-certificatekeypair-list></ak-crypto-certificatekeypair-list>`),
new Route(new RegExp("^/crypto/certificates$"), html`<ak-crypto-certificate-list></ak-crypto-certificate-list>`),
new Route(new RegExp("^/user$"), html`<ak-user-settings></ak-user-settings>`),
];