1
0
mirror of https://github.com/goharbor/harbor synced 2025-04-19 16:26:10 +00:00

Add secret to download file when refreshing robot secret ()

Signed-off-by: AllForNothing <sshijun@vmware.com>
This commit is contained in:
孙世军 2022-03-22 17:21:46 +08:00 committed by GitHub
parent 33da8e2bcc
commit f37f93b735
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -90,6 +90,7 @@ export class ViewTokenComponent implements OnInit {
this.copyToken = true; this.copyToken = true;
this.createSuccess = 'SYSTEM_ROBOT.REFRESH_SECRET_SUCCESS'; this.createSuccess = 'SYSTEM_ROBOT.REFRESH_SECRET_SUCCESS';
// export to token file // export to token file
robot.secret = res.secret;
const downLoadUrl = `data:text/json;charset=utf-8, ${encodeURIComponent(JSON.stringify(robot))}`; const downLoadUrl = `data:text/json;charset=utf-8, ${encodeURIComponent(JSON.stringify(robot))}`;
this.downLoadHref = this.sanitizer.bypassSecurityTrustUrl(downLoadUrl); this.downLoadHref = this.sanitizer.bypassSecurityTrustUrl(downLoadUrl);
this.downLoadFileName = `${robot.name}.json`; this.downLoadFileName = `${robot.name}.json`;