Skip to content
Snippets Groups Projects
Commit e082e745 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

configuration contains info about git hash

parent bd52c45a
No related branches found
No related tags found
1 merge request!207Resolve "remove unused JSF code"
...@@ -58,10 +58,35 @@ function Configuration(json) { ...@@ -58,10 +58,35 @@ function Configuration(json) {
self.setModificationStateTypes(json.modificationStateTypes); self.setModificationStateTypes(json.modificationStateTypes);
self.setPrivilegeTypes(json.privilegeTypes); self.setPrivilegeTypes(json.privilegeTypes);
self.setAnnotators(json.annotators); self.setAnnotators(json.annotators);
self.setVersion(json.version);
self.setBuildDate(json.buildDate);
self.setGitHash(json.gitHash);
self.setPluginsData(json.plugins); self.setPluginsData(json.plugins);
} }
} }
Configuration.prototype.setVersion = function (version) {
this._version = version;
};
Configuration.prototype.getVersion = function () {
return this._version;
};
Configuration.prototype.setBuildDate = function (buildDate) {
this._buildDate = buildDate;
};
Configuration.prototype.getBuildDate = function () {
return this._buildDate;
};
Configuration.prototype.setGitHash = function (gitHash) {
this._gitHash = gitHash;
};
Configuration.prototype.getGitHash = function () {
return this._gitHash;
};
Configuration.prototype.setOption = function (type, value) { Configuration.prototype.setOption = function (type, value) {
this._options[type] = value; this._options[type] = value;
}; };
......
...@@ -41,7 +41,7 @@ public class ConfigurationController extends BaseController { ...@@ -41,7 +41,7 @@ public class ConfigurationController extends BaseController {
@RequestMapping(value = "/configuration/", method = { RequestMethod.GET }, produces = { @RequestMapping(value = "/configuration/", method = { RequestMethod.GET }, produces = {
MediaType.APPLICATION_JSON_VALUE }) MediaType.APPLICATION_JSON_VALUE })
public Map<String, Object> getOverlayTypes(@CookieValue(value = Configuration.AUTH_TOKEN) String token) public Map<String, Object> getConfiguration(@CookieValue(value = Configuration.AUTH_TOKEN) String token)
throws SecurityException { throws SecurityException {
Map<String, Object> result = new HashMap<>(); Map<String, Object> result = new HashMap<>();
result.put("options", configurationController.getAllValues(token)); result.put("options", configurationController.getAllValues(token));
...@@ -57,6 +57,7 @@ public class ConfigurationController extends BaseController { ...@@ -57,6 +57,7 @@ public class ConfigurationController extends BaseController {
result.put("privilegeTypes", configurationController.getPrivilegeTypes(token)); result.put("privilegeTypes", configurationController.getPrivilegeTypes(token));
result.put("version", configurationService.getSystemSvnVersion(context.getRealPath("/"))); result.put("version", configurationService.getSystemSvnVersion(context.getRealPath("/")));
result.put("buildDate", configurationService.getSystemBuild(context.getRealPath("/"))); result.put("buildDate", configurationService.getSystemBuild(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("/"))); result.put("plugins", configurationController.getPlugins(token, context.getRealPath("/")));
return result; return result;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment