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.

847 B
Raw Blame
package licensing

// DefaultFeatureKeys defines the standard feature set exposed by /api/license/features.
var DefaultFeatureKeys = []string{
	FeatureAIPatrol,
	FeatureAIAlerts,
	FeatureAIAutoFix,
	FeatureKubernetesAI,
	FeatureUpdateAlerts,
	FeatureAgentProfiles,
	FeatureSSO,
	FeatureAdvancedSSO,
	FeatureRelay,
	FeatureMobileApp,
	FeaturePushNotifications,
	FeatureLongTermMetrics,
	FeatureRBAC,
	FeatureAuditLogging,
	FeatureAdvancedReporting,
	FeatureExternalProbe,
	FeatureMultiTenant,
}

// BuildFeatureMap evaluates feature availability for the given checker.
func BuildFeatureMap(checker FeatureChecker, keys []string) map[string]bool {
	out := make(map[string]bool)
	if checker == nil {
		return out
	}
	if len(keys) == 0 {
		keys = DefaultFeatureKeys
	}
	for _, key := range keys {
		out[key] = checker.HasFeature(key)
	}
	return out
}