mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 02:11:53 +00:00
exposes start alerts
This commit is contained in:
@@ -297,6 +297,7 @@ getInstalledAppByIdLogic appId = do
|
||||
, appInstalledFullConfiguredRequirements = []
|
||||
, appInstalledFullUninstallAlert = Nothing
|
||||
, appInstalledFullRestoreAlert = Nothing
|
||||
, appInstalledFullStartAlert = Nothing
|
||||
, appInstalledFullActions = []
|
||||
}
|
||||
serverApps <- AppMgr2.list [AppMgr2.flags|-s -d|]
|
||||
@@ -339,6 +340,7 @@ getInstalledAppByIdLogic appId = do
|
||||
, appInstalledFullConfiguredRequirements = HM.elems requirements
|
||||
, appInstalledFullUninstallAlert = manifest >>= AppManifest.appManifestUninstallAlert
|
||||
, appInstalledFullRestoreAlert = manifest >>= AppManifest.appManifestRestoreAlert
|
||||
, appInstalledFullStartAlert = manifest >>= AppManifest.appManifestStartAlert
|
||||
, appInstalledFullActions = fromMaybe [] $ AppManifest.appManifestActions <$> manifest
|
||||
}
|
||||
runMaybeT (installing <|> installed) `orThrowM` NotFoundE "appId" (show appId)
|
||||
|
||||
@@ -138,6 +138,7 @@ data AppInstalledFull = AppInstalledFull
|
||||
, appInstalledFullConfiguredRequirements :: [Stripped AppDependencyRequirement]
|
||||
, appInstalledFullUninstallAlert :: Maybe Text
|
||||
, appInstalledFullRestoreAlert :: Maybe Text
|
||||
, appInstalledFullStartAlert :: Maybe Text
|
||||
, appInstalledFullActions :: [Manifest.Action]
|
||||
}
|
||||
instance ToJSON AppInstalledFull where
|
||||
@@ -154,6 +155,7 @@ instance ToJSON AppInstalledFull where
|
||||
, "status" .= appInstalledFullStatus
|
||||
, "uninstallAlert" .= appInstalledFullUninstallAlert
|
||||
, "restoreAlert" .= appInstalledFullRestoreAlert
|
||||
, "startAlert" .= appInstalledFullStartAlert
|
||||
, "actions" .= appInstalledFullActions
|
||||
]
|
||||
|
||||
|
||||
2
agent/src/Lib/External/AppManifest.hs
vendored
2
agent/src/Lib/External/AppManifest.hs
vendored
@@ -88,6 +88,7 @@ data AppManifest where
|
||||
, appManifestDependencies :: HM.HashMap AppId VersionRange
|
||||
, appManifestUninstallAlert :: Maybe Text
|
||||
, appManifestRestoreAlert :: Maybe Text
|
||||
, appManifestStartAlert :: Maybe Text
|
||||
, appManifestActions :: [Action]
|
||||
} -> AppManifest
|
||||
|
||||
@@ -110,6 +111,7 @@ instance FromJSON AppManifest where
|
||||
appManifestDependencies <- o .:? "dependencies" .!= HM.empty >>= traverse parseDepInfo
|
||||
appManifestUninstallAlert <- o .:? "uninstall-alert"
|
||||
appManifestRestoreAlert <- o .:? "restore-alert"
|
||||
appManifestStartAlert <- o .:? "start-alert"
|
||||
appManifestActions <- o .: "actions"
|
||||
pure $ AppManifest { .. }
|
||||
where
|
||||
|
||||
Reference in New Issue
Block a user