1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-02 12:25:22 +02:00

fix(app): add github action for linting and formatting [EE-2344] (#6356)

This commit is contained in:
Chaim Lev-Ari 2022-01-17 07:53:32 +02:00 committed by GitHub
parent 34cc8ea96a
commit 1b1a50d6b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
313 changed files with 2685 additions and 3873 deletions

View file

@ -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>