Commit 84794ae1 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

show warning about deprecated columns in frontend

parent f6e7573f
......@@ -318,7 +318,17 @@ OverlayPanel.prototype.createOverlayRow = function (overlay, checked, disabled)
OverlayPanel.prototype.overlayToDataRow = function (overlay, checked, disabled) {
var result = [];
result[0] = overlay.getOrder();
result[1] = overlay.getName();
if (overlay.getDeprecatedColumns() !== undefined && overlay.getDeprecatedColumns() !== null && overlay.getDeprecatedColumns().length > 0) {
result[1] = "<div title='This data overlay uses old deprecated column names: ";
for (var j = 0; j < overlay.getDeprecatedColumns().length; j++) {
result[1] += overlay.getDeprecatedColumns()[j] + ", ";
}
result[1] += " This format will be not supported in minerva 15 and higher. Please re-upload data set using new format.'>" +
"<i class='fa fa-exclamation-triangle' style='font-size:18px; font-weight:400; padding-right:10px;color:orange'></i>" + overlay.getName() + "</div>"
} else {
result[1] = overlay.getName();
}
if (overlay.getInputDataAvailable()) {
if (disabled) {
......@@ -351,6 +361,7 @@ OverlayPanel.prototype.overlayToDataRow = function (overlay, checked, disabled)
"</div>";
}
}
logger.debug(result);
return result;
};
......
......@@ -26,6 +26,7 @@ function DataOverlay(overlayId, name) {
this.setImagesDirectory(object.images);
this.setDescription(object.description);
this.setCreator(object.creator);
this.setDeprecatedColumns(object.deprecatedColumns);
this.setContent(object.content);
this.setFilename(object.filename);
this.setPublicOverlay(object.publicOverlay);
......@@ -328,6 +329,22 @@ DataOverlay.prototype.setContent = function (content) {
this._content = content;
};
/**
*
* @returns {string[]}
*/
DataOverlay.prototype.getDeprecatedColumns = function () {
return this._deprecatedColumns;
};
/**
*
* @param {string[]} deprecatedColumns
*/
DataOverlay.prototype.setDeprecatedColumns = function (deprecatedColumns) {
this._deprecatedColumns = deprecatedColumns;
};
/**
*
* @returns {number}
......@@ -380,7 +397,7 @@ DataOverlay.prototype.setType = function (type) {
*
* @param {boolean} value
*/
DataOverlay.prototype.setGoogleLicenseConsent = function(value) {
DataOverlay.prototype.setGoogleLicenseConsent = function (value) {
this._googleLicenseConsent = value;
};
......@@ -388,7 +405,7 @@ DataOverlay.prototype.setGoogleLicenseConsent = function(value) {
*
* @returns {boolean}
*/
DataOverlay.prototype.isGoogleLicenseConsent = function() {
DataOverlay.prototype.isGoogleLicenseConsent = function () {
return this._googleLicenseConsent;
};
......
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