Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

Improve responsiveness of add asset dialog (#1791)

DonWillemsd7a35e92027f
diff --git a/ui/component/or-asset-tree/src/or-add-asset-dialog.ts b/ui/component/or-asset-tree/src/or-add-asset-dialog.ts
index 300427efa..ec351a704 100644
--- a/ui/component/or-asset-tree/src/or-add-asset-dialog.ts
+++ b/ui/component/or-asset-tree/src/or-add-asset-dialog.ts
@@ -82,6 +82,12 @@ export class OrAddAssetDialog extends LitElement {
public static get styles() {
// language=CSS
return css`
+ :host{
+ border-style: solid;
+ border-color: var(--or-app-color5, ${unsafeCSS(DefaultColor5)});
+ border-width: 1px 0;
+ }
+
#name-wrapper {
display: flex;
flex-direction: column;
@@ -114,11 +120,9 @@ export class OrAddAssetDialog extends LitElement {
#mdc-dialog-form-add {
display: flex;
- height: 600px;
+ height: 100%;
+ max-height: 600px;
width: 1000px;
- border-style: solid;
- border-color: var(--or-app-color5, ${unsafeCSS(DefaultColor5)});
- border-width: 1px 0;
}
.msg {
@@ -225,7 +229,7 @@ export class OrAddAssetDialog extends LitElement {
const parentStr = this.parent ? this.parent.name + " (" + this.parent.id + ")" : i18next.t("none");
return html`
- <div class="col">
+ <div class="col" style="height: 100%;">
<form id="mdc-dialog-form-add" class="row">
<div id="type-list" class="col">
${createListGroup(lists)}
diff --git a/ui/component/or-rules/src/json-viewer/or-rule-action-notification.ts b/ui/component/or-rules/src/json-viewer/or-rule-action-notification.ts
index 9cae09243..073f840c2 100644
--- a/ui/component/or-rules/src/json-viewer/or-rule-action-notification.ts
+++ b/ui/component/or-rules/src/json-viewer/or-rule-action-notification.ts
@@ -186,7 +186,7 @@ export class OrRuleActionNotification extends LitElement {
const realm = await manager.rest.api.RealmResource.get(manager.displayRealm);
let realmRoleOpts: [string, string][] = realm.data.realmRoles!.filter(r => Util.realmRoleFilter(r)).map(r => ["linked-" + r.name!, linkedLabel + ": " + i18next.t("realmRole." + r.name, Util.camelCaseToSentenceCase(r.name!.replace("_", " ").replace("-", " ")))]);
let values: [string, string][] = usersResponse.data.map((user) => [user.id!, user.username!]);
- return [["linkedUsers", linkedLabel], ...realmRoleOpts, ...values];
+ return [["linkedUsers", linkedLabel], ...realmRoleOpts, ...values.sort(Util.sortByString(user => user[1]))];
}
);
label = i18next.t("user_plural");