Skip to content

Commit d3915d2

Browse files
committed
UI: Use add for ActionSelect & prevent delete instead
1 parent da81e11 commit d3915d2

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
@@ -294,16 +294,11 @@
294294
v-model="monitor.docker_host"
295295
:options="dockerHostOptionsList"
296296
:disabled="$root.dockerHostList == null || $root.dockerHostList.length === 0"
297-
:icon="'cog'"
298-
:action="() => $refs.dockerHostDialog.show(monitor.docker_host)"
299-
:actionDisabled="!$root.dockerHostList || $root.dockerHostList.length === 0"
297+
:icon="'plus'"
298+
:action="() => $refs.dockerHostDialog.show()"
300299
:required="true"
301300
/>
302301
</div>
303-
304-
<button class="btn btn-primary me-2" type="button" @click="$refs.dockerHostDialog.show()">
305-
{{ $t("Setup Docker Host") }}
306-
</button>
307302
</div>
308303

309304
<!-- MQTT -->
@@ -827,7 +822,7 @@
827822
</form>
828823

829824
<NotificationDialog ref="notificationDialog" @added="addedNotification" />
830-
<DockerHostDialog ref="dockerHostDialog" @added="addedDockerHost" @deleted="deletedDockerHost" />
825+
<DockerHostDialog ref="dockerHostDialog" @added="addedDockerHost" />
831826
<ProxyDialog ref="proxyDialog" @added="addedProxy" />
832827
<CreateGroupDialog ref="createGroupDialog" @added="addedDraftGroup" />
833828
</div>
@@ -1509,18 +1504,6 @@ message HealthCheckResponse {
15091504
this.monitor.docker_host = id;
15101505
},
15111506
1512-
/**
1513-
* A docker host was deleted
1514-
* Unset the docker host if it was deleted
1515-
* @param {number} id - The ID of the Docker host that was deleted.
1516-
* @returns {void}
1517-
*/
1518-
deletedDockerHost(id) {
1519-
if (this.monitor.docker_host === id) {
1520-
this.monitor.docker_host = null;
1521-
}
1522-
},
1523-
15241507
/**
15251508
* Adds a draft group.
15261509
* @param {string} draftGroupName The name of the draft group.

0 commit comments

Comments
 (0)