Skip to content

Commit

Permalink
fix: updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
titanism committed Oct 2, 2023
1 parent 57c0f0e commit 916a1b7
Show file tree
Hide file tree
Showing 35 changed files with 130 additions and 39 deletions.
1 change: 1 addition & 0 deletions app/controllers/web/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ async function api(ctx) {
[...$codeTags].map(async ($codeTag) => {
const cmd = $codeTag.textContent.trim();
if (cmd.startsWith('curl -X')) return;
if (cmd.includes('/v1/logs/download')) return;
if (REGEX_DOMAIN_PARAM.test(cmd)) return;
if (REGEX_ALIAS_PARAM.test(cmd)) return;
if (REGEX_MEMBER_PARAM.test(cmd)) return;
Expand Down
19 changes: 14 additions & 5 deletions app/views/_breadcrumbs.pug
Original file line number Diff line number Diff line change
Expand Up @@ -115,20 +115,29 @@ if breadcrumbs.length > 1
else
case ctx.pathWithoutLocale
when '/my-account/logs'
if logs && logs.length > 0 && itemCount && itemCount > 0
ul.list-inline.mb-0
ul.list-inline.mb-0
li.list-inline-item.mb-1
a.btn.btn-dark(href=l("/email-api#logs"), target="_blank")
i.fa.fa-fw.fa-code.text-themed
= " "
= t("Retrieve via API")
if logs && logs.length > 0 && itemCount && itemCount > 0
li.list-inline-item.mb-1
form.ajax-form.confirm-prompt(
action=l('/my-account/logs/download'),
action=l("/my-account/logs/download"),
method="GET",
data-confirm-prompt-title=t("Download Log Report"),
data-confirm-prompt-html=t('We will send an email to <span class="font-weight-bold text-monospace notranslate">%s</span> when your CSV spreadsheet is ready with <span class="font-weight-bold notranslate">%d</span> log rows.', user.email, itemCount)
)
if ctx.query && Object.keys(ctx.query).length > 0
each key in Object.keys(ctx.query)
if key !== 'limit' && key !== 'page'
input(type="hidden", name=key, value=ctx.query[key])
button(type="submit").btn.btn-primary
input(
type="hidden",
name=key,
value=ctx.query[key]
)
button.btn.btn-primary(type="submit")
i.fa.fa-file-csv
= " "
= t("Download Log Report")
Expand Down
8 changes: 8 additions & 0 deletions app/views/api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,18 @@ Note that you can use services such as [Crontab.guru](https://crontab.guru/) to

> Example Cron job (at midnight every day **and with logs for previous day**):
For MacOS:

```sh
0 0 * * * /usr/bin/curl BASE_URI/v1/logs/download?q=`date -v-1d -u "+%-m/%-d/%y"` -u API_TOKEN: &>/dev/null
```

For Linux and Ubuntu:

```sh
0 0 * * * /usr/bin/curl BASE_URI/v1/logs/download?q=`date --date "-1 days" -u "+%-m/%-d/%y"` -u API_TOKEN: &>/dev/null
```


## Account

Expand Down
2 changes: 1 addition & 1 deletion app/views/home.pug
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ block body
#stars.user-select-none
if !isSafari
#rocket.user-select-none
#waving(class=isSafari ? '' : 'floating-animation').user-select-none
#waving.user-select-none(class=isSafari ? "" : "floating-animation")
.container.my-auto.pt-5
.row
.col-12.col-lg-6
Expand Down
2 changes: 1 addition & 1 deletion app/views/my-account/logs/_table.pug
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ table.table.table-hover.table-bordered.table-sm
li.list-inline-item.small.d-inline
small.text-monospace
if log.err && log.err.isCodeBug === true
= 'An unexpected internal server error has occurred'
= "An unexpected internal server error has occurred"
else
!= log.err && log.err.message ? ansiHTML(log.err.message) : ansiHTML(log.message)
td.align-middle.text-center
Expand Down
2 changes: 1 addition & 1 deletion app/views/my-account/logs/retrieve.pug
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ block body
li.list-inline-item.small.d-inline
small.text-monospace
if log.err && log.err.isCodeBug === true
= 'An unexpected internal server error has occurred'
= "An unexpected internal server error has occurred"
else
!= log.err && log.err.message ? ansiHTML(log.err.message) : ansiHTML(log.message)
if _.isObject(log.meta) && _.isObject(log.meta.session) && _.isObject(log.meta.session.headers) && !_.isEmpty(log.meta.session.headers)
Expand Down
2 changes: 1 addition & 1 deletion app/views/pricing.pug
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ block body
#stars.user-select-none
if !isSafari
#rocket.user-select-none
#waving(class=isSafari ? '' : 'floating-animation').user-select-none
#waving.user-select-none(class=isSafari ? "" : "floating-animation")
.container.my-auto.pt-5
.row
.col-12.col-lg-6
Expand Down
4 changes: 1 addition & 3 deletions emails/self-test/html.pug
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,7 @@ block content
= " "
= t("Email API designed for developers")
= " "
a.badge.badge-dark(
href=`${config.urls.web}/email-api`
)
a.badge.badge-dark(href=`${config.urls.web}/email-api`)
= t("Email API")
= " "
!= "&rarr;"
Expand Down
5 changes: 4 additions & 1 deletion locales/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -4912,5 +4912,8 @@
"to validate your cron job expression syntax.": "للتحقق من صحة بناء جملة تعبير وظيفة cron الخاص بك.",
"Example Cron job (at midnight every day": "مثال على وظيفة كرون (في منتصف الليل كل يوم",
"and with logs for previous day": "ومع سجلات اليوم السابق",
"Gzip": "غزيب"
"Gzip": "غزيب",
"Retrieve via API": "استرداد عبر API",
"For MacOS:": "لنظام التشغيل MacOS:",
"For Linux and Ubuntu:": "بالنسبة لنظام التشغيل Linux وUbuntu:"
}
5 changes: 4 additions & 1 deletion locales/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -4912,5 +4912,8 @@
"to validate your cron job expression syntax.": "pro ověření syntaxe výrazu úlohy cron.",
"Example Cron job (at midnight every day": "Příklad úlohy Cron (každý den o půlnoci",
"and with logs for previous day": "a s protokoly za předchozí den",
"Gzip": "Gzip"
"Gzip": "Gzip",
"Retrieve via API": "Načíst přes API",
"For MacOS:": "Pro MacOS:",
"For Linux and Ubuntu:": "Pro Linux a Ubuntu:"
}
5 changes: 4 additions & 1 deletion locales/da.json
Original file line number Diff line number Diff line change
Expand Up @@ -4648,5 +4648,8 @@
"to validate your cron job expression syntax.": "for at validere din cron job udtrykssyntaks.",
"Example Cron job (at midnight every day": "Eksempel Cron job (ved midnat hver dag",
"and with logs for previous day": "og med logs for foregående dag",
"Gzip": "Gzip"
"Gzip": "Gzip",
"Retrieve via API": "Hent via API",
"For MacOS:": "Til MacOS:",
"For Linux and Ubuntu:": "Til Linux og Ubuntu:"
}
5 changes: 4 additions & 1 deletion locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -3940,5 +3940,8 @@
"to validate your cron job expression syntax.": "um die Syntax Ihres Cron-Job-Ausdrucks zu validieren.",
"Example Cron job (at midnight every day": "Beispiel für einen Cron-Job (jeden Tag um Mitternacht).",
"and with logs for previous day": "und mit Protokollen für den Vortag",
"Gzip": "Gzip"
"Gzip": "Gzip",
"Retrieve via API": "Über API abrufen",
"For MacOS:": "Für MacOS:",
"For Linux and Ubuntu:": "Für Linux und Ubuntu:"
}
5 changes: 4 additions & 1 deletion locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -4688,5 +4688,8 @@
"to validate your cron job expression syntax.": "to validate your cron job expression syntax.",
"Example Cron job (at midnight every day": "Example Cron job (at midnight every day",
"and with logs for previous day": "and with logs for previous day",
"Gzip": "Gzip"
"Gzip": "Gzip",
"Retrieve via API": "Retrieve via API",
"For MacOS:": "For MacOS:",
"For Linux and Ubuntu:": "For Linux and Ubuntu:"
}
5 changes: 4 additions & 1 deletion locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -4910,5 +4910,8 @@
"to validate your cron job expression syntax.": "para validar la sintaxis de expresión de su trabajo cron.",
"Example Cron job (at midnight every day": "Ejemplo de trabajo cron (a medianoche todos los días)",
"and with logs for previous day": "y con registros del día anterior",
"Gzip": "zip"
"Gzip": "zip",
"Retrieve via API": "Recuperar a través de API",
"For MacOS:": "Para Mac OS:",
"For Linux and Ubuntu:": "Para Linux y Ubuntu:"
}
5 changes: 4 additions & 1 deletion locales/fi.json
Original file line number Diff line number Diff line change
Expand Up @@ -4757,5 +4757,8 @@
"to validate your cron job expression syntax.": "vahvistaaksesi cron-työlausekkeen syntaksin.",
"Example Cron job (at midnight every day": "Esimerkki Cron-työstä (joka päivä keskiyöllä",
"and with logs for previous day": "ja edellisen päivän lokeilla",
"Gzip": "Gzip"
"Gzip": "Gzip",
"Retrieve via API": "Hae API:n kautta",
"For MacOS:": "MacOS:",
"For Linux and Ubuntu:": "Linux ja Ubuntu:"
}
5 changes: 4 additions & 1 deletion locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -4912,5 +4912,8 @@
"to validate your cron job expression syntax.": "pour valider la syntaxe de votre expression de tâche cron.",
"Example Cron job (at midnight every day": "Exemple de tâche Cron (à minuit tous les jours)",
"and with logs for previous day": "et avec les journaux de la veille",
"Gzip": "Gzip"
"Gzip": "Gzip",
"Retrieve via API": "Récupérer via API",
"For MacOS:": "Pour Mac OS :",
"For Linux and Ubuntu:": "Pour Linux et Ubuntu :"
}
5 changes: 4 additions & 1 deletion locales/he.json
Original file line number Diff line number Diff line change
Expand Up @@ -4912,5 +4912,8 @@
"to validate your cron job expression syntax.": "כדי לאמת את תחביר ביטוי ה-cron job שלך.",
"Example Cron job (at midnight every day": "דוגמה לעבודת Cron (בחצות כל יום",
"and with logs for previous day": "ועם יומנים ליום הקודם",
"Gzip": "Gzip"
"Gzip": "Gzip",
"Retrieve via API": "אחזור דרך API",
"For MacOS:": "עבור MacOS:",
"For Linux and Ubuntu:": "עבור לינוקס ואובונטו:"
}
5 changes: 4 additions & 1 deletion locales/hu.json
Original file line number Diff line number Diff line change
Expand Up @@ -4912,5 +4912,8 @@
"to validate your cron job expression syntax.": "a cron job kifejezés szintaxisának érvényesítéséhez.",
"Example Cron job (at midnight every day": "Példa Cron munkára (minden nap éjfélkor",
"and with logs for previous day": "és az előző napi naplókkal",
"Gzip": "Gzip"
"Gzip": "Gzip",
"Retrieve via API": "Letöltés API-n keresztül",
"For MacOS:": "MacOS esetén:",
"For Linux and Ubuntu:": "Linux és Ubuntu esetén:"
}
5 changes: 4 additions & 1 deletion locales/id.json
Original file line number Diff line number Diff line change
Expand Up @@ -4912,5 +4912,8 @@
"to validate your cron job expression syntax.": "untuk memvalidasi sintaks ekspresi tugas cron Anda.",
"Example Cron job (at midnight every day": "Contoh pekerjaan Cron (pada tengah malam setiap hari",
"and with logs for previous day": "dan dengan log untuk hari sebelumnya",
"Gzip": "Gzip"
"Gzip": "Gzip",
"Retrieve via API": "Ambil melalui API",
"For MacOS:": "Untuk MacOS:",
"For Linux and Ubuntu:": "Untuk Linux dan Ubuntu:"
}
5 changes: 4 additions & 1 deletion locales/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -4912,5 +4912,8 @@
"to validate your cron job expression syntax.": "per convalidare la sintassi dell'espressione del processo cron.",
"Example Cron job (at midnight every day": "Esempio di lavoro Cron (a mezzanotte tutti i giorni",
"and with logs for previous day": "e con i registri del giorno precedente",
"Gzip": "Gzip"
"Gzip": "Gzip",
"Retrieve via API": "Recupera tramite API",
"For MacOS:": "Per MacOS:",
"For Linux and Ubuntu:": "Per Linux e Ubuntu:"
}
5 changes: 4 additions & 1 deletion locales/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -4912,5 +4912,8 @@
"to validate your cron job expression syntax.": "cron ジョブ式の構文を検証します。",
"Example Cron job (at midnight every day": "Cron ジョブの例 (毎日午前 0 時)",
"and with logs for previous day": "前日のログ付き",
"Gzip": "Gzip"
"Gzip": "Gzip",
"Retrieve via API": "API経由で取得",
"For MacOS:": "MacOSの場合:",
"For Linux and Ubuntu:": "Linux および Ubuntu の場合:"
}
5 changes: 4 additions & 1 deletion locales/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -4912,5 +4912,8 @@
"to validate your cron job expression syntax.": "cron 작업 표현식 구문을 검증합니다.",
"Example Cron job (at midnight every day": "예시 Cron 작업(매일 자정)",
"and with logs for previous day": "그리고 전날의 로그와 함께",
"Gzip": "Gzip"
"Gzip": "Gzip",
"Retrieve via API": "API를 통해 검색",
"For MacOS:": "MacOS의 경우:",
"For Linux and Ubuntu:": "Linux 및 Ubuntu의 경우:"
}
5 changes: 4 additions & 1 deletion locales/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -4912,5 +4912,8 @@
"to validate your cron job expression syntax.": "om de syntaxis van uw cronjob-expressie te valideren.",
"Example Cron job (at midnight every day": "Voorbeeld Cronjob (elke dag om middernacht",
"and with logs for previous day": "en met logs van de vorige dag",
"Gzip": "Gzip"
"Gzip": "Gzip",
"Retrieve via API": "Ophalen via API",
"For MacOS:": "Voor MacOS:",
"For Linux and Ubuntu:": "Voor Linux en Ubuntu:"
}
5 changes: 4 additions & 1 deletion locales/no.json
Original file line number Diff line number Diff line change
Expand Up @@ -4917,5 +4917,8 @@
"to validate your cron job expression syntax.": "for å validere syntaksen for cron jobbuttrykk.",
"Example Cron job (at midnight every day": "Eksempel Cron-jobb (ved midnatt hver dag",
"and with logs for previous day": "og med logger for forrige dag",
"Gzip": "Gzip"
"Gzip": "Gzip",
"Retrieve via API": "Hent via API",
"For MacOS:": "For MacOS:",
"For Linux and Ubuntu:": "For Linux og Ubuntu:"
}
5 changes: 4 additions & 1 deletion locales/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -4912,5 +4912,8 @@
"to validate your cron job expression syntax.": "aby sprawdzić składnię wyrażenia zadania cron.",
"Example Cron job (at midnight every day": "Przykładowe zadanie Cron (codziennie o północy",
"and with logs for previous day": "oraz logi z poprzedniego dnia",
"Gzip": "Gzip"
"Gzip": "Gzip",
"Retrieve via API": "Pobierz przez API",
"For MacOS:": "Dla systemu MacOS:",
"For Linux and Ubuntu:": "Dla Linuksa i Ubuntu:"
}
5 changes: 4 additions & 1 deletion locales/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -4912,5 +4912,8 @@
"to validate your cron job expression syntax.": "para validar a sintaxe da expressão do seu cron job.",
"Example Cron job (at midnight every day": "Exemplo de Cron job (à meia-noite todos os dias",
"and with logs for previous day": "e com registros do dia anterior",
"Gzip": "Gzip"
"Gzip": "Gzip",
"Retrieve via API": "Recuperar via API",
"For MacOS:": "Para MacOS:",
"For Linux and Ubuntu:": "Para Linux e Ubuntu:"
}
5 changes: 4 additions & 1 deletion locales/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -4912,5 +4912,8 @@
"to validate your cron job expression syntax.": "для проверки синтаксиса выражения вашего задания cron.",
"Example Cron job (at midnight every day": "Пример задания Cron (каждый день в полночь",
"and with logs for previous day": "и с журналами за предыдущий день",
"Gzip": "Gzip"
"Gzip": "Gzip",
"Retrieve via API": "Получить через API",
"For MacOS:": "Для MacOS:",
"For Linux and Ubuntu:": "Для Linux и Ubuntu:"
}
5 changes: 4 additions & 1 deletion locales/sv.json
Original file line number Diff line number Diff line change
Expand Up @@ -4912,5 +4912,8 @@
"to validate your cron job expression syntax.": "för att validera syntaxen för ditt cron-jobbuttryck.",
"Example Cron job (at midnight every day": "Exempel på Cron-jobb (vid midnatt varje dag",
"and with logs for previous day": "och med loggar för föregående dag",
"Gzip": "Gzip"
"Gzip": "Gzip",
"Retrieve via API": "Hämta via API",
"For MacOS:": "För MacOS:",
"For Linux and Ubuntu:": "För Linux och Ubuntu:"
}
5 changes: 4 additions & 1 deletion locales/th.json
Original file line number Diff line number Diff line change
Expand Up @@ -4912,5 +4912,8 @@
"to validate your cron job expression syntax.": "เพื่อตรวจสอบไวยากรณ์นิพจน์งาน cron ของคุณ",
"Example Cron job (at midnight every day": "ตัวอย่างงาน Cron (เที่ยงคืนทุกวัน)",
"and with logs for previous day": "และมีบันทึกของวันก่อนหน้า",
"Gzip": "จีซิป"
"Gzip": "จีซิป",
"Retrieve via API": "ดึงข้อมูลผ่าน API",
"For MacOS:": "สำหรับ MacOS:",
"For Linux and Ubuntu:": "สำหรับ Linux และ Ubuntu:"
}
5 changes: 4 additions & 1 deletion locales/tr.json
Original file line number Diff line number Diff line change
Expand Up @@ -4912,5 +4912,8 @@
"to validate your cron job expression syntax.": "cron işi ifadesi sözdiziminizi doğrulamak için.",
"Example Cron job (at midnight every day": "Örnek Cron işi (her gün gece yarısı)",
"and with logs for previous day": "ve önceki güne ait günlüklerle",
"Gzip": "Gzip"
"Gzip": "Gzip",
"Retrieve via API": "API aracılığıyla al",
"For MacOS:": "MacOS için:",
"For Linux and Ubuntu:": "Linux ve Ubuntu için:"
}
5 changes: 4 additions & 1 deletion locales/uk.json
Original file line number Diff line number Diff line change
Expand Up @@ -4912,5 +4912,8 @@
"to validate your cron job expression syntax.": "щоб перевірити синтаксис виразу завдання cron.",
"Example Cron job (at midnight every day": "Приклад завдання Cron (кожного дня опівночі",
"and with logs for previous day": "і з журналами за попередній день",
"Gzip": "Gzip"
"Gzip": "Gzip",
"Retrieve via API": "Отримати через API",
"For MacOS:": "Для MacOS:",
"For Linux and Ubuntu:": "Для Linux і Ubuntu:"
}
5 changes: 4 additions & 1 deletion locales/vi.json
Original file line number Diff line number Diff line change
Expand Up @@ -4912,5 +4912,8 @@
"to validate your cron job expression syntax.": "để xác thực cú pháp biểu thức công việc định kỳ của bạn.",
"Example Cron job (at midnight every day": "Ví dụ Cron job (vào lúc nửa đêm hàng ngày",
"and with logs for previous day": "và với nhật ký của ngày hôm trước",
"Gzip": "Gzip"
"Gzip": "Gzip",
"Retrieve via API": "Truy xuất qua API",
"For MacOS:": "Đối với MacOS:",
"For Linux and Ubuntu:": "Đối với Linux và Ubuntu:"
}
5 changes: 4 additions & 1 deletion locales/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -4603,5 +4603,8 @@
"to validate your cron job expression syntax.": "验证您的 cron 作业表达式语法。",
"Example Cron job (at midnight every day": "Cron 作业示例(每天午夜",
"and with logs for previous day": "以及前一天的日志",
"Gzip": "压缩包"
"Gzip": "压缩包",
"Retrieve via API": "通过API检索",
"For MacOS:": "对于 MacOS:",
"For Linux and Ubuntu:": "对于 Linux 和 Ubuntu:"
}
4 changes: 2 additions & 2 deletions test/web/snapshots/index.js.md

Large diffs are not rendered by default.

Binary file modified test/web/snapshots/index.js.snap
Binary file not shown.

0 comments on commit 916a1b7

Please sign in to comment.