mirror of
https://github.com/ansible/awx.git
synced 2026-03-08 05:01:09 -02:30
few remaining routes to fixup
This commit is contained in:
@@ -16,17 +16,19 @@ export default {
|
|||||||
return FeaturesService.get();
|
return FeaturesService.get();
|
||||||
}],
|
}],
|
||||||
inventory_script:
|
inventory_script:
|
||||||
[ '$route',
|
[ '$state',
|
||||||
|
'$stateParams',
|
||||||
'$q',
|
'$q',
|
||||||
'Rest',
|
'Rest',
|
||||||
'GetBasePath',
|
'GetBasePath',
|
||||||
'ProcessErrors',
|
'ProcessErrors',
|
||||||
function($route, $q, rest, getBasePath, ProcessErrors) {
|
function($state, $stateParams, $q, rest, getBasePath, ProcessErrors) {
|
||||||
if ($route.current.hasModelKey('inventory_script')) {
|
// if ($stateParams.inventory_script) {
|
||||||
return $q.when($route.current.params.model.inventory_script);
|
// $stateParams.inventory_script = JSON.parse($stateParams.inventory_script);
|
||||||
}
|
// return $q.when($stateParams.inventory_script);
|
||||||
|
// }
|
||||||
|
|
||||||
var inventoryScriptId = $route.current.params.inventory_script;
|
var inventoryScriptId = $stateParams.inventory_script;
|
||||||
|
|
||||||
var url = getBasePath('inventory_scripts') + inventoryScriptId + '/';
|
var url = getBasePath('inventory_scripts') + inventoryScriptId + '/';
|
||||||
rest.setUrl(url);
|
rest.setUrl(url);
|
||||||
|
|||||||
@@ -38,7 +38,8 @@ export default
|
|||||||
scope.search(list.iterator);
|
scope.search(list.iterator);
|
||||||
|
|
||||||
scope.editCustomInv = function(){
|
scope.editCustomInv = function(){
|
||||||
$state.transitionTo('inventoryScriptsEdit', {
|
// this.inventory_script = JSON.stringify(this.inventory_script);
|
||||||
|
$state.go('inventoryScriptsEdit',{
|
||||||
inventory_script: this.inventory_script.id
|
inventory_script: this.inventory_script.id
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -252,7 +252,7 @@ export default
|
|||||||
|
|
||||||
scope.configureSchedule = function() {
|
scope.configureSchedule = function() {
|
||||||
$state.transitionTo('managementJobsSchedule', {
|
$state.transitionTo('managementJobsSchedule', {
|
||||||
management_job: this.configure_job
|
management_job: this.configure_job.id
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -16,17 +16,17 @@ export default {
|
|||||||
return FeaturesService.get();
|
return FeaturesService.get();
|
||||||
}],
|
}],
|
||||||
management_job:
|
management_job:
|
||||||
[ '$route',
|
[ '$stateParams',
|
||||||
'$q',
|
'$q',
|
||||||
'Rest',
|
'Rest',
|
||||||
'GetBasePath',
|
'GetBasePath',
|
||||||
'ProcessErrors',
|
'ProcessErrors',
|
||||||
function($route, $q, rest, getBasePath, ProcessErrors) {
|
function($stateParams, $q, rest, getBasePath, ProcessErrors) {
|
||||||
if ($route.current.hasModelKey('management_job')) {
|
// if ($route.current.hasModelKey('management_job')) {
|
||||||
return $q.when($route.current.params.model.management_job);
|
// return $q.when($route.current.params.model.management_job);
|
||||||
}
|
// }
|
||||||
|
|
||||||
var managementJobId = $route.current.params.management_job;
|
var managementJobId = $stateParams.management_job;
|
||||||
|
|
||||||
var url = getBasePath('system_job_templates') + managementJobId + '/';
|
var url = getBasePath('system_job_templates') + managementJobId + '/';
|
||||||
rest.setUrl(url);
|
rest.setUrl(url);
|
||||||
|
|||||||
Reference in New Issue
Block a user