'List of previous Import jobs'

def _create_upload_dataTable(self):

    db = current.db
    request = self.request
    controller = self.controller
    function = self.function
    s3 = current.response.s3
    table = self.upload_table
    s3.filter = ((table.controller == controller) & (table.function == function))
    self._use_upload_table()
    output = dict()
    self._use_controller_table()
    if (request.representation == 'aadata'):
        return output
    query = (table.status != 3)
    rows = db(query).select(table.id)
    restrictOpen = [str(row.id) for row in rows]
    query = (table.status == 3)
    rows = db(query).select(table.id)
    restrictView = [str(row.id) for row in rows]
    s3.actions = [dict(label=str(self.messages.open_btn), _class='action-btn', url=URL(r=request, c=controller, f=function, args=['import'], vars={'job': '[id]'}), restrict=restrictOpen), dict(label=str(self.messages.view_btn), _class='action-btn', url=URL(r=request, c=controller, f=function, args=['import'], vars={'job': '[id]'}), restrict=restrictView), dict(label=str(self.messages.delete_btn), _class='delete-btn', url=URL(r=request, c=controller, f=function, args=['import'], vars={'job': '[id]', 'delete': 'True'}))]
    query = (table.status == 1)
    rows = db(query).select(table.id)
    s3.dataTableStyleAlert = [str(row.id) for row in rows]
    query = (table.status == 2)
    rows = db(query).select(table.id)
    s3.dataTableStyleWarning = [str(row.id) for row in rows]
    return output
