mirror of
https://github.com/ansible/awx.git
synced 2026-05-19 14:57:39 -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', {
|
'ProjectStatusForm', {
|
||||||
|
|
||||||
name: 'project_update',
|
name: 'project_update',
|
||||||
editTitle: 'Latest SCM Update',
|
editTitle: 'SCM Status',
|
||||||
well: false,
|
well: false,
|
||||||
'class': 'horizontal-narrow',
|
'class': 'horizontal-narrow',
|
||||||
|
|
||||||
fields: {
|
fields: {
|
||||||
name: {
|
created: {
|
||||||
label: 'Name',
|
label: 'Created',
|
||||||
type: 'text',
|
type: 'text',
|
||||||
readonly: true
|
readonly: true
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -11,9 +11,9 @@
|
|||||||
|
|
||||||
angular.module('ProjectsHelper', ['RestServices', 'Utilities', 'ProjectStatusDefinition'])
|
angular.module('ProjectsHelper', ['RestServices', 'Utilities', 'ProjectStatusDefinition'])
|
||||||
.factory('ProjectStatus', ['$rootScope', '$location', '$log', '$routeParams', 'Rest', 'Alert', 'GenerateForm',
|
.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,
|
function($rootScope, $location, $log, $routeParams, Rest, Alert, GenerateForm, Prompt, ProcessErrors, GetBasePath,
|
||||||
FormatDate, ProjectStatusForm) {
|
FormatDate, ProjectStatusForm, FormatDate) {
|
||||||
return function(params) {
|
return function(params) {
|
||||||
|
|
||||||
var project_id = params.project_id;
|
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
|
var results = data.results[data.results.length - 1]; //get the latest
|
||||||
for (var fld in form.fields) {
|
for (var fld in form.fields) {
|
||||||
if (results[fld]) {
|
if (results[fld]) {
|
||||||
scope[fld] = results[fld];
|
if (fld == 'created') {
|
||||||
|
scope[fld] = FormatDate(new Date(results[fld]));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
scope[fld] = results[fld];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (results.summary_fields.project[fld]) {
|
if (results.summary_fields.project[fld]) {
|
||||||
@@ -47,6 +52,7 @@ angular.module('ProjectsHelper', ['RestServices', 'Utilities', 'ProjectStatusDef
|
|||||||
scope.formModalActionLabel = 'OK';
|
scope.formModalActionLabel = 'OK';
|
||||||
scope.formModalCancelShow = false;
|
scope.formModalCancelShow = false;
|
||||||
scope.formModalInfo = 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 .btn-success').removeClass('btn-success').addClass('btn-none');
|
||||||
$('#form-modal').addClass('skinny-modal');
|
$('#form-modal').addClass('skinny-modal');
|
||||||
if (!scope.$$phase) {
|
if (!scope.$$phase) {
|
||||||
|
|||||||
@@ -45,6 +45,10 @@ body {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.subtitle {
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
.overlay {
|
.overlay {
|
||||||
display: none;
|
display: none;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|||||||
@@ -220,7 +220,7 @@
|
|||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<button type="button" class="close" data-target="#form-modal"
|
<button type="button" class="close" data-target="#form-modal"
|
||||||
data-dismiss="modal" aria-hidden="true">×</button>
|
data-dismiss="modal" aria-hidden="true">×</button>
|
||||||
<h3 ng-bind="formModalHeader"></h3>
|
<h3 ng-bind-html-unsafe="formModalHeader"></h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body" id="form-modal-body"></div>
|
<div class="modal-body" id="form-modal-body"></div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
|
|||||||
Reference in New Issue
Block a user