Skip to content

Commit

Permalink
Merge pull request #2 from X4BNet/upgrade-5.61
Browse files Browse the repository at this point in the history
Upgrade 5.61
  • Loading branch information
splitice authored May 29, 2024
2 parents 1b35f0d + 4299621 commit 4766aea
Show file tree
Hide file tree
Showing 9 changed files with 181 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

.hugo_build.lock
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# cState Site v5.5

This is the default cState status page website directory/folder.

* Example site repository link (you are here): https://github.com/cstate/example
* Main cState source code repository: https://github.com/cstate/cstate

## Are you updating? Use these commands

Download your site with all the directories. `git clone --recursive <your repo link goes here>`

Update the cState theme submodule. `git submodule foreach git pull origin master`

In the parent directory, type `hugo serve`. Check to see if everything is working.

Then do `git add -A; git commit -m "Update cState"; git push origin <branch, probably main or master>`. Your status page is now updated and uploaded.


## For maintainers (probably not for you)

Maintainers need to update both cstate/cstate and cstate/example for each new version.

Download this repo with all the directories. `git clone --recursive -b master https://github.com/cstate/example.git`

Add your changes from cstate/cstate's exampleSite folder.

Update the cState theme submodule. `git submodule foreach git pull origin master`

Then push `git add -A; git commit -m "Update cState vX.X.X"; git push origin master`.

## License

MIT © Mantas Vilčinskas
2 changes: 1 addition & 1 deletion README.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
https://status.x4b.net (powered by cState)
https://status.x4b.net (powered by cState)
35 changes: 32 additions & 3 deletions config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,18 @@ defaultContentLanguage: en
#
# Example: https://status.example.com/
baseURL: https://status.x4b.net
# For features like Last modified, you
# need to use a Git repository. If you
# are using Netlify, you are already
# using Git (with GitHub, GitLab, etc)
#
# So, should Git information be used
# for this website?
#
# We recommend to keep this at `true`.
# BOOLEAN; `true`, `false`
enableGitInfo: true


############################################################
# +------------------------------------------------------+ #
Expand Down Expand Up @@ -217,7 +229,7 @@ params:

# What header design should we use?
#
# Default: true
# Default: `true`
# BOOLEAN; `true`, `false`
useLargeHeaderDesign: false

Expand All @@ -230,6 +242,18 @@ params:
# STRING; `monthly`, `yearly`, `none`
incidentHistoryFormat: "yearly"

# Should incident history be hidden?
#
# By disabling the incident history, you also disable
# the RSS feed. To ensure no incidents are shown, you
# should delete them after they are resolved. This option
# overrides any other options that tailor your incident
# history’s look.
#
# Default: `false`
# BOOLEAN; `true`, `false`
disableIncidentHistory: false

# Disable dark mode
#
# If your OS and browser support the
Expand All @@ -248,7 +272,7 @@ params:
# Should we show the logo or the title
# of the status page?
#
# Default: false
# Default: `false`
# BOOLEAN; `true`, `false`
useLogo: true

Expand Down Expand Up @@ -285,7 +309,7 @@ params:
# for average downtime on
# systems ("/affected/") pages
#
# Default: false
# Default: `false`
# BOOLEAN; `true`, `false`
disableComplexCalculations: false

Expand Down Expand Up @@ -376,6 +400,11 @@ outputs:
- json
- rss
- svg
term:
- html
- json
- rss
- svg

outputFormats:
svg:
Expand Down
7 changes: 3 additions & 4 deletions netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
functions = "functions"

[build.environment]
HUGO_VERSION = "0.48"
HUGO_VERSION = "0.80.0"

[context.production.environment]
HUGO_ENV = "production"
Expand All @@ -17,7 +17,6 @@
command = "hugo -b $DEPLOY_PRIME_URL"

