Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

565 B
Raw Blame
package tools

import (
	"github.com/rcourtman/pulse-go-rewrite/internal/models"
	"github.com/rcourtman/pulse-go-rewrite/internal/unifiedresources"
)

func (e *PulseToolExecutor) resolveResourceLocation(reference string) models.ResourceLocation {
	rs, err := e.readStateForControl()
	if err != nil {
		return models.ResourceLocation{Name: reference}
	}
	if selected := unifiedresources.ResolveResourceReferenceContext(rs, reference); selected.Resource != nil {
		return selected.Location
	}
	return unifiedresources.ResolveResourceContext(rs, reference).Location
}