@things-factory/operato-tools 5.0.0-zeta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/Dockerfile +60 -0
- package/LICENSE.md +21 -0
- package/_index.html +91 -0
- package/assets/favicon.ico +0 -0
- package/assets/helps/index.md +1 -0
- package/assets/images/hatiolab-logo.png +0 -0
- package/assets/images/spinner.png +0 -0
- package/assets/manifest/apple-1024.png +0 -0
- package/assets/manifest/apple-120.png +0 -0
- package/assets/manifest/apple-152.png +0 -0
- package/assets/manifest/apple-167.png +0 -0
- package/assets/manifest/apple-180.png +0 -0
- package/assets/manifest/apple-touch-icon.png +0 -0
- package/assets/manifest/badge-128x128.png +0 -0
- package/assets/manifest/chrome-splashscreen-icon-384x384.png +0 -0
- package/assets/manifest/chrome-touch-icon-192x192.png +0 -0
- package/assets/manifest/icon-128x128.png +0 -0
- package/assets/manifest/icon-192x192.png +0 -0
- package/assets/manifest/icon-512x512.png +0 -0
- package/assets/manifest/icon-72x72.png +0 -0
- package/assets/manifest/icon-96x96.png +0 -0
- package/assets/manifest/image-metaog.png +0 -0
- package/assets/manifest/maskable_icon.png +0 -0
- package/assets/manifest/ms-icon-144x144.png +0 -0
- package/assets/manifest/ms-touch-icon-144x144-precomposed.png +0 -0
- package/assets/manifest.json +27 -0
- package/client/actions/main.js +1 -0
- package/client/bootstrap.js +8 -0
- package/client/index.js +1 -0
- package/client/pages/main.js +38 -0
- package/client/reducers/main.js +17 -0
- package/client/route.js +10 -0
- package/client/themes/app-theme.css +142 -0
- package/config/config.development.js +3 -0
- package/config/config.production.js +37 -0
- package/dist-server/controllers/index.js +1 -0
- package/dist-server/controllers/index.js.map +1 -0
- package/dist-server/index.js +21 -0
- package/dist-server/index.js.map +1 -0
- package/dist-server/middlewares/index.js +8 -0
- package/dist-server/middlewares/index.js.map +1 -0
- package/dist-server/migrations/index.js +12 -0
- package/dist-server/migrations/index.js.map +1 -0
- package/dist-server/routes.js +25 -0
- package/dist-server/routes.js.map +1 -0
- package/dist-server/service/index.js +14 -0
- package/dist-server/service/index.js.map +1 -0
- package/installer/config.production.js +40 -0
- package/installer/docker-compose.yml +37 -0
- package/installer/install.sh +54 -0
- package/installer/migrate.sh +1 -0
- package/installer/start.sh +18 -0
- package/installer/stop.sh +1 -0
- package/installer/upgrade.sh +1 -0
- package/openapi/unstable.yaml +41 -0
- package/package.json +43 -0
- package/server/controllers/index.ts +0 -0
- package/server/index.ts +5 -0
- package/server/middlewares/index.ts +3 -0
- package/server/migrations/index.ts +9 -0
- package/server/routes.ts +28 -0
- package/server/service/index.ts +13 -0
- package/things-factory.config.js +13 -0
- package/translations/en.json +1 -0
- package/translations/ko.json +1 -0
- package/translations/ms.json +1 -0
- package/translations/zh.json +1 -0
- package/tsconfig.json +9 -0
- package/views/auth-page.html +93 -0
- package/views/public/home.html +83 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
|
6
|
+
and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
<!-- ## [Unreleased] -->
|
package/Dockerfile
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Use an official ubuntu image
|
|
2
|
+
FROM ubuntu:18.04
|
|
3
|
+
|
|
4
|
+
# Use an official node image
|
|
5
|
+
FROM node:12.20.2
|
|
6
|
+
|
|
7
|
+
ARG DEBIAN_FRONTEND=noninteractive
|
|
8
|
+
|
|
9
|
+
# Install the required packages
|
|
10
|
+
RUN apt-get update -o Acquire::CompressionTypes::Order::=gz
|
|
11
|
+
RUN apt-get upgrade -y
|
|
12
|
+
|
|
13
|
+
RUN echo "deb http://ftp.de.debian.org/debian stable main" > /etc/apt/sources.list
|
|
14
|
+
|
|
15
|
+
RUN apt-get update
|
|
16
|
+
|
|
17
|
+
RUN apt-get install -y --no-install-recommends apt-utils
|
|
18
|
+
RUN apt-get install -y chromium
|
|
19
|
+
RUN apt-get install -y libcups2-dev
|
|
20
|
+
RUN apt-get install -y libavahi-compat-libdnssd-dev
|
|
21
|
+
RUN apt-get install -y gconf-service libasound2 libatk1.0-0 libcairo2 libcups2 libfontconfig1 libgdk-pixbuf2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libxss1 fonts-liberation libnss3 lsb-release xdg-utils libaio1
|
|
22
|
+
|
|
23
|
+
RUN apt update
|
|
24
|
+
RUN apt-get install -y ghostscript
|
|
25
|
+
RUN apt-get install -y curl
|
|
26
|
+
RUN apt-get install -y git
|
|
27
|
+
|
|
28
|
+
# install chrome
|
|
29
|
+
RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
|
|
30
|
+
RUN dpkg -i google-chrome-stable_current_amd64.deb; apt-get -fy install
|
|
31
|
+
RUN rm google-chrome-stable_current_amd64.deb
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
# make oracle path
|
|
36
|
+
RUN mkdir -p /opt/oracle
|
|
37
|
+
WORKDIR /opt/oracle
|
|
38
|
+
|
|
39
|
+
# download newest oracle cilent for connect to Oracle Database
|
|
40
|
+
RUN wget https://download.oracle.com/otn_software/linux/instantclient/instantclient-basiclite-linuxx64.zip && \
|
|
41
|
+
unzip instantclient-basiclite-linuxx64.zip && \
|
|
42
|
+
rm -f instantclient-basiclite-linuxx64.zip && \
|
|
43
|
+
cd /opt/oracle/instantclient* && \
|
|
44
|
+
rm -f *jdbc* *occi* *mysql* *mql1* *ipc1* *jar uidrvci genezi adrci && \
|
|
45
|
+
echo /opt/oracle/instantclient* > /etc/ld.so.conf.d/oracle-instantclient.conf &&\
|
|
46
|
+
ldconfig
|
|
47
|
+
|
|
48
|
+
# Set the working directory to /app
|
|
49
|
+
WORKDIR /app
|
|
50
|
+
|
|
51
|
+
# copy application & configuration files
|
|
52
|
+
COPY . .
|
|
53
|
+
|
|
54
|
+
# run node install command
|
|
55
|
+
RUN yarn install
|
|
56
|
+
|
|
57
|
+
# Make port 3000 available to the world outside this container
|
|
58
|
+
EXPOSE 3000
|
|
59
|
+
|
|
60
|
+
CMD [ "yarn", "run", "serve" ]
|
package/LICENSE.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Hatiolab
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/_index.html
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="utf-8" />
|
|
6
|
+
<title>Operato Tools</title>
|
|
7
|
+
<meta name="generator" content="Things Factory Starter Kit" />
|
|
8
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
9
|
+
<meta name="description" content="Reimagining Software" />
|
|
10
|
+
|
|
11
|
+
<base href="/" />
|
|
12
|
+
|
|
13
|
+
<link rel="icon" href="/assets/favicon.ico" />
|
|
14
|
+
|
|
15
|
+
<!-- See https://goo.gl/OOhYW5 -->
|
|
16
|
+
<link rel="manifest" href="/assets/manifest.json" />
|
|
17
|
+
|
|
18
|
+
<!-- See https://goo.gl/qRE0vM -->
|
|
19
|
+
<meta name="theme-color" content="#22a6a7" />
|
|
20
|
+
|
|
21
|
+
<!-- Add to homescreen for Chrome on Android. Fallback for manifest.json -->
|
|
22
|
+
<meta name="mobile-web-app-capable" content="yes" />
|
|
23
|
+
<meta name="application-name" content="Operato Tools" />
|
|
24
|
+
<meta name="application-description" content="Reimagining Software" />
|
|
25
|
+
<meta name="application-copyright" content="Copyright © hatiolab.com. All Rights Reserved." />
|
|
26
|
+
<link rel="application-icon" href="/assets/manifest/icon-96x96.png" />
|
|
27
|
+
|
|
28
|
+
<!-- Add to homescreen for Safari on iOS -->
|
|
29
|
+
<meta name="apple-mobile-web-app-capable" content="yes" />
|
|
30
|
+
<meta name="apple-mobile-web-app-status-bar-style" content="default" />
|
|
31
|
+
<meta name="apple-mobile-web-app-title" content="Operato Tools" />
|
|
32
|
+
|
|
33
|
+
<!-- Homescreen icons -->
|
|
34
|
+
<link rel="apple-touch-icon" href="/assets/manifest/icon-48x48.png" />
|
|
35
|
+
<link rel="apple-touch-icon" sizes="72x72" href="/assets/manifest/icon-72x72.png" />
|
|
36
|
+
<link rel="apple-touch-icon" sizes="96x96" href="/assets/manifest/icon-96x96.png" />
|
|
37
|
+
<link rel="apple-touch-icon" sizes="144x144" href="/assets/manifest/icon-144x144.png" />
|
|
38
|
+
<link rel="apple-touch-icon" sizes="192x192" href="/assets/manifest/icon-192x192.png" />
|
|
39
|
+
|
|
40
|
+
<!-- Tile icon for Windows 8 (144x144 + tile color) -->
|
|
41
|
+
<meta name="msapplication-TileImage" content="/assets/manifest/icon-144x144.png" />
|
|
42
|
+
<meta name="msapplication-TileColor" content="#3f51b5" />
|
|
43
|
+
<meta name="msapplication-tap-highlight" content="no" />
|
|
44
|
+
|
|
45
|
+
<!-- Default twitter cards -->
|
|
46
|
+
<meta name="twitter:card" content="summary" />
|
|
47
|
+
<meta name="twitter:site" content="@username" />
|
|
48
|
+
<meta property="og:type" content="website" />
|
|
49
|
+
<meta property="og:site_name" content="Operato Tools, Reimagining Software." />
|
|
50
|
+
<meta property="og:image" content="/assets/manifest/image-metaog.png" />
|
|
51
|
+
|
|
52
|
+
<!-- Performance tip: hint to the browser to start the handshake for the fonts site -->
|
|
53
|
+
<link rel="preconnect" href="https://fonts.gstatic.com/" crossorigin />
|
|
54
|
+
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Material+Icons&display=block" />
|
|
55
|
+
|
|
56
|
+
<!-- Add any global styles for body, document, etc. -->
|
|
57
|
+
<style>
|
|
58
|
+
body {
|
|
59
|
+
margin: 0;
|
|
60
|
+
padding: 0;
|
|
61
|
+
overflow: hidden;
|
|
62
|
+
|
|
63
|
+
/* This is a font-stack that tries to use the system-default sans-serifs first */
|
|
64
|
+
font-family: Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
|
|
65
|
+
line-height: 1.5;
|
|
66
|
+
-webkit-font-smoothing: antialiased;
|
|
67
|
+
}
|
|
68
|
+
</style>
|
|
69
|
+
|
|
70
|
+
<script>
|
|
71
|
+
if ('serviceWorker' in navigator) {
|
|
72
|
+
navigator.serviceWorker.register('/service-worker.js', {
|
|
73
|
+
scope: '/'
|
|
74
|
+
})
|
|
75
|
+
}
|
|
76
|
+
</script>
|
|
77
|
+
</head>
|
|
78
|
+
|
|
79
|
+
<body>
|
|
80
|
+
<things-app></things-app>
|
|
81
|
+
<noscript>
|
|
82
|
+
Please enable JavaScript to view this website.
|
|
83
|
+
</noscript>
|
|
84
|
+
<!-- Load webcomponents-loader.js to check and load any polyfills your browser needs -->
|
|
85
|
+
<script src="node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script>
|
|
86
|
+
<script src="node_modules/web-animations-js/web-animations-next.min.js"></script>
|
|
87
|
+
<script src="node_modules/@hatiolab/things-scene/things-scene-min.js"></script>
|
|
88
|
+
<!-- Built with love using PWA Starter Kit -->
|
|
89
|
+
</body>
|
|
90
|
+
|
|
91
|
+
</html>
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Operato Tools
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "Operato Tools",
|
|
3
|
+
"short_name": "Operato Tools",
|
|
4
|
+
"description": "Operato Tools",
|
|
5
|
+
"icons": [
|
|
6
|
+
{
|
|
7
|
+
"src": "manifest/icon-192x192.png",
|
|
8
|
+
"sizes": "192x192",
|
|
9
|
+
"type": "image/png"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"src": "manifest/icon-512x512.png",
|
|
13
|
+
"sizes": "512x512",
|
|
14
|
+
"type": "image/png"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"src": "manifest/maskable_icon.png",
|
|
18
|
+
"sizes": "682x682",
|
|
19
|
+
"type": "image/png",
|
|
20
|
+
"purpose": "maskable"
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"start_url": "/",
|
|
24
|
+
"display": "standalone",
|
|
25
|
+
"theme_color": "#3f51b5",
|
|
26
|
+
"background_color": "#3f51b5"
|
|
27
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const UPDATE_OPERATO_TOOLS = 'UPDATE_OPERATO_TOOLS'
|
package/client/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './actions/main'
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { html, css } from 'lit-element'
|
|
2
|
+
import { connect } from 'pwa-helpers/connect-mixin.js'
|
|
3
|
+
import { store, PageView } from '@things-factory/shell'
|
|
4
|
+
|
|
5
|
+
import logo from '../../assets/images/hatiolab-logo.png'
|
|
6
|
+
|
|
7
|
+
class OperatoToolsMain extends connect(store)(PageView) {
|
|
8
|
+
static get styles() {
|
|
9
|
+
return [
|
|
10
|
+
css`
|
|
11
|
+
:host {
|
|
12
|
+
display: flex;
|
|
13
|
+
}
|
|
14
|
+
`
|
|
15
|
+
]
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
static get properties() {
|
|
19
|
+
return {
|
|
20
|
+
operatoTools: String
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
render() {
|
|
25
|
+
return html`
|
|
26
|
+
<section>
|
|
27
|
+
<h2>OperatoTools</h2>
|
|
28
|
+
<img src=${logo}>
|
|
29
|
+
</section>
|
|
30
|
+
`
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
stateChanged(state) {
|
|
34
|
+
this.operatoTools = state.operatoTools.state_main
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
window.customElements.define('operato-tools-main', OperatoToolsMain)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { UPDATE_OPERATO_TOOLS } from '../actions/main'
|
|
2
|
+
|
|
3
|
+
const INITIAL_STATE = {
|
|
4
|
+
operatoTools: 'ABC'
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
const operatoTools = (state = INITIAL_STATE, action) => {
|
|
8
|
+
switch (action.type) {
|
|
9
|
+
case UPDATE_OPERATO_TOOLS:
|
|
10
|
+
return { ...state }
|
|
11
|
+
|
|
12
|
+
default:
|
|
13
|
+
return state
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export default operatoTools
|
package/client/route.js
ADDED
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
body {
|
|
2
|
+
/* theme color */
|
|
3
|
+
--primary-color-rgb: 34, 166, 167;
|
|
4
|
+
--primary-color: rgb(var(--primary-color-rgb));
|
|
5
|
+
--secondary-color-rgb: 57, 78, 100;
|
|
6
|
+
--secondary-color: rgb(var(--secondary-color-rgb));
|
|
7
|
+
--focus-color: var(--theme-white-color);
|
|
8
|
+
--primary-background-color: var(--secondary-color);
|
|
9
|
+
--secondary-background-color: #283644;
|
|
10
|
+
--main-section-background-color: #f4f7fb;
|
|
11
|
+
--theme-white-color: #fff;
|
|
12
|
+
--theme-black-color: rgba(0, 0, 0, 0.9);
|
|
13
|
+
|
|
14
|
+
--focus-background-color: var(--primary-color);
|
|
15
|
+
--primary-text-color: #111;
|
|
16
|
+
--secondary-text-color: #017e7f;
|
|
17
|
+
|
|
18
|
+
--opacity-dark-color: rgba(0, 0, 0, 0.4);
|
|
19
|
+
--opacity-light-color: rgba(255, 255, 255, 0.8);
|
|
20
|
+
|
|
21
|
+
/* status color */
|
|
22
|
+
--status-success-color: #35a24a;
|
|
23
|
+
--status-warning-color: #ee8d03;
|
|
24
|
+
--status-danger-color: #d14946;
|
|
25
|
+
--status-info-color: #398ace;
|
|
26
|
+
|
|
27
|
+
/* common style */
|
|
28
|
+
--border-radius: 4px;
|
|
29
|
+
--border-dark-color: 1px solid rgba(0, 0, 0, 0.15);
|
|
30
|
+
--border-light-color: 1px solid rgba(255, 255, 255, 0.3);
|
|
31
|
+
|
|
32
|
+
--box-shadow: 2px 2px 3px 0px rgba(0, 0, 0, 0.1);
|
|
33
|
+
|
|
34
|
+
--theme-font: 'Noto', Helvetica;
|
|
35
|
+
|
|
36
|
+
--margin-default: 9px;
|
|
37
|
+
--margin-narrow: 4px;
|
|
38
|
+
--margin-wide: 15px;
|
|
39
|
+
--padding-default: var(--margin-default);
|
|
40
|
+
--padding-narrow: var(--margin-narrow);
|
|
41
|
+
--padding-wide: var(--margin-wide);
|
|
42
|
+
|
|
43
|
+
--scrollbar-thumb-color: rgba(57, 78, 100, 0.5);
|
|
44
|
+
--scrollbar-thumb-hover-color: var(--primary-color);
|
|
45
|
+
|
|
46
|
+
--fontsize-default: 14px;
|
|
47
|
+
--fontsize-small: 13px;
|
|
48
|
+
--fontsize-large: 16px;
|
|
49
|
+
|
|
50
|
+
/* app layout style */
|
|
51
|
+
--app-grid-template-area: 'header header header' 'nav main aside' 'nav footer aside';
|
|
52
|
+
|
|
53
|
+
/* title & description style */
|
|
54
|
+
--title-margin: var(--margin-narrow) 0;
|
|
55
|
+
--title-font: bold 24px var(--theme-font);
|
|
56
|
+
--title-text-color: var(--secondary-color);
|
|
57
|
+
--title-font-mobile: bold 20px var(--theme-font);
|
|
58
|
+
|
|
59
|
+
--page-description-margin: var(--margin-narrow) 0 var(--margin-wide) 0;
|
|
60
|
+
--page-description-font: normal var(--fontsize-default) / 1.2rem var(--theme-font);
|
|
61
|
+
--page-description-color: var(--secondary-text-color);
|
|
62
|
+
|
|
63
|
+
--subtitle-padding: 12px 5px 3px 5px;
|
|
64
|
+
--subtitle-font: bold 18px var(--theme-font);
|
|
65
|
+
--subtitle-text-color: var(--primary-color);
|
|
66
|
+
--subtitle-border-bottom: 1px solid var(--primary-color);
|
|
67
|
+
|
|
68
|
+
/* icon style */
|
|
69
|
+
--icon-tiny-size: 24px;
|
|
70
|
+
--icon-default-size: 36px;
|
|
71
|
+
--icon-big-size: 48px;
|
|
72
|
+
--icon-default-color: var(--theme-white-color);
|
|
73
|
+
|
|
74
|
+
/* material design component themes */
|
|
75
|
+
--mdc-theme-on-primary: var(--theme-white-color);
|
|
76
|
+
--mdc-theme-primary: var(--secondary-text-color);
|
|
77
|
+
--mdc-theme-on-secondary: var(--theme-white-color);
|
|
78
|
+
--mdc-theme-secondary: var(--primary-color);
|
|
79
|
+
--mdc-button-outline-color: var(--primary-color);
|
|
80
|
+
--mdc-danger-button-primary-color: var(--status-danger-color);
|
|
81
|
+
--mdc-danger-button-outline-color: var(--status-danger-color);
|
|
82
|
+
--mdc-button-outline-width: 1px;
|
|
83
|
+
--mdc-button-horizontal-padding: 16px;
|
|
84
|
+
|
|
85
|
+
/* button style */
|
|
86
|
+
--button-background-color: #fafbfc;
|
|
87
|
+
--button-background-focus-color: var(--primary-color);
|
|
88
|
+
--button-border: var(--border-dark-color);
|
|
89
|
+
--button-border-radius: var(--border-radius);
|
|
90
|
+
--button-margin: var(--margin-default) var(--margin-default) var(--margin-default) 0;
|
|
91
|
+
--button-padding: var(--padding-default);
|
|
92
|
+
--button-color: var(--secondary-color);
|
|
93
|
+
--button-font: normal 15px var(--theme-font);
|
|
94
|
+
--button-text-transform: capitalize;
|
|
95
|
+
--button-active-box-shadow: 1px 1px 1px 0px rgba(0, 0, 0, 0.2);
|
|
96
|
+
--button-activ-border: 1px solid var(--primary-color);
|
|
97
|
+
|
|
98
|
+
--button-primary-background-color: var(--primary-color);
|
|
99
|
+
--button-primary-active-background-color: var(--status-success-color);
|
|
100
|
+
--button-primary-padding: var(--margin-default) var(--margin-wide);
|
|
101
|
+
--button-primary-color: var(--theme-white-color);
|
|
102
|
+
--button-primary-font: bold 16px var(--theme-font);
|
|
103
|
+
|
|
104
|
+
/* table style */
|
|
105
|
+
--th-padding: var(--padding-default) 0 var(--padding-default) var(--padding-default);
|
|
106
|
+
--th-border-top: 2px solid var(--secondary-color);
|
|
107
|
+
--th-text-transform: capitalize;
|
|
108
|
+
--th-font: bold var(--fontsize-small) var(--theme-font);
|
|
109
|
+
--th-color: rgba(var(--secondary-color-rgb), 0.8);
|
|
110
|
+
|
|
111
|
+
--tr-background-color: var(--theme-white-color);
|
|
112
|
+
--tr-background-odd-color: rgba(255, 255, 255, 0.4);
|
|
113
|
+
--tr-background-hover-color: #e1f5fe;
|
|
114
|
+
--td-border-bottom: 1px solid rgba(0, 0, 0, 0.09);
|
|
115
|
+
--td-padding: var(--padding-default);
|
|
116
|
+
--td-font: normal 13px var(--theme-font);
|
|
117
|
+
--td-color: var(--secondary-color);
|
|
118
|
+
|
|
119
|
+
/* form style */
|
|
120
|
+
--label-font: normal var(--fontsize-default) var(--theme-font);
|
|
121
|
+
--label-color: var(--secondary-color);
|
|
122
|
+
--label-text-transform: capitalize;
|
|
123
|
+
--input-margin: var(--margin-narrow) 0;
|
|
124
|
+
--input-padding: var(--padding-default);
|
|
125
|
+
--input-min-width: 200px;
|
|
126
|
+
--input-font: normal var(--fontsize-default) var(--theme-font);
|
|
127
|
+
--input-hint-font: normal var(--fontsize-small) var(--theme-font);
|
|
128
|
+
--input-hint-color: #666;
|
|
129
|
+
--input-container-max-width: 900px;
|
|
130
|
+
--fieldset-margin: var(--padding-wide) 0;
|
|
131
|
+
--fieldset-padding: 0 var(--padding-wide) var(--padding-wide) var(--padding-wide);
|
|
132
|
+
--legend-padding: var(--padding-default) 0;
|
|
133
|
+
--legend-color: var(--secondary-text-color);
|
|
134
|
+
--legend-font: bold 16px var(--theme-font);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
@media only screen and (max-width: 460px) {
|
|
138
|
+
body {
|
|
139
|
+
/* subtitle style */
|
|
140
|
+
--subtitle-margin: 0;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
subdomain: "system",
|
|
3
|
+
email: {
|
|
4
|
+
host: 'smtp.office365.com', // your sender-email smtp host
|
|
5
|
+
port: 587, // smtp server port
|
|
6
|
+
secure: false, // true for 465, false for other ports
|
|
7
|
+
auth: {
|
|
8
|
+
user: 'your sender-email',
|
|
9
|
+
pass: 'your sender-email password' // generated ethereal password
|
|
10
|
+
},
|
|
11
|
+
secureConnection: false,
|
|
12
|
+
tls: {
|
|
13
|
+
ciphers: 'SSLv3'
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
logger: {
|
|
17
|
+
file: {
|
|
18
|
+
filename: 'logs/application-%DATE%.log',
|
|
19
|
+
datePattern: 'YYYY-MM-DD-HH',
|
|
20
|
+
zippedArchive: false,
|
|
21
|
+
maxSize: '20m',
|
|
22
|
+
maxFiles: '2d',
|
|
23
|
+
level: 'info'
|
|
24
|
+
},
|
|
25
|
+
console: {
|
|
26
|
+
level: 'silly'
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
ormconfig: {
|
|
30
|
+
name: 'default',
|
|
31
|
+
type: 'sqlite',
|
|
32
|
+
database: 'db.sqlite',
|
|
33
|
+
synchronize: false,
|
|
34
|
+
logging: true,
|
|
35
|
+
logger: 'debug'
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/controllers/index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
require("./routes");
|
|
18
|
+
__exportStar(require("./migrations"), exports);
|
|
19
|
+
__exportStar(require("./middlewares"), exports);
|
|
20
|
+
__exportStar(require("./service"), exports);
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../server/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oBAAkB;AAElB,+CAA4B;AAC5B,gDAA6B;AAC7B,4CAAyB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.initMiddlewares = void 0;
|
|
4
|
+
function initMiddlewares(app) {
|
|
5
|
+
/* can add middlewares into app */
|
|
6
|
+
}
|
|
7
|
+
exports.initMiddlewares = initMiddlewares;
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/middlewares/index.ts"],"names":[],"mappings":";;;AAAA,SAAgB,eAAe,CAAC,GAAG;IACjC,kCAAkC;AACpC,CAAC;AAFD,0CAEC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.migrations = void 0;
|
|
4
|
+
const glob = require('glob');
|
|
5
|
+
const path = require('path');
|
|
6
|
+
exports.migrations = [];
|
|
7
|
+
glob.sync(path.resolve(__dirname, '.', '**', '*.js')).forEach(function (file) {
|
|
8
|
+
if (file.indexOf('index.js') !== -1)
|
|
9
|
+
return;
|
|
10
|
+
exports.migrations = exports.migrations.concat(Object.values(require(path.resolve(file))) || []);
|
|
11
|
+
});
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/migrations/index.ts"],"names":[],"mappings":";;;AAAA,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;AAC5B,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;AAEjB,QAAA,UAAU,GAAG,EAAE,CAAA;AAE1B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,UAAS,IAAI;IACzE,IAAI,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QAAE,OAAM;IAC3C,kBAAU,GAAG,kBAAU,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAA;AAClF,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
const debug = require('debug')('things-factory:operato-tools:routes');
|
|
2
|
+
process.on('bootstrap-module-global-public-route', (app, globalPublicRouter) => {
|
|
3
|
+
/*
|
|
4
|
+
* can add global public routes to application (auth not required, tenancy not required)
|
|
5
|
+
*
|
|
6
|
+
* ex) routes.get('/path', async(context, next) => {})
|
|
7
|
+
* ex) routes.post('/path', async(context, next) => {})
|
|
8
|
+
*/
|
|
9
|
+
});
|
|
10
|
+
process.on('bootstrap-module-global-private-route', (app, globalPrivateRouter) => {
|
|
11
|
+
/*
|
|
12
|
+
* can add global private routes to application (auth required, tenancy not required)
|
|
13
|
+
*/
|
|
14
|
+
});
|
|
15
|
+
process.on('bootstrap-module-domain-public-route', (app, domainPublicRouter) => {
|
|
16
|
+
/*
|
|
17
|
+
* can add domain public routes to application (auth not required, tenancy required)
|
|
18
|
+
*/
|
|
19
|
+
});
|
|
20
|
+
process.on('bootstrap-module-domain-private-route', (app, domainPrivateRouter) => {
|
|
21
|
+
/*
|
|
22
|
+
* can add domain private routes to application (auth required, tenancy required)
|
|
23
|
+
*/
|
|
24
|
+
});
|
|
25
|
+
//# sourceMappingURL=routes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routes.js","sourceRoot":"","sources":["../server/routes.ts"],"names":[],"mappings":"AAAA,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,qCAAqC,CAAC,CAAA;AAErE,OAAO,CAAC,EAAE,CAAC,sCAA6C,EAAE,CAAC,GAAG,EAAE,kBAAkB,EAAE,EAAE;IACpF;;;;;OAKG;AACL,CAAC,CAAC,CAAA;AAEF,OAAO,CAAC,EAAE,CAAC,uCAA8C,EAAE,CAAC,GAAG,EAAE,mBAAmB,EAAE,EAAE;IACtF;;OAEG;AACL,CAAC,CAAC,CAAA;AAEF,OAAO,CAAC,EAAE,CAAC,sCAA6C,EAAE,CAAC,GAAG,EAAE,kBAAkB,EAAE,EAAE;IACpF;;OAEG;AACL,CAAC,CAAC,CAAA;AAEF,OAAO,CAAC,EAAE,CAAC,uCAA8C,EAAE,CAAC,GAAG,EAAE,mBAAmB,EAAE,EAAE;IACtF;;OAEG;AACL,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* EXPORT ENTITY TYPES */
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.schema = exports.entities = void 0;
|
|
5
|
+
/* IMPORT ENTITIES AND RESOLVERS */
|
|
6
|
+
exports.entities = [
|
|
7
|
+
/* ENTITIES */
|
|
8
|
+
];
|
|
9
|
+
exports.schema = {
|
|
10
|
+
resolverClasses: [
|
|
11
|
+
/* RESOLVER CLASSES */
|
|
12
|
+
]
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/service/index.ts"],"names":[],"mappings":";AAAA,yBAAyB;;;AAEzB,mCAAmC;AAEtB,QAAA,QAAQ,GAAG;AACtB,cAAc;CACf,CAAA;AAEY,QAAA,MAAM,GAAG;IACpB,eAAe,EAAE;IACf,sBAAsB;KACvB;CACF,CAAA"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
SECRET: '0xD58F835B69D207A76CC5F84a70a1D0d4C79dAC95', // should be changed
|
|
3
|
+
email: {
|
|
4
|
+
host: 'smtp.office365.com', // your sender-email smtp host
|
|
5
|
+
port: 587, // smtp server port
|
|
6
|
+
secure: false, // true for 465, false for other ports
|
|
7
|
+
auth: {
|
|
8
|
+
user: 'your sender-email',
|
|
9
|
+
pass: 'your sender-email password' // generated ethereal password
|
|
10
|
+
},
|
|
11
|
+
secureConnection: false,
|
|
12
|
+
tls: {
|
|
13
|
+
ciphers: 'SSLv3'
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
logger: {
|
|
17
|
+
file: {
|
|
18
|
+
filename: 'logs/application-%DATE%.log',
|
|
19
|
+
datePattern: 'YYYY-MM-DD-HH',
|
|
20
|
+
zippedArchive: false,
|
|
21
|
+
maxSize: '20m',
|
|
22
|
+
maxFiles: '2d',
|
|
23
|
+
level: 'info'
|
|
24
|
+
},
|
|
25
|
+
console: {
|
|
26
|
+
level: 'silly'
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
ormconfig: {
|
|
30
|
+
name: 'default',
|
|
31
|
+
type: 'postgres',
|
|
32
|
+
host: 'postgres',
|
|
33
|
+
port: 5432,
|
|
34
|
+
database: 'postgres',
|
|
35
|
+
username: 'postgres',
|
|
36
|
+
password: 'abcd1234',
|
|
37
|
+
synchronize: true,
|
|
38
|
+
logging: true
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
version: '3'
|
|
2
|
+
services:
|
|
3
|
+
nginx:
|
|
4
|
+
image: hatiolab/operato-nginx:latest
|
|
5
|
+
ports:
|
|
6
|
+
- ${HostPort}:80
|
|
7
|
+
depends_on:
|
|
8
|
+
- app
|
|
9
|
+
app:
|
|
10
|
+
build: .
|
|
11
|
+
container_name: operato-tools
|
|
12
|
+
image: hatiolab/operato-tools:latest
|
|
13
|
+
privileged: true
|
|
14
|
+
volumes:
|
|
15
|
+
- ./logs:/app/logs
|
|
16
|
+
- ./config.production.js:/app/config.production.js
|
|
17
|
+
ports:
|
|
18
|
+
- 4000:3000
|
|
19
|
+
depends_on:
|
|
20
|
+
- postgres
|
|
21
|
+
- mosquitto
|
|
22
|
+
postgres:
|
|
23
|
+
image: postgres:13.2
|
|
24
|
+
container_name: db-operato-tools
|
|
25
|
+
environment:
|
|
26
|
+
POSTGRES_PASSWORD: abcd1234
|
|
27
|
+
POSTGRES_USER: postgres
|
|
28
|
+
PGDATA: /var/lib/postgresql/data/pgdata
|
|
29
|
+
volumes:
|
|
30
|
+
- ./postgres_data:/var/lib/postgresql/data/pgdata
|
|
31
|
+
ports:
|
|
32
|
+
- '55432:5432'
|
|
33
|
+
mosquitto:
|
|
34
|
+
image: eclipse-mosquitto:latest
|
|
35
|
+
ports:
|
|
36
|
+
- 1883:1883
|
|
37
|
+
- 9001:9001
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
if [ -f "config.production.js" ] ; then
|
|
2
|
+
echo "config.production.js exist"
|
|
3
|
+
else
|
|
4
|
+
echo "config.production.js create"
|
|
5
|
+
curl -O https://raw.githubusercontent.com/things-factory/things-factory/master/packages/operato-tools/installer/config.production.js
|
|
6
|
+
fi
|
|
7
|
+
|
|
8
|
+
if [ -f "start.sh" ] ; then
|
|
9
|
+
echo "start.sh exist"
|
|
10
|
+
else
|
|
11
|
+
echo "start.sh create"
|
|
12
|
+
curl -O https://raw.githubusercontent.com/things-factory/things-factory/master/packages/operato-tools/installer/start.sh
|
|
13
|
+
fi
|
|
14
|
+
|
|
15
|
+
if [ -f "stop.sh" ] ; then
|
|
16
|
+
echo "stop.sh exist"
|
|
17
|
+
else
|
|
18
|
+
echo "stop.sh create"
|
|
19
|
+
curl -O https://raw.githubusercontent.com/things-factory/things-factory/master/packages/operato-tools/installer/stop.sh
|
|
20
|
+
fi
|
|
21
|
+
|
|
22
|
+
if [ -f "upgrade.sh" ] ; then
|
|
23
|
+
echo "upgrade.sh exist"
|
|
24
|
+
else
|
|
25
|
+
echo "upgrade.sh create"
|
|
26
|
+
curl -O https://raw.githubusercontent.com/things-factory/things-factory/master/packages/operato-tools/installer/upgrade.sh
|
|
27
|
+
fi
|
|
28
|
+
|
|
29
|
+
if [ -f "migrate.sh" ] ; then
|
|
30
|
+
echo "migrate.sh exist"
|
|
31
|
+
else
|
|
32
|
+
echo "migrate.sh create"
|
|
33
|
+
curl -O https://raw.githubusercontent.com/things-factory/things-factory/master/packages/operato-tools/installer/migrate.sh
|
|
34
|
+
fi
|
|
35
|
+
|
|
36
|
+
if [ -f "docker-compose.yml" ] ; then
|
|
37
|
+
echo "docker-compose.yml exist"
|
|
38
|
+
else
|
|
39
|
+
echo "docker-compose.yml create"
|
|
40
|
+
curl -O https://raw.githubusercontent.com/things-factory/things-factory/master/packages/operato-tools/installer/docker-compose.yml
|
|
41
|
+
fi
|
|
42
|
+
|
|
43
|
+
chmod u+x start.sh
|
|
44
|
+
chmod u+x stop.sh
|
|
45
|
+
chmod u+x upgrade.sh
|
|
46
|
+
chmod u+x migrate.sh
|
|
47
|
+
|
|
48
|
+
echo "HostPort=3000" > .env
|
|
49
|
+
|
|
50
|
+
docker pull hatiolab/operato-tools:latest
|
|
51
|
+
|
|
52
|
+
docker pull hatiolab/operato-nginx:latest
|
|
53
|
+
|
|
54
|
+
docker-compose create
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
docker exec -it operato-tools npm run migration -- --mode=production
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
HOST_PORT=3000
|
|
2
|
+
|
|
3
|
+
if [ $# -eq 0 ] ; then
|
|
4
|
+
echo "Warning: default port 3000"
|
|
5
|
+
else
|
|
6
|
+
HOST_PORT=$1
|
|
7
|
+
fi
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
echo "HOST_PORT : ${HOST_PORT}"
|
|
11
|
+
|
|
12
|
+
echo "HostPort="$HOST_PORT > .env
|
|
13
|
+
|
|
14
|
+
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
|
15
|
+
xhost +"local:docker@"
|
|
16
|
+
fi
|
|
17
|
+
|
|
18
|
+
docker-compose up -d
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
docker-compose stop
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
curl -fsSL https://raw.githubusercontent.com/things-factory/things-factory/master/packages/operato-tools/installer/install.sh | bash -s
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
openapi: 3.0.0
|
|
2
|
+
info:
|
|
3
|
+
description: >
|
|
4
|
+
For the latest release information please check our [release notes](https://developer.operato-tools.com/release_notes).
|
|
5
|
+
The Operato Tools API exposes integrations endpoint and related functions.
|
|
6
|
+
version: 'unstable'
|
|
7
|
+
title: 'Operato Tools'
|
|
8
|
+
termsOfService: 'https://operato-tools.com/terms/'
|
|
9
|
+
contact:
|
|
10
|
+
email: 'heartyoh@hatiolab.com'
|
|
11
|
+
license:
|
|
12
|
+
name: MIT
|
|
13
|
+
url: http://mit-license.org/
|
|
14
|
+
tags:
|
|
15
|
+
- name: 'operato-tools'
|
|
16
|
+
description: 'API for read, create and update operato-toolss'
|
|
17
|
+
schemes:
|
|
18
|
+
- 'https'
|
|
19
|
+
- 'http'
|
|
20
|
+
servers:
|
|
21
|
+
- url: '/api/unstable'
|
|
22
|
+
|
|
23
|
+
components:
|
|
24
|
+
securitySchemes:
|
|
25
|
+
basicAuth:
|
|
26
|
+
type: http
|
|
27
|
+
scheme: basic
|
|
28
|
+
bearerAuth:
|
|
29
|
+
type: http
|
|
30
|
+
scheme: bearer
|
|
31
|
+
|
|
32
|
+
security:
|
|
33
|
+
- basicAuth: []
|
|
34
|
+
- bearerAuth: []
|
|
35
|
+
responses:
|
|
36
|
+
UnauthorizedError:
|
|
37
|
+
description: Unauthorized
|
|
38
|
+
|
|
39
|
+
externalDocs:
|
|
40
|
+
description: 'Find out about our release notes'
|
|
41
|
+
url: 'https://developer.operato-tools.com/release_notes'
|
package/package.json
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@things-factory/operato-tools",
|
|
3
|
+
"version": "5.0.0-zeta.1",
|
|
4
|
+
"main": "dist-server/index.js",
|
|
5
|
+
"browser": "client/index.js",
|
|
6
|
+
"things-factory": true,
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"author": "heartyoh",
|
|
9
|
+
"description": "Applications that provide framework-specific tools for development and operational maintenance",
|
|
10
|
+
"publishConfig": {
|
|
11
|
+
"access": "public",
|
|
12
|
+
"@things-factory:registry": "https://registry.npmjs.org"
|
|
13
|
+
},
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "git+https://github.com/hatiolab/things-factory.git",
|
|
17
|
+
"directory": "packages/operato-tools"
|
|
18
|
+
},
|
|
19
|
+
"scripts": {
|
|
20
|
+
"serve": "things-factory operato-tools",
|
|
21
|
+
"serve:dev": "npm run build:server && things-factory-dev operato-tools",
|
|
22
|
+
"build": "tsc --p tsconfig.json",
|
|
23
|
+
"build:client": "npm run clean:client && webpack --config ../builder/webpack.config.js",
|
|
24
|
+
"build:server": "npm run clean:server && tsc",
|
|
25
|
+
"clean:server": "rm -rf dist-server",
|
|
26
|
+
"clean:client": "rm -rf dist-client",
|
|
27
|
+
"clean": "npm run clean:server && npm run clean:client",
|
|
28
|
+
"migration": "npm run build:server && things-factory-migration",
|
|
29
|
+
"migration:privileges": "npm run build:server && things-factory-migration-privileges",
|
|
30
|
+
"migration:create": "node ../../node_modules/typeorm/cli.js migration:create -d ./server/migrations",
|
|
31
|
+
"migration:generate": "node ../../node_modules/typeorm/cli.js migration:generate",
|
|
32
|
+
"migration:run": "node ../../node_modules/typeorm/cli.js migration:run",
|
|
33
|
+
"migration:revert": "node ../../node_modules/typeorm/cli.js migration:revert",
|
|
34
|
+
"stop:dev": "kill $(lsof -t -i:3000,3001)",
|
|
35
|
+
"stop": "things-factory-stop operato-tools",
|
|
36
|
+
"docker": "things-factory-dockerize hatiolab/operato-tools:latest",
|
|
37
|
+
"docker:run": "docker run -it -p 4000:3000 hatiolab/operato-tools:latest"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@things-factory/builder": "^5.0.0-zeta.1"
|
|
41
|
+
},
|
|
42
|
+
"gitHead": "7b69e48d7a0441c5dda884cc895914a6ae3b1c27"
|
|
43
|
+
}
|
|
File without changes
|
package/server/index.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const glob = require('glob')
|
|
2
|
+
const path = require('path')
|
|
3
|
+
|
|
4
|
+
export var migrations = []
|
|
5
|
+
|
|
6
|
+
glob.sync(path.resolve(__dirname, '.', '**', '*.js')).forEach(function(file) {
|
|
7
|
+
if (file.indexOf('index.js') !== -1) return
|
|
8
|
+
migrations = migrations.concat(Object.values(require(path.resolve(file))) || [])
|
|
9
|
+
})
|
package/server/routes.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
const debug = require('debug')('things-factory:operato-tools:routes')
|
|
2
|
+
|
|
3
|
+
process.on('bootstrap-module-global-public-route' as any, (app, globalPublicRouter) => {
|
|
4
|
+
/*
|
|
5
|
+
* can add global public routes to application (auth not required, tenancy not required)
|
|
6
|
+
*
|
|
7
|
+
* ex) routes.get('/path', async(context, next) => {})
|
|
8
|
+
* ex) routes.post('/path', async(context, next) => {})
|
|
9
|
+
*/
|
|
10
|
+
})
|
|
11
|
+
|
|
12
|
+
process.on('bootstrap-module-global-private-route' as any, (app, globalPrivateRouter) => {
|
|
13
|
+
/*
|
|
14
|
+
* can add global private routes to application (auth required, tenancy not required)
|
|
15
|
+
*/
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
process.on('bootstrap-module-domain-public-route' as any, (app, domainPublicRouter) => {
|
|
19
|
+
/*
|
|
20
|
+
* can add domain public routes to application (auth not required, tenancy required)
|
|
21
|
+
*/
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
process.on('bootstrap-module-domain-private-route' as any, (app, domainPrivateRouter) => {
|
|
25
|
+
/*
|
|
26
|
+
* can add domain private routes to application (auth required, tenancy required)
|
|
27
|
+
*/
|
|
28
|
+
})
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<title>Operato Tools</title>
|
|
6
|
+
<meta name="generator" content="Things Factory Starter Kit" />
|
|
7
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
8
|
+
<meta name="description" content="Heart of Logistics" />
|
|
9
|
+
|
|
10
|
+
<base href="/" />
|
|
11
|
+
|
|
12
|
+
<link rel="icon" href="/assets/favicon.ico" />
|
|
13
|
+
|
|
14
|
+
<!-- See https://goo.gl/OOhYW5 -->
|
|
15
|
+
<link rel="manifest" href="/assets/manifest.json" />
|
|
16
|
+
|
|
17
|
+
<!-- See https://goo.gl/qRE0vM -->
|
|
18
|
+
<meta name="theme-color" content="#3f51b5" />
|
|
19
|
+
|
|
20
|
+
<!-- Add to homescreen for Chrome on Android. Fallback for manifest.json -->
|
|
21
|
+
<meta name="mobile-web-app-capable" content="yes" />
|
|
22
|
+
<meta name="application-name" content="Operato Tools" />
|
|
23
|
+
<meta name="application-description" content="Heart of Logistics" />
|
|
24
|
+
<meta name="application-copyright" content="Copyright © hatiolab.com. All Rights Reserved." />
|
|
25
|
+
<link rel="application-icon" href="/assets/manifest/icon-96x96.png" />
|
|
26
|
+
|
|
27
|
+
<!-- Add to homescreen for Safari on iOS -->
|
|
28
|
+
<meta name="apple-mobile-web-app-capable" content="yes" />
|
|
29
|
+
<meta name="apple-mobile-web-app-status-bar-style" content="default" />
|
|
30
|
+
<meta name="apple-mobile-web-app-title" content="Operato Tools" />
|
|
31
|
+
|
|
32
|
+
<!-- Homescreen icons -->
|
|
33
|
+
<link rel="apple-touch-icon" href="/assets/manifest/icon-48x48.png" />
|
|
34
|
+
<link rel="apple-touch-icon" sizes="72x72" href="/assets/manifest/icon-72x72.png" />
|
|
35
|
+
<link rel="apple-touch-icon" sizes="96x96" href="/assets/manifest/icon-96x96.png" />
|
|
36
|
+
<link rel="apple-touch-icon" sizes="144x144" href="/assets/manifest/icon-144x144.png" />
|
|
37
|
+
<link rel="apple-touch-icon" sizes="192x192" href="/assets/manifest/icon-192x192.png" />
|
|
38
|
+
|
|
39
|
+
<!-- Tile icon for Windows 8 (144x144 + tile color) -->
|
|
40
|
+
<meta name="msapplication-TileImage" content="/assets/manifest/icon-144x144.png" />
|
|
41
|
+
<meta name="msapplication-TileColor" content="#3f51b5" />
|
|
42
|
+
<meta name="msapplication-tap-highlight" content="no" />
|
|
43
|
+
|
|
44
|
+
<!-- Default twitter cards -->
|
|
45
|
+
<meta name="twitter:card" content="summary" />
|
|
46
|
+
<meta name="twitter:site" content="@username" />
|
|
47
|
+
<meta property="og:type" content="website" />
|
|
48
|
+
<meta property="og:site_name" content="Operato Tools, Heart of platform." />
|
|
49
|
+
<meta property="og:image" content="/assets/manifest/image-metaog.png" />
|
|
50
|
+
|
|
51
|
+
<!-- Performance tip: hint to the browser to start the handshake for the fonts site -->
|
|
52
|
+
<link rel="preconnect" href="https://fonts.gstatic.com/" crossorigin />
|
|
53
|
+
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Material+Icons&display=block" />
|
|
54
|
+
<link rel="stylesheet" href="/theme.css" />
|
|
55
|
+
|
|
56
|
+
<style>
|
|
57
|
+
body {
|
|
58
|
+
margin: 0;
|
|
59
|
+
padding: 0;
|
|
60
|
+
overflow: hidden;
|
|
61
|
+
|
|
62
|
+
/* This is a font-stack that tries to use the system-default sans-serifs first */
|
|
63
|
+
font-family: Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
|
|
64
|
+
line-height: 1.5;
|
|
65
|
+
-webkit-font-smoothing: antialiased;
|
|
66
|
+
}
|
|
67
|
+
</style>
|
|
68
|
+
|
|
69
|
+
<!--- prefetch -->
|
|
70
|
+
<link rel="prefetch" href="/auth/signin.js">
|
|
71
|
+
<link rel="prefetch" href="/auth/signup.js">
|
|
72
|
+
<link rel="prefetch" href="/auth/forgot-password.js">
|
|
73
|
+
<link rel="prefetch" href="/auth/checkin.js">
|
|
74
|
+
</head>
|
|
75
|
+
<body>
|
|
76
|
+
<<%- pageElement %> id="page"></<%- pageElement %>>
|
|
77
|
+
<noscript>
|
|
78
|
+
Please enable JavaScript to view this website.
|
|
79
|
+
</noscript>
|
|
80
|
+
<!-- Load webcomponents-loader.js to check and load any polyfills your browser needs -->
|
|
81
|
+
<script src="node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script>
|
|
82
|
+
<script src="node_modules/web-animations-js/web-animations-next.min.js"></script>
|
|
83
|
+
<script src="node_modules/@lottiefiles/lottie-player/dist/lottie-player.js"></script>
|
|
84
|
+
<!-- Built with love using PWA Starter Kit -->
|
|
85
|
+
|
|
86
|
+
<script src="<%- elementScript %>"></script>
|
|
87
|
+
<script src="/theme.js"></script>
|
|
88
|
+
<script>
|
|
89
|
+
var pageEl = document.querySelector('#page')
|
|
90
|
+
page.data = <%- JSON.stringify(data) %>
|
|
91
|
+
</script>
|
|
92
|
+
</body>
|
|
93
|
+
</html>
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<title>Operato Tools</title>
|
|
6
|
+
<meta name="generator" content="Things Factory Starter Kit" />
|
|
7
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
8
|
+
<meta name="description" content="Heart of Logistics" />
|
|
9
|
+
|
|
10
|
+
<base href="/" />
|
|
11
|
+
|
|
12
|
+
<link rel="icon" href="/assets/favicon.ico" />
|
|
13
|
+
|
|
14
|
+
<!-- See https://goo.gl/OOhYW5 -->
|
|
15
|
+
<link rel="manifest" href="/assets/manifest.json" />
|
|
16
|
+
|
|
17
|
+
<!-- See https://goo.gl/qRE0vM -->
|
|
18
|
+
<meta name="theme-color" content="#3f51b5" />
|
|
19
|
+
|
|
20
|
+
<!-- Add to homescreen for Chrome on Android. Fallback for manifest.json -->
|
|
21
|
+
<meta name="mobile-web-app-capable" content="yes" />
|
|
22
|
+
<meta name="application-name" content="Operato Tools" />
|
|
23
|
+
<meta name="application-description" content="Heart of Logistics" />
|
|
24
|
+
<meta name="application-copyright" content="Copyright © hatiolab.com. All Rights Reserved." />
|
|
25
|
+
<link rel="application-icon" href="/assets/manifest/icon-96x96.png" />
|
|
26
|
+
|
|
27
|
+
<!-- Add to homescreen for Safari on iOS -->
|
|
28
|
+
<meta name="apple-mobile-web-app-capable" content="yes" />
|
|
29
|
+
<meta name="apple-mobile-web-app-status-bar-style" content="default" />
|
|
30
|
+
<meta name="apple-mobile-web-app-title" content="Operato Tools" />
|
|
31
|
+
|
|
32
|
+
<!-- Homescreen icons -->
|
|
33
|
+
<link rel="apple-touch-icon" href="/assets/manifest/icon-48x48.png" />
|
|
34
|
+
<link rel="apple-touch-icon" sizes="72x72" href="/assets/manifest/icon-72x72.png" />
|
|
35
|
+
<link rel="apple-touch-icon" sizes="96x96" href="/assets/manifest/icon-96x96.png" />
|
|
36
|
+
<link rel="apple-touch-icon" sizes="144x144" href="/assets/manifest/icon-144x144.png" />
|
|
37
|
+
<link rel="apple-touch-icon" sizes="192x192" href="/assets/manifest/icon-192x192.png" />
|
|
38
|
+
|
|
39
|
+
<!-- Tile icon for Windows 8 (144x144 + tile color) -->
|
|
40
|
+
<meta name="msapplication-TileImage" content="/assets/manifest/icon-144x144.png" />
|
|
41
|
+
<meta name="msapplication-TileColor" content="#3f51b5" />
|
|
42
|
+
<meta name="msapplication-tap-highlight" content="no" />
|
|
43
|
+
|
|
44
|
+
<!-- Default twitter cards -->
|
|
45
|
+
<meta name="twitter:card" content="summary" />
|
|
46
|
+
<meta name="twitter:site" content="@username" />
|
|
47
|
+
<meta property="og:type" content="website" />
|
|
48
|
+
<meta property="og:site_name" content="Operato Tools, Heart of platform." />
|
|
49
|
+
<meta property="og:image" content="/assets/manifest/image-metaog.png" />
|
|
50
|
+
|
|
51
|
+
<!-- Performance tip: hint to the browser to start the handshake for the fonts site -->
|
|
52
|
+
<link rel="preconnect" href="https://fonts.gstatic.com/" crossorigin />
|
|
53
|
+
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Material+Icons&display=block" />
|
|
54
|
+
<link rel="stylesheet" href="/theme.css" />
|
|
55
|
+
|
|
56
|
+
<style>
|
|
57
|
+
body {
|
|
58
|
+
margin: 0;
|
|
59
|
+
padding: 0;
|
|
60
|
+
overflow: hidden;
|
|
61
|
+
|
|
62
|
+
/* This is a font-stack that tries to use the system-default sans-serifs first */
|
|
63
|
+
font-family: Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
|
|
64
|
+
line-height: 1.5;
|
|
65
|
+
-webkit-font-smoothing: antialiased;
|
|
66
|
+
}
|
|
67
|
+
</style>
|
|
68
|
+
|
|
69
|
+
<!--- prefetch -->
|
|
70
|
+
<link rel="prefetch" href="/public/home.js" />
|
|
71
|
+
</head>
|
|
72
|
+
<body>
|
|
73
|
+
<home-page id="page"></home-page>
|
|
74
|
+
<noscript> Please enable JavaScript to view this website. </noscript>
|
|
75
|
+
<!-- Load webcomponents-loader.js to check and load any polyfills your browser needs -->
|
|
76
|
+
<script src="node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script>
|
|
77
|
+
<script src="node_modules/web-animations-js/web-animations-next.min.js"></script>
|
|
78
|
+
<!-- Built with love using PWA Starter Kit -->
|
|
79
|
+
|
|
80
|
+
<script src="/public/home.js"></script>
|
|
81
|
+
<script src="/theme.js"></script>
|
|
82
|
+
</body>
|
|
83
|
+
</html>
|