Tech debt: environment folder path should be provided by API
From this -> https://gitlab.com/gitlab-org/gitlab-ce/issues/29922#note_26055800
The environment folder path is now being calculated in the Frontend using window.location
object and the folder name sent in the API:
return `${window.location.pathname}/folders/${this.model.folderName}`;
And in the folder view, we are also using window.location
object to get the folder name we render:
const folderName = pathname.substr(pathname.lastIndexOf('/') + 1);
Both should be sent by API, note that this are 2 different endpoints.
Suggestion: Use ID to build the URL instead of folder name to avoid problems with special chars.