Skip to content

Commit

Permalink
bugfix: fixed urls that missing the customized prefix such as '/apollo'
Browse files Browse the repository at this point in the history
  • Loading branch information
xworks authored and xworks committed May 4, 2024
1 parent 3d14e6f commit ae2ab02
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
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)
------------------
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

0 comments on commit ae2ab02

Please sign in to comment.