@things-factory/edge 7.0.1-alpha.9 → 7.0.1-alpha.90
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -69,10 +69,7 @@ export class EdgeStatusPage extends connect(store)(localize(i18next)(PageView))
|
|
|
69
69
|
return html`
|
|
70
70
|
<ox-grist .mode=${mode} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}>
|
|
71
71
|
<div slot="headroom" class="header">
|
|
72
|
-
<div class="title">
|
|
73
|
-
<mwc-icon>summarize</mwc-icon>
|
|
74
|
-
${i18next.t('label.connections')}
|
|
75
|
-
</div>
|
|
72
|
+
<div class="title">${i18next.t('label.connections')}</div>
|
|
76
73
|
|
|
77
74
|
<ox-context-page-toolbar class="actions" .context=${this.context}></ox-context-page-toolbar>
|
|
78
75
|
</div>
|
|
@@ -138,10 +135,6 @@ export class EdgeStatusPage extends connect(store)(localize(i18next)(PageView))
|
|
|
138
135
|
pagination: { infinite: true },
|
|
139
136
|
sorters: []
|
|
140
137
|
}
|
|
141
|
-
|
|
142
|
-
await this.updateComplete
|
|
143
|
-
|
|
144
|
-
this.grist.fetch()
|
|
145
138
|
}
|
|
146
139
|
|
|
147
140
|
async pageUpdated(changes: any, lifecycle: any) {
|
|
@@ -42,10 +42,7 @@ let EdgeStatusPage = class EdgeStatusPage extends connect(store)(localize(i18nex
|
|
|
42
42
|
return html `
|
|
43
43
|
<ox-grist .mode=${mode} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}>
|
|
44
44
|
<div slot="headroom" class="header">
|
|
45
|
-
<div class="title">
|
|
46
|
-
<mwc-icon>summarize</mwc-icon>
|
|
47
|
-
${i18next.t('label.connections')}
|
|
48
|
-
</div>
|
|
45
|
+
<div class="title">${i18next.t('label.connections')}</div>
|
|
49
46
|
|
|
50
47
|
<ox-context-page-toolbar class="actions" .context=${this.context}></ox-context-page-toolbar>
|
|
51
48
|
</div>
|
|
@@ -110,8 +107,6 @@ let EdgeStatusPage = class EdgeStatusPage extends connect(store)(localize(i18nex
|
|
|
110
107
|
pagination: { infinite: true },
|
|
111
108
|
sorters: []
|
|
112
109
|
};
|
|
113
|
-
await this.updateComplete;
|
|
114
|
-
this.grist.fetch();
|
|
115
110
|
}
|
|
116
111
|
async pageUpdated(changes, lifecycle) {
|
|
117
112
|
if (this.active) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"edge-status-page.js","sourceRoot":"","sources":["../../client/pages/edge-status-page.ts"],"names":[],"mappings":";AAAA,OAAO,qBAAqB,CAAA;AAC5B,OAAO,6CAA6C,CAAA;AACpD,OAAO,2CAA2C,CAAA;AAElD,OAAO,EAAkB,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC/C,OAAO,EAAE,aAAa,EAAY,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACzE,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAA;AACtD,OAAO,GAAG,MAAM,aAAa,CAAA;AAE7B,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,SAAS,EAA4B,MAAM,qBAAqB,CAAA;AACzE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAEjD,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAGxC,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,OAAO,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,CAAC;IAAxE;;QAsBY,SAAI,GAA6B,cAAc,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAA;
|
|
1
|
+
{"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C,CAAA;IACH,CAAC;;AAxJM,qBAAM,GAAG;IACd,eAAe;IACf,kBAAkB;IAClB,GAAG,CAAA;;;;;;;;;;;;;;KAcF;CACF,CAAA;AAED;IAAC,KAAK,EAAE;;mDAAyB;AACjC;IAAC,KAAK,EAAE;;4CAA4E;AACpF;IAAC,KAAK,EAAE;;6CAAyB;AAEjC;IAAC,KAAK,CAAC,UAAU,CAAC;8BAAiB,SAAS;6CAAA;AAzBjC,cAAc;IAD1B,aAAa,CAAC,kBAAkB,CAAC;GACrB,cAAc,CA0J1B;SA1JY,cAAc","sourcesContent":["import '@operato/data-grist'\nimport '@operato/context/ox-context-page-toolbar.js'\nimport '@operato/input/ox-input-select-buttons.js'\n\nimport { PropertyValues, css, html } from 'lit'\nimport { customElement, property, query, state } from 'lit/decorators.js'\nimport { connect } from 'pwa-helpers/connect-mixin.js'\nimport gql from 'graphql-tag'\n\nimport { store, PageView } from '@operato/shell'\nimport { client } from '@operato/graphql'\nimport { DataGrist, FetchOption, GristRecord } from '@operato/data-grist'\nimport { i18next, localize } from '@operato/i18n'\nimport { openPopup } from '@operato/layout'\nimport { CommonHeaderStyles, ScrollbarStyles } from '@operato/styles'\nimport { isMobileDevice } from '@operato/utils'\n\n@customElement('edge-status-page')\nexport class EdgeStatusPage extends connect(store)(localize(i18next)(PageView)) {\n static styles = [\n ScrollbarStyles,\n CommonHeaderStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n overflow: hidden;\n\n --grid-header-padding: 2px 0 2px 9px;\n }\n\n ox-grist {\n overflow-y: auto;\n flex: 1;\n }\n `\n ]\n\n @state() private gristConfig: any\n @state() private mode: 'CARD' | 'GRID' | 'LIST' = isMobileDevice() ? 'CARD' : 'GRID'\n @state() private state?: string[]\n\n @query('ox-grist') private grist!: DataGrist\n\n get context() {\n return {\n title: i18next.t('title.edge-status'),\n search: {\n handler: (search: string) => {\n this.grist.searchText = search\n },\n value: this.grist?.searchText || ''\n },\n filter: {\n handler: () => {\n this.grist.toggleHeadroom()\n }\n },\n help: 'edge/edge-status',\n actions: [],\n toolbar: false\n }\n }\n\n render() {\n const mode = this.mode || (isMobileDevice() ? 'LIST' : 'GRID')\n\n return html`\n <ox-grist .mode=${mode} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}>\n <div slot=\"headroom\" class=\"header\">\n <div class=\"title\">${i18next.t('label.connections')}</div>\n\n <ox-context-page-toolbar class=\"actions\" .context=${this.context}></ox-context-page-toolbar>\n </div>\n </ox-grist>\n `\n }\n\n async pageInitialized(lifecycle) {\n this.gristConfig = {\n list: {\n fields: ['name', 'description'],\n details: ['active', 'updatedAt']\n },\n columns: [\n { type: 'gutter', gutterName: 'sequence' },\n {\n type: 'string',\n name: 'domain',\n header: i18next.t('field.domain'),\n record: {\n renderer: value => value.name\n },\n width: 200\n },\n {\n type: 'string',\n name: 'type',\n header: i18next.t('field.type'),\n width: 150\n },\n {\n type: 'string',\n name: 'name',\n header: i18next.t('field.name'),\n width: 150\n },\n {\n type: 'string',\n name: 'description',\n header: i18next.t('field.description'),\n width: 200\n },\n {\n type: 'checkbox',\n name: 'active',\n label: true,\n header: i18next.t('field.active'),\n width: 60\n },\n {\n type: 'string',\n name: 'state',\n label: true,\n header: i18next.t('field.status'),\n width: 100\n }\n ],\n rows: {\n appendable: false,\n selectable: false,\n handlers: {}\n },\n pagination: { infinite: true },\n sorters: []\n }\n }\n\n async pageUpdated(changes: any, lifecycle: any) {\n if (this.active) {\n // do something here when this page just became as active\n }\n }\n\n async fetchHandler() {\n const response = await client.query({\n query: gql`\n query {\n responses: connectionsOnEdge {\n domain {\n id\n name\n subdomain\n }\n id\n type\n name\n description\n endpoint\n active\n state\n }\n }\n `\n })\n\n return {\n total: response.data.responses.length || 0,\n records: response.data.responses || []\n }\n }\n}\n"]}
|