mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 08:42:13 +02:00
Compare commits
37 Commits
7.0.109
...
feature-gi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5ec8432b4d | ||
|
|
131e538a62 | ||
|
|
10b28bb406 | ||
|
|
a9618c2e71 | ||
|
|
dda1689ae1 | ||
|
|
90ab84fb90 | ||
|
|
3174972153 | ||
|
|
239838a4cb | ||
|
|
67cad51439 | ||
|
|
73e6eb8fae | ||
|
|
8ae87bed6c | ||
|
|
498dddcd2f | ||
|
|
f671e7f506 | ||
|
|
88826d5f71 | ||
|
|
71cec28b10 | ||
|
|
38a3a0503f | ||
|
|
51ba011155 | ||
|
|
ca0b5df568 | ||
|
|
52b90d2bcd | ||
|
|
04805cb1e9 | ||
|
|
8c260457d5 | ||
|
|
05cde6a224 | ||
|
|
495269dc50 | ||
|
|
4983765d4a | ||
|
|
5817d4b86e | ||
|
|
f27610911e | ||
|
|
55d8192c96 | ||
|
|
fd4c7bbf78 | ||
|
|
7262d0ef43 | ||
|
|
5e60b3a07c | ||
|
|
d470a277c9 | ||
|
|
fce3816557 | ||
|
|
a2efe3d86c | ||
|
|
b2200e5108 | ||
|
|
a87dd8599b | ||
|
|
9236eaa351 | ||
|
|
372bcf5bec |
@@ -5,8 +5,7 @@ node_modules
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
node_modules
|
||||
|
||||
/newrelic_agent.log
|
||||
.idea
|
||||
# testing
|
||||
/coverage
|
||||
@@ -16,7 +15,10 @@ node_modules
|
||||
|
||||
# misc
|
||||
.DS_Store
|
||||
|
||||
.env.local
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
env.js
|
||||
|
||||
npm-debug.log*
|
||||
@@ -53,4 +55,4 @@ tests/coverage
|
||||
|
||||
settings.json
|
||||
|
||||
GoSDK/tester/
|
||||
go-sdk/tester/
|
||||
@@ -2,8 +2,6 @@
|
||||
*/build/*
|
||||
*/coverage/*
|
||||
|
||||
*/dist/*
|
||||
|
||||
*/public/*
|
||||
*/views/*
|
||||
|
||||
@@ -23,6 +21,10 @@ LICENSE
|
||||
marketing/*/*
|
||||
licenses/*
|
||||
certifications/*
|
||||
ApiReference/public/assets/*
|
||||
JavaScriptSDK/src/cli/server-monitor/out/scripts/prettify/*
|
||||
api-docs/public/assets/*
|
||||
js-sdk/src/cli/server-monitor/out/scripts/prettify/*
|
||||
js-sdk/dist/logger.js
|
||||
js-sdk/dist/logger.min.js
|
||||
js-sdk/dist/fyipe.js
|
||||
js-sdk/dist/fyipe.min.js
|
||||
_test/*
|
||||
118
.eslintrc.json
118
.eslintrc.json
@@ -4,110 +4,56 @@
|
||||
"ecmaFeatures": {
|
||||
"experimentalObjectRestSpread": true,
|
||||
"jsx": true,
|
||||
"tsx": true,
|
||||
"spread": true
|
||||
},
|
||||
"sourceType": "module",
|
||||
"project": [
|
||||
"./tsconfig.json"
|
||||
]
|
||||
"sourceType": "module"
|
||||
},
|
||||
"env": {
|
||||
"browser": true,
|
||||
"node": true,
|
||||
"jquery": true,
|
||||
"es6": true,
|
||||
"jest": true,
|
||||
"jasmine": true
|
||||
"jest": true
|
||||
},
|
||||
"plugins": [
|
||||
"react",
|
||||
"jsx-a11y",
|
||||
"progress",
|
||||
"@typescript-eslint",
|
||||
"unused-imports"
|
||||
"jsx-a11y"
|
||||
],
|
||||
"extends": [
|
||||
"eslint:recommended",
|
||||
"plugin:react/recommended",
|
||||
"plugin:prettier/recommended",
|
||||
"prettier"
|
||||
"prettier",
|
||||
"prettier/react"
|
||||
],
|
||||
"globals": {
|
||||
"describe": true,
|
||||
"context": true,
|
||||
"before": true,
|
||||
"beforeEach": true,
|
||||
"after": true,
|
||||
"afterEach": true,
|
||||
"it": true,
|
||||
"expect": true,
|
||||
"workbox": true,
|
||||
"importScripts": true,
|
||||
"$TSFixMe": true,
|
||||
"NodeJS": true
|
||||
"describe" :true,
|
||||
"context" :true,
|
||||
"before" :true,
|
||||
"beforeEach" :true,
|
||||
"after" :true,
|
||||
"afterEach" :true,
|
||||
"it" :true,
|
||||
"expect" :true,
|
||||
"workbox" :true,
|
||||
"importScripts" :true
|
||||
},
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"parser": "babel-eslint",
|
||||
"rules": {
|
||||
"no-fallthrough": "error",
|
||||
"no-unreachable": "error",
|
||||
"no-cond-assign": "error",
|
||||
"valid-typeof": "error",
|
||||
"no-func-assign": "error",
|
||||
"curly": "error",
|
||||
"no-extra-semi": "error",
|
||||
"no-else-return": "error",
|
||||
"no-div-regex": "error",
|
||||
"no-octal": "error",
|
||||
"no-extra-bind": "error",
|
||||
"unicode-bom": "error",
|
||||
"no-extra-boolean-cast": "error",
|
||||
"wrap-regex": "error",
|
||||
"wrap-iife": "error",
|
||||
"yield-star-spacing": "error",
|
||||
"no-implicit-coercion": "error",
|
||||
"no-extra-label": "error",
|
||||
"multiline-comment-style": "off",
|
||||
"no-lonely-if": "error",
|
||||
"no-floating-decimal": "error",
|
||||
"eqeqeq": "error",
|
||||
"dot-notation": "off", // Off because it messes up with typescript compiler.
|
||||
"@typescript-eslint/dot-notation": "off", //temp off.
|
||||
"progress/activate": 1,
|
||||
"linebreak-style": [
|
||||
"error",
|
||||
"unix"
|
||||
],
|
||||
"@typescript-eslint/no-empty-interface": [
|
||||
"error",
|
||||
{
|
||||
"allowSingleExtends": true
|
||||
}
|
||||
],
|
||||
// https://www.npmjs.com/package/eslint-plugin-unused-imports
|
||||
"no-unused-vars": "off",
|
||||
"@typescript-eslint/no-unused-vars": "off",
|
||||
"@typescript-eslint/no-extra-non-null-assertion": "error",
|
||||
"@typescript-eslint/no-floating-promises":"error",
|
||||
"@typescript-eslint/await-thenable":"error",
|
||||
"unused-imports/no-unused-imports": "error",
|
||||
"unused-imports/no-unused-vars": [
|
||||
"error",
|
||||
{
|
||||
"vars": "all",
|
||||
"varsIgnorePattern": "^_",
|
||||
"args": "after-used",
|
||||
"argsIgnorePattern": "^_"
|
||||
}
|
||||
],
|
||||
"@typescript-eslint/explicit-member-accessibility": [
|
||||
"error"
|
||||
],
|
||||
"no-unused-vars": "error",
|
||||
"no-console": "error",
|
||||
"no-undef": "error",
|
||||
"no-empty": "error",
|
||||
"prefer-arrow-callback": "error",
|
||||
"constructor-super": "error",
|
||||
"no-case-declarations": "error",
|
||||
"no-mixed-spaces-and-tabs": "error",
|
||||
"no-useless-escape": "error",
|
||||
@@ -126,26 +72,6 @@
|
||||
"react/boolean-prop-naming": "error",
|
||||
"react/no-is-mounted": "error",
|
||||
"react/no-find-dom-node": "error",
|
||||
"one-var-declaration-per-line": "error",
|
||||
"arrow-parens": "error",
|
||||
"arrow-body-style": [
|
||||
"error",
|
||||
"always"
|
||||
],
|
||||
"@typescript-eslint/typedef": [
|
||||
"error",
|
||||
{
|
||||
"arrowParameter": true,
|
||||
"variableDeclaration": true
|
||||
}
|
||||
],
|
||||
"@typescript-eslint/strict-boolean-expressions": "off", //Need to enable this very soon
|
||||
"@typescript-eslint/explicit-function-return-type": [
|
||||
"error",
|
||||
{
|
||||
"allowExpressions": true
|
||||
}
|
||||
],
|
||||
"react/no-did-update-set-state": "error",
|
||||
"react/no-unknown-property": "error",
|
||||
"react/no-unused-prop-types": "error",
|
||||
@@ -163,13 +89,7 @@
|
||||
"react/jsx-pascal-case": "error",
|
||||
"array-callback-return": "error",
|
||||
"no-loop-func": "error",
|
||||
"no-duplicate-imports": "error",
|
||||
"no-promise-executor-return": "error",
|
||||
"capitalized-comments": "off", // this is turned off because come commented code should not be capitalized.
|
||||
"for-direction": "error",
|
||||
"getter-return": "error",
|
||||
"jsx-a11y/anchor-is-valid": "error",
|
||||
"no-async-promise-executor": "error",
|
||||
"prefer-const": [
|
||||
"error",
|
||||
{
|
||||
@@ -181,7 +101,7 @@
|
||||
},
|
||||
"settings": {
|
||||
"react": {
|
||||
"version": "18.1.0"
|
||||
"version": "16.5"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
38
.github/ISSUE_TEMPLATE/bug_report.md
vendored
38
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -1,38 +0,0 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Desktop (please complete the following information):**
|
||||
- OS: [e.g. iOS]
|
||||
- Browser [e.g. chrome, safari]
|
||||
- Version [e.g. 22]
|
||||
|
||||
**Smartphone (please complete the following information):**
|
||||
- Device: [e.g. iPhone6]
|
||||
- OS: [e.g. iOS8.1]
|
||||
- Browser [e.g. stock browser, safari]
|
||||
- Version [e.g. 22]
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
@@ -1,20 +0,0 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
||||
10
.github/ISSUE_TEMPLATE/request-for-test.md
vendored
10
.github/ISSUE_TEMPLATE/request-for-test.md
vendored
@@ -1,10 +0,0 @@
|
||||
---
|
||||
name: Request for Test
|
||||
about: 'Request more tests for product code in the platform. '
|
||||
title: Tests for [FIleName]
|
||||
labels: 'write tests'
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
|
||||
14
.github/pull_request_template.md
vendored
14
.github/pull_request_template.md
vendored
@@ -1,14 +0,0 @@
|
||||
### Title of this pull request?
|
||||
|
||||
### Small Description?
|
||||
|
||||
### Pull Request Checklist:
|
||||
|
||||
- [ ] Please make sure all jobs pass before requesting a review.
|
||||
- [ ] Put `closes #XXXX` in your comment to auto-close the issue that your PR fixes (if such).
|
||||
- [ ] Have you lint your code locally before submission?
|
||||
- [ ] Did you write tests where appropiate?
|
||||
|
||||
### Related Issue?
|
||||
|
||||
### Screenshots (if appropriate):
|
||||
35
.github/workflows/backend.yaml
vendored
Normal file
35
.github/workflows/backend.yaml
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
name: Backend Jobs
|
||||
|
||||
on:
|
||||
push:
|
||||
# run this workflow when changes are pushed to backend
|
||||
paths:
|
||||
- "backend/**"
|
||||
- ".github/workflows/backend.yaml"
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '16'
|
||||
- name: Run Backend tests
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y curl gcc
|
||||
sudo apt-get install -y build-essential
|
||||
curl -sSL https://get.docker.com/ | sh
|
||||
sudo docker stop $(sudo docker ps -aq) || echo 'No docker containers'
|
||||
sudo docker rm $(sudo docker ps -aq) || echo 'No docker containers'
|
||||
sudo docker run --name mongo -p 27017:27017 -d mongo:4.2.3
|
||||
sudo docker run --name redis -p 6379:6379 -d redis:5.0.7 redis-server
|
||||
sudo docker build -t oneuptime/backend:3.0 ./backend
|
||||
sudo docker run --env-file ./backend/.env -e IS_SAAS_SERVICE=true -p 3002:3002 -d oneuptime/backend:3.0
|
||||
sudo docker ps
|
||||
sudo apt-get install -y nodejs
|
||||
node --version
|
||||
cd backend
|
||||
npm ci
|
||||
npm run test
|
||||
72
.github/workflows/codeql-analysis.yml
vendored
72
.github/workflows/codeql-analysis.yml
vendored
@@ -1,72 +0,0 @@
|
||||
# For most projects, this workflow file will not need changing; you simply need
|
||||
# to commit it to your repository.
|
||||
#
|
||||
# You may wish to alter this file to override the set of languages analyzed,
|
||||
# or to provide custom queries or build logic.
|
||||
#
|
||||
# ******** NOTE ********
|
||||
# We have attempted to detect the languages in your repository. Please check
|
||||
# the `language` matrix defined below to confirm you have the correct set of
|
||||
# supported CodeQL languages.
|
||||
#
|
||||
name: "CodeQL"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches: [ master ]
|
||||
schedule:
|
||||
- cron: '17 0 * * 4'
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CI_PIPELINE_ID: ${{github.run_number}}
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
security-events: write
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
language: [ 'javascript' ]
|
||||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
|
||||
# Learn more about CodeQL language support at https://git.io/codeql-language-support
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v2
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
# By default, queries listed here will override any specified in a config file.
|
||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||
# queries: ./path/to/local/query, your-org/your-repo/queries@main
|
||||
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v2
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 https://git.io/JvXDl
|
||||
|
||||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
||||
# and modify them (or add more) to build your code if your project
|
||||
# uses a compiled language
|
||||
|
||||
#- run: |
|
||||
# make bootstrap
|
||||
# make release
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v2
|
||||
26
.github/workflows/common-jobs.yaml
vendored
26
.github/workflows/common-jobs.yaml
vendored
@@ -1,26 +0,0 @@
|
||||
name: Common Jobs
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches-ignore:
|
||||
- 'hotfix-*' # excludes hotfix branches
|
||||
- 'release'
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CI_PIPELINE_ID: ${{github.run_number}}
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v2
|
||||
- run: sudo apt-get update
|
||||
- run: sudo apt-get install -y curl gcc
|
||||
- run: sudo apt-get install -y build-essential
|
||||
- run: sudo apt-get install -y nodejs
|
||||
- run: npm install
|
||||
- run: npm run lint
|
||||
- name: Show how to fix lint
|
||||
if: ${{ failure() }}
|
||||
run: echo "Please run `npm run fix` in your root directory to fix the lint automatically."
|
||||
22
.github/workflows/common.yaml
vendored
Normal file
22
.github/workflows/common.yaml
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
name: Common Jobs
|
||||
|
||||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
- 'hotfix-*' # excludes hotfix branches
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v2
|
||||
- run: sudo apt-get update
|
||||
- run: sudo apt-get install -y curl gcc
|
||||
- run: sudo apt-get install -y build-essential
|
||||
- run: sudo apt-get install -y nodejs
|
||||
- run: npm ci
|
||||
- run: npm run lint
|
||||
- run: chmod +x ./ci/scripts/cleanup.sh
|
||||
- run: ./ci/scripts/cleanup.sh
|
||||
|
||||
320
.github/workflows/compile.yml
vendored
320
.github/workflows/compile.yml
vendored
@@ -1,320 +0,0 @@
|
||||
name: Compile
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches-ignore:
|
||||
- 'hotfix-*'
|
||||
- 'release'
|
||||
|
||||
|
||||
jobs:
|
||||
|
||||
compile-accounts:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CI_PIPELINE_ID: ${{github.run_number}}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
- run: cd Common && npm install
|
||||
- run: cd Model && npm install
|
||||
- run: cd CommonServer && npm install
|
||||
- run: cd CommonUI && npm install --force
|
||||
- run: cd Accounts && npm install && npm run compile
|
||||
|
||||
compile-api-reference:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CI_PIPELINE_ID: ${{github.run_number}}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
- run: cd Common && npm install
|
||||
- run: cd Model && npm install
|
||||
- run: cd CommonServer && npm install
|
||||
- run: cd ApiReference && npm install && npm run compile
|
||||
|
||||
compile-common-server:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CI_PIPELINE_ID: ${{github.run_number}}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
- run: cd Common && npm install
|
||||
- run: cd Model && npm install
|
||||
- run: cd CommonServer && npm install && npm run compile
|
||||
|
||||
compile-common-ui:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CI_PIPELINE_ID: ${{github.run_number}}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
- run: cd Common && npm install
|
||||
- run: cd Model && npm install
|
||||
- run: cd CommonUI && npm install --force && npm run compile
|
||||
|
||||
compile-common:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CI_PIPELINE_ID: ${{github.run_number}}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
- run: cd Common && npm install
|
||||
- run: cd Model && npm install && npm run compile
|
||||
|
||||
compile-dashboard-api:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CI_PIPELINE_ID: ${{github.run_number}}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
- run: cd Common && npm install
|
||||
- run: cd Model && npm install
|
||||
- run: cd CommonServer && npm install
|
||||
- run: cd CommonUI && npm install --force
|
||||
- run: cd DashboardAPI && npm install && npm run compile
|
||||
|
||||
compile-dashboard:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CI_PIPELINE_ID: ${{github.run_number}}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
- run: cd Common && npm install
|
||||
- run: cd Model && npm install
|
||||
- run: cd CommonServer && npm install
|
||||
- run: cd CommonUI && npm install --force
|
||||
- run: cd Dashboard && npm install && npm run compile
|
||||
|
||||
compile-file:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CI_PIPELINE_ID: ${{github.run_number}}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
- run: cd Common && npm install
|
||||
- run: cd Model && npm install
|
||||
- run: cd CommonServer && npm install
|
||||
- run: cd File && npm install && npm run compile
|
||||
|
||||
compile-helm-chart:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CI_PIPELINE_ID: ${{github.run_number}}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
- run: cd Common && npm install
|
||||
- run: cd Model && npm install
|
||||
- run: cd CommonServer && npm install
|
||||
- run: cd HelmChart && npm install && npm run compile
|
||||
|
||||
compile-home:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CI_PIPELINE_ID: ${{github.run_number}}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
- run: cd Common && npm install
|
||||
- run: cd Model && npm install
|
||||
- run: cd CommonServer && npm install
|
||||
- run: cd Home && npm install && npm run compile
|
||||
|
||||
compile-identity:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CI_PIPELINE_ID: ${{github.run_number}}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
- run: cd Common && npm install
|
||||
- run: cd Model && npm install
|
||||
- run: cd CommonServer && npm install
|
||||
- run: cd Identity && npm install && npm run compile
|
||||
|
||||
compile-integrations:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CI_PIPELINE_ID: ${{github.run_number}}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
- run: cd Common && npm install
|
||||
- run: cd Model && npm install
|
||||
- run: cd CommonServer && npm install
|
||||
- run: cd Integration && npm install && npm run compile
|
||||
|
||||
compile-licensing:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CI_PIPELINE_ID: ${{github.run_number}}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
- run: cd Common && npm install
|
||||
- run: cd Model && npm install
|
||||
- run: cd CommonServer && npm install
|
||||
- run: cd Licensing && npm install && npm run compile
|
||||
|
||||
compile-notification:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CI_PIPELINE_ID: ${{github.run_number}}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
- run: cd Common && npm install
|
||||
- run: cd Model && npm install
|
||||
- run: cd CommonServer && npm install
|
||||
- run: cd Notification && npm install && npm run compile
|
||||
|
||||
compile-model:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CI_PIPELINE_ID: ${{github.run_number}}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
- run: cd Common && npm install
|
||||
- run: cd Model && npm install
|
||||
- run: cd Model && npm install && npm run compile
|
||||
|
||||
compile-probe:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CI_PIPELINE_ID: ${{github.run_number}}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
- run: cd Common && npm install
|
||||
- run: cd Model && npm install
|
||||
- run: cd CommonServer && npm install
|
||||
- run: cd Probe && npm install && npm run compile
|
||||
|
||||
compile-probe-api:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CI_PIPELINE_ID: ${{github.run_number}}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
- run: cd Common && npm install
|
||||
- run: cd Model && npm install
|
||||
- run: cd CommonServer && npm install
|
||||
- run: cd ProbeAPI && npm install && npm run compile
|
||||
|
||||
|
||||
compile-realtime:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CI_PIPELINE_ID: ${{github.run_number}}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
- run: cd Common && npm install
|
||||
- run: cd Model && npm install
|
||||
- run: cd CommonServer && npm install
|
||||
- run: cd Realtime && npm install && npm run compile
|
||||
|
||||
compile-status-page:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CI_PIPELINE_ID: ${{github.run_number}}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
- run: cd Common && npm install
|
||||
- run: cd Model && npm install
|
||||
- run: cd CommonServer && npm install
|
||||
- run: cd CommonUI && npm install --force
|
||||
- run: cd StatusPage && npm install && npm run compile
|
||||
|
||||
compile-workers:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CI_PIPELINE_ID: ${{github.run_number}}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
- run: cd Common && npm install
|
||||
- run: cd Model && npm install
|
||||
- run: cd CommonServer && npm install
|
||||
- run: cd CommonUI && npm install --force
|
||||
- run: cd Workers && npm install && npm run compile
|
||||
|
||||
compile-workflow:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CI_PIPELINE_ID: ${{github.run_number}}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
- run: cd Common && npm install
|
||||
- run: cd Model && npm install
|
||||
- run: cd CommonServer && npm install
|
||||
- run: cd Workflow && npm install && npm run compile
|
||||
|
||||
compile-test-server:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CI_PIPELINE_ID: ${{github.run_number}}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
- run: cd Common && npm install
|
||||
- run: cd Model && npm install
|
||||
- run: cd CommonServer && npm install
|
||||
- run: cd TestServer && npm install && npm run compile
|
||||
314
.github/workflows/docker-build.yml
vendored
314
.github/workflows/docker-build.yml
vendored
@@ -1,314 +0,0 @@
|
||||
name: Docker Build
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches-ignore:
|
||||
- 'hotfix-*'
|
||||
- 'release'
|
||||
|
||||
|
||||
jobs:
|
||||
|
||||
docker-build-accounts:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CI_PIPELINE_ID: ${{github.run_number}}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Preinstall
|
||||
run: npm run prerun
|
||||
|
||||
# build image for accounts service
|
||||
- name: build docker image
|
||||
run: sudo docker build -f ./Accounts/Dockerfile .
|
||||
|
||||
docker-build-api-reference:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CI_PIPELINE_ID: ${{github.run_number}}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Preinstall
|
||||
run: npm run prerun
|
||||
|
||||
# build image for home
|
||||
- name: build docker image
|
||||
run: sudo docker build -f ./ApiReference/Dockerfile .
|
||||
|
||||
docker-build-dashboard-api:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CI_PIPELINE_ID: ${{github.run_number}}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Preinstall
|
||||
run: npm run prerun
|
||||
|
||||
|
||||
# build image for accounts service
|
||||
- name: build docker image
|
||||
run: sudo docker build -f ./DashboardAPI/Dockerfile .
|
||||
|
||||
docker-build-dashboard:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CI_PIPELINE_ID: ${{github.run_number}}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Preinstall
|
||||
run: npm run prerun
|
||||
|
||||
# build image for home
|
||||
- name: build docker image
|
||||
run: sudo docker build -f ./Dashboard/Dockerfile .
|
||||
|
||||
docker-build-file:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CI_PIPELINE_ID: ${{github.run_number}}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Preinstall
|
||||
run: npm run prerun
|
||||
|
||||
# build image for file
|
||||
- name: build docker image
|
||||
run: sudo docker build -f ./File/Dockerfile .
|
||||
|
||||
docker-build-haraka:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CI_PIPELINE_ID: ${{github.run_number}}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Preinstall
|
||||
run: npm run prerun
|
||||
|
||||
# build images
|
||||
- name: build docker image
|
||||
run: sudo docker build -f ./Haraka/Dockerfile .
|
||||
|
||||
docker-build-helm-chart:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CI_PIPELINE_ID: ${{github.run_number}}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Preinstall
|
||||
run: npm run prerun
|
||||
|
||||
# build image for home
|
||||
- name: build docker image
|
||||
run: sudo docker build -f ./HelmChart/Dockerfile .
|
||||
|
||||
docker-build-home:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CI_PIPELINE_ID: ${{github.run_number}}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Preinstall
|
||||
run: npm run prerun
|
||||
|
||||
# build image for home
|
||||
- name: build docker image
|
||||
run: sudo docker build -f ./Home/Dockerfile .
|
||||
|
||||
docker-build-identity:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CI_PIPELINE_ID: ${{github.run_number}}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Preinstall
|
||||
run: npm run prerun
|
||||
|
||||
# build image for identity
|
||||
- name: build docker image
|
||||
run: sudo docker build -f ./Identity/Dockerfile .
|
||||
|
||||
docker-build-integrations:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CI_PIPELINE_ID: ${{github.run_number}}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Preinstall
|
||||
run: npm run prerun
|
||||
|
||||
# build image for licensing
|
||||
- name: build docker image
|
||||
run: sudo docker build -f ./Integration/Dockerfile .
|
||||
|
||||
docker-build-licensing:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CI_PIPELINE_ID: ${{github.run_number}}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Preinstall
|
||||
run: npm run prerun
|
||||
|
||||
# build image for licensing
|
||||
- name: build docker image
|
||||
run: sudo docker build -f ./Licensing/Dockerfile .
|
||||
|
||||
docker-build-notification:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CI_PIPELINE_ID: ${{github.run_number}}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Preinstall
|
||||
run: npm run prerun
|
||||
|
||||
# build image for mail service
|
||||
- name: build docker image
|
||||
run: sudo docker build -f ./Notification/Dockerfile .
|
||||
|
||||
docker-build-nginx:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CI_PIPELINE_ID: ${{github.run_number}}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Preinstall
|
||||
run: npm run prerun
|
||||
|
||||
# build image for mail service
|
||||
- name: build docker image
|
||||
run: sudo docker build -f ./Nginx/Dockerfile ./Nginx
|
||||
|
||||
docker-build-probe:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CI_PIPELINE_ID: ${{github.run_number}}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Preinstall
|
||||
run: npm run prerun
|
||||
|
||||
# build image probe api
|
||||
- name: build docker image
|
||||
run: sudo docker build -f ./Probe/Dockerfile .
|
||||
|
||||
docker-build-probe-api:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CI_PIPELINE_ID: ${{github.run_number}}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Preinstall
|
||||
run: npm run prerun
|
||||
|
||||
# build image probe api
|
||||
- name: build docker image
|
||||
run: sudo docker build -f ./ProbeAPI/Dockerfile .
|
||||
|
||||
docker-build-realtime:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CI_PIPELINE_ID: ${{github.run_number}}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Preinstall
|
||||
run: npm run prerun
|
||||
|
||||
# build image for home
|
||||
- name: build docker image
|
||||
run: sudo docker build -f ./Realtime/Dockerfile .
|
||||
|
||||
docker-build-status-page:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CI_PIPELINE_ID: ${{github.run_number}}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Preinstall
|
||||
run: npm run prerun
|
||||
|
||||
# build image for home
|
||||
- name: build docker image
|
||||
run: sudo docker build -f ./StatusPage/Dockerfile .
|
||||
|
||||
docker-build-workers:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CI_PIPELINE_ID: ${{github.run_number}}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Preinstall
|
||||
run: npm run prerun
|
||||
|
||||
|
||||
# build image for home
|
||||
- name: build docker image
|
||||
run: sudo docker build -f ./Workers/Dockerfile .
|
||||
|
||||
docker-build-workflow:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CI_PIPELINE_ID: ${{github.run_number}}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Preinstall
|
||||
run: npm run prerun
|
||||
|
||||
# build image for mail service
|
||||
- name: build docker image
|
||||
run: sudo docker build -f ./Workflow/Dockerfile .
|
||||
|
||||
|
||||
docker-build-test-server:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CI_PIPELINE_ID: ${{github.run_number}}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Preinstall
|
||||
run: npm run prerun
|
||||
|
||||
# build image for mail service
|
||||
- name: build docker image
|
||||
run: sudo docker build -f ./TestServer/Dockerfile .
|
||||
@@ -1,16 +0,0 @@
|
||||
name: Misc / Dependabot Automerge
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
merge:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CI_PIPELINE_ID: ${{github.run_number}}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ahmadnassri/action-dependabot-auto-merge@v2
|
||||
with:
|
||||
target: minor
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
31
.github/workflows/playwright.yml.skip
vendored
31
.github/workflows/playwright.yml.skip
vendored
@@ -1,31 +0,0 @@
|
||||
name: Playwright Tests
|
||||
on:
|
||||
push:
|
||||
branches: [ main, master ]
|
||||
pull_request:
|
||||
branches: [ main, master ]
|
||||
jobs:
|
||||
test:
|
||||
timeout-minutes: 60
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
BASE_URL: http://localhost
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
- name: Run Server in Docker
|
||||
run: npm run dev
|
||||
- name: Install Playwright Browsers
|
||||
run: npx playwright install --with-deps
|
||||
- name: Run Playwright tests
|
||||
run: cd Playwright && npm install && npx playwright install && npx playwright test
|
||||
- uses: actions/upload-artifact@v3
|
||||
if: always()
|
||||
with:
|
||||
name: playwright-report
|
||||
path: playwright-report/
|
||||
retention-days: 30
|
||||
501
.github/workflows/release.yml
vendored
501
.github/workflows/release.yml
vendored
@@ -1,501 +0,0 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "release"
|
||||
|
||||
jobs:
|
||||
|
||||
generate-build-number:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
build_number: ${{ steps.buildnumber.outputs.build_number }}
|
||||
steps:
|
||||
- name: Generate build number
|
||||
id: buildnumber
|
||||
uses: onyxmueller/build-tag-number@v1.0.2
|
||||
with:
|
||||
token: ${{secrets.github_token}}
|
||||
- run: echo "Build number is ${{ steps.buildnumber.outputs.build_number }}"
|
||||
|
||||
github-release:
|
||||
needs: generate-build-number
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
env:
|
||||
ONEUPTIME_VERSION: "7.0.${{needs.generate-build-number.outputs.build_number}}"
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
ref: release
|
||||
- run: echo "${{needs.generate-build-number.outputs.build_number}}"
|
||||
- name: "Build Changelog"
|
||||
id: build_changelog
|
||||
uses: mikepenz/release-changelog-builder-action@v3.7.1
|
||||
- uses: ncipollo/release-action@v1
|
||||
with:
|
||||
tag: ${{env.ONEUPTIME_VERSION}}
|
||||
artifactErrorsFailBuild: true
|
||||
body: |
|
||||
${{steps.build_changelog.outputs.changelog}}
|
||||
|
||||
|
||||
test-server-docker-image-deploy:
|
||||
needs: generate-build-number
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
DOCKERHUB_PASSWORD: ${{secrets.DOCKERHUB_PASSWORD}}
|
||||
DOCKERHUB_USERNAME: ${{secrets.DOCKERHUB_USERNAME}}
|
||||
ONEUPTIME_VERSION: "7.0.${{needs.generate-build-number.outputs.build_number}}"
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
ref: release
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
|
||||
- run: npm run prerun
|
||||
- run: sudo docker run --rm --privileged docker/binfmt:820fdd95a9972a5308930a2bdfb8573dd4447ad3
|
||||
# Build and deploy accounts.
|
||||
- run: sudo docker login --username $DOCKERHUB_USERNAME --password $DOCKERHUB_PASSWORD
|
||||
- run: sudo docker buildx create --use
|
||||
- run: sudo docker buildx build --platform linux/amd64,linux/arm64 --tag oneuptime/test-server:$ONEUPTIME_VERSION --tag oneuptime/test-server:release --push -f ./TestServer/Dockerfile .
|
||||
|
||||
|
||||
workflow-docker-image-deploy:
|
||||
needs: generate-build-number
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
DOCKERHUB_PASSWORD: ${{secrets.DOCKERHUB_PASSWORD}}
|
||||
DOCKERHUB_USERNAME: ${{secrets.DOCKERHUB_USERNAME}}
|
||||
ONEUPTIME_VERSION: "7.0.${{needs.generate-build-number.outputs.build_number}}"
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
ref: release
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
|
||||
- run: npm run prerun
|
||||
- run: sudo docker run --rm --privileged docker/binfmt:820fdd95a9972a5308930a2bdfb8573dd4447ad3
|
||||
# Build and deploy accounts.
|
||||
- run: sudo docker login --username $DOCKERHUB_USERNAME --password $DOCKERHUB_PASSWORD
|
||||
- run: sudo docker buildx create --use
|
||||
- run: sudo docker buildx build --platform linux/amd64,linux/arm64 --tag oneuptime/workflow:$ONEUPTIME_VERSION --tag oneuptime/workflow:release --push -f ./Workflow/Dockerfile .
|
||||
|
||||
workers-docker-image-deploy:
|
||||
needs: generate-build-number
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
DOCKERHUB_PASSWORD: ${{secrets.DOCKERHUB_PASSWORD}}
|
||||
DOCKERHUB_USERNAME: ${{secrets.DOCKERHUB_USERNAME}}
|
||||
ONEUPTIME_VERSION: "7.0.${{needs.generate-build-number.outputs.build_number}}"
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
ref: release
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
|
||||
- run: npm run prerun
|
||||
- run: sudo docker run --rm --privileged docker/binfmt:820fdd95a9972a5308930a2bdfb8573dd4447ad3
|
||||
# Build and deploy workers.
|
||||
- run: sudo docker login --username $DOCKERHUB_USERNAME --password $DOCKERHUB_PASSWORD
|
||||
- run: sudo docker buildx create --use
|
||||
- run: sudo docker buildx build --platform linux/amd64,linux/arm64 --tag oneuptime/workers:$ONEUPTIME_VERSION --tag oneuptime/workers:release --push -f ./Workers/Dockerfile .
|
||||
|
||||
staus-page-docker-image-deploy:
|
||||
needs: generate-build-number
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
DOCKERHUB_PASSWORD: ${{secrets.DOCKERHUB_PASSWORD}}
|
||||
DOCKERHUB_USERNAME: ${{secrets.DOCKERHUB_USERNAME}}
|
||||
ONEUPTIME_VERSION: "7.0.${{needs.generate-build-number.outputs.build_number}}"
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
ref: release
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
|
||||
- run: npm run prerun
|
||||
- run: sudo docker run --rm --privileged docker/binfmt:820fdd95a9972a5308930a2bdfb8573dd4447ad3
|
||||
# Build and deploy status-page.
|
||||
- run: sudo docker login --username $DOCKERHUB_USERNAME --password $DOCKERHUB_PASSWORD
|
||||
- run: sudo docker buildx create --use
|
||||
- run: sudo docker buildx build --platform linux/amd64,linux/arm64 --tag oneuptime/status-page:$ONEUPTIME_VERSION --tag oneuptime/status-page:release --push -f ./StatusPage/Dockerfile .
|
||||
|
||||
realtime-docker-image-deploy:
|
||||
needs: generate-build-number
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
DOCKERHUB_PASSWORD: ${{secrets.DOCKERHUB_PASSWORD}}
|
||||
DOCKERHUB_USERNAME: ${{secrets.DOCKERHUB_USERNAME}}
|
||||
ONEUPTIME_VERSION: "7.0.${{needs.generate-build-number.outputs.build_number}}"
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
ref: release
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
|
||||
- run: npm run prerun
|
||||
- run: sudo docker run --rm --privileged docker/binfmt:820fdd95a9972a5308930a2bdfb8573dd4447ad3
|
||||
# Build and deploy realtime.
|
||||
- run: sudo docker login --username $DOCKERHUB_USERNAME --password $DOCKERHUB_PASSWORD
|
||||
- run: sudo docker buildx create --use
|
||||
- run: sudo docker buildx build --platform linux/amd64,linux/arm64 --tag oneuptime/realtime:$ONEUPTIME_VERSION --tag oneuptime/realtime:release --push -f ./Realtime/Dockerfile .
|
||||
|
||||
|
||||
probe-api-docker-image-deploy:
|
||||
needs: generate-build-number
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
DOCKERHUB_PASSWORD: ${{secrets.DOCKERHUB_PASSWORD}}
|
||||
DOCKERHUB_USERNAME: ${{secrets.DOCKERHUB_USERNAME}}
|
||||
ONEUPTIME_VERSION: "7.0.${{needs.generate-build-number.outputs.build_number}}"
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
ref: release
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
|
||||
- run: npm run prerun
|
||||
- run: sudo docker run --rm --privileged docker/binfmt:820fdd95a9972a5308930a2bdfb8573dd4447ad3
|
||||
# Build and deploy probe-api.
|
||||
- run: sudo docker login --username $DOCKERHUB_USERNAME --password $DOCKERHUB_PASSWORD
|
||||
- run: sudo docker buildx create --use
|
||||
- run: sudo docker buildx build --platform linux/amd64,linux/arm64 --tag oneuptime/probe-api:$ONEUPTIME_VERSION --tag oneuptime/probe-api:release --push -f ./ProbeAPI/Dockerfile .
|
||||
|
||||
nginx-docker-image-deploy:
|
||||
needs: generate-build-number
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
DOCKERHUB_PASSWORD: ${{secrets.DOCKERHUB_PASSWORD}}
|
||||
DOCKERHUB_USERNAME: ${{secrets.DOCKERHUB_USERNAME}}
|
||||
ONEUPTIME_VERSION: "7.0.${{needs.generate-build-number.outputs.build_number}}"
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
ref: release
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
|
||||
- run: npm run prerun
|
||||
- run: sudo docker run --rm --privileged docker/binfmt:820fdd95a9972a5308930a2bdfb8573dd4447ad3
|
||||
# Build and deploy accounts.
|
||||
- run: sudo docker login --username $DOCKERHUB_USERNAME --password $DOCKERHUB_PASSWORD
|
||||
- run: sudo docker buildx create --use
|
||||
- run: sudo docker buildx build --platform linux/amd64,linux/arm64 --tag oneuptime/nginx:$ONEUPTIME_VERSION --tag oneuptime/nginx:release --push -f ./Nginx/Dockerfile .
|
||||
|
||||
|
||||
notification-docker-image-deploy:
|
||||
needs: generate-build-number
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
DOCKERHUB_PASSWORD: ${{secrets.DOCKERHUB_PASSWORD}}
|
||||
DOCKERHUB_USERNAME: ${{secrets.DOCKERHUB_USERNAME}}
|
||||
ONEUPTIME_VERSION: "7.0.${{needs.generate-build-number.outputs.build_number}}"
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
ref: release
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
- run: npm run prerun
|
||||
- run: sudo docker run --rm --privileged docker/binfmt:820fdd95a9972a5308930a2bdfb8573dd4447ad3
|
||||
# Build and deploy accounts.
|
||||
- run: sudo docker login --username $DOCKERHUB_USERNAME --password $DOCKERHUB_PASSWORD
|
||||
- run: sudo docker buildx create --use
|
||||
- run: sudo docker buildx build --platform linux/amd64,linux/arm64 --tag oneuptime/notification:$ONEUPTIME_VERSION --tag oneuptime/notification:release --push -f ./Notification/Dockerfile .
|
||||
|
||||
|
||||
licensing-docker-image-deploy:
|
||||
needs: generate-build-number
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
DOCKERHUB_PASSWORD: ${{secrets.DOCKERHUB_PASSWORD}}
|
||||
DOCKERHUB_USERNAME: ${{secrets.DOCKERHUB_USERNAME}}
|
||||
ONEUPTIME_VERSION: "7.0.${{needs.generate-build-number.outputs.build_number}}"
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
ref: release
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
|
||||
- run: npm run prerun
|
||||
- run: sudo docker run --rm --privileged docker/binfmt:820fdd95a9972a5308930a2bdfb8573dd4447ad3
|
||||
# Build and deploy accounts.
|
||||
- run: sudo docker login --username $DOCKERHUB_USERNAME --password $DOCKERHUB_PASSWORD
|
||||
- run: sudo docker buildx create --use
|
||||
- run: sudo docker buildx build --platform linux/amd64,linux/arm64 --tag oneuptime/licensing:$ONEUPTIME_VERSION --tag oneuptime/licensing:release --push -f ./Licensing/Dockerfile .
|
||||
|
||||
integrations-docker-image-deploy:
|
||||
needs: generate-build-number
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
DOCKERHUB_PASSWORD: ${{secrets.DOCKERHUB_PASSWORD}}
|
||||
DOCKERHUB_USERNAME: ${{secrets.DOCKERHUB_USERNAME}}
|
||||
ONEUPTIME_VERSION: "7.0.${{needs.generate-build-number.outputs.build_number}}"
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
ref: release
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
|
||||
- run: npm run prerun
|
||||
- run: sudo docker run --rm --privileged docker/binfmt:820fdd95a9972a5308930a2bdfb8573dd4447ad3
|
||||
# Build and deploy accounts.
|
||||
- run: sudo docker login --username $DOCKERHUB_USERNAME --password $DOCKERHUB_PASSWORD
|
||||
- run: sudo docker buildx create --use
|
||||
- run: sudo docker buildx build --platform linux/amd64,linux/arm64 --tag oneuptime/integrations:$ONEUPTIME_VERSION --tag oneuptime/integrations:release --push -f ./Integration/Dockerfile .
|
||||
|
||||
|
||||
probe-docker-image-deploy:
|
||||
needs: generate-build-number
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
DOCKERHUB_PASSWORD: ${{secrets.DOCKERHUB_PASSWORD}}
|
||||
DOCKERHUB_USERNAME: ${{secrets.DOCKERHUB_USERNAME}}
|
||||
ONEUPTIME_VERSION: "7.0.${{needs.generate-build-number.outputs.build_number}}"
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
ref: release
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
|
||||
- run: npm run prerun
|
||||
- run: sudo docker run --rm --privileged docker/binfmt:820fdd95a9972a5308930a2bdfb8573dd4447ad3
|
||||
# Build and deploy accounts.
|
||||
- run: sudo docker login --username $DOCKERHUB_USERNAME --password $DOCKERHUB_PASSWORD
|
||||
- run: sudo docker buildx create --use
|
||||
- run: sudo docker buildx build --platform linux/amd64,linux/arm64 --tag oneuptime/probe:$ONEUPTIME_VERSION --tag oneuptime/probe:release --push -f ./Probe/Dockerfile .
|
||||
|
||||
identity-docker-image-deploy:
|
||||
needs: generate-build-number
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
DOCKERHUB_PASSWORD: ${{secrets.DOCKERHUB_PASSWORD}}
|
||||
DOCKERHUB_USERNAME: ${{secrets.DOCKERHUB_USERNAME}}
|
||||
ONEUPTIME_VERSION: "7.0.${{needs.generate-build-number.outputs.build_number}}"
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
ref: release
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
|
||||
- run: npm run prerun
|
||||
- run: sudo docker run --rm --privileged docker/binfmt:820fdd95a9972a5308930a2bdfb8573dd4447ad3
|
||||
# Build and deploy accounts.
|
||||
- run: sudo docker login --username $DOCKERHUB_USERNAME --password $DOCKERHUB_PASSWORD
|
||||
- run: sudo docker buildx create --use
|
||||
- run: sudo docker buildx build --platform linux/amd64,linux/arm64 --tag oneuptime/identity:$ONEUPTIME_VERSION --tag oneuptime/identity:release --push -f ./Identity/Dockerfile .
|
||||
|
||||
|
||||
home-docker-image-deploy:
|
||||
needs: generate-build-number
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
DOCKERHUB_PASSWORD: ${{secrets.DOCKERHUB_PASSWORD}}
|
||||
DOCKERHUB_USERNAME: ${{secrets.DOCKERHUB_USERNAME}}
|
||||
ONEUPTIME_VERSION: "7.0.${{needs.generate-build-number.outputs.build_number}}"
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
ref: release
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
|
||||
- run: npm run prerun
|
||||
- run: sudo docker run --rm --privileged docker/binfmt:820fdd95a9972a5308930a2bdfb8573dd4447ad3
|
||||
# Build and deploy accounts.
|
||||
- run: sudo docker login --username $DOCKERHUB_USERNAME --password $DOCKERHUB_PASSWORD
|
||||
- run: sudo docker buildx create --use
|
||||
- run: sudo docker buildx build --platform linux/amd64,linux/arm64 --tag oneuptime/home:$ONEUPTIME_VERSION --tag oneuptime/home:release --push -f ./Home/Dockerfile .
|
||||
|
||||
|
||||
helm-chart-docker-image-deploy:
|
||||
needs: generate-build-number
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
DOCKERHUB_PASSWORD: ${{secrets.DOCKERHUB_PASSWORD}}
|
||||
DOCKERHUB_USERNAME: ${{secrets.DOCKERHUB_USERNAME}}
|
||||
ONEUPTIME_VERSION: "7.0.${{needs.generate-build-number.outputs.build_number}}"
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
ref: release
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
|
||||
- run: npm run prerun
|
||||
- run: sudo docker run --rm --privileged docker/binfmt:820fdd95a9972a5308930a2bdfb8573dd4447ad3
|
||||
# Build and deploy accounts.
|
||||
- run: sudo docker login --username $DOCKERHUB_USERNAME --password $DOCKERHUB_PASSWORD
|
||||
- run: sudo docker buildx create --use
|
||||
- run: sudo docker buildx build --platform linux/amd64,linux/arm64 --tag oneuptime/helm-chart:$ONEUPTIME_VERSION --tag oneuptime/helm-chart:release --push -f ./HelmChart/Dockerfile .
|
||||
|
||||
|
||||
haraka-docker-image-deploy:
|
||||
needs: generate-build-number
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
DOCKERHUB_PASSWORD: ${{secrets.DOCKERHUB_PASSWORD}}
|
||||
DOCKERHUB_USERNAME: ${{secrets.DOCKERHUB_USERNAME}}
|
||||
ONEUPTIME_VERSION: "7.0.${{needs.generate-build-number.outputs.build_number}}"
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
ref: release
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
|
||||
- run: npm run prerun
|
||||
- run: sudo docker run --rm --privileged docker/binfmt:820fdd95a9972a5308930a2bdfb8573dd4447ad3
|
||||
# Build and deploy accounts.
|
||||
- run: sudo docker login --username $DOCKERHUB_USERNAME --password $DOCKERHUB_PASSWORD
|
||||
- run: sudo docker buildx create --use
|
||||
- run: sudo docker buildx build --platform linux/amd64,linux/arm64 --tag oneuptime/haraka:$ONEUPTIME_VERSION --tag oneuptime/haraka:release --push -f ./Haraka/Dockerfile .
|
||||
|
||||
file-docker-image-deploy:
|
||||
needs: generate-build-number
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
DOCKERHUB_PASSWORD: ${{secrets.DOCKERHUB_PASSWORD}}
|
||||
DOCKERHUB_USERNAME: ${{secrets.DOCKERHUB_USERNAME}}
|
||||
ONEUPTIME_VERSION: "7.0.${{needs.generate-build-number.outputs.build_number}}"
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
ref: release
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
- run: npm run prerun
|
||||
- run: sudo docker run --rm --privileged docker/binfmt:820fdd95a9972a5308930a2bdfb8573dd4447ad3
|
||||
# Build and deploy file.
|
||||
- run: sudo docker login --username $DOCKERHUB_USERNAME --password $DOCKERHUB_PASSWORD
|
||||
- run: sudo docker buildx create --use
|
||||
- run: sudo docker buildx build --platform linux/amd64,linux/arm64 --tag oneuptime/file:$ONEUPTIME_VERSION --tag oneuptime/file:release --push -f ./File/Dockerfile .
|
||||
|
||||
|
||||
|
||||
dashboard-docker-image-deploy:
|
||||
needs: generate-build-number
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
DOCKERHUB_PASSWORD: ${{secrets.DOCKERHUB_PASSWORD}}
|
||||
DOCKERHUB_USERNAME: ${{secrets.DOCKERHUB_USERNAME}}
|
||||
ONEUPTIME_VERSION: "7.0.${{needs.generate-build-number.outputs.build_number}}"
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
ref: release
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
|
||||
- run: npm run prerun
|
||||
- run: sudo docker run --rm --privileged docker/binfmt:820fdd95a9972a5308930a2bdfb8573dd4447ad3
|
||||
# Build and deploy dashboard-api.
|
||||
- run: sudo docker login --username $DOCKERHUB_USERNAME --password $DOCKERHUB_PASSWORD
|
||||
- run: sudo docker buildx create --use
|
||||
- run: sudo docker buildx build --platform linux/amd64,linux/arm64 --tag oneuptime/dashboard:$ONEUPTIME_VERSION --tag oneuptime/dashboard:release --push -f ./Dashboard/Dockerfile .
|
||||
|
||||
|
||||
|
||||
|
||||
dashboard-api-docker-image-deploy:
|
||||
needs: generate-build-number
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
DOCKERHUB_PASSWORD: ${{secrets.DOCKERHUB_PASSWORD}}
|
||||
DOCKERHUB_USERNAME: ${{secrets.DOCKERHUB_USERNAME}}
|
||||
ONEUPTIME_VERSION: "7.0.${{needs.generate-build-number.outputs.build_number}}"
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
ref: release
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
|
||||
- run: npm run prerun
|
||||
- run: sudo docker run --rm --privileged docker/binfmt:820fdd95a9972a5308930a2bdfb8573dd4447ad3
|
||||
# Build and deploy dashboard-api.
|
||||
- run: sudo docker login --username $DOCKERHUB_USERNAME --password $DOCKERHUB_PASSWORD
|
||||
- run: sudo docker buildx create --use
|
||||
- run: sudo docker buildx build --platform linux/amd64,linux/arm64 --tag oneuptime/dashboard-api:$ONEUPTIME_VERSION --tag oneuptime/dashboard-api:release --push -f ./DashboardAPI/Dockerfile .
|
||||
|
||||
|
||||
|
||||
|
||||
api-reference-docker-image-deploy:
|
||||
needs: generate-build-number
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
DOCKERHUB_PASSWORD: ${{secrets.DOCKERHUB_PASSWORD}}
|
||||
DOCKERHUB_USERNAME: ${{secrets.DOCKERHUB_USERNAME}}
|
||||
ONEUPTIME_VERSION: "7.0.${{needs.generate-build-number.outputs.build_number}}"
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
ref: release
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
|
||||
- run: npm run prerun
|
||||
- run: sudo docker run --rm --privileged docker/binfmt:820fdd95a9972a5308930a2bdfb8573dd4447ad3
|
||||
# Build and deploy api-reference.
|
||||
- run: sudo docker login --username $DOCKERHUB_USERNAME --password $DOCKERHUB_PASSWORD
|
||||
- run: sudo docker buildx create --use
|
||||
- run: sudo docker buildx build --platform linux/amd64,linux/arm64 --tag oneuptime/api-reference:$ONEUPTIME_VERSION --tag oneuptime/api-reference:release --push -f ./ApiReference/Dockerfile .
|
||||
|
||||
|
||||
|
||||
accounts-docker-image-deploy:
|
||||
needs: generate-build-number
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
DOCKERHUB_PASSWORD: ${{secrets.DOCKERHUB_PASSWORD}}
|
||||
DOCKERHUB_USERNAME: ${{secrets.DOCKERHUB_USERNAME}}
|
||||
ONEUPTIME_VERSION: "7.0.${{needs.generate-build-number.outputs.build_number}}"
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
ref: release
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
|
||||
- run: npm run prerun
|
||||
- run: sudo docker run --rm --privileged docker/binfmt:820fdd95a9972a5308930a2bdfb8573dd4447ad3
|
||||
# Build and deploy accounts.
|
||||
- run: sudo docker login --username $DOCKERHUB_USERNAME --password $DOCKERHUB_PASSWORD
|
||||
- run: sudo docker buildx create --use
|
||||
- run: sudo docker buildx build --platform linux/amd64,linux/arm64 --tag oneuptime/accounts:$ONEUPTIME_VERSION --tag oneuptime/accounts:release --push -f ./Accounts/Dockerfile .
|
||||
|
||||
|
||||
47
.github/workflows/security.yml
vendored
Normal file
47
.github/workflows/security.yml
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
# This workflow uses actions that are not certified by GitHub.
|
||||
# They are provided by a third-party and are governed by
|
||||
# separate terms of service, privacy policy, and support
|
||||
# documentation.
|
||||
|
||||
# A sample workflow which checks out your Infrastructure as Code Configuration files,
|
||||
# such as Kubernetes, Helm & Terraform and scans them for any security issues.
|
||||
# The results are then uploaded to GitHub Security Code Scanning
|
||||
#
|
||||
# For more examples, including how to limit scans to only high-severity issues
|
||||
# and fail PR checks, see https://github.com/snyk/actions/
|
||||
|
||||
name: Security
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches: [ master ]
|
||||
schedule:
|
||||
- cron: '23 20 * * 2'
|
||||
|
||||
jobs:
|
||||
snyk:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Run Snyk to check configuration files for security issues
|
||||
# Snyk can be used to break the build when it detects security issues.
|
||||
# In this case we want to upload the issues to GitHub Code Scanning
|
||||
continue-on-error: true
|
||||
uses: snyk/actions/iac@14818c4695ecc4045f33c9cee9e795a788711ca4
|
||||
env:
|
||||
# In order to use the Snyk Action you will need to have a Snyk API token.
|
||||
# More details in https://github.com/snyk/actions#getting-your-snyk-token
|
||||
# or you can signup for free at https://snyk.io/login
|
||||
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
|
||||
with:
|
||||
# Add the path to the configuration file that you would like to test.
|
||||
# For example `deployment.yaml` for a Kubernetes deployment manifest
|
||||
# or `main.tf` for a Terraform configuration file
|
||||
file: your-file-to-test.yaml
|
||||
- name: Upload result to GitHub Code Scanning
|
||||
uses: github/codeql-action/upload-sarif@v1
|
||||
with:
|
||||
sarif_file: snyk.sarif
|
||||
442
.github/workflows/test-release.yml
vendored
442
.github/workflows/test-release.yml
vendored
@@ -1,442 +0,0 @@
|
||||
name: Test Image Deploy to DockerHub
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "master"
|
||||
|
||||
jobs:
|
||||
|
||||
generate-build-number:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
build_number: ${{ steps.buildnumber.outputs.build_number }}
|
||||
steps:
|
||||
- name: Generate build number
|
||||
id: buildnumber
|
||||
uses: onyxmueller/build-tag-number@v1.0.2
|
||||
with:
|
||||
token: ${{secrets.github_token}}
|
||||
- run: echo "Build number is ${{ steps.buildnumber.outputs.build_number }}"
|
||||
|
||||
test-server-test-docker-image-deploy:
|
||||
needs: generate-build-number
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
DOCKERHUB_PASSWORD: ${{secrets.DOCKERHUB_PASSWORD}}
|
||||
DOCKERHUB_USERNAME: ${{secrets.DOCKERHUB_USERNAME}}
|
||||
ONEUPTIME_VERSION: "7.0.${{needs.generate-build-number.outputs.build_number}}"
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
|
||||
- run: npm run prerun
|
||||
- run: sudo docker run --rm --privileged docker/binfmt:820fdd95a9972a5308930a2bdfb8573dd4447ad3
|
||||
# Build and deploy accounts.
|
||||
- run: sudo docker login --username $DOCKERHUB_USERNAME --password $DOCKERHUB_PASSWORD
|
||||
- run: sudo docker buildx create --use
|
||||
- run: sudo docker buildx build --platform linux/amd64,linux/arm64 --tag oneuptime/test-server:$ONEUPTIME_VERSION-test --tag oneuptime/test-server:test --push -f ./TestServer/Dockerfile .
|
||||
|
||||
workflow-test-docker-image-deploy:
|
||||
needs: generate-build-number
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
DOCKERHUB_PASSWORD: ${{secrets.DOCKERHUB_PASSWORD}}
|
||||
DOCKERHUB_USERNAME: ${{secrets.DOCKERHUB_USERNAME}}
|
||||
ONEUPTIME_VERSION: "7.0.${{needs.generate-build-number.outputs.build_number}}"
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
|
||||
- run: npm run prerun
|
||||
- run: sudo docker run --rm --privileged docker/binfmt:820fdd95a9972a5308930a2bdfb8573dd4447ad3
|
||||
# Build and deploy accounts.
|
||||
- run: sudo docker login --username $DOCKERHUB_USERNAME --password $DOCKERHUB_PASSWORD
|
||||
- run: sudo docker buildx create --use
|
||||
- run: sudo docker buildx build --platform linux/amd64,linux/arm64 --tag oneuptime/workflow:$ONEUPTIME_VERSION-test --tag oneuptime/workflow:test --push -f ./Workflow/Dockerfile .
|
||||
|
||||
workers-test-docker-image-deploy:
|
||||
needs: generate-build-number
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
DOCKERHUB_PASSWORD: ${{secrets.DOCKERHUB_PASSWORD}}
|
||||
DOCKERHUB_USERNAME: ${{secrets.DOCKERHUB_USERNAME}}
|
||||
ONEUPTIME_VERSION: "7.0.${{needs.generate-build-number.outputs.build_number}}"
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
|
||||
- run: npm run prerun
|
||||
- run: sudo docker run --rm --privileged docker/binfmt:820fdd95a9972a5308930a2bdfb8573dd4447ad3
|
||||
# Build and deploy workers.
|
||||
- run: sudo docker login --username $DOCKERHUB_USERNAME --password $DOCKERHUB_PASSWORD
|
||||
- run: sudo docker buildx create --use
|
||||
- run: sudo docker buildx build --platform linux/amd64,linux/arm64 --tag oneuptime/workers:$ONEUPTIME_VERSION-test --tag oneuptime/workers:test --push -f ./Workers/Dockerfile .
|
||||
|
||||
staus-page-test-docker-image-deploy:
|
||||
needs: generate-build-number
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
DOCKERHUB_PASSWORD: ${{secrets.DOCKERHUB_PASSWORD}}
|
||||
DOCKERHUB_USERNAME: ${{secrets.DOCKERHUB_USERNAME}}
|
||||
ONEUPTIME_VERSION: "7.0.${{needs.generate-build-number.outputs.build_number}}"
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
|
||||
- run: npm run prerun
|
||||
- run: sudo docker run --rm --privileged docker/binfmt:820fdd95a9972a5308930a2bdfb8573dd4447ad3
|
||||
# Build and deploy status-page.
|
||||
- run: sudo docker login --username $DOCKERHUB_USERNAME --password $DOCKERHUB_PASSWORD
|
||||
- run: sudo docker buildx create --use
|
||||
- run: sudo docker buildx build --platform linux/amd64,linux/arm64 --tag oneuptime/status-page:$ONEUPTIME_VERSION-test --tag oneuptime/status-page:test --push -f ./StatusPage/Dockerfile .
|
||||
|
||||
realtime-test-docker-image-deploy:
|
||||
needs: generate-build-number
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
DOCKERHUB_PASSWORD: ${{secrets.DOCKERHUB_PASSWORD}}
|
||||
DOCKERHUB_USERNAME: ${{secrets.DOCKERHUB_USERNAME}}
|
||||
ONEUPTIME_VERSION: "7.0.${{needs.generate-build-number.outputs.build_number}}"
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
|
||||
- run: npm run prerun
|
||||
- run: sudo docker run --rm --privileged docker/binfmt:820fdd95a9972a5308930a2bdfb8573dd4447ad3
|
||||
# Build and deploy realtime.
|
||||
- run: sudo docker login --username $DOCKERHUB_USERNAME --password $DOCKERHUB_PASSWORD
|
||||
- run: sudo docker buildx create --use
|
||||
- run: sudo docker buildx build --platform linux/amd64,linux/arm64 --tag oneuptime/realtime:$ONEUPTIME_VERSION-test --tag oneuptime/realtime:test --push -f ./Realtime/Dockerfile .
|
||||
|
||||
|
||||
probe-test-docker-image-deploy:
|
||||
needs: generate-build-number
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
DOCKERHUB_PASSWORD: ${{secrets.DOCKERHUB_PASSWORD}}
|
||||
DOCKERHUB_USERNAME: ${{secrets.DOCKERHUB_USERNAME}}
|
||||
ONEUPTIME_VERSION: "7.0.${{needs.generate-build-number.outputs.build_number}}"
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
|
||||
- run: npm run prerun
|
||||
- run: sudo docker run --rm --privileged docker/binfmt:820fdd95a9972a5308930a2bdfb8573dd4447ad3
|
||||
# Build and deploy probe-api.
|
||||
- run: sudo docker login --username $DOCKERHUB_USERNAME --password $DOCKERHUB_PASSWORD
|
||||
- run: sudo docker buildx create --use
|
||||
- run: sudo docker buildx build --platform linux/amd64,linux/arm64 --tag oneuptime/probe:$ONEUPTIME_VERSION-test --tag oneuptime/probe:test --push -f ./Probe/Dockerfile .
|
||||
|
||||
probe-api-test-docker-image-deploy:
|
||||
needs: generate-build-number
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
DOCKERHUB_PASSWORD: ${{secrets.DOCKERHUB_PASSWORD}}
|
||||
DOCKERHUB_USERNAME: ${{secrets.DOCKERHUB_USERNAME}}
|
||||
ONEUPTIME_VERSION: "7.0.${{needs.generate-build-number.outputs.build_number}}"
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
|
||||
- run: npm run prerun
|
||||
- run: sudo docker run --rm --privileged docker/binfmt:820fdd95a9972a5308930a2bdfb8573dd4447ad3
|
||||
# Build and deploy probe-api.
|
||||
- run: sudo docker login --username $DOCKERHUB_USERNAME --password $DOCKERHUB_PASSWORD
|
||||
- run: sudo docker buildx create --use
|
||||
- run: sudo docker buildx build --platform linux/amd64,linux/arm64 --tag oneuptime/probe-api:$ONEUPTIME_VERSION-test --tag oneuptime/probe-api:test --push -f ./ProbeAPI/Dockerfile .
|
||||
|
||||
nginx-test-docker-image-deploy:
|
||||
needs: generate-build-number
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
DOCKERHUB_PASSWORD: ${{secrets.DOCKERHUB_PASSWORD}}
|
||||
DOCKERHUB_USERNAME: ${{secrets.DOCKERHUB_USERNAME}}
|
||||
ONEUPTIME_VERSION: "7.0.${{needs.generate-build-number.outputs.build_number}}"
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
|
||||
- run: npm run prerun
|
||||
- run: sudo docker run --rm --privileged docker/binfmt:820fdd95a9972a5308930a2bdfb8573dd4447ad3
|
||||
# Build and deploy accounts.
|
||||
- run: sudo docker login --username $DOCKERHUB_USERNAME --password $DOCKERHUB_PASSWORD
|
||||
- run: sudo docker buildx create --use
|
||||
- run: sudo docker buildx build --platform linux/amd64,linux/arm64 --tag oneuptime/nginx:$ONEUPTIME_VERSION-test --tag oneuptime/nginx:test --push -f ./Nginx/Dockerfile .
|
||||
|
||||
|
||||
notification-test-docker-image-deploy:
|
||||
needs: generate-build-number
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
DOCKERHUB_PASSWORD: ${{secrets.DOCKERHUB_PASSWORD}}
|
||||
DOCKERHUB_USERNAME: ${{secrets.DOCKERHUB_USERNAME}}
|
||||
ONEUPTIME_VERSION: "7.0.${{needs.generate-build-number.outputs.build_number}}"
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
- run: npm run prerun
|
||||
- run: sudo docker run --rm --privileged docker/binfmt:820fdd95a9972a5308930a2bdfb8573dd4447ad3
|
||||
# Build and deploy accounts.
|
||||
- run: sudo docker login --username $DOCKERHUB_USERNAME --password $DOCKERHUB_PASSWORD
|
||||
- run: sudo docker buildx create --use
|
||||
- run: sudo docker buildx build --platform linux/amd64,linux/arm64 --tag oneuptime/notification:$ONEUPTIME_VERSION-test --tag oneuptime/notification:test --push -f ./Notification/Dockerfile .
|
||||
|
||||
|
||||
licensing-test-docker-image-deploy:
|
||||
needs: generate-build-number
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
DOCKERHUB_PASSWORD: ${{secrets.DOCKERHUB_PASSWORD}}
|
||||
DOCKERHUB_USERNAME: ${{secrets.DOCKERHUB_USERNAME}}
|
||||
ONEUPTIME_VERSION: "7.0.${{needs.generate-build-number.outputs.build_number}}"
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
|
||||
- run: npm run prerun
|
||||
- run: sudo docker run --rm --privileged docker/binfmt:820fdd95a9972a5308930a2bdfb8573dd4447ad3
|
||||
# Build and deploy accounts.
|
||||
- run: sudo docker login --username $DOCKERHUB_USERNAME --password $DOCKERHUB_PASSWORD
|
||||
- run: sudo docker buildx create --use
|
||||
- run: sudo docker buildx build --platform linux/amd64,linux/arm64 --tag oneuptime/licensing:$ONEUPTIME_VERSION-test --tag oneuptime/licensing:test --push -f ./Licensing/Dockerfile .
|
||||
|
||||
integrations-test-docker-image-deploy:
|
||||
needs: generate-build-number
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
DOCKERHUB_PASSWORD: ${{secrets.DOCKERHUB_PASSWORD}}
|
||||
DOCKERHUB_USERNAME: ${{secrets.DOCKERHUB_USERNAME}}
|
||||
ONEUPTIME_VERSION: "7.0.${{needs.generate-build-number.outputs.build_number}}"
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
|
||||
- run: npm run prerun
|
||||
- run: sudo docker run --rm --privileged docker/binfmt:820fdd95a9972a5308930a2bdfb8573dd4447ad3
|
||||
# Build and deploy accounts.
|
||||
- run: sudo docker login --username $DOCKERHUB_USERNAME --password $DOCKERHUB_PASSWORD
|
||||
- run: sudo docker buildx create --use
|
||||
- run: sudo docker buildx build --platform linux/amd64,linux/arm64 --tag oneuptime/integrations:$ONEUPTIME_VERSION-test --tag oneuptime/integrations:test --push -f ./Integration/Dockerfile .
|
||||
|
||||
|
||||
|
||||
|
||||
identity-test-docker-image-deploy:
|
||||
needs: generate-build-number
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
DOCKERHUB_PASSWORD: ${{secrets.DOCKERHUB_PASSWORD}}
|
||||
DOCKERHUB_USERNAME: ${{secrets.DOCKERHUB_USERNAME}}
|
||||
ONEUPTIME_VERSION: "7.0.${{needs.generate-build-number.outputs.build_number}}"
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
|
||||
- run: npm run prerun
|
||||
- run: sudo docker run --rm --privileged docker/binfmt:820fdd95a9972a5308930a2bdfb8573dd4447ad3
|
||||
# Build and deploy accounts.
|
||||
- run: sudo docker login --username $DOCKERHUB_USERNAME --password $DOCKERHUB_PASSWORD
|
||||
- run: sudo docker buildx create --use
|
||||
- run: sudo docker buildx build --platform linux/amd64,linux/arm64 --tag oneuptime/identity:$ONEUPTIME_VERSION-test --tag oneuptime/identity:test --push -f ./Identity/Dockerfile .
|
||||
|
||||
|
||||
home-test-docker-image-deploy:
|
||||
needs: generate-build-number
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
DOCKERHUB_PASSWORD: ${{secrets.DOCKERHUB_PASSWORD}}
|
||||
DOCKERHUB_USERNAME: ${{secrets.DOCKERHUB_USERNAME}}
|
||||
ONEUPTIME_VERSION: "7.0.${{needs.generate-build-number.outputs.build_number}}"
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
|
||||
- run: npm run prerun
|
||||
- run: sudo docker run --rm --privileged docker/binfmt:820fdd95a9972a5308930a2bdfb8573dd4447ad3
|
||||
# Build and deploy accounts.
|
||||
- run: sudo docker login --username $DOCKERHUB_USERNAME --password $DOCKERHUB_PASSWORD
|
||||
- run: sudo docker buildx create --use
|
||||
- run: sudo docker buildx build --platform linux/amd64,linux/arm64 --tag oneuptime/home:$ONEUPTIME_VERSION-test --tag oneuptime/home:test --push -f ./Home/Dockerfile .
|
||||
|
||||
|
||||
helm-chart-test-docker-image-deploy:
|
||||
needs: generate-build-number
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
DOCKERHUB_PASSWORD: ${{secrets.DOCKERHUB_PASSWORD}}
|
||||
DOCKERHUB_USERNAME: ${{secrets.DOCKERHUB_USERNAME}}
|
||||
ONEUPTIME_VERSION: "7.0.${{needs.generate-build-number.outputs.build_number}}"
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
|
||||
- run: npm run prerun
|
||||
- run: sudo docker run --rm --privileged docker/binfmt:820fdd95a9972a5308930a2bdfb8573dd4447ad3
|
||||
# Build and deploy accounts.
|
||||
- run: sudo docker login --username $DOCKERHUB_USERNAME --password $DOCKERHUB_PASSWORD
|
||||
- run: sudo docker buildx create --use
|
||||
- run: sudo docker buildx build --platform linux/amd64,linux/arm64 --tag oneuptime/helm-chart:$ONEUPTIME_VERSION-test --tag oneuptime/helm-chart:test --push -f ./HelmChart/Dockerfile .
|
||||
|
||||
|
||||
haraka-test-docker-image-deploy:
|
||||
needs: generate-build-number
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
DOCKERHUB_PASSWORD: ${{secrets.DOCKERHUB_PASSWORD}}
|
||||
DOCKERHUB_USERNAME: ${{secrets.DOCKERHUB_USERNAME}}
|
||||
ONEUPTIME_VERSION: "7.0.${{needs.generate-build-number.outputs.build_number}}"
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
|
||||
- run: npm run prerun
|
||||
- run: sudo docker run --rm --privileged docker/binfmt:820fdd95a9972a5308930a2bdfb8573dd4447ad3
|
||||
# Build and deploy accounts.
|
||||
- run: sudo docker login --username $DOCKERHUB_USERNAME --password $DOCKERHUB_PASSWORD
|
||||
- run: sudo docker buildx create --use
|
||||
- run: sudo docker buildx build --platform linux/amd64,linux/arm64 --tag oneuptime/haraka:$ONEUPTIME_VERSION-test --tag oneuptime/haraka:test --push -f ./Haraka/Dockerfile .
|
||||
|
||||
file-test-docker-image-deploy:
|
||||
needs: generate-build-number
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
DOCKERHUB_PASSWORD: ${{secrets.DOCKERHUB_PASSWORD}}
|
||||
DOCKERHUB_USERNAME: ${{secrets.DOCKERHUB_USERNAME}}
|
||||
ONEUPTIME_VERSION: "7.0.${{needs.generate-build-number.outputs.build_number}}"
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
- run: npm run prerun
|
||||
- run: sudo docker run --rm --privileged docker/binfmt:820fdd95a9972a5308930a2bdfb8573dd4447ad3
|
||||
# Build and deploy file.
|
||||
- run: sudo docker login --username $DOCKERHUB_USERNAME --password $DOCKERHUB_PASSWORD
|
||||
- run: sudo docker buildx create --use
|
||||
- run: sudo docker buildx build --platform linux/amd64,linux/arm64 --tag oneuptime/file:$ONEUPTIME_VERSION-test --tag oneuptime/file:test --push -f ./File/Dockerfile .
|
||||
|
||||
|
||||
|
||||
dashboard-test-docker-image-deploy:
|
||||
needs: generate-build-number
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
DOCKERHUB_PASSWORD: ${{secrets.DOCKERHUB_PASSWORD}}
|
||||
DOCKERHUB_USERNAME: ${{secrets.DOCKERHUB_USERNAME}}
|
||||
ONEUPTIME_VERSION: "7.0.${{needs.generate-build-number.outputs.build_number}}"
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
|
||||
- run: npm run prerun
|
||||
- run: sudo docker run --rm --privileged docker/binfmt:820fdd95a9972a5308930a2bdfb8573dd4447ad3
|
||||
# Build and deploy dashboard-api.
|
||||
- run: sudo docker login --username $DOCKERHUB_USERNAME --password $DOCKERHUB_PASSWORD
|
||||
- run: sudo docker buildx create --use
|
||||
- run: sudo docker buildx build --platform linux/amd64,linux/arm64 --tag oneuptime/dashboard:$ONEUPTIME_VERSION-test --tag oneuptime/dashboard:test --push -f ./Dashboard/Dockerfile .
|
||||
|
||||
|
||||
|
||||
|
||||
dashboard-api-test-docker-image-deploy:
|
||||
needs: generate-build-number
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
DOCKERHUB_PASSWORD: ${{secrets.DOCKERHUB_PASSWORD}}
|
||||
DOCKERHUB_USERNAME: ${{secrets.DOCKERHUB_USERNAME}}
|
||||
ONEUPTIME_VERSION: "7.0.${{needs.generate-build-number.outputs.build_number}}"
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
|
||||
- run: npm run prerun
|
||||
- run: sudo docker run --rm --privileged docker/binfmt:820fdd95a9972a5308930a2bdfb8573dd4447ad3
|
||||
# Build and deploy dashboard-api.
|
||||
- run: sudo docker login --username $DOCKERHUB_USERNAME --password $DOCKERHUB_PASSWORD
|
||||
- run: sudo docker buildx create --use
|
||||
- run: sudo docker buildx build --platform linux/amd64,linux/arm64 --tag oneuptime/dashboard-api:$ONEUPTIME_VERSION-test --tag oneuptime/dashboard-api:test --push -f ./DashboardAPI/Dockerfile .
|
||||
|
||||
|
||||
|
||||
|
||||
api-reference-test-docker-image-deploy:
|
||||
needs: generate-build-number
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
DOCKERHUB_PASSWORD: ${{secrets.DOCKERHUB_PASSWORD}}
|
||||
DOCKERHUB_USERNAME: ${{secrets.DOCKERHUB_USERNAME}}
|
||||
ONEUPTIME_VERSION: "7.0.${{needs.generate-build-number.outputs.build_number}}"
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
|
||||
- run: npm run prerun
|
||||
- run: sudo docker run --rm --privileged docker/binfmt:820fdd95a9972a5308930a2bdfb8573dd4447ad3
|
||||
# Build and deploy api-reference.
|
||||
- run: sudo docker login --username $DOCKERHUB_USERNAME --password $DOCKERHUB_PASSWORD
|
||||
- run: sudo docker buildx create --use
|
||||
- run: sudo docker buildx build --platform linux/amd64,linux/arm64 --tag oneuptime/api-reference:$ONEUPTIME_VERSION-test --tag oneuptime/api-reference:test --push -f ./ApiReference/Dockerfile .
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
accounts-test-docker-image-deploy:
|
||||
needs: generate-build-number
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
DOCKERHUB_PASSWORD: ${{secrets.DOCKERHUB_PASSWORD}}
|
||||
DOCKERHUB_USERNAME: ${{secrets.DOCKERHUB_USERNAME}}
|
||||
ONEUPTIME_VERSION: "7.0.${{needs.generate-build-number.outputs.build_number}}"
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
|
||||
- run: npm run prerun
|
||||
- run: sudo docker run --rm --privileged docker/binfmt:820fdd95a9972a5308930a2bdfb8573dd4447ad3
|
||||
# Build and deploy accounts.
|
||||
- run: sudo docker login --username $DOCKERHUB_USERNAME --password $DOCKERHUB_PASSWORD
|
||||
- run: sudo docker buildx create --use
|
||||
- run: sudo docker buildx build --platform linux/amd64,linux/arm64 --tag oneuptime/accounts:$ONEUPTIME_VERSION-test --tag oneuptime/accounts:test --push -f ./Accounts/Dockerfile .
|
||||
|
||||
|
||||
23
.github/workflows/test.common-server.yaml
vendored
23
.github/workflows/test.common-server.yaml
vendored
@@ -1,23 +0,0 @@
|
||||
name: Common Server Test
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches-ignore:
|
||||
- 'hotfix-*' # excludes hotfix branches
|
||||
- 'release'
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CI_PIPELINE_ID: ${{github.run_number}}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
- run: cd Common && npm install
|
||||
- run: cd Model && npm install
|
||||
- run: cd CommonServer && bash test-setup.sh
|
||||
- run: cd CommonServer && npm install && npm run test
|
||||
22
.github/workflows/test.common.yaml
vendored
22
.github/workflows/test.common.yaml
vendored
@@ -1,22 +0,0 @@
|
||||
name: Common Test
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches-ignore:
|
||||
- 'hotfix-*' # excludes hotfix branches
|
||||
- 'release'
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CI_PIPELINE_ID: ${{github.run_number}}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
- run: cd Model && npm install
|
||||
- run: cd Common && npm install && npm run test
|
||||
|
||||
23
.github/workflows/test.commonui.yaml
vendored
23
.github/workflows/test.commonui.yaml
vendored
@@ -1,23 +0,0 @@
|
||||
name: CommonUI Test
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches-ignore:
|
||||
- 'hotfix-*' # excludes hotfix branches
|
||||
- 'release'
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CI_PIPELINE_ID: ${{github.run_number}}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
- run: cd Common && npm install
|
||||
- run: cd Model && npm install
|
||||
- run: cd CommonUI && npm install --force && npm run test
|
||||
|
||||
21
.github/workflows/test.home.yaml
vendored
21
.github/workflows/test.home.yaml
vendored
@@ -1,21 +0,0 @@
|
||||
name: Home Test
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches-ignore:
|
||||
- 'hotfix-*' # excludes hotfix branches
|
||||
- 'release'
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CI_PIPELINE_ID: ${{github.run_number}}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
- run: cd Home && npm install && npm run test
|
||||
|
||||
23
.github/workflows/test.model.yaml
vendored
23
.github/workflows/test.model.yaml
vendored
@@ -1,23 +0,0 @@
|
||||
name: Model Test
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches-ignore:
|
||||
- 'hotfix-*' # excludes hotfix branches
|
||||
- 'release'
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CI_PIPELINE_ID: ${{github.run_number}}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
- run: cd Common && npm install
|
||||
- run: cd Model && npm install
|
||||
- run: cd Model && npm install && npm run test
|
||||
|
||||
21
.github/workflows/test.probe-api.yaml
vendored
21
.github/workflows/test.probe-api.yaml
vendored
@@ -1,21 +0,0 @@
|
||||
name: Probe Api Test
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches-ignore:
|
||||
- 'hotfix-*' # excludes hotfix branches
|
||||
- 'release'
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CI_PIPELINE_ID: ${{github.run_number}}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
- run: cd ProbeAPI && npm install && npm run test
|
||||
|
||||
23
.github/workflows/test.probe.yaml
vendored
23
.github/workflows/test.probe.yaml
vendored
@@ -1,23 +0,0 @@
|
||||
name: Probe Test
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches-ignore:
|
||||
- 'hotfix-*' # excludes hotfix branches
|
||||
- 'release'
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CI_PIPELINE_ID: ${{github.run_number}}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.3.0
|
||||
- run: cd Common && npm install
|
||||
- run: cd CommonServer && npm install
|
||||
- run: cd Probe && npm install && npm run test
|
||||
|
||||
43
.gitignore
vendored
43
.gitignore
vendored
@@ -3,14 +3,7 @@ node_modules
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
node_modules
|
||||
|
||||
# Build Dist
|
||||
*/build/dist/*
|
||||
|
||||
# Build Dist
|
||||
**/dist/*
|
||||
|
||||
/newrelic_agent.log
|
||||
.idea
|
||||
# testing
|
||||
/coverage
|
||||
@@ -20,7 +13,10 @@ node_modules
|
||||
|
||||
# misc
|
||||
.DS_Store
|
||||
|
||||
.env.local
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
env.js
|
||||
|
||||
npm-debug.log*
|
||||
@@ -57,31 +53,4 @@ tests/coverage
|
||||
|
||||
settings.json
|
||||
|
||||
GoSDK/tester/
|
||||
|
||||
.gitconfig
|
||||
|
||||
secret.env
|
||||
|
||||
# This file is autogenerated from the template
|
||||
*/.env
|
||||
*/Dockerfile
|
||||
config.env
|
||||
config.env.tmp
|
||||
config.env.temp
|
||||
docker-compose.yml
|
||||
logs.txt
|
||||
|
||||
*/Cert.crt
|
||||
*/Key.key
|
||||
Nginx/default.conf
|
||||
|
||||
Certs/StatusPageCerts/*.crt
|
||||
Certs/StatusPageCerts/*.key
|
||||
|
||||
Certs/ServerCerts/*.crt
|
||||
Certs/ServerCerts/*.key
|
||||
|
||||
Backups/*.backup
|
||||
Backups/*.sql
|
||||
Backups/*.tar
|
||||
go-sdk/tester/
|
||||
167
.gitlab-ci.yml
Normal file
167
.gitlab-ci.yml
Normal file
@@ -0,0 +1,167 @@
|
||||
# IMPORTANT:
|
||||
#
|
||||
# This CI/CD will run on an Ubuntu VM. After this script runs, the VM will retain the state.
|
||||
# It's your responsibility to clean the VM up in the cleanup stage after job finishes executing.
|
||||
# This script runs on Microk8s. Since our deployments are on Kubernetes, our aim is to create EXACT same replica for test, staging and production.
|
||||
|
||||
# Define stages
|
||||
stages:
|
||||
- BuildAndTest
|
||||
- Deploy
|
||||
- RollbackIfDeploymentFail
|
||||
- Tests
|
||||
- RollbackIfTestsFail
|
||||
|
||||
include:
|
||||
# GLOBAL JOBS
|
||||
- '/ci/spec/global/lint.yaml'
|
||||
- '/ci/spec/global/rollback.yaml'
|
||||
|
||||
# ACCOUNTS
|
||||
- '/ci/spec/accounts/audit.yaml'
|
||||
- '/ci/spec/accounts/deploy.yaml'
|
||||
- '/ci/spec/accounts/rollback.yaml'
|
||||
- '/ci/spec/accounts/lighthouse.yaml'
|
||||
|
||||
# ADMIN DASHBOARD
|
||||
- '/ci/spec/admin-dashboard/audit.yaml'
|
||||
- '/ci/spec/admin-dashboard/deploy.yaml'
|
||||
- '/ci/spec/admin-dashboard/rollback.yaml'
|
||||
|
||||
# API-DOCS DASHBOARD
|
||||
- '/ci/spec/api-docs/audit.yaml'
|
||||
- '/ci/spec/api-docs/deploy.yaml'
|
||||
- '/ci/spec/api-docs/rollback.yaml'
|
||||
|
||||
# BACKEND
|
||||
- '/ci/spec/backend/audit.yaml'
|
||||
- '/ci/spec/backend/build-n-test.yaml'
|
||||
- '/ci/spec/backend/deploy.yaml'
|
||||
- '/ci/spec/backend/rollback.yaml'
|
||||
|
||||
# DASHBOARD
|
||||
- '/ci/spec/dashboard/audit.yaml'
|
||||
- '/ci/spec/dashboard/deploy.yaml'
|
||||
- '/ci/spec/dashboard/rollback.yaml'
|
||||
|
||||
# HELM-CHART
|
||||
- '/ci/spec/helm-chart/audit.yaml'
|
||||
- '/ci/spec/helm-chart/build-n-test.yaml'
|
||||
- '/ci/spec/helm-chart/deploy.yaml'
|
||||
- '/ci/spec/helm-chart/rollback.yaml'
|
||||
|
||||
# HOME
|
||||
- '/ci/spec/home/audit.yaml'
|
||||
- '/ci/spec/home/deploy.yaml'
|
||||
- '/ci/spec/home/rollback.yaml'
|
||||
- '/ci/spec/home/lighthouse.yaml'
|
||||
|
||||
# HTTP-TEST-SERVER
|
||||
- '/ci/spec/http-test-server/audit.yaml'
|
||||
- '/ci/spec/http-test-server/deploy.yaml'
|
||||
- '/ci/spec/http-test-server/rollback.yaml'
|
||||
|
||||
# INIT-SCRIPT
|
||||
- '/ci/spec/init-script/audit.yaml'
|
||||
- '/ci/spec/init-script/deploy.yaml'
|
||||
|
||||
# LIGHTHOUSE RUNNER
|
||||
- '/ci/spec/lighthouse-runner/audit.yaml'
|
||||
- '/ci/spec/lighthouse-runner/deploy.yaml'
|
||||
|
||||
# LICENSING
|
||||
- '/ci/spec/licensing/audit.yaml'
|
||||
- '/ci/spec/licensing/build-n-test.yaml'
|
||||
- '/ci/spec/licensing/deploy.yaml'
|
||||
- '/ci/spec/licensing/rollback.yaml'
|
||||
|
||||
# PROBE
|
||||
- '/ci/spec/probe/audit.yaml'
|
||||
- '/ci/spec/probe/deploy.yaml'
|
||||
- '/ci/spec/probe/rollback.yaml'
|
||||
|
||||
# STATUS-PAGE
|
||||
- '/ci/spec/status-page/audit.yaml'
|
||||
- '/ci/spec/status-page/deploy.yaml'
|
||||
- '/ci/spec/status-page/rollback.yaml'
|
||||
|
||||
# ZAPIER
|
||||
- '/ci/spec/zapier/audit.yaml'
|
||||
- '/ci/spec/zapier/build-n-test.yaml'
|
||||
|
||||
# E2E
|
||||
- '/ci/spec/e2e/docker-compose-enterprise-test.yaml'
|
||||
- '/ci/spec/e2e/docker-compose-test.yaml'
|
||||
- '/ci/spec/e2e/kubernetes-enterprise-test.yaml'
|
||||
- '/ci/spec/e2e/kubernetes-test.yaml'
|
||||
|
||||
# SMOKE TEST
|
||||
- '/ci/spec/tests/staging.yaml'
|
||||
- '/ci/spec/tests/production.yaml'
|
||||
|
||||
# JS-SDK
|
||||
- '/ci/spec/js-sdk/audit.yaml'
|
||||
- '/ci/spec/js-sdk/build-n-test.yaml'
|
||||
- '/ci/spec/js-sdk/deploy.yaml'
|
||||
|
||||
# PHP-SDK
|
||||
- '/ci/spec/php-sdk/audit.yaml'
|
||||
- '/ci/spec/php-sdk/build-n-test.yaml'
|
||||
- '/ci/spec/php-sdk/deploy.yaml'
|
||||
|
||||
# JAVA-SDK
|
||||
- '/ci/spec/java-sdk/audit.yaml'
|
||||
- '/ci/spec/java-sdk/build-n-test.yaml'
|
||||
- '/ci/spec/java-sdk/deploy.yaml'
|
||||
|
||||
# PYTHON-SDK
|
||||
- '/ci/spec/python-sdk/audit.yaml'
|
||||
- '/ci/spec/python-sdk/build-n-test.yaml'
|
||||
- '/ci/spec/python-sdk/deploy.yaml'
|
||||
|
||||
# RUBY-SDK
|
||||
- '/ci/spec/ruby-sdk/audit.yaml'
|
||||
- '/ci/spec/ruby-sdk/build-n-test.yaml'
|
||||
- '/ci/spec/ruby-sdk/deploy.yaml'
|
||||
|
||||
# HARAKA
|
||||
- '/ci/spec/haraka/deploy.yaml'
|
||||
|
||||
# ONEUPTIME-LE-STORE
|
||||
- '/ci/spec/oneuptime-le-store/deploy.yaml'
|
||||
|
||||
# ONEUPTIME-ACME-HTTP-01
|
||||
- '/ci/spec/oneuptime-acme-http-01/deploy.yaml'
|
||||
|
||||
# ONEUPTIME-GL-MANAGER
|
||||
- '/ci/spec/oneuptime-gl-manager/deploy.yaml'
|
||||
|
||||
# Application Scanner
|
||||
- '/ci/spec/application-scanner/deploy.yaml'
|
||||
|
||||
# Script Runner
|
||||
- '/ci/spec/script-runner/audit.yaml'
|
||||
- '/ci/spec/script-runner/deploy.yaml'
|
||||
|
||||
# Container Scanner
|
||||
- '/ci/spec/container-scanner/deploy.yaml'
|
||||
|
||||
# realtime
|
||||
- '/ci/spec/realtime/audit.yaml'
|
||||
- '/ci/spec/realtime/deploy.yaml'
|
||||
- '/ci/spec/realtime/rollback.yaml'
|
||||
|
||||
# data-ingestor
|
||||
- '/ci/spec/data-ingestor/audit.yaml'
|
||||
- '/ci/spec/data-ingestor/deploy.yaml'
|
||||
- '/ci/spec/data-ingestor/rollback.yaml'
|
||||
|
||||
# probe-api
|
||||
- '/ci/spec/probe-api/audit.yaml'
|
||||
- '/ci/spec/probe-api/deploy.yaml'
|
||||
- '/ci/spec/probe-api/rollback.yaml'
|
||||
|
||||
# # GO-SDK
|
||||
# - '/ci/spec/go-sdk/audit.yaml'
|
||||
# - '/ci/spec/go-sdk/build-n-test.yaml'
|
||||
# - '/ci/spec/go-sdk/deploy.yaml'
|
||||
@@ -1,4 +0,0 @@
|
||||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
|
||||
# npm run lint
|
||||
@@ -3,7 +3,6 @@ node_modules
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
node_modules
|
||||
.vscode/
|
||||
.idea
|
||||
# testing
|
||||
@@ -14,7 +13,10 @@ node_modules
|
||||
|
||||
# misc
|
||||
.DS_Store
|
||||
|
||||
.env.local
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
env.js
|
||||
|
||||
npm-debug.log*
|
||||
@@ -49,5 +51,5 @@ LICENSE
|
||||
marketing/*/*
|
||||
licenses/*
|
||||
certifications/*
|
||||
ApiReference/public/assets/*
|
||||
JavaScriptSDK/src/cli/server-monitor/out/scripts/prettify/*
|
||||
api-docs/public/assets/*
|
||||
js-sdk/src/cli/server-monitor/out/scripts/prettify/*
|
||||
5
.vscode/extensions.json
vendored
5
.vscode/extensions.json
vendored
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"recommendations": [
|
||||
"esbenp.prettier-vscode"
|
||||
]
|
||||
}
|
||||
285
.vscode/launch.json
vendored
285
.vscode/launch.json
vendored
@@ -3,131 +3,22 @@
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"tasks": [
|
||||
"configurations": [
|
||||
{
|
||||
"type": "docker-run",
|
||||
"label": "docker-run: debug",
|
||||
"dependsOn": [
|
||||
"docker-build"
|
||||
],
|
||||
"dockerRun": {
|
||||
"command": "nest start --debug 127.0.0.1:9229"
|
||||
},
|
||||
"node": {
|
||||
"enableDebugging": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Node.js - Debug Current File",
|
||||
"type": "node",
|
||||
"restart": true,
|
||||
"autoAttachChildProcesses": true,
|
||||
"request": "launch",
|
||||
"program": "${file}"
|
||||
},
|
||||
{
|
||||
"address": "127.0.0.1",
|
||||
"localRoot": "${workspaceFolder}/DashboardAPI",
|
||||
"name": "Dashboard API: Debug with Docker",
|
||||
"address": "0.0.0.0",
|
||||
"localRoot": "${workspaceFolder}/backend",
|
||||
"name": "Backend: Debug with Docker",
|
||||
"port": 9232,
|
||||
"remoteRoot": "/usr/src/app",
|
||||
"request": "attach",
|
||||
"skipFiles": [
|
||||
"<node_internals>/**"
|
||||
],
|
||||
"type": "node",
|
||||
"restart": true,
|
||||
"autoAttachChildProcesses": true
|
||||
"type": "pwa-node"
|
||||
},
|
||||
{
|
||||
"address": "127.0.0.1",
|
||||
"localRoot": "${workspaceFolder}/TestServer",
|
||||
"name": "Test Server: Debug with Docker",
|
||||
"port": 9141,
|
||||
"remoteRoot": "/usr/src/app",
|
||||
"request": "attach",
|
||||
"skipFiles": [
|
||||
"<node_internals>/**"
|
||||
],
|
||||
"type": "node",
|
||||
"restart": true,
|
||||
"autoAttachChildProcesses": true
|
||||
},
|
||||
{
|
||||
"address": "127.0.0.1",
|
||||
"localRoot": "${workspaceFolder}/Probe",
|
||||
"name": "Dashboard API: Debug with Docker",
|
||||
"port": 9655,
|
||||
"remoteRoot": "/usr/src/app",
|
||||
"request": "attach",
|
||||
"skipFiles": [
|
||||
"<node_internals>/**"
|
||||
],
|
||||
"type": "node",
|
||||
"restart": true,
|
||||
"autoAttachChildProcesses": true
|
||||
},
|
||||
{
|
||||
"address": "127.0.0.1",
|
||||
"localRoot": "${workspaceFolder}/ProbeAPI",
|
||||
"name": "Probe API: Debug with Docker",
|
||||
"port": 9932,
|
||||
"remoteRoot": "/usr/src/app",
|
||||
"request": "attach",
|
||||
"skipFiles": [
|
||||
"<node_internals>/**"
|
||||
],
|
||||
"type": "node",
|
||||
"restart": true,
|
||||
"autoAttachChildProcesses": true
|
||||
},
|
||||
{
|
||||
"address": "127.0.0.1",
|
||||
"localRoot": "${workspaceFolder}/Workflow",
|
||||
"name": "Workflow: Debug with Docker",
|
||||
"port": 9212,
|
||||
"remoteRoot": "/usr/src/app",
|
||||
"request": "attach",
|
||||
"skipFiles": [
|
||||
"<node_internals>/**"
|
||||
],
|
||||
"type": "node",
|
||||
"restart": true,
|
||||
"autoAttachChildProcesses": true
|
||||
},
|
||||
{
|
||||
"address": "127.0.0.1",
|
||||
"localRoot": "${workspaceFolder}/data-ingestor",
|
||||
"name": "Data Ingestor: Debug with Docker",
|
||||
"port": 9338,
|
||||
"remoteRoot": "/usr/src/app",
|
||||
"request": "attach",
|
||||
"skipFiles": [
|
||||
"<node_internals>/**"
|
||||
],
|
||||
"type": "node",
|
||||
"restart": true,
|
||||
"autoAttachChildProcesses": true
|
||||
},
|
||||
{
|
||||
"address": "127.0.0.1",
|
||||
"localRoot": "${workspaceFolder}/Notification",
|
||||
"name": "Notification: Debug with Docker",
|
||||
"port": 9111,
|
||||
"remoteRoot": "/usr/src/app",
|
||||
"request": "attach",
|
||||
"skipFiles": [
|
||||
"<node_internals>/**"
|
||||
],
|
||||
"type": "node",
|
||||
"restart": true,
|
||||
"autoAttachChildProcesses": true
|
||||
},
|
||||
{
|
||||
"address": "127.0.0.1",
|
||||
"localRoot": "${workspaceFolder}/Realtime",
|
||||
"address": "0.0.0.0",
|
||||
"localRoot": "${workspaceFolder}/realtime",
|
||||
"name": "Realtime: Debug with Docker",
|
||||
"port": 9250,
|
||||
"remoteRoot": "/usr/src/app",
|
||||
@@ -135,41 +26,11 @@
|
||||
"skipFiles": [
|
||||
"<node_internals>/**"
|
||||
],
|
||||
"type": "node",
|
||||
"restart": true,
|
||||
"autoAttachChildProcesses": true
|
||||
"type": "pwa-node"
|
||||
},
|
||||
{
|
||||
"address": "127.0.0.1",
|
||||
"localRoot": "${workspaceFolder}/Workers",
|
||||
"name": "Workers: Debug with Docker",
|
||||
"port": 9654,
|
||||
"remoteRoot": "/usr/src/app",
|
||||
"request": "attach",
|
||||
"skipFiles": [
|
||||
"<node_internals>/**"
|
||||
],
|
||||
"type": "node",
|
||||
"restart": true,
|
||||
"autoAttachChildProcesses": true
|
||||
},
|
||||
{
|
||||
"address": "127.0.0.1",
|
||||
"localRoot": "${workspaceFolder}/StatusPage",
|
||||
"name": "Status Page API${cwd}: Debug with Docker",
|
||||
"port": 9764,
|
||||
"remoteRoot": "/usr/src/app",
|
||||
"request": "attach",
|
||||
"skipFiles": [
|
||||
"<node_internals>/**"
|
||||
],
|
||||
"type": "node",
|
||||
"restart": true,
|
||||
"autoAttachChildProcesses": true
|
||||
},
|
||||
{
|
||||
"address": "127.0.0.1",
|
||||
"localRoot": "${workspaceFolder}/ProbeAPI",
|
||||
"address": "0.0.0.0",
|
||||
"localRoot": "${workspaceFolder}/probe-api",
|
||||
"name": "Probe API: Debug with Docker",
|
||||
"port": 9251,
|
||||
"remoteRoot": "/usr/src/app",
|
||||
@@ -177,68 +38,10 @@
|
||||
"skipFiles": [
|
||||
"<node_internals>/**"
|
||||
],
|
||||
"type": "node",
|
||||
"restart": true,
|
||||
"autoAttachChildProcesses": true
|
||||
"type": "pwa-node"
|
||||
},
|
||||
{
|
||||
"address": "127.0.0.1",
|
||||
"localRoot": "${workspaceFolder}/Identity",
|
||||
"name": "Identity: Debug with Docker",
|
||||
"port": 9132,
|
||||
"remoteRoot": "/usr/src/app",
|
||||
"request": "attach",
|
||||
"skipFiles": [
|
||||
"<node_internals>/**"
|
||||
],
|
||||
"type": "node",
|
||||
"restart": true,
|
||||
"autoAttachChildProcesses": true
|
||||
},
|
||||
{
|
||||
"address": "127.0.0.1",
|
||||
"localRoot": "${workspaceFolder}/Identity",
|
||||
"name": "File: Debug with Docker",
|
||||
"port": 9012,
|
||||
"remoteRoot": "/usr/src/app",
|
||||
"request": "attach",
|
||||
"skipFiles": [
|
||||
"<node_internals>/**"
|
||||
],
|
||||
"type": "node",
|
||||
"restart": true,
|
||||
"autoAttachChildProcesses": true
|
||||
},
|
||||
{
|
||||
"address": "127.0.0.1",
|
||||
"localRoot": "${workspaceFolder}/Alert",
|
||||
"name": "Alert: Debug with Docker",
|
||||
"port": 9133,
|
||||
"remoteRoot": "/usr/src/app",
|
||||
"request": "attach",
|
||||
"skipFiles": [
|
||||
"<node_internals>/**"
|
||||
],
|
||||
"type": "node",
|
||||
"restart": true,
|
||||
"autoAttachChildProcesses": true
|
||||
},
|
||||
{
|
||||
"address": "127.0.0.1",
|
||||
"localRoot": "${workspaceFolder}/Alert",
|
||||
"name": "Integration: Debug with Docker",
|
||||
"port": 9134,
|
||||
"remoteRoot": "/usr/src/app",
|
||||
"request": "attach",
|
||||
"skipFiles": [
|
||||
"<node_internals>/**"
|
||||
],
|
||||
"type": "node",
|
||||
"restart": true,
|
||||
"autoAttachChildProcesses": true
|
||||
},
|
||||
{
|
||||
"address": "127.0.0.1",
|
||||
"address": "0.0.0.0",
|
||||
"localRoot": "${workspaceFolder}/licensing",
|
||||
"name": "Licensing: Debug with Docker",
|
||||
"port": 9233,
|
||||
@@ -247,13 +50,11 @@
|
||||
"skipFiles": [
|
||||
"<node_internals>/**"
|
||||
],
|
||||
"type": "node",
|
||||
"restart": true,
|
||||
"autoAttachChildProcesses": true
|
||||
"type": "pwa-node"
|
||||
},
|
||||
{
|
||||
"address": "127.0.0.1",
|
||||
"localRoot": "${workspaceFolder}/HttpTestServer",
|
||||
"address": "0.0.0.0",
|
||||
"localRoot": "${workspaceFolder}/http-test-server",
|
||||
"name": "HTTP Test Server: Debug with Docker",
|
||||
"port": 9234,
|
||||
"remoteRoot": "/usr/src/app",
|
||||
@@ -261,12 +62,10 @@
|
||||
"skipFiles": [
|
||||
"<node_internals>/**"
|
||||
],
|
||||
"type": "node",
|
||||
"restart": true,
|
||||
"autoAttachChildProcesses": true
|
||||
"type": "pwa-node"
|
||||
},
|
||||
{
|
||||
"address": "127.0.0.1",
|
||||
"address": "0.0.0.0",
|
||||
"localRoot": "${workspaceFolder}/home",
|
||||
"name": "Home: Debug with Docker",
|
||||
"port": 9235,
|
||||
@@ -275,12 +74,10 @@
|
||||
"skipFiles": [
|
||||
"<node_internals>/**"
|
||||
],
|
||||
"type": "node",
|
||||
"restart": true,
|
||||
"autoAttachChildProcesses": true
|
||||
"type": "pwa-node"
|
||||
},
|
||||
{
|
||||
"address": "127.0.0.1",
|
||||
"address": "0.0.0.0",
|
||||
"localRoot": "${workspaceFolder}/script-runnner",
|
||||
"name": "Script Runner: Debug with Docker",
|
||||
"port": 9236,
|
||||
@@ -289,13 +86,11 @@
|
||||
"skipFiles": [
|
||||
"<node_internals>/**"
|
||||
],
|
||||
"type": "node",
|
||||
"restart": true,
|
||||
"autoAttachChildProcesses": true
|
||||
"type": "pwa-node"
|
||||
},
|
||||
{
|
||||
"address": "127.0.0.1",
|
||||
"localRoot": "${workspaceFolder}/InitScript",
|
||||
"address": "0.0.0.0",
|
||||
"localRoot": "${workspaceFolder}/init-script",
|
||||
"name": "Init Script: Debug with Docker",
|
||||
"port": 9237,
|
||||
"remoteRoot": "/usr/src/app",
|
||||
@@ -303,12 +98,10 @@
|
||||
"skipFiles": [
|
||||
"<node_internals>/**"
|
||||
],
|
||||
"type": "node",
|
||||
"restart": true,
|
||||
"autoAttachChildProcesses": true
|
||||
"type": "pwa-node"
|
||||
},
|
||||
{
|
||||
"address": "127.0.0.1",
|
||||
"address": "0.0.0.0",
|
||||
"localRoot": "${workspaceFolder}/probe",
|
||||
"name": "Probe: Debug with Docker",
|
||||
"port": 9238,
|
||||
@@ -317,35 +110,7 @@
|
||||
"skipFiles": [
|
||||
"<node_internals>/**"
|
||||
],
|
||||
"type": "node",
|
||||
"restart": true,
|
||||
"autoAttachChildProcesses": true
|
||||
},
|
||||
{
|
||||
"name": "CommonServer: Debug Tests",
|
||||
"type": "node",
|
||||
"restart": true,
|
||||
"autoAttachChildProcesses": true,
|
||||
"request": "launch",
|
||||
"cwd": "${workspaceRoot}/CommonServer",
|
||||
"runtimeExecutable": "npm",
|
||||
"runtimeArgs": [
|
||||
"run-script",
|
||||
"debug:test"
|
||||
],
|
||||
},
|
||||
{
|
||||
"name": "Accounts: Debug Local Files",
|
||||
"type": "node",
|
||||
"restart": true,
|
||||
"autoAttachChildProcesses": true,
|
||||
"request": "launch",
|
||||
"cwd": "${workspaceRoot}/Accounts",
|
||||
"runtimeExecutable": "npm",
|
||||
"runtimeArgs": [
|
||||
"run-script",
|
||||
"dev"
|
||||
],
|
||||
"type": "pwa-node"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,56 +0,0 @@
|
||||
.git
|
||||
|
||||
node_modules
|
||||
# See https://help.github.com/ignore-files/ for more about ignoring files.
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
node_modules
|
||||
|
||||
.idea
|
||||
# testing
|
||||
/coverage
|
||||
|
||||
# production
|
||||
/build
|
||||
|
||||
# misc
|
||||
.DS_Store
|
||||
|
||||
env.js
|
||||
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
yarn.lock
|
||||
Untitled-1
|
||||
*.local.sh
|
||||
*.local.yaml
|
||||
run
|
||||
stop
|
||||
|
||||
nohup.out*
|
||||
|
||||
encrypted-credentials.tar
|
||||
encrypted-credentials/
|
||||
|
||||
_README.md
|
||||
|
||||
# Important Add production values to gitignore.
|
||||
values-saas-production.yaml
|
||||
kubernetes/values-saas-production.yaml
|
||||
|
||||
/private
|
||||
|
||||
/tls_cert.pem
|
||||
/tls_key.pem
|
||||
/keys
|
||||
|
||||
temp_readme.md
|
||||
|
||||
tests/coverage
|
||||
|
||||
settings.json
|
||||
|
||||
GoSDK/tester/
|
||||
@@ -1 +0,0 @@
|
||||
PORT=3003
|
||||
@@ -1 +0,0 @@
|
||||
PORT={{ .Env.ACCOUNTS_PORT }}
|
||||
23
Accounts/.gitignore
vendored
23
Accounts/.gitignore
vendored
@@ -1,23 +0,0 @@
|
||||
# See https://help.github.com/ignore-files/ for more about ignoring files.
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
node_modules
|
||||
.idea
|
||||
# testing
|
||||
/coverage
|
||||
|
||||
# production
|
||||
/build
|
||||
/dist
|
||||
|
||||
# misc
|
||||
.DS_Store
|
||||
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
yarn.lock
|
||||
Untitled-1
|
||||
.eslintcache
|
||||
@@ -1,85 +0,0 @@
|
||||
#
|
||||
# Accounts Dockerfile
|
||||
#
|
||||
|
||||
# Pull base image nodejs image.
|
||||
FROM node:18.13.0-alpine
|
||||
USER root
|
||||
RUN mkdir /tmp/npm && chmod 2777 /tmp/npm && chown 1000:1000 /tmp/npm && npm config set cache /tmp/npm --global
|
||||
|
||||
|
||||
# Install bash.
|
||||
RUN apk update && apk add bash && apk add curl
|
||||
|
||||
#Use bash shell by default
|
||||
SHELL ["/bin/bash", "-c"]
|
||||
|
||||
|
||||
RUN mkdir /usr/src
|
||||
|
||||
# Install common
|
||||
RUN mkdir /usr/src/Common
|
||||
WORKDIR /usr/src/Common
|
||||
COPY ./Common/package*.json /usr/src/Common/
|
||||
RUN npm install
|
||||
COPY ./Common /usr/src/Common
|
||||
|
||||
|
||||
|
||||
# Install Model
|
||||
RUN mkdir /usr/src/Model
|
||||
WORKDIR /usr/src/Model
|
||||
COPY ./Model/package*.json /usr/src/Model/
|
||||
RUN npm install
|
||||
COPY ./Model /usr/src/Model
|
||||
|
||||
|
||||
|
||||
# Install CommonServer
|
||||
RUN mkdir /usr/src/CommonServer
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY ./CommonServer/package*.json /usr/src/CommonServer/
|
||||
RUN npm install
|
||||
COPY ./CommonServer /usr/src/CommonServer
|
||||
|
||||
|
||||
|
||||
|
||||
# Install CommonUI
|
||||
RUN mkdir /usr/src/CommonUI
|
||||
WORKDIR /usr/src/CommonUI
|
||||
COPY ./CommonUI/package*.json /usr/src/CommonUI/
|
||||
RUN npm install --force
|
||||
COPY ./CommonUI /usr/src/CommonUI
|
||||
|
||||
|
||||
|
||||
#SET ENV Variables
|
||||
ENV PRODUCTION=true
|
||||
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
|
||||
|
||||
RUN mkdir /usr/src/app
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# Install app dependencies
|
||||
COPY ./Accounts/package*.json /usr/src/app/
|
||||
RUN npm install
|
||||
|
||||
# Expose ports.
|
||||
# - 3003: accounts
|
||||
EXPOSE 3003
|
||||
|
||||
|
||||
|
||||
{{ if eq .Env.ENVIRONMENT "development" }}
|
||||
#Run the app
|
||||
CMD [ "npm", "run", "dev" ]
|
||||
{{ else }}
|
||||
# Copy app source
|
||||
COPY ./Accounts /usr/src/app
|
||||
# Bundle app source
|
||||
RUN npm run build
|
||||
#Run the app
|
||||
CMD [ "npm", "start" ]
|
||||
{{ end }}
|
||||
@@ -1,46 +0,0 @@
|
||||
# Getting Started with Create React App
|
||||
|
||||
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
|
||||
|
||||
## Available Scripts
|
||||
|
||||
In the project directory, you can run:
|
||||
|
||||
### `npm start`
|
||||
|
||||
Runs the app in the development mode.\
|
||||
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
|
||||
|
||||
The page will reload if you make edits.\
|
||||
You will also see any lint errors in the console.
|
||||
|
||||
### `npm test`
|
||||
|
||||
Launches the test runner in the interactive watch mode.\
|
||||
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
|
||||
|
||||
### `npm run build`
|
||||
|
||||
Builds the app for production to the `build` folder.\
|
||||
It correctly bundles React in production mode and optimizes the build for the best performance.
|
||||
|
||||
The build is minified and the filenames include the hashes.\
|
||||
Your app is ready to be deployed!
|
||||
|
||||
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
|
||||
|
||||
### `npm run eject`
|
||||
|
||||
**Note: this is a one-way operation. Once you `eject`, you can’t go back!**
|
||||
|
||||
If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
|
||||
|
||||
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
|
||||
|
||||
You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
|
||||
|
||||
## Learn More
|
||||
|
||||
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
|
||||
|
||||
To learn React, check out the [React documentation](https://reactjs.org/).
|
||||
@@ -1,22 +0,0 @@
|
||||
import App from 'CommonServer/Utils/StartServer';
|
||||
|
||||
import Express, { ExpressApplication } from 'CommonServer/Utils/Express';
|
||||
import logger from 'CommonServer/Utils/Logger';
|
||||
|
||||
export const APP_NAME: string = 'accounts';
|
||||
|
||||
const app: ExpressApplication = Express.getExpressApp();
|
||||
|
||||
const init: Function = async (): Promise<void> => {
|
||||
try {
|
||||
// init the app
|
||||
await App(APP_NAME, undefined, true);
|
||||
} catch (err) {
|
||||
logger.error('App Init Failed:');
|
||||
logger.error(err);
|
||||
}
|
||||
};
|
||||
|
||||
init();
|
||||
|
||||
export default app;
|
||||
4
Accounts/index.d.ts
vendored
4
Accounts/index.d.ts
vendored
@@ -1,4 +0,0 @@
|
||||
declare module '*.png';
|
||||
declare module '*.svg';
|
||||
declare module '*.jpg';
|
||||
declare module '*.gif';
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"watch": ["webpack.config.js"],
|
||||
"exec": "export DEBUG=express:* && webpack-dev-server --port=3003 --mode=development"
|
||||
}
|
||||
27572
Accounts/package-lock.json
generated
27572
Accounts/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,65 +0,0 @@
|
||||
{
|
||||
"name": "accounts",
|
||||
"version": "0.1.0",
|
||||
"private": false,
|
||||
"dependencies": {
|
||||
"Common": "file:../Common",
|
||||
"CommonServer": "file:../CommonServer",
|
||||
"CommonUI": "file:../CommonUI",
|
||||
"crypto-js": "^4.1.1",
|
||||
"formik": "^2.2.9",
|
||||
"Model": "file:../Model",
|
||||
"react": "^18.1.0",
|
||||
"react-dom": "^18.1.0",
|
||||
"react-router": "^6.3.0",
|
||||
"react-router-dom": "^6.3.0",
|
||||
"react-scripts": "5.0.1",
|
||||
"the-new-css-reset": "^1.7.3",
|
||||
"typescript": "^4.6.4"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "npx nodemon",
|
||||
"build": "webpack build --mode=production",
|
||||
"test": "",
|
||||
"compile": "tsc",
|
||||
"start": "node --require ts-node/register Serve.ts",
|
||||
"audit": "npm audit --audit-level=low",
|
||||
"preinstall": "npx npm-force-resolutions || echo 'No package-lock.json file. Skipping force resolutions'",
|
||||
"dep-check": "depcheck ./ --skip-missing=true'"
|
||||
},
|
||||
"browserslist": {
|
||||
"production": [
|
||||
">0.2%",
|
||||
"not dead",
|
||||
"not op_mini all"
|
||||
],
|
||||
"development": [
|
||||
"last 1 chrome version",
|
||||
"last 1 firefox version",
|
||||
"last 1 safari version"
|
||||
]
|
||||
},
|
||||
"devDependencies": {
|
||||
"@testing-library/jest-dom": "^5.16.4",
|
||||
"@testing-library/react": "^13.2.0",
|
||||
"@testing-library/user-event": "^13.5.0",
|
||||
"@types/jest": "^27.5.1",
|
||||
"@types/node": "^16.11.35",
|
||||
"@types/react": "^18.0.9",
|
||||
"@types/react-dom": "^18.0.4",
|
||||
"@types/react-router-dom": "^5.3.3",
|
||||
"css-loader": "^6.7.1",
|
||||
"customize-cra": "^1.0.0",
|
||||
"dotenv-webpack": "^7.1.0",
|
||||
"nodemon": "^2.0.20",
|
||||
"process": "0.11.10",
|
||||
"react-app-rewired": "^2.2.1",
|
||||
"sass": "^1.51.0",
|
||||
"sass-loader": "^12.6.0",
|
||||
"ts-loader": "^9.3.0",
|
||||
"ts-node": "^10.9.1",
|
||||
"webpack": "^5.76.0",
|
||||
"webpack-cli": "^4.9.2",
|
||||
"webpack-dev-server": "^4.9.0"
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
|
||||
$(document).ready(function() {
|
||||
setTimeout(()=>{
|
||||
|
||||
$('div.bar').tipsy({
|
||||
gravity: 'se',
|
||||
html: true,
|
||||
offset: 1
|
||||
});
|
||||
},1000);
|
||||
});
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 3.8 KiB |
@@ -1,137 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta name="theme-color" content="#000000" />
|
||||
<meta name="description" content="Web site created using create-react-app" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta charSet='utf-8' />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="theme-color" content="#000000">
|
||||
<meta name="slack-app-id" content="ACVBMTPJQ">
|
||||
<meta name="description" content="This is the login page for OneUptime Dashboard">
|
||||
|
||||
|
||||
<!-- Google Tag Manager -->
|
||||
<script>(function (w, d, s, l, i) {
|
||||
w[l] = w[l] || []; w[l].push({
|
||||
'gtm.start':
|
||||
new Date().getTime(), event: 'gtm.js'
|
||||
}); var f = d.getElementsByTagName(s)[0],
|
||||
j = d.createElement(s), dl = l != 'dataLayer' ? '&l=' + l : ''; j.async = true; j.src =
|
||||
'https://www.googletagmanager.com/gtm.js?id=' + i + dl; f.parentNode.insertBefore(j, f);
|
||||
})(window, document, 'script', 'dataLayer', 'GTM-PKQD5WH');</script>
|
||||
<!-- End Google Tag Manager -->
|
||||
|
||||
<link rel="manifest" href="/accounts/assets/img/favicons/ma">
|
||||
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/accounts/assets/img/favicons/apple-touch-icon.png">
|
||||
<link rel="shortcut icon" href="/accounts/assets/img/favicons/favicon.ico">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/accounts/assets/img/favicons/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="194x194" href="/accounts/assets/img/favicons/favicon-194x194.png">
|
||||
<link rel="icon" type="image/png" sizes="192x192" href="/accounts/assets/img/favicons/android-chrome-192x192.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="/accounts/assets/img/favicons/favicon-16x16.png">
|
||||
<link rel="mask-icon" href="/accounts/assets/img/favicons/safari-pinned-tab.svg" color="#5bbad5">
|
||||
<meta name="msapplication-TileColor" content="#121212">
|
||||
<meta name="msapplication-TileImage" content="/accounts/assets/img/favicons/mstile-144x144.png">
|
||||
<meta name="theme-color" content="#121212">
|
||||
|
||||
<script src="/accounts/env.js"></script>
|
||||
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap" rel="stylesheet">
|
||||
<style>
|
||||
* {
|
||||
font-family: Inter;
|
||||
}
|
||||
|
||||
|
||||
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
|
||||
background: transparent;
|
||||
bottom: 0;
|
||||
color: transparent;
|
||||
cursor: pointer;
|
||||
height: auto;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
input[type="date"]::-webkit-calendar-picker-indicator {
|
||||
background: transparent;
|
||||
bottom: 0;
|
||||
color: transparent;
|
||||
cursor: pointer;
|
||||
height: auto;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
width: auto;
|
||||
}
|
||||
</style>
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
|
||||
<title>OneUptime Accounts</title>
|
||||
|
||||
|
||||
<!-- Preload light, regular, medium and bold, which are fonts that are used on home -->
|
||||
<link rel="preload" href="/accounts/assets/fonts/camphor/font1.woff2" as="font" type="font/woff2" crossorigin="">
|
||||
<link rel="preload" href="/accounts/assets/fonts/camphor/font2.woff2" as="font" type="font/woff2" crossorigin="">
|
||||
<link rel="preload" href="/accounts/assets/fonts/camphor/font3.woff2" as="font" type="font/woff2" crossorigin="">
|
||||
<link rel="preload" href="/accounts/assets/fonts/camphor/font4.woff2" as="font" type="font/woff2" crossorigin="">
|
||||
|
||||
|
||||
<!--
|
||||
manifest.json provides metadata used when your web app is installed on a
|
||||
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
|
||||
-->
|
||||
<!--
|
||||
Notice the use of %PUBLIC_URL% in the tags above.
|
||||
It will be replaced with the URL of the `public` folder during the build.
|
||||
Only files inside the `public` folder can be referenced from the HTML.
|
||||
|
||||
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
|
||||
work correctly both with client-side routing and a non-root public URL.
|
||||
Learn how to configure a non-root public URL by running `npm run build`.
|
||||
-->
|
||||
<title>OneUptime | Account</title>
|
||||
</head>
|
||||
|
||||
<body class="h-full bg-gray-50">
|
||||
<!-- Google Tag Manager (noscript) -->
|
||||
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-PKQD5WH" height="0" width="0"
|
||||
style="display:none;visibility:hidden"></iframe></noscript>
|
||||
<!-- End Google Tag Manager (noscript) -->
|
||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||
<div id="root"></div>
|
||||
<!--
|
||||
This HTML file is a template.
|
||||
If you open it directly in the browser, you will see an empty page.
|
||||
|
||||
You can add webfonts, meta tags, or analytics to this file.
|
||||
The build step will place the bundled scripts into the <body> tag.
|
||||
|
||||
To begin the development, run `npm start` or `yarn start`.
|
||||
To create a production bundle, use `npm run build` or `yarn build`.
|
||||
-->
|
||||
<script src="/accounts/dist/bundle.js"></script>
|
||||
<script>
|
||||
tailwind.config = {
|
||||
theme: {
|
||||
extend: {
|
||||
colors: {
|
||||
primary: '#000000'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 841.9 595.3"><g fill="#61DAFB"><path d="M666.3 296.5c0-32.5-40.7-63.3-103.1-82.4 14.4-63.6 8-114.2-20.2-130.4-6.5-3.8-14.1-5.6-22.4-5.6v22.3c4.6 0 8.3.9 11.4 2.6 13.6 7.8 19.5 37.5 14.9 75.7-1.1 9.4-2.9 19.3-5.1 29.4-19.6-4.8-41-8.5-63.5-10.9-13.5-18.5-27.5-35.3-41.6-50 32.6-30.3 63.2-46.9 84-46.9V78c-27.5 0-63.5 19.6-99.9 53.6-36.4-33.8-72.4-53.2-99.9-53.2v22.3c20.7 0 51.4 16.5 84 46.6-14 14.7-28 31.4-41.3 49.9-22.6 2.4-44 6.1-63.6 11-2.3-10-4-19.7-5.2-29-4.7-38.2 1.1-67.9 14.6-75.8 3-1.8 6.9-2.6 11.5-2.6V78.5c-8.4 0-16 1.8-22.6 5.6-28.1 16.2-34.4 66.7-19.9 130.1-62.2 19.2-102.7 49.9-102.7 82.3 0 32.5 40.7 63.3 103.1 82.4-14.4 63.6-8 114.2 20.2 130.4 6.5 3.8 14.1 5.6 22.5 5.6 27.5 0 63.5-19.6 99.9-53.6 36.4 33.8 72.4 53.2 99.9 53.2 8.4 0 16-1.8 22.6-5.6 28.1-16.2 34.4-66.7 19.9-130.1 62-19.1 102.5-49.9 102.5-82.3zm-130.2-66.7c-3.7 12.9-8.3 26.2-13.5 39.5-4.1-8-8.4-16-13.1-24-4.6-8-9.5-15.8-14.4-23.4 14.2 2.1 27.9 4.7 41 7.9zm-45.8 106.5c-7.8 13.5-15.8 26.3-24.1 38.2-14.9 1.3-30 2-45.2 2-15.1 0-30.2-.7-45-1.9-8.3-11.9-16.4-24.6-24.2-38-7.6-13.1-14.5-26.4-20.8-39.8 6.2-13.4 13.2-26.8 20.7-39.9 7.8-13.5 15.8-26.3 24.1-38.2 14.9-1.3 30-2 45.2-2 15.1 0 30.2.7 45 1.9 8.3 11.9 16.4 24.6 24.2 38 7.6 13.1 14.5 26.4 20.8 39.8-6.3 13.4-13.2 26.8-20.7 39.9zm32.3-13c5.4 13.4 10 26.8 13.8 39.8-13.1 3.2-26.9 5.9-41.2 8 4.9-7.7 9.8-15.6 14.4-23.7 4.6-8 8.9-16.1 13-24.1zM421.2 430c-9.3-9.6-18.6-20.3-27.8-32 9 .4 18.2.7 27.5.7 9.4 0 18.7-.2 27.8-.7-9 11.7-18.3 22.4-27.5 32zm-74.4-58.9c-14.2-2.1-27.9-4.7-41-7.9 3.7-12.9 8.3-26.2 13.5-39.5 4.1 8 8.4 16 13.1 24 4.7 8 9.5 15.8 14.4 23.4zM420.7 163c9.3 9.6 18.6 20.3 27.8 32-9-.4-18.2-.7-27.5-.7-9.4 0-18.7.2-27.8.7 9-11.7 18.3-22.4 27.5-32zm-74 58.9c-4.9 7.7-9.8 15.6-14.4 23.7-4.6 8-8.9 16-13 24-5.4-13.4-10-26.8-13.8-39.8 13.1-3.1 26.9-5.8 41.2-7.9zm-90.5 125.2c-35.4-15.1-58.3-34.9-58.3-50.6 0-15.7 22.9-35.6 58.3-50.6 8.6-3.7 18-7 27.7-10.1 5.7 19.6 13.2 40 22.5 60.9-9.2 20.8-16.6 41.1-22.2 60.6-9.9-3.1-19.3-6.5-28-10.2zM310 490c-13.6-7.8-19.5-37.5-14.9-75.7 1.1-9.4 2.9-19.3 5.1-29.4 19.6 4.8 41 8.5 63.5 10.9 13.5 18.5 27.5 35.3 41.6 50-32.6 30.3-63.2 46.9-84 46.9-4.5-.1-8.3-1-11.3-2.7zm237.2-76.2c4.7 38.2-1.1 67.9-14.6 75.8-3 1.8-6.9 2.6-11.5 2.6-20.7 0-51.4-16.5-84-46.6 14-14.7 28-31.4 41.3-49.9 22.6-2.4 44-6.1 63.6-11 2.3 10.1 4.1 19.8 5.2 29.1zm38.5-66.7c-8.6 3.7-18 7-27.7 10.1-5.7-19.6-13.2-40-22.5-60.9 9.2-20.8 16.6-41.1 22.2-60.6 9.9 3.1 19.3 6.5 28.1 10.2 35.4 15.1 58.3 34.9 58.3 50.6-.1 15.7-23 35.6-58.4 50.6zM320.8 78.4z"/><circle cx="420.9" cy="296.5" r="45.7"/><path d="M520.5 78.1z"/></g></svg>
|
||||
|
Before Width: | Height: | Size: 2.6 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 5.2 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 9.4 KiB |
@@ -1,25 +0,0 @@
|
||||
{
|
||||
"short_name": "React App",
|
||||
"name": "Create React App Sample",
|
||||
"icons": [
|
||||
{
|
||||
"src": "./assets/img/favicons/favicon.ico",
|
||||
"sizes": "64x64 32x32 24x24 16x16",
|
||||
"type": "image/x-icon"
|
||||
},
|
||||
{
|
||||
"src": "logo192.png",
|
||||
"type": "image/png",
|
||||
"sizes": "192x192"
|
||||
},
|
||||
{
|
||||
"src": "logo512.png",
|
||||
"type": "image/png",
|
||||
"sizes": "512x512"
|
||||
}
|
||||
],
|
||||
"start_url": ".",
|
||||
"display": "standalone",
|
||||
"theme_color": "#000000",
|
||||
"background_color": "#ffffff"
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
# https://www.robotstxt.org/robotstxt.html
|
||||
User-agent: *
|
||||
Disallow:
|
||||
@@ -1,47 +0,0 @@
|
||||
import React, { ReactElement } from 'react';
|
||||
import {
|
||||
Routes,
|
||||
Route,
|
||||
useNavigate,
|
||||
useLocation,
|
||||
useParams,
|
||||
} from 'react-router-dom';
|
||||
import LoginPage from './Pages/Login';
|
||||
import NotFound from './Pages/NotFound';
|
||||
import ForgotPasswordPage from './Pages/ForgotPassword';
|
||||
import RegisterPage from './Pages/Register';
|
||||
import Navigation from 'CommonUI/src/Utils/Navigation';
|
||||
import VerifyEmail from './Pages/VerifyEmail';
|
||||
import ResetPasswordPage from './Pages/ResetPassword';
|
||||
|
||||
function App(): ReactElement {
|
||||
Navigation.setNavigateHook(useNavigate());
|
||||
Navigation.setLocation(useLocation());
|
||||
Navigation.setParams(useParams());
|
||||
|
||||
return (
|
||||
<div className="m-auto h-screen">
|
||||
<Routes>
|
||||
<Route path="/accounts" element={<LoginPage />} />
|
||||
<Route path="/accounts/login" element={<LoginPage />} />
|
||||
<Route
|
||||
path="/accounts/forgot-password"
|
||||
element={<ForgotPasswordPage />}
|
||||
/>
|
||||
<Route
|
||||
path="/accounts/reset-password/:token"
|
||||
element={<ResetPasswordPage />}
|
||||
/>
|
||||
<Route path="/accounts/register" element={<RegisterPage />} />
|
||||
<Route
|
||||
path="/accounts/verify-email/:token"
|
||||
element={<VerifyEmail />}
|
||||
/>
|
||||
{/* 👇️ only match this when no other routes match */}
|
||||
<Route path="*" element={<NotFound />} />
|
||||
</Routes>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default App;
|
||||
@@ -1,20 +0,0 @@
|
||||
import React, { FunctionComponent } from 'react';
|
||||
import { Link } from 'react-router-dom';
|
||||
|
||||
const Footer: FunctionComponent = () => {
|
||||
return (
|
||||
<div className="footer">
|
||||
<p>
|
||||
<Link to="/">© OneUptime</Link>
|
||||
</p>
|
||||
<p>
|
||||
<Link to="/">Contact</Link>
|
||||
</p>
|
||||
<p>
|
||||
<Link to="/">Privacy & terms</Link>
|
||||
</p>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default Footer;
|
||||
@@ -1,14 +0,0 @@
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom/client';
|
||||
import App from './App';
|
||||
import { BrowserRouter } from 'react-router-dom';
|
||||
|
||||
const root: any = ReactDOM.createRoot(
|
||||
document.getElementById('root') as HTMLElement
|
||||
);
|
||||
|
||||
root.render(
|
||||
<BrowserRouter>
|
||||
<App />
|
||||
</BrowserRouter>
|
||||
);
|
||||
@@ -1,99 +0,0 @@
|
||||
import React, { FunctionComponent, useState } from 'react';
|
||||
import ModelForm, { FormType } from 'CommonUI/src/Components/Forms/ModelForm';
|
||||
import User from 'Model/Models/User';
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import OneUptimeLogo from 'CommonUI/src/Images/logos/OneUptimeSVG/3-transparent.svg';
|
||||
import Link from 'CommonUI/src/Components/Link/Link';
|
||||
import { FORGOT_PASSWORD_API_URL } from '../Utils/ApiPaths';
|
||||
import URL from 'Common/Types/API/URL';
|
||||
|
||||
const ForgotPassword: FunctionComponent = () => {
|
||||
const apiUrl: URL = FORGOT_PASSWORD_API_URL;
|
||||
|
||||
const [isSuccess, setIsSuccess] = useState<boolean>(false);
|
||||
|
||||
return (
|
||||
<div className="flex min-h-full flex-col justify-center py-12 sm:px-6 lg:px-8">
|
||||
<div className="sm:mx-auto sm:w-full sm:max-w-md">
|
||||
<img
|
||||
className="mx-auto h-12 w-auto"
|
||||
src={OneUptimeLogo}
|
||||
alt="Your Company"
|
||||
/>
|
||||
<h2 className="mt-6 text-center text-2xl tracking-tight text-gray-900">
|
||||
Forgot your password
|
||||
</h2>
|
||||
|
||||
{!isSuccess && (
|
||||
<p className="mt-2 text-center text-sm text-gray-600">
|
||||
Please enter your email and the password reset link will
|
||||
be sent to you.
|
||||
</p>
|
||||
)}
|
||||
|
||||
{isSuccess && (
|
||||
<p className="mt-2 text-center text-sm text-gray-600">
|
||||
We have emailed you the password reset link. Please do
|
||||
not forget to check spam.
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div className="mt-8 sm:mx-auto sm:w-full sm:max-w-md">
|
||||
{!isSuccess && (
|
||||
<div className="bg-white py-8 px-4 shadow sm:rounded-lg sm:px-10">
|
||||
<ModelForm<User>
|
||||
modelType={User}
|
||||
name="Forgot Password"
|
||||
id="login-form"
|
||||
apiUrl={apiUrl}
|
||||
fields={[
|
||||
{
|
||||
field: {
|
||||
email: true,
|
||||
},
|
||||
title: 'Email',
|
||||
fieldType: FormFieldSchemaType.Email,
|
||||
required: true,
|
||||
},
|
||||
]}
|
||||
onSuccess={() => {
|
||||
setIsSuccess(true);
|
||||
}}
|
||||
submitButtonText={'Send Password Reset Link'}
|
||||
formType={FormType.Create}
|
||||
maxPrimaryButtonWidth={true}
|
||||
footer={
|
||||
<div className="actions pointer text-center mt-4 underline-on-hover fw-semibold">
|
||||
<p>
|
||||
<Link
|
||||
to={new Route('/accounts/login')}
|
||||
className="text-indigo-500 hover:text-indigo-900 cursor-pointer text-sm"
|
||||
>
|
||||
Return to Sign in.
|
||||
</Link>
|
||||
</p>
|
||||
</div>
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div className="mt-5 text-center">
|
||||
<p className="text-muted mb-0 text-gray-500">
|
||||
Remember your password?{' '}
|
||||
<Link
|
||||
to={new Route('/accounts/login')}
|
||||
className="text-indigo-500 hover:text-indigo-900 cursor-pointer"
|
||||
>
|
||||
Login.
|
||||
</Link>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default ForgotPassword;
|
||||
@@ -1,125 +0,0 @@
|
||||
import React, { FunctionComponent, useState } from 'react';
|
||||
import User from 'Model/Models/User';
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import OneUptimeLogo from 'CommonUI/src/Images/logos/OneUptimeSVG/3-transparent.svg';
|
||||
import Link from 'CommonUI/src/Components/Link/Link';
|
||||
import ModelForm, { FormType } from 'CommonUI/src/Components/Forms/ModelForm';
|
||||
import { LOGIN_API_URL } from '../Utils/ApiPaths';
|
||||
import URL from 'Common/Types/API/URL';
|
||||
import { JSONObject } from 'Common/Types/JSON';
|
||||
import LoginUtil from '../Utils/Login';
|
||||
import UserUtil from 'CommonUI/src/Utils/User';
|
||||
import Navigation from 'CommonUI/src/Utils/Navigation';
|
||||
import { DASHBOARD_URL } from 'CommonUI/src/Config';
|
||||
|
||||
const LoginPage: FunctionComponent = () => {
|
||||
const apiUrl: URL = LOGIN_API_URL;
|
||||
|
||||
if (UserUtil.isLoggedIn()) {
|
||||
Navigation.navigate(DASHBOARD_URL);
|
||||
}
|
||||
|
||||
const [showSsoTip, setShowSSOTip] = useState<boolean>(false);
|
||||
|
||||
return (
|
||||
<div className="flex min-h-full flex-col justify-center py-12 sm:px-6 lg:px-8">
|
||||
<div className="sm:mx-auto sm:w-full sm:max-w-md">
|
||||
<img
|
||||
className="mx-auto h-12 w-auto"
|
||||
src={OneUptimeLogo}
|
||||
alt="Your Company"
|
||||
/>
|
||||
<h2 className="mt-6 text-center text-2xl tracking-tight text-gray-900">
|
||||
Sign in to your account
|
||||
</h2>
|
||||
<p className="mt-2 text-center text-sm text-gray-600">
|
||||
Join thousands of business that use OneUptime to help them
|
||||
stay online all the time.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="mt-8 sm:mx-auto sm:w-full sm:max-w-md">
|
||||
<div className="bg-white py-8 px-4 shadow sm:rounded-lg sm:px-10">
|
||||
<ModelForm<User>
|
||||
modelType={User}
|
||||
id="login-form"
|
||||
name="Login"
|
||||
fields={[
|
||||
{
|
||||
field: {
|
||||
email: true,
|
||||
},
|
||||
title: 'Email',
|
||||
fieldType: FormFieldSchemaType.Email,
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
field: {
|
||||
password: true,
|
||||
},
|
||||
title: 'Password',
|
||||
required: true,
|
||||
validation: {
|
||||
minLength: 6,
|
||||
},
|
||||
fieldType: FormFieldSchemaType.Password,
|
||||
sideLink: {
|
||||
text: 'Forgot password?',
|
||||
url: new Route('/accounts/forgot-password'),
|
||||
openLinkInNewTab: false,
|
||||
},
|
||||
},
|
||||
]}
|
||||
apiUrl={apiUrl}
|
||||
formType={FormType.Create}
|
||||
submitButtonText={'Login'}
|
||||
onSuccess={(value: JSONObject) => {
|
||||
LoginUtil.login(value);
|
||||
}}
|
||||
maxPrimaryButtonWidth={true}
|
||||
footer={
|
||||
<div className="actions pointer text-center mt-4 underline-on-hover fw-semibold">
|
||||
<p>
|
||||
{!showSsoTip && (
|
||||
<div
|
||||
onClick={() => {
|
||||
setShowSSOTip(true);
|
||||
}}
|
||||
className="text-indigo-500 hover:text-indigo-900 cursor-pointer text-sm"
|
||||
>
|
||||
Use single sign-on (SSO) instead
|
||||
</div>
|
||||
)}
|
||||
|
||||
{showSsoTip && (
|
||||
<div className="text-gray-500 text-sm">
|
||||
Please sign in with your username
|
||||
and password. Once you have signed
|
||||
in, you'll be able to sign in
|
||||
via SSO that's configured for
|
||||
your project.
|
||||
</div>
|
||||
)}
|
||||
</p>
|
||||
</div>
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
<div className="mt-10 text-center">
|
||||
<p className="text-muted mb-0 text-gray-500">
|
||||
Don't have an account?{' '}
|
||||
<Link
|
||||
to={new Route('/accounts/register')}
|
||||
className="text-indigo-500 hover:text-indigo-900 cursor-pointer"
|
||||
>
|
||||
Register.
|
||||
</Link>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default LoginPage;
|
||||
@@ -1,18 +0,0 @@
|
||||
import React, { FunctionComponent } from 'react';
|
||||
|
||||
const LoginPage: FunctionComponent = () => {
|
||||
return (
|
||||
<div className="flex min-h-full flex-col justify-center py-12 sm:px-6 lg:px-8">
|
||||
<div className="sm:mx-auto sm:w-full sm:max-w-md">
|
||||
<h2 className="mt-6 text-center text-2xl tracking-tight text-gray-900">
|
||||
Page not found
|
||||
</h2>
|
||||
<p className="mt-2 text-center text-sm text-gray-600">
|
||||
Page you are looking for does not exist.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default LoginPage;
|
||||
@@ -1,148 +0,0 @@
|
||||
import React, { FunctionComponent } from 'react';
|
||||
import ModelForm, { FormType } from 'CommonUI/src/Components/Forms/ModelForm';
|
||||
import User from 'Model/Models/User';
|
||||
import Link from 'CommonUI/src/Components/Link/Link';
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import OneUptimeLogo from 'CommonUI/src/Images/logos/OneUptimeSVG/3-transparent.svg';
|
||||
import LoginUtil from '../Utils/Login';
|
||||
import { JSONObject } from 'Common/Types/JSON';
|
||||
import UserUtil from 'CommonUI/src/Utils/User';
|
||||
import Navigation from 'CommonUI/src/Utils/Navigation';
|
||||
import { DASHBOARD_URL } from 'CommonUI/src/Config';
|
||||
import URL from 'Common/Types/API/URL';
|
||||
import { SIGNUP_API_URL } from '../Utils/ApiPaths';
|
||||
|
||||
const RegisterPage: FunctionComponent = () => {
|
||||
const apiUrl: URL = SIGNUP_API_URL;
|
||||
|
||||
if (UserUtil.isLoggedIn()) {
|
||||
Navigation.navigate(DASHBOARD_URL);
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="flex min-h-full flex-col justify-center py-12 sm:px-6 lg:px-8">
|
||||
<div className="sm:mx-auto sm:w-full sm:max-w-md">
|
||||
<img
|
||||
className="mx-auto h-12 w-auto"
|
||||
src={OneUptimeLogo}
|
||||
alt="Your Company"
|
||||
/>
|
||||
<h2 className="mt-6 text-center text-2xl tracking-tight text-gray-900">
|
||||
Create your OneUptime account
|
||||
</h2>
|
||||
<p className="mt-2 text-center text-sm text-gray-600">
|
||||
Join thousands of business that use OneUptime to help them
|
||||
stay online all the time.
|
||||
</p>
|
||||
<p className="mt-2 text-center text-sm text-gray-600">
|
||||
No credit card required.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="mt-8 lg:mx-auto lg:w-full lg:max-w-2xl">
|
||||
<div className="bg-white py-8 px-4 shadow sm:rounded-lg sm:px-10">
|
||||
<ModelForm<User>
|
||||
modelType={User}
|
||||
id="register-form"
|
||||
showAsColumns={2}
|
||||
name="Register"
|
||||
maxPrimaryButtonWidth={true}
|
||||
initialValues={{
|
||||
email: '',
|
||||
name: '',
|
||||
companyName: '',
|
||||
companyPhoneNumber: '',
|
||||
password: '',
|
||||
confirmPassword: '',
|
||||
}}
|
||||
fields={[
|
||||
{
|
||||
field: {
|
||||
email: true,
|
||||
},
|
||||
fieldType: FormFieldSchemaType.Email,
|
||||
placeholder: 'jeff@example.com',
|
||||
required: true,
|
||||
title: 'Email',
|
||||
},
|
||||
{
|
||||
field: {
|
||||
name: true,
|
||||
},
|
||||
fieldType: FormFieldSchemaType.Text,
|
||||
placeholder: 'Jeff Smith',
|
||||
required: true,
|
||||
title: 'Full Name',
|
||||
},
|
||||
{
|
||||
field: {
|
||||
companyName: true,
|
||||
},
|
||||
fieldType: FormFieldSchemaType.Text,
|
||||
placeholder: 'Acme, Inc.',
|
||||
required: true,
|
||||
title: 'Company Name',
|
||||
},
|
||||
{
|
||||
field: {
|
||||
companyPhoneNumber: true,
|
||||
},
|
||||
fieldType: FormFieldSchemaType.Phone,
|
||||
required: true,
|
||||
placeholder: '+11234567890',
|
||||
title: 'Phone Number',
|
||||
},
|
||||
{
|
||||
field: {
|
||||
password: true,
|
||||
},
|
||||
fieldType: FormFieldSchemaType.Password,
|
||||
validation: {
|
||||
minLength: 6,
|
||||
},
|
||||
placeholder: 'Password',
|
||||
title: 'Password',
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
field: {
|
||||
confirmPassword: true,
|
||||
},
|
||||
validation: {
|
||||
minLength: 6,
|
||||
toMatchField: 'password',
|
||||
},
|
||||
fieldType: FormFieldSchemaType.Password,
|
||||
placeholder: 'Confirm Password',
|
||||
title: 'Confirm Password',
|
||||
overideFieldKey: 'confirmPassword',
|
||||
required: true,
|
||||
forceShow: true,
|
||||
},
|
||||
]}
|
||||
apiUrl={apiUrl}
|
||||
formType={FormType.Create}
|
||||
submitButtonText={'Sign Up'}
|
||||
onSuccess={(value: JSONObject) => {
|
||||
LoginUtil.login(value);
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
<div className="mt-5 text-center text-gray-500">
|
||||
<p className="text-muted mb-0">
|
||||
Already have an account?{' '}
|
||||
<Link
|
||||
to={new Route('/accounts/login')}
|
||||
className="text-indigo-500 hover:text-indigo-900 cursor-pointer"
|
||||
>
|
||||
Log in.
|
||||
</Link>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default RegisterPage;
|
||||
@@ -1,118 +0,0 @@
|
||||
import React, { FunctionComponent, useState } from 'react';
|
||||
import ModelForm, { FormType } from 'CommonUI/src/Components/Forms/ModelForm';
|
||||
import User from 'Model/Models/User';
|
||||
import Link from 'CommonUI/src/Components/Link/Link';
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
|
||||
import OneUptimeLogo from 'CommonUI/src/Images/logos/OneUptimeSVG/3-transparent.svg';
|
||||
|
||||
import URL from 'Common/Types/API/URL';
|
||||
import { RESET_PASSWORD_API_URL } from '../Utils/ApiPaths';
|
||||
import Navigation from 'CommonUI/src/Utils/Navigation';
|
||||
|
||||
const RegisterPage: FunctionComponent = () => {
|
||||
const apiUrl: URL = RESET_PASSWORD_API_URL;
|
||||
const [isSuccess, setIsSuccess] = useState<boolean>(false);
|
||||
|
||||
return (
|
||||
<div className="flex min-h-full flex-col justify-center py-12 sm:px-6 lg:px-8">
|
||||
<div className="sm:mx-auto sm:w-full sm:max-w-md">
|
||||
<img
|
||||
className="mx-auto h-12 w-auto"
|
||||
src={OneUptimeLogo}
|
||||
alt="Your Company"
|
||||
/>
|
||||
<h2 className="mt-6 text-center text-2xl tracking-tight text-gray-900">
|
||||
Reset your password
|
||||
</h2>
|
||||
|
||||
{!isSuccess && (
|
||||
<p className="mt-2 text-center text-sm text-gray-600">
|
||||
Please enter your new password and we will have it
|
||||
updated.{' '}
|
||||
</p>
|
||||
)}
|
||||
|
||||
{isSuccess && (
|
||||
<p className="mt-2 text-center text-sm text-gray-600">
|
||||
Your password has been updated. Please log in.
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div className="mt-8 sm:mx-auto sm:w-full sm:max-w-md">
|
||||
{!isSuccess && (
|
||||
<div className="bg-white py-8 px-4 shadow sm:rounded-lg sm:px-10">
|
||||
<ModelForm<User>
|
||||
modelType={User}
|
||||
id="register-form"
|
||||
name="Reset Password"
|
||||
onBeforeCreate={(item: User) => {
|
||||
item.resetPasswordToken =
|
||||
Navigation.getLastParam()
|
||||
?.toString()
|
||||
.replace('/', '')
|
||||
.toString() || '';
|
||||
return item;
|
||||
}}
|
||||
showAsColumns={1}
|
||||
maxPrimaryButtonWidth={true}
|
||||
initialValues={{
|
||||
password: '',
|
||||
confirmPassword: '',
|
||||
}}
|
||||
fields={[
|
||||
{
|
||||
field: {
|
||||
password: true,
|
||||
},
|
||||
fieldType: FormFieldSchemaType.Password,
|
||||
validation: {
|
||||
minLength: 6,
|
||||
},
|
||||
placeholder: 'New Password',
|
||||
title: 'New Password',
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
field: {
|
||||
password: true,
|
||||
},
|
||||
validation: {
|
||||
minLength: 6,
|
||||
toMatchField: 'password',
|
||||
},
|
||||
fieldType: FormFieldSchemaType.Password,
|
||||
placeholder: 'Confirm Password',
|
||||
title: 'Confirm Password',
|
||||
overideFieldKey: 'confirmPassword',
|
||||
required: true,
|
||||
},
|
||||
]}
|
||||
apiUrl={apiUrl}
|
||||
formType={FormType.Create}
|
||||
submitButtonText={'Reset Password'}
|
||||
onSuccess={() => {
|
||||
setIsSuccess(true);
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div className="mt-5 text-center">
|
||||
<p className="text-muted mb-0 text-gray-500">
|
||||
Know your password?{' '}
|
||||
<Link
|
||||
to={new Route('/accounts/login')}
|
||||
className="text-indigo-500 hover:text-indigo-900 cursor-pointer"
|
||||
>
|
||||
Log in.
|
||||
</Link>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default RegisterPage;
|
||||
@@ -1,131 +0,0 @@
|
||||
import React, { FunctionComponent, useEffect, useState } from 'react';
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import OneUptimeLogo from 'CommonUI/src/Images/logos/OneUptimeSVG/3-transparent.svg';
|
||||
import Link from 'CommonUI/src/Components/Link/Link';
|
||||
import PageLoader from 'CommonUI/src/Components/Loader/PageLoader';
|
||||
import ModelAPI from 'CommonUI/src/Utils/ModelAPI/ModelAPI';
|
||||
import EmailVerificationToken from 'Model/Models/EmailVerificationToken';
|
||||
import { VERIFY_EMAIL_API_URL } from '../Utils/ApiPaths';
|
||||
import { FormType } from 'CommonUI/src/Components/Forms/ModelForm';
|
||||
import Navigation from 'CommonUI/src/Utils/Navigation';
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
import URL from 'Common/Types/API/URL';
|
||||
import API from 'CommonUI/src/Utils/API/API';
|
||||
|
||||
const VerifyEmail: FunctionComponent = () => {
|
||||
const apiUrl: URL = VERIFY_EMAIL_API_URL;
|
||||
const [error, setError] = useState<string>('');
|
||||
const [isLoading, setIsLoading] = useState<boolean>(true);
|
||||
|
||||
const init: Function = async (): Promise<void> => {
|
||||
// Ping an API here.
|
||||
setError('');
|
||||
setIsLoading(true);
|
||||
|
||||
try {
|
||||
// strip data.
|
||||
const emailverificationToken: EmailVerificationToken =
|
||||
new EmailVerificationToken();
|
||||
emailverificationToken.token = new ObjectID(
|
||||
Navigation.getLastParam()?.toString().replace('/', '') || ''
|
||||
);
|
||||
|
||||
await ModelAPI.createOrUpdate<EmailVerificationToken>(
|
||||
emailverificationToken,
|
||||
EmailVerificationToken,
|
||||
FormType.Create,
|
||||
{},
|
||||
{
|
||||
overrideRequestUrl: apiUrl,
|
||||
}
|
||||
);
|
||||
} catch (err) {
|
||||
setError(API.getFriendlyMessage(err));
|
||||
}
|
||||
|
||||
setIsLoading(false);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
init().catch((err: Error) => {
|
||||
setError(err.toString());
|
||||
});
|
||||
}, []);
|
||||
|
||||
if (isLoading) {
|
||||
return <PageLoader isVisible={true} />;
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="auth-page">
|
||||
<div className="container-fluid p-0">
|
||||
<div className="row g-0">
|
||||
<div className="col-xxl-4 col-lg-4 col-md-3"></div>
|
||||
|
||||
<div className="col-xxl-4 col-lg-4 col-md-6">
|
||||
<div className="auth-full-page-content d-flex p-sm-5 p-4">
|
||||
<div className="w-100">
|
||||
<div className="d-flex flex-column h-100">
|
||||
<div className="auth-content my-auto">
|
||||
<div
|
||||
className="mt-4 text-center flex justify-center"
|
||||
style={{ marginBottom: '40px' }}
|
||||
>
|
||||
<img
|
||||
style={{ height: '50px' }}
|
||||
src={`${OneUptimeLogo}`}
|
||||
/>
|
||||
</div>
|
||||
{!error && (
|
||||
<div className="text-center">
|
||||
<h5 className="mb-0">
|
||||
Your email is verified.
|
||||
</h5>
|
||||
<p className="text-muted mt-2 mb-0">
|
||||
Thank you for veryfing your
|
||||
email. You can now log in to
|
||||
OneUptime.{' '}
|
||||
</p>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{error && (
|
||||
<div className="text-center">
|
||||
<h5 className="mb-0">
|
||||
Sorry, something went wrong!
|
||||
</h5>
|
||||
<p className="text-muted mt-2 mb-0">
|
||||
{error}
|
||||
</p>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div className="mt-5 text-center">
|
||||
<p className="text-muted mb-0">
|
||||
Return to sign in?{' '}
|
||||
<Link
|
||||
to={
|
||||
new Route(
|
||||
'/accounts/login'
|
||||
)
|
||||
}
|
||||
className="underline-on-hover text-primary fw-semibold"
|
||||
>
|
||||
Login.
|
||||
</Link>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="col-xxl-4 col-lg-4 col-md-3"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default VerifyEmail;
|
||||
@@ -1,22 +0,0 @@
|
||||
import Route from 'Common/Types/API/Route';
|
||||
import URL from 'Common/Types/API/URL';
|
||||
import { IDENTITY_URL } from 'CommonUI/src/Config';
|
||||
|
||||
export const SIGNUP_API_URL: URL = URL.fromURL(IDENTITY_URL).addRoute(
|
||||
new Route('/signup')
|
||||
);
|
||||
export const LOGIN_API_URL: URL = URL.fromURL(IDENTITY_URL).addRoute(
|
||||
new Route('/login')
|
||||
);
|
||||
|
||||
export const FORGOT_PASSWORD_API_URL: URL = URL.fromURL(IDENTITY_URL).addRoute(
|
||||
new Route('/forgot-password')
|
||||
);
|
||||
|
||||
export const VERIFY_EMAIL_API_URL: URL = URL.fromURL(IDENTITY_URL).addRoute(
|
||||
new Route('/verify-email')
|
||||
);
|
||||
|
||||
export const RESET_PASSWORD_API_URL: URL = URL.fromURL(IDENTITY_URL).addRoute(
|
||||
new Route('/reset-password')
|
||||
);
|
||||
@@ -1,30 +0,0 @@
|
||||
import UserUtil from 'CommonUI/src/Utils/User';
|
||||
import Navigation from 'CommonUI/src/Utils/Navigation';
|
||||
import Email from 'Common/Types/Email';
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
import Name from 'Common/Types/Name';
|
||||
import { DASHBOARD_URL } from 'CommonUI/src/Config';
|
||||
import { JSONObject } from 'Common/Types/JSON';
|
||||
import User from 'Model/Models/User';
|
||||
import JSONFunctions from 'Common/Types/JSONFunctions';
|
||||
import Analytics from 'CommonUI/src/Utils/Analytics';
|
||||
|
||||
export default abstract class LoginUtil {
|
||||
public static login(value: JSONObject): void {
|
||||
const user: User = JSONFunctions.fromJSON(
|
||||
value['user'] as JSONObject,
|
||||
User
|
||||
) as User;
|
||||
const token: string = value['token'] as string;
|
||||
|
||||
UserUtil.setAccessToken(token);
|
||||
UserUtil.setEmail(user.email as Email);
|
||||
UserUtil.setUserId(user.id as ObjectID);
|
||||
UserUtil.setName(user.name as Name);
|
||||
|
||||
Analytics.userAuth(user.email!);
|
||||
|
||||
// go to dashboard, user should be logged in.
|
||||
Navigation.navigate(DASHBOARD_URL);
|
||||
}
|
||||
}
|
||||
@@ -1,102 +0,0 @@
|
||||
{
|
||||
"ts-node": {
|
||||
// these options are overrides used only by ts-node
|
||||
// same as the --compilerOptions flag and the TS_NODE_COMPILER_OPTIONS environment variable
|
||||
"compilerOptions": {
|
||||
"module": "commonjs"
|
||||
}
|
||||
},
|
||||
"compilerOptions": {
|
||||
/* Visit https://aka.ms/tsconfig.json to read more about this file */
|
||||
/* Projects */
|
||||
// "incremental": true, /* Enable incremental compilation */
|
||||
// "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
|
||||
// "tsBuildInfoFile": "./", /* Specify the folder for .tsbuildinfo incremental compilation files. */
|
||||
// "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects */
|
||||
// "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
|
||||
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
|
||||
/* Language and Environment */
|
||||
"target": "es2017" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
|
||||
// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
|
||||
"jsx": "react" /* Specify what JSX code is generated. */,
|
||||
"experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */
|
||||
"emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
|
||||
// "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h' */
|
||||
// "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
|
||||
// "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using `jsx: react-jsx*`.` */
|
||||
// "reactNamespace": "", /* Specify the object invoked for `createElement`. This only applies when targeting `react` JSX emit. */
|
||||
// "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
|
||||
// "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
|
||||
/* Modules */
|
||||
"module": "es2022" /* Specify what module code is generated. */,
|
||||
// "rootDir": "./", /* Specify the root folder within your source files. */
|
||||
"moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */
|
||||
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
|
||||
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
|
||||
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
|
||||
"typeRoots": [], /* Specify multiple folders that act like `./node_modules/@types`. */
|
||||
"types": [
|
||||
"node"
|
||||
], /* Specify type package names to be included without being referenced in a source file. */
|
||||
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
|
||||
// "resolveJsonModule": true, /* Enable importing .json files */
|
||||
// "noResolve": true, /* Disallow `import`s, `require`s or `<reference>`s from expanding the number of files TypeScript should add to a project. */
|
||||
/* JavaScript Support */
|
||||
// "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files. */
|
||||
// "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
|
||||
// "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with `allowJs`. */
|
||||
/* Emit */
|
||||
// "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
|
||||
// "declarationMap": true, /* Create sourcemaps for d.ts files. */
|
||||
// "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
|
||||
"sourceMap": true, /* Create source map files for emitted JavaScript files. */
|
||||
// "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If `declaration` is true, also designates a file that bundles all .d.ts output. */
|
||||
"outDir": "./build/dist", /* Specify an output folder for all emitted files. */
|
||||
// "removeComments": true, /* Disable emitting comments. */
|
||||
// "noEmit": true, /* Disable emitting files from a compilation. */
|
||||
// "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
|
||||
// "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types */
|
||||
// "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
|
||||
// "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
|
||||
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
|
||||
// "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
|
||||
// "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
|
||||
// "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
|
||||
// "newLine": "crlf", /* Set the newline character for emitting files. */
|
||||
// "stripInternal": true, /* Disable emitting declarations that have `@internal` in their JSDoc comments. */
|
||||
// "noEmitHelpers": true, /* Disable generating custom helper functions like `__extends` in compiled output. */
|
||||
// "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
|
||||
// "preserveConstEnums": true, /* Disable erasing `const enum` declarations in generated code. */
|
||||
// "declarationDir": "./", /* Specify the output directory for generated declaration files. */
|
||||
// "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */
|
||||
/* Interop Constraints */
|
||||
// "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
|
||||
// "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
|
||||
"esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility. */,
|
||||
// "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
|
||||
"forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */,
|
||||
/* Type Checking */
|
||||
"strict": true /* Enable all strict type-checking options. */,
|
||||
"noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied `any` type.. */
|
||||
"strictNullChecks": true, /* When type checking, take into account `null` and `undefined`. */
|
||||
"strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
|
||||
"strictBindCallApply": true, /* Check that the arguments for `bind`, `call`, and `apply` methods match the original function. */
|
||||
"strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
|
||||
"noImplicitThis": true, /* Enable error reporting when `this` is given the type `any`. */
|
||||
"useUnknownInCatchVariables": true, /* Type catch clause variables as 'unknown' instead of 'any'. */
|
||||
"alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
|
||||
"noUnusedLocals": true, /* Enable error reporting when a local variables aren't read. */
|
||||
"noUnusedParameters": true, /* Raise an error when a function parameter isn't read */
|
||||
"exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
|
||||
"noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
|
||||
"noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
|
||||
"noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */
|
||||
"noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
|
||||
"noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type */
|
||||
// "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
|
||||
// "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
|
||||
/* Completeness */
|
||||
// "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
|
||||
"skipLibCheck": true /* Skip type checking all .d.ts files. */
|
||||
}
|
||||
}
|
||||
@@ -1,80 +0,0 @@
|
||||
const path = require("path");
|
||||
const webpack = require("webpack");
|
||||
const dotenv = require('dotenv');
|
||||
const express = require('express');
|
||||
|
||||
const readEnvFile = (pathToFile) => {
|
||||
|
||||
const parsed = dotenv.config({ path: pathToFile }).parsed;
|
||||
|
||||
const env = {};
|
||||
|
||||
for (const key in parsed) {
|
||||
env[key] = JSON.stringify(parsed[key]);
|
||||
}
|
||||
|
||||
|
||||
return env;
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
entry: "./src/Index.tsx",
|
||||
mode: "development",
|
||||
output: {
|
||||
filename: "bundle.js",
|
||||
path: path.resolve(__dirname, "public", "dist"),
|
||||
publicPath: "/accounts/dist/",
|
||||
},
|
||||
resolve: {
|
||||
extensions: ['.ts', '.tsx', '.js', '.jsx', '.json', '.css', '.scss'],
|
||||
alias: {
|
||||
react: path.resolve('./node_modules/react'),
|
||||
}
|
||||
},
|
||||
externals: {
|
||||
'react-native-sqlite-storage': 'react-native-sqlite-storage'
|
||||
},
|
||||
plugins: [
|
||||
new webpack.DefinePlugin({
|
||||
'process': {
|
||||
'env': {
|
||||
...readEnvFile('../Common/.env'),
|
||||
...readEnvFile('../CommonUI/.env'),
|
||||
...readEnvFile('./.env')
|
||||
}
|
||||
}
|
||||
}),
|
||||
],
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.(ts|tsx)$/,
|
||||
use: 'ts-loader'
|
||||
},
|
||||
{
|
||||
test: /\.s[ac]ss$/i,
|
||||
use: ['style-loader', 'css-loader', "sass-loader"]
|
||||
},
|
||||
{
|
||||
test: /\.css$/i,
|
||||
use: ['style-loader', 'css-loader']
|
||||
},
|
||||
{
|
||||
test: /\.(jpe?g|png|gif|svg)$/i,
|
||||
loader: 'file-loader'
|
||||
}
|
||||
],
|
||||
},
|
||||
devServer: {
|
||||
historyApiFallback: true,
|
||||
devMiddleware: {
|
||||
writeToDisk: true,
|
||||
},
|
||||
allowedHosts: "all",
|
||||
setupMiddlewares: (middlewares, devServer) => {
|
||||
devServer.app.use('/accounts/assets', express.static(path.resolve(__dirname, 'public', 'assets')));
|
||||
return middlewares;
|
||||
}
|
||||
},
|
||||
devtool: 'eval-source-map',
|
||||
}
|
||||
@@ -1,56 +0,0 @@
|
||||
.git
|
||||
|
||||
node_modules
|
||||
# See https://help.github.com/ignore-files/ for more about ignoring files.
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
node_modules
|
||||
|
||||
.idea
|
||||
# testing
|
||||
/coverage
|
||||
|
||||
# production
|
||||
/build
|
||||
|
||||
# misc
|
||||
.DS_Store
|
||||
|
||||
env.js
|
||||
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
yarn.lock
|
||||
Untitled-1
|
||||
*.local.sh
|
||||
*.local.yaml
|
||||
run
|
||||
stop
|
||||
|
||||
nohup.out*
|
||||
|
||||
encrypted-credentials.tar
|
||||
encrypted-credentials/
|
||||
|
||||
_README.md
|
||||
|
||||
# Important Add production values to gitignore.
|
||||
values-saas-production.yaml
|
||||
kubernetes/values-saas-production.yaml
|
||||
|
||||
/private
|
||||
|
||||
/tls_cert.pem
|
||||
/tls_key.pem
|
||||
/keys
|
||||
|
||||
temp_readme.md
|
||||
|
||||
tests/coverage
|
||||
|
||||
settings.json
|
||||
|
||||
GoSDK/tester/
|
||||
56
AdminDashboard/.gitignore
vendored
56
AdminDashboard/.gitignore
vendored
@@ -1,56 +0,0 @@
|
||||
.git
|
||||
|
||||
node_modules
|
||||
# See https://help.github.com/ignore-files/ for more about ignoring files.
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
node_modules
|
||||
|
||||
.idea
|
||||
# testing
|
||||
/coverage
|
||||
|
||||
# production
|
||||
/build
|
||||
|
||||
# misc
|
||||
.DS_Store
|
||||
|
||||
env.js
|
||||
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
yarn.lock
|
||||
Untitled-1
|
||||
*.local.sh
|
||||
*.local.yaml
|
||||
run
|
||||
stop
|
||||
|
||||
nohup.out*
|
||||
|
||||
encrypted-credentials.tar
|
||||
encrypted-credentials/
|
||||
|
||||
_README.md
|
||||
|
||||
# Important Add production values to gitignore.
|
||||
values-saas-production.yaml
|
||||
kubernetes/values-saas-production.yaml
|
||||
|
||||
/private
|
||||
|
||||
/tls_cert.pem
|
||||
/tls_key.pem
|
||||
/keys
|
||||
|
||||
temp_readme.md
|
||||
|
||||
tests/coverage
|
||||
|
||||
settings.json
|
||||
|
||||
GoSDK/tester/
|
||||
@@ -1,83 +0,0 @@
|
||||
#
|
||||
# AdminDashboard Dockerfile
|
||||
#
|
||||
|
||||
# Pull base image nodejs image.
|
||||
FROM node:18.13.0-alpine
|
||||
USER root
|
||||
RUN mkdir /tmp/npm && chmod 2777 /tmp/npm && chown 1000:1000 /tmp/npm && npm config set cache /tmp/npm --global
|
||||
|
||||
|
||||
# Install bash.
|
||||
RUN apk update && apk add bash && apk add curl
|
||||
|
||||
#Use bash shell by default
|
||||
SHELL ["/bin/bash", "-c"]
|
||||
|
||||
|
||||
RUN mkdir /usr/src
|
||||
|
||||
# Install common
|
||||
RUN mkdir /usr/src/Common
|
||||
WORKDIR /usr/src/Common
|
||||
COPY ./Common/package*.json /usr/src/Common/
|
||||
RUN npm install
|
||||
COPY ./Common /usr/src/Common
|
||||
|
||||
|
||||
# Install Model
|
||||
RUN mkdir /usr/src/Model
|
||||
WORKDIR /usr/src/Model
|
||||
COPY ./Model/package*.json /usr/src/Model/
|
||||
RUN npm install
|
||||
COPY ./Model /usr/src/Model
|
||||
|
||||
|
||||
|
||||
# Install CommonServer
|
||||
RUN mkdir /usr/src/CommonServer
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY ./CommonServer/package*.json /usr/src/CommonServer/
|
||||
RUN npm install
|
||||
COPY ./CommonServer /usr/src/CommonServer
|
||||
|
||||
|
||||
|
||||
|
||||
# Install CommonUI
|
||||
RUN mkdir /usr/src/CommonUI
|
||||
WORKDIR /usr/src/CommonUI
|
||||
COPY ./CommonUI/package*.json /usr/src/CommonUI/
|
||||
RUN npm install --force
|
||||
COPY ./CommonUI /usr/src/CommonUI
|
||||
|
||||
|
||||
#SET ENV Variables
|
||||
ENV PRODUCTION=true
|
||||
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
|
||||
|
||||
RUN mkdir /usr/src/app
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# Install app dependencies
|
||||
COPY ./AdminDashboard/package*.json /usr/src/app/
|
||||
RUN npm install
|
||||
|
||||
# Expose ports.
|
||||
# - 3005: AdminDashboard
|
||||
EXPOSE 3005
|
||||
|
||||
|
||||
{{ if eq .Env.ENVIRONMENT "development" }}
|
||||
#Run the app
|
||||
CMD [ "npm", "run", "dev" ]
|
||||
{{ else }}
|
||||
# Copy app source
|
||||
COPY ./AdminDashboard /usr/src/app
|
||||
# Bundle app source
|
||||
RUN npm run build
|
||||
#Run the app
|
||||
CMD [ "npm", "start" ]
|
||||
{{ end }}
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
.git
|
||||
|
||||
node_modules
|
||||
# See https://help.github.com/ignore-files/ for more about ignoring files.
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
node_modules
|
||||
|
||||
.idea
|
||||
# testing
|
||||
/coverage
|
||||
|
||||
# production
|
||||
/build
|
||||
|
||||
# misc
|
||||
.DS_Store
|
||||
|
||||
env.js
|
||||
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
yarn.lock
|
||||
Untitled-1
|
||||
*.local.sh
|
||||
*.local.yaml
|
||||
run
|
||||
stop
|
||||
|
||||
nohup.out*
|
||||
|
||||
encrypted-credentials.tar
|
||||
encrypted-credentials/
|
||||
|
||||
_README.md
|
||||
|
||||
# Important Add production values to gitignore.
|
||||
values-saas-production.yaml
|
||||
kubernetes/values-saas-production.yaml
|
||||
|
||||
/private
|
||||
|
||||
/tls_cert.pem
|
||||
/tls_key.pem
|
||||
/keys
|
||||
|
||||
temp_readme.md
|
||||
|
||||
tests/coverage
|
||||
|
||||
settings.json
|
||||
|
||||
GoSDK/tester/
|
||||
@@ -1 +0,0 @@
|
||||
PORT={{ .Env.API_DOCS_PORT }}
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"query": {
|
||||
"name": "Hello",
|
||||
// other filters
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"query": {
|
||||
"age": {
|
||||
"_type": "EqualToOrNull",
|
||||
value: 10
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"query": {
|
||||
"age": {
|
||||
"_type": "GraterThan",
|
||||
"value": 10
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"query": {
|
||||
"age": {
|
||||
"_type": "GreaterThanOrEqual",
|
||||
"value": 10
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"query": {
|
||||
"age": {
|
||||
"_type": "IsNull"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"query": {
|
||||
"age": {
|
||||
"_type": "LessThan",
|
||||
"value": 10
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"query": {
|
||||
"age": {
|
||||
"_type": "LessThanOrEqual",
|
||||
"value": 10
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"query": {
|
||||
"name": {
|
||||
"_type": "NotEqual",
|
||||
"value": "Hello"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"query": {
|
||||
"age": {
|
||||
"_type": "NotNull"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"select": {
|
||||
"name": true,
|
||||
// other fields
|
||||
}
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"sort": {
|
||||
"name": "ASC",
|
||||
// other fields
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
Request Headers:
|
||||
|
||||
ApiKey: {secret-api-key}
|
||||
ProjectID: {project-id}
|
||||
|
||||
Request Body:
|
||||
|
||||
{
|
||||
"query": {
|
||||
// query object (optional, if left optional it'll select everything)
|
||||
},
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"count": 107
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
Request Headers:
|
||||
|
||||
ApiKey: {secret-api-key}
|
||||
ProjectID: {project-id}
|
||||
|
||||
Request Body:
|
||||
|
||||
{
|
||||
"data": {
|
||||
// properties to update as JSON.
|
||||
}
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"_id": "xxx-xxx-xxxx-xxxx",
|
||||
// other object fields.
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
Request Headers:
|
||||
|
||||
ApiKey: {secret-api-key}
|
||||
ProjectID: {project-id}
|
||||
@@ -1 +0,0 @@
|
||||
{}
|
||||
@@ -1,12 +0,0 @@
|
||||
Request Headers:
|
||||
|
||||
ApiKey: {secret-api-key}
|
||||
ProjectID: {project-id}
|
||||
|
||||
Request Body:
|
||||
|
||||
{
|
||||
"select": {
|
||||
// select object (optional, if left optional it'll only fetch ID).
|
||||
},
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"_id": "3599ee69-43a7-42d7",
|
||||
// ... other object fields.
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
Request Headers:
|
||||
|
||||
ApiKey: {secret-api-key}
|
||||
ProjectID: {project-id}
|
||||
|
||||
Request Body:
|
||||
|
||||
{
|
||||
"select": {
|
||||
// select object (optional, if left optional it'll only fetch ID).
|
||||
},
|
||||
"query": {
|
||||
// query object (optional, if left optional it'll select everything)
|
||||
},
|
||||
"sort": {
|
||||
// sort object (optional)
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
{
|
||||
"count": 10,
|
||||
"limit": 10,
|
||||
"skip": 0,
|
||||
"data": [
|
||||
{
|
||||
"_id": "p39d997a-026c-44b2-8b02-7b2814d886d2",
|
||||
// ...
|
||||
},
|
||||
{
|
||||
"_id": "l34e743e-1af5-4b0a-998f-1d421c22f7a1",
|
||||
// ...
|
||||
},
|
||||
{
|
||||
"_id": "6a5aa129-0b3e-45b7-a7f6-b4b6df338a19",
|
||||
// ...
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
Request Headers:
|
||||
|
||||
ApiKey: {secret-api-key}
|
||||
ProjectID: {project-id}
|
||||
|
||||
Request Body:
|
||||
|
||||
{
|
||||
"data": {
|
||||
// properties to update as JSON.
|
||||
}
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
{}
|
||||
@@ -1,19 +0,0 @@
|
||||
{
|
||||
"count": 10,
|
||||
"limit": 3,
|
||||
"skip": 0,
|
||||
"data": [
|
||||
{
|
||||
"_id": "p39d997a-026c-44b2-8b02-7b2814d886d2",
|
||||
// ...
|
||||
},
|
||||
{
|
||||
"_id": "l34e743e-1af5-4b0a-998f-1d421c22f7a1",
|
||||
// ...
|
||||
},
|
||||
{
|
||||
"_id": "6a5aa129-0b3e-45b7-a7f6-b4b6df338a19",
|
||||
// ...
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,68 +0,0 @@
|
||||
# Pull base image nodejs image.
|
||||
FROM node:18.13.0-alpine
|
||||
USER root
|
||||
RUN mkdir /tmp/npm && chmod 2777 /tmp/npm && chown 1000:1000 /tmp/npm && npm config set cache /tmp/npm --global
|
||||
|
||||
|
||||
# Install bash.
|
||||
RUN apk update && apk add bash && apk add curl
|
||||
|
||||
#Use bash shell by default
|
||||
SHELL ["/bin/bash", "-c"]
|
||||
|
||||
|
||||
RUN mkdir /usr/src
|
||||
|
||||
# Install common
|
||||
RUN mkdir /usr/src/Common
|
||||
WORKDIR /usr/src/Common
|
||||
COPY ./Common/package*.json /usr/src/Common/
|
||||
RUN npm install
|
||||
COPY ./Common /usr/src/Common
|
||||
|
||||
|
||||
# Install Model
|
||||
RUN mkdir /usr/src/Model
|
||||
WORKDIR /usr/src/Model
|
||||
COPY ./Model/package*.json /usr/src/Model/
|
||||
RUN npm install
|
||||
COPY ./Model /usr/src/Model
|
||||
|
||||
|
||||
|
||||
# Install CommonServer
|
||||
RUN mkdir /usr/src/CommonServer
|
||||
WORKDIR /usr/src/CommonServer
|
||||
COPY ./CommonServer/package*.json /usr/src/CommonServer/
|
||||
RUN npm install
|
||||
COPY ./CommonServer /usr/src/CommonServer
|
||||
|
||||
|
||||
|
||||
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
|
||||
|
||||
RUN mkdir /usr/src/app
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# Install app dependencies
|
||||
COPY ./ApiReference/package*.json /usr/src/app/
|
||||
RUN npm install
|
||||
|
||||
|
||||
# Expose ports.
|
||||
# - 1445: OneUptime Docs
|
||||
EXPOSE 1445
|
||||
|
||||
|
||||
{{ if eq .Env.ENVIRONMENT "development" }}
|
||||
#Run the app
|
||||
CMD [ "npm", "run", "dev" ]
|
||||
{{ else }}
|
||||
# Copy app source
|
||||
COPY ./ApiReference /usr/src/app
|
||||
# Bundle app source
|
||||
RUN npm run compile
|
||||
#Run the app
|
||||
CMD [ "npm", "start" ]
|
||||
{{ end }}
|
||||
@@ -1,101 +0,0 @@
|
||||
import Express, {
|
||||
ExpressApplication,
|
||||
ExpressRequest,
|
||||
ExpressResponse,
|
||||
ExpressStatic,
|
||||
} from 'CommonServer/Utils/Express';
|
||||
import logger from 'CommonServer/Utils/Logger';
|
||||
import App from 'CommonServer/Utils/StartServer';
|
||||
import path from 'path';
|
||||
import ResourceUtil, { ModelDocumentation } from './Utils/Resources';
|
||||
import IntroductionServiceHandler from './Service/Introduction';
|
||||
import ErrorServiceHandler from './Service/Errors';
|
||||
import PermissionServiceHandler from './Service/Permissions';
|
||||
import AuthenticationServiceHandler from './Service/Authentication';
|
||||
import PageNotFoundServiceHandler from './Service/PageNotFound';
|
||||
import ModelServiceHandler from './Service/Model';
|
||||
import PaginationServiceHandler from './Service/Pagination';
|
||||
import StatusServiceHandler from './Service/Status';
|
||||
import DataTypeServiceHandler from './Service/DataType';
|
||||
import Dictionary from 'Common/Types/Dictionary';
|
||||
|
||||
const ResourceDictionary: Dictionary<ModelDocumentation> =
|
||||
ResourceUtil.getReosurceDictionaryByPath();
|
||||
|
||||
const APP_NAME: string = 'reference';
|
||||
|
||||
const app: ExpressApplication = Express.getExpressApp();
|
||||
|
||||
// Set the view engine to ejs
|
||||
app.set('views', path.join(__dirname, 'views'));
|
||||
app.set('view engine', 'ejs');
|
||||
|
||||
// Public static files
|
||||
app.use(ExpressStatic(path.join(__dirname, 'public'), { maxAge: 2592000 }));
|
||||
|
||||
app.use(
|
||||
'/reference',
|
||||
ExpressStatic(path.join(__dirname, 'public'), { maxAge: 2592000 })
|
||||
);
|
||||
|
||||
// Index page
|
||||
app.get(['/reference'], (_req: ExpressRequest, res: ExpressResponse) => {
|
||||
return res.redirect('/reference/introduction');
|
||||
});
|
||||
|
||||
app.get(
|
||||
['/reference/page-not-found'],
|
||||
(req: ExpressRequest, res: ExpressResponse) => {
|
||||
return PageNotFoundServiceHandler.executeResponse(req, res);
|
||||
}
|
||||
);
|
||||
|
||||
// All Pages
|
||||
app.get(['/reference/:page'], (req: ExpressRequest, res: ExpressResponse) => {
|
||||
const page: string | undefined = req.params['page'];
|
||||
|
||||
if (!page) {
|
||||
return PageNotFoundServiceHandler.executeResponse(req, res);
|
||||
}
|
||||
|
||||
const currentResource: ModelDocumentation | undefined =
|
||||
ResourceDictionary[page];
|
||||
|
||||
if (req.params['page'] === 'permissions') {
|
||||
return PermissionServiceHandler.executeResponse(req, res);
|
||||
} else if (req.params['page'] === 'authentication') {
|
||||
return AuthenticationServiceHandler.executeResponse(req, res);
|
||||
} else if (req.params['page'] === 'pagination') {
|
||||
return PaginationServiceHandler.executeResponse(req, res);
|
||||
} else if (req.params['page'] === 'errors') {
|
||||
return ErrorServiceHandler.executeResponse(req, res);
|
||||
} else if (req.params['page'] === 'introduction') {
|
||||
return IntroductionServiceHandler.executeResponse(req, res);
|
||||
} else if (req.params['page'] === 'status') {
|
||||
return StatusServiceHandler.executeResponse(req, res);
|
||||
} else if (req.params['page'] === 'data-types') {
|
||||
return DataTypeServiceHandler.executeResponse(req, res);
|
||||
} else if (currentResource) {
|
||||
return ModelServiceHandler.executeResponse(req, res);
|
||||
}
|
||||
// page not found
|
||||
return PageNotFoundServiceHandler.executeResponse(req, res);
|
||||
});
|
||||
|
||||
app.get('/*', (req: ExpressRequest, res: ExpressResponse) => {
|
||||
return PageNotFoundServiceHandler.executeResponse(req, res);
|
||||
});
|
||||
|
||||
const init: Function = async (): Promise<void> => {
|
||||
try {
|
||||
// init the app
|
||||
await App(APP_NAME);
|
||||
} catch (err) {
|
||||
logger.error('App Init Failed:');
|
||||
logger.error(err);
|
||||
}
|
||||
};
|
||||
|
||||
init();
|
||||
|
||||
export default app;
|
||||
@@ -1,9 +0,0 @@
|
||||
# OneUptime API Documentation
|
||||
|
||||
[](https://travis-ci.org/OneUptime/ApiReference)
|
||||
|
||||
This is the API Reference for OneUptime which is hosted at [https://oneuptime.com/reference](https://oneuptime.com/reference).
|
||||
|
||||
# Contribute
|
||||
|
||||
Feel free to send PR's and contribute. Please send PR's to master and we'll have our team review them for you.
|
||||
@@ -1,28 +0,0 @@
|
||||
import { ExpressRequest, ExpressResponse } from 'CommonServer/Utils/Express';
|
||||
import ResourceUtil, { ModelDocumentation } from '../Utils/Resources';
|
||||
|
||||
const Resources: Array<ModelDocumentation> = ResourceUtil.getResources();
|
||||
|
||||
export default class ServiceHandler {
|
||||
public static async executeResponse(
|
||||
req: ExpressRequest,
|
||||
res: ExpressResponse
|
||||
): Promise<void> {
|
||||
let pageTitle: string = '';
|
||||
let pageDescription: string = '';
|
||||
const page: string | undefined = req.params['page'];
|
||||
const pageData: any = {};
|
||||
|
||||
pageTitle = 'Authentication';
|
||||
pageDescription =
|
||||
'Learn how to authenticate requests with OneUptime API';
|
||||
|
||||
return res.render('pages/index', {
|
||||
page: page,
|
||||
resources: Resources,
|
||||
pageTitle: pageTitle,
|
||||
pageDescription: pageDescription,
|
||||
pageData: pageData,
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -1,135 +0,0 @@
|
||||
import LocalCache from 'CommonServer/Infrastructure/LocalCache';
|
||||
import { ExpressRequest, ExpressResponse } from 'CommonServer/Utils/Express';
|
||||
import LocalFile from 'CommonServer/Utils/LocalFile';
|
||||
import ResourceUtil, { ModelDocumentation } from '../Utils/Resources';
|
||||
|
||||
const Resources: Array<ModelDocumentation> = ResourceUtil.getResources();
|
||||
|
||||
export default class ServiceHandler {
|
||||
public static async executeResponse(
|
||||
_req: ExpressRequest,
|
||||
res: ExpressResponse
|
||||
): Promise<void> {
|
||||
const pageData: any = {};
|
||||
|
||||
pageData.selectCode = await LocalCache.getOrSetString(
|
||||
'data-type',
|
||||
'select',
|
||||
async () => {
|
||||
return await LocalFile.read(
|
||||
'/usr/src/app/CodeExamples/DataTypes/Select.md'
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
pageData.sortCode = await LocalCache.getOrSetString(
|
||||
'data-type',
|
||||
'sort',
|
||||
async () => {
|
||||
return await LocalFile.read(
|
||||
'/usr/src/app/CodeExamples/DataTypes/Sort.md'
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
pageData.equalToCode = await LocalCache.getOrSetString(
|
||||
'data-type',
|
||||
'equal-to',
|
||||
async () => {
|
||||
return await LocalFile.read(
|
||||
'/usr/src/app/CodeExamples/DataTypes/EqualTo.md'
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
pageData.equalToOrNullCode = await LocalCache.getOrSetString(
|
||||
'data-type',
|
||||
'equal-to-or-null',
|
||||
async () => {
|
||||
return await LocalFile.read(
|
||||
'/usr/src/app/CodeExamples/DataTypes/EqualToOrNull.md'
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
pageData.greaterThanCode = await LocalCache.getOrSetString(
|
||||
'data-type',
|
||||
'greater-than',
|
||||
async () => {
|
||||
return await LocalFile.read(
|
||||
'/usr/src/app/CodeExamples/DataTypes/GreaterThan.md'
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
pageData.greaterThanOrEqualCode = await LocalCache.getOrSetString(
|
||||
'data-type',
|
||||
'greater-than-or-equal',
|
||||
async () => {
|
||||
return await LocalFile.read(
|
||||
'/usr/src/app/CodeExamples/DataTypes/GreaterThanOrEqual.md'
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
pageData.lessThanCode = await LocalCache.getOrSetString(
|
||||
'data-type',
|
||||
'less-than',
|
||||
async () => {
|
||||
return await LocalFile.read(
|
||||
'/usr/src/app/CodeExamples/DataTypes/LessThan.md'
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
pageData.lessThanOrEqualCode = await LocalCache.getOrSetString(
|
||||
'data-type',
|
||||
'less-than-or-equal',
|
||||
async () => {
|
||||
return await LocalFile.read(
|
||||
'/usr/src/app/CodeExamples/DataTypes/LessThanOrEqual.md'
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
pageData.isNullCode = await LocalCache.getOrSetString(
|
||||
'data-type',
|
||||
'is-null',
|
||||
async () => {
|
||||
return await LocalFile.read(
|
||||
'/usr/src/app/CodeExamples/DataTypes/IsNull.md'
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
pageData.notNullCode = await LocalCache.getOrSetString(
|
||||
'data-type',
|
||||
'not-null',
|
||||
async () => {
|
||||
return await LocalFile.read(
|
||||
'/usr/src/app/CodeExamples/DataTypes/NotNull.md'
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
pageData.notEqualToCode = await LocalCache.getOrSetString(
|
||||
'data-type',
|
||||
'not-equals',
|
||||
async () => {
|
||||
return await LocalFile.read(
|
||||
'/usr/src/app/CodeExamples/DataTypes/NotEqualTo.md'
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
res.status(200);
|
||||
return res.render('pages/index', {
|
||||
page: 'data-types',
|
||||
pageTitle: 'Data Types',
|
||||
pageDescription:
|
||||
'Data Types that can be used to interact with OneUptime API',
|
||||
resources: Resources,
|
||||
pageData: pageData,
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
import { ExpressRequest, ExpressResponse } from 'CommonServer/Utils/Express';
|
||||
import ResourceUtil, { ModelDocumentation } from '../Utils/Resources';
|
||||
|
||||
const Resources: Array<ModelDocumentation> = ResourceUtil.getResources();
|
||||
|
||||
export default class ServiceHandler {
|
||||
public static async executeResponse(
|
||||
req: ExpressRequest,
|
||||
res: ExpressResponse
|
||||
): Promise<void> {
|
||||
let pageTitle: string = '';
|
||||
let pageDescription: string = '';
|
||||
const page: string | undefined = req.params['page'];
|
||||
const pageData: any = {};
|
||||
|
||||
pageTitle = 'Errors';
|
||||
pageDescription = 'Learn more about how we reuturn errors from API';
|
||||
|
||||
return res.render('pages/index', {
|
||||
page: page,
|
||||
resources: Resources,
|
||||
pageTitle: pageTitle,
|
||||
pageDescription: pageDescription,
|
||||
pageData: pageData,
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
import { ExpressRequest, ExpressResponse } from 'CommonServer/Utils/Express';
|
||||
import ResourceUtil, { ModelDocumentation } from '../Utils/Resources';
|
||||
|
||||
const Resources: Array<ModelDocumentation> = ResourceUtil.getResources();
|
||||
const FeaturedResources: Array<ModelDocumentation> =
|
||||
ResourceUtil.getFeaturedResources();
|
||||
|
||||
export default class ServiceHandler {
|
||||
public static async executeResponse(
|
||||
req: ExpressRequest,
|
||||
res: ExpressResponse
|
||||
): Promise<void> {
|
||||
let pageTitle: string = '';
|
||||
let pageDescription: string = '';
|
||||
const page: string | undefined = req.params['page'];
|
||||
const pageData: any = {};
|
||||
|
||||
pageData.featuredResources = FeaturedResources;
|
||||
pageTitle = 'Introduction';
|
||||
pageDescription = 'API Documentation for OneUptime';
|
||||
|
||||
return res.render('pages/index', {
|
||||
page: page,
|
||||
resources: Resources,
|
||||
pageTitle: pageTitle,
|
||||
pageDescription: pageDescription,
|
||||
pageData: pageData,
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -1,240 +0,0 @@
|
||||
import { ColumnAccessControl } from 'Common/Types/Database/AccessControl/AccessControl';
|
||||
import { getTableColumns } from 'Common/Types/Database/TableColumn';
|
||||
import Dictionary from 'Common/Types/Dictionary';
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
import Permission, {
|
||||
PermissionHelper,
|
||||
PermissionProps,
|
||||
} from 'Common/Types/Permission';
|
||||
import { DashboardApiRoute } from 'CommonServer/Config';
|
||||
import LocalCache from 'CommonServer/Infrastructure/LocalCache';
|
||||
import { ExpressRequest, ExpressResponse } from 'CommonServer/Utils/Express';
|
||||
import LocalFile from 'CommonServer/Utils/LocalFile';
|
||||
import ResourceUtil, { ModelDocumentation } from '../Utils/Resources';
|
||||
import PageNotFoundServiceHandler from './PageNotFound';
|
||||
|
||||
const Resources: Array<ModelDocumentation> = ResourceUtil.getResources();
|
||||
const ResourceDictionary: Dictionary<ModelDocumentation> =
|
||||
ResourceUtil.getReosurceDictionaryByPath();
|
||||
|
||||
const PermissionDictionary: Dictionary<PermissionProps> =
|
||||
PermissionHelper.getAllPermissionPropsAsDictionary();
|
||||
|
||||
export default class ServiceHandler {
|
||||
public static async executeResponse(
|
||||
req: ExpressRequest,
|
||||
res: ExpressResponse
|
||||
): Promise<void> {
|
||||
let pageTitle: string = '';
|
||||
let pageDescription: string = '';
|
||||
let page: string | undefined = req.params['page'];
|
||||
const pageData: any = {};
|
||||
|
||||
if (!page) {
|
||||
return PageNotFoundServiceHandler.executeResponse(req, res);
|
||||
}
|
||||
|
||||
const currentResource: ModelDocumentation | undefined =
|
||||
ResourceDictionary[page];
|
||||
|
||||
if (!currentResource) {
|
||||
return PageNotFoundServiceHandler.executeResponse(req, res);
|
||||
}
|
||||
|
||||
// Resource Page.
|
||||
pageTitle = currentResource.name;
|
||||
pageDescription = currentResource.description;
|
||||
|
||||
page = 'model';
|
||||
|
||||
const tableColumns: any = getTableColumns(currentResource.model);
|
||||
|
||||
for (const key in tableColumns) {
|
||||
const accessControl: ColumnAccessControl | null =
|
||||
currentResource.model.getColumnAccessControlFor(key);
|
||||
|
||||
if (!accessControl) {
|
||||
// remove columns with no access
|
||||
delete tableColumns[key];
|
||||
continue;
|
||||
}
|
||||
|
||||
if (
|
||||
accessControl?.create.length === 0 &&
|
||||
accessControl?.read.length === 0 &&
|
||||
accessControl?.update.length === 0
|
||||
) {
|
||||
// remove columns with no access
|
||||
delete tableColumns[key];
|
||||
continue;
|
||||
}
|
||||
|
||||
tableColumns[key].permissions = accessControl;
|
||||
}
|
||||
|
||||
delete tableColumns['deletedAt'];
|
||||
delete tableColumns['deletedByUserId'];
|
||||
delete tableColumns['deletedByUser'];
|
||||
delete tableColumns['version'];
|
||||
|
||||
pageData.title = currentResource.model.singularName;
|
||||
pageData.description = currentResource.model.tableDescription;
|
||||
pageData.columns = tableColumns;
|
||||
pageData.tablePermissions = {
|
||||
read: currentResource.model.readRecordPermissions.map(
|
||||
(permission: Permission) => {
|
||||
return PermissionDictionary[permission];
|
||||
}
|
||||
),
|
||||
update: currentResource.model.updateRecordPermissions.map(
|
||||
(permission: Permission) => {
|
||||
return PermissionDictionary[permission];
|
||||
}
|
||||
),
|
||||
delete: currentResource.model.deleteRecordPermissions.map(
|
||||
(permission: Permission) => {
|
||||
return PermissionDictionary[permission];
|
||||
}
|
||||
),
|
||||
create: currentResource.model.createRecordPermissions.map(
|
||||
(permission: Permission) => {
|
||||
return PermissionDictionary[permission];
|
||||
}
|
||||
),
|
||||
};
|
||||
|
||||
pageData.listRequest = await LocalCache.getOrSetString(
|
||||
'model',
|
||||
'list-request',
|
||||
async () => {
|
||||
return await LocalFile.read(
|
||||
'/usr/src/app/CodeExamples/Model/ListRequest.md'
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
pageData.itemRequest = await LocalCache.getOrSetString(
|
||||
'model',
|
||||
'item-request',
|
||||
async () => {
|
||||
return await LocalFile.read(
|
||||
'/usr/src/app/CodeExamples/Model/ItemRequest.md'
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
pageData.itemResponse = await LocalCache.getOrSetString(
|
||||
'model',
|
||||
'item-response',
|
||||
async () => {
|
||||
return await LocalFile.read(
|
||||
'/usr/src/app/CodeExamples/Model/ItemResponse.md'
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
pageData.countRequest = await LocalCache.getOrSetString(
|
||||
'model',
|
||||
'count-request',
|
||||
async () => {
|
||||
return await LocalFile.read(
|
||||
'/usr/src/app/CodeExamples/Model/CountRequest.md'
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
pageData.countResponse = await LocalCache.getOrSetString(
|
||||
'model',
|
||||
'count-response',
|
||||
async () => {
|
||||
return await LocalFile.read(
|
||||
'/usr/src/app/CodeExamples/Model/CountResponse.md'
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
pageData.updateRequest = await LocalCache.getOrSetString(
|
||||
'model',
|
||||
'update-request',
|
||||
async () => {
|
||||
return await LocalFile.read(
|
||||
'/usr/src/app/CodeExamples/Model/UpdateRequest.md'
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
pageData.updateResponse = await LocalCache.getOrSetString(
|
||||
'model',
|
||||
'update-response',
|
||||
async () => {
|
||||
return await LocalFile.read(
|
||||
'/usr/src/app/CodeExamples/Model/UpdateResponse.md'
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
pageData.createRequest = await LocalCache.getOrSetString(
|
||||
'model',
|
||||
'create-request',
|
||||
async () => {
|
||||
return await LocalFile.read(
|
||||
'/usr/src/app/CodeExamples/Model/CreateRequest.md'
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
pageData.createResponse = await LocalCache.getOrSetString(
|
||||
'model',
|
||||
'create-response',
|
||||
async () => {
|
||||
return await LocalFile.read(
|
||||
'/usr/src/app/CodeExamples/Model/CreateResponse.md'
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
pageData.deleteRequest = await LocalCache.getOrSetString(
|
||||
'model',
|
||||
'delete-request',
|
||||
async () => {
|
||||
return await LocalFile.read(
|
||||
'/usr/src/app/CodeExamples/Model/DeleteRequest.md'
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
pageData.deleteResponse = await LocalCache.getOrSetString(
|
||||
'model',
|
||||
'delete-response',
|
||||
async () => {
|
||||
return await LocalFile.read(
|
||||
'/usr/src/app/CodeExamples/Model/DeleteResponse.md'
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
pageData.listResponse = await LocalCache.getOrSetString(
|
||||
'model',
|
||||
'list-response',
|
||||
async () => {
|
||||
return await LocalFile.read(
|
||||
'/usr/src/app/CodeExamples/Model/ListResponse.md'
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
pageData.exampleObjectID = ObjectID.generate();
|
||||
|
||||
pageData.apiPath =
|
||||
DashboardApiRoute.toString() +
|
||||
currentResource.model.crudApiPath?.toString();
|
||||
|
||||
return res.render('pages/index', {
|
||||
page: page,
|
||||
resources: Resources,
|
||||
pageTitle: pageTitle,
|
||||
pageDescription: pageDescription,
|
||||
pageData: pageData,
|
||||
});
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user