Skip to content

Commit

Permalink
Feat: Show monitor ID in Details (louislam#4331)
Browse files Browse the repository at this point in the history
  • Loading branch information
chakflying authored Jan 28, 2024
1 parent 538f832 commit 2bccae4
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 7 deletions.
1 change: 1 addition & 0 deletions src/assets/vars.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ $warning: #f8a306;
$maintenance: #1747f5;
$link-color: #111;
$border-radius: 50rem;
$secondary-text: #aaa;

$highlight: #7ce8a4;
$highlight-white: #e7faec;
Expand Down
2 changes: 1 addition & 1 deletion src/components/HeartbeatBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ export default {
}
.word {
color: #aaa;
color: $secondary-text;
font-size: 12px;
}
Expand Down
34 changes: 29 additions & 5 deletions src/pages/Details.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,18 @@
<transition name="slide-fade" appear>
<div v-if="monitor">
<router-link v-if="group !== ''" :to="monitorURL(monitor.parent)"> {{ group }}</router-link>
<h1> {{ monitor.name }}</h1>
<h1>
{{ monitor.name }}
<div class="monitor-id">
<div class="hash">#</div>
<div>{{ monitor.id }}</div>
</div>
</h1>
<p v-if="monitor.description">{{ monitor.description }}</p>
<div class="tags">
<Tag v-for="tag in monitor.tags" :key="tag.id" :item="tag" :size="'sm'" />
<div class="d-flex">
<div class="tags">
<Tag v-for="tag in monitor.tags" :key="tag.id" :item="tag" :size="'sm'" />
</div>
</div>
<p class="url">
<a v-if="monitor.type === 'http' || monitor.type === 'keyword' || monitor.type === 'json-query' || monitor.type === 'mp-health' " :href="monitor.url" target="_blank" rel="noopener noreferrer">{{ filterPassword(monitor.url) }}</a>
Expand Down Expand Up @@ -717,7 +725,7 @@ export default {
}
.word {
color: #aaa;
color: $secondary-text;
font-size: 14px;
}
Expand All @@ -731,7 +739,7 @@ table {
.stats p {
font-size: 13px;
color: #aaa;
color: $secondary-text;
}
.stats {
Expand Down Expand Up @@ -802,4 +810,20 @@ table {
margin-left: 0 !important;
}
.monitor-id {
display: inline-flex;
font-size: 0.7em;
margin-left: 0.3em;
color: $secondary-text;
flex-direction: row;
flex-wrap: nowrap;
.hash {
user-select: none;
}
.dark & {
opacity: 0.7;
}
}
</style>
2 changes: 1 addition & 1 deletion src/pages/Settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ export default {
}
footer {
color: #aaa;
color: $secondary-text;
font-size: 13px;
margin-top: 20px;
padding-bottom: 30px;
Expand Down

0 comments on commit 2bccae4

Please sign in to comment.