def get_context_data(self, **kwargs): context = super(OverviewView, self).get_context_data(**kwargs) action_execution = get_single_action_execution_data( self.request, **kwargs) if action_execution.workflow_name: action_execution.workflow_url = reverse( self.workflow_url, args=[action_execution.workflow_name]) if action_execution.task_execution_id: action_execution.task_execution_url = reverse( self.task_execution_url, args=[action_execution.task_execution_id]) if action_execution.input: action_execution.input = utils.prettyprint(action_execution.input) if action_execution.output: action_execution.output = utils.prettyprint( action_execution.output) if action_execution.state: action_execution.state = utils.label(action_execution.state) action_execution.accepted = utils.booleanfield( action_execution.accepted) breadcrumb = [(action_execution.id, reverse('horizon:mistral:action_executions:detail', args=[action_execution.id]))] context["custom_breadcrumb"] = breadcrumb context['action_execution'] = action_execution return context
def get_context_data(self, **kwargs): context = super(OverviewView, self).get_context_data(**kwargs) task = get_single_task_data(self.request, **kwargs) task.workflow_detail_url = reverse(self.workflow_detail_url, args=[task.workflow_name]) task.execution_url = reverse(self.execution_url, args=[task.workflow_execution_id]) task.result = utils.prettyprint(task.result) task.published = utils.prettyprint(task.published) task.state = utils.label(task.state) if task.type == "ACTION": task.type_url = reverse( self.action_execution_url, args=[task.id] ) elif task.type == "WORKFLOW": task.type_url = reverse( self.workflow_execution_tasks_url, args=[task.id] ) breadcrumb = [(task.id, reverse( 'horizon:mistral:tasks:detail', args=[task.id] ))] context["custom_breadcrumb"] = breadcrumb context['task'] = task return context
def get_context_data(self, **kwargs): context = super(OverviewView, self).get_context_data(**kwargs) task = get_single_task_data(self.request, **kwargs) task.workflow_url = reverse(self.workflow_url, args=[task.workflow_name]) task.execution_url = reverse(self.execution_url, args=[task.workflow_execution_id]) task.result = prettyprint(task.result) task.published = prettyprint(task.published) context['task'] = task return context
def get_context_data(self, **kwargs): context = super(CodeView, self).get_context_data(**kwargs) column = self.kwargs['column'] task = get_single_task_data(self.request, **self.kwargs) io = {} if column == 'result': io['name'] = _('Result') io['value'] = task.result = utils.prettyprint(task.result) elif column == 'published': io['name'] = _('Published') io['value'] = task.published = utils.prettyprint(task.published) context['io'] = io return context
def get_context_data(self, **kwargs): context = super(CodeView, self).get_context_data(**kwargs) column = self.kwargs['column'] task = get_single_task_data(self.request, **self.kwargs) io = {} if column == 'result': io['name'] = _('Result') io['value'] = task.result = prettyprint(task.result) elif column == 'published': io['name'] = _('Published') io['value'] = task.published = prettyprint(task.published) context['io'] = io return context
def get_context_data(self, **kwargs): context = super(DetailView, self).get_context_data(**kwargs) task = {} execution = {} if 'caller' in kwargs: if kwargs['caller'] == 'task': kwargs['task_id'] = kwargs['execution_id'] del kwargs['execution_id'] task = get_single_data( self.request, kwargs['task_id'], "task" ) execution = get_single_data( self.request, task.workflow_execution_id, ) else: execution = get_single_data( self.request, kwargs['execution_id'], ) task = get_single_data( self.request, self.kwargs['execution_id'], "task_by_execution" ) execution.workflow_url = reverse(self.workflow_url, args=[execution.workflow_name]) execution.input = utils.prettyprint(execution.input) execution.output = utils.prettyprint(execution.output) execution.params = utils.prettyprint(execution.params) execution.state = utils.label(execution.state) task.url = reverse(self.task_url, args=[execution.id]) breadcrumb = [(execution.id, reverse( 'horizon:mistral:executions:detail', args=[execution.id] ))] context["custom_breadcrumb"] = breadcrumb context['execution'] = execution context['task'] = task return context
def get_context_data(self, **kwargs): context = super(CodeView, self).get_context_data(**kwargs) execution = get_single_data( self.request, self.kwargs['execution_id'], ) column = self.kwargs['column'] io = {} if column == 'input': io['name'] = _('Input') io['value'] = execution.input = prettyprint(execution.input) elif column == 'output': io['name'] = _('Output') io['value'] = execution.output = prettyprint(execution.output) context['io'] = io return context
def get_context_data(self, **kwargs): context = super(CodeView, self).get_context_data(**kwargs) column = self.kwargs['column'] action_execution = get_single_action_execution_data( self.request, **self.kwargs) io = {} if column == 'input': io['name'] = _('Input') io['value'] = utils.prettyprint(action_execution.input) elif column == 'output': io['name'] = _('Output') io['value'] = (utils.prettyprint(action_execution.output) if action_execution.output else _("No available output yet")) context['io'] = io return context
def get_context_data(self, **kwargs): context = super(CodeView, self).get_context_data(**kwargs) execution = get_single_data( self.request, self.kwargs['execution_id'], ) column = self.kwargs['column'] io = {} if column == 'input': io['name'] = _('Input') io['value'] = execution.input = utils.prettyprint(execution.input) elif column == 'output': io['name'] = _('Output') io['value'] = execution.output = utils.prettyprint( execution.output) context['io'] = io return context
def get_context_data(self, **kwargs): context = super(DetailView, self).get_context_data(**kwargs) task = {} execution = {} if 'caller' in kwargs: if kwargs['caller'] == 'task': kwargs['task_id'] = kwargs['execution_id'] del kwargs['execution_id'] task = get_single_data( self.request, kwargs['task_id'], "task" ) execution = get_single_data( self.request, task.workflow_execution_id, ) else: execution = get_single_data( self.request, kwargs['execution_id'], ) task = get_single_data( self.request, self.kwargs['execution_id'], "task_by_execution" ) execution.workflow_url = reverse(self.workflow_url, args=[execution.workflow_name]) execution.input = prettyprint(execution.input) execution.output = prettyprint(execution.output) execution.params = prettyprint(execution.params) task.url = reverse(self.task_url, args=[execution.id]) context['execution'] = execution context['task'] = task return context