This repository has been archived on 2020-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
quay/config_app/js/components/kube-deploy-modal/kube-deploy-modal.component.ts

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)
})
}
}