chg: [workflowBlueprint] Don't attach module_data in blueprint by default

pull/8568/head
Sami Mokaddem 2022-08-24 09:14:17 +02:00
parent a0ace85242
commit 85c1a75830
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
2 changed files with 5 additions and 2 deletions

View File

@ -153,6 +153,9 @@ class WorkflowsController extends AppController
$modules = $this->Workflow->attachNotificationToModules($modules, $workflow);
$this->loadModel('WorkflowBlueprint');
$workflowBlueprints = $this->WorkflowBlueprint->find('all');
$workflowBlueprints = array_map(function($blueprint) {
return $this->WorkflowBlueprint->attachModuleDataToBlueprint($blueprint);
}, $workflowBlueprints);
$this->set('selectedWorkflow', $workflow);
$this->set('workflowTriggerId', $trigger_id);
$this->set('modules', $modules);

View File

@ -66,9 +66,9 @@ class WorkflowBlueprint extends AppModel
$result['WorkflowBlueprint']['data'] = '{}';
}
$results[$k]['WorkflowBlueprint']['data'] = JsonTool::decode($result['WorkflowBlueprint']['data']);
$results[$k] = $this->attachModuleDataToBlueprint($results[$k]);
$blueprint = $this->attachModuleDataToBlueprint($results[$k]);
if (!empty($results[$k]['WorkflowBlueprint']['data'])) {
$results[$k]['WorkflowBlueprint']['mermaid'] = $this->getMermaidForData($results[$k]['WorkflowBlueprint']['data']);
$results[$k]['WorkflowBlueprint']['mermaid'] = $this->getMermaidForData($blueprint['WorkflowBlueprint']['data']);
}
}
return $results;