mirror of
https://github.com/ansible/awx.git
synced 2026-03-23 11:55:04 -02:30
Add structure for sandboxed job results
This commit is contained in:
committed by
Jake McDermott
parent
0554e62f70
commit
212ab96a31
@@ -4,6 +4,7 @@ import atLibModels from '~models';
|
|||||||
|
|
||||||
import atFeaturesApplications from '~features/applications';
|
import atFeaturesApplications from '~features/applications';
|
||||||
import atFeaturesCredentials from '~features/credentials';
|
import atFeaturesCredentials from '~features/credentials';
|
||||||
|
import atFeaturesOutput from '~features/output';
|
||||||
import atFeaturesTemplates from '~features/templates';
|
import atFeaturesTemplates from '~features/templates';
|
||||||
import atFeaturesUsers from '~features/users';
|
import atFeaturesUsers from '~features/users';
|
||||||
import atFeaturesJobs from '~features/jobs';
|
import atFeaturesJobs from '~features/jobs';
|
||||||
@@ -18,7 +19,9 @@ angular.module(MODULE_NAME, [
|
|||||||
atFeaturesCredentials,
|
atFeaturesCredentials,
|
||||||
atFeaturesTemplates,
|
atFeaturesTemplates,
|
||||||
atFeaturesUsers,
|
atFeaturesUsers,
|
||||||
atFeaturesJobs
|
atFeaturesJobs,
|
||||||
|
atFeaturesOutput,
|
||||||
|
atFeaturesTemplates
|
||||||
]);
|
]);
|
||||||
|
|
||||||
export default MODULE_NAME;
|
export default MODULE_NAME;
|
||||||
|
|||||||
4
awx/ui/client/features/output/index.controller.js
Normal file
4
awx/ui/client/features/output/index.controller.js
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
function JobsIndexController () {
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = JobsIndexController;
|
||||||
35
awx/ui/client/features/output/index.js
Normal file
35
awx/ui/client/features/output/index.js
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
import JobsStrings from '~features/output/jobs.strings';
|
||||||
|
import IndexController from '~features/output/index.controller';
|
||||||
|
|
||||||
|
const indexTemplate = require('~features/output/index.view.html');
|
||||||
|
|
||||||
|
const MODULE_NAME = 'at.features.output';
|
||||||
|
|
||||||
|
function JobsRun ($stateExtender, strings) {
|
||||||
|
$stateExtender.addState({
|
||||||
|
name: 'jobz',
|
||||||
|
route: '/jobz',
|
||||||
|
ncyBreadcrumb: {
|
||||||
|
label: strings.get('state.TITLE')
|
||||||
|
},
|
||||||
|
data: {
|
||||||
|
activityStream: true,
|
||||||
|
activityStreamTarget: 'jobs'
|
||||||
|
},
|
||||||
|
views: {
|
||||||
|
templateUrl: indexTemplate,
|
||||||
|
controller: IndexController,
|
||||||
|
controllerAs: 'vm'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
JobsRun.$inject = ['$stateExtender', 'JobsStrings'];
|
||||||
|
|
||||||
|
angular
|
||||||
|
.module(MODULE_NAME, [])
|
||||||
|
.controller('indexController', IndexController)
|
||||||
|
.service('JobsStrings', JobsStrings)
|
||||||
|
.run(JobsRun);
|
||||||
|
|
||||||
|
export default MODULE_NAME;
|
||||||
3
awx/ui/client/features/output/index.view.html
Normal file
3
awx/ui/client/features/output/index.view.html
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<p>
|
||||||
|
test
|
||||||
|
</p>
|
||||||
14
awx/ui/client/features/output/jobs.strings.js
Normal file
14
awx/ui/client/features/output/jobs.strings.js
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
function JobsStrings (BaseString) {
|
||||||
|
BaseString.call(this, 'jobs');
|
||||||
|
|
||||||
|
const { t } = this;
|
||||||
|
const ns = this.jobs;
|
||||||
|
|
||||||
|
ns.state = {
|
||||||
|
TITLE: t.s('JOBZ')
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
JobsStrings.$inject = ['BaseStringService'];
|
||||||
|
|
||||||
|
export default JobsStrings;
|
||||||
19
awx/ui/client/lib/models/Jobs.js
Normal file
19
awx/ui/client/lib/models/Jobs.js
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
let BaseModel;
|
||||||
|
|
||||||
|
function JobsModel (method, resource, config) {
|
||||||
|
BaseModel.call(this, 'jobs');
|
||||||
|
|
||||||
|
this.Constructor = JobsModel;
|
||||||
|
|
||||||
|
return this.create(method, resource, config);
|
||||||
|
}
|
||||||
|
|
||||||
|
function JobsModelLoader (_BaseModel_) {
|
||||||
|
BaseModel = _BaseModel_;
|
||||||
|
|
||||||
|
return JobsModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
JobsModelLoader.$inject = ['BaseModel'];
|
||||||
|
|
||||||
|
export default JobsModelLoader;
|
||||||
Reference in New Issue
Block a user