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: servers resources #4

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

libialany
Copy link

I had a trouble with this command:

coolify servers get - Get a server
    --resources - Get the resources and their status of a server

image

I reviewed the code of coolify and identified an error the endpoint name.

@romainbou
Copy link

Hey, I confirm this bug and that your commit 4b341b8 fixes the API URL path.

Also, testing this, I also noticed that the "Port" of a server is a string rather than an int.

Changing this type to string

Port int `json:"port"`

And the Fprintf %d to %s both here and here:
fmt.Fprintf(w, "%s\t%s\t%s\t%s\t%d\t%t\t%t\n", resource.UUID, resource.Name, resource.IP, resource.User, resource.Port, resource.Settings.Reachable, resource.Settings.Usable)

fmt.Fprintf(w, "%s\t%s\t%s\t%s\t%d\t%t\t%t\n", jsondata.UUID, jsondata.Name, jsondata.IP, jsondata.User, jsondata.Port, jsondata.Settings.Reachable, jsondata.Settings.Usable)

fixes the issue.

Otherwise, I would recommend not pushing your file cmd/projects.go in this PR, to keep it scoped on the servers command.

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