feat(placement): Add a warning notification under the placement tab when an application cannot be scheduled on any node in the cluster (#4525)

* feat(placement): Add a warning notification under the placement tab when an application cannot be scheduled on any node in the cluster

* fix(applications): if there is at least one node the application can schedule on, then do not show the warning
pull/4734/head
Maxime Bajeux 2021-01-20 01:02:18 +01:00 committed by GitHub
parent 8323e22309
commit 68d42617f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View File

@ -135,7 +135,13 @@
</uib-tab> </uib-tab>
<uib-tab index="1" classes="btn-sm" select="ctrl.selectTab(1)"> <uib-tab index="1" classes="btn-sm" select="ctrl.selectTab(1)">
<uib-tab-heading> <i class="fas fa-compress-arrows-alt space-right" aria-hidden="true"></i> Placement </uib-tab-heading> <uib-tab-heading>
<i class="fas fa-compress-arrows-alt space-right" aria-hidden="true"></i> Placement
<div ng-if="ctrl.state.placementWarning">
<i class="fa fa-exclamation-circle orange-icon" aria-hidden="true" style="margin-right: 2px;"></i>
warning
</div>
</uib-tab-heading>
<div class="small text-muted" style="padding: 20px;"> <div class="small text-muted" style="padding: 20px;">
<i class="fa fa-info-circle blue-icon" aria-hidden="true" style="margin-right: 2px;"></i> <i class="fa fa-info-circle blue-icon" aria-hidden="true" style="margin-right: 2px;"></i>
The placement component helps you understand whether or not this application can be deployed on a specific node. The placement component helps you understand whether or not this application can be deployed on a specific node.

View File

@ -310,6 +310,7 @@ class KubernetesApplicationController {
}); });
this.placements = computePlacements(nodes, this.application); this.placements = computePlacements(nodes, this.application);
this.state.placementWarning = _.find(this.placements, { AcceptsApplication: true }) ? false : true;
} catch (err) { } catch (err) {
this.Notifications.error('Failure', err, 'Unable to retrieve application details'); this.Notifications.error('Failure', err, 'Unable to retrieve application details');
} finally { } finally {
@ -335,6 +336,7 @@ class KubernetesApplicationController {
name: this.$transition$.params().name, name: this.$transition$.params().name,
}, },
eventWarningCount: 0, eventWarningCount: 0,
placementWarning: false,
expandedNote: false, expandedNote: false,
useIngress: false, useIngress: false,
isAdmin: this.Authentication.isAdmin(), isAdmin: this.Authentication.isAdmin(),