Skip to content

Commit

Permalink
Merge pull request louislam#3246 from chakflying/ui/monitor-group-select
Browse files Browse the repository at this point in the history
UI: Improve no group monitor message
  • Loading branch information
louislam authored Jun 17, 2023
2 parents 62bbc1c + c041941 commit 596402e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions src/assets/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,11 @@ optgroup {
background-color: $dark-bg2;
}

.form-select:disabled {
color: rgba($dark-font-color, 0.7);
background-color: $dark-bg;
}

.form-control, .form-select {
border-color: $dark-border-color;
}
Expand Down
3 changes: 2 additions & 1 deletion src/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -750,5 +750,6 @@
"Badge value (For Testing only.)": "Badge value (For Testing only.)",
"Badge URL": "Badge URL",
"Group": "Group",
"Monitor Group": "Monitor Group"
"Monitor Group": "Monitor Group",
"noGroupMonitorMsg": "Not Available. Create a Group Monitor First."
}
3 changes: 2 additions & 1 deletion src/pages/EditMonitor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@
<div class="my-3">
<label for="parent" class="form-label">{{ $t("Monitor Group") }}</label>
<select v-model="monitor.parent" class="form-select" :disabled="sortedMonitorList.length === 0">
<option :value="null" selected>{{ $t("None") }}</option>
<option v-if="sortedMonitorList.length === 0" :value="null" selected>{{ $t("noGroupMonitorMsg") }}</option>
<option v-else :value="null" selected>{{ $t("None") }}</option>
<option v-for="parentMonitor in sortedMonitorList" :key="parentMonitor.id" :value="parentMonitor.id">{{ parentMonitor.pathName }}</option>
</select>
</div>
Expand Down

0 comments on commit 596402e

Please # to comment.