mirror of https://github.com/portainer/portainer
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 warningpull/4734/head
parent
8323e22309
commit
68d42617f2
|
@ -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.
|
||||||
|
|
|
@ -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(),
|
||||||
|
|
Loading…
Reference in New Issue