Commit 86e86c58 authored by Gradl, Tobias's avatar Gradl, Tobias
Browse files

446: Reimplement automatic online and offline crawl capabilities

(OPENED)

Task-Url: search#446
parent 25eda282
......@@ -37,23 +37,22 @@ CollectionsEditor.prototype.createTable = function() {
"data": function (row, type, val, meta) { return row.entity.dataset.docs.toLocaleString(lang); },
}, {
"targets": [2],
"data": function (row, type, val, meta) { return editor.renderUrlColumn(row, type, val, meta); },
"data": function (row, type, val, meta) { return editor.renderAccessColumn(row, type, val, meta); },
}, {
"targets": [3],
"data": "entity.endpoint.accessType",
//"data": "entity.endpoint.accessType",
"data": function (row, type, val, meta) { return editor.renderDatamodelColumn(row, type, val, meta); },
"class": "no-break"
}, {
"targets": [4],
"data": "entity.endpoint.fileType",
"data": "entity.dataset.lastCrawlCompleted",
//"data": function (row, type, val, meta) { return ""; },
"class": "no-break"
}, {
"targets": [5], "responsivePriority" : 1, // It has the right border
"data": "entity.dataset.datamodelPojo.name"
}, {
"targets": [6], "visible": false,
"targets": [5], "visible": false,
"data": "entity.collection.name"
}, {
"targets": [0,1,2,3,4,5],
"targets": [0,1,2,3,4],
"render": function ( data, type, row, meta ) {
return '<a href="' + __util.composeRelativeUrl(row.entity.id) + '">' + data + '</a>';
}
......@@ -81,10 +80,12 @@ CollectionsEditor.prototype.setGroupRow = function(rows, group) {
}
}
return $('<tr class="state-row-' + overallState + '" id="' + rows.data()[0].entity.collection.id + '" />')
return $('<tr class="group state-row-' + overallState + '" id="' + rows.data()[0].entity.collection.id + '" />')
.append( '<th class="state-' + overallState + '"></th>' )
.append( '<td colspan="5">' +
'<h2 class="group-heading"><a href="' + __util.composeRelativeUrl(rows.data()[0].entity.collection.id) + '/">' + rows.data()[0].entity.collection.name + '</a></h2>' +
'<h2 class="group-heading">' +
'<a href="' + __util.composeRelativeUrl(rows.data()[0].entity.collection.id) + '/">' + rows.data()[0].entity.collection.name + '</a>' +
'</h2>' +
'</td>' );
}
......@@ -105,11 +106,19 @@ CollectionsEditor.prototype.renderStateColumn = function(row, type, val, meta) {
}
};
CollectionsEditor.prototype.renderUrlColumn = function(row, type, val, meta) {
CollectionsEditor.prototype.renderAccessColumn = function(row, type, val, meta) {
let result = row.entity.endpoint.url + " (" + row.entity.endpoint.accessType;
if (row.entity.endpoint.set!==undefined && row.entity.endpoint.set!==null && row.entity.endpoint.set.length>0) {
return row.entity.endpoint.url + " [" + row.entity.endpoint.set + "]";
result = ", " + row.entity.endpoint.set + ")";
} else {
result = result + ")";
}
return row.entity.endpoint.url
return result;
};
CollectionsEditor.prototype.renderDatamodelColumn = function(row, type, val, meta) {
return row.entity.endpoint.fileType + ": " + row.entity.dataset.datamodelPojo.name;
};
CollectionsEditor.prototype.getIcon = function(entity) {
......
Markdown is supported
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