@fmsim/fmsim-restful 1.0.11 → 1.0.13

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.
@@ -1846,7 +1846,7 @@
1846
1846
  {
1847
1847
  "id": "mcs_auto_scenario1_fmb1",
1848
1848
  "name": "MCS_SKI_STOCKER_FMB1",
1849
- "description": "Main Server",
1849
+ "description": "",
1850
1850
  "active": 1,
1851
1851
  "schedule": "0/3 * * * * *",
1852
1852
  "mcsAutoSteps": [
@@ -1892,7 +1892,7 @@
1892
1892
  {
1893
1893
  "id": "mcs_auto_scenario2_fmb1",
1894
1894
  "name": "MCS_SKI_EQP_FMB1",
1895
- "description": "Main Server",
1895
+ "description": "",
1896
1896
  "active": 1,
1897
1897
  "schedule": "0/3 * * * * *",
1898
1898
  "mcsAutoSteps": [
@@ -1937,7 +1937,7 @@
1937
1937
  {
1938
1938
  "id": "mcs_auto_scenario3_fmb1",
1939
1939
  "name": "MCS_SKI_TRANSPORT_FMB1",
1940
- "description": "Main Server",
1940
+ "description": "",
1941
1941
  "active": 1,
1942
1942
  "schedule": "0/3 * * * * *",
1943
1943
  "mcsAutoSteps": [
@@ -1982,7 +1982,7 @@
1982
1982
  {
1983
1983
  "id": "mcs_auto_scenario4_fmb1",
1984
1984
  "name": "MCS_SKI_UNIT_FMB1",
1985
- "description": "Main Server",
1985
+ "description": "",
1986
1986
  "active": 1,
1987
1987
  "schedule": "0/3 * * * * *",
1988
1988
  "mcsAutoSteps": [
@@ -2027,7 +2027,7 @@
2027
2027
  {
2028
2028
  "id": "mcs_auto_scenario5_fmb1",
2029
2029
  "name": "MCS_SKI_ALARM_FMB1",
2030
- "description": "Main Server",
2030
+ "description": "",
2031
2031
  "active": 1,
2032
2032
  "schedule": "0/3 * * * * *",
2033
2033
  "mcsAutoSteps": [
@@ -2072,7 +2072,7 @@
2072
2072
  {
2073
2073
  "id": "mcs_auto_scenario1_fmb2",
2074
2074
  "name": "MCS_SKI_STOCKER_FMB2",
2075
- "description": "Secondary Server",
2075
+ "description": "",
2076
2076
  "active": 1,
2077
2077
  "schedule": "0/3 * * * * *",
2078
2078
  "mcsAutoSteps": [
@@ -2117,7 +2117,7 @@
2117
2117
  {
2118
2118
  "id": "mcs_auto_scenario2_fmb2",
2119
2119
  "name": "MCS_SKI_EQP_FMB2",
2120
- "description": "Secondary Server",
2120
+ "description": "",
2121
2121
  "active": 1,
2122
2122
  "schedule": "0/3 * * * * *",
2123
2123
  "mcsAutoSteps": [
@@ -2162,7 +2162,7 @@
2162
2162
  {
2163
2163
  "id": "mcs_auto_scenario3_fmb2",
2164
2164
  "name": "MCS_SKI_TRANSPORT_FMB2",
2165
- "description": "Secondary Server",
2165
+ "description": "",
2166
2166
  "active": 1,
2167
2167
  "schedule": "0/3 * * * * *",
2168
2168
  "mcsAutoSteps": [
@@ -2207,7 +2207,7 @@
2207
2207
  {
2208
2208
  "id": "mcs_auto_scenario4_fmb2",
2209
2209
  "name": "MCS_SKI_UNIT_FMB2",
2210
- "description": "Secondary Server",
2210
+ "description": "",
2211
2211
  "active": 1,
2212
2212
  "schedule": "0/3 * * * * *",
2213
2213
  "mcsAutoSteps": [
@@ -2252,7 +2252,7 @@
2252
2252
  {
2253
2253
  "id": "mcs_auto_scenario5_fmb2",
2254
2254
  "name": "MCS_SKI_ALARM_FMB2",
2255
- "description": "Secondary Server",
2255
+ "description": "",
2256
2256
  "active": 1,
2257
2257
  "schedule": "0/3 * * * * *",
2258
2258
  "mcsAutoSteps": [
@@ -618,26 +618,6 @@ let RestfulScenario = class RestfulScenario extends connect(store)(localize(i18n
618
618
  patchField.description = patch.description;
619
619
  return patchField;
620
620
  });
621
- let descriptionExist = true;
622
- patches.forEach(scn => {
623
- if (!scn.description) {
624
- descriptionExist = false;
625
- }
626
- else {
627
- if (!(scn.description === 'Main Server' || scn.description === 'Secondary Server')) {
628
- descriptionExist = false;
629
- }
630
- }
631
- });
632
- if (!descriptionExist) {
633
- document.dispatchEvent(new CustomEvent('notify', {
634
- detail: {
635
- level: 'info',
636
- message: 'Scenario description value is invalid.'
637
- }
638
- }));
639
- return;
640
- }
641
621
  const response = (_a = (await updateScenarios(patches))) === null || _a === void 0 ? void 0 : _a.data;
642
622
  if (!response || !response.status) {
643
623
  document.dispatchEvent(new CustomEvent('notify', {
@@ -1 +1 @@
1
- {"version":3,"file":"restful-scenario.js","sourceRoot":"","sources":["../../client/pages/restful-scenario.ts"],"names":[],"mappings":";AAAA,OAAO,iCAAiC,CAAA;AACxC,OAAO,iCAAiC,CAAA;AACxC,OAAO,2BAA2B,CAAA;AAElC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC/B,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAClE,OAAO,MAAM,MAAM,iBAAiB,CAAA;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AAEnD,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC1C,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AACnD,OAAO,EAAY,QAAQ,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAC1D,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACxF,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAE/C,MAAM,UAAU,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC,eAAe,EAAE,CAAC,QAAQ,CAAA;AACnE,MAAM,gBAAgB,GAAG,CAAC,EAAE,EAAE,UAAU,EAAE,GAAG,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,EA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f;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;;qDAAqB;AAE5B;IAAlB,KAAK,CAAC,UAAU,CAAC;8BAAS,SAAS;8CAAA;AACX;IAAxB,KAAK,CAAC,gBAAgB,CAAC;8BAAc,UAAU;mDAAA;AArCrC,eAAe;IAD3B,aAAa,CAAC,uBAAuB,CAAC;GAC1B,eAAe,CA4uB3B","sourcesContent":["import '@operato/data-grist/ox-grist.js'\nimport '@operato/form/ox-search-form.js'\nimport './restful-scenario-detail'\n\nimport { css, html } from 'lit'\nimport { customElement, property, query } from 'lit/decorators.js'\nimport moment from 'moment-timezone'\nimport { connect } from 'pwa-helpers/connect-mixin'\n\nimport { DataGrist } from '@operato/data-grist'\nimport { SearchForm } from '@operato/form'\nimport { i18next, localize } from '@operato/i18n'\nimport { notify, openPopup } from '@operato/layout'\nimport { navigate, PageView, store } from '@operato/shell'\nimport { CommonButtonStyles, CommonGristStyles, ScrollbarStyles } from '@operato/styles'\nimport { isMobileDevice } from '@operato/utils'\n\nconst DEFAULT_TZ = Intl.DateTimeFormat().resolvedOptions().timeZone\nconst TIMEZONE_OPTIONS = ['', DEFAULT_TZ, ...moment.tz.names().filter(tz => tz !== DEFAULT_TZ)]\n\nimport { fetchScenarios, deleteScenarioById, updateScenarios, startScenario, stopScenario } from '@fmsim/api/restful.js'\n\nfunction IS_SCENARIO_RUNNING(state) {\n return state && state !== 'UNLOADED'\n}\n\n@customElement('restful-scenario-page')\nexport class RestfulScenario extends connect(store)(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 #filters {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n\n background-color: white;\n }\n\n #filters > * {\n padding: var(--padding-default) var(--padding-wide);\n }\n `\n ]\n\n @property({ type: Boolean }) active: boolean = false\n @property({ type: Object }) gristConfig: any\n @property({ type: Object }) taskTypes: any\n @property({ type: Array }) searchConfig?: any[]\n\n @query('ox-grist') grist!: DataGrist\n @query('ox-search-form') searchForm!: SearchForm\n\n get context() {\n return {\n title: i18next.t('text.scenario list'),\n actions: [\n {\n title: i18next.t('button.save'),\n action: this._updateScenario.bind(this),\n ...CommonButtonStyles.save\n },\n {\n title: i18next.t('button.delete'),\n action: this._deleteScenario.bind(this),\n ...CommonButtonStyles.delete\n }\n ],\n board_topmenu: true\n }\n }\n\n render() {\n return html`\n <!-- <ox-search-form\n id=\"ox-search-form\"\n .fields=${this.searchConfig}\n @submit=${async () => this.grist.fetch()}\n ></ox-search-form> -->\n\n <ox-grist\n .mode=${isMobileDevice() ? 'LIST' : 'GRID'}\n .config=${this.gristConfig}\n .fetchHandler=${this.fetchHandler.bind(this)}\n >\n </ox-grist>\n `\n }\n\n async pageInitialized(lifecycle) {\n this.fetchTaskTypes()\n\n this.searchConfig = [\n {\n name: 'name',\n type: 'text',\n props: {\n placeholder: i18next.t('field.name'),\n searchOper: 'like'\n }\n },\n {\n name: 'description',\n type: 'text',\n props: {\n placeholder: i18next.t('field.description'),\n searchOper: 'like'\n }\n }\n ]\n\n this.gristConfig = {\n list: { fields: ['name', 'description', 'schedule', '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 ? 'play_arrow' : IS_SCENARIO_RUNNING(record.state) ? 'pause' : 'play_arrow'),\n handlers: {\n click: (columns, data, column, record, rowIndex) => {\n if (!record || !record.name) {\n /* TODO record가 새로 추가된 것이면 리턴하도록 한다. */\n return\n }\n if (IS_SCENARIO_RUNNING(record.state)) {\n this.stopScenario(record)\n } else {\n this.startScenario(record)\n }\n }\n }\n },\n {\n type: 'gutter',\n gutterName: 'button',\n icon: 'reorder',\n handlers: {\n click: (columns, data, column, record, rowIndex) => {\n if (!record.id) return\n openPopup(\n html`\n <restful-scenario-detail\n .scenario=${record}\n .taskTypes=${this.taskTypes}\n @requestRefresh=\"${() => this.grist.fetch()}\"\n ></restful-scenario-detail>\n `,\n {\n backdrop: true,\n size: 'large',\n title: i18next.t('title.scenario-detail')\n }\n )\n }\n }\n },\n {\n type: 'string',\n name: 'name',\n label: true,\n header: i18next.t('field.name'),\n record: {\n editable: true\n },\n filter: 'search',\n sortable: true,\n width: 300,\n validation: function (after, before, record, column) {\n /* connected 상태에서는 이름을 바꿀 수 없다. */\n if (IS_SCENARIO_RUNNING(record.state)) {\n notify({\n level: 'warn',\n message: 'scenario name cannot be changed during execution.'\n })\n return false\n }\n return true\n }\n },\n {\n type: 'string',\n name: 'type',\n header: i18next.t('field.type'),\n record: {\n editable: true\n },\n filter: 'search',\n width: 100\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: 350\n },\n {\n type: 'crontab',\n name: 'schedule',\n label: true,\n header: i18next.t('field.schedule'),\n record: {\n editable: true\n },\n width: 110\n },\n {\n type: 'select',\n name: 'timezone',\n header: i18next.t('field.timezone'),\n record: {\n editable: true,\n options: TIMEZONE_OPTIONS\n },\n width: 120\n },\n {\n type: 'checkbox',\n name: 'active',\n label: true,\n header: i18next.t('field.active'),\n record: {\n align: 'center',\n editable: true\n },\n sortable: true,\n width: 60\n },\n {\n type: 'object',\n name: 'updater',\n header: i18next.t('field.updater'),\n record: {\n editable: false\n },\n sortable: true,\n width: 85\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 pageUpdated(changes, lifecycle) {\n if (this.active) {\n this.grist.fetch()\n }\n }\n\n async fetchHandler({ page, limit, sorters = [], filters = [] }) {\n const response = (await fetchScenarios({ page, limit, sorters }))?.data\n if (!response || !response.status) {\n notify({\n message: 'Get Scenarios Error'\n })\n }\n\n const scenario = response!.scenario || {}\n\n return {\n total: scenario.total || 0,\n records: scenario.items || []\n }\n }\n\n //상세 페이지 타입\n async fetchTaskTypes() {\n this.taskTypes = {\n 'book-up-scenario': {\n name: 'book-up-scenario',\n description: null,\n parameterSpec: [\n {\n type: 'entity-selector',\n name: 'scenario',\n label: 'scenario',\n placeholder: null,\n property: { queryName: 'scenarios' }\n },\n { type: 'string', name: 'delay', label: 'delay', placeholder: null, property: null },\n {\n type: 'select',\n name: 'priority',\n label: 'priority',\n placeholder: null,\n property: { options: ['', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'] }\n },\n { type: 'scenario-step-input', name: 'variables', label: 'variables', placeholder: null, property: null },\n { type: 'string', name: 'tag', label: 'tag', placeholder: null, property: null }\n ]\n },\n 'database-query': {\n name: 'database-query',\n description: null,\n parameterSpec: [{ type: 'textarea', name: 'query', label: 'query', placeholder: null, property: null }]\n },\n 'echo-receive': { name: 'echo-receive', description: null, parameterSpec: [] },\n 'echo-send': {\n name: 'echo-send',\n description: null,\n parameterSpec: [{ type: 'string', name: 'message', label: 'message', placeholder: null, property: null }]\n },\n 'empty-check': {\n name: 'empty-check',\n description: null,\n parameterSpec: [\n { type: 'scenario-step-input', name: 'accessor', label: 'accessor', placeholder: null, property: null },\n { type: 'string', name: 'goto', label: 'goto', placeholder: null, property: null }\n ]\n },\n end: { name: 'end', description: null, parameterSpec: [] },\n 'floating-point': {\n name: 'floating-point',\n description: null,\n parameterSpec: [\n { type: 'scenario-step-input', name: 'accessor', label: 'accessor', placeholder: null, property: null },\n {\n type: 'select',\n name: 'operation',\n label: 'operation',\n placeholder: null,\n property: { options: ['read', 'write'] }\n },\n {\n type: 'select',\n name: 'endian',\n label: 'endian',\n placeholder: null,\n property: { options: ['little', 'big'] }\n },\n {\n type: 'select',\n name: 'floatType',\n label: 'float type',\n placeholder: null,\n property: { options: ['float', 'double'] }\n }\n ]\n },\n goto: {\n name: 'goto',\n description: null,\n parameterSpec: [{ type: 'scenario-step-input', name: 'goto', label: 'goto', placeholder: null, property: null }]\n },\n 'graphql-mutate': {\n name: 'graphql-mutate',\n description: null,\n parameterSpec: [{ type: 'graphql', name: 'mutation', label: 'mutation', placeholder: null, property: null }]\n },\n 'graphql-query': {\n name: 'graphql-query',\n description: null,\n parameterSpec: [{ type: 'graphql', name: 'query', label: 'query', placeholder: null, property: null }]\n },\n 'http-get': {\n name: 'http-get',\n description: null,\n parameterSpec: [\n { type: 'string', name: 'path', label: 'path', placeholder: null, property: null },\n { type: 'http-headers', name: 'headers', label: 'headers', placeholder: null, property: null },\n { type: 'http-parameters', name: 'searchParams', label: 'search-params', placeholder: null, property: null }\n ]\n },\n 'http-post': {\n name: 'http-post',\n description: null,\n parameterSpec: [\n { type: 'string', name: 'path', label: 'path', placeholder: null, property: null },\n { type: 'http-headers', name: 'headers', label: 'headers', placeholder: null, property: null },\n {\n type: 'select',\n name: 'contentType',\n label: 'content-type',\n placeholder: null,\n property: {\n options: [\n { display: '', value: '' },\n { display: 'application/json', value: 'application/json' },\n { display: 'text/plain', value: 'text/plain' },\n { display: 'application/x-www-form-urlencoded', value: 'application/x-www-form-urlencoded' }\n ]\n }\n },\n { type: 'scenario-step-input', name: 'accessor', label: 'accessor', placeholder: null, property: null }\n ]\n },\n 'local-graphql-mutate': {\n name: 'local-graphql-mutate',\n description: null,\n parameterSpec: [{ type: 'graphql', name: 'mutation', label: 'mutation', placeholder: null, property: null }]\n },\n 'local-graphql-query': {\n name: 'local-graphql-query',\n description: null,\n parameterSpec: [{ type: 'graphql', name: 'query', label: 'query', placeholder: null, property: null }]\n },\n log: {\n name: 'log',\n description: null,\n parameterSpec: [\n { type: 'scenario-step-input', name: 'accessor', label: 'accessor', placeholder: null, property: null },\n { type: 'string', name: 'message', label: 'message', placeholder: null, property: null },\n {\n type: 'select',\n name: 'level',\n label: 'level',\n placeholder: null,\n property: { options: ['info', 'warn', 'error'] }\n }\n ]\n },\n 'mqtt-publish': {\n name: 'mqtt-publish',\n description: null,\n parameterSpec: [\n { type: 'string', name: 'topic', label: 'topic', placeholder: null, property: null },\n { type: 'scenario-step-input', name: 'accessor', label: 'accessor', placeholder: null, property: null }\n ]\n },\n 'mqtt-subscribe': {\n name: 'mqtt-subscribe',\n description: null,\n parameterSpec: [\n { type: 'string', name: 'topic', label: 'topic', placeholder: null, property: null },\n {\n type: 'select',\n name: 'dataFormat',\n label: 'data-format',\n placeholder: null,\n property: {\n options: [\n { display: 'Plain Text', value: 'text' },\n { display: 'JSON', value: 'json' }\n ]\n }\n }\n ]\n },\n 'pick-pending-scenario': {\n name: 'pick-pending-scenario',\n description: null,\n parameterSpec: [\n { type: 'string', name: 'tag', label: 'tag', placeholder: null, property: null },\n { type: 'number', name: 'waitFor', label: 'wait-for', placeholder: null, property: null }\n ]\n },\n publish: {\n name: 'publish',\n description: null,\n parameterSpec: [\n { type: 'string', name: 'tag', label: 'tag', placeholder: null, property: null },\n { type: 'scenario-step-input', name: 'accessor', label: 'accessor', placeholder: null, property: null }\n ]\n },\n 'reset-pending-scenario': { name: 'reset-pending-scenario', description: null, parameterSpec: [] },\n scenario: {\n name: 'scenario',\n description: null,\n parameterSpec: [\n {\n type: 'entity-selector',\n name: 'scenario',\n label: 'scenario',\n placeholder: null,\n property: { queryName: 'scenarios' }\n },\n { type: 'scenario-step-input', name: 'variables', label: 'variables', placeholder: null, property: null }\n ]\n },\n script: {\n name: 'script',\n description: null,\n parameterSpec: [{ type: 'textarea', name: 'script', label: 'script', placeholder: null, property: null }]\n },\n sleep: {\n name: 'sleep',\n description: null,\n parameterSpec: [\n { type: 'number', name: 'duration', label: 'duration', placeholder: 'milli-seconds', property: null }\n ]\n },\n 'socket-listener': {\n name: 'socket-listener',\n description: null,\n parameterSpec: [\n {\n type: 'select',\n name: 'dataFormat',\n label: 'data-format',\n placeholder: null,\n property: {\n options: [\n { display: 'CSV', value: 'csv' },\n { display: 'JSON', value: 'json' },\n { display: 'String', value: 'string' }\n ]\n }\n }\n ]\n },\n switch: {\n name: 'switch',\n description: null,\n parameterSpec: [\n { type: 'scenario-step-input', name: 'accessor', label: 'accessor', placeholder: null, property: null },\n { type: 'map', name: 'cases', label: 'cases', placeholder: null, property: null }\n ]\n },\n 'switch-goto': {\n name: 'switch-goto',\n description: null,\n parameterSpec: [\n { type: 'scenario-step-input', name: 'accessor', label: 'accessor', placeholder: null, property: null },\n { type: 'map', name: 'cases', label: 'cases', placeholder: null, property: null }\n ]\n },\n 'switch-range': {\n name: 'switch-range',\n description: null,\n parameterSpec: [\n { type: 'scenario-step-input', name: 'accessor', label: 'accessor', placeholder: null, property: null },\n { type: 'range', name: 'cases', label: 'cases', placeholder: null, property: null }\n ]\n },\n 'switch-range-goto': {\n name: 'switch-range-goto',\n description: null,\n parameterSpec: [\n { type: 'scenario-step-input', name: 'accessor', label: 'accessor', placeholder: null, property: null },\n { type: 'range', name: 'cases', label: 'cases', placeholder: null, property: null }\n ]\n },\n 'switch-range-scenario': {\n name: 'switch-range-scenario',\n description: null,\n parameterSpec: [\n { type: 'scenario-step-input', name: 'accessor', label: 'accessor', placeholder: null, property: null },\n { type: 'range', name: 'cases', label: 'cases', placeholder: null, property: null },\n { type: 'scenario-step-input', name: 'variables', label: 'variables', placeholder: null, property: null }\n ]\n },\n 'switch-range-set': {\n name: 'switch-range-set',\n description: null,\n parameterSpec: [\n { type: 'scenario-step-input', name: 'accessor', label: 'accessor', placeholder: null, property: null },\n { type: 'range', name: 'cases', label: 'cases', placeholder: null, property: null }\n ]\n },\n 'switch-scenario': {\n name: 'switch-scenario',\n description: null,\n parameterSpec: [\n { type: 'scenario-step-input', name: 'accessor', label: 'accessor', placeholder: null, property: null },\n { type: 'map', name: 'cases', label: 'cases', placeholder: null, property: null },\n { type: 'scenario-step-input', name: 'variables', label: 'variables', placeholder: null, property: null }\n ]\n },\n 'switch-set': {\n name: 'switch-set',\n description: null,\n parameterSpec: [\n { type: 'scenario-step-input', name: 'accessor', label: 'accessor', placeholder: null, property: null },\n { type: 'map', name: 'cases', label: 'cases', placeholder: null, property: null }\n ]\n },\n throw: {\n name: 'throw',\n description: null,\n parameterSpec: [{ type: 'string', name: 'message', label: 'message', placeholder: null, property: null }]\n },\n variables: { name: 'variables', description: null, parameterSpec: [] }\n }\n }\n\n _conditionParser() {\n return this.searchForm.getQueryFilters()\n\n // return this.searchForm\n // .fields!.filter(\n // field => (field.type !== 'checkbox' && field.value && field.value !== '') || field.type === 'checkbox'\n // )\n // .map(field => {\n // return {\n // name: field.name,\n // value:\n // field.type === 'text'\n // ? field.value\n // : field.type === 'checkbox'\n // ? (field as any).checked\n // : field.type === 'number'\n // ? parseFloat(field.value)\n // : field.value,\n // operator: field.getAttribute('searchOper')\n // }\n // })\n }\n\n async _deleteScenario() {\n if (confirm(i18next.t('text.sure_to_x', { x: i18next.t('text.delete') }))) {\n const ids = this.grist.selected.map(record => record.id).filter(Boolean) as string[]\n if (ids && ids.length > 0) {\n const response = (await deleteScenarioById(ids))?.data\n if (!response || !response.status) {\n document.dispatchEvent(\n new CustomEvent('notify', {\n detail: {\n level: 'info',\n message: 'Delete Scenarios Error'\n }\n })\n )\n } else {\n this.grist.fetch()\n await document.dispatchEvent(\n new CustomEvent('notify', {\n detail: {\n message: i18next.t('text.info_delete_successfully', { x: i18next.t('text.delete') })\n }\n })\n )\n }\n }\n }\n }\n\n async _updateScenario() {\n let patches = this.grist.dirtyRecords\n if (patches && patches.length) {\n patches = patches.map(patch => {\n let patchField: any = patch.id ? { id: patch.id } : {}\n const dirtyFields = patch.__dirtyfields__\n for (let key in dirtyFields) {\n if (['message', 'step', 'steps', 'progress', 'rounds'].indexOf(key) == -1) {\n patchField[key] = dirtyFields[key].after\n }\n }\n patchField.cuFlag = patch.__dirty__\n //patchField.updaterId = VueCookies.get('miipUser').userNm\n patchField.updaterId = localStorage.getItem('FMB_userNM') || ''\n patchField.description = patch.description\n return patchField\n })\n\n let descriptionExist = true\n patches.forEach(scn => {\n if (!scn.description) {\n descriptionExist = false\n } else {\n if (!(scn.description === 'Main Server' || scn.description === 'Secondary Server')) {\n descriptionExist = false\n }\n }\n })\n\n if (!descriptionExist) {\n document.dispatchEvent(\n new CustomEvent('notify', {\n detail: {\n level: 'info',\n message: 'Scenario description value is invalid.'\n }\n })\n )\n return\n }\n\n const response = (await updateScenarios(patches))?.data\n if (!response || !response.status) {\n document.dispatchEvent(\n new CustomEvent('notify', {\n detail: {\n level: 'info',\n message: 'Update Scenarios Error'\n }\n })\n )\n } else {\n this.grist.fetch()\n }\n }\n }\n\n async startScenario(record) {\n let param = {\n scenarioName: record.name,\n instanceName: record.name\n }\n const response = (await startScenario(param, record.description))?.data\n if (!response || !response.status) {\n console.log('scenario start error')\n document.dispatchEvent(\n new CustomEvent('notify', {\n detail: {\n level: 'info',\n message: 'Start Scenarios Error'\n }\n })\n )\n return\n } else {\n console.log('scenario start success')\n const state = response.startScenario.state\n record.state = state\n this.grist.refresh()\n notify({\n level: 'info',\n message: `${IS_SCENARIO_RUNNING(state) ? 'success' : 'fail'} to start scenario : ${record.name}`\n })\n }\n }\n\n async stopScenario(record) {\n const response = (await stopScenario({ instanceName: record.name }, record.description))?.data\n if (!response || !response.status) {\n console.log('scenario stop error')\n document.dispatchEvent(\n new CustomEvent('notify', {\n detail: {\n level: 'info',\n message: 'Stop Scenarios Error'\n }\n })\n )\n return\n } else {\n console.log('scenario stop success')\n const state = response.stopScenario.state\n record.state = state\n this.grist.refresh()\n notify({\n level: 'info',\n message: `${IS_SCENARIO_RUNNING(state) ? 'fail' : 'success'} to stop scenario : ${record.name}`\n })\n }\n }\n}\n"]}
1
+ {"version":3,"file":"restful-scenario.js","sourceRoot":"","sources":["../../client/pages/restful-scenario.ts"],"names":[],"mappings":";AAAA,OAAO,iCAAiC,CAAA;AACxC,OAAO,iCAAiC,CAAA;AACxC,OAAO,2BAA2B,CAAA;AAElC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,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Q,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;;+CAAwB;AACxB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;oDAAiB;AAChB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;kDAAe;AACf;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;;qDAAqB;AAE5B;IAAlB,KAAK,CAAC,UAAU,CAAC;8BAAS,SAAS;8CAAA;AACX;IAAxB,KAAK,CAAC,gBAAgB,CAAC;8BAAc,UAAU;mDAAA;AArCrC,eAAe;IAD3B,aAAa,CAAC,uBAAuB,CAAC;GAC1B,eAAe,CAqtB3B","sourcesContent":["import '@operato/data-grist/ox-grist.js'\nimport '@operato/form/ox-search-form.js'\nimport './restful-scenario-detail'\n\nimport { css, html } from 'lit'\nimport { customElement, property, query } from 'lit/decorators.js'\nimport moment from 'moment-timezone'\nimport { connect } from 'pwa-helpers/connect-mixin'\n\nimport { DataGrist } from '@operato/data-grist'\nimport { SearchForm } from '@operato/form'\nimport { i18next, localize } from '@operato/i18n'\nimport { notify, openPopup } from '@operato/layout'\nimport { navigate, PageView, store } from '@operato/shell'\nimport { CommonButtonStyles, CommonGristStyles, ScrollbarStyles } from '@operato/styles'\nimport { isMobileDevice } from '@operato/utils'\n\nconst DEFAULT_TZ = Intl.DateTimeFormat().resolvedOptions().timeZone\nconst TIMEZONE_OPTIONS = ['', DEFAULT_TZ, ...moment.tz.names().filter(tz => tz !== DEFAULT_TZ)]\n\nimport { fetchScenarios, deleteScenarioById, updateScenarios, startScenario, stopScenario } from '@fmsim/api/restful.js'\n\nfunction IS_SCENARIO_RUNNING(state) {\n return state && state !== 'UNLOADED'\n}\n\n@customElement('restful-scenario-page')\nexport class RestfulScenario extends connect(store)(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 #filters {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n\n background-color: white;\n }\n\n #filters > * {\n padding: var(--padding-default) var(--padding-wide);\n }\n `\n ]\n\n @property({ type: Boolean }) active: boolean = false\n @property({ type: Object }) gristConfig: any\n @property({ type: Object }) taskTypes: any\n @property({ type: Array }) searchConfig?: any[]\n\n @query('ox-grist') grist!: DataGrist\n @query('ox-search-form') searchForm!: SearchForm\n\n get context() {\n return {\n title: i18next.t('text.scenario list'),\n actions: [\n {\n title: i18next.t('button.save'),\n action: this._updateScenario.bind(this),\n ...CommonButtonStyles.save\n },\n {\n title: i18next.t('button.delete'),\n action: this._deleteScenario.bind(this),\n ...CommonButtonStyles.delete\n }\n ],\n board_topmenu: true\n }\n }\n\n render() {\n return html`\n <!-- <ox-search-form\n id=\"ox-search-form\"\n .fields=${this.searchConfig}\n @submit=${async () => this.grist.fetch()}\n ></ox-search-form> -->\n\n <ox-grist\n .mode=${isMobileDevice() ? 'LIST' : 'GRID'}\n .config=${this.gristConfig}\n .fetchHandler=${this.fetchHandler.bind(this)}\n >\n </ox-grist>\n `\n }\n\n async pageInitialized(lifecycle) {\n this.fetchTaskTypes()\n\n this.searchConfig = [\n {\n name: 'name',\n type: 'text',\n props: {\n placeholder: i18next.t('field.name'),\n searchOper: 'like'\n }\n },\n {\n name: 'description',\n type: 'text',\n props: {\n placeholder: i18next.t('field.description'),\n searchOper: 'like'\n }\n }\n ]\n\n this.gristConfig = {\n list: { fields: ['name', 'description', 'schedule', '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 ? 'play_arrow' : IS_SCENARIO_RUNNING(record.state) ? 'pause' : 'play_arrow'),\n handlers: {\n click: (columns, data, column, record, rowIndex) => {\n if (!record || !record.name) {\n /* TODO record가 새로 추가된 것이면 리턴하도록 한다. */\n return\n }\n if (IS_SCENARIO_RUNNING(record.state)) {\n this.stopScenario(record)\n } else {\n this.startScenario(record)\n }\n }\n }\n },\n {\n type: 'gutter',\n gutterName: 'button',\n icon: 'reorder',\n handlers: {\n click: (columns, data, column, record, rowIndex) => {\n if (!record.id) return\n openPopup(\n html`\n <restful-scenario-detail\n .scenario=${record}\n .taskTypes=${this.taskTypes}\n @requestRefresh=\"${() => this.grist.fetch()}\"\n ></restful-scenario-detail>\n `,\n {\n backdrop: true,\n size: 'large',\n title: i18next.t('title.scenario-detail')\n }\n )\n }\n }\n },\n {\n type: 'string',\n name: 'name',\n label: true,\n header: i18next.t('field.name'),\n record: {\n editable: true\n },\n filter: 'search',\n sortable: true,\n width: 300,\n validation: function (after, before, record, column) {\n /* connected 상태에서는 이름을 바꿀 수 없다. */\n if (IS_SCENARIO_RUNNING(record.state)) {\n notify({\n level: 'warn',\n message: 'scenario name cannot be changed during execution.'\n })\n return false\n }\n return true\n }\n },\n {\n type: 'string',\n name: 'type',\n header: i18next.t('field.type'),\n record: {\n editable: true\n },\n filter: 'search',\n width: 100\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: 350\n },\n {\n type: 'crontab',\n name: 'schedule',\n label: true,\n header: i18next.t('field.schedule'),\n record: {\n editable: true\n },\n width: 110\n },\n {\n type: 'select',\n name: 'timezone',\n header: i18next.t('field.timezone'),\n record: {\n editable: true,\n options: TIMEZONE_OPTIONS\n },\n width: 120\n },\n {\n type: 'checkbox',\n name: 'active',\n label: true,\n header: i18next.t('field.active'),\n record: {\n align: 'center',\n editable: true\n },\n sortable: true,\n width: 60\n },\n {\n type: 'object',\n name: 'updater',\n header: i18next.t('field.updater'),\n record: {\n editable: false\n },\n sortable: true,\n width: 85\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 pageUpdated(changes, lifecycle) {\n if (this.active) {\n this.grist.fetch()\n }\n }\n\n async fetchHandler({ page, limit, sorters = [], filters = [] }) {\n const response = (await fetchScenarios({ page, limit, sorters }))?.data\n if (!response || !response.status) {\n notify({\n message: 'Get Scenarios Error'\n })\n }\n\n const scenario = response!.scenario || {}\n\n return {\n total: scenario.total || 0,\n records: scenario.items || []\n }\n }\n\n //상세 페이지 타입\n async fetchTaskTypes() {\n this.taskTypes = {\n 'book-up-scenario': {\n name: 'book-up-scenario',\n description: null,\n parameterSpec: [\n {\n type: 'entity-selector',\n name: 'scenario',\n label: 'scenario',\n placeholder: null,\n property: { queryName: 'scenarios' }\n },\n { type: 'string', name: 'delay', label: 'delay', placeholder: null, property: null },\n {\n type: 'select',\n name: 'priority',\n label: 'priority',\n placeholder: null,\n property: { options: ['', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9'] }\n },\n { type: 'scenario-step-input', name: 'variables', label: 'variables', placeholder: null, property: null },\n { type: 'string', name: 'tag', label: 'tag', placeholder: null, property: null }\n ]\n },\n 'database-query': {\n name: 'database-query',\n description: null,\n parameterSpec: [{ type: 'textarea', name: 'query', label: 'query', placeholder: null, property: null }]\n },\n 'echo-receive': { name: 'echo-receive', description: null, parameterSpec: [] },\n 'echo-send': {\n name: 'echo-send',\n description: null,\n parameterSpec: [{ type: 'string', name: 'message', label: 'message', placeholder: null, property: null }]\n },\n 'empty-check': {\n name: 'empty-check',\n description: null,\n parameterSpec: [\n { type: 'scenario-step-input', name: 'accessor', label: 'accessor', placeholder: null, property: null },\n { type: 'string', name: 'goto', label: 'goto', placeholder: null, property: null }\n ]\n },\n end: { name: 'end', description: null, parameterSpec: [] },\n 'floating-point': {\n name: 'floating-point',\n description: null,\n parameterSpec: [\n { type: 'scenario-step-input', name: 'accessor', label: 'accessor', placeholder: null, property: null },\n {\n type: 'select',\n name: 'operation',\n label: 'operation',\n placeholder: null,\n property: { options: ['read', 'write'] }\n },\n {\n type: 'select',\n name: 'endian',\n label: 'endian',\n placeholder: null,\n property: { options: ['little', 'big'] }\n },\n {\n type: 'select',\n name: 'floatType',\n label: 'float type',\n placeholder: null,\n property: { options: ['float', 'double'] }\n }\n ]\n },\n goto: {\n name: 'goto',\n description: null,\n parameterSpec: [{ type: 'scenario-step-input', name: 'goto', label: 'goto', placeholder: null, property: null }]\n },\n 'graphql-mutate': {\n name: 'graphql-mutate',\n description: null,\n parameterSpec: [{ type: 'graphql', name: 'mutation', label: 'mutation', placeholder: null, property: null }]\n },\n 'graphql-query': {\n name: 'graphql-query',\n description: null,\n parameterSpec: [{ type: 'graphql', name: 'query', label: 'query', placeholder: null, property: null }]\n },\n 'http-get': {\n name: 'http-get',\n description: null,\n parameterSpec: [\n { type: 'string', name: 'path', label: 'path', placeholder: null, property: null },\n { type: 'http-headers', name: 'headers', label: 'headers', placeholder: null, property: null },\n { type: 'http-parameters', name: 'searchParams', label: 'search-params', placeholder: null, property: null }\n ]\n },\n 'http-post': {\n name: 'http-post',\n description: null,\n parameterSpec: [\n { type: 'string', name: 'path', label: 'path', placeholder: null, property: null },\n { type: 'http-headers', name: 'headers', label: 'headers', placeholder: null, property: null },\n {\n type: 'select',\n name: 'contentType',\n label: 'content-type',\n placeholder: null,\n property: {\n options: [\n { display: '', value: '' },\n { display: 'application/json', value: 'application/json' },\n { display: 'text/plain', value: 'text/plain' },\n { display: 'application/x-www-form-urlencoded', value: 'application/x-www-form-urlencoded' }\n ]\n }\n },\n { type: 'scenario-step-input', name: 'accessor', label: 'accessor', placeholder: null, property: null }\n ]\n },\n 'local-graphql-mutate': {\n name: 'local-graphql-mutate',\n description: null,\n parameterSpec: [{ type: 'graphql', name: 'mutation', label: 'mutation', placeholder: null, property: null }]\n },\n 'local-graphql-query': {\n name: 'local-graphql-query',\n description: null,\n parameterSpec: [{ type: 'graphql', name: 'query', label: 'query', placeholder: null, property: null }]\n },\n log: {\n name: 'log',\n description: null,\n parameterSpec: [\n { type: 'scenario-step-input', name: 'accessor', label: 'accessor', placeholder: null, property: null },\n { type: 'string', name: 'message', label: 'message', placeholder: null, property: null },\n {\n type: 'select',\n name: 'level',\n label: 'level',\n placeholder: null,\n property: { options: ['info', 'warn', 'error'] }\n }\n ]\n },\n 'mqtt-publish': {\n name: 'mqtt-publish',\n description: null,\n parameterSpec: [\n { type: 'string', name: 'topic', label: 'topic', placeholder: null, property: null },\n { type: 'scenario-step-input', name: 'accessor', label: 'accessor', placeholder: null, property: null }\n ]\n },\n 'mqtt-subscribe': {\n name: 'mqtt-subscribe',\n description: null,\n parameterSpec: [\n { type: 'string', name: 'topic', label: 'topic', placeholder: null, property: null },\n {\n type: 'select',\n name: 'dataFormat',\n label: 'data-format',\n placeholder: null,\n property: {\n options: [\n { display: 'Plain Text', value: 'text' },\n { display: 'JSON', value: 'json' }\n ]\n }\n }\n ]\n },\n 'pick-pending-scenario': {\n name: 'pick-pending-scenario',\n description: null,\n parameterSpec: [\n { type: 'string', name: 'tag', label: 'tag', placeholder: null, property: null },\n { type: 'number', name: 'waitFor', label: 'wait-for', placeholder: null, property: null }\n ]\n },\n publish: {\n name: 'publish',\n description: null,\n parameterSpec: [\n { type: 'string', name: 'tag', label: 'tag', placeholder: null, property: null },\n { type: 'scenario-step-input', name: 'accessor', label: 'accessor', placeholder: null, property: null }\n ]\n },\n 'reset-pending-scenario': { name: 'reset-pending-scenario', description: null, parameterSpec: [] },\n scenario: {\n name: 'scenario',\n description: null,\n parameterSpec: [\n {\n type: 'entity-selector',\n name: 'scenario',\n label: 'scenario',\n placeholder: null,\n property: { queryName: 'scenarios' }\n },\n { type: 'scenario-step-input', name: 'variables', label: 'variables', placeholder: null, property: null }\n ]\n },\n script: {\n name: 'script',\n description: null,\n parameterSpec: [{ type: 'textarea', name: 'script', label: 'script', placeholder: null, property: null }]\n },\n sleep: {\n name: 'sleep',\n description: null,\n parameterSpec: [\n { type: 'number', name: 'duration', label: 'duration', placeholder: 'milli-seconds', property: null }\n ]\n },\n 'socket-listener': {\n name: 'socket-listener',\n description: null,\n parameterSpec: [\n {\n type: 'select',\n name: 'dataFormat',\n label: 'data-format',\n placeholder: null,\n property: {\n options: [\n { display: 'CSV', value: 'csv' },\n { display: 'JSON', value: 'json' },\n { display: 'String', value: 'string' }\n ]\n }\n }\n ]\n },\n switch: {\n name: 'switch',\n description: null,\n parameterSpec: [\n { type: 'scenario-step-input', name: 'accessor', label: 'accessor', placeholder: null, property: null },\n { type: 'map', name: 'cases', label: 'cases', placeholder: null, property: null }\n ]\n },\n 'switch-goto': {\n name: 'switch-goto',\n description: null,\n parameterSpec: [\n { type: 'scenario-step-input', name: 'accessor', label: 'accessor', placeholder: null, property: null },\n { type: 'map', name: 'cases', label: 'cases', placeholder: null, property: null }\n ]\n },\n 'switch-range': {\n name: 'switch-range',\n description: null,\n parameterSpec: [\n { type: 'scenario-step-input', name: 'accessor', label: 'accessor', placeholder: null, property: null },\n { type: 'range', name: 'cases', label: 'cases', placeholder: null, property: null }\n ]\n },\n 'switch-range-goto': {\n name: 'switch-range-goto',\n description: null,\n parameterSpec: [\n { type: 'scenario-step-input', name: 'accessor', label: 'accessor', placeholder: null, property: null },\n { type: 'range', name: 'cases', label: 'cases', placeholder: null, property: null }\n ]\n },\n 'switch-range-scenario': {\n name: 'switch-range-scenario',\n description: null,\n parameterSpec: [\n { type: 'scenario-step-input', name: 'accessor', label: 'accessor', placeholder: null, property: null },\n { type: 'range', name: 'cases', label: 'cases', placeholder: null, property: null },\n { type: 'scenario-step-input', name: 'variables', label: 'variables', placeholder: null, property: null }\n ]\n },\n 'switch-range-set': {\n name: 'switch-range-set',\n description: null,\n parameterSpec: [\n { type: 'scenario-step-input', name: 'accessor', label: 'accessor', placeholder: null, property: null },\n { type: 'range', name: 'cases', label: 'cases', placeholder: null, property: null }\n ]\n },\n 'switch-scenario': {\n name: 'switch-scenario',\n description: null,\n parameterSpec: [\n { type: 'scenario-step-input', name: 'accessor', label: 'accessor', placeholder: null, property: null },\n { type: 'map', name: 'cases', label: 'cases', placeholder: null, property: null },\n { type: 'scenario-step-input', name: 'variables', label: 'variables', placeholder: null, property: null }\n ]\n },\n 'switch-set': {\n name: 'switch-set',\n description: null,\n parameterSpec: [\n { type: 'scenario-step-input', name: 'accessor', label: 'accessor', placeholder: null, property: null },\n { type: 'map', name: 'cases', label: 'cases', placeholder: null, property: null }\n ]\n },\n throw: {\n name: 'throw',\n description: null,\n parameterSpec: [{ type: 'string', name: 'message', label: 'message', placeholder: null, property: null }]\n },\n variables: { name: 'variables', description: null, parameterSpec: [] }\n }\n }\n\n _conditionParser() {\n return this.searchForm.getQueryFilters()\n\n // return this.searchForm\n // .fields!.filter(\n // field => (field.type !== 'checkbox' && field.value && field.value !== '') || field.type === 'checkbox'\n // )\n // .map(field => {\n // return {\n // name: field.name,\n // value:\n // field.type === 'text'\n // ? field.value\n // : field.type === 'checkbox'\n // ? (field as any).checked\n // : field.type === 'number'\n // ? parseFloat(field.value)\n // : field.value,\n // operator: field.getAttribute('searchOper')\n // }\n // })\n }\n\n async _deleteScenario() {\n if (confirm(i18next.t('text.sure_to_x', { x: i18next.t('text.delete') }))) {\n const ids = this.grist.selected.map(record => record.id).filter(Boolean) as string[]\n if (ids && ids.length > 0) {\n const response = (await deleteScenarioById(ids))?.data\n if (!response || !response.status) {\n document.dispatchEvent(\n new CustomEvent('notify', {\n detail: {\n level: 'info',\n message: 'Delete Scenarios Error'\n }\n })\n )\n } else {\n this.grist.fetch()\n await document.dispatchEvent(\n new CustomEvent('notify', {\n detail: {\n message: i18next.t('text.info_delete_successfully', { x: i18next.t('text.delete') })\n }\n })\n )\n }\n }\n }\n }\n\n async _updateScenario() {\n let patches = this.grist.dirtyRecords\n if (patches && patches.length) {\n patches = patches.map(patch => {\n let patchField: any = patch.id ? { id: patch.id } : {}\n const dirtyFields = patch.__dirtyfields__\n for (let key in dirtyFields) {\n if (['message', 'step', 'steps', 'progress', 'rounds'].indexOf(key) == -1) {\n patchField[key] = dirtyFields[key].after\n }\n }\n patchField.cuFlag = patch.__dirty__\n //patchField.updaterId = VueCookies.get('miipUser').userNm\n patchField.updaterId = localStorage.getItem('FMB_userNM') || ''\n patchField.description = patch.description\n return patchField\n })\n\n const response = (await updateScenarios(patches))?.data\n if (!response || !response.status) {\n document.dispatchEvent(\n new CustomEvent('notify', {\n detail: {\n level: 'info',\n message: 'Update Scenarios Error'\n }\n })\n )\n } else {\n this.grist.fetch()\n }\n }\n }\n\n async startScenario(record) {\n let param = {\n scenarioName: record.name,\n instanceName: record.name\n }\n const response = (await startScenario(param, record.description))?.data\n if (!response || !response.status) {\n console.log('scenario start error')\n document.dispatchEvent(\n new CustomEvent('notify', {\n detail: {\n level: 'info',\n message: 'Start Scenarios Error'\n }\n })\n )\n return\n } else {\n console.log('scenario start success')\n const state = response.startScenario.state\n record.state = state\n this.grist.refresh()\n notify({\n level: 'info',\n message: `${IS_SCENARIO_RUNNING(state) ? 'success' : 'fail'} to start scenario : ${record.name}`\n })\n }\n }\n\n async stopScenario(record) {\n const response = (await stopScenario({ instanceName: record.name }, record.description))?.data\n if (!response || !response.status) {\n console.log('scenario stop error')\n document.dispatchEvent(\n new CustomEvent('notify', {\n detail: {\n level: 'info',\n message: 'Stop Scenarios Error'\n }\n })\n )\n return\n } else {\n console.log('scenario stop success')\n const state = response.stopScenario.state\n record.state = state\n this.grist.refresh()\n notify({\n level: 'info',\n message: `${IS_SCENARIO_RUNNING(state) ? 'fail' : 'success'} to stop scenario : ${record.name}`\n })\n }\n }\n}\n"]}