UX Audit fixes to Mgmt Jobs

This commit is contained in:
Jared Tabor 2016-05-09 13:56:40 -04:00
parent 8a1d06789b
commit 5218644f0b
9 changed files with 53 additions and 49 deletions

View File

@ -216,6 +216,10 @@
border:1px solid @field-border-sel;
}
.Form-monospace{
font-family: Menlo,Monaco,Consolas,"Courier New",monospace!important;
}
.ui-spinner{
height: 30px;
background-color: @field-secondary-bg;

View File

@ -79,24 +79,7 @@ export default
dataTitle: 'Type',
dataPlacement: 'right',
dataContainer: "body",
hasSubForm: true,
// helpCollapse: [{
// hdr: 'Select a Credential Type',
// content: '<dl>\n' +
// '<dt>Machine</dt>\n' +
// '<dd>Authentication for remote machine access. This can include SSH keys, usernames, passwords, ' +
// 'and sudo information. Machine credentials are used when submitting jobs to run playbooks against ' +
// 'remote hosts.</dd>' +
// '<dt>Source Control</dt>\n' +
// '<dd>Used to check out and synchronize playbook repositories with a remote source control ' +
// 'management system such as Git, Subversion (svn), or Mercurial (hg). These credentials are ' +
// 'used on the Projects tab.</dd>\n' +
// '<dt>Others (Cloud Providers)</dt>\n' +
// '<dd>Access keys for authenticating to the specific ' +
// 'cloud provider, usually used for inventory sync ' +
// 'and deployment.</dd>\n' +
// '</dl>\n'
// }]
hasSubForm: true
},
access_key: {
label: 'Access Key',
@ -255,6 +238,7 @@ export default
init: true
},
class: 'Form-textAreaLabel Form-formGroup--fullWidth',
elementClass: 'Form-monospace',
hintText: "{{ key_hint }}",
addRequired: false,
editRequired: false,

View File

@ -49,7 +49,6 @@ export default
script: scope.script
})
.success(function (data) {
$rootScope.addedItem = data.id;
$state.go('inventoryScripts', {}, {reload: true});
Wait('stop');
})

View File

