@things-factory/integration-ui 9.2.29 → 9.2.31

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.
@@ -0,0 +1,145 @@
1
+ import '@operato/data-grist/ox-grist.js'
2
+
3
+ import gql from 'graphql-tag'
4
+ import { css, html } from 'lit'
5
+ import { customElement, property, query } from 'lit/decorators.js'
6
+ import { connect } from 'pwa-helpers/connect-mixin'
7
+
8
+ import { DataGrist, FetchOption } from '@operato/data-grist'
9
+ import { client } from '@operato/graphql'
10
+ import { i18next, localize } from '@operato/i18n'
11
+ import { PageView, store } from '@operato/shell'
12
+ import { CommonButtonStyles, CommonGristStyles, ScrollbarStyles } from '@operato/styles'
13
+ import { isMobileDevice } from '@operato/utils'
14
+ import { p13n } from '@operato/p13n'
15
+
16
+ /**
17
+ * 서버형 커넥션(socket-server, stream-socket-server 등)에 현재 접속 중인 TCP 클라이언트 목록을 보여주는 읽기 전용 페이지
18
+ */
19
+ @customElement('connected-clients-page')
20
+ export class ConnectedClientsPage extends connect(store)(p13n(localize(i18next)(PageView))) {
21
+ static styles = [
22
+ CommonGristStyles,
23
+ ScrollbarStyles,
24
+ css`
25
+ :host {
26
+ display: flex;
27
+ flex-direction: column;
28
+
29
+ overflow: hidden;
30
+ }
31
+
32
+ ox-grist {
33
+ overflow-y: auto;
34
+ flex: 1;
35
+ }
36
+ `
37
+ ]
38
+
39
+ @property({ type: Object }) gristConfig: any
40
+
41
+ @query('ox-grist') grist!: DataGrist
42
+
43
+ get context() {
44
+ return {
45
+ title: i18next.t('text.connected clients'),
46
+ help: 'integration/ui/connected-clients',
47
+ actions: [
48
+ {
49
+ title: i18next.t('button.refresh'),
50
+ action: () => this.grist.fetch(),
51
+ ...CommonButtonStyles.preview
52
+ }
53
+ ]
54
+ }
55
+ }
56
+
57
+ render() {
58
+ return html`
59
+ <ox-grist
60
+ .mode=${isMobileDevice() ? 'LIST' : 'GRID'}
61
+ .config=${this.gristConfig}
62
+ .fetchHandler=${this.fetchHandler.bind(this)}
63
+ .personalConfigProvider=${this.getPagePreferenceProvider('ox-grist')!}
64
+ >
65
+ <ox-grist-personalizer slot="setting"></ox-grist-personalizer>
66
+ </ox-grist>
67
+ `
68
+ }
69
+
70
+ async pageInitialized() {
71
+ this.gristConfig = {
72
+ list: { fields: ['connectionName', 'remote'] },
73
+ columns: [
74
+ { type: 'gutter', gutterName: 'sequence' },
75
+ {
76
+ type: 'string',
77
+ name: 'connectionName',
78
+ label: true,
79
+ header: i18next.t('field.connection'),
80
+ record: { editable: false },
81
+ sortable: true,
82
+ width: 200
83
+ },
84
+ {
85
+ type: 'string',
86
+ name: 'connectionType',
87
+ header: i18next.t('field.type'),
88
+ record: { editable: false },
89
+ sortable: true,
90
+ width: 180
91
+ },
92
+ {
93
+ type: 'string',
94
+ name: 'endpoint',
95
+ header: i18next.t('field.endpoint'),
96
+ record: { editable: false },
97
+ sortable: true,
98
+ width: 180
99
+ },
100
+ {
101
+ type: 'string',
102
+ name: 'remote',
103
+ label: true,
104
+ header: i18next.t('field.remote address'),
105
+ record: { editable: false },
106
+ sortable: true,
107
+ width: 250
108
+ }
109
+ ],
110
+ rows: {
111
+ appendable: false
112
+ },
113
+ sorters: [
114
+ {
115
+ name: 'connectionName'
116
+ }
117
+ ]
118
+ }
119
+ }
120
+
121
+ /* 인메모리 소량 데이터이므로 페이지네이션 없이 전체를 조회한다 */
122
+ async fetchHandler({ page, limit, sortings = [], filters = [] }: FetchOption) {
123
+ const response = await client.query({
124
+ query: gql`
125
+ query {
126
+ connectedClients {
127
+ items {
128
+ connectionName
129
+ connectionType
130
+ endpoint
131
+ remote
132
+ }
133
+ total
134
+ }
135
+ }
136
+ `,
137
+ fetchPolicy: 'no-cache'
138
+ })
139
+
140
+ return {
141
+ total: response.data.connectedClients.total || 0,
142
+ records: response.data.connectedClients.items || []
143
+ }
144
+ }
145
+ }
@@ -11,7 +11,7 @@ import { client } from '@operato/graphql'
11
11
  import { HelpDecoratedRenderer } from '@operato/help/help-decorated-renderer.js'
12
12
  import { notify, openPopup } from '@operato/layout'
13
13
  import { i18next, localize } from '@operato/i18n'
14
- import { PageView, store } from '@operato/shell'
14
+ import { navigate, PageView, store } from '@operato/shell'
15
15
  import { CommonButtonStyles, CommonGristStyles, ScrollbarStyles } from '@operato/styles'
16
16
  import { isMobileDevice } from '@operato/utils'
17
17
  import { FetchOption } from '@operato/data-grist'
