Add secret to download file when refreshing robot secret (#16564)

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.createSuccess = 'SYSTEM_ROBOT.REFRESH_SECRET_SUCCESS';
// export to token file
robot.secret = res.secret;
const downLoadUrl = `data:text/json;charset=utf-8, ${encodeURIComponent(JSON.stringify(robot))}`;
this.downLoadHref = this.sanitizer.bypassSecurityTrustUrl(downLoadUrl);
this.downLoadFileName = `${robot.name}.json`;