Skip to content

Commit 14bd765

Browse files
committed
UI: Use add for ActionSelect & prevent delete instead
1 parent f4fceca commit 14bd765

File tree

1 file changed

+3
-20
lines changed

1 file changed

+3
-20
lines changed

src/pages/EditMonitor.vue

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -291,16 +291,11 @@
291291
v-model="monitor.docker_host"
292292
:options="dockerHostOptionsList"
293293
:disabled="$root.dockerHostList == null || $root.dockerHostList.length === 0"
294-
:icon="'cog'"
295-
:action="() => $refs.dockerHostDialog.show(monitor.docker_host)"
296-
:actionDisabled="!$root.dockerHostList || $root.dockerHostList.length === 0"
294+
:icon="'plus'"
295+
:action="() => $refs.dockerHostDialog.show()"
297296
:required="true"
298297
/>
299298
</div>
300-
301-
<button class="btn btn-primary me-2" type="button" @click="$refs.dockerHostDialog.show()">
302-
{{ $t("Setup Docker Host") }}
303-
</button>
304299
</div>
305300

306301
<!-- MQTT -->
@@ -824,7 +819,7 @@
824819
</form>
825820

826821
<NotificationDialog ref="notificationDialog" @added="addedNotification" />
827-
<DockerHostDialog ref="dockerHostDialog" @added="addedDockerHost" @deleted="deletedDockerHost" />
822+
<DockerHostDialog ref="dockerHostDialog" @added="addedDockerHost" />
828823
<ProxyDialog ref="proxyDialog" @added="addedProxy" />
829824
<CreateGroupDialog ref="createGroupDialog" @added="addedDraftGroup" />
830825
</div>
@@ -1501,18 +1496,6 @@ message HealthCheckResponse {
15011496
this.monitor.docker_host = id;
15021497
},
15031498
1504-
/**
1505-
* A docker host was deleted
1506-
* Unset the docker host if it was deleted
1507-
* @param {number} id - The ID of the Docker host that was deleted.
1508-
* @returns {void}
1509-
*/
1510-
deletedDockerHost(id) {
1511-
if (this.monitor.docker_host === id) {
1512-
this.monitor.docker_host = null;
1513-
}
1514-
},
1515-
15161499
/**
15171500
* Adds a draft group.
15181501
* @param {string} draftGroupName The name of the draft group.

0 commit comments

Comments
 (0)