Fixes actions list can't be obtained when creating/editing jobs

change the method in get_url for jobs and actions:
1. change "origin" into "href";
2. change the relative path.

Change-Id: I91eeee8988f6ceb6d1b98bee89d6208f66e239ef
Closes-bug: #1524617
This commit is contained in:
sibaoli 2015-12-10 15:08:45 +08:00
parent f64e3fef94
commit 5639930484

View File

@ -31,15 +31,15 @@ var job_id = $('#id_job_id').val();
function get_url() {
var url = $(location).attr("origin");
url += '/disaster_recovery/api/actions/job/';
var url = $(location).attr("href");
url += 'api/actions/job/';
url += job_id;
return url;
}
function get_actions_url() {
var url = $(location).attr("origin");
url += '/disaster_recovery/api/actions';
var url = $(location).attr("href");
url += 'api/actions';
return url;
}