@ytsaurus/ui 1.14.3 → 1.15.1
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/@types/core.d.ts +3 -2
- package/build/cjs/server/configs/local.js +1 -0
- package/build/cjs/server/configs/local.js.map +1 -1
- package/build/cjs/shared/ui-settings.d.ts +1 -0
- package/build/cjs/shared/ui-settings.js.map +1 -1
- package/build/cjs/ui/UIFactory.d.ts +4 -1
- package/build/cjs/ui/UIFactory.js +9 -2
- package/build/cjs/ui/UIFactory.js.map +1 -1
- package/build/cjs/ui/common/utils/settings-local-provider.js +1 -1
- package/build/cjs/ui/common/utils/settings-local-provider.js.map +1 -1
- package/build/cjs/ui/common/utils/settings-remote-provider.d.ts +2 -1
- package/build/cjs/ui/common/utils/settings-remote-provider.js.map +1 -1
- package/build/cjs/ui/components/Support/Support.js +6 -4
- package/build/cjs/ui/components/Support/Support.js.map +1 -1
- package/build/cjs/ui/containers/AppNavigation/AppNavigationComponent.js +50 -5
- package/build/cjs/ui/containers/AppNavigation/AppNavigationComponent.js.map +1 -1
- package/build/cjs/ui/containers/SupportComponent/SupportComponent.d.ts +5 -0
- package/build/cjs/ui/containers/SupportComponent/SupportComponent.js +24 -0
- package/build/cjs/ui/containers/SupportComponent/SupportComponent.js.map +1 -0
- package/build/cjs/ui/pages/operations/OperationDetail/tabs/details/Details/Details.css +6 -1
- package/build/cjs/ui/pages/operations/OperationDetail/tabs/details/Details/Details.css.map +1 -1
- package/build/cjs/ui/store/actions/scheduling/expanded-pools.js +1 -1
- package/build/cjs/ui/store/actions/scheduling/expanded-pools.js.map +1 -1
- package/build/cjs/ui/store/actions/settings/index.js +22 -11
- package/build/cjs/ui/store/actions/settings/index.js.map +1 -1
- package/build/cjs/ui/utils/scheduling/pool-child.js +1 -1
- package/build/cjs/ui/utils/scheduling/pool-child.js.map +1 -1
- package/build/esm/@types/core.d.ts +3 -2
- package/build/esm/server/configs/local.js +2 -1
- package/build/esm/server/configs/local.js.map +1 -1
- package/build/esm/shared/ui-settings.d.ts +1 -0
- package/build/esm/shared/ui-settings.js.map +1 -1
- package/build/esm/ui/UIFactory.d.ts +4 -1
- package/build/esm/ui/UIFactory.js +9 -2
- package/build/esm/ui/UIFactory.js.map +1 -1
- package/build/esm/ui/common/utils/settings-local-provider.js +1 -1
- package/build/esm/ui/common/utils/settings-local-provider.js.map +1 -1
- package/build/esm/ui/common/utils/settings-remote-provider.d.ts +2 -1
- package/build/esm/ui/common/utils/settings-remote-provider.js.map +1 -1
- package/build/esm/ui/components/Support/Support.js +6 -4
- package/build/esm/ui/components/Support/Support.js.map +1 -1
- package/build/esm/ui/containers/AppNavigation/AppNavigationComponent.js +50 -5
- package/build/esm/ui/containers/AppNavigation/AppNavigationComponent.js.map +1 -1
- package/build/esm/ui/containers/SupportComponent/SupportComponent.d.ts +5 -0
- package/build/esm/ui/containers/SupportComponent/SupportComponent.js +18 -0
- package/build/esm/ui/containers/SupportComponent/SupportComponent.js.map +1 -0
- package/build/esm/ui/pages/operations/OperationDetail/tabs/details/Details/Details.css +6 -1
- package/build/esm/ui/pages/operations/OperationDetail/tabs/details/Details/Details.css.map +1 -1
- package/build/esm/ui/pages/operations/OperationDetail/tabs/details/Details/Details.scss +6 -1
- package/build/esm/ui/store/actions/scheduling/expanded-pools.js +1 -1
- package/build/esm/ui/store/actions/scheduling/expanded-pools.js.map +1 -1
- package/build/esm/ui/store/actions/settings/index.js +22 -11
- package/build/esm/ui/store/actions/settings/index.js.map +1 -1
- package/build/esm/ui/utils/scheduling/pool-child.js +1 -1
- package/build/esm/ui/utils/scheduling/pool-child.js.map +1 -1
- package/dist/public/build/assets-manifest.json +16 -16
- package/dist/public/build/css/{89.3546950a.chunk.css → 861.c5a67589.chunk.css} +1 -1
- package/dist/public/build/css/861.c5a67589.chunk.css.map +1 -0
- package/dist/public/build/css/{main.e919e247.css → main.675cb8c4.css} +2 -2
- package/dist/public/build/css/main.675cb8c4.css.map +1 -0
- package/dist/public/build/js/861.9703a31c.chunk.js +2 -0
- package/dist/public/build/js/861.9703a31c.chunk.js.map +1 -0
- package/dist/public/build/js/{943.f6342dd5.chunk.js → 943.40ff6440.chunk.js} +2 -2
- package/dist/public/build/js/{943.f6342dd5.chunk.js.map → 943.40ff6440.chunk.js.map} +1 -1
- package/dist/public/build/js/main.768ba513.js +3 -0
- package/dist/public/build/js/{main.b8adf234.js.map → main.768ba513.js.map} +1 -1
- package/dist/public/build/js/runtime.ac9a4336.js +2 -0
- package/dist/public/build/js/{runtime.fd8cf219.js.map → runtime.ac9a4336.js.map} +1 -1
- package/dist/public/build/manifest.json +12 -12
- package/dist/server/configs/local.js +1 -0
- package/dist/shared/ui-settings.d.ts +1 -0
- package/package.json +2 -2
- package/dist/public/build/css/89.3546950a.chunk.css.map +0 -1
- package/dist/public/build/css/main.e919e247.css.map +0 -1
- package/dist/public/build/js/89.07445d46.chunk.js +0 -2
- package/dist/public/build/js/89.07445d46.chunk.js.map +0 -1
- package/dist/public/build/js/main.b8adf234.js +0 -3
- package/dist/public/build/js/runtime.fd8cf219.js +0 -2
- /package/dist/public/build/js/{main.b8adf234.js.LICENSE.txt → main.768ba513.js.LICENSE.txt} +0 -0
@@ -1,8 +1,13 @@
|
|
1
1
|
.operation-details {
|
2
2
|
display: grid;
|
3
|
-
grid-template-columns:
|
3
|
+
grid-template-columns: minmax(600px, 1fr);
|
4
4
|
grid-column-gap: 30px;
|
5
5
|
}
|
6
|
+
@media (min-width: 1300px) {
|
7
|
+
.operation-details {
|
8
|
+
grid-template-columns: minmax(600px, 1fr) minmax(600px, 1fr);
|
9
|
+
}
|
10
|
+
}
|
6
11
|
.operation-details__alerts, .operation-details__result {
|
7
12
|
margin-top: 20px;
|
8
13
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["Details.scss"],"names":[],"mappings":"AAAA;EACI,aAAA;EACA,
|
1
|
+
{"version":3,"sources":["Details.scss"],"names":[],"mappings":"AAAA;EACI,aAAA;EACA,yCAAA;EAMA,qBAAA;AAJJ;AAAI;EAJJ;IAKQ,4DAAA;EAGN;AACF;AACI;EAEI,gBAAA;AAAR;AAGI;EACI,iBAAA;AADR;AAII;EACI,cAAA;AAFR;AAKI;EACI,+CAAA;EACA,sCAAA;EACA,kBAAA;EACA,kBAAA;AAHR;AAKQ;EACI,gBAAA;AAHZ;AAOI;EACI,mBAAA;AALR","file":"Details.css","sourcesContent":[".operation-details {\n display: grid;\n grid-template-columns: minmax(600px, 1fr);\n\n @media (min-width: 1300px) {\n grid-template-columns: minmax(600px, 1fr) minmax(600px, 1fr);\n }\n\n grid-column-gap: 30px;\n\n &__alerts,\n &__result {\n margin-top: 20px;\n }\n\n &__edit-button {\n margin-left: auto;\n }\n\n &__table {\n overflow: auto;\n }\n\n .collapsible-section {\n box-shadow: 0 2px 5px var(--default-background);\n border: 1px solid var(--light-divider);\n border-radius: 3px;\n padding: 24px 20px;\n\n .elements-heading_size_m:last-child {\n margin-bottom: 0;\n }\n }\n\n .elements-alert {\n margin-bottom: 20px;\n }\n}\n"],"sourceRoot":""}
|
@@ -38,7 +38,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
|
|
38
38
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
39
39
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
40
40
|
var cancelHelper = new _cancelHelper.default();
|
41
|
-
var POOL_FIELDS_TO_LOAD = ['accumulated_resource_ratio_volume', 'accumulated_resource_volume', 'demand_ratio', 'detailed_fair_share', 'dominant_resource', 'estimated_burst_usage_duration_sec', 'fair_share_ratio', 'fifo_index', 'integral_guarantee_type', 'is_ephemeral', 'max_operation_count', 'max_running_operation_count', 'max_share_ratio', 'min_share_ratio', 'mode', 'operation_count', 'parent', 'pool_operation_count', 'child_pool_count', 'resource_demand', 'resource_limits', 'resource_usage', 'promised_fair_share_resources', 'running_operation_count', 'specified_burst_guarantee_resources', 'specified_resource_flow', 'starvation_status', 'starving', 'strong_guarantee_resources', 'usage_ratio', 'weight', 'abc'];
|
41
|
+
var POOL_FIELDS_TO_LOAD = ['accumulated_resource_ratio_volume', 'accumulated_resource_volume', 'demand_ratio', 'detailed_fair_share', 'dominant_resource', 'estimated_burst_usage_duration_sec', 'fair_share_ratio', 'fifo_index', 'fifo_sort_parameters', 'integral_guarantee_type', 'is_ephemeral', 'max_operation_count', 'max_running_operation_count', 'max_share_ratio', 'min_share_ratio', 'mode', 'operation_count', 'parent', 'pool_operation_count', 'child_pool_count', 'resource_demand', 'resource_limits', 'resource_usage', 'promised_fair_share_resources', 'running_operation_count', 'specified_burst_guarantee_resources', 'specified_resource_flow', 'starvation_status', 'starving', 'strong_guarantee_resources', 'usage_ratio', 'weight', 'abc'];
|
42
42
|
var POOL_TREE_GET_ATTRS = ['integral_guarantees', 'weight', 'max_operation_count', 'max_running_operation_count', 'strong_guarantee_resources', 'resource_limits', 'forbid_immediate_operations', 'create_ephemeral_subpools', 'fifo_sort_parameters', 'config', 'folder_id'];
|
43
43
|
var EmptyFullPath = /*#__PURE__*/function (_Error) {
|
44
44
|
(0, _inherits2.default)(EmptyFullPath, _Error);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_uikit","require","_rumWrapApi","_utils","_batch","_scheduling","_scheduling2","_expandedPools","_empty","_schedulingPools","_support","_cancelHelper","_interopRequireWildcard","_scheduling3","_uiError","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","_interopRequireDefault","obj","cancelHelper","CancelHelper","POOL_FIELDS_TO_LOAD","POOL_TREE_GET_ATTRS","EmptyFullPath","_Error","_inherits","_super","_createSuper","_classCallCheck","apply","arguments","_createClass","_wrapNativeSuper","Error","loadExpandedPools","tree","dispatch","getState","pool","getPool","undefined","ROOT_POOL_NAME","loadExpandedOperationsAndPools","ytApiV3Id","executeBatch","YTApiId","schedulingPoolFullPath","requests","command","parameters","path","concat","fields","then","_ref","_ref2","_slicedToArray","output","_ref3","full_path","is_ephemeral","addFullPathToExpandedPoolsNoLoad","type","CHANGE_POOL","data","Toaster","add","name","title","_getSchedulingOperati","state","loadAll","getExpandedPoolsLoadAll","expandedPools","Map","getSchedulingOperationsExpandedPools","expandedPoolNames","_toConsumableArray","keys","operationsExpandedPools","operationsRequests","push","makeGet","prefix","forEach","item","loadAllPools","isSupportedSchedulingChildrenByPool","poolsRequests","poolsChildrenRequests","poolsCypressDataRequests","poolsExpandedPools","indexOf","attributes","_expandedPools$get","_ref4","parentPoolPath","isEphemeral","cypressDataPath","makeList","removeAllRequests","SCHEDULING_EXPANDED_POOLS_REQUEST","Promise","all","length","schedulingLoadOperationsPerPool","cancellation","saveCancelToken","resolve","schedulingLoadPoolsAll","schedulingLoadPoolsPerPool","schedulingLoadChildrenPerPool","schedulingLoadCypressDataPerPool","_ref5","_error$inner_errors","_ref6","operationsResults","poolsResults","poolsChildrenResults","poolsCypressData","error","UIBatchError","_splitBatchResults","splitBatchResults","operations","results","rawOperations","_reduce","acc","assign","rawPools","cypressData","_splitBatchResults2","pools","_ref7","_ref8","_ref8$","value","_splitBatchResults3","_splitBatchResults3$r","flattenAttributes","_splitBatchResults4","_pools","resultIndices","poolInfo","index","_splitBatchResults5","poolChildren","children","_splitBatchResults6","cypressDataChildrenPerPool","poolChildrenCypressData","$value","SCHEDULING_EXPANDED_POOLS_SUCCESS","expandedPoolsTree","EMPTY_OBJECT","flattenCypressData","inner_errors","isCancelled","SCHEDULING_EXPANDED_POOLS_FAILURE","setExpandedPool","poolName","expanded","getTree","poolsByName","getSchedulingPoolsMapByName","treeExpandedPools","expandedPoolInfo","calcExpandedPoolInfo","updateExpandedPoolNoLoad","fullPath","oldExpandedPools","parts","split","slice","join","_objectSpread","_defineProperty","SCHEDULING_EXPANDED_POOLS_PARTITION","resetExpandedPools","_getSchedulingOperati2","old","rest","_objectWithoutProperties","map","_toPropertyKey","size","getSchedulingOperationsCount","_dispatch","root","operationCount","getPoolPathsByName","getPools","calculatePoolPath","orchidPath","setLoadAllOperations","_data","res","_data2","parent"],"sources":["expanded-pools.tsx"],"sourcesContent":["import {ThunkAction} from 'redux-thunk';\nimport {RootState} from '../../reducers';\nimport _ from 'lodash';\n\nimport {Toaster} from '@gravity-ui/uikit';\n\nimport {\n ExpandedPoolInfo,\n ExpandedPoolsAction,\n PoolCypressData,\n} from '../../reducers/scheduling/expanded-pools';\n\nimport {YTApiId, ytApiV3Id} from '../../../rum/rum-wrap-api';\nimport {splitBatchResults} from '../../../utils/utils';\nimport {makeGet, makeList} from '../../../utils/batch';\nimport {\n CHANGE_POOL,\n ROOT_POOL_NAME,\n SCHEDULING_EXPANDED_POOLS_FAILURE,\n SCHEDULING_EXPANDED_POOLS_PARTITION,\n SCHEDULING_EXPANDED_POOLS_REQUEST,\n SCHEDULING_EXPANDED_POOLS_SUCCESS,\n} from '../../../constants/scheduling';\nimport {calculatePoolPath, getPool, getPools, getTree} from '../../selectors/scheduling/scheduling';\nimport {\n getExpandedPoolsLoadAll,\n getSchedulingOperationsExpandedPools,\n} from '../../selectors/scheduling/expanded-pools';\nimport {EMPTY_OBJECT} from '../../../constants/empty';\nimport {PoolInfo, getSchedulingPoolsMapByName} from '../../selectors/scheduling/scheduling-pools';\nimport {BatchSubRequest} from '../../../../shared/yt-types';\nimport {SchedulingAction} from '../../../store/reducers/scheduling/scheduling';\nimport {isSupportedSchedulingChildrenByPool} from '../../../store/selectors/thor/support';\nimport CancelHelper, {isCancelled} from '../../../utils/cancel-helper';\nimport {flattenAttributes} from '../../../utils/scheduling/scheduling';\nimport {UIBatchError} from '../../../utils/errors/ui-error';\n\ntype ExpandedPoolsThunkAction = ThunkAction<\n any,\n RootState,\n any,\n ExpandedPoolsAction | SchedulingAction\n>;\n\nconst cancelHelper = new CancelHelper();\n\nconst POOL_FIELDS_TO_LOAD = [\n 'accumulated_resource_ratio_volume',\n 'accumulated_resource_volume',\n 'demand_ratio',\n 'detailed_fair_share',\n 'dominant_resource',\n 'estimated_burst_usage_duration_sec',\n 'fair_share_ratio',\n 'fifo_index',\n 'integral_guarantee_type',\n 'is_ephemeral',\n 'max_operation_count',\n 'max_running_operation_count',\n 'max_share_ratio',\n 'min_share_ratio',\n 'mode',\n 'operation_count',\n 'parent',\n 'pool_operation_count',\n 'child_pool_count',\n 'resource_demand',\n 'resource_limits',\n 'resource_usage',\n 'promised_fair_share_resources',\n 'running_operation_count',\n 'specified_burst_guarantee_resources',\n 'specified_resource_flow',\n 'starvation_status',\n 'starving',\n 'strong_guarantee_resources',\n 'usage_ratio',\n 'weight',\n 'abc',\n];\n\nconst POOL_TREE_GET_ATTRS = [\n 'integral_guarantees',\n 'weight',\n 'max_operation_count',\n 'max_running_operation_count',\n 'strong_guarantee_resources',\n 'resource_limits',\n 'forbid_immediate_operations',\n 'create_ephemeral_subpools',\n 'fifo_sort_parameters',\n 'config',\n 'folder_id',\n];\n\nclass EmptyFullPath extends Error {}\n\nexport function loadExpandedPools(tree: string): ExpandedPoolsThunkAction {\n return (dispatch, getState) => {\n const pool = getPool(getState());\n\n if (!tree) {\n return undefined;\n }\n\n if (pool === ROOT_POOL_NAME) {\n return dispatch(loadExpandedOperationsAndPools(tree));\n } else {\n return ytApiV3Id\n .executeBatch<{full_path: string; is_ephemeral?: boolean}>(\n YTApiId.schedulingPoolFullPath,\n {\n requests: [\n {\n command: 'get' as const,\n parameters: {\n path: `//sys/scheduler/orchid/scheduler/pool_trees/${tree}/pools/${pool}`,\n fields: ['is_ephemeral', 'full_path'],\n },\n },\n ],\n },\n )\n .then(([{output}]) => {\n const {full_path, is_ephemeral} = output ?? {};\n if (!full_path) {\n throw new EmptyFullPath();\n } else {\n dispatch(addFullPathToExpandedPoolsNoLoad(tree, full_path, is_ephemeral));\n dispatch(loadExpandedOperationsAndPools(tree));\n }\n })\n .catch((e) => {\n if (e instanceof EmptyFullPath) {\n dispatch({type: CHANGE_POOL, data: {pool: ROOT_POOL_NAME}});\n /**\n * We don't need to call `dispatch(loadExpandedOperationsAndPools(tree))` after `CHANGE_POOL`.\n * The call will be triggered by SchedulingExpandedPoolsUpdater.\n */\n // dispatch(loadExpandedOperationsAndPools(tree));\n } else {\n new Toaster().add({\n name: 'schedulingPoolFullPath',\n type: 'error',\n title: '',\n });\n }\n });\n }\n };\n}\n\nfunction loadExpandedOperationsAndPools(tree: string): ExpandedPoolsThunkAction {\n return (dispatch, getState) => {\n const state = getState();\n\n const loadAll = getExpandedPoolsLoadAll(state);\n const expandedPools: Map<string, ExpandedPoolInfo> = loadAll\n ? new Map()\n : getSchedulingOperationsExpandedPools(state)[tree] ?? new Map();\n const expandedPoolNames: Array<string> = [...expandedPools.keys()];\n\n const operationsExpandedPools: Array<string> = [...expandedPoolNames];\n\n const operationsRequests: Array<BatchSubRequest> = [];\n if (loadAll) {\n operationsRequests.push(\n makeGet(\n `//sys/scheduler/orchid/scheduler/pool_trees/${tree}/fair_share_info/operations`,\n ),\n );\n } else {\n const prefix = `//sys/scheduler/orchid/scheduler/pool_trees/${tree}/operations_by_pool`;\n operationsExpandedPools.forEach((item) => {\n operationsRequests.push(makeGet(`${prefix}/${item}`));\n });\n }\n\n const loadAllPools = loadAll || !isSupportedSchedulingChildrenByPool(state);\n const poolsRequests: Array<BatchSubRequest> = [];\n const poolsChildrenRequests: Array<BatchSubRequest> = [];\n const poolsCypressDataRequests: Array<BatchSubRequest> = [];\n\n const poolsExpandedPools: Array<string> =\n -1 !== expandedPoolNames.indexOf(ROOT_POOL_NAME)\n ? expandedPoolNames\n : [ROOT_POOL_NAME, ...expandedPoolNames];\n\n if (loadAllPools) {\n poolsRequests.push(\n makeGet(`//sys/scheduler/orchid/scheduler/pool_trees/${tree}/pools`, {\n fields: POOL_FIELDS_TO_LOAD,\n }),\n );\n poolsCypressDataRequests.push(\n makeGet(`//sys/pool_trees/${tree}`, {attributes: POOL_TREE_GET_ATTRS}),\n );\n } else {\n poolsExpandedPools.forEach((pool) => {\n poolsRequests.push(\n makeGet(`//sys/scheduler/orchid/scheduler/pool_trees/${tree}/pools/${pool}`, {\n fields: POOL_FIELDS_TO_LOAD,\n }),\n );\n poolsChildrenRequests.push(\n makeGet(\n `//sys/scheduler/orchid/scheduler/pool_trees/${tree}/child_pools_by_pool/${pool}`,\n {\n fields: POOL_FIELDS_TO_LOAD,\n },\n ),\n );\n const {parentPoolPath, isEphemeral} = expandedPools.get(pool) ?? {};\n const cypressDataPath = parentPoolPath\n ? `//sys/pool_trees/${tree}/${parentPoolPath}/${pool}`\n : `//sys/pool_trees/${tree}/${pool}`;\n if (pool === ROOT_POOL_NAME || !isEphemeral) {\n poolsCypressDataRequests.push(\n makeList(\n pool === ROOT_POOL_NAME ? `//sys/pool_trees/${tree}` : cypressDataPath,\n {\n attributes: POOL_TREE_GET_ATTRS,\n },\n ),\n );\n }\n });\n }\n\n cancelHelper.removeAllRequests();\n\n dispatch({type: SCHEDULING_EXPANDED_POOLS_REQUEST});\n return Promise.all([\n operationsRequests.length\n ? ytApiV3Id.executeBatch(YTApiId.schedulingLoadOperationsPerPool, {\n parameters: {requests: operationsRequests},\n cancellation: cancelHelper.saveCancelToken,\n })\n : Promise.resolve([]),\n loadAllPools\n ? ytApiV3Id.executeBatch(YTApiId.schedulingLoadPoolsAll, {\n parameters: {requests: poolsRequests},\n cancellation: cancelHelper.saveCancelToken,\n })\n : ytApiV3Id.executeBatch(YTApiId.schedulingLoadPoolsPerPool, {\n parameters: {requests: poolsRequests},\n cancellation: cancelHelper.saveCancelToken,\n }),\n loadAllPools\n ? Promise.resolve([])\n : ytApiV3Id.executeBatch(YTApiId.schedulingLoadChildrenPerPool, {\n parameters: {requests: poolsChildrenRequests},\n cancellation: cancelHelper.saveCancelToken,\n }),\n !poolsCypressDataRequests.length\n ? Promise.resolve([])\n : ytApiV3Id.executeBatch(YTApiId.schedulingLoadCypressDataPerPool, {\n parameters: {requests: poolsCypressDataRequests},\n cancellation: cancelHelper.saveCancelToken,\n }),\n ])\n .then(([operationsResults, poolsResults, poolsChildrenResults, poolsCypressData]) => {\n const error = new UIBatchError('Failed to load expanded pools');\n const {results: operations} = splitBatchResults(operationsResults, error);\n const rawOperations = _.reduce(\n operations,\n (acc, data) => {\n return Object.assign(acc, data);\n },\n {},\n );\n\n const rawPools: Record<string, PoolInfo> = {};\n const cypressData: Record<string, PoolCypressData> = {};\n\n if (loadAllPools) {\n const {results: pools} = splitBatchResults<Record<string, PoolInfo>>(\n poolsResults,\n error,\n );\n const [value = {}] = pools ?? [];\n Object.assign(rawPools, value);\n\n const {\n results: [data],\n } = splitBatchResults(poolsCypressData, error);\n Object.assign(cypressData, flattenAttributes(data));\n } else {\n const {results: pools, resultIndices} = splitBatchResults<PoolInfo>(\n poolsResults,\n error,\n );\n pools.forEach((poolInfo, index) => {\n const name = poolsExpandedPools[resultIndices[index]];\n rawPools[name] = poolInfo;\n });\n\n const {results: poolChildren} = splitBatchResults<Record<string, PoolInfo>>(\n poolsChildrenResults,\n error,\n );\n poolChildren.forEach((children) => {\n Object.assign(rawPools, children);\n });\n\n const {results: cypressDataChildrenPerPool} = splitBatchResults<\n Array<PoolCypressData>\n >(poolsCypressData, error);\n cypressDataChildrenPerPool.forEach((poolChildrenCypressData) => {\n poolChildrenCypressData.forEach((item) => {\n cypressData[item.$value] = item;\n });\n });\n }\n\n dispatch({\n type: SCHEDULING_EXPANDED_POOLS_SUCCESS,\n data: {\n expandedPoolsTree: tree,\n rawOperations: Object.keys(rawOperations).length\n ? rawOperations\n : EMPTY_OBJECT,\n rawPools: Object.keys(rawPools).length ? rawPools : EMPTY_OBJECT,\n flattenCypressData: Object.keys(cypressData).length\n ? cypressData\n : EMPTY_OBJECT,\n },\n });\n\n if (error.inner_errors?.length) {\n throw error;\n }\n })\n .catch((error) => {\n if (!isCancelled(error)) {\n dispatch({\n type: SCHEDULING_EXPANDED_POOLS_FAILURE,\n data: {error},\n });\n }\n });\n };\n}\n\nexport function setExpandedPool(poolName: string, expanded: boolean): ExpandedPoolsThunkAction {\n return (dispatch, getState) => {\n const state = getState();\n const tree = getTree(getState());\n const expandedPools = getSchedulingOperationsExpandedPools(state);\n\n const poolsByName = getSchedulingPoolsMapByName(state);\n\n const treeExpandedPools = new Map(expandedPools[tree]);\n if (expanded) {\n const expandedPoolInfo = calcExpandedPoolInfo(poolName, poolsByName);\n treeExpandedPools.set(poolName, expandedPoolInfo);\n } else {\n treeExpandedPools.delete(poolName);\n }\n\n dispatch(updateExpandedPoolNoLoad(tree, treeExpandedPools));\n dispatch(loadExpandedPools(tree));\n };\n}\n\nfunction addFullPathToExpandedPoolsNoLoad(\n tree: string,\n /**\n * elements of the array should have the same format as `//sys/scheduler/orchid/scheduler/pool_trees/${tree}/pools/${pool}/full_path`\n */\n fullPath: string,\n isEphemeral?: boolean,\n): ExpandedPoolsThunkAction {\n return (dispatch, getState) => {\n const state = getState();\n const oldExpandedPools = getSchedulingOperationsExpandedPools(state);\n const treeExpandedPools = new Map(oldExpandedPools[tree]);\n\n /**\n * `fullPath` value starts from `/`, example: `/mypool/child/subchild`\n * so we have to use `.slice(1)` to remove first empty string\n */\n const parts = fullPath.split('/').slice(1);\n\n for (let i = 0; i < parts.length; ++i) {\n const poolName = parts[i];\n const parentPoolPath = parts.slice(0, i).join('/');\n treeExpandedPools.set(poolName, {parentPoolPath, isEphemeral});\n }\n\n dispatch(updateExpandedPoolNoLoad(tree, treeExpandedPools));\n };\n}\n\nfunction updateExpandedPoolNoLoad(\n tree: string,\n treeExpandedPools: Map<string, ExpandedPoolInfo>,\n): ExpandedPoolsThunkAction {\n return (dispatch, getState) => {\n const oldExpandedPools = getSchedulingOperationsExpandedPools(getState());\n\n const expandedPools = {\n ...oldExpandedPools,\n [tree]: treeExpandedPools,\n };\n\n dispatch({\n type: SCHEDULING_EXPANDED_POOLS_PARTITION,\n data: {expandedPools},\n });\n };\n}\n\nexport function resetExpandedPools(tree: string): ExpandedPoolsThunkAction {\n return (dispatch, getState) => {\n if (!tree) {\n return;\n }\n\n const state = getState();\n const {[tree]: old, ...rest} = getSchedulingOperationsExpandedPools(state);\n\n if (old?.size) {\n dispatch({\n type: SCHEDULING_EXPANDED_POOLS_PARTITION,\n data: {\n expandedPools: {\n ...rest,\n [tree]: new Map<string, ExpandedPoolInfo>(),\n },\n },\n });\n }\n };\n}\n\nexport function getSchedulingOperationsCount(): ThunkAction<number, RootState, any, any> {\n return (_dispatch, getState) => {\n const state = getState();\n\n const tree = getSchedulingPoolsMapByName(state);\n const root = tree[ROOT_POOL_NAME];\n return root?.operationCount || 0;\n };\n}\n\nexport function getPoolPathsByName(\n poolName: string,\n): ThunkAction<{fullPath: string; orchidPath: string}, RootState, unknown, any> {\n return (_dispatch, getState) => {\n const state = getState();\n const pools = getPools(state);\n const tree = getTree(state);\n\n return {\n fullPath: calculatePoolPath(poolName, pools, tree),\n orchidPath: `//sys/scheduler/orchid/scheduler/pool_trees/${tree}/fair_share_info/pools/${poolName}`,\n };\n };\n}\n\nexport function setLoadAllOperations(loadAll: boolean): ExpandedPoolsThunkAction {\n return (dispatch, getState) => {\n const state = getState();\n dispatch({\n type: SCHEDULING_EXPANDED_POOLS_PARTITION,\n data: {loadAll},\n });\n\n const tree = getTree(state);\n dispatch(loadExpandedPools(tree));\n };\n}\n\nfunction calcExpandedPoolInfo(\n poolName: string,\n poolsByName: Record<string, PoolInfo>,\n): ExpandedPoolInfo {\n let data = poolsByName[poolName];\n const isEphemeral = data?.isEphemeral;\n let res = '';\n while (data?.parent && data.parent !== ROOT_POOL_NA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,IAAKrI,IAAI,CAACuI,MAAM;IACjDvI,IAAI,GAAGoG,WAAW,CAACpG,IAAI,CAACuI,MAAM,CAAC;EACnC;EACA,OAAO;IAACvG,cAAc,EAAEqG,GAAG;IAAEpG,WAAW,EAAXA;EAAW,CAAC;AAC7C"}
|
1
|
+
{"version":3,"names":["_uikit","require","_rumWrapApi","_utils","_batch","_scheduling","_scheduling2","_expandedPools","_empty","_schedulingPools","_support","_cancelHelper","_interopRequireWildcard","_scheduling3","_uiError","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","_interopRequireDefault","obj","cancelHelper","CancelHelper","POOL_FIELDS_TO_LOAD","POOL_TREE_GET_ATTRS","EmptyFullPath","_Error","_inherits","_super","_createSuper","_classCallCheck","apply","arguments","_createClass","_wrapNativeSuper","Error","loadExpandedPools","tree","dispatch","getState","pool","getPool","undefined","ROOT_POOL_NAME","loadExpandedOperationsAndPools","ytApiV3Id","executeBatch","YTApiId","schedulingPoolFullPath","requests","command","parameters","path","concat","fields","then","_ref","_ref2","_slicedToArray","output","_ref3","full_path","is_ephemeral","addFullPathToExpandedPoolsNoLoad","type","CHANGE_POOL","data","Toaster","add","name","title","_getSchedulingOperati","state","loadAll","getExpandedPoolsLoadAll","expandedPools","Map","getSchedulingOperationsExpandedPools","expandedPoolNames","_toConsumableArray","keys","operationsExpandedPools","operationsRequests","push","makeGet","prefix","forEach","item","loadAllPools","isSupportedSchedulingChildrenByPool","poolsRequests","poolsChildrenRequests","poolsCypressDataRequests","poolsExpandedPools","indexOf","attributes","_expandedPools$get","_ref4","parentPoolPath","isEphemeral","cypressDataPath","makeList","removeAllRequests","SCHEDULING_EXPANDED_POOLS_REQUEST","Promise","all","length","schedulingLoadOperationsPerPool","cancellation","saveCancelToken","resolve","schedulingLoadPoolsAll","schedulingLoadPoolsPerPool","schedulingLoadChildrenPerPool","schedulingLoadCypressDataPerPool","_ref5","_error$inner_errors","_ref6","operationsResults","poolsResults","poolsChildrenResults","poolsCypressData","error","UIBatchError","_splitBatchResults","splitBatchResults","operations","results","rawOperations","_reduce","acc","assign","rawPools","cypressData","_splitBatchResults2","pools","_ref7","_ref8","_ref8$","value","_splitBatchResults3","_splitBatchResults3$r","flattenAttributes","_splitBatchResults4","_pools","resultIndices","poolInfo","index","_splitBatchResults5","poolChildren","children","_splitBatchResults6","cypressDataChildrenPerPool","poolChildrenCypressData","$value","SCHEDULING_EXPANDED_POOLS_SUCCESS","expandedPoolsTree","EMPTY_OBJECT","flattenCypressData","inner_errors","isCancelled","SCHEDULING_EXPANDED_POOLS_FAILURE","setExpandedPool","poolName","expanded","getTree","poolsByName","getSchedulingPoolsMapByName","treeExpandedPools","expandedPoolInfo","calcExpandedPoolInfo","updateExpandedPoolNoLoad","fullPath","oldExpandedPools","parts","split","slice","join","_objectSpread","_defineProperty","SCHEDULING_EXPANDED_POOLS_PARTITION","resetExpandedPools","_getSchedulingOperati2","old","rest","_objectWithoutProperties","map","_toPropertyKey","size","getSchedulingOperationsCount","_dispatch","root","operationCount","getPoolPathsByName","getPools","calculatePoolPath","orchidPath","setLoadAllOperations","_data","res","_data2","parent"],"sources":["expanded-pools.tsx"],"sourcesContent":["import {ThunkAction} from 'redux-thunk';\nimport {RootState} from '../../reducers';\nimport _ from 'lodash';\n\nimport {Toaster} from '@gravity-ui/uikit';\n\nimport {\n ExpandedPoolInfo,\n ExpandedPoolsAction,\n PoolCypressData,\n} from '../../reducers/scheduling/expanded-pools';\n\nimport {YTApiId, ytApiV3Id} from '../../../rum/rum-wrap-api';\nimport {splitBatchResults} from '../../../utils/utils';\nimport {makeGet, makeList} from '../../../utils/batch';\nimport {\n CHANGE_POOL,\n ROOT_POOL_NAME,\n SCHEDULING_EXPANDED_POOLS_FAILURE,\n SCHEDULING_EXPANDED_POOLS_PARTITION,\n SCHEDULING_EXPANDED_POOLS_REQUEST,\n SCHEDULING_EXPANDED_POOLS_SUCCESS,\n} from '../../../constants/scheduling';\nimport {calculatePoolPath, getPool, getPools, getTree} from '../../selectors/scheduling/scheduling';\nimport {\n getExpandedPoolsLoadAll,\n getSchedulingOperationsExpandedPools,\n} from '../../selectors/scheduling/expanded-pools';\nimport {EMPTY_OBJECT} from '../../../constants/empty';\nimport {PoolInfo, getSchedulingPoolsMapByName} from '../../selectors/scheduling/scheduling-pools';\nimport {BatchSubRequest} from '../../../../shared/yt-types';\nimport {SchedulingAction} from '../../../store/reducers/scheduling/scheduling';\nimport {isSupportedSchedulingChildrenByPool} from '../../../store/selectors/thor/support';\nimport CancelHelper, {isCancelled} from '../../../utils/cancel-helper';\nimport {flattenAttributes} from '../../../utils/scheduling/scheduling';\nimport {UIBatchError} from '../../../utils/errors/ui-error';\n\ntype ExpandedPoolsThunkAction = ThunkAction<\n any,\n RootState,\n any,\n ExpandedPoolsAction | SchedulingAction\n>;\n\nconst cancelHelper = new CancelHelper();\n\nconst POOL_FIELDS_TO_LOAD = [\n 'accumulated_resource_ratio_volume',\n 'accumulated_resource_volume',\n 'demand_ratio',\n 'detailed_fair_share',\n 'dominant_resource',\n 'estimated_burst_usage_duration_sec',\n 'fair_share_ratio',\n 'fifo_index',\n 'fifo_sort_parameters',\n 'integral_guarantee_type',\n 'is_ephemeral',\n 'max_operation_count',\n 'max_running_operation_count',\n 'max_share_ratio',\n 'min_share_ratio',\n 'mode',\n 'operation_count',\n 'parent',\n 'pool_operation_count',\n 'child_pool_count',\n 'resource_demand',\n 'resource_limits',\n 'resource_usage',\n 'promised_fair_share_resources',\n 'running_operation_count',\n 'specified_burst_guarantee_resources',\n 'specified_resource_flow',\n 'starvation_status',\n 'starving',\n 'strong_guarantee_resources',\n 'usage_ratio',\n 'weight',\n 'abc',\n];\n\nconst POOL_TREE_GET_ATTRS = [\n 'integral_guarantees',\n 'weight',\n 'max_operation_count',\n 'max_running_operation_count',\n 'strong_guarantee_resources',\n 'resource_limits',\n 'forbid_immediate_operations',\n 'create_ephemeral_subpools',\n 'fifo_sort_parameters',\n 'config',\n 'folder_id',\n];\n\nclass EmptyFullPath extends Error {}\n\nexport function loadExpandedPools(tree: string): ExpandedPoolsThunkAction {\n return (dispatch, getState) => {\n const pool = getPool(getState());\n\n if (!tree) {\n return undefined;\n }\n\n if (pool === ROOT_POOL_NAME) {\n return dispatch(loadExpandedOperationsAndPools(tree));\n } else {\n return ytApiV3Id\n .executeBatch<{full_path: string; is_ephemeral?: boolean}>(\n YTApiId.schedulingPoolFullPath,\n {\n requests: [\n {\n command: 'get' as const,\n parameters: {\n path: `//sys/scheduler/orchid/scheduler/pool_trees/${tree}/pools/${pool}`,\n fields: ['is_ephemeral', 'full_path'],\n },\n },\n ],\n },\n )\n .then(([{output}]) => {\n const {full_path, is_ephemeral} = output ?? {};\n if (!full_path) {\n throw new EmptyFullPath();\n } else {\n dispatch(addFullPathToExpandedPoolsNoLoad(tree, full_path, is_ephemeral));\n dispatch(loadExpandedOperationsAndPools(tree));\n }\n })\n .catch((e) => {\n if (e instanceof EmptyFullPath) {\n dispatch({type: CHANGE_POOL, data: {pool: ROOT_POOL_NAME}});\n /**\n * We don't need to call `dispatch(loadExpandedOperationsAndPools(tree))` after `CHANGE_POOL`.\n * The call will be triggered by SchedulingExpandedPoolsUpdater.\n */\n // dispatch(loadExpandedOperationsAndPools(tree));\n } else {\n new Toaster().add({\n name: 'schedulingPoolFullPath',\n type: 'error',\n title: '',\n });\n }\n });\n }\n };\n}\n\nfunction loadExpandedOperationsAndPools(tree: string): ExpandedPoolsThunkAction {\n return (dispatch, getState) => {\n const state = getState();\n\n const loadAll = getExpandedPoolsLoadAll(state);\n const expandedPools: Map<string, ExpandedPoolInfo> = loadAll\n ? new Map()\n : getSchedulingOperationsExpandedPools(state)[tree] ?? new Map();\n const expandedPoolNames: Array<string> = [...expandedPools.keys()];\n\n const operationsExpandedPools: Array<string> = [...expandedPoolNames];\n\n const operationsRequests: Array<BatchSubRequest> = [];\n if (loadAll) {\n operationsRequests.push(\n makeGet(\n `//sys/scheduler/orchid/scheduler/pool_trees/${tree}/fair_share_info/operations`,\n ),\n );\n } else {\n const prefix = `//sys/scheduler/orchid/scheduler/pool_trees/${tree}/operations_by_pool`;\n operationsExpandedPools.forEach((item) => {\n operationsRequests.push(makeGet(`${prefix}/${item}`));\n });\n }\n\n const loadAllPools = loadAll || !isSupportedSchedulingChildrenByPool(state);\n const poolsRequests: Array<BatchSubRequest> = [];\n const poolsChildrenRequests: Array<BatchSubRequest> = [];\n const poolsCypressDataRequests: Array<BatchSubRequest> = [];\n\n const poolsExpandedPools: Array<string> =\n -1 !== expandedPoolNames.indexOf(ROOT_POOL_NAME)\n ? expandedPoolNames\n : [ROOT_POOL_NAME, ...expandedPoolNames];\n\n if (loadAllPools) {\n poolsRequests.push(\n makeGet(`//sys/scheduler/orchid/scheduler/pool_trees/${tree}/pools`, {\n fields: POOL_FIELDS_TO_LOAD,\n }),\n );\n poolsCypressDataRequests.push(\n makeGet(`//sys/pool_trees/${tree}`, {attributes: POOL_TREE_GET_ATTRS}),\n );\n } else {\n poolsExpandedPools.forEach((pool) => {\n poolsRequests.push(\n makeGet(`//sys/scheduler/orchid/scheduler/pool_trees/${tree}/pools/${pool}`, {\n fields: POOL_FIELDS_TO_LOAD,\n }),\n );\n poolsChildrenRequests.push(\n makeGet(\n `//sys/scheduler/orchid/scheduler/pool_trees/${tree}/child_pools_by_pool/${pool}`,\n {\n fields: POOL_FIELDS_TO_LOAD,\n },\n ),\n );\n const {parentPoolPath, isEphemeral} = expandedPools.get(pool) ?? {};\n const cypressDataPath = parentPoolPath\n ? `//sys/pool_trees/${tree}/${parentPoolPath}/${pool}`\n : `//sys/pool_trees/${tree}/${pool}`;\n if (pool === ROOT_POOL_NAME || !isEphemeral) {\n poolsCypressDataRequests.push(\n makeList(\n pool === ROOT_POOL_NAME ? `//sys/pool_trees/${tree}` : cypressDataPath,\n {\n attributes: POOL_TREE_GET_ATTRS,\n },\n ),\n );\n }\n });\n }\n\n cancelHelper.removeAllRequests();\n\n dispatch({type: SCHEDULING_EXPANDED_POOLS_REQUEST});\n return Promise.all([\n operationsRequests.length\n ? ytApiV3Id.executeBatch(YTApiId.schedulingLoadOperationsPerPool, {\n parameters: {requests: operationsRequests},\n cancellation: cancelHelper.saveCancelToken,\n })\n : Promise.resolve([]),\n loadAllPools\n ? ytApiV3Id.executeBatch(YTApiId.schedulingLoadPoolsAll, {\n parameters: {requests: poolsRequests},\n cancellation: cancelHelper.saveCancelToken,\n })\n : ytApiV3Id.executeBatch(YTApiId.schedulingLoadPoolsPerPool, {\n parameters: {requests: poolsRequests},\n cancellation: cancelHelper.saveCancelToken,\n }),\n loadAllPools\n ? Promise.resolve([])\n : ytApiV3Id.executeBatch(YTApiId.schedulingLoadChildrenPerPool, {\n parameters: {requests: poolsChildrenRequests},\n cancellation: cancelHelper.saveCancelToken,\n }),\n !poolsCypressDataRequests.length\n ? Promise.resolve([])\n : ytApiV3Id.executeBatch(YTApiId.schedulingLoadCypressDataPerPool, {\n parameters: {requests: poolsCypressDataRequests},\n cancellation: cancelHelper.saveCancelToken,\n }),\n ])\n .then(([operationsResults, poolsResults, poolsChildrenResults, poolsCypressData]) => {\n const error = new UIBatchError('Failed to load expanded pools');\n const {results: operations} = splitBatchResults(operationsResults, error);\n const rawOperations = _.reduce(\n operations,\n (acc, data) => {\n return Object.assign(acc, data);\n },\n {},\n );\n\n const rawPools: Record<string, PoolInfo> = {};\n const cypressData: Record<string, PoolCypressData> = {};\n\n if (loadAllPools) {\n const {results: pools} = splitBatchResults<Record<string, PoolInfo>>(\n poolsResults,\n error,\n );\n const [value = {}] = pools ?? [];\n Object.assign(rawPools, value);\n\n const {\n results: [data],\n } = splitBatchResults(poolsCypressData, error);\n Object.assign(cypressData, flattenAttributes(data));\n } else {\n const {results: pools, resultIndices} = splitBatchResults<PoolInfo>(\n poolsResults,\n error,\n );\n pools.forEach((poolInfo, index) => {\n const name = poolsExpandedPools[resultIndices[index]];\n rawPools[name] = poolInfo;\n });\n\n const {results: poolChildren} = splitBatchResults<Record<string, PoolInfo>>(\n poolsChildrenResults,\n error,\n );\n poolChildren.forEach((children) => {\n Object.assign(rawPools, children);\n });\n\n const {results: cypressDataChildrenPerPool} = splitBatchResults<\n Array<PoolCypressData>\n >(poolsCypressData, error);\n cypressDataChildrenPerPool.forEach((poolChildrenCypressData) => {\n poolChildrenCypressData.forEach((item) => {\n cypressData[item.$value] = item;\n });\n });\n }\n\n dispatch({\n type: SCHEDULING_EXPANDED_POOLS_SUCCESS,\n data: {\n expandedPoolsTree: tree,\n rawOperations: Object.keys(rawOperations).length\n ? rawOperations\n : EMPTY_OBJECT,\n rawPools: Object.keys(rawPools).length ? rawPools : EMPTY_OBJECT,\n flattenCypressData: Object.keys(cypressData).length\n ? cypressData\n : EMPTY_OBJECT,\n },\n });\n\n if (error.inner_errors?.length) {\n throw error;\n }\n })\n .catch((error) => {\n if (!isCancelled(error)) {\n dispatch({\n type: SCHEDULING_EXPANDED_POOLS_FAILURE,\n data: {error},\n });\n }\n });\n };\n}\n\nexport function setExpandedPool(poolName: string, expanded: boolean): ExpandedPoolsThunkAction {\n return (dispatch, getState) => {\n const state = getState();\n const tree = getTree(getState());\n const expandedPools = getSchedulingOperationsExpandedPools(state);\n\n const poolsByName = getSchedulingPoolsMapByName(state);\n\n const treeExpandedPools = new Map(expandedPools[tree]);\n if (expanded) {\n const expandedPoolInfo = calcExpandedPoolInfo(poolName, poolsByName);\n treeExpandedPools.set(poolName, expandedPoolInfo);\n } else {\n treeExpandedPools.delete(poolName);\n }\n\n dispatch(updateExpandedPoolNoLoad(tree, treeExpandedPools));\n dispatch(loadExpandedPools(tree));\n };\n}\n\nfunction addFullPathToExpandedPoolsNoLoad(\n tree: string,\n /**\n * elements of the array should have the same format as `//sys/scheduler/orchid/scheduler/pool_trees/${tree}/pools/${pool}/full_path`\n */\n fullPath: string,\n isEphemeral?: boolean,\n): ExpandedPoolsThunkAction {\n return (dispatch, getState) => {\n const state = getState();\n const oldExpandedPools = getSchedulingOperationsExpandedPools(state);\n const treeExpandedPools = new Map(oldExpandedPools[tree]);\n\n /**\n * `fullPath` value starts from `/`, example: `/mypool/child/subchild`\n * so we have to use `.slice(1)` to remove first empty string\n */\n const parts = fullPath.split('/').slice(1);\n\n for (let i = 0; i < parts.length; ++i) {\n const poolName = parts[i];\n const parentPoolPath = parts.slice(0, i).join('/');\n treeExpandedPools.set(poolName, {parentPoolPath, isEphemeral});\n }\n\n dispatch(updateExpandedPoolNoLoad(tree, treeExpandedPools));\n };\n}\n\nfunction updateExpandedPoolNoLoad(\n tree: string,\n treeExpandedPools: Map<string, ExpandedPoolInfo>,\n): ExpandedPoolsThunkAction {\n return (dispatch, getState) => {\n const oldExpandedPools = getSchedulingOperationsExpandedPools(getState());\n\n const expandedPools = {\n ...oldExpandedPools,\n [tree]: treeExpandedPools,\n };\n\n dispatch({\n type: SCHEDULING_EXPANDED_POOLS_PARTITION,\n data: {expandedPools},\n });\n };\n}\n\nexport function resetExpandedPools(tree: string): ExpandedPoolsThunkAction {\n return (dispatch, getState) => {\n if (!tree) {\n return;\n }\n\n const state = getState();\n const {[tree]: old, ...rest} = getSchedulingOperationsExpandedPools(state);\n\n if (old?.size) {\n dispatch({\n type: SCHEDULING_EXPANDED_POOLS_PARTITION,\n data: {\n expandedPools: {\n ...rest,\n [tree]: new Map<string, ExpandedPoolInfo>(),\n },\n },\n });\n }\n };\n}\n\nexport function getSchedulingOperationsCount(): ThunkAction<number, RootState, any, any> {\n return (_dispatch, getState) => {\n const state = getState();\n\n const tree = getSchedulingPoolsMapByName(state);\n const root = tree[ROOT_POOL_NAME];\n return root?.operationCount || 0;\n };\n}\n\nexport function getPoolPathsByName(\n poolName: string,\n): ThunkAction<{fullPath: string; orchidPath: string}, RootState, unknown, any> {\n return (_dispatch, getState) => {\n const state = getState();\n const pools = getPools(state);\n const tree = getTree(state);\n\n return {\n fullPath: calculatePoolPath(poolName, pools, tree),\n orchidPath: `//sys/scheduler/orchid/scheduler/pool_trees/${tree}/fair_share_info/pools/${poolName}`,\n };\n };\n}\n\nexport function setLoadAllOperations(loadAll: boolean): ExpandedPoolsThunkAction {\n return (dispatch, getState) => {\n const state = getState();\n dispatch({\n type: SCHEDULING_EXPANDED_POOLS_PARTITION,\n data: {loadAll},\n });\n\n const tree = getTree(state);\n dispatch(loadExpandedPools(tree));\n };\n}\n\nfunction calcExpandedPoolInfo(\n poolName: string,\n poolsByName: Record<string, PoolInfo>,\n): ExpandedPoolInfo {\n let data = poolsByName[poolName];\n const isEphemeral = data?.isEphemeral;\n let res = '';\n while (data?.parent && data.parent !== ROOT_POOL_NAME) {\n res = res ? `${data.parent}/${res}` : data.parent;\n data = poolsByName[data.parent];\n }\n return {parentPoolPath: res, isEphemeral};\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAIA,IAAAA,MAAA,GAAAC,OAAA;AAQA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AAQA,IAAAK,YAAA,GAAAL,OAAA;AACA,IAAAM,cAAA,GAAAN,OAAA;AAIA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,gBAAA,GAAAR,OAAA;AAGA,IAAAS,QAAA,GAAAT,OAAA;AACA,IAAAU,aAAA,GAAAC,uBAAA,CAAAX,OAAA;AACA,IAAAY,YAAA,GAAAZ,OAAA;AACA,IAAAa,QAAA,GAAAb,OAAA;AAA2D,SAAAc,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAJ,wBAAAI,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,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GoG,WAAW,CAACH,QAAQ,CAAC;EAChC,IAAMhE,WAAW,IAAAmG,KAAA,GAAGpI,IAAI,cAAAoI,KAAA,uBAAJA,KAAA,CAAMnG,WAAW;EACrC,IAAIoG,GAAG,GAAG,EAAE;EACZ,OAAO,CAAAC,MAAA,GAAAtI,IAAI,cAAAsI,MAAA,eAAJA,MAAA,CAAMC,MAAM,IAAIvI,IAAI,CAACuI,MAAM,KAAK9J,0BAAc,EAAE;IAAA,IAAA6J,MAAA;IACnDD,GAAG,GAAGA,GAAG,MAAAlJ,MAAA,CAAMa,IAAI,CAACuI,MAAM,OAAApJ,MAAA,CAAIkJ,GAAG,IAAKrI,IAAI,CAACuI,MAAM;IACjDvI,IAAI,GAAGoG,WAAW,CAACpG,IAAI,CAACuI,MAAM,CAAC;EACnC;EACA,OAAO;IAACvG,cAAc,EAAEqG,GAAG;IAAEpG,WAAW,EAAXA;EAAW,CAAC;AAC7C"}
|
@@ -114,7 +114,7 @@ function reloadSetting(settingName, settingNS) {
|
|
114
114
|
function reloadUserSettings(login) {
|
115
115
|
return /*#__PURE__*/function () {
|
116
116
|
var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(dispatch, getState) {
|
117
|
-
var state, provider, data;
|
117
|
+
var state, provider, allData, data;
|
118
118
|
return _regenerator.default.wrap(function _callee$(_context) {
|
119
119
|
while (1) switch (_context.prev = _context.next) {
|
120
120
|
case 0:
|
@@ -124,28 +124,39 @@ function reloadUserSettings(login) {
|
|
124
124
|
_context.next = 5;
|
125
125
|
return provider.create(login);
|
126
126
|
case 5:
|
127
|
-
|
128
|
-
|
127
|
+
allData = provider.getAll(login);
|
128
|
+
if (!(allData instanceof Promise)) {
|
129
|
+
_context.next = 12;
|
130
|
+
break;
|
131
|
+
}
|
132
|
+
_context.next = 9;
|
133
|
+
return (0, _utils.wrapApiPromiseByToaster)(allData, {
|
129
134
|
toasterName: 'reload-user-settings',
|
130
135
|
skipSuccessToast: true,
|
131
136
|
errorContent: 'Cannot load user settings'
|
132
137
|
});
|
133
|
-
case
|
134
|
-
|
138
|
+
case 9:
|
139
|
+
_context.t0 = _context.sent;
|
140
|
+
_context.next = 13;
|
141
|
+
break;
|
142
|
+
case 12:
|
143
|
+
_context.t0 = allData;
|
144
|
+
case 13:
|
145
|
+
data = _context.t0;
|
135
146
|
dispatch({
|
136
147
|
type: _index.UPDATE_SETTING_DATA,
|
137
148
|
data: data
|
138
149
|
});
|
139
|
-
_context.next =
|
150
|
+
_context.next = 19;
|
140
151
|
break;
|
141
|
-
case
|
142
|
-
_context.prev =
|
143
|
-
_context.
|
144
|
-
case
|
152
|
+
case 17:
|
153
|
+
_context.prev = 17;
|
154
|
+
_context.t1 = _context["catch"](0);
|
155
|
+
case 19:
|
145
156
|
case "end":
|
146
157
|
return _context.stop();
|
147
158
|
}
|
148
|
-
}, _callee, null, [[0,
|
159
|
+
}, _callee, null, [[0, 17]]);
|
149
160
|
}));
|
150
161
|
return function (_x, _x2) {
|
151
162
|
return _ref.apply(this, arguments);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_settings","require","_index","_utils","_interopRequireDefault","obj","__esModule","default","logError","action","name","console","error","setSetting","settingName","settingNS","value","dispatch","path","getPath","setSettingByKey","getState","_getState","_getState$settings","settings","provider","data","login","global","previousValue","type","SET_SETTING_VALUE","set","showToasterError","concat","removeSetting","_getState2","_getState2$settings","UNSET_SETTING_VALUE","remove","reloadSetting","_getState3","get","then","reloadUserSettings","_ref","_asyncToGenerator","_regeneratorRuntime","mark","_callee","state","wrap","_callee$","_context","prev","next","create","
|
1
|
+
{"version":3,"names":["_settings","require","_index","_utils","_interopRequireDefault","obj","__esModule","default","logError","action","name","console","error","setSetting","settingName","settingNS","value","dispatch","path","getPath","setSettingByKey","getState","_getState","_getState$settings","settings","provider","data","login","global","previousValue","type","SET_SETTING_VALUE","set","showToasterError","concat","removeSetting","_getState2","_getState2$settings","UNSET_SETTING_VALUE","remove","reloadSetting","_getState3","get","then","reloadUserSettings","_ref","_asyncToGenerator","_regeneratorRuntime","mark","_callee","state","allData","wrap","_callee$","_context","prev","next","create","getAll","Promise","wrapApiPromiseByToaster","toasterName","skipSuccessToast","errorContent","t0","sent","UPDATE_SETTING_DATA","t1","stop","_x","_x2","apply","arguments"],"sources":["index.ts"],"sourcesContent":["import {ThunkAction} from 'redux-thunk';\nimport {RootState} from '../../../store/reducers';\nimport {SettingsAction} from '../../../store/reducers/settings';\nimport {SettingNS, getPath} from '../../../../shared/utils/settings';\nimport {SettingKey} from '../../../../shared/constants/settings-types';\n\nimport {\n SET_SETTING_VALUE,\n UNSET_SETTING_VALUE,\n UPDATE_SETTING_DATA,\n} from '../../../constants/index';\nimport {showToasterError, wrapApiPromiseByToaster} from '../../../utils/utils';\n\nfunction logError(action: string, name: string) {\n console.error('Failed to \"%s\" setting \"%s\", settings provider is disabled.', action, name);\n}\n\nexport type SettingsThunkAction<T = Promise<void>> = ThunkAction<\n T,\n RootState,\n unknown,\n SettingsAction\n>;\n\nexport function setSetting<T>(\n settingName: string,\n settingNS: SettingNS,\n value: T,\n): SettingsThunkAction {\n return (dispatch) => {\n const path = getPath(settingName, settingNS);\n return dispatch(setSettingByKey(path as SettingKey, value));\n };\n}\n\nexport function setSettingByKey<T>(path: SettingKey, value: T): SettingsThunkAction {\n return (dispatch, getState) => {\n const {\n settings: {provider, data},\n global: {login},\n } = getState();\n const previousValue = data[path];\n\n dispatch({\n type: SET_SETTING_VALUE,\n data: {path, value},\n });\n\n return provider.set(login, path, value).catch((error) => {\n if (error === 'disabled') {\n logError('set', path);\n return;\n }\n\n dispatch({\n type: SET_SETTING_VALUE,\n data: {path, value: previousValue},\n });\n\n showToasterError(`Set ${path}`, error);\n\n throw error;\n });\n };\n}\n\nexport function removeSetting(settingName: string, settingNS: SettingNS): SettingsThunkAction {\n const path = getPath(settingName, settingNS);\n\n return (dispatch, getState) => {\n const {\n settings: {provider, data},\n global: {login},\n } = getState();\n const previousValue = data[path];\n\n dispatch({\n type: UNSET_SETTING_VALUE,\n data: {path},\n });\n\n return provider.remove(login, path).catch((error) => {\n if (error === 'disabled') {\n logError('remove', settingName);\n return;\n }\n\n dispatch({\n type: SET_SETTING_VALUE,\n data: {path, value: previousValue},\n });\n\n showToasterError(`Remove ${path}`, error);\n\n throw error;\n });\n };\n}\n\nexport function reloadSetting(settingName: string, settingNS: SettingNS): SettingsThunkAction {\n const path = getPath(settingName, settingNS);\n\n return (dispatch, getState) => {\n const {\n settings: {provider},\n global: {login},\n } = getState();\n\n return provider\n .get(login, path)\n .then((value) => {\n dispatch({\n type: SET_SETTING_VALUE,\n data: {path, value},\n });\n })\n .catch((error) => {\n if (error === 'disabled') {\n logError('get', settingName);\n return;\n }\n\n showToasterError(`Reload ${path}`, error);\n\n throw error;\n });\n };\n}\n\nexport function reloadUserSettings(login: string): SettingsThunkAction {\n return async (dispatch, getState) => {\n try {\n const state = getState();\n const {provider} = state.settings;\n\n await provider.create(login);\n const allData = provider.getAll(login);\n const data: any =\n allData instanceof Promise\n ? await wrapApiPromiseByToaster(allData, {\n toasterName: 'reload-user-settings',\n skipSuccessToast: true,\n errorContent: 'Cannot load user settings',\n })\n : allData;\n dispatch({type: UPDATE_SETTING_DATA, data});\n } catch (e) {}\n };\n}\n"],"mappings":";;;;;;;;;;;;AAGA,IAAAA,SAAA,GAAAC,OAAA;AAGA,IAAAC,MAAA,GAAAD,OAAA;AAKA,IAAAE,MAAA,GAAAF,OAAA;AAA8E,SAAAG,uBAAAC,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAE9E,SAASG,QAAQA,CAACC,MAAc,EAAEC,IAAY,EAAE;EAC5CC,OAAO,CAACC,KAAK,CAAC,6DAA6D,EAAEH,MAAM,EAAEC,IAAI,CAAC;AAC9F;AASO,SAASG,UAAUA,CACtBC,WAAmB,EACnBC,SAAoB,EACpBC,KAAQ,EACW;EACnB,OAAO,UA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AAA;YAAA;YAAAF,QAAA,CAAAE,IAAA;YAAA,OACd,IAAAI,8BAAuB,EAACT,OAAO,EAAE;cACnCU,WAAW,EAAE,sBAAsB;cACnCC,gBAAgB,EAAE,IAAI;cACtBC,YAAY,EAAE;YAClB,CAAC,CAAC;UAAA;YAAAT,QAAA,CAAAU,EAAA,GAAAV,QAAA,CAAAW,IAAA;YAAAX,QAAA,CAAAE,IAAA;YAAA;UAAA;YAAAF,QAAA,CAAAU,EAAA,GACFb,OAAO;UAAA;YAPXzB,IAAS,GAAA4B,QAAA,CAAAU,EAAA;YAQf/C,QAAQ,CAAC;cAACa,IAAI,EAAEoC,0BAAmB;cAAExC,IAAI,EAAJA;YAAI,CAAC,CAAC;YAAC4B,QAAA,CAAAE,IAAA;YAAA;UAAA;YAAAF,QAAA,CAAAC,IAAA;YAAAD,QAAA,CAAAa,EAAA,GAAAb,QAAA;UAAA;UAAA;YAAA,OAAAA,QAAA,CAAAc,IAAA;QAAA;MAAA,GAAAnB,OAAA;IAAA,CAEnD;IAAA,iBAAAoB,EAAA,EAAAC,GAAA;MAAA,OAAAzB,IAAA,CAAA0B,KAAA,OAAAC,SAAA;IAAA;EAAA;AACL"}
|
@@ -114,7 +114,7 @@ function updatePoolChild(data, cypressData, type, treeResources) {
|
|
114
114
|
data.accumulated = _ypath.default.getValue(attributes, '/accumulated_resource_ratio_volume');
|
115
115
|
data.accumulatedCpu = _ypath.default.getValue(attributes, '/accumulated_resource_volume/cpu');
|
116
116
|
data.burstDuration = _ypath.default.getValue(attributes, '/estimated_burst_usage_duration_sec');
|
117
|
-
var fifoSortParams = (0, _map2.default)(_ypath.default.getValue(cypressAttributes, '/fifo_sort_parameters'), function (param) {
|
117
|
+
var fifoSortParams = (0, _map2.default)(_ypath.default.getValue(attributes, '/fifo_sort_parameters') || _ypath.default.getValue(cypressAttributes, '/fifo_sort_parameters'), function (param) {
|
118
118
|
return _ypath.default.getValue(param);
|
119
119
|
});
|
120
120
|
data.fifoSortParams = fifoSortParams.length > 0 ? fifoSortParams : ['start_time', 'weight', 'pending_job_count'];
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_ypath","_interopRequireDefault","require","_scheduling","_errors","obj","__esModule","default","RESOURCE_LIMIT_MAPPER","user_memory","preparePoolChildResource","data","type","treeResources","resource","attributes","name","ROOT_POOL_NAME","resources","guaranteed","ypath","getNumber","usage","min","demand","limitResource","limit","cypressAttributes","treeLimit","detailed","updatePoolChild","cypressData","getAttributes","_data$leaves","parent","console","error","_initedBy","mode","getValue","leaves","_map","leaf","child_pool_count","children","length","i","push","concat","incomplete","pool_operation_count","NaN","emptyOp","_i","_objectSpread","operationCount","maxOperationCount","maxOperationCountEdited","runningOperationCount","maxRunningOperationCount","maxRunningOperationCountEdited","id","starvation_status","weight","weightEdited","minShareRatio","maxShareRatio","fairShareRatio","fifoIndex","usageRatio","demandRatio","isEphemeral","getBoolean","integralType","userDefinedBurstCPU","burstCPU","userDefinedFlowCPU","flowCPU","userDefinedFlowGPU","flowGPU","accumulated","accumulatedCpu","burstDuration","fifoSortParams","param","abc","forbidImmediateOperations","createEphemeralSubpools","dominantResource","e","appendInnerErrors","message"],"sources":["pool-child.js"],"sourcesContent":["import _ from 'lodash';\nimport ypath from '../../common/thor/ypath';\nimport {ROOT_POOL_NAME} from '../../constants/scheduling';\nimport {appendInnerErrors} from '../errors';\n\nconst RESOURCE_LIMIT_MAPPER = {\n user_memory: 'memory',\n};\n\nfunction preparePoolChildResource(data, type, treeResources, resource) {\n const attributes = data.attributes;\n\n if (data.name === ROOT_POOL_NAME) {\n data.resources[resource] = {\n guaranteed: ypath.getNumber(treeResources, '/resource_limits/' + resource),\n usage: ypath.getNumber(treeResources, '/resource_usage/' + resource),\n };\n } else {\n const min = ypath.getNumber(attributes, '/strong_guarantee_resources/' + resource);\n const usage = ypath.getNumber(attributes, '/resource_usage/' + resource);\n const demand = ypath.getNumber(attributes, '/resource_demand/' + resource);\n const guaranteed = ypath.getNumber(\n attributes,\n '/promised_fair_share_resources/' + resource,\n );\n\n const limitResource = RESOURCE_LIMIT_MAPPER[resource] || resource;\n const limit = ypath.getNumber(data.cypressAttributes, '/resource_limits/' + limitResource);\n\n const treeLimit = ypath.getNumber(treeResources, '/resource_limits/' + resource);\n const detailed =\n treeLimit * ypath.getNumber(attributes, '/detailed_fair_share/total/' + limitResource);\n\n data.resources[resource] = {\n min,\n guaranteed,\n usage,\n demand,\n limit,\n detailed,\n };\n }\n\n return data;\n}\n\nexport function updatePoolChild(data, cypressData, type, treeResources) {\n try {\n const attributes = data.attributes;\n const cypressAttributes = ypath.getAttributes(cypressData);\n\n data.cypressAttributes = cypressAttributes;\n data.type = type;\n\n if (data.type === 'pool') {\n if (typeof attributes === 'undefined' && data.parent) {\n console.error(\n 'Pool \"%s\" without attributes inited by \"%s\"',\n data.name,\n data._initedBy,\n );\n }\n\n data.mode = ypath.getValue(attributes, '/mode');\n\n data.leaves = _.map(data.leaves, (leaf) => {\n return updatePoolChild(leaf, {}, 'operation', treeResources);\n });\n\n const child_pool_count = ypath.getNumber(attributes, '/child_pool_count');\n if (child_pool_count > 0 && !data.children.length) {\n for (let i = 0; i < child_pool_count; ++i) {\n data.children.push({\n parent: data.name,\n type: 'pool',\n name: `#key_${data.name}_${i}`,\n attributes: {},\n leaves: [],\n incomplete: true,\n });\n }\n }\n\n if (!data.leaves?.length) {\n data.pool_operation_count = ypath.getNumber(\n attributes,\n '/pool_operation_count',\n NaN,\n );\n if (data.pool_operation_count > 0) {\n const emptyOp = updatePoolChild(\n {attributes: {}},\n {},\n 'operation',\n treeResources,\n );\n data.leaves = [];\n for (let i = 0; i < data.pool_operation_count; ++i) {\n data.leaves.push({\n ...emptyOp,\n name: `##fake_operation_${data.name}_${i}`,\n });\n }\n }\n }\n\n // Operations\n data.operationCount = ypath.getNumber(attributes, '/operation_count');\n data.maxOperationCount = ypath.getNumber(attributes, '/max_operation_count');\n data.maxOperationCountEdited = ypath.getNumber(\n cypressAttributes,\n '/max_operation_count',\n );\n data.runningOperationCount = ypath.getNumber(attributes, '/running_operation_count');\n data.maxRunningOperationCount = ypath.getNumber(\n attributes,\n '/max_running_operation_count',\n );\n data.maxRunningOperationCountEdited = ypath.getNumber(\n cypressAttributes,\n '/max_running_operation_count',\n );\n }\n\n data.id = data.name;\n data.starvation_status = ypath.getValue(attributes, '/starvation_status');\n\n // General\n data.weight = ypath.getNumber(attributes, '/weight');\n data.weightEdited = ypath.getNumber(cypressAttributes, '/weight');\n data.minShareRatio = ypath.getNumber(attributes, '/min_share_ratio');\n data.maxShareRatio = ypath.getNumber(attributes, '/max_share_ratio');\n data.fairShareRatio = ypath.getNumber(attributes, '/fair_share_ratio');\n data.fifoIndex = ypath.getNumber(attributes, '/fifo_index');\n data.usageRatio = ypath.getNumber(attributes, '/usage_ratio');\n data.demandRatio = ypath.getNumber(attributes, '/demand_ratio');\n data.isEphemeral = ypath.getBoolean(attributes, '/is_ephemeral');\n\n data.integralType = ypath.getValue(attributes, '/integral_guarantee_type');\n const userDefinedBurstCPU = ypath.getNumber(\n cypressAttributes,\n '/integral_guarantees/burst_guarantee_resources/cpu',\n NaN,\n );\n data.burstCPU = ypath.getNumber(\n attributes,\n '/specified_burst_guarantee_resources/cpu',\n userDefinedBurstCPU,\n );\n const userDefinedFlowCPU = ypath.getNumber(\n cypressAttributes,\n '/integral_guarantees/resource_flow/cpu',\n NaN,\n );\n data.flowCPU = ypath.getNumber(\n attributes,\n '/specified_resource_flow/cpu',\n userDefinedFlowCPU,\n );\n const userDefinedFlowGPU = ypath.getNumber(\n cypressAttributes,\n '/integral_guarantees/resource_flow/gpu',\n NaN,\n );\n data.flowGPU = ypath.getNumber(\n attributes,\n '/specified_resource_flow/gpu',\n userDefinedFlowGPU,\n );\n\n data.accumulated = ypath.getValue(attributes, '/accumulated_resource_ratio_volume');\n data.accumulatedCpu = ypath.getValue(attributes, '/accumulated_resource_volume/cpu');\n data.burstDuration = ypath.getValue(attributes, '/estimated_burst_usage_duration_sec');\n\n const fifoSortParams = _.map(\n ypath.getValue(cypressAttributes, '/fifo_sort_parameters'),\n (param) => ypath.getValue(param),\n );\n data.fifoSortParams =\n fifoSortParams.length > 0\n ? fifoSortParams\n : ['start_time', 'weight', 'pending_job_count'];\n data.abc = ypath.getValue(attributes, '/abc') || {};\n data.forbidImmediateOperations =\n ypath.getBoolean(cypressAttributes, '/forbid_immediate_operations') || false;\n data.createEphemeralSubpools =\n ypath.getBoolean(cypressAttributes, '/create_ephemeral_subpools') || false;\n\n // Resources\n data.dominantResource = ypath.getValue(attributes, '/dominant_resource');\n\n data.resources = {};\n\n preparePoolChildResource(data, type, treeResources, 'cpu');\n preparePoolChildResource(data, type, treeResources, 'user_memory');\n preparePoolChildResource(data, type, treeResources, 'gpu');\n preparePoolChildResource(data, type, treeResources, 'user_slots');\n\n return data;\n } catch (e) {\n throw appendInnerErrors(e, {\n message: `An error occured while parsing pool \"${data.name}\" data.`,\n });\n }\n}\n"],"mappings":";;;;;;;;AACA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAA2C,SAAAD,uBAAAI,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAE3C,IAAMG,qBAAqB,GAAG;EAC1BC,WAAW,EAAE;AACjB,CAAC;AAED,SAASC,wBAAwBA,CAACC,IAAI,EAAEC,IAAI,EAAEC,aAAa,EAAEC,QAAQ,EAAE;EACnE,IAAMC,UAAU,GAAGJ,IAAI,CAACI,UAAU;EAElC,IAAIJ,IAAI,CAACK,IAAI,KAAKC,0BAAc,EAAE;IAC9BN,IAAI,CAACO,SAAS,CAACJ,QAAQ,CAAC,GAAG;MACvBK,UAAU,EAAEC,cAAK,CAACC,SAAS,CAACR,aAAa,EAAE,mBAAmB,GAAGC,QAAQ,CAAC;MAC1EQ,KAAK,EAAEF,cAAK,CAAC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,IAAI,KAAK;IAChFhB,IAAI,CAAC4E,uBAAuB,GACxBnE,cAAK,CAACoD,UAAU,CAAC7C,iBAAiB,EAAE,4BAA4B,CAAC,IAAI,KAAK;;IAE9E;IACAhB,IAAI,CAAC6E,gBAAgB,GAAGpE,cAAK,CAACmB,QAAQ,CAACxB,UAAU,EAAE,oBAAoB,CAAC;IAExEJ,IAAI,CAACO,SAAS,GAAG,CAAC,CAAC;IAEnBR,wBAAwB,CAACC,IAAI,EAAEC,IAAI,EAAEC,aAAa,EAAE,KAAK,CAAC;IAC1DH,wBAAwB,CAACC,IAAI,EAAEC,IAAI,EAAEC,aAAa,EAAE,aAAa,CAAC;IAClEH,wBAAwB,CAACC,IAAI,EAAEC,IAAI,EAAEC,aAAa,EAAE,KAAK,CAAC;IAC1DH,wBAAwB,CAACC,IAAI,EAAEC,IAAI,EAAEC,aAAa,EAAE,YAAY,CAAC;IAEjE,OAAOF,IAAI;EACf,CAAC,CAAC,OAAO8E,CAAC,EAAE;IACR,MAAM,IAAAC,yBAAiB,EAACD,CAAC,EAAE;MACvBE,OAAO,2CAAA3C,MAAA,CAA0CrC,IAAI,CAACK,IAAI;IAC9D,CAAC,CAAC;EACN;AACJ"}
|
1
|
+
{"version":3,"names":["_ypath","_interopRequireDefault","require","_scheduling","_errors","obj","__esModule","default","RESOURCE_LIMIT_MAPPER","user_memory","preparePoolChildResource","data","type","treeResources","resource","attributes","name","ROOT_POOL_NAME","resources","guaranteed","ypath","getNumber","usage","min","demand","limitResource","limit","cypressAttributes","treeLimit","detailed","updatePoolChild","cypressData","getAttributes","_data$leaves","parent","console","error","_initedBy","mode","getValue","leaves","_map","leaf","child_pool_count","children","length","i","push","concat","incomplete","pool_operation_count","NaN","emptyOp","_i","_objectSpread","operationCount","maxOperationCount","maxOperationCountEdited","runningOperationCount","maxRunningOperationCount","maxRunningOperationCountEdited","id","starvation_status","weight","weightEdited","minShareRatio","maxShareRatio","fairShareRatio","fifoIndex","usageRatio","demandRatio","isEphemeral","getBoolean","integralType","userDefinedBurstCPU","burstCPU","userDefinedFlowCPU","flowCPU","userDefinedFlowGPU","flowGPU","accumulated","accumulatedCpu","burstDuration","fifoSortParams","param","abc","forbidImmediateOperations","createEphemeralSubpools","dominantResource","e","appendInnerErrors","message"],"sources":["pool-child.js"],"sourcesContent":["import _ from 'lodash';\nimport ypath from '../../common/thor/ypath';\nimport {ROOT_POOL_NAME} from '../../constants/scheduling';\nimport {appendInnerErrors} from '../errors';\n\nconst RESOURCE_LIMIT_MAPPER = {\n user_memory: 'memory',\n};\n\nfunction preparePoolChildResource(data, type, treeResources, resource) {\n const attributes = data.attributes;\n\n if (data.name === ROOT_POOL_NAME) {\n data.resources[resource] = {\n guaranteed: ypath.getNumber(treeResources, '/resource_limits/' + resource),\n usage: ypath.getNumber(treeResources, '/resource_usage/' + resource),\n };\n } else {\n const min = ypath.getNumber(attributes, '/strong_guarantee_resources/' + resource);\n const usage = ypath.getNumber(attributes, '/resource_usage/' + resource);\n const demand = ypath.getNumber(attributes, '/resource_demand/' + resource);\n const guaranteed = ypath.getNumber(\n attributes,\n '/promised_fair_share_resources/' + resource,\n );\n\n const limitResource = RESOURCE_LIMIT_MAPPER[resource] || resource;\n const limit = ypath.getNumber(data.cypressAttributes, '/resource_limits/' + limitResource);\n\n const treeLimit = ypath.getNumber(treeResources, '/resource_limits/' + resource);\n const detailed =\n treeLimit * ypath.getNumber(attributes, '/detailed_fair_share/total/' + limitResource);\n\n data.resources[resource] = {\n min,\n guaranteed,\n usage,\n demand,\n limit,\n detailed,\n };\n }\n\n return data;\n}\n\nexport function updatePoolChild(data, cypressData, type, treeResources) {\n try {\n const attributes = data.attributes;\n const cypressAttributes = ypath.getAttributes(cypressData);\n\n data.cypressAttributes = cypressAttributes;\n data.type = type;\n\n if (data.type === 'pool') {\n if (typeof attributes === 'undefined' && data.parent) {\n console.error(\n 'Pool \"%s\" without attributes inited by \"%s\"',\n data.name,\n data._initedBy,\n );\n }\n\n data.mode = ypath.getValue(attributes, '/mode');\n\n data.leaves = _.map(data.leaves, (leaf) => {\n return updatePoolChild(leaf, {}, 'operation', treeResources);\n });\n\n const child_pool_count = ypath.getNumber(attributes, '/child_pool_count');\n if (child_pool_count > 0 && !data.children.length) {\n for (let i = 0; i < child_pool_count; ++i) {\n data.children.push({\n parent: data.name,\n type: 'pool',\n name: `#key_${data.name}_${i}`,\n attributes: {},\n leaves: [],\n incomplete: true,\n });\n }\n }\n\n if (!data.leaves?.length) {\n data.pool_operation_count = ypath.getNumber(\n attributes,\n '/pool_operation_count',\n NaN,\n );\n if (data.pool_operation_count > 0) {\n const emptyOp = updatePoolChild(\n {attributes: {}},\n {},\n 'operation',\n treeResources,\n );\n data.leaves = [];\n for (let i = 0; i < data.pool_operation_count; ++i) {\n data.leaves.push({\n ...emptyOp,\n name: `##fake_operation_${data.name}_${i}`,\n });\n }\n }\n }\n\n // Operations\n data.operationCount = ypath.getNumber(attributes, '/operation_count');\n data.maxOperationCount = ypath.getNumber(attributes, '/max_operation_count');\n data.maxOperationCountEdited = ypath.getNumber(\n cypressAttributes,\n '/max_operation_count',\n );\n data.runningOperationCount = ypath.getNumber(attributes, '/running_operation_count');\n data.maxRunningOperationCount = ypath.getNumber(\n attributes,\n '/max_running_operation_count',\n );\n data.maxRunningOperationCountEdited = ypath.getNumber(\n cypressAttributes,\n '/max_running_operation_count',\n );\n }\n\n data.id = data.name;\n data.starvation_status = ypath.getValue(attributes, '/starvation_status');\n\n // General\n data.weight = ypath.getNumber(attributes, '/weight');\n data.weightEdited = ypath.getNumber(cypressAttributes, '/weight');\n data.minShareRatio = ypath.getNumber(attributes, '/min_share_ratio');\n data.maxShareRatio = ypath.getNumber(attributes, '/max_share_ratio');\n data.fairShareRatio = ypath.getNumber(attributes, '/fair_share_ratio');\n data.fifoIndex = ypath.getNumber(attributes, '/fifo_index');\n data.usageRatio = ypath.getNumber(attributes, '/usage_ratio');\n data.demandRatio = ypath.getNumber(attributes, '/demand_ratio');\n data.isEphemeral = ypath.getBoolean(attributes, '/is_ephemeral');\n\n data.integralType = ypath.getValue(attributes, '/integral_guarantee_type');\n const userDefinedBurstCPU = ypath.getNumber(\n cypressAttributes,\n '/integral_guarantees/burst_guarantee_resources/cpu',\n NaN,\n );\n data.burstCPU = ypath.getNumber(\n attributes,\n '/specified_burst_guarantee_resources/cpu',\n userDefinedBurstCPU,\n );\n const userDefinedFlowCPU = ypath.getNumber(\n cypressAttributes,\n '/integral_guarantees/resource_flow/cpu',\n NaN,\n );\n data.flowCPU = ypath.getNumber(\n attributes,\n '/specified_resource_flow/cpu',\n userDefinedFlowCPU,\n );\n const userDefinedFlowGPU = ypath.getNumber(\n cypressAttributes,\n '/integral_guarantees/resource_flow/gpu',\n NaN,\n );\n data.flowGPU = ypath.getNumber(\n attributes,\n '/specified_resource_flow/gpu',\n userDefinedFlowGPU,\n );\n\n data.accumulated = ypath.getValue(attributes, '/accumulated_resource_ratio_volume');\n data.accumulatedCpu = ypath.getValue(attributes, '/accumulated_resource_volume/cpu');\n data.burstDuration = ypath.getValue(attributes, '/estimated_burst_usage_duration_sec');\n\n const fifoSortParams = _.map(\n ypath.getValue(attributes, '/fifo_sort_parameters') ||\n ypath.getValue(cypressAttributes, '/fifo_sort_parameters'),\n (param) => ypath.getValue(param),\n );\n data.fifoSortParams =\n fifoSortParams.length > 0\n ? fifoSortParams\n : ['start_time', 'weight', 'pending_job_count'];\n data.abc = ypath.getValue(attributes, '/abc') || {};\n data.forbidImmediateOperations =\n ypath.getBoolean(cypressAttributes, '/forbid_immediate_operations') || false;\n data.createEphemeralSubpools =\n ypath.getBoolean(cypressAttributes, '/create_ephemeral_subpools') || false;\n\n // Resources\n data.dominantResource = ypath.getValue(attributes, '/dominant_resource');\n\n data.resources = {};\n\n preparePoolChildResource(data, type, treeResources, 'cpu');\n preparePoolChildResource(data, type, treeResources, 'user_memory');\n preparePoolChildResource(data, type, treeResources, 'gpu');\n preparePoolChildResource(data, type, treeResources, 'user_slots');\n\n return data;\n } catch (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EAAEC,aAAa,EAAE,KAAK,CAAC;IAC1DH,wBAAwB,CAACC,IAAI,EAAEC,IAAI,EAAEC,aAAa,EAAE,YAAY,CAAC;IAEjE,OAAOF,IAAI;EACf,CAAC,CAAC,OAAO8E,CAAC,EAAE;IACR,MAAM,IAAAC,yBAAiB,EAACD,CAAC,EAAE;MACvBE,OAAO,2CAAA3C,MAAA,CAA0CrC,IAAI,CAACK,IAAI;IAC9D,CAAC,CAAC;EACN;AACJ"}
|
@@ -2,12 +2,13 @@ import {AppConfig, AppContext} from '@gravity-ui/nodekit';
|
|
2
2
|
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
3
3
|
import {Request, Response} from '@gravity-ui/expresskit';
|
4
4
|
import {MetrikaCounter} from '@gravity-ui/app-layout';
|
5
|
-
import {UISettings} from 'shared/ui-settings';
|
6
|
-
import {Settings} from '../shared/constants/settings-types';
|
7
5
|
import type {NodeKit} from '@gravity-ui/nodekit';
|
8
6
|
|
9
7
|
import {ClusterConfig} from '@ytsaurus/ui/build/cjs/shared/yt-types';
|
10
8
|
|
9
|
+
import {UISettings} from '../../shared/ui-settings';
|
10
|
+
import {Settings} from '../shared/constants/settings-types';
|
11
|
+
|
11
12
|
export interface YTCoreConfig {
|
12
13
|
/**
|
13
14
|
* Path to the file with OAuth-token of special-user ("the OAuthRobot" below) in format: {"oauthToken": "******"}
|
@@ -21,7 +21,8 @@ var localModeConfig = {
|
|
21
21
|
uploadTableMaxSize: 50 * 1024 * 1024,
|
22
22
|
uploadTableUseLocalmode: true,
|
23
23
|
queryTrackerStage: 'testing',
|
24
|
-
directDownload: false
|
24
|
+
directDownload: false,
|
25
|
+
reportBugUrl: 'https://github.com/ytsaurus/ytsaurus-ui/issues/new'
|
25
26
|
},
|
26
27
|
userSettingsConfig: {
|
27
28
|
cluster: YT_LOCAL_CLUSTER_ID,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["typeis","AuthPolicy","YT_LOCAL_CLUSTER_ID","localModeConfig","appAuthPolicy","disabled","ytInterfaceSecret","undefined","expressBodyParserJSONConfig","limit","type","req","_req$url","_req$url2","url","startsWith","Boolean","uiSettings","newTableReplicasCount","uploadTableMaxSize","uploadTableUseLocalmode","queryTrackerStage","directDownload","userSettingsConfig","cluster","mapNodePath"],"sources":["local.ts"],"sourcesContent":["import typeis from 'type-is';\n\nimport {AuthPolicy} from '@gravity-ui/expresskit';\nimport {AppConfig} from '@gravity-ui/nodekit';\nimport {YT_LOCAL_CLUSTER_ID} from '../../shared/constants';\n\nconst localModeConfig: Partial<AppConfig> = {\n appAuthPolicy: AuthPolicy.disabled,\n ytInterfaceSecret: undefined,\n\n expressBodyParserJSONConfig: {\n limit: '51mb',\n type(req) {\n // Enable raw parser for all content-types on yt-api for piping requests\n if (req.url?.startsWith('/api/yt/')) return false;\n if (req.url?.startsWith('/localmode/api/yt/')) return false;\n\n // Simulate default logic given that 'type' option is 'application/json'\n return Boolean(typeis(req, 'application/json'));\n },\n },\n\n uiSettings: {\n newTableReplicasCount: 1,\n uploadTableMaxSize: 50 * 1024 * 1024,\n uploadTableUseLocalmode: true,\n queryTrackerStage: 'testing',\n\n directDownload: false,\n },\n\n userSettingsConfig: {\n cluster: YT_LOCAL_CLUSTER_ID,\n mapNodePath: '//tmp',\n },\n};\n\nexport default localModeConfig;\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,SAAS;AAE5B,SAAQC,UAAU,QAAO,wBAAwB;AAEjD,SAAQC,mBAAmB,QAAO,wBAAwB;AAE1D,IAAMC,eAAmC,GAAG;EACxCC,aAAa,EAAEH,UAAU,CAACI,QAAQ;EAClCC,iBAAiB,EAAEC,SAAS;EAE5BC,2BAA2B,EAAE;IACzBC,KAAK,EAAE,MAAM;IACbC,IAAI,WAAAA,KAACC,GAAG,EAAE;MAAA,IAAAC,QAAA,EAAAC,SAAA;MACN;MACA,KAAAD,QAAA,GAAID,GAAG,CAACG,GAAG,cAAAF,QAAA,eAAPA,QAAA,CAASG,UAAU,CAAC,UAAU,CAAC,EAAE,OAAO,KAAK;MACjD,KAAAF,SAAA,GAAIF,GAAG,CAACG,GAAG,cAAAD,SAAA,eAAPA,SAAA,CAASE,UAAU,CAAC,oBAAoB,CAAC,EAAE,OAAO,KAAK;;MAE3D;MACA,OAAOC,OAAO,CAAChB,MAAM,CAACW,GAAG,EAAE,kBAAkB,CAAC,CAAC;IACnD;EACJ,CAAC;EAEDM,UAAU,EAAE;IACRC,qBAAqB,EAAE,CAAC;IACxBC,kBAAkB,EAAE,EAAE,GAAG,IAAI,GAAG,IAAI;IACpCC,uBAAuB,EAAE,IAAI;IAC7BC,iBAAiB,EAAE,SAAS;IAE5BC,cAAc,EAAE;
|
1
|
+
{"version":3,"names":["typeis","AuthPolicy","YT_LOCAL_CLUSTER_ID","localModeConfig","appAuthPolicy","disabled","ytInterfaceSecret","undefined","expressBodyParserJSONConfig","limit","type","req","_req$url","_req$url2","url","startsWith","Boolean","uiSettings","newTableReplicasCount","uploadTableMaxSize","uploadTableUseLocalmode","queryTrackerStage","directDownload","reportBugUrl","userSettingsConfig","cluster","mapNodePath"],"sources":["local.ts"],"sourcesContent":["import typeis from 'type-is';\n\nimport {AuthPolicy} from '@gravity-ui/expresskit';\nimport {AppConfig} from '@gravity-ui/nodekit';\nimport {YT_LOCAL_CLUSTER_ID} from '../../shared/constants';\n\nconst localModeConfig: Partial<AppConfig> = {\n appAuthPolicy: AuthPolicy.disabled,\n ytInterfaceSecret: undefined,\n\n expressBodyParserJSONConfig: {\n limit: '51mb',\n type(req) {\n // Enable raw parser for all content-types on yt-api for piping requests\n if (req.url?.startsWith('/api/yt/')) return false;\n if (req.url?.startsWith('/localmode/api/yt/')) return false;\n\n // Simulate default logic given that 'type' option is 'application/json'\n return Boolean(typeis(req, 'application/json'));\n },\n },\n\n uiSettings: {\n newTableReplicasCount: 1,\n uploadTableMaxSize: 50 * 1024 * 1024,\n uploadTableUseLocalmode: true,\n queryTrackerStage: 'testing',\n\n directDownload: false,\n\n reportBugUrl: 'https://github.com/ytsaurus/ytsaurus-ui/issues/new',\n },\n\n userSettingsConfig: {\n cluster: YT_LOCAL_CLUSTER_ID,\n mapNodePath: '//tmp',\n },\n};\n\nexport default localModeConfig;\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,SAAS;AAE5B,SAAQC,UAAU,QAAO,wBAAwB;AAEjD,SAAQC,mBAAmB,QAAO,wBAAwB;AAE1D,IAAMC,eAAmC,GAAG;EACxCC,aAAa,EAAEH,UAAU,CAACI,QAAQ;EAClCC,iBAAiB,EAAEC,SAAS;EAE5BC,2BAA2B,EAAE;IACzBC,KAAK,EAAE,MAAM;IACbC,IAAI,WAAAA,KAACC,GAAG,EAAE;MAAA,IAAAC,QAAA,EAAAC,SAAA;MACN;MACA,KAAAD,QAAA,GAAID,GAAG,CAACG,GAAG,cAAAF,QAAA,eAAPA,QAAA,CAASG,UAAU,CAAC,UAAU,CAAC,EAAE,OAAO,KAAK;MACjD,KAAAF,SAAA,GAAIF,GAAG,CAACG,GAAG,cAAAD,SAAA,eAAPA,SAAA,CAASE,UAAU,CAAC,oBAAoB,CAAC,EAAE,OAAO,KAAK;;MAE3D;MACA,OAAOC,OAAO,CAAChB,MAAM,CAACW,GAAG,EAAE,kBAAkB,CAAC,CAAC;IACnD;EACJ,CAAC;EAEDM,UAAU,EAAE;IACRC,qBAAqB,EAAE,CAAC;IACxBC,kBAAkB,EAAE,EAAE,GAAG,IAAI,GAAG,IAAI;IACpCC,uBAAuB,EAAE,IAAI;IAC7BC,iBAAiB,EAAE,SAAS;IAE5BC,cAAc,EAAE,KAAK;IAErBC,YAAY,EAAE;EAClB,CAAC;EAEDC,kBAAkB,EAAE;IAChBC,OAAO,EAAEvB,mBAAmB;IAC5BwB,WAAW,EAAE;EACjB;AACJ,CAAC;AAED,eAAevB,eAAe"}
|
@@ -12,6 +12,7 @@ export interface UISettings {
|
|
12
12
|
trackerBaseUrl?: string;
|
13
13
|
trackerQuoteRequestQueue?: string;
|
14
14
|
trackerAdminRequestQueue?: string;
|
15
|
+
reportBugUrl?: string;
|
15
16
|
datalensBaseUrl?: string;
|
16
17
|
datalensAllowedCluster?: Array<string>;
|
17
18
|
announcesMailListUrl?: string;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["uiSettingFromEnv","uploadTableExcelBaseUrl","process","env","YTFRONT_UPLOAD_EXCEL_BASE_URL","exportTableBaseUrl","YTFRONT_EXPORT_EXCEL_BASE_URL","jupyterBasePath","YTFRONT_JUPYTER_BASE_URL"],"sources":["ui-settings.ts"],"sourcesContent":["export interface UISettings {\n accessLogBasePath?: string;\n accountsUsageBasePath?: string;\n docsBaseUrl?: string;\n jupyterBasePath?: string;\n\n newTableReplicasCount: number;\n\n uploadTableMaxSize: number;\n uploadTableUseLocalmode?: boolean;\n\n uploadTableExcelBaseUrl?: string;\n exportTableBaseUrl?: string;\n\n directDownload?: boolean;\n\n trackerBaseUrl?: string;\n trackerQuoteRequestQueue?: string;\n trackerAdminRequestQueue?: string;\n\n datalensBaseUrl?: string;\n datalensAllowedCluster?: Array<string>;\n\n announcesMailListUrl?: string;\n\n sslCertFixUrl?: string;\n queryTrackerStage?: string;\n queryTrackerCluster?: string;\n\n oauthTokenUrl?: string;\n\n defaultFontType?: keyof Required<UISettings>['fontTypes'];\n\n fontTypes?: Record<string, {regular: string; monospace: string}>;\n\n /**\n * schedulingMonitoring.urlTemplate supports following parameters: {ytCluster}, {ytPool}, {ytPoolTree}.\n * All the parameters are optional and they are replaced with corresponding values.\n * @example {urlTemplate: 'https://my.monitoring.service/scheduling?cluster={ytCluster}&pool={ytPool}&poolTree={ytPoolTree}'}\n */\n schedulingMonitoring?: UISettingsMonitoring;\n\n /**\n * accountsMonitoring.urlTemplate supports following parameters: {ytCluster}, {ytAccount}\n * All the parameters are optional and they are replaced with corresponding values.\n * @example {urlTemplate: 'https://my.monitoring.service/accounts?cluster={ytCluster}&account={ytAccount}'}\n */\n accountsMonitoring?: UISettingsMonitoring;\n\n /**\n * bundlesMonitoring.urlTemplate supports following parameters: {ytCluster}, {ytTabletCellBundle}\n * All the parameters are optional and they are replaced with corresponding values.\n * @example {urlTemplate: 'https://my.monitoring.service/bundles?cluster={ytCluster}&account={ytTabletCellBundle}'}\n */\n bundlesMonitoring?: UISettingsMonitoring;\n\n /**\n * operationsMonitoring.urlTemplate supports following parameters:\n * {ytCluster}, {ytOperationId}, {ytPool}, {ytPoolTree}, {ytSlotIndex}, {fromTimeMs}, {toTimeMs}\n * All the parameters are optional and they are replaced with corresponding values.\n * @example {\n * urlTemplate:\n * 'https://my.monitoring.service/operations?cluster={ytCluster}&operationId={ytOperationId}&pool={ytPool}&tree={ytPoolTree}&slot={ytSlotIndex}&from={fromTimeMs}&to={toTimeMs}'\n * }\n */\n operationsMonitoring?: UISettingsMonitoring;\n\n /**\n * chytMonitoring.urlTemplate supports following parameters:\n * - {ytCluster}\n * - {chytAlias}\n * All the parameters are optional and the are replaced with corresponding values\n * @example {\n * urlTemplate: `https://my.monitoring.service/chyt?cluster={ytCluster}&alias={chytAlias}`\n * }\n */\n chytMonitoring?: UISettingsMonitoring;\n\n /**\n * Allows to define regular expression to extract hash-part from version of node by named group 'hash'\n * @example reHashFromNodeVersion: '[^~]+(?<hash>[^+]+)'\n */\n reHashFromNodeVersion?: string;\n\n /**\n * Allows to define regular expression to extract short-name from full address of host by named group 'shortname'.\n * Also it supports optional named group 'suffix' that will pe appended to shortname as is.\n * @example reShortNameFromAddress: '(?<shortname>.*)((\\\\.msk\\\\.my-domain\\\\.ru)|(\\\\.vla\\\\.my-domain\\\\.net))'\n * @example reShortNameFromAddress: '(?<shortname>.*)((\\\\.msk\\\\.my-domain\\\\.ru)|(\\\\.vla\\\\.my-domain\\\\.net))'\n */\n reShortNameFromAddress?: string;\n\n /**\n * Allows to override behavior of `reShortNameFromAddress` for tablet/bundles/cells specific parts of UI.\n * @example reShortNameFromTabletNodeAddress: '(?<shortname>[^-]+-[^-]+).*'\n */\n reShortNameFromTabletNodeAddress?: string;\n\n /**\n * Allows to define array of regexps for allowed urls of TaggedType of unipika to display media-content (audio/video/images).\n * If there are no matched items in the array the TaggedType-item will be displayed as a json-object.\n * @expamle\n * reUnipikaAllowTaggedSources: [\n * \"https:\\\\/\\\\/image\\\\.bank\\\\.my\\\\/fruits\\\\/\",\n * \"https:\\\\/\\\\/image\\\\.bank\\\\.my\\\\/vegetables\\\\/\"\n * ]\n */\n reUnipikaAllowTaggedSources: Array<string>;\n\n /**\n * Allows to define service for removing 'Referer' header for url-s on a page.\n *\n * See `@gravity-ui/unipika v3.0.0` details in [CHANGELOG.md](https://github.com/gravity-ui/unipika/blob/main/CHANGELOG.md).\n */\n hideReferrerUrl?: string;\n}\n\nexport interface UISettingsMonitoring {\n urlTemplate: string;\n title?: string;\n}\n\nexport const uiSettingFromEnv: Partial<UISettings> = {\n uploadTableExcelBaseUrl: process.env.YTFRONT_UPLOAD_EXCEL_BASE_URL,\n exportTableBaseUrl: process.env.YTFRONT_EXPORT_EXCEL_BASE_URL,\n jupyterBasePath: process.env.YTFRONT_JUPYTER_BASE_URL,\n};\n"],"mappings":"
|
1
|
+
{"version":3,"names":["uiSettingFromEnv","uploadTableExcelBaseUrl","process","env","YTFRONT_UPLOAD_EXCEL_BASE_URL","exportTableBaseUrl","YTFRONT_EXPORT_EXCEL_BASE_URL","jupyterBasePath","YTFRONT_JUPYTER_BASE_URL"],"sources":["ui-settings.ts"],"sourcesContent":["export interface UISettings {\n accessLogBasePath?: string;\n accountsUsageBasePath?: string;\n docsBaseUrl?: string;\n jupyterBasePath?: string;\n\n newTableReplicasCount: number;\n\n uploadTableMaxSize: number;\n uploadTableUseLocalmode?: boolean;\n\n uploadTableExcelBaseUrl?: string;\n exportTableBaseUrl?: string;\n\n directDownload?: boolean;\n\n trackerBaseUrl?: string;\n trackerQuoteRequestQueue?: string;\n trackerAdminRequestQueue?: string;\n\n reportBugUrl?: string;\n\n datalensBaseUrl?: string;\n datalensAllowedCluster?: Array<string>;\n\n announcesMailListUrl?: string;\n\n sslCertFixUrl?: string;\n queryTrackerStage?: string;\n queryTrackerCluster?: string;\n\n oauthTokenUrl?: string;\n\n defaultFontType?: keyof Required<UISettings>['fontTypes'];\n\n fontTypes?: Record<string, {regular: string; monospace: string}>;\n\n /**\n * schedulingMonitoring.urlTemplate supports following parameters: {ytCluster}, {ytPool}, {ytPoolTree}.\n * All the parameters are optional and they are replaced with corresponding values.\n * @example {urlTemplate: 'https://my.monitoring.service/scheduling?cluster={ytCluster}&pool={ytPool}&poolTree={ytPoolTree}'}\n */\n schedulingMonitoring?: UISettingsMonitoring;\n\n /**\n * accountsMonitoring.urlTemplate supports following parameters: {ytCluster}, {ytAccount}\n * All the parameters are optional and they are replaced with corresponding values.\n * @example {urlTemplate: 'https://my.monitoring.service/accounts?cluster={ytCluster}&account={ytAccount}'}\n */\n accountsMonitoring?: UISettingsMonitoring;\n\n /**\n * bundlesMonitoring.urlTemplate supports following parameters: {ytCluster}, {ytTabletCellBundle}\n * All the parameters are optional and they are replaced with corresponding values.\n * @example {urlTemplate: 'https://my.monitoring.service/bundles?cluster={ytCluster}&account={ytTabletCellBundle}'}\n */\n bundlesMonitoring?: UISettingsMonitoring;\n\n /**\n * operationsMonitoring.urlTemplate supports following parameters:\n * {ytCluster}, {ytOperationId}, {ytPool}, {ytPoolTree}, {ytSlotIndex}, {fromTimeMs}, {toTimeMs}\n * All the parameters are optional and they are replaced with corresponding values.\n * @example {\n * urlTemplate:\n * 'https://my.monitoring.service/operations?cluster={ytCluster}&operationId={ytOperationId}&pool={ytPool}&tree={ytPoolTree}&slot={ytSlotIndex}&from={fromTimeMs}&to={toTimeMs}'\n * }\n */\n operationsMonitoring?: UISettingsMonitoring;\n\n /**\n * chytMonitoring.urlTemplate supports following parameters:\n * - {ytCluster}\n * - {chytAlias}\n * All the parameters are optional and the are replaced with corresponding values\n * @example {\n * urlTemplate: `https://my.monitoring.service/chyt?cluster={ytCluster}&alias={chytAlias}`\n * }\n */\n chytMonitoring?: UISettingsMonitoring;\n\n /**\n * Allows to define regular expression to extract hash-part from version of node by named group 'hash'\n * @example reHashFromNodeVersion: '[^~]+(?<hash>[^+]+)'\n */\n reHashFromNodeVersion?: string;\n\n /**\n * Allows to define regular expression to extract short-name from full address of host by named group 'shortname'.\n * Also it supports optional named group 'suffix' that will pe appended to shortname as is.\n * @example reShortNameFromAddress: '(?<shortname>.*)((\\\\.msk\\\\.my-domain\\\\.ru)|(\\\\.vla\\\\.my-domain\\\\.net))'\n * @example reShortNameFromAddress: '(?<shortname>.*)((\\\\.msk\\\\.my-domain\\\\.ru)|(\\\\.vla\\\\.my-domain\\\\.net))'\n */\n reShortNameFromAddress?: string;\n\n /**\n * Allows to override behavior of `reShortNameFromAddress` for tablet/bundles/cells specific parts of UI.\n * @example reShortNameFromTabletNodeAddress: '(?<shortname>[^-]+-[^-]+).*'\n */\n reShortNameFromTabletNodeAddress?: string;\n\n /**\n * Allows to define array of regexps for allowed urls of TaggedType of unipika to display media-content (audio/video/images).\n * If there are no matched items in the array the TaggedType-item will be displayed as a json-object.\n * @expamle\n * reUnipikaAllowTaggedSources: [\n * \"https:\\\\/\\\\/image\\\\.bank\\\\.my\\\\/fruits\\\\/\",\n * \"https:\\\\/\\\\/image\\\\.bank\\\\.my\\\\/vegetables\\\\/\"\n * ]\n */\n reUnipikaAllowTaggedSources: Array<string>;\n\n /**\n * Allows to define service for removing 'Referer' header for url-s on a page.\n *\n * See `@gravity-ui/unipika v3.0.0` details in [CHANGELOG.md](https://github.com/gravity-ui/unipika/blob/main/CHANGELOG.md).\n */\n hideReferrerUrl?: string;\n}\n\nexport interface UISettingsMonitoring {\n urlTemplate: string;\n title?: string;\n}\n\nexport const uiSettingFromEnv: Partial<UISettings> = {\n uploadTableExcelBaseUrl: process.env.YTFRONT_UPLOAD_EXCEL_BASE_URL,\n exportTableBaseUrl: process.env.YTFRONT_EXPORT_EXCEL_BASE_URL,\n jupyterBasePath: process.env.YTFRONT_JUPYTER_BASE_URL,\n};\n"],"mappings":"AA4HA,OAAO,IAAMA,gBAAqC,GAAG;EACjDC,uBAAuB,EAAEC,OAAO,CAACC,GAAG,CAACC,6BAA6B;EAClEC,kBAAkB,EAAEH,OAAO,CAACC,GAAG,CAACG,6BAA6B;EAC7DC,eAAe,EAAEL,OAAO,CAACC,GAAG,CAACK;AACjC,CAAC"}
|
@@ -266,7 +266,10 @@ export interface UIFactory {
|
|
266
266
|
login: string;
|
267
267
|
cluster?: string;
|
268
268
|
buttonToWrap?: React.ReactNode;
|
269
|
-
}, makeContent: (
|
269
|
+
}, makeContent: (params: {
|
270
|
+
supportContent?: React.ReactNode;
|
271
|
+
onSupportClick: () => void;
|
272
|
+
}) => React.ReactNode): React.ReactNode;
|
270
273
|
getComponentForConsumerMetrics(): undefined | React.ComponentType<{
|
271
274
|
cluster: string;
|
272
275
|
path: string;
|
@@ -3,6 +3,7 @@ import _objectSpread from "@babel/runtime/helpers/objectSpread2";
|
|
3
3
|
import React from 'react';
|
4
4
|
import AppNavigationPageLayout from './containers/AppNavigation/AppNavigationPageLayout';
|
5
5
|
import { defaultAclApi } from './utils/acl/external-acl-api';
|
6
|
+
import { SupportComponent } from './containers/SupportComponent/SupportComponent';
|
6
7
|
import { YTUserSuggest } from './containers/UserSuggest/YTUserSuggest';
|
7
8
|
import { docsUrls } from './constants/docsUrls';
|
8
9
|
import { YTSubjectSuggest } from './components/ACL/SubjectsControl/YTSubjectSuggest';
|
@@ -180,8 +181,14 @@ var uiFactory = {
|
|
180
181
|
renderControlAbcService: function renderControlAbcService() {
|
181
182
|
return undefined;
|
182
183
|
},
|
183
|
-
makeSupportContent: function makeSupportContent() {
|
184
|
-
|
184
|
+
makeSupportContent: function makeSupportContent(_x, makeContent) {
|
185
|
+
var reportBugUrl = uiSettings.reportBugUrl;
|
186
|
+
if (!reportBugUrl) {
|
187
|
+
return undefined;
|
188
|
+
}
|
189
|
+
return /*#__PURE__*/_jsx(SupportComponent, {
|
190
|
+
makeContent: makeContent
|
191
|
+
});
|
185
192
|
},
|
186
193
|
getComponentForConsumerMetrics: function getComponentForConsumerMetrics() {
|
187
194
|
return undefined;
|