From 12a4b2346cfff05272af2377f72623347ace07a9 Mon Sep 17 00:00:00 2001 From: chouseknecht Date: Wed, 4 Sep 2013 09:05:49 -0400 Subject: [PATCH] SCM status dialog changes. Title is now project name. Added created on date with formatting. --- awx/ui/static/js/forms/ProjectStatus.js | 6 +++--- awx/ui/static/js/helpers/Projects.js | 12 +++++++++--- awx/ui/static/less/ansible-ui.less | 4 ++++ awx/ui/templates/ui/index.html | 2 +- 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/awx/ui/static/js/forms/ProjectStatus.js b/awx/ui/static/js/forms/ProjectStatus.js index 5a8558dd2a..0d4adae5a6 100644 --- a/awx/ui/static/js/forms/ProjectStatus.js +++ b/awx/ui/static/js/forms/ProjectStatus.js @@ -11,13 +11,13 @@ angular.module('ProjectStatusDefinition', []) 'ProjectStatusForm', { name: 'project_update', - editTitle: 'Latest SCM Update', + editTitle: 'SCM Status', well: false, 'class': 'horizontal-narrow', fields: { - name: { - label: 'Name', + created: { + label: 'Created', type: 'text', readonly: true }, diff --git a/awx/ui/static/js/helpers/Projects.js b/awx/ui/static/js/helpers/Projects.js index d526e38193..a02284e681 100644 --- a/awx/ui/static/js/helpers/Projects.js +++ b/awx/ui/static/js/helpers/Projects.js @@ -11,9 +11,9 @@ angular.module('ProjectsHelper', ['RestServices', 'Utilities', 'ProjectStatusDefinition']) .factory('ProjectStatus', ['$rootScope', '$location', '$log', '$routeParams', 'Rest', 'Alert', 'GenerateForm', - 'Prompt', 'ProcessErrors', 'GetBasePath', 'FormatDate', 'ProjectStatusForm', + 'Prompt', 'ProcessErrors', 'GetBasePath', 'FormatDate', 'ProjectStatusForm', 'FormatDate', function($rootScope, $location, $log, $routeParams, Rest, Alert, GenerateForm, Prompt, ProcessErrors, GetBasePath, - FormatDate, ProjectStatusForm) { + FormatDate, ProjectStatusForm, FormatDate) { return function(params) { var project_id = params.project_id; @@ -33,7 +33,12 @@ angular.module('ProjectsHelper', ['RestServices', 'Utilities', 'ProjectStatusDef var results = data.results[data.results.length - 1]; //get the latest for (var fld in form.fields) { if (results[fld]) { - scope[fld] = results[fld]; + if (fld == 'created') { + scope[fld] = FormatDate(new Date(results[fld])); + } + else { + scope[fld] = results[fld]; + } } else { if (results.summary_fields.project[fld]) { @@ -47,6 +52,7 @@ angular.module('ProjectsHelper', ['RestServices', 'Utilities', 'ProjectStatusDef scope.formModalActionLabel = 'OK'; scope.formModalCancelShow = false; scope.formModalInfo = false; + scope.formModalHeader = results.summary_fields.project.name + ' - SCM Status'; $('#form-modal .btn-success').removeClass('btn-success').addClass('btn-none'); $('#form-modal').addClass('skinny-modal'); if (!scope.$$phase) { diff --git a/awx/ui/static/less/ansible-ui.less b/awx/ui/static/less/ansible-ui.less index 181bce41b3..75a771db9b 100644 --- a/awx/ui/static/less/ansible-ui.less +++ b/awx/ui/static/less/ansible-ui.less @@ -45,6 +45,10 @@ body { } } +.subtitle { + font-size: 16px; +} + .overlay { display: none; position: absolute; diff --git a/awx/ui/templates/ui/index.html b/awx/ui/templates/ui/index.html index cf38966980..761bcf30be 100644 --- a/awx/ui/templates/ui/index.html +++ b/awx/ui/templates/ui/index.html @@ -220,7 +220,7 @@