@@ -110,6 +110,13 @@ export class Connection extends connect(store)(p13n(localize(i18next)(PageView))
110
110
  // },
111
111
  help: 'integration/ui/connection',
112
112
  actions: [
113
+ {
114
+ title: i18next.t('button.connected clients'),
115
+ action: () => {
116
+ navigate('connected-clients')
117
+ },
118
+ ...CommonButtonStyles.preview
119
+ },
113
120
  {
114
121
  title: i18next.t('button.save'),
115
122
  action: this._updateConnectionManager.bind(this),
package/client/route.ts CHANGED
@@ -4,6 +4,10 @@ export default function route(page) {
4
4
  import('./pages/connection')
5
5
  return page
6
6
 
7
+ case 'connected-clients':
8
+ import('./pages/connected-clients')
9
+ return page
10
+
7
11
  case 'scenario':
8
12
  import('./pages/scenario')
9
13
  return page
@@ -0,0 +1,45 @@
1
+ import '@operato/data-grist/ox-grist.js';
2
+ import { DataGrist, FetchOption } from '@operato/data-grist';
3
+ import { PageView } from '@operato/shell';
4
+ declare const ConnectedClientsPage_base: (new (...args: any[]) => {
5
+ _storeUnsubscribe: import("redux").Unsubscribe;
6
+ connectedCallback(): void;
7
+ disconnectedCallback(): void;
8
+ stateChanged(_state: unknown): void;
9
+ readonly isConnected: boolean;
10
+ }) & (new (...args: any[]) => {
11
+ __preferenceProviders: {
12
+ [element: string]: import("@operato/p13n").PagePreferenceProvider;
13
+ };
14
+ getPagePreferenceProvider(element: string): import("@operato/p13n").PagePreferenceProvider | undefined;
15
+ }) & (new (...args: any[]) => import("lit").LitElement) & typeof PageView;
16
+ /**
17
+ * 서버형 커넥션(socket-server, stream-socket-server 등)에 현재 접속 중인 TCP 클라이언트 목록을 보여주는 읽기 전용 페이지
18
+ */
19
+ export declare class ConnectedClientsPage extends ConnectedClientsPage_base {
20
+ static styles: import("lit").CSSResult[];
21
+ gristConfig: any;
22
+ grist: DataGrist;
23
+ get context(): {
24
+ title: string;
25
+ help: string;
26
+ actions: {
27
+ icon: string;
28
+ emphasis: {
29
+ raised: boolean;
30
+ outlined: boolean;
31
+ dense: boolean;
32
+ danger: boolean;
33
+ };
34
+ title: string;
35
+ action: () => Promise<void>;
36
+ }[];
37
+ };
38
+ render(): import("lit-html").TemplateResult<1>;
39
+ pageInitialized(): Promise<void>;
40
+ fetchHandler({ page, limit, sortings, filters }: FetchOption): Promise<{
41
+ total: any;
42
+ records: any;
43
+ }>;
44
+ }
45
+ export {};
@@ -0,0 +1,146 @@
1
+ import { __decorate, __metadata } from "tslib";
2
+ import '@operato/data-grist/ox-grist.js';
3
+ import gql from 'graphql-tag';
4
+ import { css, html } from 'lit';
5
+ import { customElement, property, query } from 'lit/decorators.js';
6
+ import { connect } from 'pwa-helpers/connect-mixin';
7
+ import { DataGrist } from '@operato/data-grist';
8
+ import { client } from '@operato/graphql';
9
+ import { i18next, localize } from '@operato/i18n';
10
+ import { PageView, store } from '@operato/shell';
11
+ import { CommonButtonStyles, CommonGristStyles, ScrollbarStyles } from '@operato/styles';
12
+ import { isMobileDevice } from '@operato/utils';
13
+ import { p13n } from '@operato/p13n';
14
+ /**
15
+ * 서버형 커넥션(socket-server, stream-socket-server 등)에 현재 접속 중인 TCP 클라이언트 목록을 보여주는 읽기 전용 페이지
16
+ */
17
+ let ConnectedClientsPage = class ConnectedClientsPage extends connect(store)(p13n(localize(i18next)(PageView))) {
18
+ static { this.styles = [
19
+ CommonGristStyles,
20
+ ScrollbarStyles,
21
+ css `
22
+ :host {
23
+ display: flex;
24
+ flex-direction: column;
25
+
26
+ overflow: hidden;
27
+ }
28
+
29
+ ox-grist {
30
+ overflow-y: auto;
31
+ flex: 1;
32
+ }
33
+ `
34
+ ]; }
35
+ get context() {
36
+ return {
37
+ title: i18next.t('text.connected clients'),
38
+ help: 'integration/ui/connected-clients',
39
+ actions: [
40
+ {
41
+ title: i18next.t('button.refresh'),
42
+ action: () => this.grist.fetch(),
43
+ ...CommonButtonStyles.preview
44
+ }
45
+ ]
46
+ };
47
+ }
48
+ render() {
49
+ return html `
50
+ <ox-grist
51
+ .mode=${isMobileDevice() ? 'LIST' : 'GRID'}
52
+ .config=${this.gristConfig}
53
+ .fetchHandler=${this.fetchHandler.bind(this)}
54
+ .personalConfigProvider=${this.getPagePreferenceProvider('ox-grist')}
55
+ >
56
+ <ox-grist-personalizer slot="setting"></ox-grist-personalizer>
57
+ </ox-grist>
58
+ `;
59
+ }
60
+ async pageInitialized() {
61
+ this.gristConfig = {
62
+ list: { fields: ['connectionName', 'remote'] },
63
+ columns: [
64
+ { type: 'gutter', gutterName: 'sequence' },
65
+ {
66
+ type: 'string',
67
+ name: 'connectionName',
68
+ label: true,
69
+ header: i18next.t('field.connection'),
70
+ record: { editable: false },
71
+ sortable: true,
72
+ width: 200
73
+ },
74
+ {
75
+ type: 'string',
76
+ name: 'connectionType',
77
+ header: i18next.t('field.type'),
78
+ record: { editable: false },
79
+ sortable: true,
80
+ width: 180
81
+ },
82
+ {
83
+ type: 'string',
84
+ name: 'endpoint',
85
+ header: i18next.t('field.endpoint'),
86
+ record: { editable: false },
87
+ sortable: true,
88
+ width: 180
89
+ },
90
+ {
91
+ type: 'string',
92
+ name: 'remote',
93
+ label: true,
94
+ header: i18next.t('field.remote address'),
95
+ record: { editable: false },
96
+ sortable: true,
97
+ width: 250
98
+ }
99
+ ],
100
+ rows: {
101
+ appendable: false
102
+ },
103
+ sorters: [
104
+ {
105
+ name: 'connectionName'
106
+ }
107
+ ]
108
+ };
109
+ }
110
+ /* 인메모리 소량 데이터이므로 페이지네이션 없이 전체를 조회한다 */
111
+ async fetchHandler({ page, limit, sortings = [], filters = [] }) {
112
+ const response = await client.query({
113
+ query: gql `
114
+ query {
115
+ connectedClients {
116
+ items {
117
+ connectionName
118
+ connectionType
119
+ endpoint
120
+ remote
121
+ }
122
+ total
123
+ }
124
+ }
125
+ `,
126
+ fetchPolicy: 'no-cache'
127
+ });
128
+ return {
129
+ total: response.data.connectedClients.total || 0,
130
+ records: response.data.connectedClients.items || []
131
+ };
132
+ }
133
+ };
134
+ __decorate([
135
+ property({ type: Object }),
136
+ __metadata("design:type", Object)
137
+ ], ConnectedClientsPage.prototype, "gristConfig", void 0);
138
+ __decorate([
139
+ query('ox-grist'),
140
+ __metadata("design:type", DataGrist)
141
+ ], ConnectedClientsPage.prototype, "grist", void 0);
142
+ ConnectedClientsPage = __decorate([
143
+ customElement('connected-clients-page')
144
+ ], ConnectedClientsPage);
145
+ export { ConnectedClientsPage };
146
+ //# sourceMappingURL=connected-clients.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connected-clients.js","sourceRoot":"","sources":["../../client/pages/connected-clients.ts"],"names":[],"mappings":";AAAA,OAAO,iCAAiC,CAAA;AAExC,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC/B,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AAEnD,OAAO,EAAE,SAAS,EAAe,MAAM,qBAAqB,CAAA;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACxF,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,C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C,gBAAgB,CAAC,KAAK,IAAI,CAAC;YAChD,OAAO,EAAE,QAAQ,CAAC,IAAI,CAAC,gBAAgB,CAAC,KAAK,IAAI,EAAE;SACpD,CAAA;IACH,CAAC;;AAzG2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;yDAAiB;AAEzB;IAAlB,KAAK,CAAC,UAAU,CAAC;8BAAS,SAAS;mDAAA;AArBzB,oBAAoB;IADhC,aAAa,CAAC,wBAAwB,CAAC;GAC3B,oBAAoB,CA6HhC","sourcesContent":["import '@operato/data-grist/ox-grist.js'\n\nimport gql from 'graphql-tag'\nimport { css, html } from 'lit'\nimport { customElement, property, query } from 'lit/decorators.js'\nimport { connect } from 'pwa-helpers/connect-mixin'\n\nimport { DataGrist, FetchOption } from '@operato/data-grist'\nimport { client } from '@operato/graphql'\nimport { i18next, localize } from '@operato/i18n'\nimport { PageView, store } from '@operato/shell'\nimport { CommonButtonStyles, CommonGristStyles, ScrollbarStyles } from '@operato/styles'\nimport { isMobileDevice } from '@operato/utils'\nimport { p13n } from '@operato/p13n'\n\n/**\n * 서버형 커넥션(socket-server, stream-socket-server 등)에 현재 접속 중인 TCP 클라이언트 목록을 보여주는 읽기 전용 페이지\n */\n@customElement('connected-clients-page')\nexport class ConnectedClientsPage extends connect(store)(p13n(localize(i18next)(PageView))) {\n static styles = [\n CommonGristStyles,\n ScrollbarStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n overflow: hidden;\n }\n\n ox-grist {\n overflow-y: auto;\n flex: 1;\n }\n `\n ]\n\n @property({ type: Object }) gristConfig: any\n\n @query('ox-grist') grist!: DataGrist\n\n get context() {\n return {\n title: i18next.t('text.connected clients'),\n help: 'integration/ui/connected-clients',\n actions: [\n {\n title: i18next.t('button.refresh'),\n action: () => this.grist.fetch(),\n ...CommonButtonStyles.preview\n }\n ]\n }\n }\n\n render() {\n return html`\n <ox-grist\n .mode=${isMobileDevice() ? 'LIST' : 'GRID'}\n .config=${this.gristConfig}\n .fetchHandler=${this.fetchHandler.bind(this)}\n .personalConfigProvider=${this.getPagePreferenceProvider('ox-grist')!}\n >\n <ox-grist-personalizer slot=\"setting\"></ox-grist-personalizer>\n </ox-grist>\n `\n }\n\n async pageInitialized() {\n this.gristConfig = {\n list: { fields: ['connectionName', 'remote'] },\n columns: [\n { type: 'gutter', gutterName: 'sequence' },\n {\n type: 'string',\n name: 'connectionName',\n label: true,\n header: i18next.t('field.connection'),\n record: { editable: false },\n sortable: true,\n width: 200\n },\n {\n type: 'string',\n name: 'connectionType',\n header: i18next.t('field.type'),\n record: { editable: false },\n sortable: true,\n width: 180\n },\n {\n type: 'string',\n name: 'endpoint',\n header: i18next.t('field.endpoint'),\n record: { editable: false },\n sortable: true,\n width: 180\n },\n {\n type: 'string',\n name: 'remote',\n label: true,\n header: i18next.t('field.remote address'),\n record: { editable: false },\n sortable: true,\n width: 250\n }\n ],\n rows: {\n appendable: false\n },\n sorters: [\n {\n name: 'connectionName'\n }\n ]\n }\n }\n\n /* 인메모리 소량 데이터이므로 페이지네이션 없이 전체를 조회한다 */\n async fetchHandler({ page, limit, sortings = [], filters = [] }: FetchOption) {\n const response = await client.query({\n query: gql`\n query {\n connectedClients {\n items {\n connectionName\n connectionType\n endpoint\n remote\n }\n total\n }\n }\n `,\n fetchPolicy: 'no-cache'\n })\n\n return {\n total: response.data.connectedClients.total || 0,\n records: response.data.connectedClients.items || []\n }\n }\n}\n"]}
@@ -28,7 +28,17 @@ export declare class Connection extends Connection_base {
28
28
  value: string;
29
29
  };
30
30
  help: string;
31
- actions: {
31
+ actions: ({
32
+ icon: string;
33
+ emphasis: {
34
+ raised: boolean;
35
+ outlined: boolean;
36
+ dense: boolean;
37
+ danger: boolean;
38
+ };
39
+ title: string;
40
+ action: () => void;
41
+ } | {
32
42
  icon: string;
33
43
  emphasis: {
34
44
  raised: boolean;
@@ -38,7 +48,7 @@ export declare class Connection extends Connection_base {
38
48
  };
39
49
  title: string;
40
50
  action: (name: any) => Promise<void>;
41
- }[];
51
+ })[];
42
52
  exportable: {
43
53
  name: string;
44
54
  data: () => Promise<{}[]>;
@@ -10,7 +10,7 @@ import { client } from '@operato/graphql';
10
10
  import { HelpDecoratedRenderer } from '@operato/help/help-decorated-renderer.js';
11
11
  import { notify, openPopup } from '@operato/layout';
12
12
  import { i18next, localize } from '@operato/i18n';
13
- import { PageView, store } from '@operato/shell';
13
+ import { navigate, PageView, store } from '@operato/shell';
14
14
  import { CommonButtonStyles, CommonGristStyles, ScrollbarStyles } from '@operato/styles';
15
15
  import { isMobileDevice } from '@operato/utils';
16
16
  import { p13n } from '@operato/p13n';
@@ -93,6 +93,13 @@ let Connection = class Connection extends connect(store)(p13n(localize(i18next)(
93
93
  // },
94
94
  help: 'integration/ui/connection',
95
95
  actions: [
96
+ {
97
+ title: i18next.t('button.connected clients'),
98
+ action: () => {
99
+ navigate('connected-clients');
100
+ },
101
+ ...CommonButtonStyles.preview
102
+ },
96
103
  {
97
104
  title: i18next.t('button.save'),
98
105
  action: this._updateConnectionManager.bind(this),
@@ -1 +1 @@
1
- {"version":3,"file":"connection.js","sourceRoot":"","sources":["../../client/pages/connection.ts"],"names":[],"mappings":";AAAA,OAAO,iCAAiC,CAAA;AACxC,OAAO,0BAA0B,CAAA;AAEjC,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC/B,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AAEnD,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAA;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAA;AAChF,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,iBAA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;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;;0CAAwB;AACxB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;+CAAiB;AAChB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;8CAAgB;AAExB;IAAlB,KAAK,CAAC,UAAU,CAAC;8BAAS,SAAS;yCAAA;AAvBzB,UAAU;IADtB,aAAa,CAAC,iBAAiB,CAAC;GACpB,UAAU,CAuftB","sourcesContent":["import '@operato/data-grist/ox-grist.js'\nimport './connection-importer.js'\n\nimport gql from 'graphql-tag'\nimport { css, html } from 'lit'\nimport { customElement, property, query } from 'lit/decorators.js'\nimport { connect } from 'pwa-helpers/connect-mixin'\n\nimport { DataGrist } from '@operato/data-grist/ox-grist.js'\nimport { client } from '@operato/graphql'\nimport { HelpDecoratedRenderer } from '@operato/help/help-decorated-renderer.js'\nimport { notify, openPopup } from '@operato/layout'\nimport { i18next, localize } from '@operato/i18n'\nimport { PageView, store } from '@operato/shell'\nimport { CommonButtonStyles, CommonGristStyles, ScrollbarStyles } from '@operato/styles'\nimport { isMobileDevice } from '@operato/utils'\nimport { FetchOption } from '@operato/data-grist'\nimport { p13n } from '@operato/p13n'\nimport { PropertySpec } from '../types.js'\n\nasync function copyToClipboard(text: string): Promise<void> {\n try {\n await navigator.clipboard.writeText(text)\n } catch (err) {\n // fallback: old way\n const textArea = document.createElement('textarea')\n textArea.value = text\n document.body.appendChild(textArea)\n textArea.select()\n document.execCommand('copy')\n document.body.removeChild(textArea)\n }\n}\n\nfunction createActionInjector(\n connectionName: string\n): (propName: string, propSpec: PropertySpec) => HTMLElement | null {\n return (propName: string, propSpec: PropertySpec): HTMLElement | null => {\n if (!propSpec.useDomainAttribute) {\n return null\n }\n\n const attributeName = `Connection::${connectionName}::${propName}`\n\n const copyIcon = document.createElement('md-icon')\n copyIcon.textContent = 'dictionary'\n copyIcon.style.cssText =\n 'cursor: pointer; color: var(--md-sys-color-primary); font-size: 16px; --md-icon-size: 16px;'\n copyIcon.title = `Copy ${attributeName}`\n\n copyIcon.addEventListener('click', () => {\n copyToClipboard(attributeName)\n\n // 복사 성공 피드백\n const originalText = copyIcon.textContent\n copyIcon.textContent = 'check'\n copyIcon.style.color = 'var(--md-sys-color-tertiary)'\n\n setTimeout(() => {\n copyIcon.textContent = originalText\n copyIcon.style.color = 'var(--md-sys-color-primary)'\n }, 1000)\n })\n\n return copyIcon\n }\n}\n\n@customElement('connection-page')\nexport class Connection extends connect(store)(p13n(localize(i18next)(PageView))) {\n static styles = [\n CommonGristStyles,\n ScrollbarStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n overflow: hidden;\n }\n\n ox-grist {\n overflow-y: auto;\n flex: 1;\n }\n `\n ]\n\n @property({ type: Boolean }) active: boolean = false\n @property({ type: Object }) gristConfig: any\n @property({ type: Object }) connectors: any\n\n @query('ox-grist') grist!: DataGrist\n\n get context() {\n return {\n title: i18next.t('text.connection list'),\n search: {\n handler: search => {\n this.grist.searchText = search\n },\n value: this.grist?.searchText || ''\n },\n // 필터가 설정되면, 아래 코멘트 해제\n // filter: {\n // handler: () => {\n // const display = this.headroom.style.display\n // this.headroom.style.display = display !== 'none' ? 'none' : 'flex'\n // }\n // },\n help: 'integration/ui/connection',\n actions: [\n {\n title: i18next.t('button.save'),\n action: this._updateConnectionManager.bind(this),\n ...CommonButtonStyles.save\n },\n {\n title: i18next.t('button.delete'),\n action: this._deleteConnections.bind(this),\n ...CommonButtonStyles.delete\n }\n ],\n exportable: {\n name: i18next.t('text.connection list'),\n data: this.exportHandler.bind(this)\n },\n importable: {\n handler: this.importHandler.bind(this)\n }\n }\n }\n\n render() {\n return html`\n <ox-grist\n .mode=${isMobileDevice() ? 'LIST' : 'GRID'}\n .config=${this.gristConfig}\n .fetchHandler=${this.fetchHandler.bind(this)}\n .personalConfigProvider=${this.getPagePreferenceProvider('ox-grist')!}\n >\n <ox-grist-personalizer slot=\"setting\"></ox-grist-personalizer>\n </ox-grist>\n `\n }\n\n async pageInitialized() {\n this.fetchConnectors()\n\n this.gristConfig = {\n list: { fields: ['name', 'description', 'type', 'active'] },\n columns: [\n { type: 'gutter', gutterName: 'sequence' },\n { type: 'gutter', gutterName: 'row-selector', multiple: true },\n {\n type: 'gutter',\n gutterName: 'button',\n name: 'state',\n icon: record => (!record ? 'link' : !record.id ? '' : record.state == 'CONNECTED' ? 'link_off' : 'link'),\n iconOnly: false,\n title: record =>\n !record\n ? i18next.t('button.connect')\n : !record.id\n ? ''\n : record.state == 'CONNECTED'\n ? i18next.t('button.disconnect')\n : i18next.t('button.connect'),\n width: 80,\n handlers: {\n click: (columns, data, column, record, rowIndex) => {\n if (!record || !record.name || record.__dirty__ == '+') {\n return\n }\n if (record.state == 'CONNECTED') {\n this.disconnect(record)\n } else {\n this.connect(record)\n }\n }\n }\n },\n {\n type: 'object',\n name: 'domain',\n hidden: true\n },\n {\n type: 'string',\n name: 'name',\n label: true,\n header: i18next.t('field.name'),\n record: {\n editable: true,\n mandatory: true\n },\n filter: 'search',\n sortable: true,\n width: 150,\n validation: function (after, before, record, column) {\n /* connected 상태에서는 이름을 바꿀 수 없다. */\n if (record.state == 'CONNECTED') {\n notify({\n level: 'warn',\n message: 'connection name cannot be changed during connected.'\n })\n return false\n }\n return true\n }\n },\n {\n type: 'string',\n name: 'description',\n label: true,\n header: i18next.t('field.description'),\n record: {\n editable: true\n },\n filter: 'search',\n width: 200\n },\n {\n type: 'checkbox',\n name: 'active',\n label: true,\n header: i18next.t('field.startup-connect'),\n record: {\n editable: true,\n align: 'center'\n },\n sortable: true,\n width: 60\n },\n {\n type: 'checkbox',\n name: 'onDemand',\n label: true,\n header: i18next.t('field.on-demand'),\n record: {\n editable: true\n },\n width: 120\n },\n {\n type: 'connector',\n name: 'type',\n label: true,\n header: i18next.t('field.type'),\n record: {\n renderer: HelpDecoratedRenderer,\n editable: true,\n help: value => this.connectors?.[value]?.help,\n mandatory: true\n },\n filter: 'search',\n sortable: true,\n width: 200\n },\n {\n type: 'string',\n name: 'endpoint',\n header: i18next.t('field.endpoint'),\n record: {\n editable: true,\n mandatory: true\n },\n filter: 'search',\n sortable: true,\n width: 280\n },\n {\n type: 'parameters',\n name: 'params',\n header: i18next.t('field.params'),\n record: {\n editable: true,\n options: async (value, column, record, row, field) => {\n const { name, help, parameterSpec: spec } = record.type ? this.connectors?.[record.type] : ({} as any)\n const context = this.grist\n\n return {\n name,\n help,\n spec,\n context,\n objectified: true,\n actionInjector: createActionInjector(record.name)\n }\n },\n renderer: 'json5'\n },\n width: 100\n },\n {\n type: 'resource-object',\n name: 'edge',\n header: i18next.t('field.edge-server'),\n record: {\n editable: true,\n options: {\n queryName: 'edges'\n }\n },\n sortable: true,\n width: 120\n },\n {\n type: 'resource-object',\n name: 'updater',\n header: i18next.t('field.updater'),\n record: {\n editable: false\n },\n sortable: true,\n width: 120\n },\n {\n type: 'datetime',\n name: 'updatedAt',\n header: i18next.t('field.updated_at'),\n record: {\n editable: false\n },\n sortable: true,\n width: 180\n }\n ],\n rows: {\n selectable: {\n multiple: true\n }\n },\n sorters: [\n {\n name: 'name'\n }\n ]\n }\n }\n\n async fetchHandler({ page, limit, sortings = [], filters = [] }: FetchOption) {\n const response = await client.query({\n query: gql`\n query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {\n responses: connections(filters: $filters, pagination: $pagination, sortings: $sortings) {\n items {\n id\n domain {\n id\n name\n description\n }\n name\n description\n type\n edge {\n id\n name\n }\n endpoint\n active\n onDemand\n state\n params\n updater {\n id\n name\n description\n }\n updatedAt\n }\n total\n }\n }\n `,\n variables: {\n filters,\n pagination: { page, limit },\n sortings\n }\n })\n\n return {\n total: response.data.responses.total || 0,\n records: response.data.responses.items || []\n }\n }\n\n async fetchConnectors() {\n const response = await client.query({\n query: gql`\n query {\n connectors {\n items {\n name\n help\n parameterSpec {\n type\n name\n label\n placeholder\n property\n styles\n useDomainAttribute\n }\n }\n }\n }\n `\n })\n\n if (!response.errors) {\n this.connectors = response.data.connectors.items.reduce((connectors, connector) => {\n connectors[connector.name] = connector\n return connectors\n }, {})\n } else {\n console.error('fetch connectors error')\n }\n }\n\n async _deleteConnections(name) {\n if (\n confirm(\n i18next.t('text.sure_to_x', {\n x: i18next.t('text.delete')\n })\n )\n ) {\n const names = this.grist.selected.map(record => record.name)\n if (names && names.length > 0) {\n const response = await client.mutate({\n mutation: gql`\n mutation ($names: [String!]!) {\n deleteConnections(names: $names)\n }\n `,\n variables: {\n names\n }\n })\n\n if (!response.errors) {\n this.grist.fetch()\n\n notify({\n message: i18next.t('text.info_x_successfully', {\n x: i18next.t('text.delete')\n })\n })\n }\n }\n }\n }\n\n async _updateConnectionManager() {\n var patches = this.grist.dirtyRecords\n\n if (patches && patches.length) {\n patches = patches.map(connection => {\n let patchField: any = connection.id ? { id: connection.id } : {}\n const dirtyFields = connection.__dirtyfields__\n for (let key in dirtyFields) {\n patchField[key] = dirtyFields[key].after\n }\n patchField.cuFlag = connection.__dirty__\n\n return patchField\n })\n\n const response = await client.mutate({\n mutation: gql`\n mutation ($patches: [ConnectionPatch!]!) {\n updateMultipleConnection(patches: $patches) {\n name\n }\n }\n `,\n variables: {\n patches\n }\n })\n\n if (!response.errors) this.grist.fetch()\n }\n }\n\n async connect(record) {\n var response = await client.mutate({\n mutation: gql`\n mutation ($name: String!) {\n connectConnection(name: $name) {\n state\n }\n }\n `,\n variables: {\n name: record.name\n }\n })\n\n var state = response.data.connectConnection.state\n\n record.state = state\n\n this.grist.refresh()\n\n notify({\n level: 'info',\n message: `${state == 'CONNECTED' ? 'success' : 'fail'} to connect : ${record.name}`\n })\n }\n\n async disconnect(record) {\n var response = await client.mutate({\n mutation: gql`\n mutation ($name: String!) {\n disconnectConnection(name: $name) {\n state\n }\n }\n `,\n variables: {\n name: record.name\n }\n })\n\n var state = response.data.disconnectConnection.state\n\n record.state = state\n\n this.grist.refresh()\n\n notify({\n level: 'info',\n message: `${state == 'CONNECTED' ? 'fail' : 'success'} to disconnect : ${record.name}`\n })\n }\n\n async exportHandler() {\n const exportTargets = this.grist.selected.length ? this.grist.selected : this.grist.dirtyData.records\n const targetFieldSet = new Set(['id', 'name', 'type', 'description', 'endpoint', 'params'])\n\n return exportTargets.map(connection => {\n let tempObj = {}\n for (const field of targetFieldSet) {\n tempObj[field] = connection[field]\n }\n\n return tempObj\n })\n }\n\n async importHandler(records) {\n openPopup(\n html`\n <connection-importer\n .connections=${records}\n @imported=${() => {\n history.back()\n this.grist.fetch()\n }}\n ></connection-importer>\n `,\n {\n backdrop: true,\n size: 'large',\n title: i18next.t('title.import connection')\n }\n )\n }\n}\n"]}
1
+ {"version":3,"file":"connection.js","sourceRoot":"","sources":["../../client/pages/connection.ts"],"names":[],"mappings":";AAAA,OAAO,iCAAiC,CAAA;AACxC,OAAO,0BAA0B,CAAA;AAEjC,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC/B,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AAEnD,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAA;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAA;AAChF,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AACnD,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAC1D,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACxF,OAAO,EAAE,cAA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,EAAE,CAAC;;0CAAwB;AACxB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;+CAAiB;AAChB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;8CAAgB;AAExB;IAAlB,KAAK,CAAC,UAAU,CAAC;8BAAS,SAAS;yCAAA;AAvBzB,UAAU;IADtB,aAAa,CAAC,iBAAiB,CAAC;GACpB,UAAU,CA8ftB","sourcesContent":["import '@operato/data-grist/ox-grist.js'\nimport './connection-importer.js'\n\nimport gql from 'graphql-tag'\nimport { css, html } from 'lit'\nimport { customElement, property, query } from 'lit/decorators.js'\nimport { connect } from 'pwa-helpers/connect-mixin'\n\nimport { DataGrist } from '@operato/data-grist/ox-grist.js'\nimport { client } from '@operato/graphql'\nimport { HelpDecoratedRenderer } from '@operato/help/help-decorated-renderer.js'\nimport { notify, openPopup } from '@operato/layout'\nimport { i18next, localize } from '@operato/i18n'\nimport { navigate, PageView, store } from '@operato/shell'\nimport { CommonButtonStyles, CommonGristStyles, ScrollbarStyles } from '@operato/styles'\nimport { isMobileDevice } from '@operato/utils'\nimport { FetchOption } from '@operato/data-grist'\nimport { p13n } from '@operato/p13n'\nimport { PropertySpec } from '../types.js'\n\nasync function copyToClipboard(text: string): Promise<void> {\n try {\n await navigator.clipboard.writeText(text)\n } catch (err) {\n // fallback: old way\n const textArea = document.createElement('textarea')\n textArea.value = text\n document.body.appendChild(textArea)\n textArea.select()\n document.execCommand('copy')\n document.body.removeChild(textArea)\n }\n}\n\nfunction createActionInjector(\n connectionName: string\n): (propName: string, propSpec: PropertySpec) => HTMLElement | null {\n return (propName: string, propSpec: PropertySpec): HTMLElement | null => {\n if (!propSpec.useDomainAttribute) {\n return null\n }\n\n const attributeName = `Connection::${connectionName}::${propName}`\n\n const copyIcon = document.createElement('md-icon')\n copyIcon.textContent = 'dictionary'\n copyIcon.style.cssText =\n 'cursor: pointer; color: var(--md-sys-color-primary); font-size: 16px; --md-icon-size: 16px;'\n copyIcon.title = `Copy ${attributeName}`\n\n copyIcon.addEventListener('click', () => {\n copyToClipboard(attributeName)\n\n // 복사 성공 피드백\n const originalText = copyIcon.textContent\n copyIcon.textContent = 'check'\n copyIcon.style.color = 'var(--md-sys-color-tertiary)'\n\n setTimeout(() => {\n copyIcon.textContent = originalText\n copyIcon.style.color = 'var(--md-sys-color-primary)'\n }, 1000)\n })\n\n return copyIcon\n }\n}\n\n@customElement('connection-page')\nexport class Connection extends connect(store)(p13n(localize(i18next)(PageView))) {\n static styles = [\n CommonGristStyles,\n ScrollbarStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n overflow: hidden;\n }\n\n ox-grist {\n overflow-y: auto;\n flex: 1;\n }\n `\n ]\n\n @property({ type: Boolean }) active: boolean = false\n @property({ type: Object }) gristConfig: any\n @property({ type: Object }) connectors: any\n\n @query('ox-grist') grist!: DataGrist\n\n get context() {\n return {\n title: i18next.t('text.connection list'),\n search: {\n handler: search => {\n this.grist.searchText = search\n },\n value: this.grist?.searchText || ''\n },\n // 필터가 설정되면, 아래 코멘트 해제\n // filter: {\n // handler: () => {\n // const display = this.headroom.style.display\n // this.headroom.style.display = display !== 'none' ? 'none' : 'flex'\n // }\n // },\n help: 'integration/ui/connection',\n actions: [\n {\n title: i18next.t('button.connected clients'),\n action: () => {\n navigate('connected-clients')\n },\n ...CommonButtonStyles.preview\n },\n {\n title: i18next.t('button.save'),\n action: this._updateConnectionManager.bind(this),\n ...CommonButtonStyles.save\n },\n {\n title: i18next.t('button.delete'),\n action: this._deleteConnections.bind(this),\n ...CommonButtonStyles.delete\n }\n ],\n exportable: {\n name: i18next.t('text.connection list'),\n data: this.exportHandler.bind(this)\n },\n importable: {\n handler: this.importHandler.bind(this)\n }\n }\n }\n\n render() {\n return html`\n <ox-grist\n .mode=${isMobileDevice() ? 'LIST' : 'GRID'}\n .config=${this.gristConfig}\n .fetchHandler=${this.fetchHandler.bind(this)}\n .personalConfigProvider=${this.getPagePreferenceProvider('ox-grist')!}\n >\n <ox-grist-personalizer slot=\"setting\"></ox-grist-personalizer>\n </ox-grist>\n `\n }\n\n async pageInitialized() {\n this.fetchConnectors()\n\n this.gristConfig = {\n list: { fields: ['name', 'description', 'type', 'active'] },\n columns: [\n { type: 'gutter', gutterName: 'sequence' },\n { type: 'gutter', gutterName: 'row-selector', multiple: true },\n {\n type: 'gutter',\n gutterName: 'button',\n name: 'state',\n icon: record => (!record ? 'link' : !record.id ? '' : record.state == 'CONNECTED' ? 'link_off' : 'link'),\n iconOnly: false,\n title: record =>\n !record\n ? i18next.t('button.connect')\n : !record.id\n ? ''\n : record.state == 'CONNECTED'\n ? i18next.t('button.disconnect')\n : i18next.t('button.connect'),\n width: 80,\n handlers: {\n click: (columns, data, column, record, rowIndex) => {\n if (!record || !record.name || record.__dirty__ == '+') {\n return\n }\n if (record.state == 'CONNECTED') {\n this.disconnect(record)\n } else {\n this.connect(record)\n }\n }\n }\n },\n {\n type: 'object',\n name: 'domain',\n hidden: true\n },\n {\n type: 'string',\n name: 'name',\n label: true,\n header: i18next.t('field.name'),\n record: {\n editable: true,\n mandatory: true\n },\n filter: 'search',\n sortable: true,\n width: 150,\n validation: function (after, before, record, column) {\n /* connected 상태에서는 이름을 바꿀 수 없다. */\n if (record.state == 'CONNECTED') {\n notify({\n level: 'warn',\n message: 'connection name cannot be changed during connected.'\n })\n return false\n }\n return true\n }\n },\n {\n type: 'string',\n name: 'description',\n label: true,\n header: i18next.t('field.description'),\n record: {\n editable: true\n },\n filter: 'search',\n width: 200\n },\n {\n type: 'checkbox',\n name: 'active',\n label: true,\n header: i18next.t('field.startup-connect'),\n record: {\n editable: true,\n align: 'center'\n },\n sortable: true,\n width: 60\n },\n {\n type: 'checkbox',\n name: 'onDemand',\n label: true,\n header: i18next.t('field.on-demand'),\n record: {\n editable: true\n },\n width: 120\n },\n {\n type: 'connector',\n name: 'type',\n label: true,\n header: i18next.t('field.type'),\n record: {\n renderer: HelpDecoratedRenderer,\n editable: true,\n help: value => this.connectors?.[value]?.help,\n mandatory: true\n },\n filter: 'search',\n sortable: true,\n width: 200\n },\n {\n type: 'string',\n name: 'endpoint',\n header: i18next.t('field.endpoint'),\n record: {\n editable: true,\n mandatory: true\n },\n filter: 'search',\n sortable: true,\n width: 280\n },\n {\n type: 'parameters',\n name: 'params',\n header: i18next.t('field.params'),\n record: {\n editable: true,\n options: async (value, column, record, row, field) => {\n const { name, help, parameterSpec: spec } = record.type ? this.connectors?.[record.type] : ({} as any)\n const context = this.grist\n\n return {\n name,\n help,\n spec,\n context,\n objectified: true,\n actionInjector: createActionInjector(record.name)\n }\n },\n renderer: 'json5'\n },\n width: 100\n },\n {\n type: 'resource-object',\n name: 'edge',\n header: i18next.t('field.edge-server'),\n record: {\n editable: true,\n options: {\n queryName: 'edges'\n }\n },\n sortable: true,\n width: 120\n },\n {\n type: 'resource-object',\n name: 'updater',\n header: i18next.t('field.updater'),\n record: {\n editable: false\n },\n sortable: true,\n width: 120\n },\n {\n type: 'datetime',\n name: 'updatedAt',\n header: i18next.t('field.updated_at'),\n record: {\n editable: false\n },\n sortable: true,\n width: 180\n }\n ],\n rows: {\n selectable: {\n multiple: true\n }\n },\n sorters: [\n {\n name: 'name'\n }\n ]\n }\n }\n\n async fetchHandler({ page, limit, sortings = [], filters = [] }: FetchOption) {\n const response = await client.query({\n query: gql`\n query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {\n responses: connections(filters: $filters, pagination: $pagination, sortings: $sortings) {\n items {\n id\n domain {\n id\n name\n description\n }\n name\n description\n type\n edge {\n id\n name\n }\n endpoint\n active\n onDemand\n state\n params\n updater {\n id\n name\n description\n }\n updatedAt\n }\n total\n }\n }\n `,\n variables: {\n filters,\n pagination: { page, limit },\n sortings\n }\n })\n\n return {\n total: response.data.responses.total || 0,\n records: response.data.responses.items || []\n }\n }\n\n async fetchConnectors() {\n const response = await client.query({\n query: gql`\n query {\n connectors {\n items {\n name\n help\n parameterSpec {\n type\n name\n label\n placeholder\n property\n styles\n useDomainAttribute\n }\n }\n }\n }\n `\n })\n\n if (!response.errors) {\n this.connectors = response.data.connectors.items.reduce((connectors, connector) => {\n connectors[connector.name] = connector\n return connectors\n }, {})\n } else {\n console.error('fetch connectors error')\n }\n }\n\n async _deleteConnections(name) {\n if (\n confirm(\n i18next.t('text.sure_to_x', {\n x: i18next.t('text.delete')\n })\n )\n ) {\n const names = this.grist.selected.map(record => record.name)\n if (names && names.length > 0) {\n const response = await client.mutate({\n mutation: gql`\n mutation ($names: [String!]!) {\n deleteConnections(names: $names)\n }\n `,\n variables: {\n names\n }\n })\n\n if (!response.errors) {\n this.grist.fetch()\n\n notify({\n message: i18next.t('text.info_x_successfully', {\n x: i18next.t('text.delete')\n })\n })\n }\n }\n }\n }\n\n async _updateConnectionManager() {\n var patches = this.grist.dirtyRecords\n\n if (patches && patches.length) {\n patches = patches.map(connection => {\n let patchField: any = connection.id ? { id: connection.id } : {}\n const dirtyFields = connection.__dirtyfields__\n for (let key in dirtyFields) {\n patchField[key] = dirtyFields[key].after\n }\n patchField.cuFlag = connection.__dirty__\n\n return patchField\n })\n\n const response = await client.mutate({\n mutation: gql`\n mutation ($patches: [ConnectionPatch!]!) {\n updateMultipleConnection(patches: $patches) {\n name\n }\n }\n `,\n variables: {\n patches\n }\n })\n\n if (!response.errors) this.grist.fetch()\n }\n }\n\n async connect(record) {\n var response = await client.mutate({\n mutation: gql`\n mutation ($name: String!) {\n connectConnection(name: $name) {\n state\n }\n }\n `,\n variables: {\n name: record.name\n }\n })\n\n var state = response.data.connectConnection.state\n\n record.state = state\n\n this.grist.refresh()\n\n notify({\n level: 'info',\n message: `${state == 'CONNECTED' ? 'success' : 'fail'} to connect : ${record.name}`\n })\n }\n\n async disconnect(record) {\n var response = await client.mutate({\n mutation: gql`\n mutation ($name: String!) {\n disconnectConnection(name: $name) {\n state\n }\n }\n `,\n variables: {\n name: record.name\n }\n })\n\n var state = response.data.disconnectConnection.state\n\n record.state = state\n\n this.grist.refresh()\n\n notify({\n level: 'info',\n message: `${state == 'CONNECTED' ? 'fail' : 'success'} to disconnect : ${record.name}`\n })\n }\n\n async exportHandler() {\n const exportTargets = this.grist.selected.length ? this.grist.selected : this.grist.dirtyData.records\n const targetFieldSet = new Set(['id', 'name', 'type', 'description', 'endpoint', 'params'])\n\n return exportTargets.map(connection => {\n let tempObj = {}\n for (const field of targetFieldSet) {\n tempObj[field] = connection[field]\n }\n\n return tempObj\n })\n }\n\n async importHandler(records) {\n openPopup(\n html`\n <connection-importer\n .connections=${records}\n @imported=${() => {\n history.back()\n this.grist.fetch()\n }}\n ></connection-importer>\n `,\n {\n backdrop: true,\n size: 'large',\n title: i18next.t('title.import connection')\n }\n )\n }\n}\n"]}
@@ -3,6 +3,9 @@ export default function route(page) {
3
3
  case 'connection':
4
4
  import('./pages/connection');
5
5
  return page;
6
+ case 'connected-clients':
7
+ import('./pages/connected-clients');
8
+ return page;
6
9
  case 'scenario':
7
10
  import('./pages/scenario');
8
11
  return page;
@@ -1 +1 @@
1
- {"version":3,"file":"route.js","sourceRoot":"","sources":["../client/route.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,IAAI;IAChC,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,YAAY;YACf,MAAM,CAAC,oBAAoB,CAAC,CAAA;YAC5B,OAAO,IAAI,CAAA;QAEb,KAAK,UAAU;YACb,MAAM,CAAC,kBAAkB,CAAC,CAAA;YAC1B,OAAO,IAAI,CAAA;QAEb,KAAK,qBAAqB;YACxB,MAAM,CAAC,6BAA6B,CAAC,CAAA;YACrC,OAAO,IAAI,CAAA;QAEb,KAAK,qBAAqB;YACxB,MAAM,CAAC,wBAAwB,CAAC,CAAA;YAChC,OAAO,IAAI,CAAA;QAEb,KAAK,sBAAsB;YACzB,MAAM,CAAC,8BAA8B,CAAC,CAAA;YACtC,OAAO,IAAI,CAAA;IACf,CAAC;AACH,CAAC","sourcesContent":["export default function route(page) {\n switch (page) {\n case 'connection':\n import('./pages/connection')\n return page\n\n case 'scenario':\n import('./pages/scenario')\n return page\n\n case 'integration-monitor':\n import('./pages/integration-monitor')\n return page\n\n case 'state-register-page':\n import('./pages/state-register')\n return page\n\n case 'integration-analysis':\n import('./pages/integration-analysis')\n return page\n }\n}\n"]}
1
+ {"version":3,"file":"route.js","sourceRoot":"","sources":["../client/route.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,IAAI;IAChC,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,YAAY;YACf,MAAM,CAAC,oBAAoB,CAAC,CAAA;YAC5B,OAAO,IAAI,CAAA;QAEb,KAAK,mBAAmB;YACtB,MAAM,CAAC,2BAA2B,CAAC,CAAA;YACnC,OAAO,IAAI,CAAA;QAEb,KAAK,UAAU;YACb,MAAM,CAAC,kBAAkB,CAAC,CAAA;YAC1B,OAAO,IAAI,CAAA;QAEb,KAAK,qBAAqB;YACxB,MAAM,CAAC,6BAA6B,CAAC,CAAA;YACrC,OAAO,IAAI,CAAA;QAEb,KAAK,qBAAqB;YACxB,MAAM,CAAC,wBAAwB,CAAC,CAAA;YAChC,OAAO,IAAI,CAAA;QAEb,KAAK,sBAAsB;YACzB,MAAM,CAAC,8BAA8B,CAAC,CAAA;YACtC,OAAO,IAAI,CAAA;IACf,CAAC;AACH,CAAC","sourcesContent":["export default function route(page) {\n switch (page) {\n case 'connection':\n import('./pages/connection')\n return page\n\n case 'connected-clients':\n import('./pages/connected-clients')\n return page\n\n case 'scenario':\n import('./pages/scenario')\n return page\n\n case 'integration-monitor':\n import('./pages/integration-monitor')\n return page\n\n case 'state-register-page':\n import('./pages/state-register')\n return page\n\n case 'integration-analysis':\n import('./pages/integration-analysis')\n return page\n }\n}\n"]}