Add onclick property on the rules on dashboard
This commit is contained in:
@@ -29,6 +29,14 @@ yltApp.config(['$routeProvider', '$locationProvider',
|
||||
templateUrl: 'front/views/dashboard.html',
|
||||
controller: 'DashboardCtrl'
|
||||
}).
|
||||
when('/result/:runId/timeline', {
|
||||
templateUrl: 'front/views/timeline.html',
|
||||
controller: 'TimelineCtrl'
|
||||
}).
|
||||
when('/result/:runId/rule/:policy', {
|
||||
templateUrl: 'front/views/rule.html',
|
||||
controller: 'RuleCtrl'
|
||||
}).
|
||||
otherwise({
|
||||
redirectTo: '/'
|
||||
});
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
var dashboardCtrl = angular.module('dashboardCtrl', ['resultsFactory', 'menuService']);
|
||||
|
||||
dashboardCtrl.controller('DashboardCtrl', ['$scope', '$routeParams', 'Results', 'Menu', function($scope, $routeParams, Results, Menu) {
|
||||
dashboardCtrl.controller('DashboardCtrl', ['$scope', '$routeParams', '$location', 'Results', 'Menu', function($scope, $routeParams, $location, Results, Menu) {
|
||||
$scope.runId = $routeParams.runId;
|
||||
$scope.Menu = Menu.setCurrentPage('dashboard', $scope.runId);
|
||||
|
||||
@@ -8,4 +8,8 @@ dashboardCtrl.controller('DashboardCtrl', ['$scope', '$routeParams', 'Results',
|
||||
$scope.result = result;
|
||||
console.log(result);
|
||||
});
|
||||
|
||||
$scope.showRulePage = function(ruleName) {
|
||||
$location.path('/result/' + $scope.runId + '/rule/' + ruleName);
|
||||
};
|
||||
}]);
|
||||
Reference in New Issue
Block a user