mirror of
https://github.com/ansible/awx.git
synced 2026-03-01 00:38:45 -03:30
AC-682 Made project help text changes. Found a way to get help icon tool-tip to display top while help text pop-out displays left. Added status drop-dwon options on projects search filter.
This commit is contained in:
@@ -117,6 +117,22 @@ function ProjectsList ($scope, $rootScope, $location, $log, $routeParams, Rest,
|
|||||||
scope.search(list.iterator);
|
scope.search(list.iterator);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (scope.removeStatusOptionsReady) {
|
||||||
|
scope.removeStatusOptionsReady();
|
||||||
|
}
|
||||||
|
scope.removeStatusOptionsReady = scope.$on('statusOptionsReady', function() {
|
||||||
|
list.fields.status.searchOptions = scope.project_status_options;
|
||||||
|
});
|
||||||
|
|
||||||
|
// Load options for status --used in search
|
||||||
|
GetChoices({
|
||||||
|
scope: scope,
|
||||||
|
url: defaultUrl,
|
||||||
|
field: 'status',
|
||||||
|
variable: 'project_status_options',
|
||||||
|
callback: 'statusOptionsReady'
|
||||||
|
});
|
||||||
|
|
||||||
// Load the list of options for Kind
|
// Load the list of options for Kind
|
||||||
GetChoices({
|
GetChoices({
|
||||||
scope: scope,
|
scope: scope,
|
||||||
@@ -126,7 +142,6 @@ function ProjectsList ($scope, $rootScope, $location, $log, $routeParams, Rest,
|
|||||||
callback: 'choicesReady'
|
callback: 'choicesReady'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
LoadBreadCrumbs();
|
LoadBreadCrumbs();
|
||||||
|
|
||||||
scope.showActivity = function() { Stream(); }
|
scope.showActivity = function() { Stream(); }
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ angular.module('ProjectsListDefinition', [])
|
|||||||
excludeModal: true
|
excludeModal: true
|
||||||
},
|
},
|
||||||
scm_type: {
|
scm_type: {
|
||||||
label: 'SCM Type',
|
label: 'Type',
|
||||||
searchType: 'select',
|
searchType: 'select',
|
||||||
searchOptions: [], // will be set by Options call to projects resource
|
searchOptions: [], // will be set by Options call to projects resource
|
||||||
excludeModal: true,
|
excludeModal: true,
|
||||||
@@ -43,6 +43,8 @@ angular.module('ProjectsListDefinition', [])
|
|||||||
dataPlacement: 'top',
|
dataPlacement: 'top',
|
||||||
badgeIcon: "\{\{ 'icon-failures-' + project.badge \}\}",
|
badgeIcon: "\{\{ 'icon-failures-' + project.badge \}\}",
|
||||||
badgePlacement: 'left',
|
badgePlacement: 'left',
|
||||||
|
searchType: 'select',
|
||||||
|
searchOptions: [], // will be set by Options call to projects resource
|
||||||
excludeModal: true
|
excludeModal: true
|
||||||
},
|
},
|
||||||
last_updated: {
|
last_updated: {
|
||||||
@@ -63,12 +65,13 @@ angular.module('ProjectsListDefinition', [])
|
|||||||
awToolTip: 'Create a new project'
|
awToolTip: 'Create a new project'
|
||||||
},
|
},
|
||||||
help: {
|
help: {
|
||||||
awPopOver: "<dl>\n<dt>Updating</dt><dd>An SCM update is in progress.</dd>\n" +
|
awPopOver: "<dl>\n<dt>Updating</dt><dd>A source control update is in progress.</dd>\n" +
|
||||||
"<dt>Never Updated</dt><dd>No SCM update has ever run for the project.</dd>\n" +
|
"<dt>Never Updated</dt><dd>This project has not yet been updated from source control.</dd>\n" +
|
||||||
"<dt>Failed</dt><dd>An error occurred during the most recent SCM update.</dd>\n" +
|
"<dt>Failed</dt><dd>An error occurred during the most recent source control update, click the status " +
|
||||||
"<dt>Successful</dt><dd>The latest SCM update ran to completion without incident.</dd>\n" +
|
"text for more information.</dd>\n" +
|
||||||
"<dt>Missing</dt><dd>The local project directory is missing.</dd>\n" +
|
"<dt>Successful</dt><dd>TThe latest source control update completed successfully.</dd>\n" +
|
||||||
"<dt>N/A</dt><dd>The project does not use SCM, so an update status is not available.</dd>\n" +
|
"<dt>Missing</dt><dd>The previously configured local project directory is missing.</dd>\n" +
|
||||||
|
"<dt>N/A</dt><dd>The project is not linked to source control, so updates are not applicable.</dd>\n" +
|
||||||
"</dl>\n",
|
"</dl>\n",
|
||||||
dataPlacement: 'left',
|
dataPlacement: 'left',
|
||||||
dataContainer: 'body',
|
dataContainer: 'body',
|
||||||
@@ -76,6 +79,7 @@ angular.module('ProjectsListDefinition', [])
|
|||||||
mode: 'all',
|
mode: 'all',
|
||||||
'class': 'btn-xs btn-info btn-help',
|
'class': 'btn-xs btn-info btn-help',
|
||||||
awToolTip: 'Click for help',
|
awToolTip: 'Click for help',
|
||||||
|
awTipPlacement: 'top',
|
||||||
dataTitle: 'Project Status',
|
dataTitle: 'Project Status',
|
||||||
iconSize: 'large'
|
iconSize: 'large'
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -238,7 +238,13 @@ angular.module('AWDirectives', ['RestServices', 'Utilities', 'AuthService', 'Hos
|
|||||||
.directive('awToolTip', function() {
|
.directive('awToolTip', function() {
|
||||||
return function(scope, element, attrs) {
|
return function(scope, element, attrs) {
|
||||||
var delay = (attrs.delay != undefined && attrs.delay != null) ? attrs.delay : $AnsibleConfig.tooltip_delay;
|
var delay = (attrs.delay != undefined && attrs.delay != null) ? attrs.delay : $AnsibleConfig.tooltip_delay;
|
||||||
var placement = (attrs.placement != undefined && attrs.placement != null) ? attrs.placement : 'left';
|
var placement;
|
||||||
|
if (attrs.awTipPlacement) {
|
||||||
|
placement = attrs.awTipPlacement;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
placement = (attrs.placement != undefined && attrs.placement != null) ? attrs.placement : 'left';
|
||||||
|
}
|
||||||
$(element).on('hidden.bs.tooltip', function( ) {
|
$(element).on('hidden.bs.tooltip', function( ) {
|
||||||
// TB3RC1 is leaving behind tooltip <div> elements. This will remove them
|
// TB3RC1 is leaving behind tooltip <div> elements. This will remove them
|
||||||
// after a tooltip fades away. If not, they lay overtop of other elements and
|
// after a tooltip fades away. If not, they lay overtop of other elements and
|
||||||
|
|||||||
@@ -59,6 +59,9 @@ angular.module('GeneratorHelpers', ['GeneratorHelpers'])
|
|||||||
case 'dataTitle':
|
case 'dataTitle':
|
||||||
result = "data-title=\"" + value + "\" ";
|
result = "data-title=\"" + value + "\" ";
|
||||||
break;
|
break;
|
||||||
|
case 'awTipPlacement':
|
||||||
|
result = "aw-tip-placement=\"" + value + "\" ";
|
||||||
|
break;
|
||||||
case 'columnShow':
|
case 'columnShow':
|
||||||
result = "ng-show=\"" + value + "\" ";
|
result = "ng-show=\"" + value + "\" ";
|
||||||
break;
|
break;
|
||||||
@@ -139,6 +142,7 @@ angular.module('GeneratorHelpers', ['GeneratorHelpers'])
|
|||||||
html += (btn.ngHide) ? Attr(btn, 'ngHide') : "";
|
html += (btn.ngHide) ? Attr(btn, 'ngHide') : "";
|
||||||
html += (btn.ngDisabled) ? Attr(btn, 'ngHide') : "";
|
html += (btn.ngDisabled) ? Attr(btn, 'ngHide') : "";
|
||||||
html += (btn.ngClass) ? Attr(btn, 'ngClass') : "";
|
html += (btn.ngClass) ? Attr(btn, 'ngClass') : "";
|
||||||
|
html += (btn.awTipPlacement) ? Attr(btn, 'awTipPlacement') : "";
|
||||||
html += " >";
|
html += " >";
|
||||||
html += (btn['img']) ? "<img src=\"" + $basePath + "img/" + btn.img + "\" style=\"width: 12px; height: 12px;\" >" : "";
|
html += (btn['img']) ? "<img src=\"" + $basePath + "img/" + btn.img + "\" style=\"width: 12px; height: 12px;\" >" : "";
|
||||||
html += (btn['icon']) ? Attr(btn,'icon') : "";
|
html += (btn['icon']) ? Attr(btn,'icon') : "";
|
||||||
|
|||||||
Reference in New Issue
Block a user