Commit d8595aa2 authored by Gradl, Tobias's avatar Gradl, Tobias
Browse files

456: Show all automation configuration in collection and datamodel admin

dialogs (OPENED)

Task-Url: search#456
parent ea5369fe
......@@ -3,6 +3,7 @@ $(document).ready(function() {
editor = new CollectionsEditor();
$("#btn-resync-colreg").click(function() { editor.triggerColRegSync(); });
$("#btn-force-online").click(function() { editor.triggerOnline(); });
$("#btn-force-cleanup").click(function() { editor.triggerCleanupCrawls(); });
//$("#btn-add-collection").click(function() { editor.triggerAddCollection(); });
});
......@@ -14,13 +15,18 @@ var CollectionsEditor = function() {
"~eu.dariah.de.minfba.search.view.collection.info_resync.head",
"~eu.dariah.de.minfba.search.view.collection.info_resync.body",
"~eu.dariah.de.minfba.search.view.collection.confirm_resync_colreg",
"~eu.dariah.de.minfba.search.view.collection.confirm_force_online"
"~eu.dariah.de.minfba.search.view.collection.confirm_force_online",
"~eu.dariah.de.minfba.search.view.collection.confirm_force_cleanup_crawls"
]);
this.autoOnline = $("#autoOnline").val();
this.createTable();
//this.assignEvents();
this.getColregStatus();
$(function () {
$('[data-toggle="tooltip"]').tooltip()
})
};
CollectionsEditor.prototype = new BaseTable(__util.getBaseUrl() + "collections/async/getData", "#collections-table-container");
......@@ -240,4 +246,22 @@ CollectionsEditor.prototype.triggerOnline = function () {
});
}
});
};
CollectionsEditor.prototype.triggerCleanupCrawls = function () {
bootbox.confirm(__translator.translate("~eu.dariah.de.minfba.search.view.collection.confirm_force_cleanup_crawls"), function(result) {
if(result) {
$.ajax({
url: __util.composeRelativeUrl("async/triggerCleanupCrawls"),
type: "GET",
dataType: "json",
success: function(data) {
__notifications.showTranslatedMessage(NOTIFICATION_TYPES.INFO,
"~eu.dariah.de.minfba.search.view.collection.info_resync.head",
"~eu.dariah.de.minfba.search.view.collection.info_resync.body");
},
error: __util.processServerError
});
}
});
};
\ No newline at end of file
......@@ -27,6 +27,10 @@ var DatamodelEditor = function() {
this.createTable();
this.assignEvents();
this.getDmeStatus();
$(function () {
$('[data-toggle="tooltip"]').tooltip()
})
};
DatamodelEditor.prototype = new BaseTable(__util.getBaseUrl() + "datamodels/async/getData", "#datamodels-table-container");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment