fixup! Refactor storages and extractors to actual functions
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
// Package routes provides data processing functions for EVE PI endpoints.
|
||||||
package routes
|
package routes
|
||||||
|
|
||||||
import (
|
import (
|
||||||
@@ -191,7 +192,7 @@ func FormatStorageAlert(storage StorageInfo, isCritical bool) string {
|
|||||||
severity = "CRITICAL"
|
severity = "CRITICAL"
|
||||||
}
|
}
|
||||||
|
|
||||||
return fmt.Sprintf("🚨 %s: %s almost full on %s! (%.1f%% utilized)",
|
return fmt.Sprintf("🚨 %s: %s almost full on %s! (%.1f%% utilized)",
|
||||||
severity, storage.StorageType, storage.PlanetName, storage.Utilization)
|
severity, storage.StorageType, storage.PlanetName, storage.Utilization)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -207,6 +208,6 @@ func FormatExtractorAlert(extractor ExtractorInfo, isCritical bool) string {
|
|||||||
status = "expired"
|
status = "expired"
|
||||||
}
|
}
|
||||||
|
|
||||||
return fmt.Sprintf("⏰ %s: Extractor #%d %s on %s! (expires: %s)",
|
return fmt.Sprintf("⏰ %s: Extractor #%d %s on %s! (expires: %s)",
|
||||||
severity, extractor.ExtractorNumber, status, extractor.PlanetName, extractor.ExpiryDate)
|
severity, extractor.ExtractorNumber, status, extractor.PlanetName, extractor.ExpiryDate)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user