mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 11:20:39 -03:30
fix jobs list header
This commit is contained in:
parent
b445e66ffa
commit
9ae88acc49
19
awx/ui/client/features/jobs/index.controller.js
Normal file
19
awx/ui/client/features/jobs/index.controller.js
Normal file
@ -0,0 +1,19 @@
|
||||
function IndexJobsController ($scope, strings, dataset) {
|
||||
const vm = this;
|
||||
vm.strings = strings;
|
||||
vm.count = dataset.data.count;
|
||||
|
||||
$scope.$on('updateDataset', (e, { count }) => {
|
||||
if (count) {
|
||||
vm.count = count;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
IndexJobsController.$inject = [
|
||||
'$scope',
|
||||
'JobsStrings',
|
||||
'Dataset'
|
||||
];
|
||||
|
||||
export default IndexJobsController;
|
||||
@ -3,7 +3,7 @@
|
||||
<at-panel ng-cloak id="htmlTemplate">
|
||||
<div>
|
||||
<div ng-hide="$state.includes('schedules')">
|
||||
<at-panel-heading title="{{:: vm.strings.get('list.PANEL_TITLE') }}" hide-dismiss="true">
|
||||
<at-panel-heading title="{{:: vm.strings.get('list.PANEL_TITLE') }}" hide-dismiss="true" badge="{{ vm.count }}">
|
||||
</at-panel-heading>
|
||||
<div ui-view="jobsList"></div>
|
||||
</div>
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
import { N_ } from '../../../src/i18n';
|
||||
import jobsListController from '../jobsList.controller';
|
||||
import indexController from '../index.controller';
|
||||
|
||||
const indexTemplate = require('~features/jobs/index.view.html');
|
||||
const jobsListTemplate = require('~features/jobs/jobsList.view.html');
|
||||
@ -59,10 +60,7 @@ export default {
|
||||
views: {
|
||||
'@': {
|
||||
templateUrl: indexTemplate,
|
||||
controller: ['JobsStrings', (strings) => {
|
||||
const vm = this || {};
|
||||
vm.strings = strings;
|
||||
}],
|
||||
controller: indexController,
|
||||
controllerAs: 'vm'
|
||||
},
|
||||
'jobsList@jobs': {
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
function IndexTemplatesController ($scope, strings, dataset) {
|
||||
let vm = this;
|
||||
const vm = this;
|
||||
vm.strings = strings;
|
||||
vm.count = dataset.data.count;
|
||||
|
||||
$scope.$on('updateDataset', (e, { count }) => {
|
||||
if (count) {
|
||||
vm.count = count;
|
||||
}
|
||||
if (count) {
|
||||
vm.count = count;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user