mirror of
https://github.com/portainer/portainer.git
synced 2025-07-23 07:19:41 +02:00
feat(kubernetes): fetch config file with endpoint name (#5368) [EE-1159]
This commit is contained in:
parent
0ff9d49c6f
commit
5fd92d8a3f
2 changed files with 9 additions and 3 deletions
|
@ -9,7 +9,11 @@ class KubernetesConfigService {
|
|||
|
||||
async downloadConfig() {
|
||||
const response = await this.KubernetesConfig.get();
|
||||
return this.FileSaver.saveAs(response.data, 'config');
|
||||
|
||||
const headers = response.headers();
|
||||
const contentDispositionHeader = headers['content-disposition'];
|
||||
const filename = contentDispositionHeader.replace('attachment;', '').trim();
|
||||
return this.FileSaver.saveAs(response.data, filename);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue