Initial k8s support in libplayground (#216)
* Initial k8s support in libplayground * Make tasks never give up + custom event for k8s cluster status
This commit is contained in:
@@ -330,6 +330,20 @@
|
||||
$scope.$apply();
|
||||
});
|
||||
|
||||
socket.on('instance k8s status', function(status) {
|
||||
if (!$scope.idx[status.instance]) {
|
||||
return
|
||||
}
|
||||
if (status.is_manager) {
|
||||
$scope.idx[status.instance].isK8sManager = true
|
||||
} else if (status.is_worker) {
|
||||
$scope.idx[status.instance].isK8sManager = false
|
||||
} else {
|
||||
$scope.idx[status.instance].isK8sManager = null
|
||||
}
|
||||
$scope.$apply();
|
||||
});
|
||||
|
||||
socket.on('instance docker ports', function(status) {
|
||||
if (!$scope.idx[status.instance]) {
|
||||
return
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
<md-content layout-padding>
|
||||
<md-button ng-click="newInstance()" ng-disabled="isInstanceBeingCreated" class="md-primary">{{newInstanceBtnText}}</md-button>
|
||||
<md-list class="md-dense" flex>
|
||||
<md-list-item ng-switch on="instance.isManager" class="md-2-line" ng-repeat="instance in instances | orderBy:'hostname'" ng-click="showInstance(instance)" ng-class="instance.name == selectedInstance.name ? 'selected' : false">
|
||||
<md-list-item ng-switch on="instance.isManager || instance.isK8sManager" class="md-2-line" ng-repeat="instance in instances | orderBy:'hostname'" ng-click="showInstance(instance)" ng-class="instance.name == selectedInstance.name ? 'selected' : false">
|
||||
<md-icon ng-switch-when="true" style="color: blue" md-svg-icon="person"></md-icon>
|
||||
<md-icon ng-switch-when="false" md-svg-icon="person-outline"></md-icon>
|
||||
<div class="md-list-item-text" layout="column">
|
||||
|
||||
Reference in New Issue
Block a user