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(
|
||||
input:
|
||||
| { attribute: string }
|
||||
| { url: string }
|
||||
| { urlContent: string }
|
||||
| ADDRESS_TYPE
|
||||
input: { urlContent: string } | ADDRESS_TYPE
|
||||
): Promise<string> {
|
||||
let response: Response;
|
||||
if (typeof input === "string") {
|
||||
|
|
|
@ -23,9 +23,11 @@
|
|||
if (to.entity) {
|
||||
targetHref = to.entity;
|
||||
} else if (to.attribute) {
|
||||
api.getAddress({ attribute: to.attribute }).then((address) => {
|
||||
targetHref = address;
|
||||
});
|
||||
api
|
||||
.componentsToAddress({ t: "Attribute", c: to.attribute })
|
||||
.then((address) => {
|
||||
targetHref = address;
|
||||
});
|
||||
} else if (to.surfaceAttribute) {
|
||||
targetHref = `surface:${to.surfaceAttribute}`;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue