mirror of
https://github.com/portainer/portainer.git
synced 2025-08-02 20:35:25 +02:00
fix(app): add github action for linting and formatting [EE-2344] (#6356)
This commit is contained in:
parent
34cc8ea96a
commit
1b1a50d6b5
313 changed files with 2685 additions and 3873 deletions
|
@ -1,6 +1,4 @@
|
|||
<kubernetes-view-header title="Cluster" state="kubernetes.cluster" view-ready="ctrl.state.viewReady">
|
||||
Cluster information
|
||||
</kubernetes-view-header>
|
||||
<kubernetes-view-header title="Cluster" state="kubernetes.cluster" view-ready="ctrl.state.viewReady"> Cluster information </kubernetes-view-header>
|
||||
|
||||
<kubernetes-view-loading view-ready="ctrl.state.viewReady"></kubernetes-view-loading>
|
||||
|
||||
|
@ -27,21 +25,19 @@
|
|||
|
||||
<!-- leader-status -->
|
||||
<div ng-if="ctrl.systemEndpoints.length > 0">
|
||||
<div class="col-sm-12 form-section-title">
|
||||
Leader status
|
||||
</div>
|
||||
<div class="col-sm-12 form-section-title"> Leader status </div>
|
||||
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr class="text-muted">
|
||||
<td style="border-top: none; width: 25%;">Component</td>
|
||||
<td style="border-top: none; width: 25%;">Leader node</td>
|
||||
<td style="border-top: none; width: 25%">Component</td>
|
||||
<td style="border-top: none; width: 25%">Leader node</td>
|
||||
</tr>
|
||||
<tr ng-repeat="ep in ctrl.systemEndpoints">
|
||||
<td style="width: 25%;">
|
||||
<td style="width: 25%">
|
||||
{{ ep.Name }}
|
||||
</td>
|
||||
<td style="width: 25%;">
|
||||
<td style="width: 25%">
|
||||
{{ ep.HolderIdentity }}
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -13,20 +13,18 @@
|
|||
<uib-tab index="0" classes="btn-sm" select="ctrl.selectTab(0)">
|
||||
<uib-tab-heading> <i class="fa fa-hdd space-right" aria-hidden="true"></i> Node </uib-tab-heading>
|
||||
|
||||
<form class="form-horizontal" name="kubernetesNodeUpdateForm" style="padding: 20px;" autocomplete="off">
|
||||
<form class="form-horizontal" name="kubernetesNodeUpdateForm" style="padding: 20px" autocomplete="off">
|
||||
<table class="table">
|
||||
<tbody ng-if="ctrl.node">
|
||||
<tr>
|
||||
<td>Hostname</td>
|
||||
<td>
|
||||
{{ ctrl.node.Name }}
|
||||
<span class="label label-primary image-tag" style="margin-left: 5px;" ng-if="ctrl.node.Api">api</span>
|
||||
<span class="label label-primary image-tag" style="margin-left: 5px" ng-if="ctrl.node.Api">api</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr ng-if="ctrl.node.Api">
|
||||
<td>
|
||||
Kubernetes API
|
||||
</td>
|
||||
<td> Kubernetes API </td>
|
||||
<td>{{ ctrl.node.IPAddress }}:{{ ctrl.node.Port }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -53,21 +51,19 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="col-xs-3">
|
||||
Availability
|
||||
</td>
|
||||
<td class="col-xs-3"> Availability </td>
|
||||
<td class="col-xs-9">
|
||||
<select class="form-control" name="availability" style="display: inline-block; width: 16rem;" ng-model="ctrl.formValues.Availability">
|
||||
<select class="form-control" name="availability" style="display: inline-block; width: 16rem" ng-model="ctrl.formValues.Availability">
|
||||
<option>{{ ctrl.availabilities.ACTIVE }}</option>
|
||||
<option>{{ ctrl.availabilities.PAUSE }}</option>
|
||||
<option>{{ ctrl.availabilities.DRAIN }}</option>
|
||||
</select>
|
||||
<span class="small text-warning" ng-if="ctrl.state.isDrainOperation && ctrl.formValues.Availability === ctrl.availabilities.DRAIN">
|
||||
<i class="fa fa-exclamation-circle orange-icon" aria-hidden="true" style="margin-right: 2px;"></i>
|
||||
<i class="fa fa-exclamation-circle orange-icon" aria-hidden="true" style="margin-right: 2px"></i>
|
||||
Cannot use this action while another node is currently being drained.
|
||||
</span>
|
||||
<span class="small text-warning" ng-if="ctrl.state.isContainPortainer && ctrl.formValues.Availability === ctrl.availabilities.DRAIN">
|
||||
<i class="fa fa-exclamation-circle orange-icon" aria-hidden="true" style="margin-right: 2px;"></i>
|
||||
<i class="fa fa-exclamation-circle orange-icon" aria-hidden="true" style="margin-right: 2px"></i>
|
||||
Cannot drain a node where this Portainer instance is running.
|
||||
</span>
|
||||
</td>
|
||||
|
@ -75,7 +71,7 @@
|
|||
</tbody>
|
||||
</table>
|
||||
|
||||
<div style="padding: 8px;">
|
||||
<div style="padding: 8px">
|
||||
<kubernetes-resource-reservation
|
||||
ng-if="ctrl.resourceReservation"
|
||||
cpu-reservation="ctrl.resourceReservation.CPU"
|
||||
|
@ -90,17 +86,15 @@
|
|||
</kubernetes-resource-reservation>
|
||||
</div>
|
||||
|
||||
<div style="padding: 8px;">
|
||||
<div style="padding: 8px">
|
||||
<!-- #region labels -->
|
||||
<div class="col-sm-12 form-section-title">
|
||||
Labels
|
||||
</div>
|
||||
<div class="col-sm-12 form-section-title"> Labels </div>
|
||||
|
||||
<div style="margin-bottom: 10px;">
|
||||
<div style="margin-bottom: 10px">
|
||||
<span class="label label-default interactive" ng-click="ctrl.addLabel()"> <i class="fa fa-plus-circle" aria-hidden="true"></i> add label </span>
|
||||
</div>
|
||||
|
||||
<div class="form-inline" ng-repeat="label in ctrl.formValues.Labels" style="padding: 3px 0 3px 0;">
|
||||
<div class="form-inline" ng-repeat="label in ctrl.formValues.Labels" style="padding: 3px 0 3px 0">
|
||||
<div class="input-group col-sm-3 input-group-sm" ng-class="{ striked: label.NeedsDeletion }">
|
||||
<span class="input-group-addon">Key</span>
|
||||
<input
|
||||
|
@ -125,20 +119,20 @@
|
|||
/>
|
||||
</div>
|
||||
<div class="input-group col-sm-1 input-group-sm">
|
||||
<div style="white-space: nowrap;">
|
||||
<div style="white-space: nowrap">
|
||||
<button ng-if="!ctrl.isSystemLabel($index) && !label.NeedsDeletion" class="btn btn-sm btn-danger" type="button" ng-click="ctrl.removeLabel($index)">
|
||||
<i class="fa fa-times" aria-hidden="true"></i>
|
||||
</button>
|
||||
<button ng-if="!ctrl.isSystemLabel($index) && label.NeedsDeletion" class="btn btn-sm btn-primary" type="button" ng-click="ctrl.restoreLabel($index)">
|
||||
Restore
|
||||
</button>
|
||||
<span class="label label-warning label-sm image-tag" ng-if="label.IsUsed && !ctrl.isSystemLabel($index)" style="margin-left: 5px;">used</span>
|
||||
<span class="label label-info image-tag" ng-if="ctrl.isSystemLabel($index)" style="margin-left: 5px;">system</span>
|
||||
<span class="label label-warning label-sm image-tag" ng-if="label.IsUsed && !ctrl.isSystemLabel($index)" style="margin-left: 5px">used</span>
|
||||
<span class="label label-info image-tag" ng-if="ctrl.isSystemLabel($index)" style="margin-left: 5px">system</span>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="small text-warning"
|
||||
style="margin-top: 5px;"
|
||||
style="margin-top: 5px"
|
||||
ng-show="kubernetesNodeUpdateForm['label_key_' + $index].$invalid || ctrl.state.duplicateLabelKeys[$index] !== undefined"
|
||||
>
|
||||
<ng-messages for="kubernetesNodeUpdateForm['label_key_' + $index].$error">
|
||||
|
@ -154,15 +148,13 @@
|
|||
|
||||
<!-- #region taints -->
|
||||
|
||||
<div class="col-sm-12 form-section-title" style="margin-top: 20px;">
|
||||
Taints
|
||||
</div>
|
||||
<div class="col-sm-12 form-section-title" style="margin-top: 20px"> Taints </div>
|
||||
|
||||
<div style="margin-bottom: 10px;">
|
||||
<div style="margin-bottom: 10px">
|
||||
<span class="label label-default interactive" ng-click="ctrl.addTaint()"> <i class="fa fa-plus-circle" aria-hidden="true"></i> add taint </span>
|
||||
</div>
|
||||
|
||||
<div class="form-inline" ng-repeat="taint in ctrl.formValues.Taints" style="padding: 3px 0 3px 0;">
|
||||
<div class="form-inline" ng-repeat="taint in ctrl.formValues.Taints" style="padding: 3px 0 3px 0">
|
||||
<div class="input-group col-sm-3 input-group-sm" ng-class="{ striked: taint.NeedsDeletion }">
|
||||
<span class="input-group-addon">Key</span>
|
||||
<input type="text" class="form-control" name="taint_key_{{ $index }}" ng-model="taint.Key" ng-change="ctrl.onChangeTaintKey($index)" required />
|
||||
|
@ -188,14 +180,12 @@
|
|||
<button ng-if="!taint.NeedsDeletion" class="btn btn-sm btn-danger" type="button" ng-click="ctrl.removeTaint($index)">
|
||||
<i class="fa fa-times" aria-hidden="true"></i>
|
||||
</button>
|
||||
<button ng-if="taint.NeedsDeletion" class="btn btn-sm btn-primary" type="button" ng-click="ctrl.restoreTaint($index)">
|
||||
Restore
|
||||
</button>
|
||||
<button ng-if="taint.NeedsDeletion" class="btn btn-sm btn-primary" type="button" ng-click="ctrl.restoreTaint($index)"> Restore </button>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="small text-warning"
|
||||
style="margin-top: 5px;"
|
||||
style="margin-top: 5px"
|
||||
ng-show="kubernetesNodeUpdateForm['taint_key_' + $index].$invalid || ctrl.state.duplicateTaintKeys[$index] !== undefined"
|
||||
>
|
||||
<ng-messages for="kubernetesNodeUpdateForm['taint_key_' + $index].$error">
|
||||
|
@ -211,24 +201,20 @@
|
|||
|
||||
<!-- #region actions -->
|
||||
|
||||
<div class="col-sm-12 form-section-title" style="margin-top: 20px;">
|
||||
Actions
|
||||
</div>
|
||||
<div class="col-sm-12 form-section-title" style="margin-top: 20px"> Actions </div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12">
|
||||
<button
|
||||
class="btn btn-primary btn-sm"
|
||||
type="button"
|
||||
style="margin-left: 0;"
|
||||
style="margin-left: 0"
|
||||
ng-click="ctrl.updateNode()"
|
||||
ng-disabled="kubernetesNodeUpdateForm.$invalid || !ctrl.isFormValid()"
|
||||
>
|
||||
Update node
|
||||
</button>
|
||||
<button class="btn btn-default btn-sm" type="button" ng-click="ctrl.resetFormValues()" ng-disabled="ctrl.isNoChangesMade()">
|
||||
Cancel
|
||||
</button>
|
||||
<button class="btn btn-default btn-sm" type="button" ng-click="ctrl.resetFormValues()" ng-disabled="ctrl.isNoChangesMade()"> Cancel </button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -240,7 +226,7 @@
|
|||
<uib-tab-heading>
|
||||
<i class="fa fa-history space-right" aria-hidden="true"></i> Events
|
||||
<div ng-if="ctrl.hasEventWarnings()">
|
||||
<i class="fa fa-exclamation-circle orange-icon" aria-hidden="true" style="margin-right: 2px;"></i>
|
||||
<i class="fa fa-exclamation-circle orange-icon" aria-hidden="true" style="margin-right: 2px"></i>
|
||||
{{ ctrl.state.eventWarningCount }} warning(s)
|
||||
</div>
|
||||
</uib-tab-heading>
|
||||
|
@ -258,7 +244,7 @@
|
|||
</uib-tab>
|
||||
<uib-tab index="2" ng-if="ctrl.node.Yaml" select="ctrl.showEditor()" classes="btn-sm">
|
||||
<uib-tab-heading> <i class="fa fa-code space-right" aria-hidden="true"></i> YAML </uib-tab-heading>
|
||||
<div style="padding-right: 25px;" ng-if="ctrl.state.showEditorTab">
|
||||
<div style="padding-right: 25px" ng-if="ctrl.state.showEditorTab">
|
||||
<kubernetes-yaml-inspector key="node-yaml" data="ctrl.node.Yaml"> </kubernetes-yaml-inspector>
|
||||
</div>
|
||||
</uib-tab>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<div ng-if="ctrl.state.viewReady">
|
||||
<information-panel ng-if="!ctrl.state.getMetrics" title-text="Unable to retrieve node metrics">
|
||||
<span class="small text-muted">
|
||||
<i class="fa fa-exclamation-circle orange-icon" aria-hidden="true" style="margin-right: 2px;"></i>
|
||||
<i class="fa fa-exclamation-circle orange-icon" aria-hidden="true" style="margin-right: 2px"></i>
|
||||
Portainer was unable to retrieve any metrics associated to that node. Please contact your administrator to ensure that the Kubernetes metrics feature is properly configured.
|
||||
</span>
|
||||
</information-panel>
|
||||
|
@ -27,9 +27,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="refreshRate" class="col-sm-3 col-md-2 col-lg-2 margin-sm-top control-label text-left">
|
||||
Refresh rate
|
||||
</label>
|
||||
<label for="refreshRate" class="col-sm-3 col-md-2 col-lg-2 margin-sm-top control-label text-left"> Refresh rate </label>
|
||||
<div class="col-sm-3 col-md-2">
|
||||
<select id="refreshRate" ng-model="ctrl.state.refreshRate" ng-change="ctrl.changeUpdateRepeater()" class="form-control">
|
||||
<option value="30">30s</option>
|
||||
|
@ -37,7 +35,7 @@
|
|||
</select>
|
||||
</div>
|
||||
<span>
|
||||
<i id="refreshRateChange" class="fa fa-check green-icon" aria-hidden="true" style="margin-top: 7px; display: none;"></i>
|
||||
<i id="refreshRateChange" class="fa fa-check green-icon" aria-hidden="true" style="margin-top: 7px; display: none"></i>
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
|
@ -51,7 +49,7 @@
|
|||
<rd-widget>
|
||||
<rd-widget-header icon="fa-chart-area" title-text="Memory usage"></rd-widget-header>
|
||||
<rd-widget-body>
|
||||
<div class="chart-node" style="position: relative;">
|
||||
<div class="chart-node" style="position: relative">
|
||||
<canvas id="memoryChart" width="770" height="300"></canvas>
|
||||
</div>
|
||||
</rd-widget-body>
|
||||
|
@ -61,7 +59,7 @@
|
|||
<rd-widget>
|
||||
<rd-widget-header icon="fa-chart-area" title-text="CPU usage"></rd-widget-header>
|
||||
<rd-widget-body>
|
||||
<div class="chart-node" style="position: relative;">
|
||||
<div class="chart-node" style="position: relative">
|
||||
<canvas id="cpuChart" width="770" height="300"></canvas>
|
||||
</div>
|
||||
</rd-widget-body>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue