@c8y/devicemanagement 1019.0.3
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/.browserslistrc +16 -0
- package/NOTICES +41743 -0
- package/cumulocity.config.ts +41 -0
- package/package.json +22 -0
- package/src/app/app.module.ts +85 -0
- package/src/bootstrap.ts +17 -0
- package/src/i18n.ts +18 -0
- package/src/main.ts +19 -0
- package/src/ng1.ts +42 -0
- package/src/polyfills.ts +40 -0
- package/tsconfig.app.json +16 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { EnvironmentOptions } from '@c8y/devkit/dist/options';
|
|
2
|
+
import { author, description, version } from './package.json';
|
|
3
|
+
|
|
4
|
+
const options: EnvironmentOptions = {
|
|
5
|
+
runTime: {
|
|
6
|
+
author,
|
|
7
|
+
description,
|
|
8
|
+
version,
|
|
9
|
+
name: 'devicemanagement',
|
|
10
|
+
contextPath: 'devicemanagement',
|
|
11
|
+
key: 'devicemanagement-application-key',
|
|
12
|
+
rightDrawer: true,
|
|
13
|
+
breadcrumbs: false,
|
|
14
|
+
contentSecurityPolicy:
|
|
15
|
+
"base-uri 'none'; default-src 'self' 'unsafe-inline' http: https: ws: wss:; connect-src 'self' http: https: ws: wss:; script-src 'self' *.mapquestapi.com *.bugherd.com *.twitter.com *.twimg.com *.aptrinsic.com 'unsafe-inline' 'unsafe-eval' data:; style-src * 'unsafe-inline' blob:; img-src * data: blob:; font-src * data:; frame-src *; worker-src 'self' blob:;",
|
|
16
|
+
dynamicOptionsUrl: '/apps/public/public-options/options.json',
|
|
17
|
+
contextHelp: true,
|
|
18
|
+
upgrade: true
|
|
19
|
+
},
|
|
20
|
+
buildTime: {
|
|
21
|
+
federation: [
|
|
22
|
+
'@angular/animations',
|
|
23
|
+
'@angular/cdk',
|
|
24
|
+
'@angular/common',
|
|
25
|
+
'@angular/compiler',
|
|
26
|
+
'@angular/core',
|
|
27
|
+
'@angular/forms',
|
|
28
|
+
'@angular/platform-browser',
|
|
29
|
+
'@angular/platform-browser-dynamic',
|
|
30
|
+
'@angular/router',
|
|
31
|
+
'@angular/upgrade',
|
|
32
|
+
'@c8y/client',
|
|
33
|
+
'@c8y/ngx-components',
|
|
34
|
+
'angular',
|
|
35
|
+
'ngx-bootstrap',
|
|
36
|
+
'@ngx-translate/core'
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export default options;
|
package/package.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@c8y/devicemanagement",
|
|
3
|
+
"version": "1019.0.3",
|
|
4
|
+
"description": "This package is used to scaffold a Device management application for Cumulocity IoT.",
|
|
5
|
+
"dependencies": {
|
|
6
|
+
"@c8y/style": "1019.0.3",
|
|
7
|
+
"@c8y/ng1-modules": "1019.0.3",
|
|
8
|
+
"@c8y/ngx-components": "1019.0.3",
|
|
9
|
+
"@c8y/client": "1019.0.3",
|
|
10
|
+
"@c8y/bootstrap": "1019.0.3",
|
|
11
|
+
"@c8y/devkit": "1019.0.3",
|
|
12
|
+
"@angular/cdk": "^16.2.11",
|
|
13
|
+
"@angular/upgrade": "^16.2.11",
|
|
14
|
+
"angular": "1.6.9",
|
|
15
|
+
"ngx-bootstrap": "11.0.2",
|
|
16
|
+
"rxjs": "^7.4.0"
|
|
17
|
+
},
|
|
18
|
+
"peerDependencies": {
|
|
19
|
+
"@angular/common": ">=15 <17"
|
|
20
|
+
},
|
|
21
|
+
"author": "Cumulocity GmbH"
|
|
22
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
3
|
+
import { UpgradeModule as NgUpgradeModule } from '@angular/upgrade/static';
|
|
4
|
+
import { CoreModule, RouterModule } from '@c8y/ngx-components';
|
|
5
|
+
import { ActilityDeviceRegistrationModule } from '@c8y/ngx-components/actility-device-registration';
|
|
6
|
+
import { AssetsNavigatorModule } from '@c8y/ngx-components/assets-navigator';
|
|
7
|
+
import { BinaryFileDownloadModule } from '@c8y/ngx-components/binary-file-download';
|
|
8
|
+
import { BookmarksModule } from '@c8y/ngx-components/bookmarks';
|
|
9
|
+
import { ChildDevicesModule } from '@c8y/ngx-components/child-devices';
|
|
10
|
+
import {
|
|
11
|
+
DeviceInfoDashboardModule,
|
|
12
|
+
DeviceManagementHomeDashboardModule
|
|
13
|
+
} from '@c8y/ngx-components/context-dashboard';
|
|
14
|
+
import { DeviceListModule } from '@c8y/ngx-components/device-list';
|
|
15
|
+
import { DeviceProfileModule } from '@c8y/ngx-components/device-profile';
|
|
16
|
+
import { DeviceProtocolsModule } from '@c8y/ngx-components/device-protocols';
|
|
17
|
+
import { DeviceShellModule } from '@c8y/ngx-components/device-shell';
|
|
18
|
+
import { DiagnosticsModule } from '@c8y/ngx-components/diagnostics';
|
|
19
|
+
import { LocationModule } from '@c8y/ngx-components/location';
|
|
20
|
+
import { LoriotDeviceRegistrationModule } from '@c8y/ngx-components/loriot-device-registration';
|
|
21
|
+
import { OperationsModule } from '@c8y/ngx-components/operations';
|
|
22
|
+
import { LpwanProtocolModule } from '@c8y/ngx-components/protocol-lpwan';
|
|
23
|
+
import { Lwm2mModule } from '@c8y/ngx-components/protocol-lwm2m';
|
|
24
|
+
import { OpcuaProtocolModule } from '@c8y/ngx-components/protocol-opcua';
|
|
25
|
+
import { RegisterDeviceModule } from '@c8y/ngx-components/register-device';
|
|
26
|
+
import { RepositoryModule } from '@c8y/ngx-components/repository';
|
|
27
|
+
import { SearchModule } from '@c8y/ngx-components/search';
|
|
28
|
+
import { ServicesModule } from '@c8y/ngx-components/services';
|
|
29
|
+
import { SigfoxDeviceRegistrationModule } from '@c8y/ngx-components/sigfox-device-registration';
|
|
30
|
+
import { SubAssetsModule } from '@c8y/ngx-components/sub-assets';
|
|
31
|
+
import { TrustedCertificatesModule } from '@c8y/ngx-components/trusted-certificates';
|
|
32
|
+
import {
|
|
33
|
+
DashboardUpgradeModule,
|
|
34
|
+
HybridAppModule,
|
|
35
|
+
UPGRADE_ROUTES,
|
|
36
|
+
UpgradeModule
|
|
37
|
+
} from '@c8y/ngx-components/upgrade';
|
|
38
|
+
import { cockpitWidgets } from '@c8y/ngx-components/widgets/cockpit';
|
|
39
|
+
import { deviceManagementWidgets } from '@c8y/ngx-components/widgets/device-management';
|
|
40
|
+
|
|
41
|
+
@NgModule({
|
|
42
|
+
imports: [
|
|
43
|
+
// Upgrade module must be the first
|
|
44
|
+
UpgradeModule,
|
|
45
|
+
BrowserAnimationsModule,
|
|
46
|
+
RouterModule.forRoot([...UPGRADE_ROUTES]),
|
|
47
|
+
CoreModule.forRoot(),
|
|
48
|
+
AssetsNavigatorModule.config({
|
|
49
|
+
smartGroups: true
|
|
50
|
+
}),
|
|
51
|
+
OperationsModule,
|
|
52
|
+
OpcuaProtocolModule,
|
|
53
|
+
TrustedCertificatesModule,
|
|
54
|
+
NgUpgradeModule,
|
|
55
|
+
DashboardUpgradeModule,
|
|
56
|
+
RepositoryModule,
|
|
57
|
+
DeviceProfileModule,
|
|
58
|
+
BinaryFileDownloadModule,
|
|
59
|
+
SearchModule,
|
|
60
|
+
ServicesModule,
|
|
61
|
+
LpwanProtocolModule,
|
|
62
|
+
SubAssetsModule,
|
|
63
|
+
ChildDevicesModule,
|
|
64
|
+
DeviceManagementHomeDashboardModule,
|
|
65
|
+
deviceManagementWidgets(),
|
|
66
|
+
cockpitWidgets(['cockpit.welcome.widget', 'Cockpit Welcome']),
|
|
67
|
+
DeviceInfoDashboardModule,
|
|
68
|
+
RegisterDeviceModule,
|
|
69
|
+
SigfoxDeviceRegistrationModule,
|
|
70
|
+
ActilityDeviceRegistrationModule,
|
|
71
|
+
LoriotDeviceRegistrationModule,
|
|
72
|
+
DeviceShellModule,
|
|
73
|
+
DeviceProtocolsModule,
|
|
74
|
+
DiagnosticsModule,
|
|
75
|
+
DeviceListModule,
|
|
76
|
+
Lwm2mModule.forRoot(),
|
|
77
|
+
BookmarksModule,
|
|
78
|
+
LocationModule.config({ addLocation: true })
|
|
79
|
+
]
|
|
80
|
+
})
|
|
81
|
+
export class AppModule extends HybridAppModule {
|
|
82
|
+
constructor(protected upgrade: NgUpgradeModule) {
|
|
83
|
+
super();
|
|
84
|
+
}
|
|
85
|
+
}
|
package/src/bootstrap.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import './polyfills';
|
|
2
|
+
import './ng1';
|
|
3
|
+
|
|
4
|
+
import { enableProdMode } from '@angular/core';
|
|
5
|
+
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
|
6
|
+
import { AppModule } from './app/app.module';
|
|
7
|
+
|
|
8
|
+
declare const __MODE__: string;
|
|
9
|
+
if (__MODE__ === 'production') {
|
|
10
|
+
enableProdMode();
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export function bootstrap() {
|
|
14
|
+
return platformBrowserDynamic()
|
|
15
|
+
.bootstrapModule(AppModule)
|
|
16
|
+
.catch(err => console.log(err));
|
|
17
|
+
}
|
package/src/i18n.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internationalizing files in po format (https://en.wikipedia.org/wiki/Gettext#Translating)
|
|
3
|
+
* You can always add additional strings by adding your own po file. All po files are
|
|
4
|
+
* combined to one JSON file per language and are loaded if the specific language is needed.
|
|
5
|
+
*/
|
|
6
|
+
import '@c8y/ngx-components/locales/de.po';
|
|
7
|
+
import '@c8y/ngx-components/locales/en.po';
|
|
8
|
+
import '@c8y/ngx-components/locales/es.po';
|
|
9
|
+
import '@c8y/ngx-components/locales/fr.po';
|
|
10
|
+
import '@c8y/ngx-components/locales/ja_JP.po';
|
|
11
|
+
import '@c8y/ngx-components/locales/ko.po';
|
|
12
|
+
import '@c8y/ngx-components/locales/nl.po';
|
|
13
|
+
import '@c8y/ngx-components/locales/pl.po';
|
|
14
|
+
import '@c8y/ngx-components/locales/pt_BR.po';
|
|
15
|
+
import '@c8y/ngx-components/locales/ru.po';
|
|
16
|
+
import '@c8y/ngx-components/locales/zh_CN.po';
|
|
17
|
+
import '@c8y/ngx-components/locales/zh_TW.po';
|
|
18
|
+
// import './locales/de.po'; // <- adding additional strings to the german translation.
|
package/src/main.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import './i18n';
|
|
2
|
+
import { applyOptions, loadOptions, loginOptions } from '@c8y/bootstrap';
|
|
3
|
+
|
|
4
|
+
const barHolder: HTMLElement = document.querySelector('body > .init-load');
|
|
5
|
+
export const removeProgress = () => barHolder && barHolder.parentNode.removeChild(barHolder);
|
|
6
|
+
|
|
7
|
+
applicationSetup();
|
|
8
|
+
|
|
9
|
+
async function applicationSetup() {
|
|
10
|
+
const options = await applyOptions({
|
|
11
|
+
...(await loadOptions()),
|
|
12
|
+
...((await loginOptions()) as object)
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
const mod = await import('./bootstrap');
|
|
16
|
+
const bootstrapApp = mod.bootstrap || (window as any).bootstrap || (() => null);
|
|
17
|
+
|
|
18
|
+
return Promise.resolve(bootstrapApp(options)).then(removeProgress);
|
|
19
|
+
}
|
package/src/ng1.ts
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import '@c8y/ng1-modules/core';
|
|
2
|
+
import '@c8y/ng1-modules/aclManagement/cumulocity.json';
|
|
3
|
+
import '@c8y/ng1-modules/dashboard2/cumulocity.json';
|
|
4
|
+
import '@c8y/ng1-modules/devicePropertyWidget/cumulocity.json';
|
|
5
|
+
import '@c8y/ng1-modules/qrCode/cumulocity.json';
|
|
6
|
+
import '@c8y/ng1-modules/deviceControlRelay/cumulocity.json';
|
|
7
|
+
import '@c8y/ng1-modules/deviceControlRelayArray/cumulocity.json';
|
|
8
|
+
import '@c8y/ng1-modules/administration-deviceUsers/cumulocity.json';
|
|
9
|
+
import '@c8y/ng1-modules/eventsBinary/cumulocity.json';
|
|
10
|
+
import '@c8y/ng1-modules/alarmAssets/cumulocity.json';
|
|
11
|
+
import '@c8y/ng1-modules/kpi/cumulocity.json';
|
|
12
|
+
import '@c8y/ng1-modules/deviceSelector/cumulocity.json';
|
|
13
|
+
import '@c8y/ng1-modules/smartRules/cumulocity.json';
|
|
14
|
+
import '@c8y/ng1-modules/relayWidget/cumulocity.json';
|
|
15
|
+
import '@c8y/ng1-modules/commandTemplates/cumulocity.json';
|
|
16
|
+
import '@c8y/ng1-modules/connectivityV2/cumulocity.json';
|
|
17
|
+
import '@c8y/ng1-modules/smartRestEditor/cumulocity.json';
|
|
18
|
+
import '@c8y/ng1-modules/smartRestEditorUI/cumulocity.json';
|
|
19
|
+
import '@c8y/ng1-modules/simulators/cumulocity.json';
|
|
20
|
+
import '@c8y/ng1-modules/remoteAccess/cumulocity.json';
|
|
21
|
+
import '@c8y/ng1-modules/deviceActility/cumulocity.json';
|
|
22
|
+
import '@c8y/ng1-modules/devicemanagement-aclManagement/cumulocity.json';
|
|
23
|
+
import '@c8y/ng1-modules/devicemanagement-deviceManagement/cumulocity.json';
|
|
24
|
+
import '@c8y/ng1-modules/devicemanagement-deviceListMap/cumulocity.json';
|
|
25
|
+
import '@c8y/ng1-modules/devicemanagement-alarmList/cumulocity.json';
|
|
26
|
+
import '@c8y/ng1-modules/devicemanagement-deviceNetwork/cumulocity.json';
|
|
27
|
+
import '@c8y/ng1-modules/devicemanagement-eventList/cumulocity.json';
|
|
28
|
+
import '@c8y/ng1-modules/devicemanagement-availability/cumulocity.json';
|
|
29
|
+
import '@c8y/ng1-modules/devicemanagement-tracking/cumulocity.json';
|
|
30
|
+
import '@c8y/ng1-modules/devicemanagement-measurements/cumulocity.json';
|
|
31
|
+
import '@c8y/ng1-modules/devicemanagement-vendMeDeviceControl/cumulocity.json';
|
|
32
|
+
import '@c8y/ng1-modules/groupsHierarchy/cumulocity.json';
|
|
33
|
+
import '@c8y/ng1-modules/devicemanagement-tixiDeviceControl/cumulocity.json';
|
|
34
|
+
import '@c8y/ng1-modules/devicemanagement-logViewer/cumulocity.json';
|
|
35
|
+
import '@c8y/ng1-modules/fieldbusConfig/cumulocity.json';
|
|
36
|
+
import '@c8y/ng1-modules/deviceDatabase4/cumulocity.json';
|
|
37
|
+
import '@c8y/ng1-modules/modbusConfiguration4/cumulocity.json';
|
|
38
|
+
import '@c8y/ng1-modules/modbusWidget4/cumulocity.json';
|
|
39
|
+
import '@c8y/ng1-modules/device-protocols/cumulocity.json';
|
|
40
|
+
import '@c8y/ng1-modules/device-protocol-lwm2m/cumulocity.json';
|
|
41
|
+
import '@c8y/ng1-modules/device-protocol-opcua-v2/cumulocity.json';
|
|
42
|
+
import '@c8y/ng1-modules/cockpit-alarmRecent/cumulocity.json';
|
package/src/polyfills.ts
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file includes polyfills needed by Angular and is loaded before the app.
|
|
3
|
+
* You can add your own extra polyfills to this file.
|
|
4
|
+
*
|
|
5
|
+
* This file is divided into 2 sections:
|
|
6
|
+
* 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
|
|
7
|
+
* 2. Application imports. Files imported after ZoneJS that should be loaded before your main
|
|
8
|
+
* file.
|
|
9
|
+
*
|
|
10
|
+
* The current setup is for so-called "evergreen" browsers; the last versions of browsers that
|
|
11
|
+
* automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
|
|
12
|
+
* Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
|
|
13
|
+
*
|
|
14
|
+
* Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/***************************************************************************************************
|
|
18
|
+
* BROWSER POLYFILLS
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* By default, zone.js will patch all possible macroTask and DomEvents
|
|
23
|
+
* user can disable parts of macroTask/DomEvents patch by setting following flags
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
(window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
|
|
27
|
+
// (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
|
|
28
|
+
(window as any).__zone_symbol__BLACK_LISTED_EVENTS = [
|
|
29
|
+
'scroll',
|
|
30
|
+
'mousemove',
|
|
31
|
+
'message',
|
|
32
|
+
'mouseover',
|
|
33
|
+
'mouseout',
|
|
34
|
+
'mouseenter',
|
|
35
|
+
'mouseleave'
|
|
36
|
+
]; // disable patch specified eventNames
|
|
37
|
+
/***************************************************************************************************
|
|
38
|
+
* Zone JS is required by default for Angular itself.
|
|
39
|
+
*/
|
|
40
|
+
import 'zone.js/dist/zone'; // Included with Angular CLI.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "../../tsconfig.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"outDir": "./out-tsc/app",
|
|
5
|
+
"noImplicitOverride": false,
|
|
6
|
+
"skipLibCheck": true,
|
|
7
|
+
"strict": false
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"src/main.ts"
|
|
11
|
+
],
|
|
12
|
+
"include": [
|
|
13
|
+
"src/**/*.ts",
|
|
14
|
+
"../ngx-components/**/*.ts"
|
|
15
|
+
]
|
|
16
|
+
}
|