mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-03-22 17:49:07 +01:00
glance: Increase monitor timeout
This commit is contained in:
parent
7bf505b3b5
commit
2f11b4eec2
1 changed files with 9 additions and 8 deletions
|
|
@ -8,9 +8,6 @@
|
||||||
let
|
let
|
||||||
cfg = config.custom.web-services.glance;
|
cfg = config.custom.web-services.glance;
|
||||||
|
|
||||||
perHostDomains =
|
|
||||||
perHostSitesWidget.widgets |> lib.concatMap (widget: widget.sites) |> lib.map (site: site.domain);
|
|
||||||
|
|
||||||
perHostSitesWidget =
|
perHostSitesWidget =
|
||||||
allHosts
|
allHosts
|
||||||
|> lib.attrValues
|
|> lib.attrValues
|
||||||
|
|
@ -21,7 +18,8 @@ let
|
||||||
sites =
|
sites =
|
||||||
host.config.custom.meta.sites
|
host.config.custom.meta.sites
|
||||||
|> lib.attrValues
|
|> lib.attrValues
|
||||||
|> lib.filter (site: site.domain |> lib.hasSuffix host.config.custom.networking.overlay.fqdn);
|
|> lib.filter (site: site.domain |> lib.hasSuffix host.config.custom.networking.overlay.fqdn)
|
||||||
|
|> lib.map (site: site // { timeout = "5s"; });
|
||||||
})
|
})
|
||||||
|> lib.filter ({ sites, ... }: sites != [ ])
|
|> lib.filter ({ sites, ... }: sites != [ ])
|
||||||
|> (widgets: {
|
|> (widgets: {
|
||||||
|
|
@ -30,21 +28,24 @@ let
|
||||||
inherit widgets;
|
inherit widgets;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
perHostDomains =
|
||||||
|
perHostSitesWidget.widgets |> lib.concatMap (widget: widget.sites) |> lib.map (site: site.domain);
|
||||||
|
|
||||||
applicationSitesWidget =
|
applicationSitesWidget =
|
||||||
allHosts
|
allHosts
|
||||||
|> lib.attrValues
|
|> lib.attrValues
|
||||||
|> lib.concatMap (host: host.config.custom.meta.sites |> lib.attrValues)
|
|> lib.concatMap (host: host.config.custom.meta.sites |> lib.attrValues)
|
||||||
|> lib.filter (service: !lib.elem service.domain perHostDomains)
|
|> lib.filter (site: !lib.elem site.domain perHostDomains)
|
||||||
|> lib.groupBy (
|
|> lib.groupBy (
|
||||||
service:
|
site:
|
||||||
service.domain |> self.lib.isPrivateDomain |> (isPrivate: if isPrivate then "Private" else "Public")
|
site.domain |> self.lib.isPrivateDomain |> (isPrivate: if isPrivate then "Private" else "Public")
|
||||||
)
|
)
|
||||||
|> lib.mapAttrsToList (
|
|> lib.mapAttrsToList (
|
||||||
name: value: {
|
name: value: {
|
||||||
type = "monitor";
|
type = "monitor";
|
||||||
cache = "1m";
|
cache = "1m";
|
||||||
title = "${name} Services";
|
title = "${name} Services";
|
||||||
sites = value;
|
sites = value |> lib.map (site: site // { timeout = "5s"; });
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|> (widgets: {
|
|> (widgets: {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue