Skip to content

Commit

Permalink
fix: infinite loading on workflowlist table
Browse files Browse the repository at this point in the history
  • Loading branch information
kkdy21 committed Nov 25, 2024
1 parent 1c6a600 commit f1a1586
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
15 changes: 8 additions & 7 deletions front/src/features/workflow/workflowEditor/ui/WorkflowEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ function mapTargetModelToTaskComponent(
taskComponentList: Array<ITaskComponentInfoResponse>,
) {
const taskComponent = taskComponentList.find(
taskComponent => taskComponent.name === 'tumblebug_mci_dynamic',
taskComponent => taskComponent.name === 'beetle_task_infra_migration',
);
if (!taskComponent) {
Expand All @@ -102,10 +102,11 @@ function mapTargetModelToTaskComponent(
.defineTaskGroupStep(getRandomId(), 'TaskGroup', 'MCI', { model: {} });
const parseString = parseRequestBody(taskComponent.data.options.request_body);
parseString['vm'] = Array(targetModel.cloudInfraModel.vm?.length)
.fill(undefined)
.map(_ => JSON.parse(JSON.stringify(parseString['vm'][0])));
if (parseString && parseString['vm']) {
parseString['vm'] = Array(targetModel.cloudInfraModel.vm?.length)
.fill(undefined)
.map(_ => JSON.parse(JSON.stringify(parseString['vm'][0])));
}
if (targetModel.cloudInfraModel.vm) {
targetModel.cloudInfraModel.vm.forEach((targetVm, index) => {
Expand All @@ -116,12 +117,12 @@ function mapTargetModelToTaskComponent(
const task: ITaskResponse = {
dependencies: [],
name: 'tumblebug_mci_dynamic',
name: 'beetle_task_infra_migration',
path_params: null,
query_params: null,
request_body: JSON.stringify(parseString),
id: '',
task_component: 'tumblebug_mci_dynamic',
task_component: 'beetle_task_infra_migration',
};
const step = workflowToolModel.convertToDesignerTask(task, task.request_body);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,11 @@ watch(
:query-tag="tableModel.querySearchState.queryTag"
:select-index.sync="tableModel.tableState.selectIndex"
:page-size="tableModel.tableOptions.pageSize"
:loading="isRunLoading"
:loading="
runWorkflow.isLoading.value ||
getWorkflowList.isLoading.value ||
tableModel.tableState.loading
"
@change="tableModel.handleChange"
@refresh="handleRefreshTable"
@select="handleSelectedIndex"
Expand Down

0 comments on commit f1a1586

Please sign in to comment.