* Load list of modules in a select list
()
| 2 | * Load list of modules in a select list |
| 3 | */ |
| 4 | function load_module_options() { |
| 5 | $.ajax({ |
| 6 | type: "GET", |
| 7 | url: "/api/core/list/modules", |
| 8 | data: {}, |
| 9 | success: function (result, status, xhr) { |
| 10 | let tableHtml = '<option value=\"\"> All Modules </option>'; |
| 11 | for (let i = 0; i < result.length; i++) { |
| 12 | const module_name = result[i]; |
| 13 | tableHtml += "<option value=" + |
| 14 | module_name + ">" |
| 15 | + module_name |
| 16 | + "</option>"; |
| 17 | } |
| 18 | $('#module_names').html(tableHtml); |
| 19 | }, |
| 20 | error: function (jqXHR, textStatus, errorThrown) { |
| 21 | console.log(jqXHR.responseText) |
| 22 | } |
| 23 | }); |
| 24 | } |
| 25 | |
| 26 | |
| 27 | // Get the file name of the export file |