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

fix the issue that access key function doesn't work when prefix path is configured #2929

Merged
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
@RestController
public class PrefixPathController {

@Value("${prefixPath:}")
@Value("${prefix.path:}")
private String prefixPath;

@GetMapping("/prefix-path")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ <h4 class="modal-title">{{'Config.AccessKeyManage' | translate }} (
</div>
<div class="col-md-5 text-right">
<a type="button" class="btn btn-info" data-dismiss="modal"
href="/config.html?#appid={{pageContext.appId}}">{{'Common.ReturnToIndex' | translate }}
href="{{ '/config.html' | prefixPath }}?#appid={{pageContext.appId}}">{{'Common.ReturnToIndex' | translate }}
</a>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion apollo-portal/src/main/resources/static/config.html
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@

<apolloentrance apollo-title="'Config.AccessKeyManage' | translate"
apollo-img-src="'accesskey-manage'"
apollo-href="'/app/access_key.html?#/appid=' + pageContext.appId"></apolloentrance>
apollo-href="'app/access_key.html?#/appid=' + pageContext.appId"></apolloentrance>

<a class="list-group-item" ng-show="missEnvs.length > 0" ng-click="createAppInMissEnv()">
<div class="row icon-text icon-plus-orange">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
appService.service('AccessKeyService', ['$resource', '$q', function ($resource, $q) {
appService.service('AccessKeyService', ['$resource', '$q', 'AppUtil', function ($resource, $q, AppUtil) {
var access_key_resource = $resource('', {}, {
load_access_keys: {
method: 'GET',
isArray: true,
url: '/apps/:appId/envs/:env/accesskeys'
url: AppUtil.prefixPath() + '/apps/:appId/envs/:env/accesskeys'
},
create_access_key: {
method: 'POST',
url: '/apps/:appId/envs/:env/accesskeys'
url: AppUtil.prefixPath() + '/apps/:appId/envs/:env/accesskeys'
},
remove_access_key: {
method: 'DELETE',
url: '/apps/:appId/envs/:env/accesskeys/:id'
url: AppUtil.prefixPath() + '/apps/:appId/envs/:env/accesskeys/:id'
},
enable_access_key: {
method: 'PUT',
url: '/apps/:appId/envs/:env/accesskeys/:id/enable'
url: AppUtil.prefixPath() + '/apps/:appId/envs/:env/accesskeys/:id/enable'
},
disable_access_key: {
method: 'PUT',
url: '/apps/:appId/envs/:env/accesskeys/:id/disable'
url: AppUtil.prefixPath() + '/apps/:appId/envs/:env/accesskeys/:id/disable'
}
});
return {
Expand Down