Add structure for sandboxed job results

This commit is contained in:
gconsidine 2017-11-02 17:01:12 -04:00 committed by Jake McDermott
parent 0554e62f70
commit 212ab96a31
6 changed files with 79 additions and 1 deletions

View File

@ -4,6 +4,7 @@ import atLibModels from '~models';
import atFeaturesApplications from '~features/applications';
import atFeaturesCredentials from '~features/credentials';
import atFeaturesOutput from '~features/output';
import atFeaturesTemplates from '~features/templates';
import atFeaturesUsers from '~features/users';
import atFeaturesJobs from '~features/jobs';
@ -18,7 +19,9 @@ angular.module(MODULE_NAME, [
atFeaturesCredentials,
atFeaturesTemplates,
atFeaturesUsers,
atFeaturesJobs
atFeaturesJobs,
atFeaturesOutput,
atFeaturesTemplates
]);
export default MODULE_NAME;

View File

@ -0,0 +1,4 @@
function JobsIndexController () {
}
module.exports = JobsIndexController;

View 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;

View File

@ -0,0 +1,3 @@
<p>
test
</p>

View 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;

View 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;