-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
show tags in monitor select list under status page #2752
show tags in monitor select list under status page #2752
Conversation
src/pages/StatusPage.vue
Outdated
<option v-for="monitor in allMonitorList" :key="monitor.id" :value="monitor"> | ||
{{ | ||
monitor.name | ||
}} | ||
<span v-if="monitor.tags.length > 0"> | ||
[Tags: {{ monitor.tags.map(tag => tag.name).join(" ,") }} ] | ||
</span> | ||
</option> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you drop a screenshot of how does this change make on the UI?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that case, i think it is better if we implement vue-multiselect
as the component instead of using a plain select
. because a plain select
does not render colors consistently. For example, In the above screenshot (mac os), you can see that the color will probably not be visible since it is using the styles provided by the host operating system (mac os in this case)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ping @khanh96le
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please validate the above idea @khanh96le so that I can know if I can start to work on refactoring the PR. Thanks !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @titanventura,
I am sorry for the late response.
I really appreciate the idea you proposed, it looks great to me! When you have a moment, can you share another screenshot of the updated version? I'm excited to see how it looks and I'm sure everyone else is too.
Thank you so much for your hard work and contributions!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @khanh96le, no probs. thank you so much for taking the time to analyse and suggest. I have updated the select monitor component in edit status page. It uses vue-multiselect
and shows tags with name and value (if present) with the background color of the tag. It looks like this.
Please do review and suggest changes if any. Thanks !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be better to use the existing |
sure @chakflying, thanks for the suggestion. Have made the changes ! |
Ping @chakflying |
Since you aren't adding new packages, you can remove |
e5eb836
to
948ff51
Compare
I've removed the |
I got error when I tried to run this. Do you know what's the issue? Uncaught (in promise) TypeError: monitor is undefined
option StatusPage.vue:347
renderFnWithContext runtime-core.esm-bundler.js:853
renderSlot runtime-core.esm-bundler.js:2968
default vue-multiselect.esm.js:1279
renderList runtime-core.esm-bundler.js:2884
default vue-multiselect.esm.js:1262 |
I guess this was a bug. Resolved it. I used the word |
Looks like the Also recommend doing an actual rebase since master has the fix for the |
Also there are a lot of unrelated code changes. Please revert those changes. I guess you were using a incorrect eslint config. And if you are not sure how to load the eslint config, you can use |
… from normal select to vue-multiselect
b5599f3
to
db6b863
Compare
Deleted the branch, created a new one and made changes only to |
can we merge this PR ? |
…-page-monitor-select-list # Conflicts: # src/pages/StatusPage.vue
https://github.com/louislam/uptime-kuma/blob/master/CONTRIBUTING.md#can-i-create-a-pull-request-for-uptime-kuma
Tick the checkbox if you understand [x]:
Description
Fixes #2739
Type of change
Please delete any options that are not relevant.
Checklist
(including JSDoc for methods)
Screenshots (if any)
Please do not use any external image service. Instead, just paste in or drag and drop the image here, and it will be uploaded automatically.