@evergis/react 3.1.58 → 3.1.59
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/dist/react.esm.js
CHANGED
|
@@ -4838,7 +4838,7 @@ const usePythonTask = () => {
|
|
|
4838
4838
|
setTaskId(null);
|
|
4839
4839
|
setSubscriptionId(null);
|
|
4840
4840
|
}, []);
|
|
4841
|
-
const runTask = useCallback(async ({ resourceId, parameters, script, }) => {
|
|
4841
|
+
const runTask = useCallback(async ({ resourceId, parameters, script, fileName, methodName, }) => {
|
|
4842
4842
|
reset();
|
|
4843
4843
|
const start = Date.now();
|
|
4844
4844
|
let prototypeId = await api.remoteTaskManager.createTaskPrototype({
|
|
@@ -4852,6 +4852,8 @@ const usePythonTask = () => {
|
|
|
4852
4852
|
resourceId,
|
|
4853
4853
|
parameters,
|
|
4854
4854
|
script,
|
|
4855
|
+
fileName,
|
|
4856
|
+
methodName,
|
|
4855
4857
|
method: "pythonrunner/run",
|
|
4856
4858
|
},
|
|
4857
4859
|
},
|
|
@@ -6735,7 +6737,7 @@ const TaskContainer = memo(({ type, elementConfig }) => {
|
|
|
6735
6737
|
const { options } = elementConfig || {};
|
|
6736
6738
|
const { title, relatedResources, center, icon } = options || {};
|
|
6737
6739
|
const onClick = useCallback(async () => {
|
|
6738
|
-
await Promise.all(relatedResources.map(({ resourceId, parameters, script }) => {
|
|
6740
|
+
await Promise.all(relatedResources.map(({ resourceId, parameters, script, fileName, methodName }) => {
|
|
6739
6741
|
const newParams = applyQueryFilters({
|
|
6740
6742
|
parameters,
|
|
6741
6743
|
dataSources,
|
|
@@ -6743,7 +6745,7 @@ const TaskContainer = memo(({ type, elementConfig }) => {
|
|
|
6743
6745
|
filters: currentPage.filters,
|
|
6744
6746
|
geometry: ewktGeometry,
|
|
6745
6747
|
});
|
|
6746
|
-
return runTask({ resourceId, parameters: newParams, script });
|
|
6748
|
+
return runTask({ resourceId, parameters: newParams, script, fileName, methodName });
|
|
6747
6749
|
}));
|
|
6748
6750
|
}, [currentPage.filters, dataSources, ewktGeometry, relatedResources, runTask, selectedFilters]);
|
|
6749
6751
|
return (jsx(Flex, { justifyContent: center ? "center" : "flex-start", children: jsxs(WaitingButton, { primary: true, isWaiting: loading, disabled: !relatedResources?.length, onClick: onClick, children: [icon && jsx(FlexSpan, { marginRight: "0.5rem", children: jsx(Icon, { kind: icon }) }), title || t("run", { ns: "dashboard", defaultValue: "Запуск" })] }) }));
|