Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix: fixed urls that missing the customized prefix such as '/apollo' #5138

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ Apollo 2.3.0
* [apollo assembly optimization](https://github.com/apolloconfig/apollo/pull/5035)
* [update the config item table column width](https://github.com/apolloconfig/apollo/pull/5131)
* [sync apollo portal server config to apollo quick start server](https://github.com/apolloconfig/apollo/pull/5134)

* [Fix missing **prefix path** of some URLs in Apollo Portal](https://github.com/apolloconfig/apollo/pull/5138)
nobodyiam marked this conversation as resolved.
Show resolved Hide resolved
------------------
nobodyiam marked this conversation as resolved.
Show resolved Hide resolved
All issues and pull requests are [here](https://github.com/apolloconfig/apollo/milestone/14?closed=1)
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ config_export_module.controller('ConfigExportController',
}

var selectedEnvStr = selectedEnvs.join(",");
$window.location.href = '/configs/export?envs=' + selectedEnvStr;
$window.location.href = AppUtil.prefixPath() + '/configs/export?envs=' + selectedEnvStr;

toastr.success($translate.instant('ConfigExport.ExportSuccess'));
};
Expand Down Expand Up @@ -93,7 +93,7 @@ config_export_module.controller('ConfigExportController',
form.append('file', file);
$http({
method: 'POST',
url: '/configs/import?envs=' + selectedEnvStr + "&conflictAction="
url: AppUtil.prefixPath() + '/configs/import?envs=' + selectedEnvStr + "&conflictAction="
+ $scope.conflictAction,
data: form,
headers: {'Content-Type': undefined},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function importNamespaceModalDirective($window, $q, $translate, $http, toastr, A
form.append('file', file);
$http({
method: 'POST',
url: '/apps/' + toImportNamespace.baseInfo.appId + '/envs/' + scope.env + '/clusters/'
url: AppUtil.prefixPath() + '/apps/' + toImportNamespace.baseInfo.appId + '/envs/' + scope.env + '/clusters/'
+ toImportNamespace.baseInfo.clusterName
+ '/namespaces/' + toImportNamespace.baseInfo.namespaceName + "/items/import",
data: form,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@
* limitations under the License.
*
*/
appService.service('ClusterService', ['$resource', '$q', function ($resource, $q) {
appService.service('ClusterService', ['$resource', '$q', 'AppUtil', function ($resource, $q, AppUtil) {
var cluster_resource = $resource('', {}, {
create_cluster: {
method: 'POST',
url: 'apps/:appId/envs/:env/clusters'
url: AppUtil.prefixPath() + 'apps/:appId/envs/:env/clusters'
},
load_cluster: {
method: 'GET',
url: 'apps/:appId/envs/:env/clusters/:clusterName'
url: AppUtil.prefixPath() + 'apps/:appId/envs/:env/clusters/:clusterName'
},
delete_cluster: {
method: 'DELETE',
url: 'apps/:appId/envs/:env/clusters/:clusterName'
url: AppUtil.prefixPath() + 'apps/:appId/envs/:env/clusters/:clusterName'
}
});
return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
* limitations under the License.
*
*/
appService.service('ExportService', ['$resource', '$q', function ($resource, $q) {
appService.service('ExportService', ['$resource', '$q', 'AppUtil', function ($resource, $q, AppUtil) {
var resource = $resource('', {}, {
importConfig: {
method: 'POST',
url: '/import',
url: AppUtil.prefixPath() + '/import',
headers: {'Content-Type': undefined},
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
* limitations under the License.
*
*/
appService.service('NamespaceLockService', ['$resource', '$q', function ($resource, $q) {
appService.service('NamespaceLockService', ['$resource', '$q', 'AppUtil', function ($resource, $q, AppUtil) {
var resource = $resource('', {}, {
get_namespace_lock: {
method: 'GET',
url: 'apps/:appId/envs/:env/clusters/:clusterName/namespaces/:namespaceName/lock-info'
url: AppUtil.prefixPath() + 'apps/:appId/envs/:env/clusters/:clusterName/namespaces/:namespaceName/lock-info'
}
});

Expand Down
Loading