36 lines
No EOL
1.1 KiB
TypeScript
36 lines
No EOL
1.1 KiB
TypeScript
import {Component, Inject} from 'ng-metadata/core';
|
|
const templateUrl = require('./kube-deploy-modal.component.html');
|
|
|
|
@Component({
|
|
selector: 'kube-deploy-modal',
|
|
templateUrl,
|
|
})
|
|
export class KubeDeployModalComponent {
|
|
private loading: boolean = true;
|
|
private deployments: [string];
|
|
|
|
constructor(@Inject('ApiService') private ApiService) {
|
|
ApiService.scGetNumDeployments().then(resp => {
|
|
console.log(resp)
|
|
this.deployments = resp.items.map(dep => dep.metadata.name);
|
|
console.log(this.deployments);
|
|
this.loading = false;
|
|
}).catch(err => {
|
|
this.loading = false;
|
|
})
|
|
}
|
|
|
|
deployConfiguration(): void {
|
|
console.log('calling deploy conf')
|
|
this.ApiService.scDeployConfiguration().then(resp => {
|
|
console.log('resp from deploy was', resp)
|
|
this.ApiService.scCycleQEDeployment().then(() => {
|
|
console.log('merp')
|
|
}).catch(err => {
|
|
console.log(err)
|
|
})
|
|
}).catch(err => {
|
|
console.log(err)
|
|
})
|
|
}
|
|
} |