From be6a2495885e84ff5ccfedefe392308f1c09b5f0 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Wed, 30 Sep 2020 05:10:21 +0000 Subject: [PATCH 01/16] Update dependency @fortawesome/fontawesome-free to ^5.15.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 78e2c9c..fdd161d 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "@angular/platform-browser-dynamic": "~10.0.4", "@angular/platform-server": "~10.0.4", "@angular/router": "~10.0.4", - "@fortawesome/fontawesome-free": "^5.14.0", + "@fortawesome/fontawesome-free": "^5.15.0", "@nguniversal/express-engine": "^10.1.0", "bootstrap": "^4.5.2", "express": "^4.17.1", -- 2.45.2 From 93658f1ff334b5d6f93d81606a3d6476c055905c Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Sat, 3 Oct 2020 05:09:20 +0000 Subject: [PATCH 02/16] Update node Docker tag to v14.12.0 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ce59e31..aeb27e5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:14.11.0-alpine +FROM node:14.12.0-alpine COPY dist/universal-statuspage /universal-statuspage -- 2.45.2 From 6bbc6518d9ccec4d33b0bb92e4a5554b59348d9d Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 6 Oct 2020 05:11:15 +0000 Subject: [PATCH 03/16] Update dependency @fortawesome/fontawesome-free to ^5.15.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fdd161d..a33628f 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "@angular/platform-browser-dynamic": "~10.0.4", "@angular/platform-server": "~10.0.4", "@angular/router": "~10.0.4", - "@fortawesome/fontawesome-free": "^5.15.0", + "@fortawesome/fontawesome-free": "^5.15.1", "@nguniversal/express-engine": "^10.1.0", "bootstrap": "^4.5.2", "express": "^4.17.1", -- 2.45.2 From e1b2e5c61c8ea16a95f7f987d8a0efdc8b7efb0d Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Tue, 6 Oct 2020 05:12:19 +0000 Subject: [PATCH 04/16] Update node Docker tag to v14.13.0 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index aeb27e5..2081083 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:14.12.0-alpine +FROM node:14.13.0-alpine COPY dist/universal-statuspage /universal-statuspage -- 2.45.2 From ca7ced095893f9d981725d763b0d2e7f88f19200 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 9 Oct 2020 05:07:48 +0000 Subject: [PATCH 05/16] Update node Docker tag to v14.13.1 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 2081083..776d57e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:14.13.0-alpine +FROM node:14.13.1-alpine COPY dist/universal-statuspage /universal-statuspage -- 2.45.2 From 0aa69aa34d266ec47daad5bfbb42c1ff379a63f5 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Thu, 15 Oct 2020 05:09:43 +0000 Subject: [PATCH 06/16] Update dependency bootstrap to ^4.5.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a33628f..ad4d8d6 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "@angular/router": "~10.0.4", "@fortawesome/fontawesome-free": "^5.15.1", "@nguniversal/express-engine": "^10.1.0", - "bootstrap": "^4.5.2", + "bootstrap": "^4.5.3", "express": "^4.17.1", "jsonpath-plus": "^4.0.0", "roboto-fontface": "^0.10.0", -- 2.45.2 From a9d0157f6e248d0d9eafb14ac6c3ff52dfa8d9d4 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Sat, 17 Oct 2020 05:07:48 +0000 Subject: [PATCH 07/16] Update node Docker tag to v14.14.0 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 776d57e..24e1261 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:14.13.1-alpine +FROM node:14.14.0-alpine COPY dist/universal-statuspage /universal-statuspage -- 2.45.2 From 0092a84ba95f7d0a3241f0cfec6e9dfebf96d8f9 Mon Sep 17 00:00:00 2001 From: samuel-p Date: Fri, 27 Nov 2020 19:03:08 +0100 Subject: [PATCH 08/16] updated .drone.yml --- .drone.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/.drone.yml b/.drone.yml index 67ebd66..ef18a48 100644 --- a/.drone.yml +++ b/.drone.yml @@ -34,6 +34,37 @@ kind: pipeline type: docker name: linux-arm +platform: + os: linux + arch: arm64 + +steps: + - name: build + image: node:alpine + commands: + - npm install + - npm run build:ssr + - name: docker + image: plugins/docker + settings: + auto_tag: true + auto_tag_suffix: linux-arm64 + repo: samuelph/universal-statuspage + username: + from_secret: USERNAME + password: + from_secret: PASSWORD + when: + branch: + - master + event: + - push + +--- +kind: pipeline +type: docker +name: linux-arm + platform: os: linux arch: arm @@ -79,6 +110,7 @@ steps: template: samuelph/universal-statuspage:OS-ARCH platforms: - linux/amd64 + - linux/arm64 - linux/arm username: from_secret: USERNAME @@ -87,6 +119,7 @@ steps: depends_on: - linux-amd64 + - linux-arm64 - linux-arm trigger: -- 2.45.2 From 494371a01d84dde7a9e586970e6798af1718c628 Mon Sep 17 00:00:00 2001 From: samuel-p Date: Fri, 27 Nov 2020 19:07:12 +0100 Subject: [PATCH 09/16] updated @angular/cdk --- package.json | 26 ++++++++++++------------- src/app/app-routing.module.ts | 5 +++-- src/app/app.component.spec.ts | 4 ++-- src/app/status/status.component.spec.ts | 4 ++-- 4 files changed, 20 insertions(+), 19 deletions(-) diff --git a/package.json b/package.json index ad4d8d6..8cfe011 100644 --- a/package.json +++ b/package.json @@ -15,17 +15,17 @@ }, "private": true, "dependencies": { - "@angular/animations": "~10.0.4", - "@angular/cdk": "^10.0.2", - "@angular/common": "~10.0.4", - "@angular/compiler": "~10.0.4", - "@angular/core": "~10.0.4", - "@angular/forms": "~10.0.4", + "@angular/animations": "~11.0.2", + "@angular/cdk": "^11.0.1", + "@angular/common": "~11.0.2", + "@angular/compiler": "~11.0.2", + "@angular/core": "~11.0.2", + "@angular/forms": "~11.0.2", "@angular/material": "^10.0.2", - "@angular/platform-browser": "~10.0.4", - "@angular/platform-browser-dynamic": "~10.0.4", - "@angular/platform-server": "~10.0.4", - "@angular/router": "~10.0.4", + "@angular/platform-browser": "~11.0.2", + "@angular/platform-browser-dynamic": "~11.0.2", + "@angular/platform-server": "~11.0.2", + "@angular/router": "~11.0.2", "@fortawesome/fontawesome-free": "^5.15.1", "@nguniversal/express-engine": "^10.1.0", "bootstrap": "^4.5.3", @@ -39,8 +39,8 @@ "devDependencies": { "@angular-devkit/build-angular": "~0.1000.3", "@angular/cli": "~10.0.3", - "@angular/compiler-cli": "~10.0.4", - "@angular/language-service": "~10.0.4", + "@angular/compiler-cli": "~11.0.2", + "@angular/language-service": "~11.0.2", "@nguniversal/builders": "^10.1.0", "@types/express": "^4.17.8", "@types/node": "^14.0.23", @@ -57,6 +57,6 @@ "protractor": "~7.0.0", "ts-node": "~8.10.2", "tslint": "~6.1.0", - "typescript": "~3.9.7" + "typescript": "~4.0.5" } } diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 5891c31..a240e16 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -9,8 +9,9 @@ const routes: Routes = [{ @NgModule({ imports: [RouterModule.forRoot(routes, { - initialNavigation: 'enabled' - })], + initialNavigation: 'enabled', + relativeLinkResolution: 'legacy' +})], exports: [RouterModule] }) export class AppRoutingModule { diff --git a/src/app/app.component.spec.ts b/src/app/app.component.spec.ts index 5d69a33..994ccc9 100644 --- a/src/app/app.component.spec.ts +++ b/src/app/app.component.spec.ts @@ -1,9 +1,9 @@ -import { TestBed, async } from '@angular/core/testing'; +import { TestBed, waitForAsync } from '@angular/core/testing'; import { RouterTestingModule } from '@angular/router/testing'; import { AppComponent } from './app.component'; describe('AppComponent', () => { - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ imports: [ RouterTestingModule diff --git a/src/app/status/status.component.spec.ts b/src/app/status/status.component.spec.ts index ddf4f67..0fed327 100644 --- a/src/app/status/status.component.spec.ts +++ b/src/app/status/status.component.spec.ts @@ -1,4 +1,4 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { StatusComponent } from './status.component'; @@ -6,7 +6,7 @@ describe('StatusComponent', () => { let component: StatusComponent; let fixture: ComponentFixture; - beforeEach(async(() => { + beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ StatusComponent ] }) -- 2.45.2 From 19c91082f73c17dce5f4b1dfa00d82d720c1f815 Mon Sep 17 00:00:00 2001 From: samuel-p Date: Fri, 27 Nov 2020 19:26:27 +0100 Subject: [PATCH 10/16] updated @angular/cli --- angular.json | 1 - e2e/tsconfig.json | 2 +- package.json | 10 +++++----- tsconfig.app.json | 2 +- tsconfig.base.json | 23 ----------------------- tsconfig.json | 41 ++++++++++++++++++++++------------------- tsconfig.spec.json | 2 +- 7 files changed, 30 insertions(+), 51 deletions(-) delete mode 100644 tsconfig.base.json diff --git a/angular.json b/angular.json index a9c5904..a458a21 100644 --- a/angular.json +++ b/angular.json @@ -46,7 +46,6 @@ "optimization": true, "outputHashing": "all", "sourceMap": false, - "extractCss": true, "namedChunks": false, "extractLicenses": true, "vendorChunk": false, diff --git a/e2e/tsconfig.json b/e2e/tsconfig.json index 6b87cc4..c92199c 100644 --- a/e2e/tsconfig.json +++ b/e2e/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../tsconfig.base.json", + "extends": "../tsconfig.json", "compilerOptions": { "outDir": "../out-tsc/e2e", "module": "commonjs", diff --git a/package.json b/package.json index 8cfe011..c27c3e4 100644 --- a/package.json +++ b/package.json @@ -37,22 +37,22 @@ "zone.js": "~0.10.2" }, "devDependencies": { - "@angular-devkit/build-angular": "~0.1000.3", - "@angular/cli": "~10.0.3", + "@angular-devkit/build-angular": "~0.1100.2", + "@angular/cli": "~11.0.2", "@angular/compiler-cli": "~11.0.2", "@angular/language-service": "~11.0.2", "@nguniversal/builders": "^10.1.0", "@types/express": "^4.17.8", "@types/node": "^14.0.23", - "@types/jasmine": "~3.5.11", + "@types/jasmine": "~3.6.0", "@types/jasminewd2": "~2.0.3", "codelyzer": "^6.0.0", - "jasmine-core": "~3.5.0", + "jasmine-core": "~3.6.0", "jasmine-spec-reporter": "~5.0.0", "karma": "~5.1.0", "karma-chrome-launcher": "~3.1.0", "karma-coverage-istanbul-reporter": "~3.0.2", - "karma-jasmine": "~3.3.0", + "karma-jasmine": "~4.0.0", "karma-jasmine-html-reporter": "^1.5.0", "protractor": "~7.0.0", "ts-node": "~8.10.2", diff --git a/tsconfig.app.json b/tsconfig.app.json index 44795bd..f758d98 100644 --- a/tsconfig.app.json +++ b/tsconfig.app.json @@ -1,5 +1,5 @@ { - "extends": "./tsconfig.base.json", + "extends": "./tsconfig.json", "compilerOptions": { "outDir": "./out-tsc/app", "types": [] diff --git a/tsconfig.base.json b/tsconfig.base.json deleted file mode 100644 index ac05639..0000000 --- a/tsconfig.base.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "compileOnSave": false, - "compilerOptions": { - "baseUrl": "./", - "outDir": "./dist/out-tsc", - "sourceMap": true, - "declaration": false, - "downlevelIteration": true, - "experimentalDecorators": true, - "module": "es2020", - "moduleResolution": "node", - "importHelpers": true, - "target": "es2015", - "lib": [ - "es2018", - "dom" - ] - }, - "angularCompilerOptions": { - "fullTemplateTypeCheck": true, - "strictInjectionParameters": true - } -} diff --git a/tsconfig.json b/tsconfig.json index e574583..ac05639 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,20 +1,23 @@ -/* - This is a "Solution Style" tsconfig.json file, and is used by editors and TypeScript’s language server to improve development experience. - It is not intended to be used to perform a compilation. - - To learn more about this file see: https://angular.io/config/solution-tsconfig. -*/ { - "files": [], - "references": [ - { - "path": "./tsconfig.app.json" - }, - { - "path": "./tsconfig.spec.json" - }, - { - "path": "./tsconfig.server.json" - } - ] -} \ No newline at end of file + "compileOnSave": false, + "compilerOptions": { + "baseUrl": "./", + "outDir": "./dist/out-tsc", + "sourceMap": true, + "declaration": false, + "downlevelIteration": true, + "experimentalDecorators": true, + "module": "es2020", + "moduleResolution": "node", + "importHelpers": true, + "target": "es2015", + "lib": [ + "es2018", + "dom" + ] + }, + "angularCompilerOptions": { + "fullTemplateTypeCheck": true, + "strictInjectionParameters": true + } +} diff --git a/tsconfig.spec.json b/tsconfig.spec.json index 1db2e6e..6400fde 100644 --- a/tsconfig.spec.json +++ b/tsconfig.spec.json @@ -1,5 +1,5 @@ { - "extends": "./tsconfig.base.json", + "extends": "./tsconfig.json", "compilerOptions": { "outDir": "./out-tsc/spec", "types": [ -- 2.45.2 From 94b981218b1ce3258a675cd43c4a11b99939ff07 Mon Sep 17 00:00:00 2001 From: samuel-p Date: Fri, 27 Nov 2020 19:27:08 +0100 Subject: [PATCH 11/16] updated @angular/material --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c27c3e4..eb4199e 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "@angular/compiler": "~11.0.2", "@angular/core": "~11.0.2", "@angular/forms": "~11.0.2", - "@angular/material": "^10.0.2", + "@angular/material": "^11.0.1", "@angular/platform-browser": "~11.0.2", "@angular/platform-browser-dynamic": "~11.0.2", "@angular/platform-server": "~11.0.2", -- 2.45.2 From 2a126a31c85ed3e3692a2add76a9400874464428 Mon Sep 17 00:00:00 2001 From: samuel-p Date: Fri, 27 Nov 2020 19:28:09 +0100 Subject: [PATCH 12/16] updated @angular/express-engine --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index eb4199e..88bb657 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "@angular/platform-server": "~11.0.2", "@angular/router": "~11.0.2", "@fortawesome/fontawesome-free": "^5.15.1", - "@nguniversal/express-engine": "^10.1.0", + "@nguniversal/express-engine": "^11.0.0", "bootstrap": "^4.5.3", "express": "^4.17.1", "jsonpath-plus": "^4.0.0", @@ -41,7 +41,7 @@ "@angular/cli": "~11.0.2", "@angular/compiler-cli": "~11.0.2", "@angular/language-service": "~11.0.2", - "@nguniversal/builders": "^10.1.0", + "@nguniversal/builders": "^11.0.0", "@types/express": "^4.17.8", "@types/node": "^14.0.23", "@types/jasmine": "~3.6.0", -- 2.45.2 From 05228bbb4a610cf8afd7b49e0bca693757776388 Mon Sep 17 00:00:00 2001 From: samuel-p Date: Fri, 27 Nov 2020 19:28:52 +0100 Subject: [PATCH 13/16] updated rxjs --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 88bb657..ce81dc9 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "express": "^4.17.1", "jsonpath-plus": "^4.0.0", "roboto-fontface": "^0.10.0", - "rxjs": "~6.6.0", + "rxjs": "~6.6.3", "tslib": "^2.0.0", "zone.js": "~0.10.2" }, -- 2.45.2 From 7772adc812e4281b33545bcff585779dcc6385fa Mon Sep 17 00:00:00 2001 From: samuel-p Date: Fri, 27 Nov 2020 22:37:24 +0100 Subject: [PATCH 14/16] added shields endpoint (closes #45) --- src/main.status.ts | 50 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 48 insertions(+), 2 deletions(-) diff --git a/src/main.status.ts b/src/main.status.ts index 8b466bd..db41deb 100644 --- a/src/main.status.ts +++ b/src/main.status.ts @@ -1,5 +1,5 @@ import {json, Router} from 'express'; -import {CurrentStatus, State} from './app/_data/data'; +import {CurrentStatus, Service, State} from './app/_data/data'; import {existsSync, readFileSync, writeFileSync} from 'fs'; import {join} from 'path'; import {JSONPath} from 'jsonpath-plus'; @@ -83,7 +83,53 @@ api.post('/update/health', (req, res) => { }); api.get('/status', (req, res) => { - return res.json(cache); + return res.json(cache); +}); + +api.get('/badge', (req, res) => { + const serviceId = req.query.service as string; + if (!serviceId) { + return res.json({ + "schemaVersion": 1, + "label": "sp-status", + "message": "service not provided", + "isError": true + }); + } + const service = cache.groups + .map(g => g.services).reduce((x, y) => x.concat(y), []) + .find(s => s.id === serviceId); + if (!service) { + return res.json({ + "schemaVersion": 1, + "label": "sp-status", + "message": "service not found", + "isError": true + }); + } + const label = req.query.label || service.name; + let message; + let color; + switch (service.state) { + case 'operational': + message = req.query.operational || service.state; + color = '#7ed321'; + break; + case 'outage': + message = req.query.outage || service.state; + color = '#ff6f6f'; + break; + case 'maintenance': + message = req.query.maintenance || service.state; + color = '#f7ca18'; + break; + } + return res.json({ + "schemaVersion": 1, + "label": label, + "message": message, + "color": color + }); }); api.get('/info', (req, res) => { -- 2.45.2 From 371204e1638364cea5c5abe4bb2eb00b4ab8a9ba Mon Sep 17 00:00:00 2001 From: samuel-p Date: Fri, 27 Nov 2020 22:47:43 +0100 Subject: [PATCH 15/16] fixed .drone.yml --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index ef18a48..e3c2996 100644 --- a/.drone.yml +++ b/.drone.yml @@ -32,7 +32,7 @@ trigger: --- kind: pipeline type: docker -name: linux-arm +name: linux-arm64 platform: os: linux -- 2.45.2 From acb39f6b2a017d6a6771711549dd7cea78455c7f Mon Sep 17 00:00:00 2001 From: samuel-p Date: Fri, 27 Nov 2020 23:06:15 +0100 Subject: [PATCH 16/16] update .drone.yml --- .drone.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.drone.yml b/.drone.yml index e3c2996..f1073e1 100644 --- a/.drone.yml +++ b/.drone.yml @@ -85,11 +85,12 @@ steps: from_secret: USERNAME password: from_secret: PASSWORD - when: - branch: - - master - event: - - push + +trigger: + branch: + - master + event: + - push --- kind: pipeline @@ -98,7 +99,7 @@ name: manifest platform: os: linux - arch: arm + arch: arm64 steps: - name: publish -- 2.45.2