Changeset View
Changeset View
Standalone View
Standalone View
assets/src/bundles/add_forge/moderation-dashboard.js
- This file was added.
/** | |||||
* Copyright (C) 2022 The Software Heritage developers | |||||
* See the AUTHORS file at the top-level directory of this distribution | |||||
* License: GNU Affero General Public License version 3, or any later version | |||||
* See top-level LICENSE file for more information | |||||
*/ | |||||
export function onModerationPageLoad() { | |||||
populateModerationList(); | |||||
} | |||||
export async function populateModerationList() { | |||||
$('#swh-add-forge-now-moderation-list') | |||||
.on('error.dt', (e, settings, techNote, message) => { | |||||
$('#swh-add-forge-now-moderation-list-error').text(message); | |||||
}) | |||||
.DataTable({ | |||||
serverSide: true, | |||||
processing: true, | |||||
searching: false, | |||||
anlambert: you can activate search feature, it is implemented in backend endpoint | |||||
Done Inline Actionstrue, i forgot ('cause i saw you mentioning it in the other diff) thanks. ardumont: true, i forgot ('cause i saw you mentioning it in the other diff)
thanks. | |||||
info: false, | |||||
dom: '<<"d-flex justify-content-between align-items-center"f' + | |||||
'<"#list-exclude">l>rt<"bottom"ip>>', | |||||
ajax: { | |||||
'url': Urls.add_forge_request_list_datatables() | |||||
}, | |||||
columns: [ | |||||
{ | |||||
data: 'id', | |||||
name: 'id' | |||||
}, | |||||
{ | |||||
data: 'submission_date', | |||||
name: 'submission_date' | |||||
}, | |||||
{ | |||||
data: 'forge_type', | |||||
name: 'forge_type' | |||||
}, | |||||
{ | |||||
data: 'forge_url', | |||||
name: 'forge_url' | |||||
}, | |||||
{ | |||||
data: 'status', | |||||
name: 'status' | |||||
} | |||||
] | |||||
}); | |||||
} |
you can activate search feature, it is implemented in backend endpoint