diff --git a/frontend/app/components/common/path-heleper/path-helper.service.js b/frontend/app/components/common/path-heleper/path-helper.service.js index b693f2a9d1..188043628b 100644 --- a/frontend/app/components/common/path-heleper/path-helper.service.js +++ b/frontend/app/components/common/path-heleper/path-helper.service.js @@ -217,6 +217,11 @@ function PathHelper() { return PathHelper.apiWorkPackagesPath() + '/column_sums'; }, + // API V2 + apiV2ProjectsPath: function() { + return PathHelper.apiV2 + '/projects'; + }, + // API V3 apiConfigurationPath: function() { return PathHelper.apiV3 + '/configuration'; diff --git a/frontend/app/timelines/services/timeline-loader-service.js b/frontend/app/timelines/services/timeline-loader-service.js index 901e1a9769..b6394074ab 100644 --- a/frontend/app/timelines/services/timeline-loader-service.js +++ b/frontend/app/timelines/services/timeline-loader-service.js @@ -604,7 +604,7 @@ module.exports = function($q, FilterQueryStringBuilder, Color, HistoricalPlannin this.loader = new QueueingLoader(options.ajax_defaults); this.dataEnhancer = new DataEnhancer(timeline); - this.globalPrefix = PathHelper.staticBase + PathHelper.apiV2; + this.globalPrefix = PathHelper.apiV2; this.die = function () { this.dataEnhancer.die.apply(this.dataEnhancer, arguments); @@ -659,8 +659,7 @@ module.exports = function($q, FilterQueryStringBuilder, Color, HistoricalPlannin }; TimelineLoader.prototype.registerProjectReportings = function () { - var projectPrefix = this.globalPrefix + - PathHelper.projectsPath() + + var projectPrefix = PathHelper.apiV2ProjectsPath() + "/" + this.options.project_id; @@ -691,8 +690,7 @@ module.exports = function($q, FilterQueryStringBuilder, Color, HistoricalPlannin }; TimelineLoader.prototype.registerGlobalElements = function () { - var projectPrefix = this.globalPrefix + - PathHelper.projectsPath() + + var projectPrefix = PathHelper.apiV2ProjectsPath() + "/" + this.options.project_id; @@ -818,8 +816,7 @@ module.exports = function($q, FilterQueryStringBuilder, Color, HistoricalPlannin TimelineLoader.prototype.registerPlanningElements = function (ids) { this.inChunks(ids, function (projectIdsOfPacket, i) { - var projectPrefix = this.globalPrefix + - PathHelper.projectsPath() + + var projectPrefix = PathHelper.apiV2ProjectsPath() + "/" + projectIdsOfPacket.join(','); @@ -850,8 +847,7 @@ module.exports = function($q, FilterQueryStringBuilder, Color, HistoricalPlannin TimelineLoader.prototype.registerPlanningElementsByID = function (ids) { this.inChunks(ids, function (planningElementIdsOfPacket, i) { - var projectPrefix = this.globalPrefix + - PathHelper.projectsPath() + + var projectPrefix = PathHelper.apiV2ProjectsPath() + "/" + this.options.project_id;