Commit c7da8b12 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

rest api of the configuration doesn't return list of plugins (this was empty anyway)

parent de6411cd
...@@ -106,7 +106,6 @@ function Configuration(json) { ...@@ -106,7 +106,6 @@ function Configuration(json) {
self.setVersion(json.version); self.setVersion(json.version);
self.setBuildDate(json.buildDate); self.setBuildDate(json.buildDate);
self.setGitHash(json.gitHash); self.setGitHash(json.gitHash);
self.setPluginsData(json.plugins);
} }
} }
...@@ -509,22 +508,6 @@ Configuration.prototype.setAnnotators = function (annotators) { ...@@ -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[]} * @returns {Annotator[]}
...@@ -624,7 +607,6 @@ Configuration.prototype.update = function (original) { ...@@ -624,7 +607,6 @@ Configuration.prototype.update = function (original) {
self.setMapTypes(createCopy(original.getMapTypes())); self.setMapTypes(createCopy(original.getMapTypes()));
self.setModificationStateTypes(createCopy(original.getModificationStateTypes())); self.setModificationStateTypes(createCopy(original.getModificationStateTypes()));
self.setPrivilegeTypes(createCopy(original.getPrivilegeTypes())); self.setPrivilegeTypes(createCopy(original.getPrivilegeTypes()));
self.setPluginsData(createCopy(original.getPluginsData()));
self._annotators = []; self._annotators = [];
for (i = 0; i < original.getAnnotators(); i++) { for (i = 0; i < original.getAnnotators(); i++) {
self._annotators.push(new Annotator(original.getAnnotators()[i])); self._annotators.push(new Annotator(original.getAnnotators()[i]));
......
...@@ -59,7 +59,6 @@ public class ConfigurationController extends BaseController { ...@@ -59,7 +59,6 @@ public class ConfigurationController extends BaseController {
result.put("buildDate", configurationService.getSystemBuild(context.getRealPath("/"))); result.put("buildDate", configurationService.getSystemBuild(context.getRealPath("/")));
result.put("gitHash", configurationService.getSystemGitVersion(context.getRealPath("/"))); result.put("gitHash", configurationService.getSystemGitVersion(context.getRealPath("/")));
result.put("annotators", configurationController.getAnnotators(token)); result.put("annotators", configurationController.getAnnotators(token));
result.put("plugins", configurationController.getPlugins(token, context.getRealPath("/")));
return result; return result;
} }
......
...@@ -283,27 +283,6 @@ public class ConfigurationRestImpl extends BaseRestImpl { ...@@ -283,27 +283,6 @@ public class ConfigurationRestImpl extends BaseRestImpl {
return optionToMap(configurationService.getValue(type)); 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) { public List<Map<String, Object>> getUnitTypes(String token) {
List<Map<String, Object>> result = new ArrayList<>(); List<Map<String, Object>> result = new ArrayList<>();
for (SbmlUnitType type : SbmlUnitType.values()) { for (SbmlUnitType type : SbmlUnitType.values()) {
......
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