diff --git a/Dockerfile b/Dockerfile index d8dba51..2d4262b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,9 @@ FROM node:alpine -COPY dist/grafana-statuspage /grafana-statuspage +COPY dist/universal-statuspage /universal-statuspage WORKDIR /app EXPOSE 4000 -ENTRYPOINT ["node", "/grafana-statuspage/server/main.js"] +ENTRYPOINT ["node", "/universal-statuspage/server/main.js"] diff --git a/angular.json b/angular.json index 870599a..a9c5904 100644 --- a/angular.json +++ b/angular.json @@ -3,7 +3,7 @@ "version": 1, "newProjectRoot": "projects", "projects": { - "grafana-statuspage": { + "universal-statuspage": { "projectType": "application", "schematics": { "@schematics/angular:component": { @@ -17,7 +17,7 @@ "build": { "builder": "@angular-devkit/build-angular:browser", "options": { - "outputPath": "dist/grafana-statuspage/browser", + "outputPath": "dist/universal-statuspage/browser", "index": "src/index.html", "main": "src/main.ts", "polyfills": "src/polyfills.ts", @@ -69,18 +69,18 @@ "serve": { "builder": "@angular-devkit/build-angular:dev-server", "options": { - "browserTarget": "grafana-statuspage:build" + "browserTarget": "universal-statuspage:build" }, "configurations": { "production": { - "browserTarget": "grafana-statuspage:build:production" + "browserTarget": "universal-statuspage:build:production" } } }, "extract-i18n": { "builder": "@angular-devkit/build-angular:extract-i18n", "options": { - "browserTarget": "grafana-statuspage:build" + "browserTarget": "universal-statuspage:build" } }, "test": { @@ -120,18 +120,18 @@ "builder": "@angular-devkit/build-angular:protractor", "options": { "protractorConfig": "e2e/protractor.conf.js", - "devServerTarget": "grafana-statuspage:serve" + "devServerTarget": "universal-statuspage:serve" }, "configurations": { "production": { - "devServerTarget": "grafana-statuspage:serve:production" + "devServerTarget": "universal-statuspage:serve:production" } } }, "server": { "builder": "@angular-devkit/build-angular:server", "options": { - "outputPath": "dist/grafana-statuspage/server", + "outputPath": "dist/universal-statuspage/server", "main": "server.ts", "tsConfig": "tsconfig.server.json" }, @@ -152,21 +152,21 @@ "serve-ssr": { "builder": "@nguniversal/builders:ssr-dev-server", "options": { - "browserTarget": "grafana-statuspage:build", - "serverTarget": "grafana-statuspage:server" + "browserTarget": "universal-statuspage:build", + "serverTarget": "universal-statuspage:server" }, "configurations": { "production": { - "browserTarget": "grafana-statuspage:build:production", - "serverTarget": "grafana-statuspage:server:production" + "browserTarget": "universal-statuspage:build:production", + "serverTarget": "universal-statuspage:server:production" } } }, "prerender": { "builder": "@nguniversal/builders:prerender", "options": { - "browserTarget": "grafana-statuspage:build:production", - "serverTarget": "grafana-statuspage:server:production", + "browserTarget": "universal-statuspage:build:production", + "serverTarget": "universal-statuspage:server:production", "routes": [ "/" ] @@ -177,5 +177,5 @@ } } }}, - "defaultProject": "grafana-statuspage" + "defaultProject": "universal-statuspage" } diff --git a/e2e/src/app.e2e-spec.ts b/e2e/src/app.e2e-spec.ts index 0b96611..297640e 100644 --- a/e2e/src/app.e2e-spec.ts +++ b/e2e/src/app.e2e-spec.ts @@ -10,7 +10,7 @@ describe('workspace-project App', () => { it('should display welcome message', () => { page.navigateTo(); - expect(page.getTitleText()).toEqual('grafana-statuspage app is running!'); + expect(page.getTitleText()).toEqual('universal-statuspage app is running!'); }); afterEach(async () => { diff --git a/karma.conf.js b/karma.conf.js index 97a9c7c..2502213 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -16,7 +16,7 @@ module.exports = function (config) { clearContext: false // leave Jasmine Spec Runner output visible in browser }, coverageIstanbulReporter: { - dir: require('path').join(__dirname, './coverage/grafana-statuspage'), + dir: require('path').join(__dirname, './coverage/universal-statuspage'), reports: ['html', 'lcovonly', 'text-summary'], fixWebpackSourcePaths: true }, diff --git a/package.json b/package.json index 30d0dae..90a6c9d 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "grafana-statuspage", + "name": "universal-statuspage", "version": "0.0.0", "scripts": { "ng": "ng", @@ -8,10 +8,10 @@ "test": "ng test", "lint": "ng lint", "e2e": "ng e2e", - "dev:ssr": "ng run grafana-statuspage:serve-ssr", - "serve:ssr": "node dist/grafana-statuspage/server/main.js", - "build:ssr": "ng build --prod && ng run grafana-statuspage:server:production", - "prerender": "ng run grafana-statuspage:prerender" + "dev:ssr": "ng run universal-statuspage:serve-ssr", + "serve:ssr": "node dist/universal-statuspage/server/main.js", + "build:ssr": "ng build --prod && ng run universal-statuspage:server:production", + "prerender": "ng run universal-statuspage:prerender" }, "private": true, "dependencies": { @@ -30,7 +30,7 @@ "@nguniversal/express-engine": "^10.0.1", "bootstrap": "^4.5.0", "express": "^4.15.2", - "jsonpath": "^1.0.2", + "jsonpath-plus": "^4.0.0", "roboto-fontface": "^0.10.0", "rxjs": "~6.6.0", "tslib": "^2.0.0", diff --git a/server.ts b/server.ts index 2722cae..edd57b5 100644 --- a/server.ts +++ b/server.ts @@ -8,12 +8,12 @@ import {AppServerModule} from './src/main.server'; import {APP_BASE_HREF} from '@angular/common'; import {existsSync} from 'fs'; import {api} from './src/main.status'; -import {environment} from "./src/environments/environment"; +import {environment} from './src/environments/environment'; // The Express app is exported so that it can be used by serverless Functions. export function app() { const server = express(); - const distFolder = environment.production ? '/grafana-statuspage/browser' : join(process.cwd(), 'dist/grafana-statuspage/browser'); + const distFolder = environment.production ? '/universal-statuspage/browser' : join(process.cwd(), 'dist/universal-statuspage/browser'); const indexHtml = existsSync(join(distFolder, 'index.original.html')) ? 'index.original.html' : 'index'; // Our Universal express-engine (found @ https://github.com/angular/universal/tree/master/modules/express-engine) diff --git a/src/app/app.component.spec.ts b/src/app/app.component.spec.ts index 113a88d..5d69a33 100644 --- a/src/app/app.component.spec.ts +++ b/src/app/app.component.spec.ts @@ -20,16 +20,16 @@ describe('AppComponent', () => { expect(app).toBeTruthy(); }); - it(`should have as title 'grafana-statuspage'`, () => { + it(`should have as title 'universal-statuspage'`, () => { const fixture = TestBed.createComponent(AppComponent); const app = fixture.componentInstance; - expect(app.title).toEqual('grafana-statuspage'); + expect(app.title).toEqual('universal-statuspage'); }); it('should render title', () => { const fixture = TestBed.createComponent(AppComponent); fixture.detectChanges(); const compiled = fixture.nativeElement; - expect(compiled.querySelector('.content span').textContent).toContain('grafana-statuspage app is running!'); + expect(compiled.querySelector('.content span').textContent).toContain('universal-statuspage app is running!'); }); }); diff --git a/src/index.html b/src/index.html index d630637..3cbdeb6 100644 --- a/src/index.html +++ b/src/index.html @@ -2,7 +2,7 @@
-