Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
minerva
core
Commits
84794ae1
Commit
84794ae1
authored
Jul 25, 2019
by
Piotr Gawron
Browse files
show warning about deprecated columns in frontend
parent
f6e7573f
Pipeline
#12082
failed with stage
in 12 minutes and 16 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
frontend-js/src/main/js/gui/leftPanel/OverlayPanel.js
View file @
84794ae1
...
...
@@ -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
;
};
...
...
frontend-js/src/main/js/map/data/DataOverlay.js
View file @
84794ae1
...
...
@@ -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
;
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment