diff --git a/app/models/MispModule.scala b/app/models/MispModule.scala index 14ef92350..c5c08f065 100644 --- a/app/models/MispModule.scala +++ b/app/models/MispModule.scala @@ -1,7 +1,7 @@ package models case class MispModule( - name: String, + name: String, version: String, description: String, author: String, diff --git a/ui/app/scripts/app.routes.js b/ui/app/scripts/app.routes.js index 172416d10..2de624607 100644 --- a/ui/app/scripts/app.routes.js +++ b/ui/app/scripts/app.routes.js @@ -6,7 +6,7 @@ $urlRouterProvider.otherwise('/analyzers'); - $stateProvider + $stateProvider .state('analyzers', { url: '/analyzers', templateUrl: 'views/analyzers.html', diff --git a/ui/app/scripts/components/app-container.component.js b/ui/app/scripts/components/app-container.component.js index 6b873f0cb..be424aaa4 100644 --- a/ui/app/scripts/components/app-container.component.js +++ b/ui/app/scripts/components/app-container.component.js @@ -4,7 +4,17 @@ .directive('appContainer', function() { return { restrict: 'E', - templateUrl: 'views/components/app-container.component.html' + templateUrl: 'views/components/app-container.component.html' , + controller: function(VersionSrv) { + var self = this; + self.config = {}; + + VersionSrv.get() + .then(function(response) { + self.config = response.data; + }); + }, + controllerAs: '$vm' }; }); -})(); \ No newline at end of file +})(); diff --git a/ui/app/scripts/services.js b/ui/app/scripts/services.js index a9ef92a8a..2d1fbf445 100644 --- a/ui/app/scripts/services.js +++ b/ui/app/scripts/services.js @@ -44,6 +44,19 @@ return Notification.error(sanitized); }; }) + .service('VersionSrv', function($q, $http) { + this.get = function() { + var deferred = $q.defer(); + + $http.get('./api/status').then(function(response) { + deferred.resolve(response); + }, function(rejection) { + deferred.reject(rejection); + }); + return deferred.promise; + } + + }) .service('AnalyzerSrv', function($q, $http) { var self = this; diff --git a/ui/app/views/components/app-container.component.html b/ui/app/views/components/app-container.component.html index b8ef66415..7eb95854f 100644 --- a/ui/app/views/components/app-container.component.html +++ b/ui/app/views/components/app-container.component.html @@ -1,5 +1,4 @@
-
@@ -8,12 +7,10 @@ -