Fixed JS lint errors

This commit is contained in:
Chris Houseknecht 2014-07-08 08:39:54 -04:00
parent d7c84ce54a
commit 0fc5025636
2 changed files with 16 additions and 14 deletions

View File

@ -11,8 +11,8 @@
angular.module('HostEventsViewerHelper', ['ModalDialog', 'Utilities'])
.factory('HostEventsViewer', ['$compile', 'CreateDialog', 'Wait', 'GetBasePath', 'Empty', 'GetEvents',
function($compile, CreateDialog, Wait, GetBasePath, Empty, GetEvents) {
.factory('HostEventsViewer', ['$log', '$compile', 'CreateDialog', 'Wait', 'GetBasePath', 'Empty', 'GetEvents',
function($log, $compile, CreateDialog, Wait, GetBasePath, Empty, GetEvents) {
return function(params) {
var parent_scope = params.scope,
url = params.url,
@ -21,6 +21,8 @@ angular.module('HostEventsViewerHelper', ['ModalDialog', 'Utilities'])
title = params.title, //optional
scope = parent_scope.$new(true);
$log.debug('host_id: ' + host_id + ' host_name: ' + host_name);
if (scope.removeModalReady) {
scope.removeModalReady();
}
@ -33,12 +35,12 @@ angular.module('HostEventsViewerHelper', ['ModalDialog', 'Utilities'])
scope.removeJobReady();
}
scope.removeEventReady = scope.$on('EventsReady', function(e, data) {
var elem;
//var elem;
scope.host_events = data.results;
elem = angular.element(document.getElementById('host-events-modal-dialog'));
$compile(elem)(scope);
//elem = angular.element(document.getElementById('host-events-modal-dialog'));
//$compile(elem)(scope);
CreateDialog({
scope: scope,
@ -46,7 +48,7 @@ angular.module('HostEventsViewerHelper', ['ModalDialog', 'Utilities'])
height: 600,
minWidth: 450,
callback: 'ModalReady',
id: 'eventviewer-modal-dialog',
id: 'host-events-modal-dialog',
// onResizeStop: resizeText,
title: ( (title) ? title : 'Event Details' ),
onOpen: function() {
@ -61,7 +63,7 @@ angular.module('HostEventsViewerHelper', ['ModalDialog', 'Utilities'])
});
scope.modalOK = function() {
$('#eventviewer-modal-dialog').dialog('close');
$('#host-events-modal-dialog').dialog('close');
scope.$destroy();
};
};

View File

@ -266,7 +266,7 @@
<form class="form-inline">
<div class="form-group">
<label>Search</label>
<input type="text" class="form-control" id="host-events-search-name" id="host_events_search_name" ng-model="host-events-search-name" placeholder="Host name" >
<input type="text" class="form-control" id="host-events-search-name" ng-model="host_events_search_name" placeholder="Host name" >
</div>
<div class="form-group">
<label>Status</label>
@ -280,12 +280,12 @@
</div>
</form>
<div id="host-events-table" lr-infinite-scroll="hostEventsTable" scroll-threshold="10" time-threshold="500">
<div class="row">
<div class="col-md-2"><i class="fa icon-job{{ host_events.status }}"></i></div>
<div class="col-md-2">{{ host_events.play }}</div>
<div class="col-md-2">{{ host_events.role }}</div>
<div class="col-md-2">{{ host_events.task }}</div>
<div class="col-md-2">{{ host_events.msg }}</div>
<div class="row" ng-repeat="event in host_events">
<div class="col-md-2"><i class="fa icon-job{{ event.status }}"></i></div>
<div class="col-md-2">{{ event.play }}</div>
<div class="col-md-2">{{ event.role }}</div>
<div class="col-md-2">{{ event.task }}</div>
<div class="col-md-2">{{ event.msg }}</div>
</div>
</div>
</div>