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
c7da8b12
Commit
c7da8b12
authored
Sep 27, 2018
by
Piotr Gawron
Browse files
rest api of the configuration doesn't return list of plugins (this was empty anyway)
parent
de6411cd
Changes
3
Hide whitespace changes
Inline
Side-by-side
frontend-js/src/main/js/Configuration.js
View file @
c7da8b12
...
...
@@ -106,7 +106,6 @@ function Configuration(json) {
self
.
setVersion
(
json
.
version
);
self
.
setBuildDate
(
json
.
buildDate
);
self
.
setGitHash
(
json
.
gitHash
);
self
.
setPluginsData
(
json
.
plugins
);
}
}
...
...
@@ -509,22 +508,6 @@ Configuration.prototype.setAnnotators = function (annotators) {
}
};
/**
*
* @returns {Array}
*/
Configuration
.
prototype
.
getPluginsData
=
function
()
{
return
this
.
_pluginsData
;
};
/**
*
* @param {Array} pluginsData
*/
Configuration
.
prototype
.
setPluginsData
=
function
(
pluginsData
)
{
this
.
_pluginsData
=
pluginsData
;
};
/**
*
* @returns {Annotator[]}
...
...
@@ -624,7 +607,6 @@ Configuration.prototype.update = function (original) {
self
.
setMapTypes
(
createCopy
(
original
.
getMapTypes
()));
self
.
setModificationStateTypes
(
createCopy
(
original
.
getModificationStateTypes
()));
self
.
setPrivilegeTypes
(
createCopy
(
original
.
getPrivilegeTypes
()));
self
.
setPluginsData
(
createCopy
(
original
.
getPluginsData
()));
self
.
_annotators
=
[];
for
(
i
=
0
;
i
<
original
.
getAnnotators
();
i
++
)
{
self
.
_annotators
.
push
(
new
Annotator
(
original
.
getAnnotators
()[
i
]));
...
...
rest-api/src/main/java/lcsb/mapviewer/api/configuration/ConfigurationController.java
View file @
c7da8b12
...
...
@@ -59,7 +59,6 @@ public class ConfigurationController extends BaseController {
result
.
put
(
"buildDate"
,
configurationService
.
getSystemBuild
(
context
.
getRealPath
(
"/"
)));
result
.
put
(
"gitHash"
,
configurationService
.
getSystemGitVersion
(
context
.
getRealPath
(
"/"
)));
result
.
put
(
"annotators"
,
configurationController
.
getAnnotators
(
token
));
result
.
put
(
"plugins"
,
configurationController
.
getPlugins
(
token
,
context
.
getRealPath
(
"/"
)));
return
result
;
}
...
...
rest-api/src/main/java/lcsb/mapviewer/api/configuration/ConfigurationRestImpl.java
View file @
c7da8b12
...
...
@@ -283,27 +283,6 @@ public class ConfigurationRestImpl extends BaseRestImpl {
return
optionToMap
(
configurationService
.
getValue
(
type
));
}
public
List
<
Map
<
String
,
Object
>>
getPlugins
(
String
token
,
String
rootPath
)
{
String
path
=
rootPath
+
"/resources/js/plugins/"
;
File
folder
=
new
File
(
path
);
List
<
Map
<
String
,
Object
>>
result
=
new
ArrayList
<>();
if
(
folder
.
exists
())
{
File
[]
listOfFiles
=
folder
.
listFiles
();
Arrays
.
sort
(
listOfFiles
);
for
(
int
i
=
0
;
i
<
listOfFiles
.
length
;
i
++)
{
if
(
listOfFiles
[
i
].
isFile
())
{
Map
<
String
,
Object
>
row
=
new
TreeMap
<>();
row
.
put
(
"url"
,
"resources/js/plugins/"
+
listOfFiles
[
i
].
getName
());
row
.
put
(
"load-on-start"
,
false
);
result
.
add
(
row
);
}
}
}
return
result
;
}
public
List
<
Map
<
String
,
Object
>>
getUnitTypes
(
String
token
)
{
List
<
Map
<
String
,
Object
>>
result
=
new
ArrayList
<>();
for
(
SbmlUnitType
type
:
SbmlUnitType
.
values
())
{
...
...
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