1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-22 14:59:41 +02:00
portainer/app/kubernetes/components/kube-config-download-button/kube-config-download-button.controller.js
zees-dev b4f4ef701a
feat(kubeconfig): kubeconfig download functionality EE-1202 (#5386)
* backend migration/backport

* Feat(kubeconfig): kubeconfig download button frontend EE-1202 (#5385)

* kubeconfig download button frontend

* fix kubeconfig download button

* backend migration/backport

* moved ng-if up one level

Co-authored-by: zees-dev <dev.786zshan@gmail.com>

* resolved conflicts, updated code

* - kube-config -> kube-config-download-button
- fixed kubeconfig file name (bug)

Co-authored-by: Richard Wei <54336863+WaysonWei@users.noreply.github.com>
2021-08-31 10:07:50 +12:00

15 lines
393 B
JavaScript

export default class KubeConfigController {
/* @ngInject */
constructor($window, KubernetesConfigService) {
this.$window = $window;
this.KubernetesConfigService = KubernetesConfigService;
}
async downloadKubeconfig() {
await this.KubernetesConfigService.downloadConfig();
}
$onInit() {
this.state = { isHTTPS: this.$window.location.protocol === 'https:' };
}
}