@things-factory/edge 9.0.0-beta.27 → 9.0.0-beta.29

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.
Files changed (45) hide show
  1. package/dist-client/bootstrap.d.ts +1 -0
  2. package/dist-client/bootstrap.js +2 -0
  3. package/dist-client/bootstrap.js.map +1 -0
  4. package/dist-client/index.d.ts +0 -0
  5. package/dist-client/index.js +2 -0
  6. package/dist-client/index.js.map +1 -0
  7. package/dist-client/pages/edge-status-page.d.ts +39 -0
  8. package/dist-client/pages/edge-status-page.js +182 -0
  9. package/dist-client/pages/edge-status-page.js.map +1 -0
  10. package/dist-client/route.d.ts +1 -0
  11. package/dist-client/route.js +8 -0
  12. package/dist-client/route.js.map +1 -0
  13. package/dist-client/tsconfig.tsbuildinfo +1 -0
  14. package/dist-server/controllers/connect-connections.d.ts +1 -0
  15. package/dist-server/controllers/connect-connections.js +70 -0
  16. package/dist-server/controllers/connect-connections.js.map +1 -0
  17. package/dist-server/controllers/disconnect-connections.d.ts +1 -0
  18. package/dist-server/controllers/disconnect-connections.js +65 -0
  19. package/dist-server/controllers/disconnect-connections.js.map +1 -0
  20. package/dist-server/controllers/log-aggregator.d.ts +6 -0
  21. package/dist-server/controllers/log-aggregator.js +20 -0
  22. package/dist-server/controllers/log-aggregator.js.map +1 -0
  23. package/dist-server/controllers/operato-client.d.ts +2 -0
  24. package/dist-server/controllers/operato-client.js +88 -0
  25. package/dist-server/controllers/operato-client.js.map +1 -0
  26. package/dist-server/controllers/run-task.d.ts +1 -0
  27. package/dist-server/controllers/run-task.js +86 -0
  28. package/dist-server/controllers/run-task.js.map +1 -0
  29. package/dist-server/controllers/sync-connections.d.ts +1 -0
  30. package/dist-server/controllers/sync-connections.js +73 -0
  31. package/dist-server/controllers/sync-connections.js.map +1 -0
  32. package/dist-server/index.d.ts +1 -0
  33. package/dist-server/index.js +20 -0
  34. package/dist-server/index.js.map +1 -0
  35. package/dist-server/service/connection/connection-query.d.ts +4 -0
  36. package/dist-server/service/connection/connection-query.js +29 -0
  37. package/dist-server/service/connection/connection-query.js.map +1 -0
  38. package/dist-server/service/connection/index.d.ts +2 -0
  39. package/dist-server/service/connection/index.js +6 -0
  40. package/dist-server/service/connection/index.js.map +1 -0
  41. package/dist-server/service/index.d.ts +5 -0
  42. package/dist-server/service/index.js +19 -0
  43. package/dist-server/service/index.js.map +1 -0
  44. package/dist-server/tsconfig.tsbuildinfo +1 -0
  45. package/package.json +6 -6
@@ -0,0 +1 @@
1
+ export default function bootstrap(): void;
@@ -0,0 +1,2 @@
1
+ export default function bootstrap() { }
2
+ //# sourceMappingURL=bootstrap.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bootstrap.js","sourceRoot":"","sources":["../client/bootstrap.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,SAAS,KAAI,CAAC","sourcesContent":["export default function bootstrap() {}\n"]}
File without changes
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../client/index.ts"],"names":[],"mappings":"","sourcesContent":[""]}
@@ -0,0 +1,39 @@
1
+ import '@operato/data-grist';
2
+ import '@operato/context/ox-context-page-toolbar.js';
3
+ import '@operato/input/ox-input-select-buttons.js';
4
+ import { PageView } from '@operato/shell';
5
+ declare const EdgeStatusPage_base: (new (...args: any[]) => {
6
+ _storeUnsubscribe: import("redux").Unsubscribe;
7
+ connectedCallback(): void;
8
+ disconnectedCallback(): void;
9
+ stateChanged(_state: unknown): void;
10
+ readonly isConnected: boolean;
11
+ }) & (new (...args: any[]) => import("lit").LitElement) & typeof PageView;
12
+ export declare class EdgeStatusPage extends EdgeStatusPage_base {
13
+ static styles: import("lit").CSSResult[];
14
+ private gristConfig;
15
+ private mode;
16
+ private state?;
17
+ private grist;
18
+ get context(): {
19
+ title: string;
20
+ search: {
21
+ handler: (search: string) => void;
22
+ value: string;
23
+ };
24
+ filter: {
25
+ handler: () => void;
26
+ };
27
+ help: string;
28
+ actions: never[];
29
+ toolbar: boolean;
30
+ };
31
+ render(): import("lit-html").TemplateResult<1>;
32
+ pageInitialized(lifecycle: any): Promise<void>;
33
+ pageUpdated(changes: any, lifecycle: any): Promise<void>;
34
+ fetchHandler(): Promise<{
35
+ total: any;
36
+ records: any;
37
+ }>;
38
+ }
39
+ export {};
@@ -0,0 +1,182 @@
1
+ import { __decorate, __metadata } from "tslib";
2
+ import '@operato/data-grist';
3
+ import '@operato/context/ox-context-page-toolbar.js';
4
+ import '@operato/input/ox-input-select-buttons.js';
5
+ import { css, html } from 'lit';
6
+ import { customElement, query, state } from 'lit/decorators.js';
7
+ import { connect } from 'pwa-helpers/connect-mixin.js';
8
+ import gql from 'graphql-tag';
9
+ import { store, PageView } from '@operato/shell';
10
+ import { client } from '@operato/graphql';
11
+ import { DataGrist } from '@operato/data-grist';
12
+ import { i18next, localize } from '@operato/i18n';
13
+ import { CommonHeaderStyles, ScrollbarStyles } from '@operato/styles';
14
+ import { isMobileDevice } from '@operato/utils';
15
+ let EdgeStatusPage = class EdgeStatusPage extends connect(store)(localize(i18next)(PageView)) {
16
+ constructor() {
17
+ super(...arguments);
18
+ this.mode = isMobileDevice() ? 'CARD' : 'GRID';
19
+ }
20
+ get context() {
21
+ var _a;
22
+ return {
23
+ title: i18next.t('title.edge-status'),
24
+ search: {
25
+ handler: (search) => {
26
+ this.grist.searchText = search;
27
+ },
28
+ value: ((_a = this.grist) === null || _a === void 0 ? void 0 : _a.searchText) || ''
29
+ },
30
+ filter: {
31
+ handler: () => {
32
+ this.grist.toggleHeadroom();
33
+ }
34
+ },
35
+ help: 'edge/edge-status',
36
+ actions: [],
37
+ toolbar: false
38
+ };
39
+ }
40
+ render() {
41
+ const mode = this.mode || (isMobileDevice() ? 'LIST' : 'GRID');
42
+ return html `
43
+ <ox-grist .mode=${mode} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}>
44
+ <div slot="headroom" class="header">
45
+ <div class="title">${i18next.t('label.connections')}</div>
46
+
47
+ <ox-context-page-toolbar class="actions" .context=${this.context}></ox-context-page-toolbar>
48
+ </div>
49
+ </ox-grist>
50
+ `;
51
+ }
52
+ async pageInitialized(lifecycle) {
53
+ this.gristConfig = {
54
+ list: {
55
+ fields: ['name', 'description'],
56
+ details: ['active', 'updatedAt']
57
+ },
58
+ columns: [
59
+ { type: 'gutter', gutterName: 'sequence' },
60
+ {
61
+ type: 'string',
62
+ name: 'domain',
63
+ header: i18next.t('field.domain'),
64
+ record: {
65
+ renderer: value => value.name
66
+ },
67
+ width: 200
68
+ },
69
+ {
70
+ type: 'string',
71
+ name: 'type',
72
+ header: i18next.t('field.type'),
73
+ width: 150
74
+ },
75
+ {
76
+ type: 'string',
77
+ name: 'name',
78
+ header: i18next.t('field.name'),
79
+ width: 150
80
+ },
81
+ {
82
+ type: 'string',
83
+ name: 'description',
84
+ header: i18next.t('field.description'),
85
+ width: 200
86
+ },
87
+ {
88
+ type: 'checkbox',
89
+ name: 'active',
90
+ label: true,
91
+ header: i18next.t('field.active'),
92
+ width: 60
93
+ },
94
+ {
95
+ type: 'string',
96
+ name: 'state',
97
+ label: true,
98
+ header: i18next.t('field.status'),
99
+ width: 100
100
+ }
101
+ ],
102
+ rows: {
103
+ appendable: false,
104
+ selectable: false,
105
+ handlers: {}
106
+ },
107
+ pagination: { infinite: true },
108
+ sorters: []
109
+ };
110
+ }
111
+ async pageUpdated(changes, lifecycle) {
112
+ if (this.active) {
113
+ // do something here when this page just became as active
114
+ }
115
+ }
116
+ async fetchHandler() {
117
+ const response = await client.query({
118
+ query: gql `
119
+ query {
120
+ responses: connectionsOnEdge {
121
+ domain {
122
+ id
123
+ name
124
+ subdomain
125
+ }
126
+ id
127
+ type
128
+ name
129
+ description
130
+ endpoint
131
+ active
132
+ state
133
+ }
134
+ }
135
+ `
136
+ });
137
+ return {
138
+ total: response.data.responses.length || 0,
139
+ records: response.data.responses || []
140
+ };
141
+ }
142
+ };
143
+ EdgeStatusPage.styles = [
144
+ ScrollbarStyles,
145
+ CommonHeaderStyles,
146
+ css `
147
+ :host {
148
+ display: flex;
149
+ flex-direction: column;
150
+
151
+ overflow: hidden;
152
+
153
+ --grid-header-padding: 2px 0 2px 9px;
154
+ }
155
+
156
+ ox-grist {
157
+ overflow-y: auto;
158
+ flex: 1;
159
+ }
160
+ `
161
+ ];
162
+ __decorate([
163
+ state(),
164
+ __metadata("design:type", Object)
165
+ ], EdgeStatusPage.prototype, "gristConfig", void 0);
166
+ __decorate([
167
+ state(),
168
+ __metadata("design:type", String)
169
+ ], EdgeStatusPage.prototype, "mode", void 0);
170
+ __decorate([
171
+ state(),
172
+ __metadata("design:type", Array)
173
+ ], EdgeStatusPage.prototype, "state", void 0);
174
+ __decorate([
175
+ query('ox-grist'),
176
+ __metadata("design:type", DataGrist)
177
+ ], EdgeStatusPage.prototype, "grist", void 0);
178
+ EdgeStatusPage = __decorate([
179
+ customElement('edge-status-page')
180
+ ], EdgeStatusPage);
181
+ export { EdgeStatusPage };
182
+ //# sourceMappingURL=edge-status-page.js.map
@@ -0,0 +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,EA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oBACb,KAAK,EAAE,IAAI;oBACX,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,cAAc,CAAC;oBACjC,KAAK,EAAE,GAAG;iBACX;aACF;YACD,IAAI,EAAE;gBACJ,UAAU,EAAE,KAAK;gBACjB,UAAU,EAAE,KAAK;gBACjB,QAAQ,EAAE,EAAE;aACb;YACD,UAAU,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;YAC9B,OAAO,EAAE,EAAE;SACZ,CAAA;IACH,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,OAAY,EAAE,SAAc;QAC5C,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,yDAAyD;QAC3D,CAAC;IACH,CAAC;IAED,KAAK,CAAC,YAAY;QAChB,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC;YAClC,KAAK,EAAE,GAAG,CAAA;;;;;;;;;;;;;;;;;OAiBT;SACF,CAAC,CAAA;QAEF,OAAO;YACL,KAAK,EAAE,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,IAAI,CAAC;YAC1C,OAAO,EAAE,QAAQ,CAAC,IAAI,CAAC,SAAS,IAAI,EAAE;SACvC,CAAA;IACH,CAAC;;AAxJM,qBAAM,GAAG;IACd,eAAe;IACf,kBAAkB;IAClB,GAAG,CAAA;;;;;;;;;;;;;;KAcF;CACF,AAlBY,CAkBZ;AAEgB;IAAhB,KAAK,EAAE;;mDAAyB;AAChB;IAAhB,KAAK,EAAE;;4CAA4E;AACnE;IAAhB,KAAK,EAAE;;6CAAyB;AAEN;IAA1B,KAAK,CAAC,UAAU,CAAC;8BAAiB,SAAS;6CAAA;AAzBjC,cAAc;IAD1B,aAAa,CAAC,kBAAkB,CAAC;GACrB,cAAc,CA0J1B","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"]}
@@ -0,0 +1 @@
1
+ export default function route(page: string): "edge-status-page" | undefined;
@@ -0,0 +1,8 @@
1
+ export default function route(page) {
2
+ switch (page) {
3
+ case 'edge-status-page':
4
+ import('./pages/edge-status-page');
5
+ return page;
6
+ }
7
+ }
8
+ //# sourceMappingURL=route.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"route.js","sourceRoot":"","sources":["../client/route.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,IAAY;IACxC,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,kBAAkB;YACrB,MAAM,CAAC,0BAA0B,CAAC,CAAA;YAClC,OAAO,IAAI,CAAA;IACf,CAAC;AACH,CAAC","sourcesContent":["export default function route(page: string) {\n switch (page) {\n case 'edge-status-page':\n import('./pages/edge-status-page')\n return page\n }\n}\n"]}