-
-
Notifications
You must be signed in to change notification settings - Fork 80
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 version info on webui #205
Conversation
Added status module and version component. The version component simply fetch the version info from the /status endpoint on page init.
The webui is still not built and commited, I'm not sure the build instruction in the package.json is correct. After I build the project, there some untracked files generated, and the filenames looks different. Would you mind have a look on it? Thanks. @mgdigital |
Hey thanks for this! I hadn't thought of making the version so prominent in the heading but I kinda like it... I was thinking to make something like a status drawer to include the version and a health check indicator, but that needs a bit more work. One thing - I think this needs to come from the GraphQL API as we don't wanna be talking to 2 separate APIs. So we'd need to add a GraphQL query for it. Is this something you're able to look at? To build the embedded web UI you'd need to run |
Sure. Using 2 kinds of APIs do look kind of weird. I would like to see if I can implement it in GraphQL and then implement the status drawer. |
I'm thinking we can keep the version where you've put it, could we make the font size a few points smaller than the Maybe the health indicator/drawer should be separate PR? I haven't really thought about how it needs to look, if it needs to be a drawer or maybe just like a |
Quick guide to implementing the GraphQL:
|
Thank you for the detailed guide, should I finish the status GraphQL API refactoring in this PR? |
Yeah I think the version would have to come from GraphQL in this PR, as otherwise we're adding a dependency on the status endpoint. |
If you're stuck on implementing this I can update the PR when I get to it. |
version | ||
} | ||
} | ||
} |
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.
I think this should be:
query SystemQuery {
system {
version
}
}
Thanks, I think it's nearly there, have added a few comments. That I've run the CI checks that have highlighted some issues, you need to run |
import * as generated from "../../graphql/generated"; | ||
import { GraphQLService } from 'src/app/graphql/graphql.service'; | ||
|
||
const defaultVersionName = 'N/A'; |
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.
I think maybe default to an empty string as you might get a flash of N/A
on initial load with this?
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.
Sure, I will fix this later.
I've pushed new commits on it. I believe the issues are fixed right now, please have a look again. Thank you for your patient review. @mgdigital |
Do I need to rebase this branch to keep commits less and clean? |
@@ -96,6 +96,15 @@ export class GraphQLService { | |||
}) | |||
.pipe(map((r) => r.data.torrent.suggestTags)); | |||
} | |||
|
|||
systemStatusQeury(): Observable<generated.SystemQuery> { |
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.
This should probably just be systemQuery
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.
ok
Looks like it's nearly there. You need to run
No that's fine, the PR will be squash merged. |
That's strange, I can serve or build locally without this error. |
Should the component here be under
|
I assume |
Sorry, I run |
Thanks for this! I can suggest more stuff if you're interested in working on the web UI. One of the next things is getting Angular Routing working so we can have more than just a single page.... |
Maybe not, I am not an expert in Angular, anyway thanks for the merge and help. |
… v0.7.12@07c9c43 by renovate (#19063) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [ghcr.io/bitmagnet-io/bitmagnet](https://togithub.com/bitmagnet-io/bitmagnet) | patch | `0.7.7` -> `0.7.12` | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>bitmagnet-io/bitmagnet (ghcr.io/bitmagnet-io/bitmagnet)</summary> ### [`v0.7.12`](https://togithub.com/bitmagnet-io/bitmagnet/releases/tag/v0.7.12) [Compare Source](https://togithub.com/bitmagnet-io/bitmagnet/compare/v0.7.10...v0.7.12) #### What's Changed - Fix Torznab content type criteria by [@​mgdigital](https://togithub.com/mgdigital) in [bitmagnet-io/bitmagnet#209 - fix duplicate word in index.md by [@​sweetbbak](https://togithub.com/sweetbbak) in [bitmagnet-io/bitmagnet#208 - Add external resources page by [@​mgdigital](https://togithub.com/mgdigital) in [bitmagnet-io/bitmagnet#202 - Upgrade GitHub Actions and fix Docker build by [@​mgdigital](https://togithub.com/mgdigital) in [bitmagnet-io/bitmagnet#201 - Fix actions: Use name and key for matrix by [@​mgdigital](https://togithub.com/mgdigital) in [bitmagnet-io/bitmagnet#210 #### New Contributors - [@​sweetbbak](https://togithub.com/sweetbbak) made their first contribution in [bitmagnet-io/bitmagnet#208 **Full Changelog**: bitmagnet-io/bitmagnet@v0.7.10...v0.7.12 ### [`v0.7.10`](https://togithub.com/bitmagnet-io/bitmagnet/releases/tag/v0.7.10) [Compare Source](https://togithub.com/bitmagnet-io/bitmagnet/compare/v0.7.9...v0.7.10) #### What's Changed - Show version info on webui by [@​poruta99](https://togithub.com/poruta99) in [bitmagnet-io/bitmagnet#205 - Fix metrics endpoint by [@​mgdigital](https://togithub.com/mgdigital) in [bitmagnet-io/bitmagnet#207 #### New Contributors - [@​poruta99](https://togithub.com/poruta99) made their first contribution in [bitmagnet-io/bitmagnet#205 **Full Changelog**: bitmagnet-io/bitmagnet@v0.7.9...v0.7.10 ### [`v0.7.9`](https://togithub.com/bitmagnet-io/bitmagnet/releases/tag/v0.7.9) [Compare Source](https://togithub.com/bitmagnet-io/bitmagnet/compare/v0.7.8...v0.7.9) #### What's Changed - Fix Docker build by [@​mgdigital](https://togithub.com/mgdigital) in [bitmagnet-io/bitmagnet#200 **Full Changelog**: bitmagnet-io/bitmagnet@v0.7.8...v0.7.9 ### [`v0.7.8`](https://togithub.com/bitmagnet-io/bitmagnet/releases/tag/v0.7.8) [Compare Source](https://togithub.com/bitmagnet-io/bitmagnet/compare/v0.7.7...v0.7.8) This release includes several minor bug fixes. #### What's Changed - Fix comma-separated Torznab categories by [@​mgdigital](https://togithub.com/mgdigital) in [bitmagnet-io/bitmagnet#194 - Rebuild webui by [@​mgdigital](https://togithub.com/mgdigital) in [bitmagnet-io/bitmagnet#195 - Fix Postgres call on CLI by [@​mgdigital](https://togithub.com/mgdigital) in [bitmagnet-io/bitmagnet#196 - Upgrade actions by [@​mgdigital](https://togithub.com/mgdigital) in [bitmagnet-io/bitmagnet#198 #### New Contributors - [@​RealFascinated](https://togithub.com/RealFascinated) made their first contribution in [bitmagnet-io/bitmagnet#193 - [@​Ornias1993](https://togithub.com/Ornias1993) made their first contribution in [bitmagnet-io/bitmagnet#188 **Full Changelog**: bitmagnet-io/bitmagnet@v0.7.7...v0.7.8 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "before 10pm on monday" in timezone Europe/Amsterdam, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://togithub.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yMzUuMSIsInVwZGF0ZWRJblZlciI6IjM3LjIzNS4xIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIn0=-->
See: #81
Fetch version info from /status endpoint and show it right after the icon on the menu bar.