Skip to content

Commit

Permalink
UI: Use add for ActionSelect & prevent delete instead
Browse files Browse the repository at this point in the history
  • Loading branch information
chakflying committed Oct 23, 2023
1 parent da81e11 commit d3915d2
Showing 1 changed file with 3 additions and 20 deletions.
23 changes: 3 additions & 20 deletions src/pages/EditMonitor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -294,16 +294,11 @@
v-model="monitor.docker_host"
:options="dockerHostOptionsList"
:disabled="$root.dockerHostList == null || $root.dockerHostList.length === 0"
:icon="'cog'"
:action="() => $refs.dockerHostDialog.show(monitor.docker_host)"
:actionDisabled="!$root.dockerHostList || $root.dockerHostList.length === 0"
:icon="'plus'"
:action="() => $refs.dockerHostDialog.show()"
:required="true"
/>
</div>

<button class="btn btn-primary me-2" type="button" @click="$refs.dockerHostDialog.show()">
{{ $t("Setup Docker Host") }}
</button>
</div>

<!-- MQTT -->
Expand Down Expand Up @@ -827,7 +822,7 @@
</form>

<NotificationDialog ref="notificationDialog" @added="addedNotification" />
<DockerHostDialog ref="dockerHostDialog" @added="addedDockerHost" @deleted="deletedDockerHost" />
<DockerHostDialog ref="dockerHostDialog" @added="addedDockerHost" />
<ProxyDialog ref="proxyDialog" @added="addedProxy" />
<CreateGroupDialog ref="createGroupDialog" @added="addedDraftGroup" />
</div>
Expand Down Expand Up @@ -1509,18 +1504,6 @@ message HealthCheckResponse {
this.monitor.docker_host = id;
},
/**
* A docker host was deleted
* Unset the docker host if it was deleted
* @param {number} id - The ID of the Docker host that was deleted.
* @returns {void}
*/
deletedDockerHost(id) {
if (this.monitor.docker_host === id) {
this.monitor.docker_host = null;
}
},
/**
* Adds a draft group.
* @param {string} draftGroupName The name of the draft group.
Expand Down

0 comments on commit d3915d2

Please sign in to comment.