mirror of
https://github.com/mentos1386/zdravko.git
synced 2024-11-22 07:43:33 +00:00
feat: new navbar design
This commit is contained in:
parent
dc314a4828
commit
4afb709b87
7 changed files with 132 additions and 118 deletions
|
@ -193,26 +193,26 @@ func (h *BaseHandler) Index(c echo.Context) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
timeRangeQuery := c.QueryParam("time-range")
|
timeRangeQuery := c.QueryParam("time-range")
|
||||||
if timeRangeQuery != "48hours" && timeRangeQuery != "90days" && timeRangeQuery != "90minutes" {
|
if timeRangeQuery != "48hours" && timeRangeQuery != "60days" && timeRangeQuery != "60minutes" {
|
||||||
timeRangeQuery = "90days"
|
timeRangeQuery = "60days"
|
||||||
}
|
}
|
||||||
|
|
||||||
var timeBuckets int
|
var timeBuckets int
|
||||||
var timeInterval time.Duration
|
var timeInterval time.Duration
|
||||||
var timeRange services.TargetHistoryDateRange
|
var timeRange services.TargetHistoryDateRange
|
||||||
switch timeRangeQuery {
|
switch timeRangeQuery {
|
||||||
case "90days":
|
case "60days":
|
||||||
timeRange = services.TargetHistoryDateRange90Days
|
timeRange = services.TargetHistoryDateRange60Days
|
||||||
timeInterval = time.Hour * 24
|
timeInterval = time.Hour * 24
|
||||||
timeBuckets = 90
|
timeBuckets = 60
|
||||||
case "48hours":
|
case "48hours":
|
||||||
timeRange = services.TargetHistoryDateRange48Hours
|
timeRange = services.TargetHistoryDateRange48Hours
|
||||||
timeInterval = time.Hour
|
timeInterval = time.Hour
|
||||||
timeBuckets = 48
|
timeBuckets = 48
|
||||||
case "90minutes":
|
case "60minutes":
|
||||||
timeRange = services.TargetHistoryDateRange90Minutes
|
timeRange = services.TargetHistoryDateRange60Minutes
|
||||||
timeInterval = time.Minute
|
timeInterval = time.Minute
|
||||||
timeBuckets = 90
|
timeBuckets = 60
|
||||||
}
|
}
|
||||||
|
|
||||||
overallOutcome := HistoryOutcomeUnknown
|
overallOutcome := HistoryOutcomeUnknown
|
||||||
|
|
|
@ -83,7 +83,7 @@ func (h *BaseHandler) SettingsTargetsDescribeGET(c echo.Context) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
history, err := services.GetTargetHistoryForTarget(context.Background(), h.db, slug, services.TargetHistoryDateRange90Minutes)
|
history, err := services.GetTargetHistoryForTarget(context.Background(), h.db, slug, services.TargetHistoryDateRange60Minutes)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,20 +18,20 @@ type TargetHistory struct {
|
||||||
type TargetHistoryDateRange string
|
type TargetHistoryDateRange string
|
||||||
|
|
||||||
const (
|
const (
|
||||||
TargetHistoryDateRange90Days TargetHistoryDateRange = "90_DAYS"
|
TargetHistoryDateRange60Days TargetHistoryDateRange = "60_DAYS"
|
||||||
TargetHistoryDateRange48Hours TargetHistoryDateRange = "48_HOURS"
|
TargetHistoryDateRange48Hours TargetHistoryDateRange = "48_HOURS"
|
||||||
TargetHistoryDateRange90Minutes TargetHistoryDateRange = "90_MINUTES"
|
TargetHistoryDateRange60Minutes TargetHistoryDateRange = "60_MINUTES"
|
||||||
)
|
)
|
||||||
|
|
||||||
func GetTargetHistoryForTarget(ctx context.Context, db *sqlx.DB, targetId string, dateRange TargetHistoryDateRange) ([]*TargetHistory, error) {
|
func GetTargetHistoryForTarget(ctx context.Context, db *sqlx.DB, targetId string, dateRange TargetHistoryDateRange) ([]*TargetHistory, error) {
|
||||||
dateRangeFilter := ""
|
dateRangeFilter := ""
|
||||||
switch dateRange {
|
switch dateRange {
|
||||||
case TargetHistoryDateRange90Days:
|
case TargetHistoryDateRange60Days:
|
||||||
dateRangeFilter = "AND strftime('%Y-%m-%dT%H:%M:%fZ', th.created_at) >= datetime('now', 'localtime', '-90 days')"
|
dateRangeFilter = "AND strftime('%Y-%m-%dT%H:%M:%fZ', th.created_at) >= datetime('now', 'localtime', '-60 days')"
|
||||||
case TargetHistoryDateRange48Hours:
|
case TargetHistoryDateRange48Hours:
|
||||||
dateRangeFilter = "AND strftime('%Y-%m-%dT%H:%M:%fZ', th.created_at) >= datetime('now', 'localtime', '-48 hours')"
|
dateRangeFilter = "AND strftime('%Y-%m-%dT%H:%M:%fZ', th.created_at) >= datetime('now', 'localtime', '-48 hours')"
|
||||||
case TargetHistoryDateRange90Minutes:
|
case TargetHistoryDateRange60Minutes:
|
||||||
dateRangeFilter = "AND strftime('%Y-%m-%dT%H:%M:%fZ', th.created_at) >= datetime('now', 'localtime', '-90 minutes')"
|
dateRangeFilter = "AND strftime('%Y-%m-%dT%H:%M:%fZ', th.created_at) >= datetime('now', 'localtime', '-60 minutes')"
|
||||||
}
|
}
|
||||||
|
|
||||||
var targetHistory []*TargetHistory
|
var targetHistory []*TargetHistory
|
||||||
|
|
|
@ -32,23 +32,12 @@ code {
|
||||||
@apply font-mono text-sm bg-gray-100 rounded-lg p-1;
|
@apply font-mono text-sm bg-gray-100 rounded-lg p-1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar {
|
|
||||||
@apply justify-center flex flex-wrap space-x-2 gap-2 mt-10;
|
|
||||||
}
|
|
||||||
.navbar a {
|
.navbar a {
|
||||||
@apply font-bold py-2 px-4 rounded-lg;
|
@apply font-medium px-5 py-2 rounded-lg;
|
||||||
}
|
@apply text-center text-black bg-gray-100 hover:bg-gray-300 focus:outline-none focus:ring-2 focus:ring-gray-400;
|
||||||
.navbar a:hover {
|
|
||||||
@apply bg-gray-200 shadow-inner;
|
|
||||||
}
|
|
||||||
.navbar a:focus {
|
|
||||||
@apply outline-none ring-2 ring-blue-700 text-blue-700;
|
|
||||||
}
|
}
|
||||||
.navbar a.active {
|
.navbar a.active {
|
||||||
@apply bg-gray-300 text-black shadow;
|
@apply bg-white hover:bg-gray-300 shadow;
|
||||||
}
|
|
||||||
.navbar a.active:hover {
|
|
||||||
@apply shadow;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#page-index .targets .time-range > a {
|
#page-index .targets .time-range > a {
|
||||||
|
@ -75,36 +64,36 @@ code {
|
||||||
background: repeating-linear-gradient(
|
background: repeating-linear-gradient(
|
||||||
45deg,
|
45deg,
|
||||||
var(--color-red-300),
|
var(--color-red-300),
|
||||||
var(--color-red-300) 20%,
|
var(--color-red-300) 10%,
|
||||||
var(--color-red-400) 20%,
|
var(--color-red-400) 10%,
|
||||||
var(--color-red-400) 40%
|
var(--color-red-400) 20%
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
#page-index .history.down:hover > .bar {
|
#page-index .history.down:hover > .bar {
|
||||||
background: repeating-linear-gradient(
|
background: repeating-linear-gradient(
|
||||||
45deg,
|
45deg,
|
||||||
var(--color-red-400),
|
var(--color-red-400),
|
||||||
var(--color-red-400) 20%,
|
var(--color-red-400) 10%,
|
||||||
var(--color-red-500) 20%,
|
var(--color-red-500) 10%,
|
||||||
var(--color-red-500) 40%
|
var(--color-red-500) 20%
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
#page-index .history.degraded > .bar {
|
#page-index .history.degraded > .bar {
|
||||||
background: repeating-linear-gradient(
|
background: repeating-linear-gradient(
|
||||||
0deg,
|
0deg,
|
||||||
var(--color-orange-300),
|
var(--color-orange-300),
|
||||||
var(--color-orange-300) 20%,
|
var(--color-orange-300) 10%,
|
||||||
var(--color-orange-400) 20%,
|
var(--color-orange-400) 10%,
|
||||||
var(--color-orange-400) 40%
|
var(--color-orange-400) 20%
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
#page-index .history.degraded:hover > .bar {
|
#page-index .history.degraded:hover > .bar {
|
||||||
background: repeating-linear-gradient(
|
background: repeating-linear-gradient(
|
||||||
0deg,
|
0deg,
|
||||||
var(--color-orange-400),
|
var(--color-orange-400),
|
||||||
var(--color-orange-400) 20%,
|
var(--color-orange-400) 10%,
|
||||||
var(--color-orange-500) 20%,
|
var(--color-orange-500) 10%,
|
||||||
var(--color-orange-500) 40%
|
var(--color-orange-500) 20%
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1020,6 +1020,10 @@ video {
|
||||||
height: min-content;
|
height: min-content;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.w-12 {
|
||||||
|
width: 3rem;
|
||||||
|
}
|
||||||
|
|
||||||
.w-20 {
|
.w-20 {
|
||||||
width: 5rem;
|
width: 5rem;
|
||||||
}
|
}
|
||||||
|
@ -1133,6 +1137,12 @@ video {
|
||||||
gap: 1px;
|
gap: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.space-x-2 > :not([hidden]) ~ :not([hidden]) {
|
||||||
|
--tw-space-x-reverse: 0;
|
||||||
|
margin-right: calc(0.5rem * var(--tw-space-x-reverse));
|
||||||
|
margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse)));
|
||||||
|
}
|
||||||
|
|
||||||
.self-center {
|
.self-center {
|
||||||
align-self: center;
|
align-self: center;
|
||||||
}
|
}
|
||||||
|
@ -1225,6 +1235,11 @@ video {
|
||||||
background-color: rgb(243 244 246 / var(--tw-bg-opacity));
|
background-color: rgb(243 244 246 / var(--tw-bg-opacity));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.bg-gray-300 {
|
||||||
|
--tw-bg-opacity: 1;
|
||||||
|
background-color: rgb(209 213 219 / var(--tw-bg-opacity));
|
||||||
|
}
|
||||||
|
|
||||||
.bg-gray-50 {
|
.bg-gray-50 {
|
||||||
--tw-bg-opacity: 1;
|
--tw-bg-opacity: 1;
|
||||||
background-color: rgb(249 250 251 / var(--tw-bg-opacity));
|
background-color: rgb(249 250 251 / var(--tw-bg-opacity));
|
||||||
|
@ -1371,6 +1386,11 @@ video {
|
||||||
line-height: 1.5rem;
|
line-height: 1.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.text-lg {
|
||||||
|
font-size: 1.125rem;
|
||||||
|
line-height: 1.75rem;
|
||||||
|
}
|
||||||
|
|
||||||
.text-sm {
|
.text-sm {
|
||||||
font-size: 0.875rem;
|
font-size: 0.875rem;
|
||||||
line-height: 1.25rem;
|
line-height: 1.25rem;
|
||||||
|
@ -1587,63 +1607,46 @@ code {
|
||||||
line-height: 1.25rem;
|
line-height: 1.25rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar {
|
|
||||||
margin-top: 2.5rem;
|
|
||||||
display: flex;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
justify-content: center;
|
|
||||||
gap: 0.5rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.navbar > :not([hidden]) ~ :not([hidden]) {
|
|
||||||
--tw-space-x-reverse: 0;
|
|
||||||
margin-right: calc(0.5rem * var(--tw-space-x-reverse));
|
|
||||||
margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse)));
|
|
||||||
}
|
|
||||||
|
|
||||||
.navbar a {
|
.navbar a {
|
||||||
border-radius: 0.5rem;
|
border-radius: 0.5rem;
|
||||||
|
padding-left: 1.25rem;
|
||||||
|
padding-right: 1.25rem;
|
||||||
padding-top: 0.5rem;
|
padding-top: 0.5rem;
|
||||||
padding-bottom: 0.5rem;
|
padding-bottom: 0.5rem;
|
||||||
padding-left: 1rem;
|
font-weight: 500;
|
||||||
padding-right: 1rem;
|
--tw-bg-opacity: 1;
|
||||||
font-weight: 700;
|
background-color: rgb(243 244 246 / var(--tw-bg-opacity));
|
||||||
|
text-align: center;
|
||||||
|
--tw-text-opacity: 1;
|
||||||
|
color: rgb(0 0 0 / var(--tw-text-opacity));
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar a:hover {
|
.navbar a:hover {
|
||||||
--tw-bg-opacity: 1;
|
--tw-bg-opacity: 1;
|
||||||
background-color: rgb(229 231 235 / var(--tw-bg-opacity));
|
background-color: rgb(209 213 219 / var(--tw-bg-opacity));
|
||||||
--tw-shadow: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);
|
|
||||||
--tw-shadow-colored: inset 0 2px 4px 0 var(--tw-shadow-color);
|
|
||||||
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar a:focus {
|
.navbar a:focus {
|
||||||
--tw-text-opacity: 1;
|
|
||||||
color: rgb(29 78 216 / var(--tw-text-opacity));
|
|
||||||
outline: 2px solid transparent;
|
outline: 2px solid transparent;
|
||||||
outline-offset: 2px;
|
outline-offset: 2px;
|
||||||
--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
|
--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
|
||||||
--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
|
--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
|
||||||
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
|
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
|
||||||
--tw-ring-opacity: 1;
|
--tw-ring-opacity: 1;
|
||||||
--tw-ring-color: rgb(29 78 216 / var(--tw-ring-opacity));
|
--tw-ring-color: rgb(156 163 175 / var(--tw-ring-opacity));
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar a.active {
|
.navbar a.active {
|
||||||
--tw-bg-opacity: 1;
|
--tw-bg-opacity: 1;
|
||||||
background-color: rgb(209 213 219 / var(--tw-bg-opacity));
|
background-color: rgb(255 255 255 / var(--tw-bg-opacity));
|
||||||
--tw-text-opacity: 1;
|
|
||||||
color: rgb(0 0 0 / var(--tw-text-opacity));
|
|
||||||
--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
|
--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
|
||||||
--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);
|
--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);
|
||||||
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar a.active:hover {
|
.navbar a.active:hover {
|
||||||
--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
|
--tw-bg-opacity: 1;
|
||||||
--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);
|
background-color: rgb(209 213 219 / var(--tw-bg-opacity));
|
||||||
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#page-index .targets .time-range > a {
|
#page-index .targets .time-range > a {
|
||||||
|
@ -1720,9 +1723,9 @@ code {
|
||||||
background: repeating-linear-gradient(
|
background: repeating-linear-gradient(
|
||||||
45deg,
|
45deg,
|
||||||
var(--color-red-300),
|
var(--color-red-300),
|
||||||
var(--color-red-300) 20%,
|
var(--color-red-300) 10%,
|
||||||
var(--color-red-400) 20%,
|
var(--color-red-400) 10%,
|
||||||
var(--color-red-400) 40%
|
var(--color-red-400) 20%
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1730,9 +1733,9 @@ code {
|
||||||
background: repeating-linear-gradient(
|
background: repeating-linear-gradient(
|
||||||
45deg,
|
45deg,
|
||||||
var(--color-red-400),
|
var(--color-red-400),
|
||||||
var(--color-red-400) 20%,
|
var(--color-red-400) 10%,
|
||||||
var(--color-red-500) 20%,
|
var(--color-red-500) 10%,
|
||||||
var(--color-red-500) 40%
|
var(--color-red-500) 20%
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1740,9 +1743,9 @@ code {
|
||||||
background: repeating-linear-gradient(
|
background: repeating-linear-gradient(
|
||||||
0deg,
|
0deg,
|
||||||
var(--color-orange-300),
|
var(--color-orange-300),
|
||||||
var(--color-orange-300) 20%,
|
var(--color-orange-300) 10%,
|
||||||
var(--color-orange-400) 20%,
|
var(--color-orange-400) 10%,
|
||||||
var(--color-orange-400) 40%
|
var(--color-orange-400) 20%
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1750,9 +1753,9 @@ code {
|
||||||
background: repeating-linear-gradient(
|
background: repeating-linear-gradient(
|
||||||
0deg,
|
0deg,
|
||||||
var(--color-orange-400),
|
var(--color-orange-400),
|
||||||
var(--color-orange-400) 20%,
|
var(--color-orange-400) 10%,
|
||||||
var(--color-orange-500) 20%,
|
var(--color-orange-500) 10%,
|
||||||
var(--color-orange-500) 40%
|
var(--color-orange-500) 20%
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2130,6 +2133,10 @@ code {
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.sm\:justify-evenly {
|
||||||
|
justify-content: space-evenly;
|
||||||
|
}
|
||||||
|
|
||||||
.sm\:px-8 {
|
.sm\:px-8 {
|
||||||
padding-left: 2rem;
|
padding-left: 2rem;
|
||||||
padding-right: 2rem;
|
padding-right: 2rem;
|
||||||
|
|
|
@ -17,21 +17,29 @@
|
||||||
<link rel="stylesheet" href="/static/css/tailwind.css" />
|
<link rel="stylesheet" href="/static/css/tailwind.css" />
|
||||||
</head>
|
</head>
|
||||||
<body class="bg-gray-100 flex flex-col">
|
<body class="bg-gray-100 flex flex-col">
|
||||||
<nav class="navbar">
|
<header class="flex flex-col sm:flex-row items-center sm:justify-evenly p-4 gap-2">
|
||||||
{{ range .Navbar }}
|
<a href="/" class="text-2xl font-bold">zdravko.mnts.dev</a>
|
||||||
<a
|
<nav class="navbar flex sm:flex-row flex-col flex-wrap space-x-2 gap-1">
|
||||||
{{ $active := eq .Path $path }}
|
{{ range .Navbar }}
|
||||||
{{ if $active }}aria-current="true"{{ end }}
|
<a
|
||||||
href="{{ .Path }}"
|
{{ $active := eq .Path $path }}
|
||||||
class="{{ if $active }}active{{ end }}"
|
{{ if $active }}aria-current="true"{{ end }}
|
||||||
>
|
href="{{ .Path }}"
|
||||||
{{ .Title }}
|
class="{{ if $active }}active{{ end }}"
|
||||||
</a>
|
>
|
||||||
{{ end }}
|
{{ .Title }}
|
||||||
</nav>
|
</a>
|
||||||
|
{{ end }}
|
||||||
|
</nav>
|
||||||
|
<img
|
||||||
|
src="https://avatars.githubusercontent.com/u/1910649?v=4"
|
||||||
|
alt="Profile Image"
|
||||||
|
class="rounded-full w-12 h-12"
|
||||||
|
></img>
|
||||||
|
</header>
|
||||||
{{ template "main" . }}
|
{{ template "main" . }}
|
||||||
<div class="container mx-auto">
|
<div class="container mx-auto">
|
||||||
<footer class="text-center text-gray-500 text-xs mt-8 mb-4">
|
<footer class="text-center text-gray-600 text-xs mt-8 mb-4">
|
||||||
© {{ Now.UTC.Year }} Zdravko -
|
© {{ Now.UTC.Year }} Zdravko -
|
||||||
<a
|
<a
|
||||||
class="hover:underline"
|
class="hover:underline"
|
||||||
|
|
|
@ -32,14 +32,29 @@
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ if or (eq .Outcome "UNKNOWN") (eq .Outcome "HEALTHY") }}
|
{{ if eq .Outcome "HEALTHY" }}
|
||||||
<div class="flex flex-col items-center">
|
<div class="flex flex-col items-center">
|
||||||
<svg
|
<svg
|
||||||
class="feather h-20 w-20 rounded-full bg-green-300 p-4 overflow-visible"
|
class="feather h-20 w-20 rounded-full bg-green-300 p-4 overflow-visible"
|
||||||
>
|
>
|
||||||
<use href="/static/icons/feather-sprite.svg#check" />
|
<use href="/static/icons/feather-sprite.svg#check" />
|
||||||
</svg>
|
</svg>
|
||||||
<h1 class="text-gray-700 mt-4">All services are online</h1>
|
<h1 class="text-gray-700 mt-4 text-lg">All services are online</h1>
|
||||||
|
<p class="text-gray-700 text-sm">
|
||||||
|
Last updated on
|
||||||
|
{{ Now.UTC.Format "Jan 02 at 15:04 MST" }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
{{ else if eq .Outcome "UNKNOWN" }}
|
||||||
|
<div class="flex flex-col items-center">
|
||||||
|
<svg
|
||||||
|
class="feather h-20 w-20 rounded-full bg-gray-300 p-4 overflow-visible"
|
||||||
|
>
|
||||||
|
<use href="/static/icons/feather-sprite.svg#help-circle" />
|
||||||
|
</svg>
|
||||||
|
<h1 class="text-gray-700 mt-4 text-lg">
|
||||||
|
We are unable to determine current status
|
||||||
|
</h1>
|
||||||
<p class="text-gray-700 text-sm">
|
<p class="text-gray-700 text-sm">
|
||||||
Last updated on
|
Last updated on
|
||||||
{{ Now.UTC.Format "Jan 02 at 15:04 MST" }}
|
{{ Now.UTC.Format "Jan 02 at 15:04 MST" }}
|
||||||
|
@ -50,9 +65,9 @@
|
||||||
<svg
|
<svg
|
||||||
class="feather h-20 w-20 rounded-full bg-red-300 p-4 overflow-visible"
|
class="feather h-20 w-20 rounded-full bg-red-300 p-4 overflow-visible"
|
||||||
>
|
>
|
||||||
<use href="/static/icons/feather-sprite.svg#alert-triangle" />
|
<use href="/static/icons/feather-sprite.svg#alert-circle" />
|
||||||
</svg>
|
</svg>
|
||||||
<h1 class="text-gray-700 mt-4">Some services are down</h1>
|
<h1 class="text-gray-700 mt-4 text-lg">Some services are down</h1>
|
||||||
<p class="text-gray-700 text-sm">
|
<p class="text-gray-700 text-sm">
|
||||||
Last updated on
|
Last updated on
|
||||||
{{ Now.UTC.Format "Jan 02 at 15:04 MST" }}
|
{{ Now.UTC.Format "Jan 02 at 15:04 MST" }}
|
||||||
|
@ -65,7 +80,7 @@
|
||||||
>
|
>
|
||||||
<use href="/static/icons/feather-sprite.svg#alert-triangle" />
|
<use href="/static/icons/feather-sprite.svg#alert-triangle" />
|
||||||
</svg>
|
</svg>
|
||||||
<h1 class="text-gray-700 mt-4">Degraded services</h1>
|
<h1 class="text-gray-700 mt-4 text-lg">Degraded services</h1>
|
||||||
<p class="text-gray-700 text-sm">
|
<p class="text-gray-700 text-sm">
|
||||||
Last updated on
|
Last updated on
|
||||||
{{ Now.UTC.Format "Jan 02 at 15:04 MST" }}
|
{{ Now.UTC.Format "Jan 02 at 15:04 MST" }}
|
||||||
|
@ -78,10 +93,10 @@
|
||||||
role="group"
|
role="group"
|
||||||
>
|
>
|
||||||
<a
|
<a
|
||||||
href="/?time-range=90days"
|
href="/?time-range=60days"
|
||||||
class="{{ if eq .TimeRange "90days" }}active{{ end }}"
|
class="{{ if eq .TimeRange "60days" }}active{{ end }}"
|
||||||
type="button"
|
type="button"
|
||||||
>90 Days</a
|
>60 Days</a
|
||||||
>
|
>
|
||||||
<a
|
<a
|
||||||
href="/?time-range=48hours"
|
href="/?time-range=48hours"
|
||||||
|
@ -90,10 +105,10 @@
|
||||||
>48 Hours</a
|
>48 Hours</a
|
||||||
>
|
>
|
||||||
<a
|
<a
|
||||||
href="/?time-range=90minutes"
|
href="/?time-range=60minutes"
|
||||||
class="{{ if eq .TimeRange "90minutes" }}active{{ end }}"
|
class="{{ if eq .TimeRange "60minutes" }}active{{ end }}"
|
||||||
type="button"
|
type="button"
|
||||||
>90 Minutes</a
|
>60 Minutes</a
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
{{ range $group, $targetsAndStatus := .Targets }}
|
{{ range $group, $targetsAndStatus := .Targets }}
|
||||||
|
@ -147,11 +162,6 @@
|
||||||
<h4>
|
<h4>
|
||||||
{{ .Name }}
|
{{ .Name }}
|
||||||
{{ if eq .Visibility "PUBLIC" }}
|
{{ if eq .Visibility "PUBLIC" }}
|
||||||
<span
|
|
||||||
class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-blue-100 text-blue-800"
|
|
||||||
>
|
|
||||||
Public
|
|
||||||
</span>
|
|
||||||
{{ else if eq .Visibility "PRIVATE" }}
|
{{ else if eq .Visibility "PRIVATE" }}
|
||||||
<span
|
<span
|
||||||
class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-fuchsia-100 text-fuchsia-800"
|
class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-fuchsia-100 text-fuchsia-800"
|
||||||
|
@ -192,11 +202,11 @@
|
||||||
class="tooltip flex flex-col gap-2 bg-white border border-gray-200 rounded p-2 shadow-lg hidden z-50 absolute mt-10 -ml-4 flex-row text-xs"
|
class="tooltip flex flex-col gap-2 bg-white border border-gray-200 rounded p-2 shadow-lg hidden z-50 absolute mt-10 -ml-4 flex-row text-xs"
|
||||||
>
|
>
|
||||||
<div class="flex flex-row gap-2 justify-between">
|
<div class="flex flex-row gap-2 justify-between">
|
||||||
{{ if eq $.TimeRange "90days" }}
|
{{ if eq $.TimeRange "60days" }}
|
||||||
{{ .Date.Format "Jan 02" }}
|
{{ .Date.Format "Jan 02" }}
|
||||||
{{ else if eq $.TimeRange "48hours" }}
|
{{ else if eq $.TimeRange "48hours" }}
|
||||||
{{ .Date.Format "Jan 02, 15:00 MST" }}
|
{{ .Date.Format "Jan 02, 15:00 MST" }}
|
||||||
{{ else if eq $.TimeRange "90minutes" }}
|
{{ else if eq $.TimeRange "60minutes" }}
|
||||||
{{ .Date.Format "Jan 02, 15:04 MST" }}
|
{{ .Date.Format "Jan 02, 15:04 MST" }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<span
|
<span
|
||||||
|
@ -221,12 +231,12 @@
|
||||||
<div
|
<div
|
||||||
class="text-slate-500 justify-self-start text-xs tracking-wider"
|
class="text-slate-500 justify-self-start text-xs tracking-wider"
|
||||||
>
|
>
|
||||||
{{ if eq $.TimeRange "90days" }}
|
{{ if eq $.TimeRange "60days" }}
|
||||||
90 days ago
|
60 days ago
|
||||||
{{ else if eq $.TimeRange "48hours" }}
|
{{ else if eq $.TimeRange "48hours" }}
|
||||||
48 hours ago
|
48 hours ago
|
||||||
{{ else if eq $.TimeRange "90minutes" }}
|
{{ else if eq $.TimeRange "60minutes" }}
|
||||||
90 minutes ago
|
60 minutes ago
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
|
|
Loading…
Reference in a new issue