|
|
@@ -143,6 +143,10 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
|
|
|
url : "/user",
|
|
|
templateUrl : "static/tpl/index/account/user.html",
|
|
|
controller: 'UserCtrl'
|
|
|
+ }).state('account.log', {
|
|
|
+ url : "/log",
|
|
|
+ templateUrl : "static/tpl/index/account/log.html",
|
|
|
+ controller: 'LogCtrl'
|
|
|
}).state('account.resource', {
|
|
|
url : "/resource",
|
|
|
templateUrl : "static/tpl/index/account/resource.html",
|
|
|
@@ -1409,6 +1413,50 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'service/Purc', 'ser
|
|
|
});
|
|
|
});
|
|
|
|
|
|
+ app.controller('LogCtrl', function($scope, $rootScope, BaseService, ngTableParams, ErpLog, UsageLog){
|
|
|
+ $rootScope.active = 'log';
|
|
|
+ $scope.erpParams = new ngTableParams({
|
|
|
+ page : 1,
|
|
|
+ count : 5,
|
|
|
+ sorting: {
|
|
|
+ time: 'desc'
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ total : 0,
|
|
|
+ counts: [5, 10, 25, 50],
|
|
|
+ getData : function($defer, params) {
|
|
|
+ $scope.loading = true;
|
|
|
+ ErpLog.get(BaseService.parseParams(params.url()), function(page){
|
|
|
+ $scope.loading = false;
|
|
|
+ if(page) {
|
|
|
+ params.total(page.totalElements);
|
|
|
+ $defer.resolve(page.content);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ $scope.usageParams = new ngTableParams({
|
|
|
+ page : 1,
|
|
|
+ count : 5,
|
|
|
+ sorting: {
|
|
|
+ time: 'desc'
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ total : 0,
|
|
|
+ counts: [5, 10, 25, 50],
|
|
|
+ getData : function($defer, params) {
|
|
|
+ $scope.loading = true;
|
|
|
+ UsageLog.get(BaseService.parseParams(params.url()), function(page){
|
|
|
+ $scope.loading = false;
|
|
|
+ if(page) {
|
|
|
+ params.total(page.totalElements);
|
|
|
+ $defer.resolve(page.content);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
app.controller('ResourceCtrl', function($scope, $rootScope){
|
|
|
$rootScope.active = 'resource';
|
|
|
});
|