##// END OF EJS Templates
readme: formatting
readme: formatting

File last commit:

r147:bb4c1b51
r189:3b6a83fb
Show More
appenlight-header.js
56 lines | 2.1 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
frontend: angular 1.7.7
r147 function AppEnlightHeaderController($state, stateHolder, AeConfig) {
project: initial commit
r0 var vm = this;
frontend: angular 1.7.7
r147 vm.$onInit = function () {
vm.AeConfig = AeConfig;
vm.stateHolder = stateHolder;
vm.assignedReports = stateHolder.AeUser.assigned_reports;
vm.latestEvents = stateHolder.AeUser.latest_events;
vm.activeEvents = 0;
_.each(vm.latestEvents, function (event) {
if (event.status === 1 && event.end_date === null) {
vm.activeEvents += 1;
}
});
}
vm.clickedEvent = function (event) {
project: initial commit
r0 // exception reports
frontend: angular 1.7.7
r147 if (_.contains([1, 2], event.event_type)) {
$state.go('report.list', {resource: event.resource_id, start_date: event.start_date});
project: initial commit
r0 }
// slowness reports
frontend: angular 1.7.7
r147 else if (_.contains([3, 4], event.event_type)) {
$state.go('report.list_slow', {resource: event.resource_id, start_date: event.start_date});
project: initial commit
r0 }
// uptime reports
frontend: angular 1.7.7
r147 else if (_.contains([7, 8], event.event_type)) {
$state.go('uptime', {resource: event.resource_id, start_date: event.start_date});
} else {
project: initial commit
r0 console.log('other');
}
}
}