ru.coon 2.5.41 → 2.5.43
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.
- package/CHANGELOG.md +20 -0
- package/package.json +1 -1
- package/src/common/component/editor/EditorFactory.js +2 -2
- package/src/common/component/editor/TypedCharacteristicEditor.js +10 -5
- package/src/common/component/editor/creators/CustomPanelEditorCreator.js +4 -3
- package/src/common/component/editor/creators/ForeignKeyEditorCreator.js +3 -2
- package/src/common/component/editor/creators/SimpleReportEditorCreator.js +2 -2
- package/src/common/component/editor/creators/TriggerFieldEditorCreator.js +3 -2
- package/src/report/component/ReportPanel.js +9 -1
- package/src/report/component/settings/plugin/ReportFormPluginGridController.js +24 -4
- package/src/report/component/settings/property/ReportPropertyDictionary.js +48 -10
- package/src/report/plugin/grid/ExportReportDataToFilePlugin.js +11 -1
- package/src/uielement/component/UiElementController.js +32 -6
- package/src/uielement/component/UiElementPanel.js +2 -2
- package/src/version.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
# Version 2.5.43, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/bc0bf6f30c6fa63c8af9ccfaa0ee75431bda6029)
|
|
2
|
+
* hotfix ExportReportDataToFilePlugin ([391a17], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/391a175384ff87e18e3ed14b75094f2d204270ad))
|
|
3
|
+
* update: CHANGELOG.md ([892608], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/892608eb6ddd2ef85d205ba9e1e857aa27672320))
|
|
4
|
+
|
|
5
|
+
# Version 2.5.42, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/a6256f14a891eda0974a2af1ee2c108c8904feab)
|
|
6
|
+
* ## Features
|
|
7
|
+
* <span style='color:green'>feat: TR-67200 доработка редактора репортов: поддержать дефолтные конфигурации плагинов</span> ([790422], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/79042239af502a062427829c07cc6d9feb4cbe35))
|
|
8
|
+
|
|
9
|
+
* ## Fixes
|
|
10
|
+
* <span style='color:red'> HT-7350 ReportGroupsFieldValidationPlugin не применяется для репорта, если у отчета скрыта панель фильтрации (hideFilterPanel=true)</span> ([f1eb79], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/f1eb794b00e46578457a884ce1b61ffd36244a4a))
|
|
11
|
+
|
|
12
|
+
* revert draft changes ([da5a42], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/da5a42d37be6de3db9d36bb4c7d6fc32ff286a64))
|
|
13
|
+
* upd ([df1a17], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/df1a17fa75dc6b92da08a3fbe1dd79fff94de33a))
|
|
14
|
+
* update: CHANGELOG.md ([4b1a88], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/4b1a8858bf1a3677e6bee55d05cbd9ca218318ab))
|
|
15
|
+
|
|
1
16
|
# Version 2.5.41, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/612fb7573419ad9857649f7211c8d7a56e52cdb4)
|
|
2
17
|
* ## Features
|
|
3
18
|
* <span style='color:green'>feat: BFL-9521: init dependent form params anytime</span> ([2e5aa1], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/2e5aa16eeace7205cff9e01295f43d0f4ce956c6))
|
|
@@ -25,12 +40,16 @@
|
|
|
25
40
|
* ## Features
|
|
26
41
|
* <span style='color:green'>feat: TR-67541 Исправление причину сообщений WRN callParent has no target при сборке wb</span> ([a5753d], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/a5753dff2b7454b5d466e30cb4369f8632059805))
|
|
27
42
|
|
|
43
|
+
* ## Fixes
|
|
44
|
+
* <span style='color:red'> BFL-8384 fix server report properties</span> ([7b823c], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/7b823c6b5ef3b88e74f8add8eec1165b56a69829))
|
|
45
|
+
|
|
28
46
|
* rollback ExportReportDataToFilePlugin version ([abd98f], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/abd98fe930283d34326d00dad7d1f97ec08aabfd))
|
|
29
47
|
* update: CHANGELOG.md ([96c169], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/96c169bfcd80139251086e0b37e13589cd8267a8))
|
|
30
48
|
|
|
31
49
|
# Version 2.5.37, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/6d81ec7e9ac5bfbcbe04d3310a7e26088ac648fb)
|
|
32
50
|
* ## Fixes
|
|
33
51
|
* <span style='color:red'> CRM-7853 ParameterizedReportCombo исправлен expand при начитке стора с...</span> ([026277], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/0262778f6eabba77c4af806b2819447a7711bb33))
|
|
52
|
+
* <span style='color:red'>fix server report properties</span> ([82b3fa], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/82b3fa6053de8c6713cbb42a52e7ac2d1a57a928))
|
|
34
53
|
|
|
35
54
|
* hotfix plugin ([bf9339], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/bf9339051130805e551f48ce07bd5bac3d49d140))
|
|
36
55
|
* update: CHANGELOG.md ([6dc306], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/6dc306b57176b4991b264821a59929998e874fe1))
|
|
@@ -58,6 +77,7 @@
|
|
|
58
77
|
* ## Fixes
|
|
59
78
|
* <span style='color:red'> BFL-8646: fix object value and assign object params</span> ([15d3e8], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/15d3e8515a3ecefa750c06b85387d57f101e24fe))
|
|
60
79
|
|
|
80
|
+
* HT-7259 редактор х-к: решить кейс проброса параметров для редактора х-ки если это репорт,xtype или кастомная панель ([13eb6a], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/13eb6ab5b1d727bb59b9f8617685d39d2770ffb6))
|
|
61
81
|
* update: CHANGELOG.md ([a4612b], [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/a4612b5a0e83714c0bf5ab766458cdf0949f1daa))
|
|
62
82
|
|
|
63
83
|
# Version 2.5.33, [link](http://gitlab-dbr.sigma-it.local/dbr/ru.coon/-/commit/3c703020664a8b7ecc9b4fdbc0d82e6121769531)
|
package/package.json
CHANGED
|
@@ -417,7 +417,7 @@ Ext.define('Coon.common.component.editor.CustomTypeEditor', {
|
|
|
417
417
|
Coon.log.log(e);
|
|
418
418
|
}
|
|
419
419
|
if (editor) {
|
|
420
|
-
field = editor.createField(record, this.grid);
|
|
420
|
+
field = editor.createField(record, this.grid, context);
|
|
421
421
|
|
|
422
422
|
if (field.requiredInitField) {
|
|
423
423
|
// Определение инициализирующих параметров из контекста
|
|
@@ -460,7 +460,7 @@ Ext.define('Coon.common.component.editor.CustomTypeEditor', {
|
|
|
460
460
|
Coon.log.error(`[ERROR]EditorFactory: `, e);
|
|
461
461
|
}
|
|
462
462
|
if (editor) {
|
|
463
|
-
field = editor.createField(record, this.grid);
|
|
463
|
+
field = editor.createField(record, this.grid, context);
|
|
464
464
|
field.setValue(record.get(ns.$value));
|
|
465
465
|
if (field.setVisibleValue) {
|
|
466
466
|
field.setVisibleValue(record.get(ns.$valueDescription));
|
|
@@ -16,7 +16,9 @@ Ext.define('Coon.common.component.editor.TypedCharacteristicEditor', {
|
|
|
16
16
|
showActionColumn: false,
|
|
17
17
|
enableSortButton: false,
|
|
18
18
|
enableToolBar: true,
|
|
19
|
+
context: {},
|
|
19
20
|
},
|
|
21
|
+
twoWayBindable: ['context'],
|
|
20
22
|
|
|
21
23
|
initComponent: function() {
|
|
22
24
|
const ns = Coon.report.model.CharacteristicBeanFields;
|
|
@@ -89,11 +91,6 @@ Ext.define('Coon.common.component.editor.TypedCharacteristicEditor', {
|
|
|
89
91
|
this.factory = this.createFactory();
|
|
90
92
|
},
|
|
91
93
|
|
|
92
|
-
setContext: function(context) {
|
|
93
|
-
this.context = context || {};
|
|
94
|
-
this.getColumnModel().setContext(this.context);
|
|
95
|
-
},
|
|
96
|
-
|
|
97
94
|
createAdditionButtons: function() {
|
|
98
95
|
const ns = Coon.report.model.CharacteristicBeanFields;
|
|
99
96
|
|
|
@@ -387,4 +384,12 @@ Ext.define('Coon.common.component.editor.TypedCharacteristicEditor', {
|
|
|
387
384
|
this.activeEditor.grid = this;
|
|
388
385
|
return this.activeEditor;
|
|
389
386
|
},
|
|
387
|
+
|
|
388
|
+
applyContext: function(context) {
|
|
389
|
+
return context;
|
|
390
|
+
},
|
|
391
|
+
|
|
392
|
+
updateContext: function(context) {
|
|
393
|
+
this.setContext(context);
|
|
394
|
+
},
|
|
390
395
|
});
|
|
@@ -7,7 +7,8 @@ Ext.define('Coon.common.component.editor.creators.CustomPanelEditorCreator', {
|
|
|
7
7
|
config: {
|
|
8
8
|
uiElementCd: null,
|
|
9
9
|
},
|
|
10
|
-
createField: function() {
|
|
10
|
+
createField: function(record, grid, context) {
|
|
11
|
+
this.context = context;
|
|
11
12
|
this.field = Ext.create({
|
|
12
13
|
xtype: 'textfield',
|
|
13
14
|
setVisibleValue: function(visibleValue) {
|
|
@@ -55,10 +56,10 @@ Ext.define('Coon.common.component.editor.creators.CustomPanelEditorCreator', {
|
|
|
55
56
|
items: [panel],
|
|
56
57
|
});
|
|
57
58
|
win.show();
|
|
58
|
-
panel.getViewModel().set({
|
|
59
|
+
panel.getViewModel().set(Object.assign({
|
|
59
60
|
mainRecord: record.getData(),
|
|
60
61
|
parent,
|
|
61
|
-
});
|
|
62
|
+
}, this.context));
|
|
62
63
|
Ext.defer(function() {
|
|
63
64
|
win.focus();
|
|
64
65
|
}, 1000, this);
|
|
@@ -7,7 +7,8 @@ Ext.define('Coon.common.component.editor.creators.ForeignKeyEditorCreator', {
|
|
|
7
7
|
|
|
8
8
|
disableInternalEditor: true,
|
|
9
9
|
|
|
10
|
-
createField: function(record, grid) {
|
|
10
|
+
createField: function(record, grid, context) {
|
|
11
|
+
this.context = context;
|
|
11
12
|
this.field = Ext.create({
|
|
12
13
|
xtype: 'textfield',
|
|
13
14
|
setVisibleValue: function(visibleValue) {
|
|
@@ -44,7 +45,7 @@ Ext.define('Coon.common.component.editor.creators.ForeignKeyEditorCreator', {
|
|
|
44
45
|
}
|
|
45
46
|
const panel = Ext.create({
|
|
46
47
|
xtype: 'ReportPanel',
|
|
47
|
-
filterDefaults: filters,
|
|
48
|
+
filterDefaults: Object.assign(filters, this.context),
|
|
48
49
|
autoFilter: true,
|
|
49
50
|
header: false,
|
|
50
51
|
});
|
|
@@ -12,7 +12,7 @@ Ext.define('Coon.common.component.editor.creators.SimpleReportEditorCreator', {
|
|
|
12
12
|
],
|
|
13
13
|
alias: 'widget.SimpleReportEditorCreator',
|
|
14
14
|
|
|
15
|
-
createField: function(record, parent) {
|
|
15
|
+
createField: function(record, parent, context) {
|
|
16
16
|
const ns = Coon.report.model.CharacteristicBeanFields;
|
|
17
17
|
const reportId = record.get(ns.$mask);
|
|
18
18
|
const entityID = parent && parent.model && parent.model.ID;
|
|
@@ -27,7 +27,7 @@ Ext.define('Coon.common.component.editor.creators.SimpleReportEditorCreator', {
|
|
|
27
27
|
return Ext.create({
|
|
28
28
|
xtype: 'SimplestReportCombo',
|
|
29
29
|
reportId: reportId,
|
|
30
|
-
defaultParameters: params,
|
|
30
|
+
defaultParameters: Object.assign(params, context),
|
|
31
31
|
valueField: 'VALUE',
|
|
32
32
|
displayField: 'DESCRIPTION',
|
|
33
33
|
searchBySubstring: true,
|
|
@@ -10,7 +10,8 @@ Ext.define('Coon.common.component.editor.creators.TriggerFieldEditorCreator', {
|
|
|
10
10
|
doubleClickHandler: true,
|
|
11
11
|
useCallBackFn: false,
|
|
12
12
|
|
|
13
|
-
createField: function() {
|
|
13
|
+
createField: function(record, grid, context) {
|
|
14
|
+
this.context = context;
|
|
14
15
|
this.field = Ext.create({
|
|
15
16
|
xtype: 'textfield',
|
|
16
17
|
setVisibleValue: function(visibleValue) {
|
|
@@ -58,7 +59,7 @@ Ext.define('Coon.common.component.editor.creators.TriggerFieldEditorCreator', {
|
|
|
58
59
|
});
|
|
59
60
|
const parameter = {};
|
|
60
61
|
parameter[props.parameterName] = this.field.ID;
|
|
61
|
-
win.doInit(props.reportId, parameter, true);
|
|
62
|
+
win.doInit(props.reportId, Object.assign(parameter, this.context), true);
|
|
62
63
|
|
|
63
64
|
panel.on('gridReady', function() {
|
|
64
65
|
if (this.doubleClickHandler) {
|
|
@@ -469,7 +469,7 @@ Ext.define('Coon.report.component.ReportPanel', {
|
|
|
469
469
|
if (typeof this.preprocessPluginConfig === 'function') {
|
|
470
470
|
response.plugins = this.preprocessPlugins(response.plugins);
|
|
471
471
|
}
|
|
472
|
-
response.plugins =
|
|
472
|
+
response.plugins = this.checkPluginsCompatibility(response.plugins);
|
|
473
473
|
this.build(response);
|
|
474
474
|
this.fireEvent('configured', response, this);
|
|
475
475
|
this.grid.fireEvent('configured', response, this);
|
|
@@ -477,6 +477,14 @@ Ext.define('Coon.report.component.ReportPanel', {
|
|
|
477
477
|
command.execute(this.reportId);
|
|
478
478
|
},
|
|
479
479
|
|
|
480
|
+
checkPluginsCompatibility: function(plugins) {
|
|
481
|
+
if (this.hideFilterPanel) {
|
|
482
|
+
return plugins.filter((plugin) => plugin.uiElement.xtype !== 'ReportGroupsFieldValidationPlugin');
|
|
483
|
+
} else {
|
|
484
|
+
return plugins;
|
|
485
|
+
}
|
|
486
|
+
},
|
|
487
|
+
|
|
480
488
|
select: function(index) {
|
|
481
489
|
this.grid.getSelectionModel().select(index);
|
|
482
490
|
},
|
|
@@ -24,17 +24,37 @@ Ext.define('Coon.report.component.settings.plugin.ReportFormPluginGridController
|
|
|
24
24
|
},
|
|
25
25
|
|
|
26
26
|
addHandler: function(xtype) {
|
|
27
|
+
const defaultUiElementCd = `${xtype}_DEFAULTS`;
|
|
28
|
+
Coon.util.promisifyCmd('Coon.uielement.command.GetUIElementCommand', defaultUiElementCd)
|
|
29
|
+
.then(function(data) {
|
|
30
|
+
this.addNewPlugin(xtype, Ext.decode(data.propertyData, true), defaultUiElementCd);
|
|
31
|
+
}.bind(this))
|
|
32
|
+
.catch(function(e) {
|
|
33
|
+
// Это не ошибка. У плагина xtype нет конфигурации, используемой по умолчанию.
|
|
34
|
+
this.addNewPlugin(xtype);
|
|
35
|
+
}.bind(this));
|
|
36
|
+
},
|
|
37
|
+
addNewPlugin: function(xtype, uiElementData) {
|
|
27
38
|
const view = this.getView();
|
|
28
39
|
const data = {};
|
|
40
|
+
data['xtype'] = xtype;
|
|
29
41
|
data['isNew'] = true;
|
|
30
42
|
data['sortSequence'] = this.getNextSeq();
|
|
31
43
|
data['properties'] = [];
|
|
32
|
-
data['jsonProperties'] = [];
|
|
33
|
-
data['xtype'] = xtype;
|
|
34
44
|
data['sequenceNumber'] = this.getNextIDSeq();
|
|
35
|
-
|
|
36
|
-
|
|
45
|
+
|
|
46
|
+
if (uiElementData) {
|
|
47
|
+
data['jsonProperties'] = uiElementData;
|
|
48
|
+
if (view.autoGenerateUiElementId) {
|
|
49
|
+
data['uiElement'] = this.generateUiElementId(data);
|
|
50
|
+
}
|
|
51
|
+
} else {
|
|
52
|
+
data['jsonProperties'] = [];
|
|
53
|
+
if (view.autoGenerateUiElementId) {
|
|
54
|
+
data['uiElement'] = this.generateUiElementId(data);
|
|
55
|
+
}
|
|
37
56
|
}
|
|
57
|
+
|
|
38
58
|
view.getStore().add(data);
|
|
39
59
|
view.publishState('data', view.getData());
|
|
40
60
|
view.getSelectionModel().select(view.getStore().getCount() - 1);
|
|
@@ -195,14 +195,17 @@ Ext.define('Coon.report.component.settings.property.ReportPropertyDictionary', {
|
|
|
195
195
|
singleValue: true,
|
|
196
196
|
description: `
|
|
197
197
|
Если свойство принимает значение true,
|
|
198
|
-
то результирующий запрос, построенный при помощи
|
|
198
|
+
то результирующий запрос, построенный при помощи шаблонизатора, будет отражен в Loki-логах. </br>
|
|
199
|
+
boolean
|
|
199
200
|
`,
|
|
200
201
|
},
|
|
201
202
|
{
|
|
202
203
|
id: 'FETCH_SIZE',
|
|
203
204
|
leaf: true,
|
|
204
205
|
defaultVal: null,
|
|
205
|
-
description:
|
|
206
|
+
description: `
|
|
207
|
+
Количество строк, извлекаемых из базы данных за один раз. </br>
|
|
208
|
+
number`,
|
|
206
209
|
},
|
|
207
210
|
{
|
|
208
211
|
id: 'REPORT_DATA_MODE',
|
|
@@ -217,24 +220,32 @@ Ext.define('Coon.report.component.settings.property.ReportPropertyDictionary', {
|
|
|
217
220
|
{
|
|
218
221
|
id: 'WITH_CUSTOM_JDBC_CODE',
|
|
219
222
|
leaf: true,
|
|
223
|
+
singleValue: true,
|
|
220
224
|
defaultVal: null,
|
|
221
|
-
description:
|
|
225
|
+
description: `
|
|
226
|
+
Пусто. </br>
|
|
227
|
+
boolean
|
|
228
|
+
`,
|
|
222
229
|
},
|
|
223
230
|
{
|
|
224
|
-
id: '
|
|
231
|
+
id: 'timeout',
|
|
225
232
|
leaf: true,
|
|
226
233
|
defaultVal: null,
|
|
227
234
|
description: `
|
|
228
235
|
Параметр задает время в мсек.
|
|
229
236
|
если запрос к БД работает дольше,
|
|
230
|
-
то получим ошибку таймаута (значение по умолчанию
|
|
237
|
+
то получим ошибку таймаута (значение по умолчанию 600'000 мсек или 10 минут). </br>
|
|
238
|
+
number (milliseconds)
|
|
231
239
|
`,
|
|
232
240
|
},
|
|
233
241
|
{
|
|
234
242
|
id: 'DATA_SOURCE_NAME',
|
|
235
243
|
leaf: true,
|
|
236
244
|
defaultVal: null,
|
|
237
|
-
description:
|
|
245
|
+
description: `
|
|
246
|
+
Источник данных (JDBC URL). </br>
|
|
247
|
+
string
|
|
248
|
+
`,
|
|
238
249
|
},
|
|
239
250
|
{
|
|
240
251
|
id: 'ACCESS_CONTROL',
|
|
@@ -251,7 +262,7 @@ Ext.define('Coon.report.component.settings.property.ReportPropertyDictionary', {
|
|
|
251
262
|
leaf: true,
|
|
252
263
|
defaultVal: null,
|
|
253
264
|
description: 'Поле в репорте, по которому фильтровать строки репорта.',
|
|
254
|
-
|
|
265
|
+
propertyValueType: 'combo',
|
|
255
266
|
}
|
|
256
267
|
],
|
|
257
268
|
},
|
|
@@ -260,14 +271,20 @@ Ext.define('Coon.report.component.settings.property.ReportPropertyDictionary', {
|
|
|
260
271
|
leaf: true,
|
|
261
272
|
allowMultiple: true,
|
|
262
273
|
defaultVal: null,
|
|
263
|
-
description:
|
|
274
|
+
description: `
|
|
275
|
+
Свойство позволяет добавить еще один параметр поиска отчета в списке отчетов. </br>
|
|
276
|
+
string
|
|
277
|
+
`,
|
|
264
278
|
// valueType: 'tag',
|
|
265
279
|
},
|
|
266
280
|
{
|
|
267
281
|
id: 'TEMPLATE',
|
|
268
282
|
leaf: true,
|
|
269
283
|
defaultVal: null,
|
|
270
|
-
description:
|
|
284
|
+
description: `
|
|
285
|
+
Свойство задает использование определенного шаблонизатора (на данный момент используется только FREEMARKER). </br>
|
|
286
|
+
string
|
|
287
|
+
`,
|
|
271
288
|
exclude: {
|
|
272
289
|
REPORT_LOGGER_ENABLE: {
|
|
273
290
|
onVal: '',
|
|
@@ -279,7 +296,28 @@ Ext.define('Coon.report.component.settings.property.ReportPropertyDictionary', {
|
|
|
279
296
|
leaf: true,
|
|
280
297
|
defaultVal: null,
|
|
281
298
|
description: `Кол-во параметров в 1 строке (по умолчанию равен 4).
|
|
282
|
-
Порядок следования параметров определяется свойством orderSq
|
|
299
|
+
Порядок следования параметров определяется свойством orderSq.</br>
|
|
300
|
+
number
|
|
301
|
+
`,
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
id: 'cached',
|
|
305
|
+
leaf: true,
|
|
306
|
+
singleValue: true,
|
|
307
|
+
defaultVal: null,
|
|
308
|
+
description: `
|
|
309
|
+
Включает кэширование репортов. </br>
|
|
310
|
+
boolean
|
|
311
|
+
`,
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
id: 'timeToLive',
|
|
315
|
+
leaf: true,
|
|
316
|
+
defaultVal: null,
|
|
317
|
+
description: `
|
|
318
|
+
Время жизни кэша. </br>
|
|
319
|
+
number (minutes)
|
|
320
|
+
`,
|
|
283
321
|
}
|
|
284
322
|
],
|
|
285
323
|
}
|
|
@@ -13,6 +13,8 @@ Ext.define('Coon.report.plugin.grid.ExportReportDataToFilePlugin', {
|
|
|
13
13
|
addToSearchButton: false,
|
|
14
14
|
},
|
|
15
15
|
|
|
16
|
+
defaultTimeout: 10 * 60 * 1000,
|
|
17
|
+
|
|
16
18
|
constructor(config) {
|
|
17
19
|
config.invisibleByDefault = config.addToSearchButton === true;
|
|
18
20
|
this.callParent(arguments);
|
|
@@ -148,9 +150,16 @@ Ext.define('Coon.report.plugin.grid.ExportReportDataToFilePlugin', {
|
|
|
148
150
|
});
|
|
149
151
|
},
|
|
150
152
|
|
|
153
|
+
getTimeout() {
|
|
154
|
+
return !isNaN(this.config.cmp && this.config.cmp.timeout) && this.config.cmp.timeout ?
|
|
155
|
+
this.config.cmp.timeout :
|
|
156
|
+
this.defaultTimeout;
|
|
157
|
+
},
|
|
158
|
+
|
|
151
159
|
printExcelFile: async function() {
|
|
152
160
|
const fileName = this.config.reportFileName || this.report.reportId || 'defaultReportName';
|
|
153
|
-
const currentParamList = this.report.currentParamList;
|
|
161
|
+
const currentParamList = this.getConfig('addToSearchButton') ? this.report.northPanel.collectParams() : this.report.currentParamList;
|
|
162
|
+
|
|
154
163
|
const parameterList = [];
|
|
155
164
|
|
|
156
165
|
for (const key in currentParamList) {
|
|
@@ -168,6 +177,7 @@ Ext.define('Coon.report.plugin.grid.ExportReportDataToFilePlugin', {
|
|
|
168
177
|
url,
|
|
169
178
|
method: 'POST',
|
|
170
179
|
binary: true,
|
|
180
|
+
timeout: this.getTimeout(),
|
|
171
181
|
params: {
|
|
172
182
|
reportId: this.report.reportId,
|
|
173
183
|
fileName: fileName,
|
|
@@ -45,21 +45,47 @@ Ext.define('Coon.uielement.component.UiElementController', {
|
|
|
45
45
|
this.close();
|
|
46
46
|
},
|
|
47
47
|
|
|
48
|
+
isDefaultUIElement: function(id, xtype) {
|
|
49
|
+
const ptype = Ext.ClassManager.aliasToName['plugin.' + xtype];
|
|
50
|
+
if (!ptype) {
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
const regExp = new RegExp('.+\_DEFAULTS$');
|
|
54
|
+
return regExp.test(id);
|
|
55
|
+
},
|
|
56
|
+
|
|
48
57
|
saveHandler: function() {
|
|
49
58
|
const validation = this.validate();
|
|
50
59
|
if (validation.state) {
|
|
51
60
|
const vm = this.getViewModel();
|
|
52
|
-
const
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
61
|
+
const uiElement = vm.get('uiElement');
|
|
62
|
+
if (this.isDefaultUIElement(uiElement.id, uiElement.xtype)) {
|
|
63
|
+
Ext.MessageBox.confirm(
|
|
64
|
+
'Подтвердите сохранение',
|
|
65
|
+
'Вы открыли для изменения шаблонный UI элемент, используемый для создания нового плагина ' + uiElement.xtype + '.' +
|
|
66
|
+
'Изменения будут применяться при создании новых плагинов в репортах.' +
|
|
67
|
+
'Вы действительно хотите сохранить?',
|
|
68
|
+
function(btn) {
|
|
69
|
+
btn === 'yes' && (this.doSave());
|
|
70
|
+
}, this);
|
|
71
|
+
} else {
|
|
72
|
+
this.doSave();
|
|
73
|
+
}
|
|
58
74
|
} else {
|
|
59
75
|
Ext.Msg.alert('Сообщение системы', validation.context);
|
|
60
76
|
}
|
|
61
77
|
},
|
|
62
78
|
|
|
79
|
+
doSave: function() {
|
|
80
|
+
const vm = this.getViewModel();
|
|
81
|
+
const command = Ext.create('command.SaveUIElementCommand', {activeComponent: this.getView()});
|
|
82
|
+
command.on('complete', function(uiElementBean) {
|
|
83
|
+
vm.set('uiElement', uiElementBean);
|
|
84
|
+
this.close();
|
|
85
|
+
}, this);
|
|
86
|
+
command.execute(vm.get('uiElement'));
|
|
87
|
+
},
|
|
88
|
+
|
|
63
89
|
validate: function() {
|
|
64
90
|
const vm = this.getViewModel();
|
|
65
91
|
const uiElement = vm.get('uiElement');
|
|
@@ -67,7 +67,7 @@ Ext.define('Coon.uielement.component.UiElementPanel', {
|
|
|
67
67
|
dockedItems: {
|
|
68
68
|
xtype: 'toolbar',
|
|
69
69
|
items: [{
|
|
70
|
-
text: '
|
|
70
|
+
text: 'В виде (JSON)',
|
|
71
71
|
name: 'propertiesModeJSONBtn',
|
|
72
72
|
value: 'JSON',
|
|
73
73
|
ui: 'blue-button',
|
|
@@ -116,7 +116,7 @@ Ext.define('Coon.uielement.component.UiElementPanel', {
|
|
|
116
116
|
xtype: 'toolbar',
|
|
117
117
|
items: [
|
|
118
118
|
{
|
|
119
|
-
text: '
|
|
119
|
+
text: 'В виде (LIST)',
|
|
120
120
|
name: 'propertiesModeListBtn',
|
|
121
121
|
value: 'LIST',
|
|
122
122
|
ui: 'blue-button',
|
package/src/version.js
CHANGED