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

fix: signs checked configuration templates instead of installed templates #1523

Open
wants to merge 1 commit into
base: nightly
Choose a base branch
from

Conversation

Slxvly
Copy link

@Slxvly Slxvly commented Oct 7, 2024

Motivation

The 3.5 documentation for signs (https://cloudnetservice.eu/de/docs/next/modules/signs) says: "The tags can even be targeted to specific groups with a template path limitation, which will then only show services with the specified template." and I think that should still be valid for CloudNet 4.0. The problem is that the current implementation checks for templates in the configuration, which doesn't necessarily match the installed templates (e.x. using the smart module template configuration can change that).

Modification

Changed the getter for templates to only get installed templates in the templatePath check.

Result

Now, only templates that are actually installed will make a service show up on signs with the specified templatePath. This is also consistent with the templates that are displayed when the service command is used to look up its information.

…ates

### Motivation
The 3.5 documentation for signs (https://cloudnetservice.eu/de/docs/next/modules/signs) says: "The tags can even be targeted to specific groups with a template path limitation, which will then only show services with the specified template." and I think that should still be valid for CloudNet 4.0. The problem is that the current implementation checks for templates in the configuration, which doesn't necessarily match the installed templates (e.x. using the smart module template configuration can change that).

### Modification
Changed the getter for templates to only get installed templates in the templatePath check.

### Result
Now, only templates that are actually installed will make a service show up on signs with the specified templatePath. This is also consistent with the templates that are displayed when the service command is used to look up its information.
@0utplay
Copy link
Member

0utplay commented Oct 7, 2024

Hi,
thanks for your pull request. While the solution you provided is correct it has some impact. You might have noticed that the installedTemplates are only available using the provider of a service. This means that each of these installedTemplates calls is a RPC request to the node of the service calling it and maybe also even to other nodes if the service is not running on the same node.

We should be really careful with these requests on the wrapper. We will take a look if we might be able to solve this another way

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants