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

@ -6,7 +6,7 @@
<div class="col-xs-8">
<label for="capability" class="control-label text-left" style="display: flex; padding: 0">
{{ cap.capability }}
<portainer-tooltip position="bottom" message="{{ cap.description }}"></portainer-tooltip>
<portainer-tooltip message="cap.description"></portainer-tooltip>
</label>
</div>
<div class="col-xs-4">

View file

@ -8,7 +8,7 @@
<div class="col-sm-12">
<label for="tls" class="control-label text-left">
Auto-refresh logs
<portainer-tooltip position="bottom" message="Disabling this option allows you to pause the log collection process and the auto-scrolling."></portainer-tooltip>
<portainer-tooltip message="'Disabling this option allows you to pause the log collection process and the auto-scrolling.'"></portainer-tooltip>
</label>
<label class="switch" style="margin-left: 20px">
<input

View file

@ -58,7 +58,7 @@
<div class="form-group col-md-12">
<label for="nfs_options" class="col-sm-2 col-md-1 control-label text-left"
>Options
<portainer-tooltip position="bottom" message="Comma separated list of options"></portainer-tooltip>
<portainer-tooltip message="'Comma separated list of options'"></portainer-tooltip>
</label>
<div class="col-sm-10 col-md-11">
<input type="text" class="form-control" ng-model="$ctrl.data.options" name="nfs_options" placeholder="e.g. rw,noatime,tcp ..." required />

View file

@ -41,7 +41,7 @@
<div class="form-group">
<label class="col-lg-1 text-left col-sm-2 control-label">
User
<portainer-tooltip position="bottom" message="Format is one of: user, user:group, uid or uid:gid"></portainer-tooltip>
<portainer-tooltip message="'Format is one of: user, user:group, uid or uid:gid'"></portainer-tooltip>
</label>
<div class="col-lg-11 col-sm-10">
<input class="form-control" type="text" ng-model="formValues.user" placeholder="root" />

View file

@ -53,10 +53,7 @@
<div class="col-sm-12">
<label for="ownership" class="control-label text-left">
Always pull the image
<portainer-tooltip
position="bottom"
message="When enabled, Portainer will automatically try to pull the specified image before creating the container."
></portainer-tooltip>
<portainer-tooltip message="'When enabled, Portainer will automatically try to pull the specified image before creating the container.'"></portainer-tooltip>
</label>
<label class="switch" style="margin-left: 20px"> <input type="checkbox" ng-model="formValues.alwaysPull" ng-disabled="!state.pullImageValidity" /><i></i> </label>
</div>
@ -73,8 +70,8 @@
<label class="control-label text-left">
Create a container webhook
<portainer-tooltip
position="top"
message="Create a webhook (or callback URI) to automate the recreate this container. Sending a POST request to this callback URI (without requiring any authentication) will pull the most up-to-date version of the associated image and recreate this container."
position="'top'"
message="'Create a webhook (or callback URI) to automate the recreate this container. Sending a POST request to this callback URI (without requiring any authentication) will pull the most up-to-date version of the associated image and recreate this container.'"
></portainer-tooltip>
</label>
<label class="switch box-selector-item limited business" style="margin-left: 20px">
@ -94,8 +91,7 @@
<label class="control-label text-left">
Publish all exposed network ports to random host ports
<portainer-tooltip
position="bottom"
message="When enabled, Portainer will let Docker automatically map a random port on the host to each one defined in the image Dockerfile."
message="'When enabled, Portainer will let Docker automatically map a random port on the host to each one defined in the image Dockerfile.'"
></portainer-tooltip>
</label>
<label class="switch" style="margin-left: 20px"> <input type="checkbox" ng-model="config.HostConfig.PublishAllPorts" /><i></i> </label>
@ -108,8 +104,7 @@
<label class="control-label text-left">
Manual network port publishing
<portainer-tooltip
position="bottom"
message="When a range of ports on the host and a single port on the container is specified, Docker will randomly choose a single available port in the defined range and forward that to the container port."
message="'When a range of ports on the host and a single port on the container is specified, Docker will randomly choose a single available port in the defined range and forward that to the container port.'"
></portainer-tooltip>
</label>
<span class="label label-default interactive" style="margin-left: 10px" ng-click="addPortBinding()">
@ -167,8 +162,7 @@
<label for="ownership" class="control-label text-left">
Auto remove
<portainer-tooltip
position="bottom"
message="When enabled, Portainer will automatically remove the container when it exits. This is useful when you want to use the container only once."
message="'When enabled, Portainer will automatically remove the container when it exits. This is useful when you want to use the container only once.'"
></portainer-tooltip>
</label>
<label class="switch" style="margin-left: 20px"> <input type="checkbox" ng-model="config.HostConfig.AutoRemove" /><i></i> </label>
@ -244,8 +238,7 @@
<label for="container_entrypoint" class="col-sm-2 col-lg-1 control-label text-left">
Entrypoint
<portainer-tooltip
position="bottom"
message="When container entrypoint is entered as part of the Command field, set Entrypoint to Override mode and leave blank, else it will revert to default."
message="'When container entrypoint is entered as part of the Command field, set Entrypoint to Override mode and leave blank, else it will revert to default.'"
></portainer-tooltip>
</label>
<div class="col-sm-9">
@ -337,8 +330,8 @@
<label class="control-label text-left">
Options
<portainer-tooltip
position="top"
message="Add button is disabled unless a driver other than none or default is selected. Options are specific to the selected driver, refer to the driver documentation."
position="'top'"
message="'Add button is disabled unless a driver other than none or default is selected. Options are specific to the selected driver, refer to the driver documentation.'"
></portainer-tooltip>
</label>
<span

View file

@ -116,8 +116,8 @@
<td colspan="1">
Container webhook
<portainer-tooltip
position="top"
message="Webhook (or callback URI) used to automate the recreate this container. Sending a POST request to this callback URI (without requiring any authentication) will pull the most up-to-date version of the associated image and recreate this container."
position="'top'"
message="'Webhook (or callback URI) used to automate the recreate this container. Sending a POST request to this callback URI (without requiring any authentication) will pull the most up-to-date version of the associated image and recreate this container.'"
></portainer-tooltip>
<label class="switch box-selector-item limited business" style="margin-left: 20px">
<input disable-authorization="DockerContainerUpdate" type="checkbox" ng-model="WebhookExists" disabled="disabled" ng-checked="true" /><i></i>

View file

@ -33,10 +33,7 @@
<div class="col-sm-12" style="margin-top: 5px">
<label class="control-label text-left">
Driver options
<portainer-tooltip
position="bottom"
message="Driver options are specific to the selected driver. Please refer to the selected driver documentation."
></portainer-tooltip>
<portainer-tooltip message="'Driver options are specific to the selected driver. Please refer to the selected driver documentation.'"></portainer-tooltip>
</label>
<span class="label label-default interactive" style="margin-left: 10px" ng-click="addDriverOption()">
<i class="fa fa-plus-circle" aria-hidden="true"></i> add driver option
@ -189,7 +186,7 @@
<div class="col-sm-12">
<label for="ownership" class="control-label text-left">
Isolated network
<portainer-tooltip position="bottom" message="An isolated network has no inbound or outbound communications."></portainer-tooltip>
<portainer-tooltip message="'An isolated network has no inbound or outbound communications.'"></portainer-tooltip>
</label>
<label name="ownership" class="switch" style="margin-left: 20px">
<input type="checkbox" ng-model="config.Internal" />

View file

@ -29,7 +29,7 @@
<div class="col-sm-12">
<label for="encode_secret" class="control-label text-left">
Encode secret
<portainer-tooltip position="bottom" message="Secrets need to be base64 encoded. Disable this if your secret is already base64 encoded."></portainer-tooltip>
<portainer-tooltip message="'Secrets need to be base64 encoded. Disable this if your secret is already base64 encoded.'"></portainer-tooltip>
</label>
<label class="switch" style="margin-left: 20px"> <input type="checkbox" name="encode_secret" ng-model="formValues.encodeSecret" /><i></i> </label>
</div>

View file

@ -102,8 +102,8 @@
<label class="control-label text-left">
Create a service webhook
<portainer-tooltip
position="top"
message="Create a webhook (or callback URI) to automate the update of this service. Sending a POST request to this callback URI (without requiring any authentication) will pull the most up-to-date version of the associated image and re-deploy this service."
position="'top'"
message="'Create a webhook (or callback URI) to automate the update of this service. Sending a POST request to this callback URI (without requiring any authentication) will pull the most up-to-date version of the associated image and re-deploy this service.'"
></portainer-tooltip>
</label>
<label class="switch" style="margin-left: 20px"> <input type="checkbox" ng-model="formValues.Webhook" /><i></i> </label>
@ -213,8 +213,8 @@
<label class="control-label text-left">
Options
<portainer-tooltip
position="top"
message="Add button is disabled unless a driver other than none or default is selected. Options are specific to the selected driver, refer to the driver documentation."
position="'top'"
message="'Add button is disabled unless a driver other than none or default is selected. Options are specific to the selected driver, refer to the driver documentation.'"
></portainer-tooltip>
</label>
<span

View file

@ -15,7 +15,7 @@
<div class="form-group">
<label for="update-delay" class="col-sm-3 col-lg-2 control-label text-left">
Update delay
<portainer-tooltip position="bottom" message="Supported format examples: 1h, 5m, 10s, 1000ms, 15us, 60ns."></portainer-tooltip>
<portainer-tooltip message="'Supported format examples: 1h, 5m, 10s, 1000ms, 15us, 60ns.'"></portainer-tooltip>
</label>
<div class="col-sm-4 col-lg-3">
<input type="text" class="form-control" ng-model="formValues.UpdateDelay" id="update-delay" placeholder="e.g. 1m" ng-pattern="/^([0-9]+)(h|m|s|ms|us|ns)$/i" />
@ -74,7 +74,7 @@
<div class="form-group">
<label for="restart-delay" class="col-sm-3 col-lg-2 control-label text-left">
Restart delay
<portainer-tooltip position="bottom" message="Supported format examples: 1h, 5m, 10s, 1000ms, 15us, 60ns."></portainer-tooltip>
<portainer-tooltip message="'Supported format examples: 1h, 5m, 10s, 1000ms, 15us, 60ns.'"></portainer-tooltip>
</label>
<div class="col-sm-4 col-lg-3">
<input type="text" class="form-control" ng-model="formValues.RestartDelay" id="restart-delay" placeholder="e.g. 1m" ng-pattern="/^([0-9]+)(h|m|s|ms|us|ns)$/i" />
@ -99,7 +99,7 @@
<div class="form-group">
<label for="restart-window" class="col-sm-3 col-lg-2 control-label text-left">
Restart window
<portainer-tooltip position="bottom" message="Supported format examples: 1h, 5m, 10s, 1000ms, 15us, 60ns."></portainer-tooltip>
<portainer-tooltip message="'Supported format examples: 1h, 5m, 10s, 1000ms, 15us, 60ns.'"></portainer-tooltip>
</label>
<div class="col-sm-4 col-lg-3">
<input type="text" class="form-control" ng-model="formValues.RestartWindow" id="restart-window" placeholder="e.g. 1m" ng-pattern="/^([0-9]+)(h|m|s|ms|us|ns)$/i" />

View file

@ -78,8 +78,8 @@
<td colspan="{{ webhookURL ? '1' : '2' }}">
Service webhook
<portainer-tooltip
position="top"
message="Webhook (or callback URI) used to automate the update of this service. Sending a POST request to this callback URI (without requiring any authentication) will pull the most up-to-date version of the associated image and re-deploy this service."
position="'top'"
message="'Webhook (or callback URI) used to automate the update of this service. Sending a POST request to this callback URI (without requiring any authentication) will pull the most up-to-date version of the associated image and re-deploy this service.'"
></portainer-tooltip>
<label class="switch" style="margin-left: 20px">
<input disable-authorization="DockerServiceUpdate" type="checkbox" ng-model="WebhookExists" ng-click="updateWebhook(service)" /><i></i>

View file

@ -33,10 +33,7 @@
<div class="col-sm-12" style="margin-top: 5px">
<label class="control-label text-left">
Driver options
<portainer-tooltip
position="bottom"
message="Driver options are specific to the selected driver. Please refer to the selected driver documentation."
></portainer-tooltip>
<portainer-tooltip message="'Driver options are specific to the selected driver. Please refer to the selected driver documentation.'"></portainer-tooltip>
</label>
<span class="label label-default interactive" style="margin-left: 10px" ng-click="addDriverOption()">
<i class="fa fa-plus-circle" aria-hidden="true"></i> add driver option