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

[BUG] statusCheck in Items not being honored when set at appConfig level #651

Closed
4 tasks done
ridizy opened this issue May 13, 2022 · 4 comments
Closed
4 tasks done
Assignees
Labels
🐛 Bug [ISSUE] Ticket describing something that isn't working 🔨 Fixed 🛩️ Released 2.0.9

Comments

@ridizy
Copy link

ridizy commented May 13, 2022

Environment

Self-Hosted (Docker)

Version

2.0.8

Describe the problem

I am setting statusCheck to true at the appConfig level. I then have some items where I don't want the status check to be enabled, and I am setting those to statusCheck: false. However, those items still have the status check enabled.

For example, I have:

appConfig:
  theme: default
  language: en
  layout: auto
  iconSize: medium
  statusCheck: true

And then I have:

items:
  - title: App1
    description: My App 1
    icon: favicon
    url: https://app1.example.com
    id: 0_393_app1
  - title: App2
    description: My App 2
    icon: favicon
    url: http://app2.example.com
    statusCheck: false
    id: 1_393_app2

I would expect App 1 to have the status check enabled and App 2 to not have it enabled. However, both items are showing up on the dashboard with the status check enabled.

Additional info

No errors are being thrown

Please tick the boxes

@ridizy ridizy added the 🐛 Bug [ISSUE] Ticket describing something that isn't working label May 13, 2022
@Lissy93
Copy link
Owner

Lissy93 commented May 13, 2022

I'm afk at the moment, but what your doing sounds correct, the item-level status check should override whatevers set under appConfig. I can check this later to confirm if there's a bug.

But in your example, there's no statusCheck set in there. Did you just miss it out from the paste?

@ridizy
Copy link
Author

ridizy commented May 13, 2022

Oops, thank you for taking a look and catching that. I've gone back and edited the item to include statusCheck. And yes, I just missed it when I pasted.

@liss-bot liss-bot added 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending and removed 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending labels May 13, 2022
@Lissy93
Copy link
Owner

Lissy93 commented May 14, 2022

Can confirm, is indeed a bug 🐛

Looks like it can be fixed by updating this section in ItemMixin.js to:

/* Determines if user has enabled online status checks */
enableStatusCheck() {
  const globalPref = this.appConfig.statusCheck || false;
  const itemPref = this.item.statusCheck;
  return typeof itemPref === 'boolean' ? itemPref : globalPref;
},

I'll include it in the next PR :)

@liss-bot
Copy link
Collaborator

The fix for this issue has now been released in 2.0.9 ✨

If you haven't done so already, please update your instance to 2.0.9 or later. See 2.0.9 for full info.

Feel free to reach out if you need any more support. If you are enjoying Dashy, consider supporting the project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug [ISSUE] Ticket describing something that isn't working 🔨 Fixed 🛩️ Released 2.0.9
Projects
None yet
Development

No branches or pull requests

3 participants