Adds ability to upload config dir to k8s in config
This commit is contained in:
parent
3d4e43c8d1
commit
d387ba171f
10 changed files with 138 additions and 84 deletions
5
config_app/js/components/cor-loader/cor-loader.html
Normal file
5
config_app/js/components/cor-loader/cor-loader.html
Normal file
|
@ -0,0 +1,5 @@
|
|||
<div class="co-m-loader co-an-fade-in-out">
|
||||
<div class="co-m-loader-dot__one"></div>
|
||||
<div class="co-m-loader-dot__two"></div>
|
||||
<div class="co-m-loader-dot__three"></div>
|
||||
</div>
|
15
config_app/js/components/cor-loader/cor-loader.js
Normal file
15
config_app/js/components/cor-loader/cor-loader.js
Normal file
|
@ -0,0 +1,15 @@
|
|||
const templateUrl = require('./cor-loader.html');
|
||||
|
||||
angular.module('quay-config')
|
||||
.directive('corLoader', function() {
|
||||
var directiveDefinitionObject = {
|
||||
templateUrl,
|
||||
replace: true,
|
||||
restrict: 'C',
|
||||
scope: {
|
||||
},
|
||||
controller: function($rootScope, $scope, $element) {
|
||||
}
|
||||
};
|
||||
return directiveDefinitionObject;
|
||||
});
|
|
@ -18,7 +18,15 @@
|
|||
</div>
|
||||
<!-- Body -->
|
||||
<div class="modal-body">
|
||||
<span>gotteeem</span>
|
||||
<div class="cor-loader" ng-if="$ctrl.loading"></div>
|
||||
The following deployments will be affected:
|
||||
<li ng-repeat="deployment in $ctrl.deployments">
|
||||
name: {{deployment}}
|
||||
</li>
|
||||
<button class="btn btn-lg" ng-click="$ctrl.deployConfiguration()">
|
||||
<i class="far fa-paper-plane" style="margin-right: 10px;"></i>
|
||||
Populate configuration to deployments
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
</div>
|
||||
|
|
|
@ -7,14 +7,30 @@ const templateUrl = require('./kube-deploy-modal.component.html');
|
|||
})
|
||||
export class KubeDeployModalComponent {
|
||||
private loading: boolean = true;
|
||||
private deployments: any;
|
||||
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)
|
||||
})
|
||||
}
|
||||
}
|
Reference in a new issue