diff options
author | Joey Hess <joey@kitenet.net> | 2014-04-09 15:26:41 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-04-09 15:26:41 -0400 |
commit | b7feceff3dfd4ed7c8889036cd43f06642a449da (patch) | |
tree | cf41ddf713ca484948402871fa963374d349f7c9 /Assistant/DaemonStatus.hs | |
parent | 11c19090eaeef4a7f8dd7faaa67eccb48d1937f8 (diff) |
webapp: Show a network signal icon next to ssh remotes that it's currently connected with.
Diffstat (limited to 'Assistant/DaemonStatus.hs')
-rw-r--r-- | Assistant/DaemonStatus.hs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Assistant/DaemonStatus.hs b/Assistant/DaemonStatus.hs index eb842b784..35f8fc856 100644 --- a/Assistant/DaemonStatus.hs +++ b/Assistant/DaemonStatus.hs @@ -26,6 +26,7 @@ import Data.Time.Clock.POSIX import Data.Time import System.Locale import qualified Data.Map as M +import qualified Data.Set as S import qualified Data.Text as T getDaemonStatus :: Assistant DaemonStatus @@ -78,6 +79,15 @@ updateSyncRemotes = do M.filter $ \alert -> alertName alert /= Just CloudRepoNeededAlert +changeCurrentlyConnected :: (S.Set UUID -> S.Set UUID) -> Assistant () +changeCurrentlyConnected sm = do + modifyDaemonStatus_ $ \ds -> ds + { currentlyConnectedRemotes = sm (currentlyConnectedRemotes ds) + } + v <- currentlyConnectedRemotes <$> getDaemonStatus + debug [show v] + liftIO . sendNotification =<< syncRemotesNotifier <$> getDaemonStatus + updateScheduleLog :: Assistant () updateScheduleLog = liftIO . sendNotification =<< scheduleLogNotifier <$> getDaemonStatus |