@ytsaurus/ui 1.20.0 → 1.21.0
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/build/cjs/ui/pages/navigation/Navigation/ContentViewer/helpers/getComponentByContentType.js +2 -0
- package/build/cjs/ui/pages/navigation/Navigation/ContentViewer/helpers/getComponentByContentType.js.map +1 -1
- package/build/cjs/ui/store/actions/operations/jobs-monitor.js +5 -3
- package/build/cjs/ui/store/actions/operations/jobs-monitor.js.map +1 -1
- package/build/cjs/ui/store/selectors/operations/operation.d.ts +8 -1676
- package/build/cjs/ui/store/selectors/operations/operation.js +9 -12
- package/build/cjs/ui/store/selectors/operations/operation.js.map +1 -1
- package/build/cjs/ui/utils/navigation/path-editor.js +1 -0
- package/build/cjs/ui/utils/navigation/path-editor.js.map +1 -1
- package/build/esm/ui/pages/navigation/Navigation/ContentViewer/helpers/getComponentByContentType.js +2 -0
- package/build/esm/ui/pages/navigation/Navigation/ContentViewer/helpers/getComponentByContentType.js.map +1 -1
- package/build/esm/ui/store/actions/operations/jobs-monitor.js +6 -4
- package/build/esm/ui/store/actions/operations/jobs-monitor.js.map +1 -1
- package/build/esm/ui/store/selectors/operations/operation.d.ts +8 -1676
- package/build/esm/ui/store/selectors/operations/operation.js +8 -11
- package/build/esm/ui/store/selectors/operations/operation.js.map +1 -1
- package/build/esm/ui/utils/navigation/path-editor.js +1 -0
- package/build/esm/ui/utils/navigation/path-editor.js.map +1 -1
- package/dist/public/build/assets-manifest.json +8 -8
- package/dist/public/build/js/main.53d3bdc5.js +3 -0
- package/dist/public/build/js/{main.5ce7c259.js.map → main.53d3bdc5.js.map} +1 -1
- package/dist/public/build/js/vendors.e6a251eb.js +3 -0
- package/dist/public/build/js/vendors.e6a251eb.js.map +1 -0
- package/dist/public/build/manifest.json +4 -4
- package/package.json +2 -2
- package/dist/public/build/js/main.5ce7c259.js +0 -3
- package/dist/public/build/js/vendors.3a95f920.js +0 -3
- package/dist/public/build/js/vendors.3a95f920.js.map +0 -1
- /package/dist/public/build/js/{main.5ce7c259.js.LICENSE.txt → main.53d3bdc5.js.LICENSE.txt} +0 -0
- /package/dist/public/build/js/{vendors.3a95f920.js.LICENSE.txt → vendors.e6a251eb.js.LICENSE.txt} +0 -0
@@ -3,8 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.
|
7
|
-
var _some2 = _interopRequireDefault(require("lodash/some"));
|
6
|
+
exports.getOperationsMonitorChartStatesFinishedCount = exports.getOperationTypedAttributes = exports.getOperationTasksNames = exports.getOperationTasks = exports.getOperationPools = exports.getOperationPoolNames = exports.getOperationMonitorChartStates = exports.getOperationJobsMonitorTabSettings = exports.getOperationJobsLoadingStatus = exports.getOperationId = exports.getOperationExperimentAssignments = exports.getOperationErasedTrees = exports.getOperationDetailsLoadingStatus = exports.getOperationAlertEventsItems = exports.getOperation = void 0;
|
8
7
|
var _map2 = _interopRequireDefault(require("lodash/map"));
|
9
8
|
var _reduce2 = _interopRequireDefault(require("lodash/reduce"));
|
10
9
|
var _reselect = require("reselect");
|
@@ -74,18 +73,16 @@ var getOperationJobsLoadingStatus = exports.getOperationJobsLoadingStatus = (0,
|
|
74
73
|
var getOperationExperimentAssignments = exports.getOperationExperimentAssignments = (0, _reselect.createSelector)([getOperation], function (operation) {
|
75
74
|
return _ypath.default.getValue(operation, '/@experiment_assignments');
|
76
75
|
});
|
77
|
-
var
|
78
|
-
var res = _ypath.default.getNumberDeprecated(operation, '/@brief_progress/
|
76
|
+
var getOperationMonitoredJobCount = (0, _reselect.createSelector)([getOperation], function (operation) {
|
77
|
+
var res = _ypath.default.getNumberDeprecated(operation, '/@brief_progress/registered_monitoring_descriptor_count');
|
79
78
|
return res;
|
80
79
|
});
|
81
|
-
var
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
}
|
87
|
-
var isOperationWithJobsMonitorTab = exports.isOperationWithJobsMonitorTab = (0, _reselect.createSelector)([getOperationJobsCount, isOperationWithExperiment_ytadmin_11194], function (jobsCount, hasRequiredExperiment) {
|
88
|
-
return hasRequiredExperiment && jobsCount > 0 && jobsCount <= 200;
|
80
|
+
var getOperationJobsMonitorTabSettings = exports.getOperationJobsMonitorTabSettings = (0, _reselect.createSelector)([getOperationMonitoredJobCount], function (jobsCount) {
|
81
|
+
var maxJobCount = 200;
|
82
|
+
return {
|
83
|
+
visible: jobsCount > 0 && jobsCount <= maxJobCount,
|
84
|
+
maxJobCount: maxJobCount
|
85
|
+
};
|
89
86
|
});
|
90
87
|
var getOperationAlertEventsItems = exports.getOperationAlertEventsItems = (0, _reselect.createSelector)([getOperationAlertEvents], function (alertEvents) {
|
91
88
|
return alertEvents;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_reselect","require","_ypath","_interopRequireDefault","_utils","obj","__esModule","default","getOperationErasedTreesRaw","state","ypath","getValue","operations","detail","getOperationErasedTrees","exports","createSelector","rawTrees","_reduce","acc","item","poolTree","getOperationAlertEvents","details","alert_events","getOperation","operation","getOperationId","getOperationTasks","getOperationTasksNames","tasks","_map","sort","getOperationDetailsLoadingStatus","loading","loaded","error","calculateLoadingStatus","getOperationTypedAttributes","$typedAttributes","getOperationMonitorChartStates","monitorChartStates","getOperationPools","pools","getOperationPoolNames","getOperationsMonitorChartStatesFinishedCount","states","value","getOperationJobsLoadingStatus","jobs","getOperationExperimentAssignments","
|
1
|
+
{"version":3,"names":["_reselect","require","_ypath","_interopRequireDefault","_utils","obj","__esModule","default","getOperationErasedTreesRaw","state","ypath","getValue","operations","detail","getOperationErasedTrees","exports","createSelector","rawTrees","_reduce","acc","item","poolTree","getOperationAlertEvents","details","alert_events","getOperation","operation","getOperationId","getOperationTasks","getOperationTasksNames","tasks","_map","sort","getOperationDetailsLoadingStatus","loading","loaded","error","calculateLoadingStatus","getOperationTypedAttributes","$typedAttributes","getOperationMonitorChartStates","monitorChartStates","getOperationPools","pools","getOperationPoolNames","getOperationsMonitorChartStatesFinishedCount","states","value","getOperationJobsLoadingStatus","jobs","getOperationExperimentAssignments","getOperationMonitoredJobCount","res","getNumberDeprecated","getOperationJobsMonitorTabSettings","jobsCount","maxJobCount","visible","getOperationAlertEventsItems","alertEvents"],"sources":["operation.ts"],"sourcesContent":["import _ from 'lodash';\nimport {createSelector} from 'reselect';\n\nimport {RootState} from '../../../store/reducers';\nimport ypath from '../../../common/thor/ypath';\nimport {calculateLoadingStatus} from '../../../utils/utils';\nimport {FIX_MY_TYPE} from '../../../types';\n\nconst getOperationErasedTreesRaw = (state: RootState) => {\n return ypath.getValue(state.operations.detail, '/operation/@runtime_parameters/erased_trees');\n};\n\nexport const getOperationErasedTrees = createSelector(\n [getOperationErasedTreesRaw],\n (rawTrees: Array<unknown>) => {\n return _.reduce(\n rawTrees,\n (acc, item) => {\n const poolTree = ypath.getValue(item);\n acc[poolTree] = true;\n return acc;\n },\n {} as {[poolTree: string]: boolean},\n );\n },\n);\n\ninterface OperationTask {\n task_name: string;\n}\n\nconst getOperationAlertEvents = (state: RootState) => state.operations.detail.details.alert_events;\n\nexport const getOperation = (state: RootState) => state.operations.detail.operation;\nexport const getOperationId = (state: RootState) =>\n ypath.getValue(state.operations.detail.operation);\nexport const getOperationTasks = createSelector(\n [getOperation],\n (operation): Array<OperationTask> | undefined => {\n return ypath.getValue(operation, '/@progress/tasks');\n },\n);\nexport const getOperationTasksNames = createSelector(\n [getOperationTasks],\n (tasks?: Array<{task_name: string}>) => {\n return _.map(tasks, 'task_name').sort();\n },\n);\n\nexport const getOperationDetailsLoadingStatus = createSelector(\n [\n (state: RootState) => (state.operations.detail as FIX_MY_TYPE).loading,\n (state: RootState) => (state.operations.detail as FIX_MY_TYPE).loaded,\n (state: RootState) => (state.operations.detail as FIX_MY_TYPE).error,\n ],\n (loading, loaded, error) => {\n return calculateLoadingStatus(loading, loaded, error);\n },\n);\n\nexport const getOperationTypedAttributes = (state: RootState) =>\n (state.operations.detail.operation as FIX_MY_TYPE).$typedAttributes;\n\nexport const getOperationMonitorChartStates = (state: RootState) =>\n state.operations.detail.monitorChartStates;\n\nexport const getOperationPools = (state: RootState) =>\n (state.operations.detail.operation as FIX_MY_TYPE).pools;\n\nexport const getOperationPoolNames = createSelector([getOperationPools], (pools): Array<string> => {\n return _.map(pools, 'pool');\n});\n\nexport const getOperationsMonitorChartStatesFinishedCount = createSelector(\n [getOperationMonitorChartStates],\n (states) => {\n return _.reduce(\n states,\n (acc, value) => {\n return value ? acc + 1 : acc;\n },\n 0,\n );\n },\n);\n\nexport const getOperationJobsLoadingStatus = createSelector(\n [\n (state: RootState) => (state.operations.jobs as FIX_MY_TYPE).loading,\n (state: RootState) => (state.operations.jobs as FIX_MY_TYPE).loaded,\n (state: RootState) => (state.operations.jobs as FIX_MY_TYPE).error,\n ],\n (loading, loaded, error) => {\n return calculateLoadingStatus(loading, loaded, error);\n },\n);\n\nexport interface OperationExperimentItem {\n experiment: string;\n group: string;\n ticket: string;\n dimension: string;\n effect: unknown;\n}\n\nexport const getOperationExperimentAssignments = createSelector(\n [getOperation],\n (operation): Array<OperationExperimentItem> => {\n return ypath.getValue(operation, '/@experiment_assignments');\n },\n);\n\nconst getOperationMonitoredJobCount = createSelector([getOperation], (operation) => {\n const res = ypath.getNumberDeprecated(\n operation,\n '/@brief_progress/registered_monitoring_descriptor_count',\n );\n return res;\n});\n\nexport const getOperationJobsMonitorTabSettings = createSelector(\n [getOperationMonitoredJobCount],\n (jobsCount) => {\n const maxJobCount = 200;\n return {visible: jobsCount > 0 && jobsCount <= maxJobCount, maxJobCount};\n },\n);\n\nexport const getOperationAlertEventsItems = createSelector(\n [getOperationAlertEvents],\n (alertEvents) => {\n return alertEvents;\n },\n);\n"],"mappings":";;;;;;;;AACA,IAAAA,SAAA,GAAAC,OAAA;AAGA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAA2D,SAAAE,uBAAAE,GAAA,WAA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yB,6BAA6B,GAAG,IAAAnC,wBAAc,EAAC,CAACS,YAAY,CAAC,EAAE,UAACC,SAAS,EAAK;EAChF,IAAM0B,GAAG,GAAG1C,cAAK,CAAC2C,mBAAmB,CACjC3B,SAAS,EACT,yDACJ,CAAC;EACD,OAAO0B,GAAG;AACd,CAAC,CAAC;AAEK,IAAME,kCAAkC,GAAAvC,OAAA,CAAAuC,kCAAA,GAAG,IAAAtC,wBAAc,EAC5D,CAACmC,6BAA6B,CAAC,EAC/B,UAACI,SAAS,EAAK;EACX,IAAMC,WAAW,GAAG,GAAG;EACvB,OAAO;IAACC,OAAO,EAAEF,SAAS,GAAG,CAAC,IAAIA,SAAS,IAAIC,WAAW;IAAEA,WAAW,EAAXA;EAAW,CAAC;AAC5E,CACJ,CAAC;AAEM,IAAME,4BAA4B,GAAA3C,OAAA,CAAA2C,4BAAA,GAAG,IAAA1C,wBAAc,EACtD,CAACM,uBAAuB,CAAC,EACzB,UAACqC,WAAW,EAAK;EACb,OAAOA,WAAW;AACtB,CACJ,CAAC"}
|
@@ -98,6 +98,7 @@ function getIconNameForType(type, targetPathBroken) {
|
|
98
98
|
transaction: 'code-branch',
|
99
99
|
nested_transaction: 'code-branch',
|
100
100
|
link: _ypath.default.getBoolean(targetPathBroken) ? 'unlink' : 'link',
|
101
|
+
rootstock: 'link',
|
101
102
|
portal_entrance: 'link',
|
102
103
|
cell_node: 'circle',
|
103
104
|
cell_node_map: 'far circle',
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_unipika","_interopRequireDefault","require","_ypath","_cancelHelper","_rumWrapApi","obj","__esModule","default","pathEditorRequests","exports","CancelHelper","prepareSuggestions","initialPath","parentPath","children","suggestions","_map","child","prepared","childPath","unipika","decode","ypath","getValue","path","type","dynamic","targetPathBroken","_sortBy","preparePath","currentPath","YPath","create","toSubpath","stringify","loadSuggestions","customFilter","ytApiV3Id","list","YTApiId","pathEditorLoadSuggestions","parameters","attributes","cancellation","saveCancelToken","then","nodes","filterByCurrentPath","toLowerCase","_filter","hasPartOfPath","startsWith","isShowCurrentChild","getNextSelectedIndex","suggestion","selectedIndex","length","getPrevSelectedIndex","getCompletedPath","getIconNameForType","icons","document","string_node","int64_node","uint64_node","double_node","boolean_node","map_node","scheduler_pool_tree_map","scheduler_pool","tablet_cell","journal","table","table_dynamic","replicated_table","chaos_replicated_table","replication_log_table","file","topmost_transaction_map","transaction_map","transaction","nested_transaction","link","getBoolean","portal_entrance","cell_node","cell_node_map","sys_node","access_control_object_namespace_map","access_control_object_namespace","access_control_object","icon"],"sources":["path-editor.js"],"sourcesContent":["import _ from 'lodash';\nimport unipika from '../../common/thor/unipika';\nimport ypath from '../../common/thor/ypath';\n\nimport CancelHelper from '../cancel-helper';\nimport {YTApiId, ytApiV3Id} from '../../rum/rum-wrap-api';\n\nexport const pathEditorRequests = new CancelHelper();\n\nfunction prepareSuggestions(initialPath, parentPath, children) {\n let suggestions = _.map(children, (child) => {\n const prepared = {};\n\n prepared.parentPath = parentPath;\n prepared.childPath = '/' + unipika.decode(ypath.getValue(child));\n prepared.path = prepared.parentPath + prepared.childPath;\n prepared.type = ypath.getValue(child, '/@type');\n prepared.dynamic = ypath.getValue(child, '/@dynamic');\n prepared.targetPathBroken = ypath.getValue(child, '/@broken');\n\n return prepared;\n });\n\n suggestions = _.sortBy(suggestions, 'childPath');\n\n return suggestions;\n}\n\nexport function preparePath(currentPath) {\n return ypath.YPath.create(currentPath, 'absolute').toSubpath(-2).stringify();\n}\n\nexport function loadSuggestions(path, customFilter) {\n const parentPath = preparePath(path);\n\n return ytApiV3Id\n .list(YTApiId.pathEditorLoadSuggestions, {\n parameters: {path: parentPath, attributes: ['type', 'dynamic']},\n cancellation: pathEditorRequests.saveCancelToken,\n })\n .then(ypath.getValue)\n .then((nodes) => prepareSuggestions(path, parentPath, nodes))\n .then((suggestions) => (customFilter ? customFilter(suggestions) : suggestions));\n}\n\nexport function filterByCurrentPath(currentPath, suggestions) {\n const path = currentPath.toLowerCase();\n\n return _.filter(suggestions, (child) => {\n const hasPartOfPath = child.path.startsWith(path);\n const isShowCurrentChild = child.path !== path || child.type === 'map_node';\n\n return hasPartOfPath && isShowCurrentChild;\n });\n}\n\nexport function getNextSelectedIndex(suggestion, selectedIndex) {\n if (selectedIndex === -1 || selectedIndex === suggestion.length - 1) {\n return 0;\n }\n\n return selectedIndex + 1;\n}\n\nexport function getPrevSelectedIndex(suggestions, selectedIndex) {\n if (selectedIndex === -1 || selectedIndex === 0) {\n return suggestions.length - 1;\n }\n\n return selectedIndex - 1;\n}\n\nexport function getCompletedPath(suggestion) {\n return suggestion.type === 'map_node' ? suggestion.path + '/' : suggestion.path;\n}\n\nexport function getIconNameForType(type, targetPathBroken) {\n const icons = {\n document: 'file-alt',\n string_node: 'file-alt',\n int64_node: 'file-alt',\n uint64_node: 'file-alt',\n double_node: 'file-alt',\n boolean_node: 'file-alt',\n map_node: 'folder',\n scheduler_pool_tree_map: 'folder-tree',\n scheduler_pool: 'tasks',\n tablet_cell: 'th',\n journal: 'book',\n table: 'th',\n table_dynamic: 'dyn-th',\n replicated_table: 'th',\n chaos_replicated_table: 'chaos-replicated-table',\n replication_log_table: 'replication-log-table',\n file: 'file',\n topmost_transaction_map: 'folder',\n transaction_map: 'folder',\n transaction: 'code-branch',\n nested_transaction: 'code-branch',\n link: ypath.getBoolean(targetPathBroken) ? 'unlink' : 'link',\n portal_entrance: 'link',\n cell_node: 'circle',\n cell_node_map: 'far circle',\n sys_node: 'cog',\n access_control_object_namespace_map: 'acl-namespace-map',\n access_control_object_namespace: 'acl-namespace',\n access_control_object: 'acl-object',\n };\n\n const icon = type ? icons[type] || 'not-suported' : 'eye-slash';\n\n return icon;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AACA,IAAAA,QAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAAE,aAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,WA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EAAE,eAAe;IAChDC,qBAAqB,EAAE;EAC3B,CAAC;EAED,IAAMC,IAAI,
|
1
|
+
{"version":3,"names":["_unipika","_interopRequireDefault","require","_ypath","_cancelHelper","_rumWrapApi","obj","__esModule","default","pathEditorRequests","exports","CancelHelper","prepareSuggestions","initialPath","parentPath","children","suggestions","_map","child","prepared","childPath","unipika","decode","ypath","getValue","path","type","dynamic","targetPathBroken","_sortBy","preparePath","currentPath","YPath","create","toSubpath","stringify","loadSuggestions","customFilter","ytApiV3Id","list","YTApiId","pathEditorLoadSuggestions","parameters","attributes","cancellation","saveCancelToken","then","nodes","filterByCurrentPath","toLowerCase","_filter","hasPartOfPath","startsWith","isShowCurrentChild","getNextSelectedIndex","suggestion","selectedIndex","length","getPrevSelectedIndex","getCompletedPath","getIconNameForType","icons","document","string_node","int64_node","uint64_node","double_node","boolean_node","map_node","scheduler_pool_tree_map","scheduler_pool","tablet_cell","journal","table","table_dynamic","replicated_table","chaos_replicated_table","replication_log_table","file","topmost_transaction_map","transaction_map","transaction","nested_transaction","link","getBoolean","rootstock","portal_entrance","cell_node","cell_node_map","sys_node","access_control_object_namespace_map","access_control_object_namespace","access_control_object","icon"],"sources":["path-editor.js"],"sourcesContent":["import _ from 'lodash';\nimport unipika from '../../common/thor/unipika';\nimport ypath from '../../common/thor/ypath';\n\nimport CancelHelper from '../cancel-helper';\nimport {YTApiId, ytApiV3Id} from '../../rum/rum-wrap-api';\n\nexport const pathEditorRequests = new CancelHelper();\n\nfunction prepareSuggestions(initialPath, parentPath, children) {\n let suggestions = _.map(children, (child) => {\n const prepared = {};\n\n prepared.parentPath = parentPath;\n prepared.childPath = '/' + unipika.decode(ypath.getValue(child));\n prepared.path = prepared.parentPath + prepared.childPath;\n prepared.type = ypath.getValue(child, '/@type');\n prepared.dynamic = ypath.getValue(child, '/@dynamic');\n prepared.targetPathBroken = ypath.getValue(child, '/@broken');\n\n return prepared;\n });\n\n suggestions = _.sortBy(suggestions, 'childPath');\n\n return suggestions;\n}\n\nexport function preparePath(currentPath) {\n return ypath.YPath.create(currentPath, 'absolute').toSubpath(-2).stringify();\n}\n\nexport function loadSuggestions(path, customFilter) {\n const parentPath = preparePath(path);\n\n return ytApiV3Id\n .list(YTApiId.pathEditorLoadSuggestions, {\n parameters: {path: parentPath, attributes: ['type', 'dynamic']},\n cancellation: pathEditorRequests.saveCancelToken,\n })\n .then(ypath.getValue)\n .then((nodes) => prepareSuggestions(path, parentPath, nodes))\n .then((suggestions) => (customFilter ? customFilter(suggestions) : suggestions));\n}\n\nexport function filterByCurrentPath(currentPath, suggestions) {\n const path = currentPath.toLowerCase();\n\n return _.filter(suggestions, (child) => {\n const hasPartOfPath = child.path.startsWith(path);\n const isShowCurrentChild = child.path !== path || child.type === 'map_node';\n\n return hasPartOfPath && isShowCurrentChild;\n });\n}\n\nexport function getNextSelectedIndex(suggestion, selectedIndex) {\n if (selectedIndex === -1 || selectedIndex === suggestion.length - 1) {\n return 0;\n }\n\n return selectedIndex + 1;\n}\n\nexport function getPrevSelectedIndex(suggestions, selectedIndex) {\n if (selectedIndex === -1 || selectedIndex === 0) {\n return suggestions.length - 1;\n }\n\n return selectedIndex - 1;\n}\n\nexport function getCompletedPath(suggestion) {\n return suggestion.type === 'map_node' ? suggestion.path + '/' : suggestion.path;\n}\n\nexport function getIconNameForType(type, targetPathBroken) {\n const icons = {\n document: 'file-alt',\n string_node: 'file-alt',\n int64_node: 'file-alt',\n uint64_node: 'file-alt',\n double_node: 'file-alt',\n boolean_node: 'file-alt',\n map_node: 'folder',\n scheduler_pool_tree_map: 'folder-tree',\n scheduler_pool: 'tasks',\n tablet_cell: 'th',\n journal: 'book',\n table: 'th',\n table_dynamic: 'dyn-th',\n replicated_table: 'th',\n chaos_replicated_table: 'chaos-replicated-table',\n replication_log_table: 'replication-log-table',\n file: 'file',\n topmost_transaction_map: 'folder',\n transaction_map: 'folder',\n transaction: 'code-branch',\n nested_transaction: 'code-branch',\n link: ypath.getBoolean(targetPathBroken) ? 'unlink' : 'link',\n rootstock: 'link',\n portal_entrance: 'link',\n cell_node: 'circle',\n cell_node_map: 'far circle',\n sys_node: 'cog',\n access_control_object_namespace_map: 'acl-namespace-map',\n access_control_object_namespace: 'acl-namespace',\n access_control_object: 'acl-object',\n };\n\n const icon = type ? icons[type] || 'not-suported' : 'eye-slash';\n\n return icon;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AACA,IAAAA,QAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAAE,aAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AAAyD,SAAAD,uBAAAK,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAElD,IAAMG,kBAAkB,GAAAC,OAAA,CAAAD,kBAAA,GAAG,IAAIE,qBAAY,CAAC,CAAC;AAEpD,SAASC,kBAAkBA,CAACC,WAAW,EAAEC,UAAU,EAAEC,QAAQ,EAAE;EAC3D,IAAIC,WAAW,GAAG,IAAAC,aAAA,EAAMF,QAAQ,EAAE,UAACG,KAAK,EAAK;IACzC,IAAMC,QAAQ,GAAG,CAAC,CAAC;IAEnBA,QAAQ,CAACL,UAAU,GAAGA,UAAU;IAChCK,QAAQ,CAACC,SAAS,GAAG,GAAG,GAAGC,gBAAO,CAACC,MAAM,CAACC,cAAK,CAACC,QAAQ,CAACN,KAAK,CAAC,CAAC;IAChEC,QAAQ,CAACM,IAAI,GAAGN,QAAQ,CAACL,UAAU,GAAGK,QAAQ,CAACC,SAAS;IACxDD,QAAQ,CAACO,IAAI,GAAGH,cAAK,CAACC,QAAQ,CAACN,KAAK,EAAE,QAAQ,CAAC;IAC/CC,QAAQ,CAACQ,OAAO,GAAGJ,cAAK,CAACC,QAAQ,CAACN,KAAK,EAAE,WAAW,CAAC;IACrDC,QAAQ,CAACS,gBAAgB,GAAGL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,qBAAqB,EAAE,uBAAuB;IAC9CC,IAAI,EAAE,MAAM;IACZC,uBAAuB,EAAE,QAAQ;IACjCC,eAAe,EAAE,QAAQ;IACzBC,WAAW,EAAE,aAAa;IAC1BC,kBAAkB,EAAE,aAAa;IACjCC,IAAI,EAAE5D,cAAK,CAAC6D,UAAU,CAACxD,gBAAgB,CAAC,GAAG,QAAQ,GAAG,MAAM;IAC5DyD,SAAS,EAAE,MAAM;IACjBC,eAAe,EAAE,MAAM;IACvBC,SAAS,EAAE,QAAQ;IACnBC,aAAa,EAAE,YAAY;IAC3BC,QAAQ,EAAE,KAAK;IACfC,mCAAmC,EAAE,mBAAmB;IACxDC,+BAA+B,EAAE,eAAe;IAChDC,qBAAqB,EAAE;EAC3B,CAAC;EAED,IAAMC,IAAI,GAAGnE,IAAI,GAAGmC,KAAK,CAACnC,IAAI,CAAC,IAAI,cAAc,GAAG,WAAW;EAE/D,OAAOmE,IAAI;AACf"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["AccessAclTab","ReplicatedTable","ReplicatedTableMeta","Link","File","Table","MapNode","Document","Transaction","TransactionMap","supportedContentTypes","map_node","portal_entrance","portal_exit","cell_node_map","sys_node","access_control_object_namespace_map","access_control_object_namespace","access_control_object","tablet_cell","scheduler_pool_tree_map","scheduler_pool","document","string_node","int64_node","uint64_node","double_node","boolean_node","link","file","table","replicated_table","chaos_replicated_table","replication_log_table","transaction","nested_transaction","topmost_transaction_map","transaction_map","type"],"sources":["getComponentByContentType.ts"],"sourcesContent":["import {AccessAclTab} from '../../../tabs/ACL/ACL';\nimport ReplicatedTable from '../../../../../pages/navigation/content/ReplicatedTable/ReplicatedTable';\nimport ReplicatedTableMeta from '../../../content/ReplicatedTable/ReplicatedTableMeta';\n\nimport Link from '../../../../../pages/navigation/content/Link/Link';\nimport File from '../../../../../pages/navigation/content/File/File';\nimport Table from '../../../../../pages/navigation/content/Table/Table';\nimport MapNode from '../../../../../pages/navigation/content/MapNode/MapNode';\nimport Document from '../../../content/Document/DocumentWithRum';\nimport Transaction from '../../../../../pages/navigation/content/Transaction/Transaction';\nimport TransactionMap from '../../../../../pages/navigation/content/TransactionMap/TransactionMap';\n\nconst supportedContentTypes = {\n map_node: MapNode,\n portal_entrance: MapNode,\n portal_exit: MapNode,\n cell_node_map: MapNode,\n sys_node: MapNode,\n access_control_object_namespace_map: MapNode,\n access_control_object_namespace: MapNode,\n access_control_object: AccessAclTab,\n tablet_cell: MapNode,\n scheduler_pool_tree_map: MapNode,\n scheduler_pool: MapNode,\n document: Document,\n string_node: Document,\n int64_node: Document,\n uint64_node: Document,\n double_node: Document,\n boolean_node: Document,\n link: Link,\n file: File,\n table: Table,\n replicated_table: ReplicatedTable,\n chaos_replicated_table: ReplicatedTable,\n replication_log_table: ReplicatedTableMeta,\n transaction: Transaction,\n nested_transaction: Transaction,\n topmost_transaction_map: TransactionMap,\n transaction_map: TransactionMap,\n};\n\nexport default (type: string) => supportedContentTypes[type as keyof typeof supportedContentTypes];\n"],"mappings":"AAAA,SAAQA,YAAY,QAAO,uBAAuB;AAClD,OAAOC,eAAe,MAAM,yEAAyE;AACrG,OAAOC,mBAAmB,MAAM,sDAAsD;AAEtF,OAAOC,IAAI,MAAM,mDAAmD;AACpE,OAAOC,IAAI,MAAM,mDAAmD;AACpE,OAAOC,KAAK,MAAM,qDAAqD;AACvE,OAAOC,OAAO,MAAM,yDAAyD;AAC7E,OAAOC,QAAQ,MAAM,2CAA2C;AAChE,OAAOC,WAAW,MAAM,iEAAiE;AACzF,OAAOC,cAAc,MAAM,uEAAuE;AAElG,IAAMC,qBAAqB,GAAG;EAC1BC,QAAQ,EAAEL,OAAO;EACjBM,eAAe,EAAEN,OAAO;EACxBO,WAAW,EAAEP,OAAO;EACpBQ,
|
1
|
+
{"version":3,"names":["AccessAclTab","ReplicatedTable","ReplicatedTableMeta","Link","File","Table","MapNode","Document","Transaction","TransactionMap","supportedContentTypes","map_node","portal_entrance","portal_exit","rootstock","scion","cell_node_map","sys_node","access_control_object_namespace_map","access_control_object_namespace","access_control_object","tablet_cell","scheduler_pool_tree_map","scheduler_pool","document","string_node","int64_node","uint64_node","double_node","boolean_node","link","file","table","replicated_table","chaos_replicated_table","replication_log_table","transaction","nested_transaction","topmost_transaction_map","transaction_map","type"],"sources":["getComponentByContentType.ts"],"sourcesContent":["import {AccessAclTab} from '../../../tabs/ACL/ACL';\nimport ReplicatedTable from '../../../../../pages/navigation/content/ReplicatedTable/ReplicatedTable';\nimport ReplicatedTableMeta from '../../../content/ReplicatedTable/ReplicatedTableMeta';\n\nimport Link from '../../../../../pages/navigation/content/Link/Link';\nimport File from '../../../../../pages/navigation/content/File/File';\nimport Table from '../../../../../pages/navigation/content/Table/Table';\nimport MapNode from '../../../../../pages/navigation/content/MapNode/MapNode';\nimport Document from '../../../content/Document/DocumentWithRum';\nimport Transaction from '../../../../../pages/navigation/content/Transaction/Transaction';\nimport TransactionMap from '../../../../../pages/navigation/content/TransactionMap/TransactionMap';\n\nconst supportedContentTypes = {\n map_node: MapNode,\n portal_entrance: MapNode,\n portal_exit: MapNode,\n rootstock: MapNode,\n scion: MapNode,\n cell_node_map: MapNode,\n sys_node: MapNode,\n access_control_object_namespace_map: MapNode,\n access_control_object_namespace: MapNode,\n access_control_object: AccessAclTab,\n tablet_cell: MapNode,\n scheduler_pool_tree_map: MapNode,\n scheduler_pool: MapNode,\n document: Document,\n string_node: Document,\n int64_node: Document,\n uint64_node: Document,\n double_node: Document,\n boolean_node: Document,\n link: Link,\n file: File,\n table: Table,\n replicated_table: ReplicatedTable,\n chaos_replicated_table: ReplicatedTable,\n replication_log_table: ReplicatedTableMeta,\n transaction: Transaction,\n nested_transaction: Transaction,\n topmost_transaction_map: TransactionMap,\n transaction_map: TransactionMap,\n};\n\nexport default (type: string) => supportedContentTypes[type as keyof typeof supportedContentTypes];\n"],"mappings":"AAAA,SAAQA,YAAY,QAAO,uBAAuB;AAClD,OAAOC,eAAe,MAAM,yEAAyE;AACrG,OAAOC,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,12 +1,14 @@
|
|
1
1
|
import { JOBS_MONITOR } from '../../../constants/operations/detail';
|
2
2
|
import { YTApiId, ytApiV3Id } from '../../../rum/rum-wrap-api';
|
3
|
-
import {
|
3
|
+
import { getOperationJobsMonitorTabSettings } from '../../../store/selectors/operations/operation';
|
4
4
|
import CancelHelper, { isCancelled } from '../../../utils/cancel-helper';
|
5
5
|
var cancelHerlper = new CancelHelper();
|
6
6
|
export function getJobsMonitoringDescriptors(operation_id) {
|
7
7
|
return function (dispatch, getState) {
|
8
|
-
var
|
9
|
-
|
8
|
+
var _getOperationJobsMoni = getOperationJobsMonitorTabSettings(getState()),
|
9
|
+
visible = _getOperationJobsMoni.visible,
|
10
|
+
maxJobCount = _getOperationJobsMoni.maxJobCount;
|
11
|
+
if (!visible) {
|
10
12
|
return undefined;
|
11
13
|
}
|
12
14
|
dispatch({
|
@@ -15,7 +17,7 @@ export function getJobsMonitoringDescriptors(operation_id) {
|
|
15
17
|
return ytApiV3Id.listJobs(YTApiId.listJobs100, {
|
16
18
|
parameters: {
|
17
19
|
operation_id: operation_id,
|
18
|
-
limit:
|
20
|
+
limit: maxJobCount
|
19
21
|
},
|
20
22
|
cancellation: cancelHerlper.removeAllAndSave
|
21
23
|
}).then(function (_ref) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["JOBS_MONITOR","YTApiId","ytApiV3Id","
|
1
|
+
{"version":3,"names":["JOBS_MONITOR","YTApiId","ytApiV3Id","getOperationJobsMonitorTabSettings","CancelHelper","isCancelled","cancelHerlper","getJobsMonitoringDescriptors","operation_id","dispatch","getState","_getOperationJobsMoni","visible","maxJobCount","undefined","type","REQUEST","listJobs","listJobs100","parameters","limit","cancellation","removeAllAndSave","then","_ref","jobs","SUCCESS","data","error","CANCELLED","FAILURE"],"sources":["jobs-monitor.ts"],"sourcesContent":["import {JOBS_MONITOR} from '../../../constants/operations/detail';\nimport {ThunkAction} from 'redux-thunk';\nimport {YTApiId, ytApiV3Id} from '../../../rum/rum-wrap-api';\nimport {RootState} from '../../../store/reducers';\nimport {JobsMonitorAction} from '../../../store/reducers/operations/jobs/jobs-monitor';\nimport {getOperationJobsMonitorTabSettings} from '../../../store/selectors/operations/operation';\nimport CancelHelper, {isCancelled} from '../../../utils/cancel-helper';\n\ntype JobsMonitorThunkAction = ThunkAction<unknown, RootState, unknown, JobsMonitorAction>;\n\nconst cancelHerlper = new CancelHelper();\n\nexport function getJobsMonitoringDescriptors(operation_id: string): JobsMonitorThunkAction {\n return (dispatch, getState) => {\n const {visible, maxJobCount} = getOperationJobsMonitorTabSettings(getState());\n if (!visible) {\n return undefined;\n }\n\n dispatch({type: JOBS_MONITOR.REQUEST});\n\n return ytApiV3Id\n .listJobs(YTApiId.listJobs100, {\n parameters: {operation_id, limit: maxJobCount},\n cancellation: cancelHerlper.removeAllAndSave,\n })\n .then(({jobs}) => {\n dispatch({type: JOBS_MONITOR.SUCCESS, data: {jobs, operation_id}});\n })\n .catch((error) => {\n if (isCancelled(error)) {\n dispatch({type: JOBS_MONITOR.CANCELLED});\n return;\n }\n\n dispatch({type: JOBS_MONITOR.FAILURE, data: {error}});\n });\n };\n}\n"],"mappings":"AAAA,SAAQA,YAAY,QAAO,sCAAsC;AAEjE,SAAQC,OAAO,EAAEC,SAAS,QAAO,2BAA2B;AAG5D,SAAQC,kCAAkC,QAAO,+CAA+C;AAChG,OAAOC,YAAY,IAAGC,WAAW,QAAO,8BAA8B;AAItE,IAAMC,aAAa,GAAG,IAAIF,YAAY,CAAC,CAAC;AAExC,OAAO,SAASG,4BAA4BA,CAACC,YAAoB,EAA0B;EACvF,OAAO,UAACC,QAAQ,EAAEC,QAAQ,EAAK;IAC3B,IAAAC,qBAAA,GAA+BR,kCAAkC,CAACO,QAAQ,CAAC,CAAC,CAAC;MAAtEE,OAAO,GAAAD,qBAAA,CAAPC,OAAO;MAAEC,WAAW,GAAAF,qBAAA,CAAXE,WAAW;IAC3B,IAAI,CAACD,OAAO,EAAE;MACV,OAAOE,SAAS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