From f8bda4294a3fa9af533ca7ab8753663aed7aa7d1 Mon Sep 17 00:00:00 2001 From: Mantas Vilčinskas Date: Fri, 4 Oct 2019 19:02:42 +0300 Subject: Did the same for N CMS --- static/admin/config.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'static/admin/config.yml') diff --git a/static/admin/config.yml b/static/admin/config.yml index 5bee7cb..220a47d 100644 --- a/static/admin/config.yml +++ b/static/admin/config.yml @@ -29,6 +29,7 @@ collections: - {label: "Title", name: "title", widget: "string"} - {label: "Start date & time (your time) ⌚", name: "date", widget: "datetime"} - {label: "Mark as resolved ✔", name: "resolved", widget: "boolean", required: false, default: false} + - {label: "Mark as informational ℹ", name: "informational", widget: "boolean", required: false, default: false} - {label: "End date & time (your time) ⌛", name: "resolvedWhen", widget: "datetime", required: false} - label: "Affected systems (use exact name, separated by commas) 🧐" name: "affected" @@ -38,9 +39,9 @@ collections: name: "severity" widget: "select" options: - - { label: "High (Down)", value: "down" } - - { label: "Medium (Disrupted)", value: "disrupted" } - - { label: "Low (Announcement)", value: "notice" } + - { label: "High (Down) ◼ ", value: "down" } + - { label: "Medium (Disrupted) ▲", value: "disrupted" } + - { label: "Low (Announcement) ◆", value: "notice" } - label: "Markdown body (sequence of events, description, post-mortem)" name: "body" widget: "markdown" -- cgit v1.2.3-70-g09d2 From 847b0718b6a0cfe1a0c6b0b370c5715cf108db65 Mon Sep 17 00:00:00 2001 From: Mantas Vilčinskas Date: Sun, 6 Oct 2019 11:34:17 +0300 Subject: Add compatability for v4 in N CMS --- static/admin/config.yml | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'static/admin/config.yml') diff --git a/static/admin/config.yml b/static/admin/config.yml index 220a47d..f470a4a 100644 --- a/static/admin/config.yml +++ b/static/admin/config.yml @@ -114,9 +114,20 @@ collections: allow_add: true fields: - {label: "Name", name: "name", widget: string} + - {label: "Category", hint: "All systems need a category. For more, read the migration docs: https://github.com/cstate/cstate/wiki/Usage#v3-to-v4", name: "category", widget: string} - {label: "Description", name: "description", widget: string, required: false} - {label: "Partial", hint: "Custom HTML feature: https://github.com/cstate/cstate/wiki/Customization#custom-html", name: "partial", widget: string, required: false} - # Components + # Categories + - label: "Categories" + name: "categories" + widget: "list" + allow_add: true + fields: + - {label: "Name", name: "name", widget: string} + - {label: "Description", name: "description", widget: string, required: false} + - {label: "Should this category be open by default", name: "closed", widget: "boolean", required: false} + - {label: "Should the name of this category be shown? If you want to create the appearance of an Uncategorized category, enable this.", name: "untited", widget: "boolean", required: false} + # Tabs - label: "Tabs" hint: 'You can add extra tabs below the main homepage summary, for example, to external sites, monitoring services, as shown in the example below. Try Uptime Robot!' name: "customTabs" @@ -173,6 +184,15 @@ collections: min: 1 max: 100 default: 10 + # Incidents view format + - label: 'Should the incident history be sorted by year or month?' + name: 'incidentHistoryFormat' + hint: 'Enabling sorting disables pagination. More: https://github.com/cstate/cstate/wiki/Customization#enable-sorting--archives-by-year-or-month-v40' + widget: 'select' + options: + - { label: "Show by year", value: "yearly" } + - { label: "Show by month", value: "monthly" } + - { label: "No sorting; enable pagination", value: "none" } # Brand color - label: 'Header: always keep brand color the same' name: 'alwaysKeepBrandColor' -- cgit v1.2.3-70-g09d2 From 210865bccea753fc87022cad09b8570dfdc3dd8c Mon Sep 17 00:00:00 2001 From: Mantas Vilčinskas Date: Sat, 12 Oct 2019 21:54:33 +0300 Subject: Added outputs for the API introduced in v4 to NCMS --- README.md | 4 +++- static/admin/config.yml | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) (limited to 'static/admin/config.yml') diff --git a/README.md b/README.md index 6c97d5e..809feca 100644 --- a/README.md +++ b/README.md @@ -30,8 +30,9 @@ + Works not just on mobile, but also on the archaic Internet Explorer 8 + Makes you accountable, showcasing how long it took for an issue to be resolved + Great for data manipulation and viewing — has RSS, tag-like system feeds ++ Customizable views, colors, and other elements -**Fast, reliable, and free** +**Fast, reliable, and free (even to host)** + Built with [Hugo](https://gohugo.io), a hyperfast Golang generator + Secure, ready for HTTPS, thanks to [JAMstack](https://jamstack.org/) @@ -42,6 +43,7 @@ + Edit your status page from a simple config file + Comes pre-equipped with Netlify CMS for quick admin updates + Extensive documentation on the [wiki](https://github.com/cstate/cstate/wiki) ++ [Read-only API available](https://github.com/cstate/cstate/wiki/API) ## Getting started 💻 diff --git a/static/admin/config.yml b/static/admin/config.yml index f470a4a..1b64060 100644 --- a/static/admin/config.yml +++ b/static/admin/config.yml @@ -245,3 +245,22 @@ collections: widget: "hidden" fields: - {label: "affected", name: "affected", widget: "hidden", default: "affected"} + - label: "outputs (Do not touch!)" + name: outputs + widget: "hidden" + fields: + - label: "page" + name: page + widget: "list" + allow_add: false + default: ['html', 'json'] + - label: "section" + name: section + widget: "list" + allow_add: false + default: ['html', 'json', 'rss'] + - label: "home" + name: home + widget: "list" + allow_add: false + default: ['html', 'json', 'rss'] \ No newline at end of file -- cgit v1.2.3-70-g09d2 From d04adae5f8ac3e8296b2efc1c455abdafc37eb60 Mon Sep 17 00:00:00 2001 From: Mantas Vilčinskas Date: Sun, 15 Dec 2019 12:37:26 +0200 Subject: Fix #83 - hex colors now need hash --- exampleSite/config.yml | 24 +++++++++++++----------- layouts/partials/meta.html | 42 +++++++++++++++++++++--------------------- static/admin/config.yml | 20 ++++++++++---------- 3 files changed, 44 insertions(+), 42 deletions(-) (limited to 'static/admin/config.yml') diff --git a/exampleSite/config.yml b/exampleSite/config.yml index 98f95c0..3e474b1 100644 --- a/exampleSite/config.yml +++ b/exampleSite/config.yml @@ -237,20 +237,22 @@ params: incidentPostsPerPage: 10 # Colors throughout cState - # HEX codes without the # + # + # We recommend using HEX + # (with the # symbol). # # Defaults: # - # brand: "0a0c0f" - # ok: "008000" - # disrupted: "cc4400" - # down: "e60000" - # notice: "24478f" - brand: "0a0c0f" - ok: "008000" - disrupted: "cc4400" - down: "e60000" - notice: "24478f" + # brand: "#0a0c0f" + # ok: "#008000" + # disrupted: "#cc4400" + # down: "#e60000" + # notice: "#24478f" + brand: "#0a0c0f" + ok: "#008000" + disrupted: "#cc4400" + down: "#e60000" + notice: "#24478f" # If the status page shows that # there are disruptions or outages diff --git a/layouts/partials/meta.html b/layouts/partials/meta.html index bcd3967..d953331 100644 --- a/layouts/partials/meta.html +++ b/layouts/partials/meta.html @@ -13,13 +13,13 @@ {{ printf `` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} {{ end -}} - + @@ -95,9 +95,9 @@ .clean { margin: 0; } - .ok { color: #{{ .Site.Params.ok }}; } - .warning { color: #{{ .Site.Params.disrupted }}; } - .error { color: #{{ .Site.Params.down }}; } + .ok { color: {{ .Site.Params.ok }}; } + .warning { color: {{ .Site.Params.disrupted }}; } + .error { color: {{ .Site.Params.down }}; } .contain { max-width: 640px; @@ -157,7 +157,7 @@ .header { padding: 8px 0; - background: #{{ .Site.Params.brand }}; + background: {{ .Site.Params.brand }}; } .header a { @@ -295,18 +295,18 @@ * Specific to the status */ - .status-ok .summary { background: #{{ .Site.Params.ok }}; } - .status-disrupted .summary, .change-header-color.status-disrupted .header { background: #{{ .Site.Params.disrupted }}; } - .status-down .summary, .change-header-color.status-down .header { background: #{{ .Site.Params.down }}; } - .status-notice .summary, .change-header-color.status-notice .header { background: #{{ .Site.Params.notice }}; } + .status-ok .summary { background: {{ .Site.Params.ok }}; } + .status-disrupted .summary, .change-header-color.status-disrupted .header { background: {{ .Site.Params.disrupted }}; } + .status-down .summary, .change-header-color.status-down .header { background: {{ .Site.Params.down }}; } + .status-notice .summary, .change-header-color.status-notice .header { background: {{ .Site.Params.notice }}; } .announcement-box .padding { padding: 16px; } - .status-disrupted .announcement-box { border: 2px solid #{{ .Site.Params.disrupted }}; } - .status-down .announcement-box { border: 2px solid #{{ .Site.Params.down }}; } - .status-notice .announcement-box { border: 2px solid #{{ .Site.Params.notice }}; } + .status-disrupted .announcement-box { border: 2px solid {{ .Site.Params.disrupted }}; } + .status-down .announcement-box { border: 2px solid {{ .Site.Params.down }}; } + .status-notice .announcement-box { border: 2px solid {{ .Site.Params.notice }}; } .status-disrupted .announcement-box, .status-down .announcement-box, .status-notice .announcement-box { border-top: 0; } @@ -316,10 +316,10 @@ */ .component-status { float: right; } - .component[data-status="ok"] .component-status { color: #{{ .Site.Params.ok }}; } - .component[data-status="disrupted"] .component-status { color: #{{ .Site.Params.disrupted }}; } - .component[data-status="down"] .component-status { color: #{{ .Site.Params.down }}; } - .component[data-status="notice"] .component-status { color: #{{ .Site.Params.notice }}; } + .component[data-status="ok"] .component-status { color: {{ .Site.Params.ok }}; } + .component[data-status="disrupted"] .component-status { color: {{ .Site.Params.disrupted }}; } + .component[data-status="down"] .component-status { color: {{ .Site.Params.down }}; } + .component[data-status="notice"] .component-status { color: {{ .Site.Params.notice }}; } /** * Responsiveness diff --git a/static/admin/config.yml b/static/admin/config.yml index 1b64060..0827f66 100644 --- a/static/admin/config.yml +++ b/static/admin/config.yml @@ -201,30 +201,30 @@ collections: default: true # Colors - label: 'Site HEX color: Brand' - hint: 'Should not have # mark. Default: 181818' + hint: 'Use any color type, even rgb() works. We recommend HEX: #123456. Default: #0a0c0f' name: 'brand' widget: 'string' - default: '181818' + default: '#0a0c0f' - label: 'Site HEX color: Operational / OK' - hint: 'Should not have # mark. Default: 228B22' + hint: 'Use any color type, even rgb() works. We recommend HEX: #123456. Default: #008000' name: 'ok' widget: 'string' - default: '228B22' + default: '#008000' - label: 'Site HEX color: Disrupted' - hint: 'Should not have # mark. Default: FF8C00' + hint: 'Use any color type, even rgb() works. We recommend HEX: #123456. Default: #cc4400' name: 'disrupted' widget: 'string' - default: 'FF8C00' + default: '#cc4400' - label: 'Site HEX color: Down / Offline / Major' - hint: 'Should not have # mark. Default: DC143C' + hint: 'Use any color type, even rgb() works. We recommend HEX: #123456. Default: #e60000' name: 'down' widget: 'string' - default: 'DC143C' + default: '#e60000' - label: 'Site HEX color: Notice' - hint: 'Should not have # mark. Default: 708090' + hint: 'Use any color type, even rgb() works. We recommend HEX: #123456. Default: #24478f' name: 'notice' widget: 'string' - default: '708090' + default: '#24478f' # Google Analytics - label: 'Google Analytics tracking code' hint: 'By default, cState does not use Google Analytics. If you choose to use it, you may change the placeholder code below to your own and thereby enable the tracking service. If you set the value back to UA-00000000-1, the code will once again be removed.' -- cgit v1.2.3-70-g09d2 From f6aa416fe8eab95bf1815ee58cc201fc39dcba66 Mon Sep 17 00:00:00 2001 From: Mantas Vilčinskas <11616378+mistermantas@users.noreply.github.com> Date: Sun, 15 Dec 2019 17:21:41 +0200 Subject: Remove auto refresh from N CMS --- static/admin/config.yml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'static/admin/config.yml') diff --git a/static/admin/config.yml b/static/admin/config.yml index 0b706a8..ffff761 100644 --- a/static/admin/config.yml +++ b/static/admin/config.yml @@ -175,13 +175,6 @@ collections: name: 'description' widget: 'text' default: 'We continuously monitor the status of our services and if there are any interruptions, a note will be posted here.' - # Refresh - - label: 'Auto refresh status' - name: 'autoRefresh' - widget: 'boolean' - hint: 'This does nothing but refresh the page around every 5 minutes; it does not send alerts! May also have issues on some browsers.' - required: false - default: true # Incidents per page - label: 'Incident posts shown in one page' name: 'incidentPostsPerPage' @@ -270,4 +263,4 @@ collections: name: home widget: "list" allow_add: false - default: ['html', 'json', 'rss'] \ No newline at end of file + default: ['html', 'json', 'rss'] -- cgit v1.2.3-70-g09d2