
from horizon import tables

from mistraldashboard import api
from mistraldashboard.executions.tables import ExecutionsTable
from mistraldashboard.executions.tables import TaskTable


class IndexView(tables.DataTableView):
    table_class = ExecutionsTable
    template_name = 'mistral/executions/index.html'

    def get_data(self):
        return api.execution_list(self.request)


class TaskView(tables.DataTableView):
    table_class = TaskTable
    template_name = 'mistral/executions/index.html'

    def get_data(self):
        return api.task_list(self.kwargs['execution_id'])


from horizon import tables

from mistraldashboard import api
from mistraldashboard.executions.tables import ExecutionsTable
from mistraldashboard.executions.tables import TaskTable


class IndexView(tables.DataTableView):
    table_class = ExecutionsTable
    template_name = 'mistral/executions/index.html'

    def get_data(self):
        return api.execution_list(self.request)


class TaskView(tables.DataTableView):
    table_class = TaskTable
    template_name = 'mistral/executions/index.html'

    def get_data(self):
        return api.task_list(self.request, self.kwargs['execution_id'])

Fix errors when user click execution id
Fix errors when user click execution id

Missing request argument when calling task list

Change-Id: Idc282c267fc99513dd96a80f6f4a745bfefec2c8
Closes-Bug: #1471778

  
  from horizon import tables
  
  from mistraldashboard import api
  from mistraldashboard.executions.tables import ExecutionsTable
  from mistraldashboard.executions.tables import TaskTable
  
  
  class IndexView(tables.DataTableView):
      table_class = ExecutionsTable
      template_name = 'mistral/executions/index.html'
  
      def get_data(self):
          return api.execution_list(self.request)
  
  
  class TaskView(tables.DataTableView):
      table_class = TaskTable
      template_name = 'mistral/executions/index.html'
  
      def get_data(self):
-         return api.task_list(self.kwargs['execution_id'])
+         return api.task_list(self.request, self.kwargs['execution_id'])
  
Fix errors when user click execution id
## Code Before:

from horizon import tables

from mistraldashboard import api
from mistraldashboard.executions.tables import ExecutionsTable
from mistraldashboard.executions.tables import TaskTable


class IndexView(tables.DataTableView):
    table_class = ExecutionsTable
    template_name = 'mistral/executions/index.html'

    def get_data(self):
        return api.execution_list(self.request)


class TaskView(tables.DataTableView):
    table_class = TaskTable
    template_name = 'mistral/executions/index.html'

    def get_data(self):
        return api.task_list(self.kwargs['execution_id'])

## Instruction:
Fix errors when user click execution id
## Code After:

from horizon import tables

from mistraldashboard import api
from mistraldashboard.executions.tables import ExecutionsTable
from mistraldashboard.executions.tables import TaskTable


class IndexView(tables.DataTableView):
    table_class = ExecutionsTable
    template_name = 'mistral/executions/index.html'

    def get_data(self):
        return api.execution_list(self.request)


class TaskView(tables.DataTableView):
    table_class = TaskTable
    template_name = 'mistral/executions/index.html'

    def get_data(self):
        return api.task_list(self.request, self.kwargs['execution_id'])
