complexqa_frontend_core 1.27.1 → 1.27.2
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/package.json +1 -1
- package/publish/app_configuration/table/helpers/column_factory.js +14 -4
- package/publish/app_configuration/table/helpers/execution_context_listing_fields.js +1 -0
- package/publish/app_configuration/table/sections/custom_property.js +0 -1
- package/publish/app_configuration/table/sections/execution_context.js +1 -4
- package/publish/app_configuration/table/sections/tag.js +0 -2
- package/publish/app_configuration/table/sections/test_account.js +0 -2
- package/publish/app_configuration/table/sections/test_run.js +2 -2
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@ import { typeTableColumn } from '../../../types/family_service/typeTableColumn.j
|
|
|
6
6
|
*/
|
|
7
7
|
const COLUMN_DEFAULTS = {
|
|
8
8
|
width : '120',
|
|
9
|
-
sort_order : '
|
|
9
|
+
sort_order : '2',
|
|
10
10
|
cell_classes: '',
|
|
11
11
|
default_sort: '',
|
|
12
12
|
is_sortable : true,
|
|
@@ -41,6 +41,7 @@ const COLUMN_DEFAULTS = {
|
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
43
|
* Data-колонка с переводимым заголовком и сохранённым `header_field`.
|
|
44
|
+
* Если `field` совпадает с `model.get_primary_key()`, `is_editable` всегда `false`.
|
|
44
45
|
*
|
|
45
46
|
* @param {import('../../../types/core/0_familyGeneralElement.js').familyGeneralElement} model
|
|
46
47
|
* Модель сущности секции.
|
|
@@ -60,6 +61,9 @@ export function createColumn(model, locale, field, overrides = {})
|
|
|
60
61
|
{
|
|
61
62
|
const header_field = overrides.header_field || field;
|
|
62
63
|
const header_model = overrides.header_model || model;
|
|
64
|
+
const primary_key = typeof model.get_primary_key === 'function'
|
|
65
|
+
? model.get_primary_key()
|
|
66
|
+
: null;
|
|
63
67
|
|
|
64
68
|
return new typeTableColumn({
|
|
65
69
|
...COLUMN_DEFAULTS,
|
|
@@ -67,13 +71,15 @@ export function createColumn(model, locale, field, overrides = {})
|
|
|
67
71
|
header_name: overrides.header_name ?? header_model.get_attribute_name_translate(header_field, locale),
|
|
68
72
|
field,
|
|
69
73
|
...overrides,
|
|
74
|
+
...(primary_key && field === primary_key ? { is_editable: false } : {}),
|
|
70
75
|
});
|
|
71
76
|
}
|
|
72
77
|
|
|
73
78
|
|
|
74
79
|
/**
|
|
75
80
|
* Колонка множественного выбора строк (`column_kind: row_select`).
|
|
76
|
-
* Без `header_field` — не локализуется.
|
|
81
|
+
* Без `header_field` — не локализуется.
|
|
82
|
+
* `sort_order: 0` — всегда первая. В web_app: pinned left, чекбоксы.
|
|
77
83
|
*
|
|
78
84
|
* @param {Partial<typeTableColumn>} [overrides={}]
|
|
79
85
|
* @returns {typeTableColumn}
|
|
@@ -97,6 +103,8 @@ export function createRowSelectColumn(overrides = {})
|
|
|
97
103
|
/**
|
|
98
104
|
* Колонка перехода к деталям (`column_kind: goto`).
|
|
99
105
|
* Заголовок в UI — через `translateGoToHeader` в web_app, не через ядро.
|
|
106
|
+
* `sort_order: 1` — вторая после `row_select` (data-колонки по умолчанию `2`).
|
|
107
|
+
* В web_app: pinned left, как чекбокс.
|
|
100
108
|
*
|
|
101
109
|
* @param {import('../../../types/core/0_familyGeneralElement.js').familyGeneralElement} model
|
|
102
110
|
* @param {string} locale Не используется; сохранён для единообразия API фабрик.
|
|
@@ -111,8 +119,8 @@ export function createGoToColumn(model, locale, overrides = {})
|
|
|
111
119
|
...COLUMN_DEFAULTS,
|
|
112
120
|
header_name : 'goto',
|
|
113
121
|
field : primary_key,
|
|
114
|
-
width : '
|
|
115
|
-
sort_order : '
|
|
122
|
+
width : '40',
|
|
123
|
+
sort_order : '1',
|
|
116
124
|
is_sortable : false,
|
|
117
125
|
is_filter : false,
|
|
118
126
|
column_kind : 'goto',
|
|
@@ -123,6 +131,7 @@ export function createGoToColumn(model, locale, overrides = {})
|
|
|
123
131
|
|
|
124
132
|
/**
|
|
125
133
|
* Колонка primary key (часто скрытая в listing, видимая в todo).
|
|
134
|
+
* `is_editable` всегда `false`: идентификатор строки нельзя менять с фронта.
|
|
126
135
|
*
|
|
127
136
|
* @param {import('../../../types/core/0_familyGeneralElement.js').familyGeneralElement} model
|
|
128
137
|
* @param {string} locale
|
|
@@ -138,6 +147,7 @@ export function createPrimaryKeyColumn(model, locale, overrides = {})
|
|
|
138
147
|
default_sort: 'desc',
|
|
139
148
|
is_hide : false,
|
|
140
149
|
...overrides,
|
|
150
|
+
is_editable : false,
|
|
141
151
|
});
|
|
142
152
|
}
|
|
143
153
|
|
|
@@ -17,6 +17,7 @@ export function get_execution_context_listing_field_specs()
|
|
|
17
17
|
{ field: 'deployment_target_context_id', overrides: { width: '200' } },
|
|
18
18
|
{ field: 'protocol', overrides: { width: '120' } },
|
|
19
19
|
{ field: 'host', overrides: { width: '200' } },
|
|
20
|
+
{ field: 'base_url', overrides: { width: '250' } },
|
|
20
21
|
{ field: 'build_version', overrides: { width: '160' } },
|
|
21
22
|
{ field: 'created_at', overrides: { width: '170' } },
|
|
22
23
|
];
|
|
@@ -19,6 +19,7 @@ const EXECUTION_CONTEXT_EDITABLE_FIELDS = new Set([
|
|
|
19
19
|
...FK_FIELDS,
|
|
20
20
|
'protocol',
|
|
21
21
|
'host',
|
|
22
|
+
'base_url',
|
|
22
23
|
'build_version',
|
|
23
24
|
]);
|
|
24
25
|
|
|
@@ -48,9 +49,6 @@ function build_execution_context_details_columns(locale)
|
|
|
48
49
|
const model = new typeExecutionContext();
|
|
49
50
|
const fields = [
|
|
50
51
|
'execution_context_id',
|
|
51
|
-
'project_id',
|
|
52
|
-
'team_id',
|
|
53
|
-
'context_title',
|
|
54
52
|
...FK_FIELDS,
|
|
55
53
|
'protocol',
|
|
56
54
|
'host',
|
|
@@ -61,7 +59,6 @@ function build_execution_context_details_columns(locale)
|
|
|
61
59
|
];
|
|
62
60
|
|
|
63
61
|
const editableFields = new Set([
|
|
64
|
-
'context_title',
|
|
65
62
|
...FK_FIELDS,
|
|
66
63
|
'protocol',
|
|
67
64
|
'host',
|
|
@@ -13,7 +13,7 @@ function build_test_run_listing_columns(locale, { include_select = true } = {})
|
|
|
13
13
|
columns.push(createRowSelectColumn());
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
columns.push(createPrimaryKeyColumn(model, locale
|
|
16
|
+
columns.push(createPrimaryKeyColumn(model, locale));
|
|
17
17
|
columns.push(createColumn(model, locale, 'test_run_name', {
|
|
18
18
|
width : '480',
|
|
19
19
|
is_editable : true,
|
|
@@ -45,7 +45,7 @@ function build_test_run_todo_columns(locale)
|
|
|
45
45
|
const model = new typeTestRun();
|
|
46
46
|
|
|
47
47
|
return [
|
|
48
|
-
createPrimaryKeyColumn(model, locale
|
|
48
|
+
createPrimaryKeyColumn(model, locale),
|
|
49
49
|
createColumn(model, locale, 'test_run_name', {
|
|
50
50
|
width : '480',
|
|
51
51
|
is_editable : true,
|