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

refactor(app): replace angularjs tooltip with react [EE-3606] (#7172)

* refactor(app): replace angularjs tooltip with react
This commit is contained in:
Chaim Lev-Ari 2022-07-04 02:21:25 +03:00 committed by GitHub
parent ebc0a8c772
commit d7306fb22e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
61 changed files with 146 additions and 227 deletions

View file

@ -89,7 +89,7 @@
<div class="form-group" ng-if="$ctrl.formValues.IsSimple && entry.IsBinary">
<label for="configuration_data_value_{{ index }}" class="col-sm-1 control-label text-left">Value</label>
<div class="col-sm-11 control-label small text-muted text-left"
>Binary data <portainer-tooltip position="bottom" message="This key holds binary data and cannot be displayed."></portainer-tooltip
>Binary data <portainer-tooltip message="'This key holds binary data and cannot be displayed.'"></portainer-tooltip
></div>
</div>

View file

@ -769,8 +769,7 @@
<label for="memory-limit" class="col-sm-3 col-lg-2 control-label text-left" style="margin-top: 20px">
Memory
<portainer-tooltip
position="bottom"
message="An instance of this application will reserve this amount of memory. If the instance memory usage exceeds the reservation, it might be subject to OOM."
message="'An instance of this application will reserve this amount of memory. If the instance memory usage exceeds the reservation, it might be subject to OOM.'"
>
</portainer-tooltip>
</label>
@ -815,8 +814,7 @@
<label for="cpu-limit" class="col-sm-3 col-lg-2 control-label text-left" style="margin-top: 20px">
CPU
<portainer-tooltip
position="bottom"
message="An instance of this application will reserve this amount of CPU. If the instance CPU usage exceeds the reservation, it might be subject to CPU throttling."
message="'An instance of this application will reserve this amount of CPU. If the instance CPU usage exceeds the reservation, it might be subject to CPU throttling.'"
>
</portainer-tooltip>
</label>
@ -995,10 +993,7 @@
<td style="width: 33%; border: none; padding: 2px 0 2px 0">Maximum instances</td>
<td style="width: 33%; border: none; padding: 2px 0 2px 0">
Target CPU usage (<b>%</b>)
<portainer-tooltip
position="bottom"
message="The autoscaler will ensure enough instances are running to maintain an average CPU usage across all instances."
>
<portainer-tooltip message="'The autoscaler will ensure enough instances are running to maintain an average CPU usage across all instances.'">
</portainer-tooltip>
</td>
</tr>

View file

@ -300,7 +300,7 @@
<td style="width: 33%">Maximum instances</td>
<td style="width: 33%">
Target CPU usage
<portainer-tooltip position="bottom" message="The autoscaler will ensure enough instances are running to maintain an average CPU usage across all instances.">
<portainer-tooltip message="'The autoscaler will ensure enough instances are running to maintain an average CPU usage across all instances.'">
</portainer-tooltip>
</td>
</tr>
@ -422,7 +422,7 @@
<div class="small text-muted" style="margin-bottom: 15px">
Data access policy: <i class="fa {{ ctrl.application.DataAccessPolicy | kubernetesApplicationDataAccessPolicyIcon }}" aria-hidden="true"></i>
{{ ctrl.application.DataAccessPolicy | kubernetesApplicationDataAccessPolicyText }}
<portainer-tooltip position="right" message="{{ ctrl.application.DataAccessPolicy | kubernetesApplicationDataAccessPolicyTooltip }}"> </portainer-tooltip>
<portainer-tooltip position="'right'" message="ctrl.application.DataAccessPolicy | kubernetesApplicationDataAccessPolicyTooltip"> </portainer-tooltip>
</div>
<table class="table" ng-if="ctrl.application.DataAccessPolicy === ctrl.ApplicationDataAccessPolicies.SHARED">

View file

@ -20,7 +20,7 @@
<div class="col-sm-12">
<label class="control-label text-left">
Auto-refresh
<portainer-tooltip position="bottom" message="Automatically refresh logs every 5 seconds"></portainer-tooltip>
<portainer-tooltip message="'Automatically refresh logs every 5 seconds'"></portainer-tooltip>
</label>
<label class="switch" style="margin-left: 20px"> <input type="checkbox" ng-model="ctrl.state.autoRefresh" ng-change="ctrl.updateAutoRefresh()" /><i></i> </label>
</div>

View file

@ -28,10 +28,7 @@
<div class="form-group" ng-if="ctrl.formValues.Namespace">
<div class="col-sm-12">
<label for="toggle_logo" class="control-label text-left"> Use namespace(s) specified from manifest </label>
<portainer-tooltip
position="bottom"
message="If you have defined namespaces in your deployment file turning this on will enforce the use of those only in the deployment"
>
<portainer-tooltip message="'If you have defined namespaces in your deployment file turning this on will enforce the use of those only in the deployment'">
</portainer-tooltip>
<label class="switch" style="margin-left: 20px"> <input type="checkbox" name="toggle_logo" ng-model="ctrl.formValues.namespace_toggle" /><i></i> </label>
</div>

View file

@ -218,8 +218,7 @@
<label class="control-label text-left">
Hostnames
<portainer-tooltip
position="bottom"
message="Hostnames associated to the ingress inside this namespace. Users will be able to expose and access their applications over the ingress via one of these hostname."
message="'Hostnames associated to the ingress inside this namespace. Users will be able to expose and access their applications over the ingress via one of these hostname.'"
>
</portainer-tooltip>
</label>
@ -297,8 +296,7 @@
<i class="fa fa-plus-circle" aria-hidden="true"></i> add annotation
</span>
<portainer-tooltip
position="bottom"
message="Use annotations to configure options for an ingress. Review Nginx or Traefik documentation to find the annotations supported by your choice of ingress type."
message="'Use annotations to configure options for an ingress. Review Nginx or Traefik documentation to find the annotations supported by your choice of ingress type.'"
>
</portainer-tooltip>
<span
@ -312,8 +310,7 @@
</span>
<portainer-tooltip
ng-if="ic.IngressClass.Type === $ctrl.IngressClassTypes.NGINX"
position="bottom"
message="When the exposed URLs for your applications differ from the specified paths in the ingress, use the rewrite target annotation to denote the path to redirect to."
message="'When the exposed URLs for your applications differ from the specified paths in the ingress, use the rewrite target annotation to denote the path to redirect to.'"
>
</portainer-tooltip>
<span
@ -327,8 +324,7 @@
</span>
<portainer-tooltip
ng-if="ic.IngressClass.Type === $ctrl.IngressClassTypes.NGINX"
position="bottom"
message="Enable use of regular expressions in ingress paths (set in the ingress details of an application). Use this along with rewrite-target to specify the regex capturing group to be replaced, e.g. path regex of ^/foo/(,*) and rewrite-target of /bar/$1 rewrites example.com/foo/account to example.com/bar/account."
message="'Enable use of regular expressions in ingress paths (set in the ingress details of an application). Use this along with rewrite-target to specify the regex capturing group to be replaced, e.g. path regex of ^/foo/(,*) and rewrite-target of /bar/$1 rewrites example.com/foo/account to example.com/bar/account.'"
>
</portainer-tooltip>
</div>

View file

@ -182,8 +182,7 @@
<label class="control-label text-left">
Hostnames
<portainer-tooltip
position="bottom"
message="Hostnames associated to the ingress inside this namespace. Users will be able to expose and access their applications over the ingress via one of these hostname."
message="'Hostnames associated to the ingress inside this namespace. Users will be able to expose and access their applications over the ingress via one of these hostname.'"
>
</portainer-tooltip>
</label>
@ -252,8 +251,7 @@
<i class="fa fa-plus-circle" aria-hidden="true"></i> add annotation
</span>
<portainer-tooltip
position="bottom"
message="Use annotations to configure options for an ingress. Review Nginx or Traefik documentation to find the annotations supported by your choice of ingress type."
message="'Use annotations to configure options for an ingress. Review Nginx or Traefik documentation to find the annotations supported by your choice of ingress type.'"
>
</portainer-tooltip>
<span
@ -266,8 +264,7 @@
</span>
<portainer-tooltip
ng-if="ic.IngressClass.Type === ctrl.IngressClassTypes.NGINX"
position="bottom"
message="When the exposed URLs for your applications differ from the specified paths in the ingress, use the rewrite target annotation to denote the path to redirect to."
message="'When the exposed URLs for your applications differ from the specified paths in the ingress, use the rewrite target annotation to denote the path to redirect to.'"
>
</portainer-tooltip>
<span
@ -280,8 +277,7 @@
</span>
<portainer-tooltip
ng-if="ic.IngressClass.Type === ctrl.IngressClassTypes.NGINX"
position="bottom"
message="Enable use of regular expressions in ingress paths (set in the ingress details of an application). Use this along with rewrite-target to specify the regex capturing group to be replaced, e.g. path regex of ^/foo/(,*) and rewrite-target of /bar/$1 rewrites example.com/foo/account to example.com/bar/account."
message="'Enable use of regular expressions in ingress paths (set in the ingress details of an application). Use this along with rewrite-target to specify the regex capturing group to be replaced, e.g. path regex of ^/foo/(,*) and rewrite-target of /bar/$1 rewrites example.com/foo/account to example.com/bar/account.'"
>
</portainer-tooltip>
</div>

View file

@ -18,7 +18,7 @@
<div class="col-sm-12">
<label class="control-label text-left">
Auto-refresh
<portainer-tooltip position="bottom" message="Automatically refresh logs every 30 seconds"></portainer-tooltip>
<portainer-tooltip message="'Automatically refresh logs every 30 seconds'"></portainer-tooltip>
</label>
<label class="switch" style="margin-left: 20px"> <input type="checkbox" ng-model="ctrl.state.autoRefresh" ng-change="ctrl.updateAutoRefresh()" /><i></i> </label>
</div>

View file

@ -43,11 +43,7 @@
<td>Shared Access Policy</td>
<td data-cy="k8sVolDetail-volAccessPolicy"
>{{ ctrl.state.volumeSharedAccessPolicy }}
<portainer-tooltip
position="bottom"
ng-if="ctrl.state.volumeSharedAccessPolicyTooltip"
message="{{ ctrl.state.volumeSharedAccessPolicyTooltip }}"
></portainer-tooltip
<portainer-tooltip ng-if="ctrl.state.volumeSharedAccessPolicyTooltip" message="ctrl.state.volumeSharedAccessPolicyTooltip"></portainer-tooltip
></td>
</tr>
<tr>