mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 04:01:58 +00:00
agent: adds restore alerts
This commit is contained in:
committed by
Aiden McClelland
parent
18f18e3b95
commit
db8a26c84c
2
agent/src/Lib/External/AppManifest.hs
vendored
2
agent/src/Lib/External/AppManifest.hs
vendored
@@ -61,6 +61,7 @@ data AppManifest where
|
||||
, appManifestOnionVersion :: OnionVersion
|
||||
, appManifestDependencies :: HM.HashMap AppId VersionRange
|
||||
, appManifestUninstallAlert :: Maybe Text
|
||||
, appManifestRestoreAlert :: Maybe Text
|
||||
} -> AppManifest
|
||||
|
||||
uiAvailable :: AppManifest -> Bool
|
||||
@@ -81,6 +82,7 @@ instance FromJSON AppManifest where
|
||||
appManifestOnionVersion <- o .: "hidden-service-version"
|
||||
appManifestDependencies <- o .:? "dependencies" .!= HM.empty >>= traverse parseDepInfo
|
||||
appManifestUninstallAlert <- o .:? "uninstall-alert"
|
||||
appManifestRestoreAlert <- o .:? "restore-alert"
|
||||
pure $ AppManifest { .. }
|
||||
where
|
||||
parsePortMapping = withObject "Port Mapping" $ \o -> liftA2 (,) (o .: "tor") (o .: "internal")
|
||||
|
||||
Reference in New Issue
Block a user