mirror of
https://github.com/ansible/awx.git
synced 2026-03-13 15:09:32 -02:30
SCM status dialog changes. Title is now project name. Added created on date with formatting.
This commit is contained in:
@@ -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
|
||||
},
|
||||
|
||||
@@ -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 + '<span class="subtitle"> - SCM Status</span>';
|
||||
$('#form-modal .btn-success').removeClass('btn-success').addClass('btn-none');
|
||||
$('#form-modal').addClass('skinny-modal');
|
||||
if (!scope.$$phase) {
|
||||
|
||||
@@ -45,6 +45,10 @@ body {
|
||||
}
|
||||
}
|
||||
|
||||
.subtitle {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.overlay {
|
||||
display: none;
|
||||
position: absolute;
|
||||
|
||||
@@ -220,7 +220,7 @@
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-target="#form-modal"
|
||||
data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h3 ng-bind="formModalHeader"></h3>
|
||||
<h3 ng-bind-html-unsafe="formModalHeader"></h3>
|
||||
</div>
|
||||
<div class="modal-body" id="form-modal-body"></div>
|
||||
<div class="modal-footer">
|
||||
|
||||
Reference in New Issue
Block a user