[[headers]]
# Define which paths this specific [[headers]] block will cover.
for = "/*"
for = "/*"
[headers.values]
Access-Control-Allow-Origin = "*"
Access-Control-Allow-Origin = "*"
2 changes: 2 additions & 0 deletions static/_headers
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/*
Access-Control-Allow-Origin: *
95 changes: 95 additions & 0 deletions static/admin/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>cState Admin</title>
</head>
<body>
<!--
To easily manage your status on Netlify,
much like on WordPress, you need to keep
this directory. Platforms which do not
support Netlify CMS do not need this
/admin/ directory.
-->
<style>
[data-slate-editor] {
-webkit-user-modify: read-write !important;
}
</style>

<script>console.log('You are using cState. The version can be looked at from the console on the homepage or incidents view. https://github.com/cstate')</script>
<script src="https://identity.netlify.com/v1/netlify-identity-widget.js"></script>
<script src="https://unpkg.com/netlify-cms@^2.0.0/dist/netlify-cms.js"></script>
<script>
var IssuePreview = createClass({
render: function() {
var entry = this.props.entry;

var layoutPostDate = entry.getIn(['data', 'date']);
var layoutPostDateEnd = entry.getIn(['data', 'resolvedWhen']);

var resultOfStateProps = {"class": "warning"};
var resultOfState = 'This incident has not yet been resolved.';

if (entry.getIn(['data', 'resolved']) === true) {
var resultOfStateProps = {"class": "green"};
var resultOfState = 'This incident has been resolved.';
}

if (entry.getIn(['data', 'informational']) === true) {
var resultOfStateProps = {"class": "green"};
var resultOfState = '';
}


return h('div', {},
h('h1', {}, entry.getIn(['data', 'title'])),
h('p', {},
h('strong', resultOfStateProps, resultOfState)
),
h('div', {"className": "text"}, this.props.widgetFor('body'))
);
}
});
CMS.registerPreviewTemplate("issues", IssuePreview, { raw: true });

const previewStyles = `
html,
body {
padding: 16px;
color: #444;
background: #fff;
font: 100%/1.5 BlinkMacSystemFont, -apple-system, "San Francisco Text", "Roboto", "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}
h1 {
line-height: 1;
margin: 0;
color: #000;
font-weight: normal;
font-size: 40px;
font-family: "Segoe UI", BlinkMacSystemFont, -apple-system, "San Francisco Text", "Roboto", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}
small {
margin-top: 12px;
color: #666;
font-variant: small-caps;
display: block;
}
.text {
padding-top: 12px;
border-top: 1px solid #ccc;
}
.green { color: #228B22; }
.red { color: #DC143C; }
.warning { color: #EE7600; }
`;
CMS.registerPreviewStyle(previewStyles, { raw: true });
</script>
</body>
</html>
2 changes: 1 addition & 1 deletion themes/cstate
Submodule cstate updated 49 files
+1 −1 .github/PULL_REQUEST_TEMPLATE.md
+2 −4 Dockerfile
+110 −95 README.md
+8 −6 docker/entrypoint.sh
+1 −1 exampleSite/.gitlab-ci.yml
+33 −0 exampleSite/README.md
+0 −3 exampleSite/README.txt
+89 −12 exampleSite/config.yml
+1 −1 exampleSite/content/issues/2019-10-08-testing-new-pipeline.md
+0 −13 exampleSite/content/issues/2020-06-13-maintenance-window.md
+21 −0 exampleSite/content/issues/2023-04-16-formatting-testing.md
+9 −0 exampleSite/content/issues/2024-02-24-maintenance-window.md
+1 −1 exampleSite/content/issues/i-testing-cstate-functions.md
+7 −2 exampleSite/netlify.toml
+2 −0 exampleSite/static/_headers
+12 −0 exampleSite/vercel.json
+4 −4 i18n/de.yaml
+3 −3 i18n/en.yaml
+160 −0 i18n/id.yaml
+160 −0 i18n/it.yaml
+160 −0 i18n/ja.yaml
+160 −0 i18n/pl.yaml
+157 −0 i18n/se.yaml
+159 −0 i18n/tl.yaml
+157 −0 i18n/uk.yaml
+ images/statuspal-logo-with-text.png
+7 −0 layouts/404.html
+4 −0 layouts/404.json
+5 −4 layouts/_default/list.html
+32 −0 layouts/_default/list.json
+44 −0 layouts/_default/list.svg
+1 −0 layouts/_default/list.xml
+0 −21 layouts/affected/404.html
+37 −0 layouts/affected/list.json
+50 −26 layouts/index.json
+1 −0 layouts/index.xml
+10 −5 layouts/issues/issue.html
+16 −1 layouts/issues/single.html
+5 −4 layouts/issues/single.json
+39 −18 layouts/issues/small.html
+33 −5 layouts/partials/index/announcements.html
+66 −20 layouts/partials/index/components.html
+5 −5 layouts/partials/index/incidents.html
+2 −2 layouts/partials/index/summary.html
+75 −43 layouts/partials/js.html
+42 −17 layouts/partials/meta.html
+92 −40 static/admin/config.yml
+1 −1 static/admin/index.html
+2 −2 theme.toml
12 changes: 12 additions & 0 deletions vercel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"headers": [
{
"source": "/(.*)",
"headers": [
{ "key": "Access-Control-Allow-Origin", "value": "*" },
{ "key": "Access-Control-Allow-Methods", "value": "GET,OPTIONS" },
{ "key": "Access-Control-Allow-Headers", "value": "X-CSRF-Token, X-Requested-With, Accept, Accept-Version, Content-Length, Content-MD5, Content-Type, Date, X-Api-Version" }
]
}
]
}

0 comments on commit 4766aea

Please sign in to comment.