@things-factory/operato-dataset 6.0.27
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 +16 -0
- package/_index.html +89 -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/bootstrap.ts +182 -0
- package/client/index.ts +0 -0
- package/client/menu.ts +135 -0
- package/client/query-data-key-sets.ts +29 -0
- package/client/route.ts +6 -0
- package/client/themes/app-theme.css +142 -0
- package/client/tsconfig.json +12 -0
- package/config/config.development.js +1 -0
- package/config/config.production.js +36 -0
- package/config.development.js +31 -0
- package/db.sqlite +0 -0
- package/dist-server/controllers/index.js +1 -0
- package/dist-server/controllers/index.js.map +1 -0
- package/dist-server/index.js +7 -0
- package/dist-server/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/dist-server/tsconfig.tsbuildinfo +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/logs/.08636eb59927f12972f6774f5947c8507b3564c2-audit.json +165 -0
- package/logs/.5e5d741d8b7784a2fbad65eedc0fd46946aaf6f2-audit.json +110 -0
- package/logs/application-2023-03-25-17.log +15 -0
- package/logs/application-2023-03-26-02.log +8 -0
- package/logs/application-2023-03-26-03.log +10 -0
- package/logs/application-2023-03-26-06.log +21 -0
- package/logs/application-2023-03-26-07.log +11 -0
- package/logs/application-2023-03-26-11.log +1 -0
- package/logs/application-2023-03-26-12.log +2 -0
- package/logs/application-2023-03-26-13.log +52 -0
- package/logs/application-2023-03-26-15.log +5 -0
- package/logs/application-2023-03-26-16.log +2 -0
- package/logs/application-2023-03-26-22.log +5 -0
- package/logs/application-2023-03-27-03.log +5 -0
- package/logs/application-2023-03-27-04.log +35 -0
- package/logs/application-2023-03-27-09.log +84 -0
- package/logs/application-2023-03-27-10.log +20 -0
- package/logs/application-2023-03-27-11.log +16 -0
- package/logs/application-2023-03-27-12.log +6 -0
- package/logs/application-2023-03-27-13.log +19 -0
- package/logs/application-2023-03-27-14.log +20 -0
- package/logs/application-2023-03-27-15.log +10 -0
- package/logs/application-2023-03-27-16.log +13 -0
- package/logs/application-2023-03-27-17.log +16 -0
- package/logs/application-2023-03-27-18.log +11 -0
- package/logs/application-2023-03-27-19.log +4 -0
- package/logs/application-2023-03-27-20.log +4 -0
- package/logs/application-2023-03-27-21.log +1 -0
- package/logs/application-2023-03-27-22.log +2 -0
- package/logs/application-2023-03-27-23.log +4 -0
- package/logs/application-2023-03-28-00.log +2 -0
- package/logs/application-2023-03-28-01.log +2 -0
- package/logs/application-2023-03-28-02.log +3 -0
- package/logs/connections-2023-03-25-14.log +0 -0
- package/logs/connections-2023-03-25-15.log +0 -0
- package/logs/connections-2023-03-25-16.log +0 -0
- package/logs/connections-2023-03-25-17.log +0 -0
- package/logs/connections-2023-03-26-02.log +0 -0
- package/logs/connections-2023-03-26-03.log +0 -0
- package/logs/connections-2023-03-26-06.log +0 -0
- package/logs/connections-2023-03-26-07.log +0 -0
- package/logs/connections-2023-03-26-13.log +0 -0
- package/logs/connections-2023-03-27-03.log +0 -0
- package/logs/connections-2023-03-27-04.log +0 -0
- package/logs/connections-2023-03-27-09.log +0 -0
- package/logs/connections-2023-03-27-10.log +0 -0
- package/logs/connections-2023-03-27-11.log +0 -0
- package/logs/connections-2023-03-27-12.log +0 -0
- package/logs/connections-2023-03-27-13.log +0 -0
- package/logs/connections-2023-03-27-14.log +0 -0
- package/logs/connections-2023-03-27-15.log +0 -0
- package/logs/connections-2023-03-27-16.log +0 -0
- package/logs/connections-2023-03-27-17.log +0 -0
- package/openapi/unstable.yaml +41 -0
- package/package.json +94 -0
- package/schema.gql +4326 -0
- package/server/controllers/index.ts +0 -0
- package/server/index.ts +4 -0
- package/server/routes.ts +28 -0
- package/server/service/index.ts +13 -0
- package/server/tsconfig.json +9 -0
- package/things-factory.config.ts +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/views/auth-page.html +93 -0
- package/views/public/home.html +83 -0
- package/yarn-error.log +23772 -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,16 @@
|
|
|
1
|
+
# Use an official ubuntu image
|
|
2
|
+
FROM hatiolab/operato-env:latest
|
|
3
|
+
|
|
4
|
+
# Set the working directory to /app
|
|
5
|
+
WORKDIR /app
|
|
6
|
+
|
|
7
|
+
# copy application & configuration files
|
|
8
|
+
COPY . .
|
|
9
|
+
|
|
10
|
+
# run node install command
|
|
11
|
+
RUN yarn install
|
|
12
|
+
|
|
13
|
+
# Make port 3000 available to the world outside this container
|
|
14
|
+
EXPOSE 3000
|
|
15
|
+
|
|
16
|
+
CMD [ "yarn", "run", "serve" ]
|
package/_index.html
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<title>Operato Dataset</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="Reimagining Data" />
|
|
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="#22a6a7" />
|
|
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 Dataset" />
|
|
23
|
+
<meta name="application-description" content="Reimagining Data" />
|
|
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 Dataset" />
|
|
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 Dataset, Reimagining Data." />
|
|
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
|
+
|
|
55
|
+
<!-- Add any global styles for body, document, etc. -->
|
|
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
|
+
accent-color: var(--primary-color);
|
|
68
|
+
}
|
|
69
|
+
</style>
|
|
70
|
+
|
|
71
|
+
<script>
|
|
72
|
+
if ('serviceWorker' in navigator) {
|
|
73
|
+
navigator.serviceWorker.register('/service-worker.js', {
|
|
74
|
+
scope: '/'
|
|
75
|
+
})
|
|
76
|
+
}
|
|
77
|
+
</script>
|
|
78
|
+
</head>
|
|
79
|
+
|
|
80
|
+
<body>
|
|
81
|
+
<things-app></things-app>
|
|
82
|
+
<noscript> Please enable JavaScript to view this website. </noscript>
|
|
83
|
+
<!-- Load webcomponents-loader.js to check and load any polyfills your browser needs -->
|
|
84
|
+
<script src="node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script>
|
|
85
|
+
<script src="node_modules/web-animations-js/web-animations-next.min.js"></script>
|
|
86
|
+
<script src="node_modules/@hatiolab/things-scene/things-scene-min.js"></script>
|
|
87
|
+
<!-- Built with love using PWA Starter Kit -->
|
|
88
|
+
</body>
|
|
89
|
+
</html>
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Operato Dataset
|
|
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 Dataset",
|
|
3
|
+
"short_name": "Operato Dataset",
|
|
4
|
+
"description": "Operato Dataset",
|
|
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,182 @@
|
|
|
1
|
+
import '@operato/i18n/ox-i18n.js'
|
|
2
|
+
import '@things-factory/notification'
|
|
3
|
+
import '@things-factory/auth-ui/dist-client' /* for domain-switch */
|
|
4
|
+
|
|
5
|
+
import '@operato/dataset/usecase/ccp'
|
|
6
|
+
import '@operato/dataset/usecase/qc'
|
|
7
|
+
import '@operato/dataset/ox-property-editor-ccp-limits.js'
|
|
8
|
+
import '@operato/dataset/ox-property-editor-qc-limits.js'
|
|
9
|
+
|
|
10
|
+
import { html } from 'lit-html'
|
|
11
|
+
|
|
12
|
+
import { registerDefaultGroups } from '@operato/board'
|
|
13
|
+
import { navigate, store } from '@operato/shell'
|
|
14
|
+
import { OxPropertyEditor } from '@operato/property-editor'
|
|
15
|
+
|
|
16
|
+
import { appendViewpart, toggleOverlay, TOOL_POSITION, VIEWPART_POSITION } from '@operato/layout'
|
|
17
|
+
import { APPEND_APP_TOOL } from '@things-factory/apptool-base'
|
|
18
|
+
import { auth } from '@things-factory/auth-base/dist-client'
|
|
19
|
+
import { setAuthManagementMenus } from '@things-factory/auth-ui'
|
|
20
|
+
import { setupMenuPart, updateMenuTemplate } from '@things-factory/lite-menu'
|
|
21
|
+
import { ADD_MORENDA } from '@things-factory/more-base'
|
|
22
|
+
import { ADD_SETTING } from '@things-factory/setting-base'
|
|
23
|
+
|
|
24
|
+
import { getMenuTemplate } from './menu'
|
|
25
|
+
import { queryDataKeySets } from './query-data-key-sets'
|
|
26
|
+
|
|
27
|
+
console.log(
|
|
28
|
+
`%c
|
|
29
|
+
▄▄ ▄▄▄ ▄▄▄ ▄▄▄ ▄▄ ▄▄▄ ▄▄ ▄ ▄ ▄▄ ▄▄▄ ▄▄▄ ▄▄▄
|
|
30
|
+
▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓
|
|
31
|
+
▓ ▓ ▓▀▀ ▓▀▀ ▓▀▀▄ ▓▀▀▓ ▓ ▓ ▓ ▀▀ ▓▀▀▓ ▓▀▀▓ ▓ ▓ ▓▀▀
|
|
32
|
+
▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓ ▓
|
|
33
|
+
▀▀ ▀ ▀▀▀ ▀ ▀ ▀ ▀ ▀ ▀▀ ▀ ▀ ▀ ▀ ▀▀▀ ▀▀▀ ▀
|
|
34
|
+
`,
|
|
35
|
+
'background: #222; color: #bada55'
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
export default function bootstrap() {
|
|
39
|
+
/* set board-modeller group and default templates */
|
|
40
|
+
registerDefaultGroups()
|
|
41
|
+
|
|
42
|
+
setupMenuPart({
|
|
43
|
+
slotTemplate: html` <domain-switch slot="tail"></domain-switch> `,
|
|
44
|
+
hovering: true
|
|
45
|
+
})
|
|
46
|
+
|
|
47
|
+
OxPropertyEditor.register({
|
|
48
|
+
'ccp-limits': 'ox-property-editor-ccp-limits',
|
|
49
|
+
'qc-limits': 'ox-property-editor-qc-limits'
|
|
50
|
+
})
|
|
51
|
+
|
|
52
|
+
auth.on('profile', async ({ credential }) => {
|
|
53
|
+
updateMenuTemplate(getMenuTemplate(credential.owner, await queryDataKeySets()))
|
|
54
|
+
|
|
55
|
+
/* set auth management menus into more-panel */
|
|
56
|
+
setAuthManagementMenus(credential)
|
|
57
|
+
|
|
58
|
+
if (credential.owner) {
|
|
59
|
+
store.dispatch({
|
|
60
|
+
type: ADD_MORENDA,
|
|
61
|
+
morenda: {
|
|
62
|
+
icon: html` <mwc-icon>pending_actions</mwc-icon> `,
|
|
63
|
+
name: html` <i18n-msg msgid="title.work-shift"></i18n-msg> `,
|
|
64
|
+
action: () => {
|
|
65
|
+
navigate('work-shift')
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
})
|
|
69
|
+
|
|
70
|
+
store.dispatch({
|
|
71
|
+
type: ADD_MORENDA,
|
|
72
|
+
morenda: {
|
|
73
|
+
icon: html` <mwc-icon>device_hub</mwc-icon> `,
|
|
74
|
+
name: html` <ox-i18n msgid="text.connection"></ox-i18n> `,
|
|
75
|
+
action: () => {
|
|
76
|
+
navigate('connection')
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
})
|
|
80
|
+
|
|
81
|
+
store.dispatch({
|
|
82
|
+
type: ADD_MORENDA,
|
|
83
|
+
morenda: {
|
|
84
|
+
icon: html` <mwc-icon>format_list_numbered</mwc-icon> `,
|
|
85
|
+
name: html` <ox-i18n msgid="text.scenario"></ox-i18n> `,
|
|
86
|
+
action: () => {
|
|
87
|
+
navigate('scenario')
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
})
|
|
91
|
+
|
|
92
|
+
store.dispatch({
|
|
93
|
+
type: ADD_MORENDA,
|
|
94
|
+
morenda: {
|
|
95
|
+
icon: html` <mwc-icon>vpn_key</mwc-icon> `,
|
|
96
|
+
name: html` <ox-i18n msgid="text.oauth2-clients"></ox-i18n> `,
|
|
97
|
+
action: () => {
|
|
98
|
+
navigate('oauth2-clients')
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
})
|
|
102
|
+
|
|
103
|
+
store.dispatch({
|
|
104
|
+
type: ADD_SETTING,
|
|
105
|
+
setting: {
|
|
106
|
+
seq: 21,
|
|
107
|
+
template: html` <lite-menu-setting-let></lite-menu-setting-let> `
|
|
108
|
+
}
|
|
109
|
+
})
|
|
110
|
+
|
|
111
|
+
store.dispatch({
|
|
112
|
+
type: ADD_MORENDA,
|
|
113
|
+
morenda: {
|
|
114
|
+
icon: html` <mwc-icon>device_hub</mwc-icon> `,
|
|
115
|
+
name: html` <ox-i18n msgid="text.installable-activities"></ox-i18n> `,
|
|
116
|
+
action: () => {
|
|
117
|
+
navigate('installable-activity-list')
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
})
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
store.dispatch({
|
|
124
|
+
type: ADD_MORENDA,
|
|
125
|
+
morenda: {
|
|
126
|
+
icon: html` <mwc-icon>extension</mwc-icon> `,
|
|
127
|
+
name: html` <ox-i18n msgid="text.api-sandbox"></ox-i18n> `,
|
|
128
|
+
action: () => {
|
|
129
|
+
navigate('api-swagger')
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
})
|
|
133
|
+
|
|
134
|
+
// store.dispatch({
|
|
135
|
+
// type: ADD_MORENDA,
|
|
136
|
+
// morenda: {
|
|
137
|
+
// icon: html` <mwc-icon>help</mwc-icon> `,
|
|
138
|
+
// name: html` <ox-i18n msgid="text.help"></ox-i18n> `,
|
|
139
|
+
// action: () => {
|
|
140
|
+
// navigate('help')
|
|
141
|
+
// }
|
|
142
|
+
// }
|
|
143
|
+
// })
|
|
144
|
+
|
|
145
|
+
/* setting app-tools */
|
|
146
|
+
store.dispatch({
|
|
147
|
+
type: APPEND_APP_TOOL,
|
|
148
|
+
tool: {
|
|
149
|
+
name: 'notification-badge',
|
|
150
|
+
template: html`
|
|
151
|
+
<notification-badge
|
|
152
|
+
@click=${e => {
|
|
153
|
+
toggleOverlay('notification', {
|
|
154
|
+
backdrop: true
|
|
155
|
+
})
|
|
156
|
+
}}
|
|
157
|
+
>
|
|
158
|
+
</notification-badge>
|
|
159
|
+
`,
|
|
160
|
+
position: TOOL_POSITION.REAR
|
|
161
|
+
}
|
|
162
|
+
})
|
|
163
|
+
|
|
164
|
+
appendViewpart({
|
|
165
|
+
name: 'notification',
|
|
166
|
+
viewpart: {
|
|
167
|
+
show: false,
|
|
168
|
+
hovering: 'edge',
|
|
169
|
+
template: html` <notification-list style="min-width: 300px;"></notification-list> `
|
|
170
|
+
},
|
|
171
|
+
position: VIEWPART_POSITION.ASIDEBAR
|
|
172
|
+
})
|
|
173
|
+
|
|
174
|
+
store.dispatch({
|
|
175
|
+
type: ADD_SETTING,
|
|
176
|
+
setting: {
|
|
177
|
+
seq: 20,
|
|
178
|
+
template: html` <notification-setting-let></notification-setting-let> `
|
|
179
|
+
}
|
|
180
|
+
})
|
|
181
|
+
})
|
|
182
|
+
}
|
package/client/index.ts
ADDED
|
File without changes
|
package/client/menu.ts
ADDED
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { asyncReplace } from 'lit/directives/async-replace.js'
|
|
2
|
+
import i18next from 'i18next'
|
|
3
|
+
import { generateActivitySummary, startSubscribeActivitySummary } from '@things-factory/worklist'
|
|
4
|
+
|
|
5
|
+
startSubscribeActivitySummary()
|
|
6
|
+
|
|
7
|
+
export function getMenuTemplate(owner: boolean = false, dataKeySets: any[]) {
|
|
8
|
+
return [
|
|
9
|
+
{
|
|
10
|
+
name: '나의 업무',
|
|
11
|
+
type: 'group'
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
name: '내 업무함',
|
|
15
|
+
icon: 'format_list_bulleted',
|
|
16
|
+
path: 'todo-list',
|
|
17
|
+
badge: () => asyncReplace(generateActivitySummary('numberOfToDos')),
|
|
18
|
+
active: ({ path }) => /^activity\//.test(path)
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
name: '내 결재함',
|
|
22
|
+
icon: 'approval',
|
|
23
|
+
path: 'approval-waiting-list',
|
|
24
|
+
badge: () => asyncReplace(generateActivitySummary('numberOfApprovalWaitings')),
|
|
25
|
+
active: ({ path }) => /^approval\//.test(path)
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
name: '작성중인 업무',
|
|
29
|
+
icon: 'drive_file_rename_outline',
|
|
30
|
+
path: 'draft-list',
|
|
31
|
+
badge: () => asyncReplace(generateActivitySummary('numberOfDrafts'))
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
name: '시작 가능 업무',
|
|
35
|
+
icon: 'rocket_launch',
|
|
36
|
+
path: 'starter-list'
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: '업무 진행 이력',
|
|
40
|
+
icon: 'archive',
|
|
41
|
+
path: 'assigned-list'
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
name: 'DATASET 관리',
|
|
45
|
+
type: 'group'
|
|
46
|
+
},
|
|
47
|
+
owner && {
|
|
48
|
+
name: '데이타셋 관리',
|
|
49
|
+
icon: 'display_settings',
|
|
50
|
+
path: 'data-set-list'
|
|
51
|
+
},
|
|
52
|
+
owner && {
|
|
53
|
+
name: '데이타 키셋 관리',
|
|
54
|
+
icon: 'display_settings',
|
|
55
|
+
path: 'data-key-set-list'
|
|
56
|
+
},
|
|
57
|
+
owner && {
|
|
58
|
+
name: '데이타 수집 센서 관리',
|
|
59
|
+
icon: 'sensors',
|
|
60
|
+
path: 'data-sensor-list'
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
name: 'DATA 입력',
|
|
64
|
+
type: 'group'
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
icon: 'post_add',
|
|
68
|
+
name: '데이타 입력 화면',
|
|
69
|
+
path: 'data-entry-list'
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: 'DATA 샘플/OOC 조회',
|
|
73
|
+
type: 'group'
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
name: '데이타 수집 샘플 조회',
|
|
77
|
+
icon: 'checklist',
|
|
78
|
+
path: 'data-sample-list',
|
|
79
|
+
menus:
|
|
80
|
+
dataKeySets.map(item => {
|
|
81
|
+
return {
|
|
82
|
+
name: item.name,
|
|
83
|
+
icon: 'checklist',
|
|
84
|
+
path: `data-sample-search/${item.id}`
|
|
85
|
+
}
|
|
86
|
+
}) || []
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
name: '데이타 이탈점 조회',
|
|
90
|
+
icon: 'playlist_remove',
|
|
91
|
+
path: 'data-ooc-list'
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
icon: 'newspaper',
|
|
95
|
+
name: '데이타 리포트',
|
|
96
|
+
path: 'data-report-list'
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
icon: 'archive',
|
|
100
|
+
name: '데이타 아카이브',
|
|
101
|
+
path: 'data-archive-list'
|
|
102
|
+
},
|
|
103
|
+
owner && {
|
|
104
|
+
name: 'organization',
|
|
105
|
+
type: 'group'
|
|
106
|
+
},
|
|
107
|
+
owner && {
|
|
108
|
+
name: 'Organization',
|
|
109
|
+
icon: 'account_tree',
|
|
110
|
+
description: '다양한 폼 구성 사례와 가이드라인을 제시합니다.',
|
|
111
|
+
menus: [
|
|
112
|
+
{
|
|
113
|
+
name: '연락처 관리',
|
|
114
|
+
path: 'contact-list'
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
name: '직원 관리',
|
|
118
|
+
path: 'employee-list'
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
name: '부서 관리',
|
|
122
|
+
path: 'department-list'
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
name: '나의 결재선 관리',
|
|
126
|
+
path: 'my-approval-line-templates-page'
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
name: '공통 결재선 관리',
|
|
130
|
+
path: 'common-approval-line-templates-page'
|
|
131
|
+
}
|
|
132
|
+
]
|
|
133
|
+
}
|
|
134
|
+
].filter(Boolean)
|
|
135
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import gql from 'graphql-tag'
|
|
2
|
+
import { client } from '@operato/graphql'
|
|
3
|
+
|
|
4
|
+
export async function queryDataKeySets(): Promise<
|
|
5
|
+
{ id: string; name: string; description: string; active: boolean }[]
|
|
6
|
+
> {
|
|
7
|
+
const response = await client.query({
|
|
8
|
+
query: gql`
|
|
9
|
+
query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
|
|
10
|
+
responses: dataKeySets(filters: $filters, pagination: $pagination, sortings: $sortings) {
|
|
11
|
+
items {
|
|
12
|
+
id
|
|
13
|
+
name
|
|
14
|
+
description
|
|
15
|
+
active
|
|
16
|
+
}
|
|
17
|
+
total
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
`,
|
|
21
|
+
variables: {
|
|
22
|
+
filters: [],
|
|
23
|
+
pagination: {},
|
|
24
|
+
sortings: []
|
|
25
|
+
}
|
|
26
|
+
})
|
|
27
|
+
|
|
28
|
+
return response.data.responses.items.filter(item => item.active)
|
|
29
|
+
}
|