make selection of config-services downloadable as json e.g. for config-services script
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -104,7 +104,9 @@
|
||||
{{ lng('admin.configfiles.recommendednote') }}
|
||||
</div>
|
||||
<div class="col-12 col-md-6 text-end">
|
||||
<input type="hidden" name="dist" value="{{ distribution }}" />
|
||||
<button type="button" class="btn btn-outline-secondary" id="selectRecommendedConfig">{{ lng('admin.configfiles.selectrecommended') }}</button>
|
||||
<button type="button" class="btn btn-outline-secondary" id="downloadSelectionAsJson"><i class="fa-solid fa-download"></i> {{ lng('admin.configfiles.downloadselected') }}</button>
|
||||
<button type="submit" class="btn btn-primary">{{ lng('update.proceed') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -12,6 +12,18 @@ $(function () {
|
||||
})
|
||||
});
|
||||
|
||||
/*
|
||||
* export/download JSON file (e.g. for usage with config-services)
|
||||
*/
|
||||
$('#downloadSelectionAsJson').on('click', function () {
|
||||
var formData = $(this).closest('form').serialize();
|
||||
window.location = "lib/ajax.php?action=getConfigJsonExport&" + formData;
|
||||
});
|
||||
|
||||
/*
|
||||
* open modal window to show selected config-commands/files
|
||||
* for selected daemon
|
||||
*/
|
||||
$('.show-config').on('click', function () {
|
||||
var distro = $(this).data('dist');
|
||||
var section = $(this).data('section');
|
||||
|
||||
Reference in New Issue
Block a user