AC-732 fixed job page errors, event timing timestamp formats, 'working' spinner placement and hover color on search widget icon.

This commit is contained in:
Chris Houseknecht 2013-11-25 16:44:20 +00:00
parent 6ec1160b0f
commit c8b4e204f9
11 changed files with 112 additions and 24 deletions

View File

@ -0,0 +1,34 @@
Identity added: /tmp/tmpXve87M (/tmp/tmpXve87M)
sudo password:
PLAY [Web Servers] ************************************************************
GATHERING FACTS ***************************************************************
ok: [localhost]
TASK: [ensure apache is at the latest version] ********************************
changed: [localhost]
TASK: [ensure apache is running] **********************************************
changed: [localhost]
NOTIFIED: [restart apache] ****************************************************
failed: [localhost] => {"failed": true}
msg: rm: cannot remove `/var/run/httpd/httpd.pid': Permission denied
rm: cannot remove `/var/lock/subsys/httpd': Permission denied
rm: cannot remove `/var/run/httpd/httpd.pid': Permission denied
httpd: apr_sockaddr_info_get() failed for juniper2
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
(13)Permission denied: make_sock: could not bind to address [::]:80
(13)Permission denied: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
FATAL: all hosts have already failed -- aborting
PLAY RECAP ********************************************************************
to retry, use: --limit @/home/ansible/web.retry
localhost : ok=3 changed=2 unreachable=0 failed=1

View File

@ -0,0 +1,17 @@
Identity added: /tmp/tmpo2Sz0y (/tmp/tmpo2Sz0y)
sudo password:
PLAY [Web Servers] ************************************************************
GATHERING FACTS ***************************************************************
ok: [localhost]
TASK: [ensure apache is at the latest version] ********************************
ok: [localhost]
TASK: [say hello] *************************************************************
changed: [localhost]
PLAY RECAP ********************************************************************
localhost : ok=3 changed=1 unreachable=0 failed=0

View File

@ -0,0 +1,20 @@
Identity added: /tmp/tmpVBcpTB (/tmp/tmpVBcpTB)
sudo password:
PLAY [Web Servers] ************************************************************
GATHERING FACTS ***************************************************************
ok: [localhost]
TASK: [ensure apache is at the latest version] ********************************
failed: [localhost] => {"changed": false, "failed": true, "rc": 1, "results": ["Loaded plugins: fastestmirror\n"]}
msg: You need to be root to perform this command.
FATAL: all hosts have already failed -- aborting
PLAY RECAP ********************************************************************
to retry, use: --limit @/home/ansible/web.retry
localhost : ok=1 changed=0 unreachable=0 failed=1

View File

@ -0,0 +1,20 @@
Identity added: /tmp/tmpfiRfw3 (/tmp/tmpfiRfw3)
sudo password:
PLAY [Web Servers] ************************************************************
GATHERING FACTS ***************************************************************
ok: [localhost]
TASK: [ensure apache is at the latest version] ********************************
failed: [localhost] => {"changed": false, "failed": true, "rc": 1, "results": ["Loaded plugins: fastestmirror\n"]}
msg: You need to be root to perform this command.
FATAL: all hosts have already failed -- aborting
PLAY RECAP ********************************************************************
to retry, use: --limit @/home/ansible/web.retry
localhost : ok=1 changed=0 unreachable=0 failed=1

View File

@ -13,7 +13,7 @@
function JobEventsList ($scope, $rootScope, $location, $log, $routeParams, Rest, Alert, JobEventList,
GenerateList, LoadBreadCrumbs, Prompt, SearchInit, PaginateInit, ReturnToCaller,
ClearScope, ProcessErrors, GetBasePath, LookUpInit, ToggleChildren,
FormatDate, EventView)
FormatDate, EventView, Refresh, Wait)
{
ClearScope('htmlTemplate');
var list = JobEventList;
@ -181,19 +181,14 @@ function JobEventsList ($scope, $rootScope, $location, $log, $routeParams, Rest,
set[i].created = FormatDate(cDate);
}
// need job_status so we can show/hide refresh button
// Need below lookup to get inventory_id, which is not on event record. Plus, good idea to get status and name
// from job in the event that there are no job event records
Rest.setUrl(GetBasePath('jobs') + scope.job_id);
Rest.get()
.success( function(data, status, headers, config) {
scope.job_status = data.status;
scope.job_name = data.summary_fields.job_template.name;
//LoadBreadCrumbs({ path: '/jobs/' + scope.job_id, title: scope.job_name });
LoadBreadCrumbs({ path: '/jobs/' + scope.job_id, title: scope.job_id + ' - ' + data.summary_fields.job_template.name });
if (!(data.status == 'pending' || data.status == 'waiting' || data.status == 'running')) {
if ($rootScope.timer) {
clearInterval($rootScope.timer);
}
}
scope.$emit('SetHostLinks', data.inventory);
})
.error( function(data, status, headers, config) {
@ -232,13 +227,14 @@ function JobEventsList ($scope, $rootScope, $location, $log, $routeParams, Rest,
scope.refresh = function() {
scope['jobSearchSpin'] = true;
scope['jobLoading'] = true;
Wait('start');
Refresh({ scope: scope, set: 'jobevents', iterator: 'jobevent', url: scope['current_url'] });
}
}
JobEventsList.$inject = [ '$scope', '$rootScope', '$location', '$log', '$routeParams', 'Rest', 'Alert', 'JobEventList',
'GenerateList', 'LoadBreadCrumbs', 'Prompt', 'SearchInit', 'PaginateInit', 'ReturnToCaller', 'ClearScope',
'ProcessErrors','GetBasePath', 'LookUpInit', 'ToggleChildren', 'FormatDate', 'EventView'
'ProcessErrors','GetBasePath', 'LookUpInit', 'ToggleChildren', 'FormatDate', 'EventView', 'Refresh', 'Wait'
];
function JobEventsEdit ($scope, $rootScope, $compile, $location, $log, $routeParams, JobEventForm, GenerateForm,

View File

@ -12,7 +12,7 @@
function JobHostSummaryList ($scope, $rootScope, $location, $log, $routeParams, Rest, Alert, JobHostList,
GenerateList, LoadBreadCrumbs, Prompt, SearchInit, PaginateInit, ReturnToCaller,
ClearScope, ProcessErrors, GetBasePath, Refresh, JobStatusToolTip)
ClearScope, ProcessErrors, GetBasePath, Refresh, JobStatusToolTip, Wait)
{
ClearScope('htmlTemplate');
var list = JobHostList;
@ -133,6 +133,7 @@ function JobHostSummaryList ($scope, $rootScope, $location, $log, $routeParams,
if (scope.host_id == null) {
scope['jobSearchSpin'] = true;
scope['jobLoading'] = true;
Wait('start');
Refresh({ scope: scope, set: 'jobhosts', iterator: 'jobhost', url: scope['current_url'] });
}
}
@ -141,5 +142,5 @@ function JobHostSummaryList ($scope, $rootScope, $location, $log, $routeParams,
JobHostSummaryList.$inject = [ '$scope', '$rootScope', '$location', '$log', '$routeParams', 'Rest', 'Alert', 'JobHostList',
'GenerateList', 'LoadBreadCrumbs', 'Prompt', 'SearchInit', 'PaginateInit', 'ReturnToCaller', 'ClearScope',
'ProcessErrors', 'GetBasePath', 'Refresh', 'JobStatusToolTip'
'ProcessErrors', 'GetBasePath', 'Refresh', 'JobStatusToolTip', 'Wait'
];

View File

@ -8,9 +8,9 @@
*/
angular.module('EventsHelper', ['RestServices', 'Utilities', 'JobEventDataDefinition'])
.factory('EventView', ['$rootScope', '$location', '$log', '$routeParams', 'Rest', 'Alert', 'GenerateForm',
'Prompt', 'ProcessErrors', 'GetBasePath', 'FormatDate', 'JobEventDataForm',
'Prompt', 'ProcessErrors', 'GetBasePath', 'FormatDate', 'JobEventDataForm', 'Empty',
function($rootScope, $location, $log, $routeParams, Rest, Alert, GenerateForm, Prompt, ProcessErrors, GetBasePath,
FormatDate, JobEventDataForm) {
FormatDate, JobEventDataForm, Empty) {
return function(params) {
// We're going to manipulate the form object each time the user clicks on View button. We can't rely on what's
@ -167,7 +167,7 @@ angular.module('EventsHelper', ['RestServices', 'Utilities', 'JobEventDataDefini
Rest.get()
.success( function(data, status, headers, config) {
// If event_data is not available, removed fields that depend on it
// If event_data is not available, remove fields that depend on it
if ($.isEmptyObject(data['event_data']) || !data['event_data']['res'] || typeof data['event_data']['res'] == 'string') {
for (var fld in form.fields) {
switch(fld) {
@ -203,7 +203,7 @@ angular.module('EventsHelper', ['RestServices', 'Utilities', 'JobEventDataDefini
case 'stderr':
case 'msg':
case 'rc':
if (data['event_data'] && data['event_data']['res'] && data['event_data']['res'][fld] == undefined) {
if (data['event_data'] && data['event_data']['res'] && Empty(data['event_data']['res'][fld])) {
delete form.fields[fld];
}
else {
@ -256,7 +256,7 @@ angular.module('EventsHelper', ['RestServices', 'Utilities', 'JobEventDataDefini
}
}
// load up the form
// load the form
scope = generator.inject(form, { mode: 'edit', modal: true, related: false});
generator.reset();
scope.formModalAction = function() {
@ -320,10 +320,10 @@ angular.module('EventsHelper', ['RestServices', 'Utilities', 'JobEventDataDefini
break;
case 'start':
case 'end':
if (data['event_data'] && data['event_data']['res'] && data['event_data']['res'][fld] !== undefined) {
var cDate = new Date(data['event_data']['res'][fld]);
scope[fld] = FormatDate(cDate);
if (data['event_data'] && data['event_data']['res'] && !Empty(data['event_data']['res'][fld])) {
scope[fld] = data['event_data']['res'][fld];
}
break;
case 'results':
if (Array.isArray(data['event_data']['res'][fld]) && data['event_data']['res'][fld].length > 0 ) {

View File

@ -89,7 +89,6 @@ angular.module('JobEventsListDefinition', [])
dataPlacement: 'top',
icon: "icon-refresh",
mode: 'all',
//ngShow: "job_status == 'pending' || job_status == 'waiting' || job_status == 'running'",
'class': 'btn-xs btn-primary',
awToolTip: "Refresh the page",
ngClick: "refresh()",

View File

@ -123,11 +123,11 @@ angular.module('JobHostDefinition', [])
dataPlacement: 'top',
icon: "icon-refresh",
mode: 'all',
ngShow: "host_id == null && (job_status == 'pending' || job_status == 'waiting' || job_status == 'running')",
'class': 'btn-xs btn-primary',
awToolTip: "Refresh the page",
ngClick: "refresh()",
iconSize: 'large'
iconSize: 'large',
ngShow: "host_id == null" //don't show when viewing from inventory->hosts
}
},

View File

@ -515,6 +515,7 @@ select.page-size {
.search-reset-start:hover {
cursor: pointer;
color: @black;
}
.ui-widget-content a.search-reset-start {

View File

@ -365,8 +365,8 @@ angular.module('Utilities',['RestServices', 'Utilities'])
// Wait('start' | 'stop');
if (directive == 'start' && !$rootScope.waiting) {
$rootScope.waiting = true;
var docw = $(document).width();
var doch = $(document).height();
var docw = $(window).width();
var doch = $(window).height();
var spinnyw = $('.spinny').width();
var spinnyh = $('.spinny').height();
var x = (docw - spinnyw) / 2;