mirror of
https://github.com/mentos1386/zdravko.git
synced 2024-11-22 07:43:33 +00:00
fix(worker): history add
This commit is contained in:
parent
cb690409f4
commit
53be510c0c
4 changed files with 24 additions and 13 deletions
|
@ -47,16 +47,8 @@ func (h *BaseHandler) ApiV1HealthchecksHistoryPOST(c echo.Context) error {
|
|||
|
||||
slug := c.Param("slug")
|
||||
|
||||
worker, err := services.GetWorker(ctx, h.query, slug)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if worker == nil {
|
||||
return echo.NewHTTPError(http.StatusNotFound, "Worker not found")
|
||||
}
|
||||
|
||||
var body api.ApiV1HealthchecksHistoryPOSTBody
|
||||
err = (&echo.DefaultBinder{}).BindBody(c, &body)
|
||||
err := (&echo.DefaultBinder{}).BindBody(c, &body)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
@ -17,6 +17,10 @@ p > a {
|
|||
@apply font-medium text-blue-700 hover:underline;
|
||||
}
|
||||
|
||||
code {
|
||||
@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;
|
||||
}
|
||||
|
|
|
@ -1157,6 +1157,16 @@ p > a:hover {
|
|||
text-decoration-line: underline;
|
||||
}
|
||||
|
||||
code {
|
||||
border-radius: 0.5rem;
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(243 244 246 / var(--tw-bg-opacity));
|
||||
padding: 0.25rem;
|
||||
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
||||
font-size: 0.875rem;
|
||||
line-height: 1.25rem;
|
||||
}
|
||||
|
||||
.navbar {
|
||||
margin-top: 2.5rem;
|
||||
display: flex;
|
||||
|
|
|
@ -3,13 +3,18 @@
|
|||
<form action="/settings/healthchecks/create" method="post">
|
||||
<label for="name">Name</label>
|
||||
<input type="name" name="name" id="name" placeholder="Github.com">
|
||||
<p> Name of the healthcheck can be anything.</p>
|
||||
<p>Name of the healthcheck can be anything.</p>
|
||||
<label for="workergroups">Worker Groups</label>
|
||||
<input type="text" name="workergroups" id="workergroups" placeholder="NA EU"/>
|
||||
<p> Worker groups are used to distribute the healthcheck to specific workers.</p>
|
||||
<p>Worker groups are used to distribute the healthcheck to specific workers.</p>
|
||||
<label for="schedule">Schedule</label>
|
||||
<input type="text" name="schedule" id="schedule" placeholder="* * * * *"/>
|
||||
<p> Schedule is a cron expression that defines when the healthcheck should be executed.</p>
|
||||
<input type="text" name="schedule" id="schedule" placeholder="@every 1m"/>
|
||||
<p>
|
||||
Schedule is a cron expression that defines when the healthcheck should be executed.
|
||||
</br>
|
||||
You can also use <code>@every [interval]</code> where interval is a duration like 5m, 1h, 60s.
|
||||
Or use <code>@hourly</code>, <code>@daily</code>, <code>@weekly</code>, <code>@monthly</code>, <code>@yearly</code>.
|
||||
</p>
|
||||
<label for="script">Script</label>
|
||||
<input required type="hidden" id="script" name="script">
|
||||
<div id="editor" class="block w-full h-96 rounded-lg border border-gray-300 overflow-hidden"></div>
|
||||
|
|
Loading…
Reference in a new issue