Skip to content
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

Sort tags in dashboard list view #2785

Closed
1 task done
luckman212 opened this issue Feb 15, 2023 · 5 comments
Closed
1 task done

Sort tags in dashboard list view #2785

luckman212 opened this issue Feb 15, 2023 · 5 comments
Labels
feature-request Request for new features to be added

Comments

@luckman212
Copy link
Contributor

⚠️ Please verify that this feature request has NOT been suggested before.

  • I checked and didn't find similar feature request

🏷️ Feature Request Type

UI Feature

🔖 Feature description

It would be really nice if the tags were sorted so that monitors that have the same tag set would appear identical.

screenshot_wmJuEjxU

✔️ Solution

I quickly glanced at the code and it seemed like a simple ORDER BY tag.name would do here

https://github.com/louislam/uptime-kuma/blob/fdc3b2d57a9037c4415d18fe01762e7960a7fd43/server/model/monitor.js#LL146C19-L146C19

async getTags() {
    return await R.getAll("SELECT mt.*, tag.name, tag.color FROM monitor_tag mt JOIN tag ON mt.tag_id = tag.id WHERE mt.monitor_id = ? ORDER BY tag.name", [ this.id ]);
}

I manually patched my 1.20.1 install and ... it worked!

screenshot_IemXTUCb

So this could be a quick PR if accepted.

❓ Alternatives

No response

📝 Additional Context

No response

@luckman212 luckman212 added the feature-request Request for new features to be added label Feb 15, 2023
luckman212 added a commit to luckman212/uptime-kuma that referenced this issue Feb 15, 2023
@luckman212
Copy link
Contributor Author

luckman212 commented Feb 15, 2023

made a quick PR

#2786

@Computroniks
Copy link
Contributor

PRs should be made against this repo, not your own, that way we can merge them here and see the changes easier

@luckman212
Copy link
Contributor Author

luckman212 commented Feb 15, 2023

Sorry- fat fingered mistake. Fixed

@CommanderStorm
Copy link
Collaborator

@luckman212 given that the associated PR has been merged, can you close this issue or edit it to make clear what still needs to be done?

@CommanderStorm
Copy link
Collaborator

Thanks ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features to be added
Projects
None yet
Development

No branches or pull requests

3 participants