perf(webui): use addressToComponents to get attribute addresses without querying backend
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
This commit is contained in:
parent
b5c3e1758b
commit
db85fc11a6
2 changed files with 6 additions and 8 deletions
|
@ -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,7 +23,9 @@
|
|||
if (to.entity) {
|
||||
targetHref = to.entity;
|
||||
} else if (to.attribute) {
|
||||
api.getAddress({ attribute: to.attribute }).then((address) => {
|
||||
api
|
||||
.componentsToAddress({ t: "Attribute", c: to.attribute })
|
||||
.then((address) => {
|
||||
targetHref = address;
|
||||
});
|
||||
} else if (to.surfaceAttribute) {
|
||||
|
|
Loading…
Reference in a new issue