@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
@@ -1,4 +1,3 @@
|
|
1
|
-
import _some from "lodash/some";
|
2
1
|
import _map from "lodash/map";
|
3
2
|
import _reduce from "lodash/reduce";
|
4
3
|
import { createSelector } from 'reselect';
|
@@ -67,18 +66,16 @@ export var getOperationJobsLoadingStatus = createSelector([function (state) {
|
|
67
66
|
export var getOperationExperimentAssignments = createSelector([getOperation], function (operation) {
|
68
67
|
return ypath.getValue(operation, '/@experiment_assignments');
|
69
68
|
});
|
70
|
-
|
71
|
-
var res = ypath.getNumberDeprecated(operation, '/@brief_progress/
|
69
|
+
var getOperationMonitoredJobCount = createSelector([getOperation], function (operation) {
|
70
|
+
var res = ypath.getNumberDeprecated(operation, '/@brief_progress/registered_monitoring_descriptor_count');
|
72
71
|
return res;
|
73
72
|
});
|
74
|
-
export var
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
}
|
80
|
-
export var isOperationWithJobsMonitorTab = createSelector([getOperationJobsCount, isOperationWithExperiment_ytadmin_11194], function (jobsCount, hasRequiredExperiment) {
|
81
|
-
return hasRequiredExperiment && jobsCount > 0 && jobsCount <= 200;
|
73
|
+
export var getOperationJobsMonitorTabSettings = createSelector([getOperationMonitoredJobCount], function (jobsCount) {
|
74
|
+
var maxJobCount = 200;
|
75
|
+
return {
|
76
|
+
visible: jobsCount > 0 && jobsCount <= maxJobCount,
|
77
|
+
maxJobCount: maxJobCount
|
78
|
+
};
|
82
79
|
});
|
83
80
|
export var getOperationAlertEventsItems = createSelector([getOperationAlertEvents], function (alertEvents) {
|
84
81
|
return alertEvents;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["createSelector","ypath","calculateLoadingStatus","getOperationErasedTreesRaw","state","getValue","operations","detail","getOperationErasedTrees","rawTrees","_reduce","acc","item","poolTree","getOperationAlertEvents","details","alert_events","getOperation","operation","getOperationId","getOperationTasks","getOperationTasksNames","tasks","_map","sort","getOperationDetailsLoadingStatus","loading","loaded","error","getOperationTypedAttributes","$typedAttributes","getOperationMonitorChartStates","monitorChartStates","getOperationPools","pools","getOperationPoolNames","getOperationsMonitorChartStatesFinishedCount","states","value","getOperationJobsLoadingStatus","jobs","getOperationExperimentAssignments","
|
1
|
+
{"version":3,"names":["createSelector","ypath","calculateLoadingStatus","getOperationErasedTreesRaw","state","getValue","operations","detail","getOperationErasedTrees","rawTrees","_reduce","acc","item","poolTree","getOperationAlertEvents","details","alert_events","getOperation","operation","getOperationId","getOperationTasks","getOperationTasksNames","tasks","_map","sort","getOperationDetailsLoadingStatus","loading","loaded","error","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,SAAQA,cAAc,QAAO,UAAU;AAGvC,OAAOC,KAAK,MAAM,4BAA4B;AAC9C,SAAQC,sBAAsB,QAAO,sBAAsB;AAG3D,IAAMC,0BAA0B,GAAG,SAA7BA,0BAA0BA,CAAIC,KAAgB,EAAK;EACrD,OAAOH,KAAK,CAACI,QAAQ,CAACD,KAAK,CAACE,UAAU,CAACC,MAAM,EAAE,6CAA6C,CAAC;AACjG,CAAC;AAED,OAAO,IAAMC,uBAAuB,GAAGR,cAAc,CACjD,CAACG,0BAA0B,CAAC,EAC5B,UAACM,QAAwB,EAAK;EAC1B,OAAOC,OAAA,CACHD,QAAQ,EACR,UAACE,GAAG,EAAEC,IAAI,EAAK;IACX,IAAMC,QAAQ,GAAGZ,KAAK,CAACI,QAAQ,CAACO,IAAI,CAAC;IACrCD,GAAG,CAACE,QAAQ,CAAC,GAAG,IAAI;IACpB,OAAOF,GAAG;EACd,CAAC,EACD,CAAC,CACL,CAAC;AACL,CACJ,CAAC;AAMD,IAAMG,uBAAuB,GAAG,SAA1BA,uBAAuBA,CAAIV,KAAgB;EAAA,OAAKA,KAAK,CAACE,UAAU,CAACC,MAAM,CAACQ,OAAO,CAACC,YAAY;AAAA;AAElG,OAAO,IAAMC,YAAY,GAAG,SAAfA,YAAYA,CAAIb,KAAgB;E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,SAAS,EAAE,0BAA0B,CAAC;AAChE,CACJ,CAAC;AAED,IAAMwB,6BAA6B,GAAG1C,cAAc,CAAC,CAACiB,YAAY,CAAC,EAAE,UAACC,SAAS,EAAK;EAChF,IAAMyB,GAAG,GAAG1C,KAAK,CAAC2C,mBAAmB,CACjC1B,SAAS,EACT,yDACJ,CAAC;EACD,OAAOyB,GAAG;AACd,CAAC,CAAC;AAEF,OAAO,IAAME,kCAAkC,GAAG7C,cAAc,CAC5D,CAAC0C,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;AAED,OAAO,IAAME,4BAA4B,GAAGjD,cAAc,CACtD,CAACc,uBAAuB,CAAC,EACzB,UAACoC,WAAW,EAAK;EACb,OAAOA,WAAW;AACtB,CACJ,CAAC"}
|
@@ -84,6 +84,7 @@ export function getIconNameForType(type, targetPathBroken) {
|
|
84
84
|
transaction: 'code-branch',
|
85
85
|
nested_transaction: 'code-branch',
|
86
86
|
link: ypath.getBoolean(targetPathBroken) ? 'unlink' : 'link',
|
87
|
+
rootstock: 'link',
|
87
88
|
portal_entrance: 'link',
|
88
89
|
cell_node: 'circle',
|
89
90
|
cell_node_map: 'far circle',
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["unipika","ypath","CancelHelper","YTApiId","ytApiV3Id","pathEditorRequests","prepareSuggestions","initialPath","parentPath","children","suggestions","_map","child","prepared","childPath","decode","getValue","path","type","dynamic","targetPathBroken","_sortBy","preparePath","currentPath","YPath","create","toSubpath","stringify","loadSuggestions","customFilter","list","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,OAAOA,OAAO,MAAM,2BAA2B;AAC/C,OAAOC,KAAK,MAAM,yBAAyB;AAE3C,OAAOC,YAAY,MAAM,kBAAkB;AAC3C,SAAQC,OAAO,EAAEC,SAAS,QAAO,wBAAwB;AAEzD,OAAO,IAAMC,kBAAkB,GAAG,IAAIH,YAAY,CAAC,CAAC;AAEpD,SAASI,kBAAkBA,CAACC,WAAW,E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U,EAAE;EACzC,OAAOA,UAAU,CAAC3B,IAAI,KAAK,UAAU,GAAG2B,UAAU,CAAC5B,IAAI,GAAG,GAAG,GAAG4B,UAAU,CAAC5B,IAAI;AACnF;AAEA,OAAO,SAASiC,kBAAkBA,CAAChC,IAAI,EAAEE,gBAAgB,EAAE;EACvD,IAAM+B,KAAK,GAAG;IACVC,QAAQ,EAAE,UAAU;IACpBC,WAAW,EAAE,UAAU;IACvBC,UAAU,EAAE,UAAU;IACtBC,WAAW,EAAE,UAAU;IACvBC,WAAW,EAAE,UAAU;IACvBC,YAAY,EAAE,UAAU;IACxBC,QAAQ,EAAE,QAAQ;IAClBC,uBAAuB,EAAE,aAAa;IACtCC,cAAc,EAAE,OAAO;IACvBC,WAAW,EAAE,IAAI;IACjBC,OAAO,EAAE,MAAM;IACfC,KAAK,EAAE,IAAI;IACXC,aAAa,EAAE,QAAQ;IACvBC,gBAAgB,EAAE,IAAI;IACtBC,sBAAsB,EAAE,wBAAwB;IAChDC,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,EAAExE,KAAK,CAACyE,UAAU,CAACtD,gBAAgB,CAAC,GAAG,QAAQ,GAAG,MAAM;IAC5DuD,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,
|
1
|
+
{"version":3,"names":["unipika","ypath","CancelHelper","YTApiId","ytApiV3Id","pathEditorRequests","prepareSuggestions","initialPath","parentPath","children","suggestions","_map","child","prepared","childPath","decode","getValue","path","type","dynamic","targetPathBroken","_sortBy","preparePath","currentPath","YPath","create","toSubpath","stringify","loadSuggestions","customFilter","list","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,OAAOA,OAAO,MAAM,2BAA2B;AAC/C,OAAOC,KAA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B,EAAE,eAAe;IAChDC,qBAAqB,EAAE;EAC3B,CAAC;EAED,IAAMC,IAAI,GAAGjE,IAAI,GAAGiC,KAAK,CAACjC,IAAI,CAAC,IAAI,cAAc,GAAG,WAAW;EAE/D,OAAOiE,IAAI;AACf"}
|
@@ -43,8 +43,8 @@
|
|
43
43
|
"assets": {
|
44
44
|
"js": [
|
45
45
|
"js/runtime.22e88c00.js",
|
46
|
-
"js/vendors.
|
47
|
-
"js/main.
|
46
|
+
"js/vendors.e6a251eb.js",
|
47
|
+
"js/main.53d3bdc5.js"
|
48
48
|
],
|
49
49
|
"css": [
|
50
50
|
"css/main.77009ada.css"
|
@@ -93,19 +93,19 @@
|
|
93
93
|
"js/955.e1c8cf19.chunk.js": "js/955.e1c8cf19.chunk.js",
|
94
94
|
"js/955.e1c8cf19.chunk.js.LICENSE.txt": "js/955.e1c8cf19.chunk.js.LICENSE.txt",
|
95
95
|
"js/955.e1c8cf19.chunk.js.map": "js/955.e1c8cf19.chunk.js.map",
|
96
|
-
"js/main.
|
97
|
-
"js/main.
|
96
|
+
"js/main.53d3bdc5.js.LICENSE.txt": "js/main.53d3bdc5.js.LICENSE.txt",
|
97
|
+
"js/main.53d3bdc5.js.map": "js/main.53d3bdc5.js.map",
|
98
98
|
"js/runtime.22e88c00.js.map": "js/runtime.22e88c00.js.map",
|
99
|
-
"js/vendors.
|
100
|
-
"js/vendors.
|
99
|
+
"js/vendors.e6a251eb.js.LICENSE.txt": "js/vendors.e6a251eb.js.LICENSE.txt",
|
100
|
+
"js/vendors.e6a251eb.js.map": "js/vendors.e6a251eb.js.map",
|
101
101
|
"js/vis-network.b367d390.chunk.js.LICENSE.txt": "js/vis-network.b367d390.chunk.js.LICENSE.txt",
|
102
102
|
"js/vis-network.b367d390.chunk.js.map": "js/vis-network.b367d390.chunk.js.map",
|
103
103
|
"json.5239aa2e.worker.js": "json.5239aa2e.worker.js",
|
104
104
|
"json.5239aa2e.worker.js.LICENSE.txt": "json.5239aa2e.worker.js.LICENSE.txt",
|
105
105
|
"json.5239aa2e.worker.js.map": "json.5239aa2e.worker.js.map",
|
106
106
|
"main.css": "css/main.77009ada.css",
|
107
|
-
"main.js": "js/main.
|
107
|
+
"main.js": "js/main.53d3bdc5.js",
|
108
108
|
"runtime.js": "js/runtime.22e88c00.js",
|
109
|
-
"vendors.js": "js/vendors.
|
109
|
+
"vendors.js": "js/vendors.e6a251eb.js",
|
110
110
|
"vis-network.js": "js/vis-network.b367d390.chunk.js"
|
111
111
|
}
|