mirror of
https://github.com/ansible/awx.git
synced 2024-11-01 16:51:11 +03:00
Update PR based on review changes
* Remove unnecessary translates * Extend show Refresh Button * Update smart search sort and page size params
This commit is contained in:
parent
46f5f5da00
commit
ae209af566
@ -12,6 +12,7 @@ export default
|
||||
|
||||
scope.showActivityStreamButton = false;
|
||||
scope.showRefreshButton = false;
|
||||
scope.alwaysShowRefreshButton = false;
|
||||
scope.loadingLicense = true;
|
||||
|
||||
scope.$on("$stateChangeSuccess", function updateActivityStreamButton(event, toState, toParams, fromState, fromParams) {
|
||||
@ -48,6 +49,7 @@ export default
|
||||
}
|
||||
|
||||
scope.showRefreshButton = (streamConfig && streamConfig.refreshButton) ? true : false;
|
||||
scope.alwaysShowRefreshButton = (streamConfig && streamConfig.alwaysShowRefreshButton) ? true: false;
|
||||
});
|
||||
|
||||
// scope.$on('featuresLoaded', function(){
|
||||
|
@ -8,7 +8,7 @@
|
||||
data-trigger="hover"
|
||||
data-container="body"
|
||||
ng-hide= "loadingLicense || licenseMissing"
|
||||
ng-if="(socketStatus === 'error' && showRefreshButton) || $state.includes('instanceGroups')"
|
||||
ng-if="(socketStatus === 'error' && showRefreshButton) || alwaysShowRefreshButton"
|
||||
ng-click="refresh()">
|
||||
<i class="BreadCrumb-menuLinkImage fa fa-refresh"
|
||||
alt="Refresh the page">
|
||||
|
@ -3,18 +3,18 @@
|
||||
<div class="col-xs-12">
|
||||
<div class="List-header">
|
||||
<div class="List-title">
|
||||
<div class="List-titleText">{{ instanceGroupName | translate }}</div>
|
||||
<div class="List-titleText">{{ instanceGroupName }}</div>
|
||||
</div>
|
||||
<div class="List-details">
|
||||
<div class="Capacity-details">
|
||||
<p class="Capacity-details--label" translate>Capacity</p>
|
||||
<capacity-bar capacity="instanceGroupCapacity"></capacity-bar>
|
||||
<span class="Capacity-details--percentage">{{ instanceGroupCapacity | translate }}%</span>
|
||||
<span class="Capacity-details--percentage">{{ instanceGroupCapacity }}%</span>
|
||||
</div>
|
||||
<div class="RunningJobs-details">
|
||||
<p class="RunningJobs-details--label" translate>Running Jobs</p>
|
||||
<span class="badge List-titleBadge">
|
||||
{{ instanceGroupJobsRunning | translate}}
|
||||
{{ instanceGroupJobsRunning }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -9,6 +9,17 @@ export default {
|
||||
parent: 'setup',
|
||||
label: N_('INSTANCE GROUPS')
|
||||
},
|
||||
params: {
|
||||
instance_group_search: {
|
||||
value: {
|
||||
page_size: '10',
|
||||
order_by: 'name'
|
||||
}
|
||||
}
|
||||
},
|
||||
data: {
|
||||
alwaysShowRefreshButton: true,
|
||||
},
|
||||
views: {
|
||||
'@': {
|
||||
templateUrl: templateUrl('./instance-groups/instance-groups'),
|
||||
|
@ -8,6 +8,15 @@ export default {
|
||||
parent: 'instanceGroups.instances.list',
|
||||
label: N_('{{ breadcrumb.instance_name }}')
|
||||
},
|
||||
params: {
|
||||
instance_job_search: {
|
||||
value: {
|
||||
page_size: '10',
|
||||
order_by: '-finished',
|
||||
not__launch_type: 'sync'
|
||||
}
|
||||
}
|
||||
},
|
||||
views: {
|
||||
'list@instanceGroups.instances.list.job': {
|
||||
templateProvider: function(InstanceJobsList, generateList) {
|
||||
|
@ -3,18 +3,18 @@
|
||||
<div class="col-xs-12">
|
||||
<div class="List-header">
|
||||
<div class="List-title">
|
||||
<div class="List-titleText">{{ instanceName | translate }}</div>
|
||||
<div class="List-titleText">{{ instanceName }}</div>
|
||||
</div>
|
||||
<div class="List-details">
|
||||
<div class="Capacity-details">
|
||||
<p class="Capacity-details--label" translate>Capacity</p>
|
||||
<capacity-bar capacity="instanceCapacity"></capacity-bar>
|
||||
<span class="Capacity-details--percentage">{{ instanceCapacity | translate }}%</span>
|
||||
<span class="Capacity-details--percentage">{{ instanceCapacity }}%</span>
|
||||
</div>
|
||||
<div class="RunningJobs-details">
|
||||
<p class="RunningJobs-details--label" translate>Running Jobs</p>
|
||||
<span class="badge List-titleBadge">
|
||||
{{ instanceJobsRunning | translate }}
|
||||
{{ instanceJobsRunning }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -27,13 +27,13 @@
|
||||
<!-- ngRepeat: instance in instances -->
|
||||
<tr ng-class="{isActive: isActive(instance.id)}" id="instance.id" class="List-tableRow instance_class ng-scope" ng-repeat="instance in instances">
|
||||
<td class="List-tableCell hostname-column col-md-5 col-sm-5 col-xs-5">
|
||||
<a ui-sref="instanceGroups.instances.list.job.list({instance_id: instance.id})" class="ng-binding">{{ instance.hostname | translate }}</a></td>
|
||||
<a ui-sref="instanceGroups.instances.list.job.list({instance_id: instance.id})" class="ng-binding">{{ instance.hostname }}</a></td>
|
||||
<td class="List-tableCell List-tableCell--capacityRemainingColumn ng-binding">
|
||||
<capacity-bar capacity="instance.percent_capacity_remaining"></capacity-bar><span>{{ instance.percent_capacity_remaining | translate }}%</span>
|
||||
<capacity-bar capacity="instance.percent_capacity_remaining"></capacity-bar><span>{{ instance.percent_capacity_remaining }}%</span>
|
||||
</td>
|
||||
<td class="List-tableCell jobs_running-column ng-binding">
|
||||
<a ui-sref="instanceGroups.instances.jobs({instance_group_id: $stateParams.instance_group_id})">
|
||||
{{ instance.jobs_running | translate }}
|
||||
{{ instance.jobs_running }}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -12,7 +12,7 @@ export default {
|
||||
params: {
|
||||
instance_search: {
|
||||
value: {
|
||||
page_size: '5',
|
||||
page_size: '10',
|
||||
order_by: 'hostname'
|
||||
}
|
||||
}
|
||||
|
@ -9,10 +9,11 @@ export default {
|
||||
label: N_('JOBS')
|
||||
},
|
||||
params: {
|
||||
instance_group_job_search: {
|
||||
job_search: {
|
||||
value: {
|
||||
page_size: '5',
|
||||
order_by: 'name'
|
||||
page_size: '10',
|
||||
order_by: '-finished',
|
||||
not__launch_type: 'sync'
|
||||
}
|
||||
},
|
||||
instance_group_id: null
|
||||
|
@ -4,7 +4,7 @@
|
||||
INSTANCE GROUPS
|
||||
</div>
|
||||
<span class="badge List-titleBadge">
|
||||
{{ instanceGroupCount | translate}}
|
||||
{{ instanceGroupCount }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@ -38,15 +38,15 @@
|
||||
<!-- ngRepeat: instance_group in instance_groups -->
|
||||
<tr ng-class="{isActive: isActive(instance_group.id)}" id="instance_group.id" class="List-tableRow instance_group_class ng-scope" ng-repeat="instance_group in instance_groups">
|
||||
<td class="List-tableCell name-column col-md-5 col-sm-5 col-xs-5">
|
||||
<a ui-sref="instanceGroups.instances.list({instance_group_id: instance_group.id})" class="ng-binding" >{{ instance_group.name | translate }}</a>
|
||||
<span class="badge List-titleBadge">{{ instance_group.instances | translate }}</span>
|
||||
<a ui-sref="instanceGroups.instances.list({instance_group_id: instance_group.id})" class="ng-binding" >{{ instance_group.name }}</a>
|
||||
<span class="badge List-titleBadge">{{ instance_group.instances }}</span>
|
||||
</td>
|
||||
<td class="List-tableCell List-tableCell--capacityRemainingColumn ng-binding">
|
||||
<capacity-bar capacity="instance_group.percent_capacity_remaining"></capacity-bar><span>{{ instance_group.percent_capacity_remaining | translate }}%</span>
|
||||
<capacity-bar capacity="instance_group.percent_capacity_remaining"></capacity-bar><span>{{ instance_group.percent_capacity_remaining }}%</span>
|
||||
</td>
|
||||
<td class="List-tableCell jobs_running-column ng-binding">
|
||||
<a ui-sref="instanceGroups.instances.jobs({instance_group_id: instance_group.id})">
|
||||
{{ instance_group.jobs_running | translate }}
|
||||
{{ instance_group.jobs_running }}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -4,7 +4,7 @@ export default ['templateUrl', function(templateUrl) {
|
||||
scope: {
|
||||
instanceGroups: '='
|
||||
},
|
||||
templateUrl: templateUrl('instance-groups/instance-groups-multiselect/instance-groups-modal/instance-groups-modal'),
|
||||
templateUrl: templateUrl('shared/instance-groups-multiselect/instance-groups-modal/instance-groups-modal'),
|
||||
|
||||
link: function(scope, element) {
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div id="instance-groups-modal-body"> {{ instance_group | translate }} </div>
|
||||
<div id="instance-groups-modal-body"> {{ instance_group }} </div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" ng-click="cancelForm()" class="Lookup-cancel btn btn-default" translate>CANCEL</button>
|
||||
|
@ -6,7 +6,7 @@ export default ['templateUrl', '$compile',
|
||||
instanceGroups: '='
|
||||
},
|
||||
restrict: 'E',
|
||||
templateUrl: templateUrl('instance-groups/instance-groups-multiselect/instance-groups'),
|
||||
templateUrl: templateUrl('shared/instance-groups-multiselect/instance-groups'),
|
||||
controller: instanceGroupsMultiselectController,
|
||||
link: function(scope) {
|
||||
scope.openInstanceGroupsModal = function() {
|
||||
|
@ -11,7 +11,7 @@
|
||||
<i class="fa fa-times LabelList-tagDelete"></i>
|
||||
</div>
|
||||
<div class="LabelList-tag LabelList-tag--deletable">
|
||||
<span class="LabelList-name">{{ tag.name | translate }}</span>
|
||||
<span class="LabelList-name">{{ tag.name }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</span>
|
||||
|
Loading…
Reference in New Issue
Block a user