Compare commits

..

24 commits

Author SHA1 Message Date
0508e681ab Merge pull request 'develop' (#49) from develop into master
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #49
2020-11-27 22:09:16 +00:00
acb39f6b2a update .drone.yml
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2020-11-27 23:06:15 +01:00
371204e163 fixed .drone.yml
Some checks are pending
continuous-integration/drone/pr Build is running
continuous-integration/drone/push Build is passing
2020-11-27 22:47:43 +01:00
7772adc812 added shields endpoint (closes #45) 2020-11-27 22:37:24 +01:00
05228bbb4a updated rxjs 2020-11-27 19:28:52 +01:00
2a126a31c8 updated @angular/express-engine 2020-11-27 19:28:09 +01:00
94b981218b updated @angular/material 2020-11-27 19:27:08 +01:00
19c91082f7 updated @angular/cli 2020-11-27 19:26:27 +01:00
494371a01d updated @angular/cdk 2020-11-27 19:07:12 +01:00
0092a84ba9 updated .drone.yml 2020-11-27 19:03:08 +01:00
4b3d08e6e1 Merge pull request 'Update node Docker tag to v14.14.0' (#43) from renovate/node-14.x into develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #43
2020-10-17 17:44:54 +00:00
a9d0157f6e Update node Docker tag to v14.14.0
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2020-10-17 05:07:48 +00:00
358d50b162 Merge pull request 'Update dependency bootstrap to ^4.5.3' (#42) from renovate/bootstrap-4.x into develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #42
2020-10-15 19:07:46 +00:00
0aa69aa34d Update dependency bootstrap to ^4.5.3
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
2020-10-15 05:09:43 +00:00
d44fa10a66 Merge pull request 'Update node Docker tag to v14.13.1' (#41) from renovate/node-14.x into develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #41
2020-10-11 19:06:45 +00:00
ca7ced0958 Update node Docker tag to v14.13.1
Some checks are pending
continuous-integration/drone/pr Build is running
continuous-integration/drone/push Build is passing
2020-10-09 05:07:48 +00:00
336a41c11f Merge pull request 'Update dependency @fortawesome/fontawesome-free to ^5.15.1' (#39) from renovate/fortawesome-fontawesome-free-5.x into develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #39
2020-10-06 15:01:04 +00:00
7962fbd42e Merge pull request 'Update node Docker tag to v14.13.0' (#40) from renovate/node-14.x into develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #40
2020-10-06 15:00:31 +00:00
e1b2e5c61c Update node Docker tag to v14.13.0
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
2020-10-06 05:12:19 +00:00
6bbc6518d9 Update dependency @fortawesome/fontawesome-free to ^5.15.1
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2020-10-06 05:11:15 +00:00
c2089225f4 Merge pull request 'Update node Docker tag to v14.12.0' (#38) from renovate/node-14.x into develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #38
2020-10-03 20:07:24 +00:00
93658f1ff3 Update node Docker tag to v14.12.0
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
2020-10-03 05:09:20 +00:00
9f655525ca Merge pull request 'Update dependency @fortawesome/fontawesome-free to ^5.15.0' (#37) from renovate/fortawesome-fontawesome-free-5.x into develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #37
2020-09-30 07:03:24 +00:00
be6a249588 Update dependency @fortawesome/fontawesome-free to ^5.15.0
Some checks are pending
continuous-integration/drone/push Build is running
continuous-integration/drone/pr Build is passing
2020-09-30 05:10:21 +00:00
13 changed files with 145 additions and 85 deletions

View file

@ -29,6 +29,37 @@ trigger:
event:
- push
---
kind: pipeline
type: docker
name: linux-arm64
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
@ -54,7 +85,8 @@ steps:
from_secret: USERNAME
password:
from_secret: PASSWORD
when:
trigger:
branch:
- master
event:
@ -67,7 +99,7 @@ name: manifest
platform:
os: linux
arch: arm
arch: arm64
steps:
- name: publish
@ -79,6 +111,7 @@ steps:
template: samuelph/universal-statuspage:OS-ARCH
platforms:
- linux/amd64
- linux/arm64
- linux/arm
username:
from_secret: USERNAME
@ -87,6 +120,7 @@ steps:
depends_on:
- linux-amd64
- linux-arm64
- linux-arm
trigger:

View file

@ -1,4 +1,4 @@
FROM node:14.11.0-alpine
FROM node:14.14.0-alpine
COPY dist/universal-statuspage /universal-statuspage

View file

@ -46,7 +46,6 @@
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,

View file

@ -1,5 +1,5 @@
{
"extends": "../tsconfig.base.json",
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/e2e",
"module": "commonjs",

View file

@ -15,48 +15,48 @@
},
"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/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",
"@fortawesome/fontawesome-free": "^5.14.0",
"@nguniversal/express-engine": "^10.1.0",
"bootstrap": "^4.5.2",
"@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": "^11.0.1",
"@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": "^11.0.0",
"bootstrap": "^4.5.3",
"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"
},
"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",
"@nguniversal/builders": "^10.1.0",
"@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": "^11.0.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",
"tslint": "~6.1.0",
"typescript": "~3.9.7"
"typescript": "~4.0.5"
}
}

View file

@ -9,7 +9,8 @@ const routes: Routes = [{
@NgModule({
imports: [RouterModule.forRoot(routes, {
initialNavigation: 'enabled'
initialNavigation: 'enabled',
relativeLinkResolution: 'legacy'
})],
exports: [RouterModule]
})

View file

@ -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

View file

@ -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<StatusComponent>;
beforeEach(async(() => {
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ StatusComponent ]
})

View file

@ -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';
@ -86,6 +86,52 @@ api.get('/status', (req, res) => {
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) => {
return res.json({
title: config.title,

View file

@ -1,5 +1,5 @@
{
"extends": "./tsconfig.base.json",
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./out-tsc/app",
"types": []

View file

@ -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
}
}

View file

@ -1,20 +1,23 @@
/*
This is a "Solution Style" tsconfig.json file, and is used by editors and TypeScripts 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"
}
"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
}
}

View file

@ -1,5 +1,5 @@
{
"extends": "./tsconfig.base.json",
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./out-tsc/spec",
"types": [