perf(webui): use addressToComponents to get attribute addresses without querying backend
ci/woodpecker/push/woodpecker Pipeline failed
Details
ci/woodpecker/push/woodpecker Pipeline failed
Details
parent
b5c3e1758b
commit
db85fc11a6
|
@ -207,11 +207,7 @@ export class UpEndApi {
|
||||||
}
|
}
|
||||||
|
|
||||||
public async getAddress(
|
public async getAddress(
|
||||||
input:
|
input: { urlContent: string } | ADDRESS_TYPE
|
||||||
| { attribute: string }
|
|
||||||
| { url: string }
|
|
||||||
| { urlContent: string }
|
|
||||||
| ADDRESS_TYPE
|
|
||||||
): Promise<string> {
|
): Promise<string> {
|
||||||
let response: Response;
|
let response: Response;
|
||||||
if (typeof input === "string") {
|
if (typeof input === "string") {
|
||||||
|
|
|
@ -23,9 +23,11 @@
|
||||||
if (to.entity) {
|
if (to.entity) {
|
||||||
targetHref = to.entity;
|
targetHref = to.entity;
|
||||||
} else if (to.attribute) {
|
} else if (to.attribute) {
|
||||||
api.getAddress({ attribute: to.attribute }).then((address) => {
|
api
|
||||||
targetHref = address;
|
.componentsToAddress({ t: "Attribute", c: to.attribute })
|
||||||
});
|
.then((address) => {
|
||||||
|
targetHref = address;
|
||||||
|
});
|
||||||
} else if (to.surfaceAttribute) {
|
} else if (to.surfaceAttribute) {
|
||||||
targetHref = `surface:${to.surfaceAttribute}`;
|
targetHref = `surface:${to.surfaceAttribute}`;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue