##// END OF EJS Templates
Update register.jinja2...
Update register.jinja2 Added confirmation of approval of terms on registration

File last commit:

r112:998f0d14
r127:96df22af
Show More
appenlight-header.js
53 lines | 2.0 KiB | application/javascript | JavascriptLexer
license: change the license to Apache 2.0
r112 // Copyright 2010 - 2017 RhodeCode GmbH and the AppEnlight project authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
project: initial commit
r0
angular: start transitioning to component approach
r71 angular.module('appenlight.components.appenlightHeader', [])
.component('appenlightHeader', {
angular: reorganize files
r72 templateUrl: 'components/appenlight-header/appenlight-header.html',
angular: start transitioning to component approach
r71 controller: AppEnlightHeaderController
});
project: initial commit
r0
angular: start transitioning to component approach
r71 ChannelstreamController.$inject = ['$state', 'stateHolder', 'AeConfig'];
project: initial commit
r0
angular: start transitioning to component approach
r71 function AppEnlightHeaderController($state, stateHolder, AeConfig){
project: initial commit
r0 var vm = this;
angular: start transitioning to component approach
r71 vm.AeConfig = AeConfig;
project: initial commit
r0 vm.stateHolder = stateHolder;
angular: load basic user info via ajax on first load
r62 vm.assignedReports = stateHolder.AeUser.assigned_reports;
vm.latestEvents = stateHolder.AeUser.latest_events;
project: initial commit
r0 vm.activeEvents = 0;
_.each(vm.latestEvents, function (event) {
if (event.status === 1 && event.end_date === null) {
vm.activeEvents += 1;
}
});
vm.clickedEvent = function(event){
// exception reports
if (_.contains([1,2], event.event_type)){
$state.go('report.list', {resource:event.resource_id, start_date:event.start_date});
}
// slowness reports
else if (_.contains([3,4], event.event_type)){
$state.go('report.list_slow', {resource:event.resource_id, start_date:event.start_date});
}
// uptime reports
else if (_.contains([7,8], event.event_type)){
$state.go('uptime', {resource:event.resource_id, start_date:event.start_date});
}
else{
console.log('other');
}
}
}