-
-
Notifications
You must be signed in to change notification settings - Fork 238
cState v5 #151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
cState v5 #151
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… 'data-time-suffix'
These changes replace the CRLF line endings on entrypoint.sh (#160) and adds more debugging messages for diagnosing issues with the docker side of cState in the future.
I was confused when reading the sample config file, as explained in issue #164. "don't support /" could have meant a trailing slash, or subdirectories, or at least wasn't exactly clear to me. By adding an explicit example of a broken behavior, we make it clear what we're talking about here, and what to avoid. Closes: #164
Closed
Closed
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Migration guide
v4 to v5
Some considerations:
informational
or theresolved
variables for issues. Those are now booleans instead of strings.term
is needed to be added as an output method to the config file, but it got renamed in one of the versions etc etc. Some context: Rename taxonomy kinds gohugoio/hugo#6911What you MUST change:
config.yml
At the very bottom or top of your config.yml, if you wish to use the Last modified feature, add this:
Next, here are the newly introduced options. You can disable all these (or not even copy paste this bit) and use cState as usual.
If you will use relative time, and therefore UTC, consider editing the dateFormat for people who do not use JavaScript (and other fallbacks). Copy and change the options to this:
To make the API work flawlessy, change the Output Formats to this:
Upgrade to Hugo 0.80
On Netlify, make sure you are using Ubuntu 16.04 (not the old build image) in Build & deploy settings. You can change the HUGO VERSION in the Environment Variables from the Netlify UI or also edit the netlify.toml file.
netlify.toml / vercel.json
Add this to your netlify.toml for your site if you don't have it already:
Docs for headers: https://docs.netlify.com/routing/headers/#multi-value-headers
Vercel equivalent (made by contributor);
Changelog
This update brings a lot of requested and long-awaited features, also some bug fixes to your status page.
A different (better) way of handling time — #139 (#128, #135, also see #123)
What is time? It is an important element for a status page to get right. And there are so many ways to show the time. But some are more confusing than others.
Prior to v5, cState did not give too much thought about what kind of time zone the user was in. Yes, there were (and still are) relative calculations of "how long an outage takes", but does the end user know exactly in which time zone at 6PM the issue began?
For small countries like Lithuania, there is one time zone that everybody is familiar with — GMT+2 in our case. So you could have the time and date, as shown in the config, be 'synced' to Eastern European/Lithuanian time. Would be confusing for people in vastly different time zones like those of North America, but it might not be a big issue for some.
If you have an international user base, then this is a real problem. Again, your company in San Francisco could choose to use the time in that specific region and add on to the date text that we are using this time zone, not another one. Still, this can be prove to be annoying.
For new setups, cState defaults to relative time and ASSUMES YOU USE UTC TIME.
Thanks to all the people who suggested and worked on this feature, most notably @khamer.
Expanded read-only JSON API (version 2!)
There are lots of updates to the API to make it actually useful. Read here
There aren't many breaking changes unless you rely on
informational
or theresolved
variables for issues. Those are now booleans instead of strings.Also see #159
Are you looking for a monitor bot or extension to show when something is down on your site?
Check out the new cState project HTML Embed
Other new features
Last modified
lastMod
(last modified date) is now available through the newer, v2, API and I am trying to figure out how to implement it properly in the UI. There's a param in config.ymlenableLastMod
if you want to check it out.Category status
Now when a category is closed you can see the status of it. #101 Groups take on the status of their most degraded child components/systems. Opening the category, like always, shows the individual statuses. This feature is only available with JavaScript on.
On new websites, Vercel deployments will automatically allow cross-origin requests
Introduced in #176 from @jacobhq — copy the file introduced in the new
exampleSite
directory (or cstate/example repo when v5 goes live to production) to use this functionality for the API.Things requiring attention of some users:
Minor changes include: