mirror of
https://github.com/ansible/awx.git
synced 2026-05-20 07:17:40 -02:30
Fixed JS lint errors
This commit is contained in:
@@ -11,8 +11,8 @@
|
|||||||
|
|
||||||
angular.module('HostEventsViewerHelper', ['ModalDialog', 'Utilities'])
|
angular.module('HostEventsViewerHelper', ['ModalDialog', 'Utilities'])
|
||||||
|
|
||||||
.factory('HostEventsViewer', ['$compile', 'CreateDialog', 'Wait', 'GetBasePath', 'Empty', 'GetEvents',
|
.factory('HostEventsViewer', ['$log', '$compile', 'CreateDialog', 'Wait', 'GetBasePath', 'Empty', 'GetEvents',
|
||||||
function($compile, CreateDialog, Wait, GetBasePath, Empty, GetEvents) {
|
function($log, $compile, CreateDialog, Wait, GetBasePath, Empty, GetEvents) {
|
||||||
return function(params) {
|
return function(params) {
|
||||||
var parent_scope = params.scope,
|
var parent_scope = params.scope,
|
||||||
url = params.url,
|
url = params.url,
|
||||||
@@ -21,6 +21,8 @@ angular.module('HostEventsViewerHelper', ['ModalDialog', 'Utilities'])
|
|||||||
title = params.title, //optional
|
title = params.title, //optional
|
||||||
scope = parent_scope.$new(true);
|
scope = parent_scope.$new(true);
|
||||||
|
|
||||||
|
$log.debug('host_id: ' + host_id + ' host_name: ' + host_name);
|
||||||
|
|
||||||
if (scope.removeModalReady) {
|
if (scope.removeModalReady) {
|
||||||
scope.removeModalReady();
|
scope.removeModalReady();
|
||||||
}
|
}
|
||||||
@@ -33,12 +35,12 @@ angular.module('HostEventsViewerHelper', ['ModalDialog', 'Utilities'])
|
|||||||
scope.removeJobReady();
|
scope.removeJobReady();
|
||||||
}
|
}
|
||||||
scope.removeEventReady = scope.$on('EventsReady', function(e, data) {
|
scope.removeEventReady = scope.$on('EventsReady', function(e, data) {
|
||||||
var elem;
|
//var elem;
|
||||||
|
|
||||||
scope.host_events = data.results;
|
scope.host_events = data.results;
|
||||||
|
|
||||||
elem = angular.element(document.getElementById('host-events-modal-dialog'));
|
//elem = angular.element(document.getElementById('host-events-modal-dialog'));
|
||||||
$compile(elem)(scope);
|
//$compile(elem)(scope);
|
||||||
|
|
||||||
CreateDialog({
|
CreateDialog({
|
||||||
scope: scope,
|
scope: scope,
|
||||||
@@ -46,7 +48,7 @@ angular.module('HostEventsViewerHelper', ['ModalDialog', 'Utilities'])
|
|||||||
height: 600,
|
height: 600,
|
||||||
minWidth: 450,
|
minWidth: 450,
|
||||||
callback: 'ModalReady',
|
callback: 'ModalReady',
|
||||||
id: 'eventviewer-modal-dialog',
|
id: 'host-events-modal-dialog',
|
||||||
// onResizeStop: resizeText,
|
// onResizeStop: resizeText,
|
||||||
title: ( (title) ? title : 'Event Details' ),
|
title: ( (title) ? title : 'Event Details' ),
|
||||||
onOpen: function() {
|
onOpen: function() {
|
||||||
@@ -61,7 +63,7 @@ angular.module('HostEventsViewerHelper', ['ModalDialog', 'Utilities'])
|
|||||||
});
|
});
|
||||||
|
|
||||||
scope.modalOK = function() {
|
scope.modalOK = function() {
|
||||||
$('#eventviewer-modal-dialog').dialog('close');
|
$('#host-events-modal-dialog').dialog('close');
|
||||||
scope.$destroy();
|
scope.$destroy();
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -266,7 +266,7 @@
|
|||||||
<form class="form-inline">
|
<form class="form-inline">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Search</label>
|
<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>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Status</label>
|
<label>Status</label>
|
||||||
@@ -280,12 +280,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<div id="host-events-table" lr-infinite-scroll="hostEventsTable" scroll-threshold="10" time-threshold="500">
|
<div id="host-events-table" lr-infinite-scroll="hostEventsTable" scroll-threshold="10" time-threshold="500">
|
||||||
<div class="row">
|
<div class="row" ng-repeat="event in host_events">
|
||||||
<div class="col-md-2"><i class="fa icon-job{{ host_events.status }}"></i></div>
|
<div class="col-md-2"><i class="fa icon-job{{ event.status }}"></i></div>
|
||||||
<div class="col-md-2">{{ host_events.play }}</div>
|
<div class="col-md-2">{{ event.play }}</div>
|
||||||
<div class="col-md-2">{{ host_events.role }}</div>
|
<div class="col-md-2">{{ event.role }}</div>
|
||||||
<div class="col-md-2">{{ host_events.task }}</div>
|
<div class="col-md-2">{{ event.task }}</div>
|
||||||
<div class="col-md-2">{{ host_events.msg }}</div>
|
<div class="col-md-2">{{ event.msg }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user