@ -79,9 +79,8 @@ export default
script: $scope.script
})
.success(function () {
$state.transitionTo('inventoryScriptsList');
$state.transitionTo('inventoryScripts');
Wait('stop');
})
.error(function (data, status) {
ProcessErrors($scope, data, status, form, { hdr: 'Error!',

View File

@ -48,6 +48,7 @@ export default function() {
type: 'textarea',
hintText: "Drag and drop an inventory script on the field below",
class: 'Form-formGroup--fullWidth',
elementClass: 'Form-monospace',
addRequired: true,
editRequired: true,
awDropFile: true,

View File

@ -7,16 +7,14 @@
// import listGenerator from 'tower/shared/list-generator/main';
export default
[ 'Wait', '$location' , '$compile', 'CreateDialog',
'GetBasePath' , 'SearchInit' , 'PaginateInit',
'SchedulesList',
'Rest' , 'ProcessErrors', 'managementJobsListObject', '$rootScope',
'$state','$scope',
function( Wait, $location, $compile, CreateDialog,
GetBasePath, SearchInit, PaginateInit,
SchedulesList,
Rest, ProcessErrors, managementJobsListObject, $rootScope,
$state, $scope) {
[ 'Wait', '$location' , '$compile', 'CreateDialog', 'GetBasePath' ,
'SearchInit' , 'PaginateInit', 'SchedulesList', 'Rest' ,
'ProcessErrors', 'managementJobsListObject', '$rootScope', '$state',
'$scope', 'CreateSelect2',
function( Wait, $location, $compile, CreateDialog, GetBasePath,
SearchInit, PaginateInit, SchedulesList, Rest, ProcessErrors,
managementJobsListObject, $rootScope, $state, $scope,
CreateSelect2) {
var defaultUrl = GetBasePath('system_job_templates');
@ -154,6 +152,14 @@ export default
// $('#configure-tower-dialog').dialog('close');
$('#prompt-for-days-facts').show();
$('#prompt-for-days-facts').dialog('open');
CreateSelect2({
element: '#keep_unit',
multiple: false
});
CreateSelect2({
element: '#granularity_keep_unit',
multiple: false
});
Wait('stop');
});
};
@ -238,7 +244,7 @@ export default
};
$scope.chooseRunJob = function(id, name) {
if(id === 4) {
if(this.card.job_type === "cleanup_facts") {
// Run only for 'Cleanup Fact Details'
$scope.submitCleanupJob(id, name);
} else {

View File

@ -16,17 +16,20 @@
<h3 class="MgmtCards-label"> {{ card.name }}</h3>
<div class="MgmtCards-actionItems">
<button class="MgmtCards-actionItem List-actionButton"
ng-click='goToNotifications(card, card.id)'>
<i class="MgmtCards-actionItemIcon fa fa-bell-o"></i>
</button>
<button class="MgmtCards-actionItem List-actionButton"
ng-click='chooseRunJob(card.id, card.name)'>
ng-click='chooseRunJob(card.id, card.name)'
data-placement="top" aw-tool-tip="Launch Management Job" data-original-title="" title="">
<i class="MgmtCards-actionItemIcon fa fa-rocket"></i>
</button>
<button class="MgmtCards-actionItem List-actionButton"
ng-click='configureSchedule(card.id)'>
ng-click='configureSchedule(card.id)'
data-placement="top" aw-tool-tip="Schedule Management Job" data-original-title="" title="">
<i class="MgmtCards-actionItemIcon fa fa-calendar"></i>
</button>
<button class="MgmtCards-actionItem List-actionButton"
ng-click='goToNotifications(card, card.id)'
data-placement="top" aw-tool-tip="Configure Notifications" data-original-title="" title="">
<i class="MgmtCards-actionItemIcon fa fa-bell-o"></i>
</button>
</div>
</div>
<!-- End Card Header -->

View File

@ -22,6 +22,14 @@
border-left: 5px solid #337AB7;
}
.MgmtCards-card--promptElements{
padding-top: 10px;
}
// .MgmtCards-promptText{
// color:@default-interface-txt;
// }
.MgmtCards-header {
display: flex;
flex-wrap: nowrap;

View File

@ -157,9 +157,9 @@
<div id="help-modal-dialog" style="display: none;"></div>
<div id="prompt-for-days" style="display:none">
<form name="prompt_for_days_form" id="prompt_for_days_form">
<form name="prompt_for_days_form" id="prompt_for_days_form" class="MgmtCards-promptText">
Set how many days of data should be retained. <br>
<input type="integer" id="days_to_keep" name="days_to_keep" ng-model="days_to_keep" ng-required="true" class="form-control" min=0 max=9999 style="margin-top:10px;" integer>
<input type="integer" id="days_to_keep" name="days_to_keep" ng-model="days_to_keep" ng-required="true" class="form-control Form-textInput" min=0 max=9999 style="margin-top:10px;" integer>
<div class="error" ng-show="prompt_for_days_form.days_to_keep.$dirty && (prompt_for_days_form.days_to_keep.$error.number || prompt_for_days_form.days_to_keep.$error.integer ||
prompt_for_days_form.days_to_keep.$error.required ||
prompt_for_days_form.days_to_keep.$error.min ||
@ -167,7 +167,7 @@
</form>
</div>
<div id="prompt-for-days-facts" style="display:none">
<form name="prompt_for_days_facts_form" id="prompt_for_days_facts_form">
<form name="prompt_for_days_facts_form" id="prompt_for_days_facts_form" class="MgmtCards-promptText">
<div style="padding-bottom:15px;">For facts collected older than the time period specified,
save one fact scan (snapshot) per time window (frequency).
For example, facts older than 30 days are purged, while one
@ -182,11 +182,11 @@
</span>
</label>
<div class="row">
<div class="col-xs-4">
<input type="integer" id="keep_amount" name="keep_amount" ng-model="keep_amount" ng-required="true" class="form-control" min=0 max=9999 style="margin-top:10px;" integer></input>
<div class="col-xs-6">
<input type="integer" id="keep_amount" name="keep_amount" ng-model="keep_amount" ng-required="true" class="form-control Form-textInput MgmtCards-card--promptElements" min=0 max=9999 integer></input>
</div>
<div class="col-xs-4">
<select id="keep_unit" name="keep_unit" ng-model="keep_unit" ng-options="type.label for type in keep_unit_choices track by type.value" ng-required="true" class="form-control" style="margin-top:10px;"></select>
<div class="col-xs-6">
<select id="keep_unit" name="keep_unit" ng-model="keep_unit" ng-options="type.label for type in keep_unit_choices track by type.value" ng-required="true" class="form-control MgmtCards-card--promptElements"></select>
</div>
</div>
<div class="error" ng-show="prompt_for_days_facts_form.keep_amount.$dirty && (prompt_for_days_facts_form.keep_amount.$error.number || prompt_for_days_facts_form.keep_amount.$error.integer ||
@ -201,12 +201,12 @@
</span>
</label>
<div class="row">
<div class="col-xs-4">
<input type="integer" id="granularity_keep_amount" name="granularity_keep_amount" ng-model="granularity_keep_amount" ng-required="true" class="form-control" min=0 max=9999 style="margin-top:10px;" integer></input>
<div class="col-xs-6">
<input type="integer" id="granularity_keep_amount" name="granularity_keep_amount" ng-model="granularity_keep_amount" ng-required="true" class="form-control Form-textInput MgmtCards-card--promptElements" min=0 max=9999 integer></input>
</div>
<div class="col-xs-4">
<div class="col-xs-6">
<select id="granularity_keep_unit" name="granularity_keep_unit" ng-model="granularity_keep_unit"
ng-options="type.label for type in granularity_keep_unit_choices track by type.value" ng-required="true" class="form-control" style="margin-top:10px;"></select>
ng-options="type.label for type in granularity_keep_unit_choices track by type.value" ng-required="true" class="form-control MgmtCards-card--promptElements" ></select>
</div>
</div>
<div class="error" ng-show="prompt_for_days_facts_form.granularity_keep_amount.$dirty && (prompt_for_days_facts_form.granularity_keep_amount.$error.number || prompt_for_days_facts_form.granularity_keep_amount.$error.integer ||