ThingsBoard UI - Angular 8 - Initial structure.
This commit is contained in:
parent
cae1f02691
commit
fd02c9b96f
@ -116,7 +116,7 @@
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.thingsboard</groupId>
|
||||
<artifactId>ui</artifactId>
|
||||
<artifactId>ui-ngx</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
|
||||
@ -46,7 +46,7 @@
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.thingsboard</groupId>
|
||||
<artifactId>ui</artifactId>
|
||||
<artifactId>ui-ngx</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<type>jar</type>
|
||||
<scope>provided</scope>
|
||||
@ -105,7 +105,7 @@
|
||||
<artifactItems>
|
||||
<artifactItem>
|
||||
<groupId>org.thingsboard</groupId>
|
||||
<artifactId>ui</artifactId>
|
||||
<artifactId>ui-ngx</artifactId>
|
||||
<type>jar</type>
|
||||
<overWrite>false</overWrite>
|
||||
<outputDirectory>${project.build.directory}/web</outputDirectory>
|
||||
|
||||
3
pom.xml
3
pom.xml
@ -100,10 +100,11 @@
|
||||
<module>rule-engine</module>
|
||||
<module>dao</module>
|
||||
<module>transport</module>
|
||||
<module>ui</module>
|
||||
<module>ui-ngx</module>
|
||||
<module>tools</module>
|
||||
<module>application</module>
|
||||
<module>msa</module>
|
||||
<module>ui</module>
|
||||
</modules>
|
||||
|
||||
<profiles>
|
||||
|
||||
29
ui-ngx/.editorconfig
Normal file
29
ui-ngx/.editorconfig
Normal file
@ -0,0 +1,29 @@
|
||||
#
|
||||
# Copyright © 2016-2019 The Thingsboard Authors
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
# Editor configuration, see https://editorconfig.org
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.md]
|
||||
max_line_length = off
|
||||
trim_trailing_whitespace = false
|
||||
46
ui-ngx/.gitignore
vendored
Normal file
46
ui-ngx/.gitignore
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
# See http://help.github.com/ignore-files/ for more about ignoring files.
|
||||
|
||||
# compiled output
|
||||
/dist
|
||||
/tmp
|
||||
/out-tsc
|
||||
# Only exists if Bazel was run
|
||||
/bazel-out
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
|
||||
# profiling files
|
||||
chrome-profiler-events.json
|
||||
speed-measure-plugin.json
|
||||
|
||||
# IDEs and editors
|
||||
/.idea
|
||||
.project
|
||||
.classpath
|
||||
.c9/
|
||||
*.launch
|
||||
.settings/
|
||||
*.sublime-workspace
|
||||
|
||||
# IDE - VSCode
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
.history/*
|
||||
|
||||
# misc
|
||||
/.sass-cache
|
||||
/connect.lock
|
||||
/coverage
|
||||
/libpeerconnection.log
|
||||
npm-debug.log
|
||||
yarn-error.log
|
||||
testem.log
|
||||
/typings
|
||||
|
||||
# System Files
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
167
ui-ngx/angular.json
Normal file
167
ui-ngx/angular.json
Normal file
@ -0,0 +1,167 @@
|
||||
{
|
||||
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
||||
"version": 1,
|
||||
"newProjectRoot": "projects",
|
||||
"projects": {
|
||||
"thingsboard": {
|
||||
"root": "",
|
||||
"sourceRoot": "src",
|
||||
"projectType": "application",
|
||||
"prefix": "tb",
|
||||
"schematics": {
|
||||
"@schematics/angular:component": {
|
||||
"style": "scss"
|
||||
}
|
||||
},
|
||||
"architect": {
|
||||
"build": {
|
||||
"builder": "@angular-builders/custom-webpack:browser",
|
||||
"options": {
|
||||
"outputPath": "target/generated-resources/public",
|
||||
"index": "src/index.html",
|
||||
"main": "src/main.ts",
|
||||
"polyfills": "src/polyfills.ts",
|
||||
"tsConfig": "src/tsconfig.app.json",
|
||||
"assets": [
|
||||
"src/thingsboard.ico",
|
||||
"src/assets"
|
||||
],
|
||||
"styles": [
|
||||
"src/styles.scss"
|
||||
],
|
||||
"scripts": [
|
||||
"node_modules/ace-builds/src-min/ace.js",
|
||||
"node_modules/ace-builds/src-min/ext-language_tools.js",
|
||||
"node_modules/ace-builds/src-min/ext-searchbox.js",
|
||||
"node_modules/ace-builds/src-min/theme-github.js",
|
||||
"node_modules/ace-builds/src-min/mode-text.js",
|
||||
"node_modules/ace-builds/src-min/mode-markdown.js",
|
||||
"node_modules/ace-builds/src-min/mode-html.js",
|
||||
"node_modules/ace-builds/src-min/mode-css.js",
|
||||
"node_modules/ace-builds/src-min/mode-json.js",
|
||||
"node_modules/ace-builds/src-min/mode-java.js",
|
||||
"node_modules/ace-builds/src-min/mode-javascript.js",
|
||||
"node_modules/ace-builds/src-min/snippets/text.js",
|
||||
"node_modules/ace-builds/src-min/snippets/markdown.js",
|
||||
"node_modules/ace-builds/src-min/snippets/html.js",
|
||||
"node_modules/ace-builds/src-min/snippets/css.js",
|
||||
"node_modules/ace-builds/src-min/snippets/json.js",
|
||||
"node_modules/ace-builds/src-min/snippets/java.js",
|
||||
"node_modules/ace-builds/src-min/snippets/javascript.js",
|
||||
{ "bundleName": "worker-html", "input": "node_modules/ace-builds/src-min/worker-html.js" },
|
||||
{ "bundleName": "worker-css", "input": "node_modules/ace-builds/src-min/worker-css.js" },
|
||||
{ "bundleName": "worker-json", "input": "node_modules/ace-builds/src-min/worker-json.js" },
|
||||
{ "bundleName": "worker-javascript", "input": "node_modules/ace-builds/src-min/worker-javascript.js" }
|
||||
],
|
||||
"es5BrowserSupport": true,
|
||||
"customWebpackConfig": {
|
||||
"path": "./extra-webpack.config.js"
|
||||
}
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"fileReplacements": [
|
||||
{
|
||||
"replace": "src/environments/environment.ts",
|
||||
"with": "src/environments/environment.prod.ts"
|
||||
}
|
||||
],
|
||||
"optimization": true,
|
||||
"outputHashing": "all",
|
||||
"sourceMap": false,
|
||||
"extractCss": true,
|
||||
"namedChunks": false,
|
||||
"aot": true,
|
||||
"extractLicenses": true,
|
||||
"vendorChunk": false,
|
||||
"buildOptimizer": true,
|
||||
"budgets": [
|
||||
{
|
||||
"type": "initial",
|
||||
"maximumWarning": "2mb",
|
||||
"maximumError": "5mb"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"serve": {
|
||||
"builder": "@angular-builders/dev-server:generic",
|
||||
"options": {
|
||||
"browserTarget": "thingsboard:build",
|
||||
"proxyConfig": "proxy.conf.json"
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"browserTarget": "thingsboard:build:production"
|
||||
}
|
||||
}
|
||||
},
|
||||
"extract-i18n": {
|
||||
"builder": "@angular-devkit/build-angular:extract-i18n",
|
||||
"options": {
|
||||
"browserTarget": "thingsboard:build"
|
||||
}
|
||||
},
|
||||
"test": {
|
||||
"builder": "@angular-devkit/build-angular:karma",
|
||||
"options": {
|
||||
"main": "src/test.ts",
|
||||
"polyfills": "src/polyfills.ts",
|
||||
"tsConfig": "src/tsconfig.spec.json",
|
||||
"karmaConfig": "src/karma.conf.js",
|
||||
"styles": [
|
||||
"src/styles.scss"
|
||||
],
|
||||
"scripts": [],
|
||||
"assets": [
|
||||
"src/favicon.ico",
|
||||
"src/assets"
|
||||
]
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"builder": "@angular-devkit/build-angular:tslint",
|
||||
"options": {
|
||||
"tsConfig": [
|
||||
"src/tsconfig.app.json",
|
||||
"src/tsconfig.spec.json"
|
||||
],
|
||||
"exclude": [
|
||||
"**/node_modules/**"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"thingsboard-e2e": {
|
||||
"root": "e2e/",
|
||||
"projectType": "application",
|
||||
"prefix": "",
|
||||
"architect": {
|
||||
"e2e": {
|
||||
"builder": "@angular-devkit/build-angular:protractor",
|
||||
"options": {
|
||||
"protractorConfig": "e2e/protractor.conf.js",
|
||||
"devServerTarget": "thingsboard:serve"
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"devServerTarget": "thingsboard:serve:production"
|
||||
}
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"builder": "@angular-devkit/build-angular:tslint",
|
||||
"options": {
|
||||
"tsConfig": "e2e/tsconfig.e2e.json",
|
||||
"exclude": [
|
||||
"**/node_modules/**"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"defaultProject": "thingsboard"
|
||||
}
|
||||
43
ui-ngx/e2e/protractor.conf.js
Normal file
43
ui-ngx/e2e/protractor.conf.js
Normal file
@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Copyright © 2016-2019 The Thingsboard Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
// Protractor configuration file, see link for more information
|
||||
// https://github.com/angular/protractor/blob/master/lib/config.ts
|
||||
|
||||
const { SpecReporter } = require('jasmine-spec-reporter');
|
||||
|
||||
exports.config = {
|
||||
allScriptsTimeout: 11000,
|
||||
specs: [
|
||||
'./src/**/*.e2e-spec.ts'
|
||||
],
|
||||
capabilities: {
|
||||
'browserName': 'chrome'
|
||||
},
|
||||
directConnect: true,
|
||||
baseUrl: 'http://localhost:4200/',
|
||||
framework: 'jasmine',
|
||||
jasmineNodeOpts: {
|
||||
showColors: true,
|
||||
defaultTimeoutInterval: 30000,
|
||||
print: function() {}
|
||||
},
|
||||
onPrepare() {
|
||||
require('ts-node').register({
|
||||
project: require('path').join(__dirname, './tsconfig.e2e.json')
|
||||
});
|
||||
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
|
||||
}
|
||||
};
|
||||
39
ui-ngx/e2e/src/app.e2e-spec.ts
Normal file
39
ui-ngx/e2e/src/app.e2e-spec.ts
Normal file
@ -0,0 +1,39 @@
|
||||
///
|
||||
/// Copyright © 2016-2019 The Thingsboard Authors
|
||||
///
|
||||
/// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
/// you may not use this file except in compliance with the License.
|
||||
/// You may obtain a copy of the License at
|
||||
///
|
||||
/// http://www.apache.org/licenses/LICENSE-2.0
|
||||
///
|
||||
/// Unless required by applicable law or agreed to in writing, software
|
||||
/// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
/// See the License for the specific language governing permissions and
|
||||
/// limitations under the License.
|
||||
///
|
||||
|
||||
import { AppPage } from './app.po';
|
||||
import { browser, logging } from 'protractor';
|
||||
|
||||
describe('workspace-project App', () => {
|
||||
let page: AppPage;
|
||||
|
||||
beforeEach(() => {
|
||||
page = new AppPage();
|
||||
});
|
||||
|
||||
it('should display welcome message', () => {
|
||||
page.navigateTo();
|
||||
expect(page.getTitleText()).toEqual('Welcome to tb-license-server!');
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
// Assert that there are no errors emitted from the browser
|
||||
const logs = await browser.manage().logs().get(logging.Type.BROWSER);
|
||||
expect(logs).not.toContain(jasmine.objectContaining({
|
||||
level: logging.Level.SEVERE,
|
||||
} as logging.Entry));
|
||||
});
|
||||
});
|
||||
27
ui-ngx/e2e/src/app.po.ts
Normal file
27
ui-ngx/e2e/src/app.po.ts
Normal file
@ -0,0 +1,27 @@
|
||||
///
|
||||
/// Copyright © 2016-2019 The Thingsboard Authors
|
||||
///
|
||||
/// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
/// you may not use this file except in compliance with the License.
|
||||
/// You may obtain a copy of the License at
|
||||
///
|
||||
/// http://www.apache.org/licenses/LICENSE-2.0
|
||||
///
|
||||
/// Unless required by applicable law or agreed to in writing, software
|
||||
/// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
/// See the License for the specific language governing permissions and
|
||||
/// limitations under the License.
|
||||
///
|
||||
|
||||
import { browser, by, element } from 'protractor';
|
||||
|
||||
export class AppPage {
|
||||
navigateTo() {
|
||||
return browser.get(browser.baseUrl) as Promise<any>;
|
||||
}
|
||||
|
||||
getTitleText() {
|
||||
return element(by.css('tb-root h1')).getText() as Promise<string>;
|
||||
}
|
||||
}
|
||||
13
ui-ngx/e2e/tsconfig.e2e.json
Normal file
13
ui-ngx/e2e/tsconfig.e2e.json
Normal file
@ -0,0 +1,13 @@
|
||||
{
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../out-tsc/app",
|
||||
"module": "commonjs",
|
||||
"target": "es5",
|
||||
"types": [
|
||||
"jasmine",
|
||||
"jasminewd2",
|
||||
"node"
|
||||
]
|
||||
}
|
||||
}
|
||||
43
ui-ngx/extra-webpack.config.js
Normal file
43
ui-ngx/extra-webpack.config.js
Normal file
@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Copyright © 2016-2019 The Thingsboard Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
const CompressionPlugin = require('compression-webpack-plugin');
|
||||
const webpack = require('webpack');
|
||||
const dirTree = require('directory-tree');
|
||||
|
||||
var langs = [];
|
||||
|
||||
dirTree('./src/assets/locale/', {extensions:/\.json$/}, (item) => {
|
||||
/* It is expected what the name of a locale file has the following format: */
|
||||
/* 'locale.constant-LANG_CODE[_REGION_CODE].json', e.g. locale.constant-es.json or locale.constant-zh_CN.json*/
|
||||
langs.push(item.name.slice(item.name.lastIndexOf('-') + 1, -5));
|
||||
});
|
||||
|
||||
module.exports = {
|
||||
plugins: [
|
||||
new webpack.DefinePlugin({
|
||||
TB_VERSION: JSON.stringify(require('./package.json').version),
|
||||
SUPPORTED_LANGS: JSON.stringify(langs)
|
||||
}),
|
||||
new CompressionPlugin({
|
||||
filename: "[path].gz[query]",
|
||||
algorithm: "gzip",
|
||||
test: /\.js$|\.css$|\.svg$|\.ttf$|\.woff$|\.woff2$|\.eot$|\.json$/,
|
||||
threshold: 10240,
|
||||
minRatio: 0.8,
|
||||
deleteOriginalAssets: false
|
||||
})
|
||||
]
|
||||
};
|
||||
11112
ui-ngx/package-lock.json
generated
Normal file
11112
ui-ngx/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
74
ui-ngx/package.json
Normal file
74
ui-ngx/package.json
Normal file
@ -0,0 +1,74 @@
|
||||
{
|
||||
"name": "thingsboard",
|
||||
"version": "3.0.0",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve --host 0.0.0.0 --open",
|
||||
"build": "ng build",
|
||||
"build:prod": "ng build --prod --vendor-chunk",
|
||||
"test": "ng test",
|
||||
"lint": "ng lint",
|
||||
"e2e": "ng e2e"
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular/animations": "~8.2.0",
|
||||
"@angular/cdk": "~8.1.2",
|
||||
"@angular/common": "~8.2.0",
|
||||
"@angular/compiler": "~8.2.0",
|
||||
"@angular/core": "~8.2.0",
|
||||
"@angular/flex-layout": "^8.0.0-beta.26",
|
||||
"@angular/forms": "~8.2.0",
|
||||
"@angular/material": "^8.1.2",
|
||||
"@angular/platform-browser": "~8.2.0",
|
||||
"@angular/platform-browser-dynamic": "~8.2.0",
|
||||
"@angular/router": "~8.2.0",
|
||||
"@auth0/angular-jwt": "^3.0.0",
|
||||
"@mat-datetimepicker/core": "^2.0.1",
|
||||
"@ngrx/effects": "^8.2.0",
|
||||
"@ngrx/store": "^8.2.0",
|
||||
"@ngrx/store-devtools": "^8.2.0",
|
||||
"@ngx-translate/core": "^11.0.1",
|
||||
"@ngx-translate/http-loader": "^4.0.0",
|
||||
"ace-builds": "^1.4.5",
|
||||
"compass-sass-mixins": "^0.12.7",
|
||||
"core-js": "^3.1.4",
|
||||
"font-awesome": "^4.7.0",
|
||||
"hammerjs": "^2.0.8",
|
||||
"material-design-icons": "^3.0.1",
|
||||
"messageformat": "^2.3.0",
|
||||
"ngx-clipboard": "^12.2.0",
|
||||
"ngx-translate-messageformat-compiler": "^4.5.0",
|
||||
"rxjs": "~6.5.2",
|
||||
"screenfull": "^4.2.1",
|
||||
"tslib": "^1.10.0",
|
||||
"typeface-roboto": "^0.0.75",
|
||||
"zone.js": "~0.9.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-builders/custom-webpack": "^8.1.0",
|
||||
"@angular-builders/dev-server": "^7.3.1",
|
||||
"@angular-devkit/build-angular": "^0.802.0",
|
||||
"@angular/cli": "~8.2.0",
|
||||
"@angular/compiler-cli": "~8.2.0",
|
||||
"@angular/language-service": "~8.2.0",
|
||||
"@types/jasmine": "~3.4.0",
|
||||
"@types/jasminewd2": "~2.0.6",
|
||||
"@types/node": "~10.14.15",
|
||||
"codelyzer": "~5.1.0",
|
||||
"compression-webpack-plugin": "^3.0.0",
|
||||
"directory-tree": "^2.2.3",
|
||||
"jasmine-core": "~3.4.0",
|
||||
"jasmine-spec-reporter": "~4.2.1",
|
||||
"karma": "~4.2.0",
|
||||
"karma-chrome-launcher": "~3.0.0",
|
||||
"karma-coverage-istanbul-reporter": "~2.1.0",
|
||||
"karma-jasmine": "~2.0.1",
|
||||
"karma-jasmine-html-reporter": "^1.4.2",
|
||||
"ngrx-store-freeze": "^0.2.4",
|
||||
"protractor": "~5.4.2",
|
||||
"ts-node": "~8.3.0",
|
||||
"tslint": "~5.18.0",
|
||||
"typescript": "~3.5.3"
|
||||
}
|
||||
}
|
||||
141
ui-ngx/pom.xml
Normal file
141
ui-ngx/pom.xml
Normal file
@ -0,0 +1,141 @@
|
||||
<!--
|
||||
|
||||
Copyright © 2016-2019 The Thingsboard Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
-->
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.thingsboard</groupId>
|
||||
<version>3.0.0-SNAPSHOT</version>
|
||||
<artifactId>thingsboard</artifactId>
|
||||
</parent>
|
||||
<groupId>org.thingsboard</groupId>
|
||||
<artifactId>ui-ngx</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>ThingsBoard Server UI</name>
|
||||
<url>https://thingsboard.io</url>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<main.dir>${basedir}/..</main.dir>
|
||||
</properties>
|
||||
|
||||
<build>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>${project.build.directory}/generated-resources</directory>
|
||||
</resource>
|
||||
</resources>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>com.github.eirslett</groupId>
|
||||
<artifactId>frontend-maven-plugin</artifactId>
|
||||
<version>1.7.5</version>
|
||||
<configuration>
|
||||
<installDirectory>target</installDirectory>
|
||||
<workingDirectory>${basedir}</workingDirectory>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>install node and npm</id>
|
||||
<goals>
|
||||
<goal>install-node-and-npm</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<nodeVersion>v10.16.0</nodeVersion>
|
||||
<npmVersion>6.9.0</npmVersion>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>npm install</id>
|
||||
<goals>
|
||||
<goal>npm</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<arguments>install</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>npm-build</id>
|
||||
<activation>
|
||||
<activeByDefault>true</activeByDefault>
|
||||
</activation>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>com.github.eirslett</groupId>
|
||||
<artifactId>frontend-maven-plugin</artifactId>
|
||||
<version>1.7.5</version>
|
||||
<configuration>
|
||||
<installDirectory>target</installDirectory>
|
||||
<workingDirectory>${basedir}</workingDirectory>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>npm build</id>
|
||||
<goals>
|
||||
<goal>npm</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<arguments>run build:prod</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>npm-start</id>
|
||||
<activation>
|
||||
<property>
|
||||
<name>npm-start</name>
|
||||
</property>
|
||||
</activation>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>com.github.eirslett</groupId>
|
||||
<artifactId>frontend-maven-plugin</artifactId>
|
||||
<version>1.7.5</version>
|
||||
<configuration>
|
||||
<installDirectory>target</installDirectory>
|
||||
<workingDirectory>${basedir}</workingDirectory>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>npm start</id>
|
||||
<goals>
|
||||
<goal>npm</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<arguments>start</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
6
ui-ngx/proxy.conf.json
Normal file
6
ui-ngx/proxy.conf.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"/api": {
|
||||
"target": "http://localhost:8080",
|
||||
"secure": false
|
||||
}
|
||||
}
|
||||
43
ui-ngx/src/app/app.module.ts
Normal file
43
ui-ngx/src/app/app.module.ts
Normal file
@ -0,0 +1,43 @@
|
||||
///
|
||||
/// Copyright © 2016-2019 The Thingsboard Authors
|
||||
///
|
||||
/// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
/// you may not use this file except in compliance with the License.
|
||||
/// You may obtain a copy of the License at
|
||||
///
|
||||
/// http://www.apache.org/licenses/LICENSE-2.0
|
||||
///
|
||||
/// Unless required by applicable law or agreed to in writing, software
|
||||
/// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
/// See the License for the specific language governing permissions and
|
||||
/// limitations under the License.
|
||||
///
|
||||
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { NgModule } from '@angular/core';
|
||||
|
||||
/* import { AppRoutingModule } from './app-routing.module';
|
||||
import { CoreModule } from './core/core.module';
|
||||
import { LoginModule } from './modules/login/login.module';
|
||||
import { HomeModule } from './modules/home/home.module';
|
||||
|
||||
import { AppComponent } from './app.component'; */
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
/* AppComponent */
|
||||
],
|
||||
imports: [
|
||||
/* BrowserModule,
|
||||
BrowserAnimationsModule,
|
||||
AppRoutingModule,
|
||||
CoreModule,
|
||||
LoginModule,
|
||||
HomeModule */
|
||||
],
|
||||
providers: [],
|
||||
bootstrap: [/*AppComponent*/]
|
||||
})
|
||||
export class AppModule { }
|
||||
0
ui-ngx/src/assets/.gitkeep
Normal file
0
ui-ngx/src/assets/.gitkeep
Normal file
BIN
ui-ngx/src/assets/jstree/32px.png
Normal file
BIN
ui-ngx/src/assets/jstree/32px.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 19 KiB |
BIN
ui-ngx/src/assets/jstree/40px.png
Normal file
BIN
ui-ngx/src/assets/jstree/40px.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
1656
ui-ngx/src/assets/locale/locale.constant-cs_CZ.json
Normal file
1656
ui-ngx/src/assets/locale/locale.constant-cs_CZ.json
Normal file
File diff suppressed because it is too large
Load Diff
1647
ui-ngx/src/assets/locale/locale.constant-de_DE.json
Normal file
1647
ui-ngx/src/assets/locale/locale.constant-de_DE.json
Normal file
File diff suppressed because it is too large
Load Diff
1720
ui-ngx/src/assets/locale/locale.constant-en_US.json
Normal file
1720
ui-ngx/src/assets/locale/locale.constant-en_US.json
Normal file
File diff suppressed because it is too large
Load Diff
1720
ui-ngx/src/assets/locale/locale.constant-es_ES.json
Normal file
1720
ui-ngx/src/assets/locale/locale.constant-es_ES.json
Normal file
File diff suppressed because it is too large
Load Diff
1643
ui-ngx/src/assets/locale/locale.constant-fa_IR.json
Normal file
1643
ui-ngx/src/assets/locale/locale.constant-fa_IR.json
Normal file
File diff suppressed because it is too large
Load Diff
1533
ui-ngx/src/assets/locale/locale.constant-fr_FR.json
Normal file
1533
ui-ngx/src/assets/locale/locale.constant-fr_FR.json
Normal file
File diff suppressed because it is too large
Load Diff
1655
ui-ngx/src/assets/locale/locale.constant-it_IT.json
Normal file
1655
ui-ngx/src/assets/locale/locale.constant-it_IT.json
Normal file
File diff suppressed because it is too large
Load Diff
1527
ui-ngx/src/assets/locale/locale.constant-ja_JA.json
Normal file
1527
ui-ngx/src/assets/locale/locale.constant-ja_JA.json
Normal file
File diff suppressed because it is too large
Load Diff
1403
ui-ngx/src/assets/locale/locale.constant-ko_KR.json
Normal file
1403
ui-ngx/src/assets/locale/locale.constant-ko_KR.json
Normal file
File diff suppressed because it is too large
Load Diff
1649
ui-ngx/src/assets/locale/locale.constant-ru_RU.json
Normal file
1649
ui-ngx/src/assets/locale/locale.constant-ru_RU.json
Normal file
File diff suppressed because it is too large
Load Diff
1609
ui-ngx/src/assets/locale/locale.constant-tr_TR.json
Normal file
1609
ui-ngx/src/assets/locale/locale.constant-tr_TR.json
Normal file
File diff suppressed because it is too large
Load Diff
2190
ui-ngx/src/assets/locale/locale.constant-uk_UA.json
Normal file
2190
ui-ngx/src/assets/locale/locale.constant-uk_UA.json
Normal file
File diff suppressed because it is too large
Load Diff
1620
ui-ngx/src/assets/locale/locale.constant-zh_CN.json
Normal file
1620
ui-ngx/src/assets/locale/locale.constant-zh_CN.json
Normal file
File diff suppressed because it is too large
Load Diff
37
ui-ngx/src/assets/logo_title_white.svg
Normal file
37
ui-ngx/src/assets/logo_title_white.svg
Normal file
@ -0,0 +1,37 @@
|
||||
<svg id="svg2" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="320" width="1543.4" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" viewBox="0 0 1543.4268 320.00026">
|
||||
<g id="layer1" transform="translate(0 -732.36)">
|
||||
<g stroke-width="28">
|
||||
<g id="g5204-0" transform="matrix(-.66287 .69913 -.66371 -.70001 863.46 1410.6)">
|
||||
<g id="g5175-6" transform="translate(2.5254 3.0305)"></g>
|
||||
<g id="g5175-9-8" transform="translate(41.25 -30.543)" stroke-width="28"></g>
|
||||
</g>
|
||||
<g id="g5175-6-35" transform="matrix(.57657 .52719 -.57729 .52786 584.63 346.6)"></g>
|
||||
<g id="g5204-0-5-0" transform="matrix(.66287 -.69913 .66371 .70001 -543.46 380.47)">
|
||||
<g id="g5175-6-35-9" transform="translate(2.5254 3.0305)"></g>
|
||||
<g id="g5175-9-8-2-6" transform="translate(41.25 -30.543)" stroke-width="28"></g>
|
||||
</g>
|
||||
</g>
|
||||
<g id="text4279" transform="translate(0 732.36)" fill="#305680">
|
||||
<g id="g9352" fill="#fff">
|
||||
<g id="g4241" transform="translate(-.000061238 -732.36)">
|
||||
<path id="path4278" style="color-rendering:auto;text-decoration-color:#000000;color:#000000;isolation:auto;mix-blend-mode:normal;shape-rendering:auto;solid-color:#000000;block-progression:tb;text-decoration-line:none;text-decoration-style:solid;image-rendering:auto;white-space:normal;text-indent:0;text-transform:none" d="m151.13 732.36c-28.363 0-54.915 7.9153-77.613 21.537-6.4723-5.2623-14.605-8.1915-23.067-8.1937a8.7661 8.7661 0 0 0 -0.0035 0c-20.154 0.00073-36.679 16.528-36.678 36.682a8.7661 8.7661 0 0 0 0 0.0106c0.0099 8.4147 2.9267 16.483 8.1033 22.927-13.83 22.83-21.87 49.58-21.87 78.17a8.7661 8.7661 0 1 0 17.531 0c0-24.702 6.7193-47.748 18.378-67.574 4.5663 1.9846 9.4727 3.1496 14.519 3.1573a8.7661 8.7661 0 0 0 0.01241 0c20.155 0.00062 36.683-16.527 36.682-36.682a8.7661 8.7661 0 0 0 0 -0.004c-0.0016-4.9994-1.1387-9.8628-3.0828-14.397 19.717-11.484 42.585-18.095 67.085-18.095a8.7661 8.7661 0 1 0 0 -17.531zm-100.69 30.88c5.9129 0.002 11.191 2.5121 14.836 7.0769a8.7661 8.7661 0 0 0 0.1826 0.21451c2.6715 3.3798 4.1326 7.5531 4.1341 11.863-0.0015 10.677-8.468 19.144-19.144 19.148-4.37-0.008-8.6011-1.5088-12-4.2546a8.7661 8.7661 0 0 0 -0.01241 -0.009c-4.514-3.6331-7.1358-9.0979-7.1442-14.893 0.0025-10.677 8.4701-19.144 19.148-19.146z"/>
|
||||
<path id="path4486-0-9-6-9-7-6-5" style="color-rendering:auto;text-decoration-color:#000000;color:#000000;isolation:auto;mix-blend-mode:normal;shape-rendering:auto;solid-color:#000000;block-progression:tb;text-decoration-line:none;text-decoration-style:solid;image-rendering:auto;white-space:normal;text-indent:0;text-transform:none" d="m66.992 835.19c-1.492 1.5583-2.3663 3.7103-2.2576 6.0713 0.0962 2.0447 0.91322 4.0204 2.3372 5.5177 6.8051 6.8559 20.223 20.223 20.223 20.223l11.844-11.83s-12.973-12.961-20.176-20.171c-1.604-1.6325-3.7498-2.3141-6.012-2.3243-2.3583-0.0112-4.4673 0.95389-5.9592 2.5122zm32.147 19.983-36.639 36.639c-3.9751 3.976-3.9751 10.421 0 14.397l18.156 18.156 31.753 31.753 30.478 30.478c3.9758 3.9759 10.422 3.9763 14.398 0l24.791-24.791 37.914-37.914 36.639-36.639c3.9754-3.9764 3.975-10.422-0.00067-14.398l-18.63-18.63-31.75-31.76-30.01-30c-3.976-3.9751-10.421-3.9751-14.397 0l-24.79 24.79-37.91 37.91zm37.911-37.91s-12.973-12.961-20.176-20.171c-1.604-1.6325-3.7498-2.3141-6.012-2.3243-4.7166-0.0226-8.4341 3.8616-8.2169 8.5834 0.0962 2.0447 0.91322 4.0204 2.3372 5.5177 6.8051 6.8559 20.223 20.223 20.223 20.223l11.844-11.83zm69.193 5.2132s12.961-12.973 20.171-20.176c1.6325-1.604 2.3141-3.7498 2.3243-6.012 0.0225-4.7166-3.8616-8.4341-8.5834-8.2169-2.0447 0.0962-4.0204 0.91322-5.5177 2.3372-6.8559 6.8051-20.223 20.223-20.223 20.223l11.83 11.844zm31.753 31.753s12.961-12.973 20.171-20.176c1.6325-1.604 2.314-3.7498 2.3243-6.012 0.0225-4.7166-3.8616-8.4341-8.5834-8.2169-2.0447 0.0962-4.0204 0.91323-5.5177 2.3372-6.8559 6.8051-20.223 20.223-20.223 20.223l11.83 11.844zm-18.009 69.667s12.973 12.961 20.178 20.169c1.604 1.6324 3.7498 2.314 6.012 2.3243 4.7166 0.0225 8.4342-3.8615 8.2169-8.5834l-0.002 0.002c-0.0962-2.0447-0.91415-4.0214-2.3382-5.5186-6.8051-6.8559-20.222-20.222-20.222-20.222l-11.844 11.83zm-37.914 37.914s12.973 12.961 20.178 20.169c1.604 1.6324 3.7498 2.314 6.012 2.3242 4.7166 0.023 8.4342-3.8615 8.2169-8.5834h-0.002c-0.0962-2.0447-0.91323-4.0205-2.3372-5.5177-6.8051-6.8559-20.223-20.223-20.223-20.223l-11.844 11.83zm-69.667-5.6871s-12.961 12.973-20.169 20.178c-1.6324 1.604-2.314 3.7498-2.3243 6.012-0.02251 4.7166 3.8615 8.4342 8.5834 8.2169h-0.0019c2.0447-0.096 4.0204-0.9132 5.5177-2.3373 6.8561-6.8048 20.223-20.223 20.223-20.223l-11.82-11.84zm-31.743-31.74s-12.961 12.973-20.169 20.178c-1.6324 1.604-2.314 3.7498-2.3243 6.012-0.02251 4.7167 3.8615 8.4342 8.5834 8.2169h-0.0019c2.0447-0.0962 4.0204-0.91322 5.5177-2.3372 6.8561-6.8047 20.223-20.223 20.223-20.223l-11.829-11.85zm87.237-90.554c1.6794-1.7064 3.9669-2.6599 6.2971-2.626 1.6628 0.0237 3.253 0.55012 4.5625 1.5097l16.499 12.1c3.2009 2.297 4.1445 6.6589 2.2308 10.312-1.9137 3.6528-6.1234 5.5243-9.9506 4.4227l6.124 23.948c1.1128 4.3517-1.564 8.9677-5.9833 10.317l-44.642 13.631 8.2456 31.883c1.1728 4.3696-1.5017 9.0445-5.9546 10.407s-8.9756-1.1106-10.068-5.5047l-10.282-39.769c-1.1265-4.3556 1.5493-8.9847 5.9759-10.338l44.661-13.637-4.1219-16.118c-2.7634 3.0643-7.2335 3.8084-10.586 1.7615-3.3531-2.0469-4.6144-6.2896-2.9861-10.047l8.1169-19.454c0.43322-1.0376 1.0673-1.9888 1.8624-2.7973z" fill-rule="evenodd"/>
|
||||
<path id="path4278-5" style="color-rendering:auto;text-decoration-color:#000000;color:#000000;isolation:auto;mix-blend-mode:normal;shape-rendering:auto;solid-color:#000000;block-progression:tb;text-decoration-line:none;text-decoration-style:solid;image-rendering:auto;white-space:normal;text-indent:0;text-transform:none" d="m168.87 1052.4c28.363 0 54.915-7.9155 77.614-21.538 6.4724 5.2624 14.605 8.1917 23.067 8.1939a8.7662 8.7662 0 0 0 0.004 0c20.155-0.0007 36.68-16.528 36.679-36.682a8.7662 8.7662 0 0 0 0 -0.011c-0.01-8.4149-2.9267-16.484-8.1034-22.927 13.825-22.82 21.866-49.572 21.866-78.162a8.7662 8.7662 0 1 0 -17.531 0c0 24.703-6.7194 47.749-18.378 67.575-4.5664-1.9846-9.4728-3.1496-14.519-3.1573a8.7662 8.7662 0 0 0 -0.0124 0c-20.155-0.00062-36.683 16.527-36.682 36.682 0.002 4.9994 1.1387 9.8628 3.0829 14.397-19.717 11.484-42.586 18.095-67.086 18.095a8.7662 8.7662 0 1 0 0 17.531zm100.69-30.875c-5.913 0-11.191-2.5122-14.836-7.0769a8.7662 8.7662 0 0 0 -0.18261 -0.2146c-2.6715-3.3799-4.1327-7.5531-4.1341-11.863 0.002-10.677 8.4681-19.144 19.144-19.148 4.37 0.008 8.6012 1.5088 12 4.2547a8.7662 8.7662 0 0 0 0.0124 0.009c4.5141 3.6332 7.1359 9.098 7.1443 14.893-0.003 10.677-8.4702 19.145-19.148 19.146z"/>
|
||||
</g>
|
||||
<g id="g8299">
|
||||
<path id="path4345" d="m477.92 93.229h-48.56v134.68h-19.818v-134.68h-48.456v-16.394h116.83v16.394z"/>
|
||||
<path id="path4347" d="m516.72 129.23q12.762-15.668 33.203-15.668 35.59 0 35.901 40.155v74.188h-19.196v-74.292q-0.10376-12.14-5.603-17.95-5.3955-5.8105-16.913-5.8105-9.3384 0-16.394 4.9805-7.0557 4.9805-10.999 13.074v79.999h-19.196v-159.38h19.196v60.699z"/>
|
||||
<path id="path4349" d="m635.43 227.91h-19.196v-112.27h19.196v112.27zm-20.76-142.05q0-4.6692 2.8015-7.8857 2.9053-3.2166 8.5083-3.2166t8.5083 3.2166 2.9053 7.8857q0 4.6692-2.9053 7.782t-8.5083 3.1128-8.5083-3.1128q-2.8015-3.1128-2.8015-7.782z"/>
|
||||
<path id="path4351" d="m684.19 115.64 0.62256 14.111q12.866-16.187 33.618-16.187 35.59 0 35.901 40.155v74.188h-19.196v-74.292q-0.10376-12.14-5.603-17.95-5.3955-5.8105-16.913-5.8105-9.3384 0-16.394 4.9805-7.0557 4.9805-10.999 13.074v79.999h-19.196v-112.27h18.158z"/>
|
||||
<path id="path4353" d="m778.92 170.84q0-26.251 12.14-41.711 12.14-15.564 32.166-15.564 20.544 0 32.062 14.526l0.93384-12.451h17.535v109.57q0 21.79-12.97 34.344-12.866 12.555-34.656 12.555-12.14 0-23.761-5.188t-17.743-14.215l9.9609-11.517q12.347 15.253 30.194 15.253 14.008 0 21.79-7.8857 7.8857-7.8858 7.8857-22.205v-9.6497q-11.517 13.281-31.439 13.281-19.714 0-31.958-15.875-12.14-15.875-12.14-43.268zm19.299 2.179q0 18.988 7.782 29.883 7.782 10.791 21.79 10.791 18.158 0 26.666-16.498v-51.257q-8.8196-16.083-26.459-16.083-14.008 0-21.893 10.895-7.8858 10.895-7.8858 32.269z"/>
|
||||
<path id="path4355" d="m967.98 198.13q0-7.782-5.9143-12.036-5.8106-4.3579-20.441-7.4707-14.526-3.1128-23.138-7.4707-8.5083-4.3579-12.659-10.376-4.0466-6.0181-4.0466-14.319 0-13.8 11.621-23.346 11.725-9.5459 29.883-9.5459 19.092 0 30.92 9.8572 11.932 9.8572 11.932 25.214h-19.299q0-7.8858-6.7444-13.593-6.6406-5.7068-16.809-5.7068-10.48 0-16.394 4.5654-5.9143 4.5654-5.9143 11.932 0 6.9519 5.4993 10.48 5.4993 3.5278 19.818 6.7444 14.423 3.2166 23.346 7.6782 8.9233 4.4617 13.177 10.791 4.3579 6.2256 4.3579 15.253 0 15.045-12.036 24.176-12.036 9.0271-31.232 9.0271-13.489 0-23.865-4.773t-16.29-13.281q-5.8105-8.6121-5.8105-18.573h19.196q0.5188 9.6497 7.6782 15.356 7.2632 5.603 19.092 5.603 10.895 0 17.432-4.3579 6.6406-4.4617 6.6406-11.829z"/>
|
||||
<path id="path4357" d="m1015.2 227.91v-151.07h49.39q24.591 0 36.938 10.168 12.451 10.168 12.451 30.09 0 10.583-6.0181 18.781-6.018 8.0933-16.394 12.555 12.244 3.4241 19.299 13.074 7.1594 9.5459 7.1594 22.827 0 20.337-13.178 31.958t-37.25 11.621h-52.399zm19.922-70.66v54.37h32.892q13.904 0 21.893-7.1594 8.0933-7.2632 8.0933-19.922 0-27.289-29.675-27.289h-33.203zm0-15.979h30.09q13.074 0 20.856-6.5369 7.8858-6.5369 7.8858-17.743 0-12.451-7.2632-18.054-7.2632-5.7068-22.101-5.7068h-29.468v48.041z"/>
|
||||
<path id="path4359" d="m1139.5 170.74q0-16.498 6.4331-29.675 6.5369-13.177 18.054-20.337 11.621-7.1594 26.459-7.1594 22.931 0 37.042 15.875 14.215 15.875 14.215 42.23v1.3489q0 16.394-6.3294 29.468-6.2256 12.97-17.95 20.233-11.621 7.2632-26.77 7.2632-22.827 0-37.042-15.875-14.1-15.88-14.1-42.02v-1.3489zm19.299 2.2827q0 18.677 8.6121 29.987 8.7158 11.31 23.242 11.31 14.63 0 23.242-11.414 8.6121-11.517 8.6121-32.166 0-18.469-8.8196-29.883-8.7158-11.517-23.242-11.517-14.215 0-22.931 11.31-8.7158 11.31-8.7158 32.373z"/>
|
||||
<path id="path4361" d="m1335.1 227.91q-1.6602-3.3203-2.6978-11.829-13.385 13.904-31.958 13.904-16.602 0-27.289-9.3384-10.584-9.4421-10.584-23.865 0-17.535 13.281-27.185 13.385-9.7534 37.561-9.7534h18.677v-8.8196q0-10.065-6.018-15.979-6.0181-6.0181-17.743-6.0181-10.272 0-17.224 5.188-6.9519 5.188-6.9519 12.555h-19.299q0-8.4045 5.9143-16.187 6.0181-7.8858 16.186-12.451 10.272-4.5654 22.516-4.5654 19.403 0 30.402 9.7534 10.998 9.6497 11.414 26.666v51.672q0 15.46 3.9429 24.591v1.6602h-20.129zm-31.854-14.63q9.0271 0 17.12-4.6692 8.0932-4.6692 11.725-12.14v-23.035h-15.045q-35.278 0-35.278 20.648 0 9.0271 6.0181 14.111 6.0181 5.0842 15.46 5.0842z"/>
|
||||
<path id="path4363" d="m1435.8 132.87q-4.3579-0.72632-9.4422-0.72632-18.884 0-25.629 16.083v79.688h-19.196v-112.27h18.677l0.3113 12.97q9.4421-15.045 26.77-15.045 5.603 0 8.5083 1.4526v17.847z"/>
|
||||
<path id="path4365" d="m1448.7 170.84q0-25.836 12.244-41.504 12.244-15.771 32.062-15.771 19.714 0 31.232 13.489v-58.521h19.196v159.38h-17.639l-0.9339-12.036q-11.517 14.111-32.062 14.111-19.507 0-31.854-15.979-12.244-15.979-12.244-41.711v-1.4526zm19.196 2.179q0 19.092 7.8858 29.883 7.8857 10.791 21.79 10.791 18.262 0 26.666-16.394v-51.569q-8.6121-15.875-26.459-15.875-14.111 0-21.997 10.895-7.8858 10.895-7.8858 32.269z"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 11 KiB |
10
ui-ngx/src/assets/logo_white.svg
Normal file
10
ui-ngx/src/assets/logo_white.svg
Normal file
@ -0,0 +1,10 @@
|
||||
<svg id="svg2" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="320" width="320" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" viewBox="0 0 320 320.00001">
|
||||
<g id="layer1" transform="translate(0 -732.36)" stroke-width="28">
|
||||
<g id="g5175-6-32" transform="matrix(1.0471 1.0606 -1.0484 1.0619 931.69 -208.55)"></g>
|
||||
<g id="g4241" fill="#fff">
|
||||
<path id="path4278" style="color-rendering:auto;text-decoration-color:#000000;color:#000000;isolation:auto;mix-blend-mode:normal;shape-rendering:auto;solid-color:#000000;block-progression:tb;text-decoration-line:none;text-decoration-style:solid;image-rendering:auto;white-space:normal;text-indent:0;text-transform:none" d="m151.13 732.36c-28.363 0-54.915 7.9153-77.613 21.537-6.4723-5.2623-14.605-8.1915-23.067-8.1937a8.7661 8.7661 0 0 0 -0.0035 0c-20.154 0.00073-36.679 16.528-36.678 36.682a8.7661 8.7661 0 0 0 0 0.0106c0.0099 8.4147 2.9267 16.483 8.1033 22.927-13.83 22.83-21.87 49.58-21.87 78.17a8.7661 8.7661 0 1 0 17.531 0c0-24.702 6.7193-47.748 18.378-67.574 4.5663 1.9846 9.4727 3.1496 14.519 3.1573a8.7661 8.7661 0 0 0 0.01241 0c20.155 0.00062 36.683-16.527 36.682-36.682a8.7661 8.7661 0 0 0 0 -0.004c-0.0016-4.9994-1.1387-9.8628-3.0828-14.397 19.717-11.484 42.585-18.095 67.085-18.095a8.7661 8.7661 0 1 0 0 -17.531zm-100.69 30.88c5.9129 0.002 11.191 2.5121 14.836 7.0769a8.7661 8.7661 0 0 0 0.1826 0.21451c2.6715 3.3798 4.1326 7.5531 4.1341 11.863-0.0015 10.677-8.468 19.144-19.144 19.148-4.37-0.008-8.6011-1.5088-12-4.2546a8.7661 8.7661 0 0 0 -0.01241 -0.009c-4.514-3.6331-7.1358-9.0979-7.1442-14.893 0.0025-10.677 8.4701-19.144 19.148-19.146z"/>
|
||||
<path id="path4486-0-9-6-9-7-6-5" style="color-rendering:auto;text-decoration-color:#000000;color:#000000;isolation:auto;mix-blend-mode:normal;shape-rendering:auto;solid-color:#000000;block-progression:tb;text-decoration-line:none;text-decoration-style:solid;image-rendering:auto;white-space:normal;text-indent:0;text-transform:none" d="m66.992 835.19c-1.492 1.5583-2.3663 3.7103-2.2576 6.0713 0.0962 2.0447 0.91322 4.0204 2.3372 5.5177 6.8051 6.8559 20.223 20.223 20.223 20.223l11.844-11.83s-12.973-12.961-20.176-20.171c-1.604-1.6325-3.7498-2.3141-6.012-2.3243-2.3583-0.0112-4.4673 0.95389-5.9592 2.5122zm32.147 19.983-36.639 36.639c-3.9751 3.976-3.9751 10.421 0 14.397l18.156 18.156 31.753 31.753 30.478 30.478c3.9758 3.9759 10.422 3.9763 14.398 0l24.791-24.791 37.914-37.914 36.639-36.639c3.9754-3.9764 3.975-10.422-0.00067-14.398l-18.63-18.63-31.75-31.76-30.01-30c-3.976-3.9751-10.421-3.9751-14.397 0l-24.79 24.79-37.91 37.91zm37.911-37.91s-12.973-12.961-20.176-20.171c-1.604-1.6325-3.7498-2.3141-6.012-2.3243-4.7166-0.0226-8.4341 3.8616-8.2169 8.5834 0.0962 2.0447 0.91322 4.0204 2.3372 5.5177 6.8051 6.8559 20.223 20.223 20.223 20.223l11.844-11.83zm69.193 5.2132s12.961-12.973 20.171-20.176c1.6325-1.604 2.3141-3.7498 2.3243-6.012 0.0225-4.7166-3.8616-8.4341-8.5834-8.2169-2.0447 0.0962-4.0204 0.91322-5.5177 2.3372-6.8559 6.8051-20.223 20.223-20.223 20.223l11.83 11.844zm31.753 31.753s12.961-12.973 20.171-20.176c1.6325-1.604 2.314-3.7498 2.3243-6.012 0.0225-4.7166-3.8616-8.4341-8.5834-8.2169-2.0447 0.0962-4.0204 0.91323-5.5177 2.3372-6.8559 6.8051-20.223 20.223-20.223 20.223l11.83 11.844zm-18.009 69.667s12.973 12.961 20.178 20.169c1.604 1.6324 3.7498 2.314 6.012 2.3243 4.7166 0.0225 8.4342-3.8615 8.2169-8.5834l-0.002 0.002c-0.0962-2.0447-0.91415-4.0214-2.3382-5.5186-6.8051-6.8559-20.222-20.222-20.222-20.222l-11.844 11.83zm-37.914 37.914s12.973 12.961 20.178 20.169c1.604 1.6324 3.7498 2.314 6.012 2.3242 4.7166 0.023 8.4342-3.8615 8.2169-8.5834h-0.002c-0.0962-2.0447-0.91323-4.0205-2.3372-5.5177-6.8051-6.8559-20.223-20.223-20.223-20.223l-11.844 11.83zm-69.667-5.6871s-12.961 12.973-20.169 20.178c-1.6324 1.604-2.314 3.7498-2.3243 6.012-0.02251 4.7166 3.8615 8.4342 8.5834 8.2169h-0.0019c2.0447-0.096 4.0204-0.9132 5.5177-2.3373 6.8561-6.8048 20.223-20.223 20.223-20.223l-11.82-11.84zm-31.743-31.74s-12.961 12.973-20.169 20.178c-1.6324 1.604-2.314 3.7498-2.3243 6.012-0.02251 4.7167 3.8615 8.4342 8.5834 8.2169h-0.0019c2.0447-0.0962 4.0204-0.91322 5.5177-2.3372 6.8561-6.8047 20.223-20.223 20.223-20.223l-11.829-11.85zm87.237-90.554c1.6794-1.7064 3.9669-2.6599 6.2971-2.626 1.6628 0.0237 3.253 0.55012 4.5625 1.5097l16.499 12.1c3.2009 2.297 4.1445 6.6589 2.2308 10.312-1.9137 3.6528-6.1234 5.5243-9.9506 4.4227l6.124 23.948c1.1128 4.3517-1.564 8.9677-5.9833 10.317l-44.642 13.631 8.2456 31.883c1.1728 4.3696-1.5017 9.0445-5.9546 10.407s-8.9756-1.1106-10.068-5.5047l-10.282-39.769c-1.1265-4.3556 1.5493-8.9847 5.9759-10.338l44.661-13.637-4.1219-16.118c-2.7634 3.0643-7.2335 3.8084-10.586 1.7615-3.3531-2.0469-4.6144-6.2896-2.9861-10.047l8.1169-19.454c0.43322-1.0376 1.0673-1.9888 1.8624-2.7973z" fill-rule="evenodd"/>
|
||||
<path id="path4278-5" style="color-rendering:auto;text-decoration-color:#000000;color:#000000;isolation:auto;mix-blend-mode:normal;shape-rendering:auto;solid-color:#000000;block-progression:tb;text-decoration-line:none;text-decoration-style:solid;image-rendering:auto;white-space:normal;text-indent:0;text-transform:none" d="m168.87 1052.4c28.363 0 54.915-7.9155 77.614-21.538 6.4724 5.2624 14.605 8.1917 23.067 8.1939a8.7662 8.7662 0 0 0 0.004 0c20.155-0.0007 36.68-16.528 36.679-36.682a8.7662 8.7662 0 0 0 0 -0.011c-0.01-8.4149-2.9267-16.484-8.1034-22.927 13.825-22.82 21.866-49.572 21.866-78.162a8.7662 8.7662 0 1 0 -17.531 0c0 24.703-6.7194 47.749-18.378 67.575-4.5664-1.9846-9.4728-3.1496-14.519-3.1573a8.7662 8.7662 0 0 0 -0.0124 0c-20.155-0.00062-36.683 16.527-36.682 36.682 0.002 4.9994 1.1387 9.8628 3.0829 14.397-19.717 11.484-42.586 18.095-67.086 18.095a8.7662 8.7662 0 1 0 0 17.531zm100.69-30.875c-5.913 0-11.191-2.5122-14.836-7.0769a8.7662 8.7662 0 0 0 -0.18261 -0.2146c-2.6715-3.3799-4.1327-7.5531-4.1341-11.863 0.002-10.677 8.4681-19.144 19.144-19.148 4.37 0.008 8.6012 1.5088 12 4.2547a8.7662 8.7662 0 0 0 0.0124 0.009c4.5141 3.6332 7.1359 9.098 7.1443 14.893-0.003 10.677-8.4702 19.145-19.148 19.146z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 5.9 KiB |
1
ui-ngx/src/assets/mdi.svg
Normal file
1
ui-ngx/src/assets/mdi.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 1.3 MiB |
11
ui-ngx/src/browserslist
Normal file
11
ui-ngx/src/browserslist
Normal file
@ -0,0 +1,11 @@
|
||||
# This file is currently used by autoprefixer to adjust CSS to support the below specified browsers
|
||||
# For additional information regarding the format and rule options, please see:
|
||||
# https://github.com/browserslist/browserslist#queries
|
||||
#
|
||||
# For IE 9-11 support, please remove 'not' from the last line of the file and adjust as needed
|
||||
|
||||
> 0.5%
|
||||
last 2 versions
|
||||
Firefox ESR
|
||||
not dead
|
||||
not IE 9-11
|
||||
25
ui-ngx/src/environments/environment.prod.ts
Normal file
25
ui-ngx/src/environments/environment.prod.ts
Normal file
@ -0,0 +1,25 @@
|
||||
///
|
||||
/// Copyright © 2016-2019 The Thingsboard Authors
|
||||
///
|
||||
/// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
/// you may not use this file except in compliance with the License.
|
||||
/// You may obtain a copy of the License at
|
||||
///
|
||||
/// http://www.apache.org/licenses/LICENSE-2.0
|
||||
///
|
||||
/// Unless required by applicable law or agreed to in writing, software
|
||||
/// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
/// See the License for the specific language governing permissions and
|
||||
/// limitations under the License.
|
||||
///
|
||||
|
||||
export const environment = {
|
||||
appTitle: 'ThingsBoard',
|
||||
production: true,
|
||||
// @ts-ignore
|
||||
tbVersion: TB_VERSION,
|
||||
// @ts-ignore
|
||||
supportedLangs: SUPPORTED_LANGS,
|
||||
defaultLang: 'en_US'
|
||||
};
|
||||
38
ui-ngx/src/environments/environment.ts
Normal file
38
ui-ngx/src/environments/environment.ts
Normal file
@ -0,0 +1,38 @@
|
||||
///
|
||||
/// Copyright © 2016-2019 The Thingsboard Authors
|
||||
///
|
||||
/// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
/// you may not use this file except in compliance with the License.
|
||||
/// You may obtain a copy of the License at
|
||||
///
|
||||
/// http://www.apache.org/licenses/LICENSE-2.0
|
||||
///
|
||||
/// Unless required by applicable law or agreed to in writing, software
|
||||
/// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
/// See the License for the specific language governing permissions and
|
||||
/// limitations under the License.
|
||||
///
|
||||
|
||||
// This file can be replaced during build by using the `fileReplacements` array.
|
||||
// `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.
|
||||
// The list of file replacements can be found in `angular.json`.
|
||||
|
||||
export const environment = {
|
||||
appTitle: 'ThingsBoard',
|
||||
production: false,
|
||||
// @ts-ignore
|
||||
tbVersion: TB_VERSION,
|
||||
// @ts-ignore
|
||||
supportedLangs: SUPPORTED_LANGS,
|
||||
defaultLang: 'en_US'
|
||||
};
|
||||
|
||||
/*
|
||||
* For easier debugging in development mode, you can import the following file
|
||||
* to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
|
||||
*
|
||||
* This import should be commented out in production mode because it will have a negative impact
|
||||
* on performance if an error is thrown.
|
||||
*/
|
||||
// import 'zone.js/dist/zone-error'; // Included with Angular CLI.
|
||||
31
ui-ngx/src/index.html
Normal file
31
ui-ngx/src/index.html
Normal file
@ -0,0 +1,31 @@
|
||||
<!--
|
||||
|
||||
Copyright © 2016-2019 The Thingsboard Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
-->
|
||||
<!doctype html>
|
||||
<html lang="en" style="width: 100%;">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>ThingsBoard</title>
|
||||
<base href="/">
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="icon" type="image/x-icon" href="thingsboard.ico">
|
||||
</head>
|
||||
<body class="tb-default">
|
||||
<tb-root></tb-root>
|
||||
</body>
|
||||
</html>
|
||||
47
ui-ngx/src/karma.conf.js
Normal file
47
ui-ngx/src/karma.conf.js
Normal file
@ -0,0 +1,47 @@
|
||||
/*
|
||||
* Copyright © 2016-2019 The Thingsboard Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
// Karma configuration file, see link for more information
|
||||
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
||||
|
||||
module.exports = function (config) {
|
||||
config.set({
|
||||
basePath: '',
|
||||
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
||||
plugins: [
|
||||
require('karma-jasmine'),
|
||||
require('karma-chrome-launcher'),
|
||||
require('karma-jasmine-html-reporter'),
|
||||
require('karma-coverage-istanbul-reporter'),
|
||||
require('@angular-devkit/build-angular/plugins/karma')
|
||||
],
|
||||
client: {
|
||||
clearContext: false // leave Jasmine Spec Runner output visible in browser
|
||||
},
|
||||
coverageIstanbulReporter: {
|
||||
dir: require('path').join(__dirname, '../coverage/tb-license-server'),
|
||||
reports: ['html', 'lcovonly', 'text-summary'],
|
||||
fixWebpackSourcePaths: true
|
||||
},
|
||||
reporters: ['progress', 'kjhtml'],
|
||||
port: 9876,
|
||||
colors: true,
|
||||
logLevel: config.LOG_INFO,
|
||||
autoWatch: true,
|
||||
browsers: ['Chrome'],
|
||||
singleRun: false,
|
||||
restartOnFileChange: true
|
||||
});
|
||||
};
|
||||
30
ui-ngx/src/main.ts
Normal file
30
ui-ngx/src/main.ts
Normal file
@ -0,0 +1,30 @@
|
||||
///
|
||||
/// Copyright © 2016-2019 The Thingsboard Authors
|
||||
///
|
||||
/// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
/// you may not use this file except in compliance with the License.
|
||||
/// You may obtain a copy of the License at
|
||||
///
|
||||
/// http://www.apache.org/licenses/LICENSE-2.0
|
||||
///
|
||||
/// Unless required by applicable law or agreed to in writing, software
|
||||
/// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
/// See the License for the specific language governing permissions and
|
||||
/// limitations under the License.
|
||||
///
|
||||
|
||||
import 'hammerjs';
|
||||
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.error(err));
|
||||
79
ui-ngx/src/polyfills.ts
Normal file
79
ui-ngx/src/polyfills.ts
Normal file
@ -0,0 +1,79 @@
|
||||
///
|
||||
/// Copyright © 2016-2019 The Thingsboard Authors
|
||||
///
|
||||
/// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
/// you may not use this file except in compliance with the License.
|
||||
/// You may obtain a copy of the License at
|
||||
///
|
||||
/// http://www.apache.org/licenses/LICENSE-2.0
|
||||
///
|
||||
/// Unless required by applicable law or agreed to in writing, software
|
||||
/// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
/// See the License for the specific language governing permissions and
|
||||
/// limitations under the License.
|
||||
///
|
||||
|
||||
/**
|
||||
* This file includes polyfills needed by Angular and is loaded before the app.
|
||||
* You can add your own extra polyfills to this file.
|
||||
*
|
||||
* This file is divided into 2 sections:
|
||||
* 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
|
||||
* 2. Application imports. Files imported after ZoneJS that should be loaded before your main
|
||||
* file.
|
||||
*
|
||||
* The current setup is for so-called "evergreen" browsers; the last versions of browsers that
|
||||
* automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
|
||||
* Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
|
||||
*
|
||||
* Learn more in https://angular.io/guide/browser-support
|
||||
*/
|
||||
|
||||
/***************************************************************************************************
|
||||
* BROWSER POLYFILLS
|
||||
*/
|
||||
|
||||
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
|
||||
// import 'classlist.js'; // Run `npm install --save classlist.js`.
|
||||
|
||||
/**
|
||||
* Web Animations `@angular/platform-browser/animations`
|
||||
* Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
|
||||
* Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
|
||||
*/
|
||||
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
|
||||
|
||||
/**
|
||||
* By default, zone.js will patch all possible macroTask and DomEvents
|
||||
* user can disable parts of macroTask/DomEvents patch by setting following flags
|
||||
* because those flags need to be set before `zone.js` being loaded, and webpack
|
||||
* will put import in the top of bundle, so user need to create a separate file
|
||||
* in this directory (for example: zone-flags.ts), and put the following flags
|
||||
* into that file, and then add the following code before importing zone.js.
|
||||
* import './zone-flags.ts';
|
||||
*
|
||||
* The flags allowed in zone-flags.ts are listed here.
|
||||
*
|
||||
* The following flags will work for all browsers.
|
||||
*
|
||||
* (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
|
||||
* (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
|
||||
* (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
|
||||
*
|
||||
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
|
||||
* with the following flag, it will bypass `zone.js` patch for IE/Edge
|
||||
*
|
||||
* (window as any).__Zone_enable_cross_context_check = true;
|
||||
*
|
||||
*/
|
||||
|
||||
/***************************************************************************************************
|
||||
* Zone JS is required by default for Angular itself.
|
||||
*/
|
||||
import 'zone.js/dist/zone'; // Included with Angular CLI.
|
||||
import 'core-js/es/array';
|
||||
|
||||
/***************************************************************************************************
|
||||
* APPLICATION IMPORTS
|
||||
*/
|
||||
48
ui-ngx/src/scss/animations.scss
Normal file
48
ui-ngx/src/scss/animations.scss
Normal file
@ -0,0 +1,48 @@
|
||||
/**
|
||||
* Copyright © 2016-2019 The Thingsboard Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
@import "~compass-sass-mixins/lib/animate";
|
||||
|
||||
@keyframes tbMoveFromTopFade {
|
||||
from {
|
||||
opacity: 0;
|
||||
|
||||
transform: translate(0, -100%);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes tbMoveToTopFade {
|
||||
to {
|
||||
opacity: 0;
|
||||
|
||||
transform: translate(0, -100%);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes tbMoveFromBottomFade {
|
||||
from {
|
||||
opacity: 0;
|
||||
|
||||
transform: translate(0, 100%);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes tbMoveToBottomFade {
|
||||
to {
|
||||
opacity: 0;
|
||||
|
||||
transform: translate(0, 150%);
|
||||
}
|
||||
}
|
||||
29
ui-ngx/src/scss/constants.scss
Normal file
29
ui-ngx/src/scss/constants.scss
Normal file
@ -0,0 +1,29 @@
|
||||
/**
|
||||
* Copyright © 2016-2019 The Thingsboard Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
$mat-xs: "screen and (max-width: 599px)";
|
||||
$mat-sm: "screen and (min-width: 600px) and (max-width: 959px)";
|
||||
$mat-md: "screen and (min-width: 960px) and (max-width: 1279px)";
|
||||
$mat-lg: "screen and (min-width: 1280px) and (max-width: 1919px)";
|
||||
$mat-xl: "screen and (min-width: 1920px) and (max-width: 5000px)";
|
||||
$mat-lt-sm: "screen and (max-width: 599px)";
|
||||
$mat-lt-md: "screen and (max-width: 959px)";
|
||||
$mat-lt-lg: "screen and (max-width: 1279px)";
|
||||
$mat-lt-xl: "screen and (max-width: 1919px)";
|
||||
$mat-gt-xs: "screen and (min-width: 600px)";
|
||||
$mat-gt-sm: "screen and (min-width: 960px)";
|
||||
$mat-gt-md: "screen and (min-width: 1280px)";
|
||||
$mat-gt-xmd: "screen and (min-width: 1600px)";
|
||||
$mat-gt-xl: "screen and (min-width: 1920px)";
|
||||
314
ui-ngx/src/styles.scss
Normal file
314
ui-ngx/src/styles.scss
Normal file
@ -0,0 +1,314 @@
|
||||
/**
|
||||
* Copyright © 2016-2019 The Thingsboard Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
/* You can add global styles to this file, and also import other style files */
|
||||
|
||||
@import '~material-design-icons/iconfont/material-icons.css';
|
||||
@import '~typeface-roboto/index.css';
|
||||
@import '~font-awesome/css/font-awesome.min.css';
|
||||
@import 'theme.scss';
|
||||
@import './scss/constants';
|
||||
@import './scss/animations';
|
||||
|
||||
body, html {
|
||||
height: 100%;
|
||||
min-height: 100%;
|
||||
position: relative;
|
||||
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
||||
-webkit-touch-callout: none;
|
||||
|
||||
-webkit-text-size-adjust: 100%;
|
||||
-ms-text-size-adjust: 100%;
|
||||
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background-color: rgb(250,250,250);
|
||||
}
|
||||
|
||||
tb-root {
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
min-height: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/***************
|
||||
* TYPE DEFAULTS
|
||||
***************/
|
||||
|
||||
body,
|
||||
button,
|
||||
html,
|
||||
input,
|
||||
select,
|
||||
textarea,
|
||||
td,
|
||||
th {
|
||||
font-family: Roboto, "Helvetica Neue", sans-serif;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
body {
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
a {
|
||||
font-weight: 400;
|
||||
color: #106cc8;
|
||||
text-decoration: none;
|
||||
border-bottom: 1px solid rgba(64, 84, 178, .25);
|
||||
|
||||
transition: border-bottom .35s;
|
||||
}
|
||||
|
||||
a:hover,
|
||||
a:focus {
|
||||
border-bottom: 1px solid #4054b2;
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
margin-top: 1rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 3.4rem;
|
||||
font-weight: 400;
|
||||
line-height: 4rem;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 2.4rem;
|
||||
font-weight: 400;
|
||||
line-height: 3.2rem;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 2rem;
|
||||
font-weight: 500;
|
||||
letter-spacing: .005em;
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: 1.6rem;
|
||||
font-weight: 400;
|
||||
line-height: 2.4rem;
|
||||
letter-spacing: .01em;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: .8em 0 1.6em;
|
||||
font-size: 1.6rem;
|
||||
font-weight: 400;
|
||||
line-height: 1.6em;
|
||||
letter-spacing: .01em;
|
||||
}
|
||||
|
||||
strong {
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
padding-left: 16px;
|
||||
margin-left: 0;
|
||||
font-style: italic;
|
||||
border-left: 3px solid rgba(0, 0, 0, .12);
|
||||
}
|
||||
|
||||
fieldset {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border: none;
|
||||
}
|
||||
|
||||
section.tb-header-buttons {
|
||||
position: absolute;
|
||||
top: 86px;
|
||||
right: 0;
|
||||
z-index: 3;
|
||||
pointer-events: none;
|
||||
|
||||
@media #{$mat-gt-sm} {
|
||||
top: 86px;
|
||||
}
|
||||
|
||||
.tb-btn-header {
|
||||
margin: 6px 8px;
|
||||
position: relative !important;
|
||||
display: inline-block !important;
|
||||
animation: tbMoveFromTopFade .3s ease both;
|
||||
|
||||
&.tb-hide {
|
||||
animation: tbMoveToTopFade .3s ease both;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tb-details-buttons {
|
||||
button {
|
||||
margin: 6px 8px;
|
||||
}
|
||||
}
|
||||
|
||||
label {
|
||||
&.tb-title {
|
||||
padding-bottom: 15px;
|
||||
font-size: 13px;
|
||||
font-weight: 400;
|
||||
color: #666;
|
||||
pointer-events: none;
|
||||
|
||||
&.no-padding {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
&.tb-required::after {
|
||||
font-size: 13px;
|
||||
color: rgba(0, 0, 0, .54);
|
||||
vertical-align: top;
|
||||
content: " *";
|
||||
}
|
||||
|
||||
&.tb-error {
|
||||
color: rgb(221, 44, 0);
|
||||
|
||||
&.tb-required::after {
|
||||
color: rgb(221, 44, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
&.tb-small {
|
||||
font-size: 12px;
|
||||
color: rgba(0, 0, 0, .54);
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
|
||||
pre.tb-highlight {
|
||||
display: block;
|
||||
padding: 15px;
|
||||
margin: 20px 0;
|
||||
overflow-x: auto;
|
||||
background-color: #f7f7f7;
|
||||
|
||||
code {
|
||||
box-sizing: border-box;
|
||||
display: inline-block;
|
||||
padding: 0;
|
||||
font-family: monospace;
|
||||
font-size: 16px;
|
||||
font-weight: 700;
|
||||
color: #303030;
|
||||
vertical-align: bottom;
|
||||
}
|
||||
}
|
||||
|
||||
.ace_editor {
|
||||
font-size: 16px !important;
|
||||
}
|
||||
|
||||
.tb-timewindow-panel {
|
||||
overflow: hidden;
|
||||
background: #fff;
|
||||
border-radius: 4px;
|
||||
box-shadow:
|
||||
0 7px 8px -4px rgba(0, 0, 0, .2),
|
||||
0 13px 19px 2px rgba(0, 0, 0, .14),
|
||||
0 5px 24px 4px rgba(0, 0, 0, .12);
|
||||
}
|
||||
|
||||
.tb-panel-actions {
|
||||
margin-bottom: 0;
|
||||
padding: 8px 8px 8px 16px;
|
||||
.mat-button+.mat-button,
|
||||
.mat-button+.mat-raised-button,
|
||||
.mat-raised-button+.mat-button,
|
||||
.mat-raised-button+.mat-raised-button {
|
||||
margin-left: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
.tb-container {
|
||||
position: relative;
|
||||
padding: 10px 0;
|
||||
margin-top: 32px;
|
||||
}
|
||||
|
||||
.tb-fullscreen {
|
||||
position: fixed !important;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100% !important;
|
||||
height: 100% !important;
|
||||
}
|
||||
|
||||
.tb-fullscreen-parent {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
mat-label {
|
||||
&.tb-title {
|
||||
font-size: 13px;
|
||||
font-weight: 400;
|
||||
color: #666;
|
||||
pointer-events: none;
|
||||
|
||||
&.no-padding {
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
&.tb-required::after {
|
||||
font-size: 13px;
|
||||
color: rgba(0, 0, 0, .54);
|
||||
vertical-align: top;
|
||||
content: " *";
|
||||
}
|
||||
|
||||
&.tb-error {
|
||||
color: rgb(221, 44, 0);
|
||||
|
||||
&.tb-required::after {
|
||||
color: rgb(221, 44, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tb-error-messages {
|
||||
height: 24px; //30px
|
||||
margin-top: -6px;
|
||||
}
|
||||
|
||||
.tb-error-message {
|
||||
transition: all .3s cubic-bezier(.55, 0, .55, .2);
|
||||
padding: 10px 0 0 10px;
|
||||
overflow: hidden;
|
||||
font-size: 12px;
|
||||
line-height: 14px;
|
||||
color: rgb(221, 44, 0);
|
||||
}
|
||||
36
ui-ngx/src/test.ts
Normal file
36
ui-ngx/src/test.ts
Normal file
@ -0,0 +1,36 @@
|
||||
///
|
||||
/// Copyright © 2016-2019 The Thingsboard Authors
|
||||
///
|
||||
/// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
/// you may not use this file except in compliance with the License.
|
||||
/// You may obtain a copy of the License at
|
||||
///
|
||||
/// http://www.apache.org/licenses/LICENSE-2.0
|
||||
///
|
||||
/// Unless required by applicable law or agreed to in writing, software
|
||||
/// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
/// See the License for the specific language governing permissions and
|
||||
/// limitations under the License.
|
||||
///
|
||||
|
||||
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
||||
|
||||
import 'zone.js/dist/zone-testing';
|
||||
import { getTestBed } from '@angular/core/testing';
|
||||
import {
|
||||
BrowserDynamicTestingModule,
|
||||
platformBrowserDynamicTesting
|
||||
} from '@angular/platform-browser-dynamic/testing';
|
||||
|
||||
declare const require: any;
|
||||
|
||||
// First, initialize the Angular testing environment.
|
||||
getTestBed().initTestEnvironment(
|
||||
BrowserDynamicTestingModule,
|
||||
platformBrowserDynamicTesting()
|
||||
);
|
||||
// Then we find all the tests.
|
||||
const context = require.context('./', true, /\.spec\.ts$/);
|
||||
// And load the modules.
|
||||
context.keys().map(context);
|
||||
557
ui-ngx/src/theme.scss
Normal file
557
ui-ngx/src/theme.scss
Normal file
@ -0,0 +1,557 @@
|
||||
/**
|
||||
* Copyright © 2016-2019 The Thingsboard Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
@import '~@angular/material/theming';
|
||||
@import '~@mat-datetimepicker/core/datetimepicker/datetimepicker-theme.scss';
|
||||
@import './scss/constants';
|
||||
|
||||
@include mat-core();
|
||||
|
||||
$tb-primary-color: #305680;
|
||||
$tb-secondary-color: #527dad;
|
||||
$tb-hue3-color: #a7c1de;
|
||||
|
||||
$tb-dark-primary-color: #9fa8da;
|
||||
|
||||
$tb-mat-indigo: (
|
||||
50: #e8eaf6,
|
||||
100: #c5cae9,
|
||||
200: #9fa8da,
|
||||
300: #7986cb,
|
||||
400: #5c6bc0,
|
||||
500: $tb-primary-color,
|
||||
600: $tb-secondary-color,
|
||||
700: #303f9f,
|
||||
800: #283593,
|
||||
900: #1a237e,
|
||||
A100: $tb-hue3-color,
|
||||
A200: #536dfe,
|
||||
A400: #3d5afe,
|
||||
A700: #304ffe,
|
||||
contrast: (
|
||||
50: $dark-primary-text,
|
||||
100: $dark-primary-text,
|
||||
200: $dark-primary-text,
|
||||
300: $light-primary-text,
|
||||
400: $light-primary-text,
|
||||
500: $light-primary-text,
|
||||
600: $light-primary-text,
|
||||
700: $light-primary-text,
|
||||
800: $light-primary-text,
|
||||
900: $light-primary-text,
|
||||
A100: $dark-primary-text,
|
||||
A200: $light-primary-text,
|
||||
A400: $light-primary-text,
|
||||
A700: $light-primary-text,
|
||||
)
|
||||
);
|
||||
|
||||
$tb-primary: mat-palette($tb-mat-indigo);
|
||||
$tb-accent: mat-palette($mat-deep-orange);
|
||||
|
||||
// Background palette for light themes.
|
||||
$tb-light-theme-background: (
|
||||
status-bar: map_get($mat-grey, 300),
|
||||
app-bar: map_get($mat-grey, 100),
|
||||
background: #eee, // map_get($mat-grey, 50),
|
||||
hover: rgba(black, 0.04),
|
||||
card: white,
|
||||
dialog: white,
|
||||
disabled-button: rgba(black, 0.12),
|
||||
raised-button: white,
|
||||
focused-button: $dark-focused,
|
||||
selected-button: map_get($mat-grey, 300),
|
||||
selected-disabled-button: map_get($mat-grey, 400),
|
||||
disabled-button-toggle: map_get($mat-grey, 200),
|
||||
unselected-chip: map_get($mat-grey, 300),
|
||||
disabled-list-option: map_get($mat-grey, 200),
|
||||
);
|
||||
|
||||
@function get-tb-light-theme($primary, $accent, $warn: mat-palette($mat-red)) {
|
||||
@return (
|
||||
primary: $primary,
|
||||
accent: $accent,
|
||||
warn: $warn,
|
||||
is-dark: false,
|
||||
foreground: $mat-light-theme-foreground,
|
||||
background: $tb-light-theme-background,
|
||||
);
|
||||
}
|
||||
|
||||
$tb-theme: get-tb-light-theme(
|
||||
$tb-primary,
|
||||
$tb-accent
|
||||
);
|
||||
|
||||
$primary: mat-color($tb-primary);
|
||||
$accent: mat-color($tb-accent);
|
||||
|
||||
$tb-dark-mat-indigo: (
|
||||
50: #e8eaf6,
|
||||
100: #c5cae9,
|
||||
200: #9fa8da,
|
||||
300: #7986cb,
|
||||
400: #5c6bc0,
|
||||
500: $tb-dark-primary-color,
|
||||
600: $tb-secondary-color,
|
||||
700: #303f9f,
|
||||
800: #283593,
|
||||
900: #1a237e,
|
||||
A100: $tb-hue3-color,
|
||||
A200: #536dfe,
|
||||
A400: #3d5afe,
|
||||
A700: #304ffe,
|
||||
contrast: (
|
||||
50: $dark-primary-text,
|
||||
100: $dark-primary-text,
|
||||
200: $dark-primary-text,
|
||||
300: $dark-primary-text,
|
||||
400: $dark-primary-text,
|
||||
500: map_get($tb-mat-indigo, 900),
|
||||
600: $light-primary-text,
|
||||
700: $light-primary-text,
|
||||
800: $light-primary-text,
|
||||
900: $light-primary-text,
|
||||
A100: $dark-primary-text,
|
||||
A200: $dark-primary-text,
|
||||
A400: $dark-primary-text,
|
||||
A700: $dark-primary-text,
|
||||
)
|
||||
);
|
||||
|
||||
$tb-dark-primary: mat-palette($tb-dark-mat-indigo);
|
||||
|
||||
$tb-dark-theme-background: (
|
||||
status-bar: black,
|
||||
app-bar: map_get($tb-mat-indigo, 900),
|
||||
background: map_get($tb-mat-indigo, 800),
|
||||
hover: rgba(white, 0.04),
|
||||
card: map_get($tb-mat-indigo, 800),
|
||||
dialog: map_get($tb-mat-indigo, 800),
|
||||
disabled-button: rgba(white, 0.12),
|
||||
raised-button: map-get($tb-mat-indigo, 50),
|
||||
focused-button: $light-focused,
|
||||
selected-button: map_get($tb-mat-indigo, 900),
|
||||
selected-disabled-button: map_get($tb-mat-indigo, 800),
|
||||
disabled-button-toggle: black,
|
||||
unselected-chip: map_get($tb-mat-indigo, 700),
|
||||
disabled-list-option: black,
|
||||
);
|
||||
|
||||
@function get-tb-dark-theme($primary, $accent, $warn: mat-palette($mat-red)) {
|
||||
@return (
|
||||
primary: $primary,
|
||||
accent: $accent,
|
||||
warn: $warn,
|
||||
is-dark: true,
|
||||
foreground: $mat-dark-theme-foreground,
|
||||
background: $tb-dark-theme-background,
|
||||
);
|
||||
}
|
||||
|
||||
$tb-dark-theme: get-tb-dark-theme(
|
||||
$tb-dark-primary,
|
||||
$tb-accent
|
||||
);
|
||||
|
||||
.tb-default {
|
||||
@include angular-material-theme($tb-theme);
|
||||
@include mat-datetimepicker-theme($tb-theme);
|
||||
}
|
||||
|
||||
.tb-dark {
|
||||
@include angular-material-theme($tb-dark-theme);
|
||||
}
|
||||
|
||||
.tb-default, .tb-dark {
|
||||
|
||||
/*********************************
|
||||
* MATERIAL DESIGN CUSTOMIZATIONS
|
||||
********************************/
|
||||
|
||||
.mat-tooltip {
|
||||
white-space: pre-line;
|
||||
}
|
||||
|
||||
button {
|
||||
pointer-events: all;
|
||||
}
|
||||
|
||||
button:not(.mat-menu-item):not(.mat-sort-header-button) {
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
button.mat-menu-item {
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
button.mat-fab.mat-fab-bottom-right {
|
||||
top: auto;
|
||||
right: 20px;
|
||||
bottom: 20px;
|
||||
left: auto;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.layout-padding, .layout-padding > * {
|
||||
@media #{$mat-lt-md} {
|
||||
padding: 4px;
|
||||
}
|
||||
@media #{$mat-gt-sm} {
|
||||
padding: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
.mat-padding {
|
||||
padding: 8px;
|
||||
@media #{$mat-gt-sm} {
|
||||
padding: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
.mat-content {
|
||||
position: relative;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.layout-wrap {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
mat-form-field.mat-block {
|
||||
display: block;
|
||||
}
|
||||
|
||||
mat-toolbar.mat-table-toolbar {
|
||||
background: #fff;
|
||||
padding: 0 24px;
|
||||
.mat-toolbar-tools {
|
||||
padding: 0;
|
||||
& > button.mat-icon-button:last-child {
|
||||
margin-right: -12px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mat-toolbar.mat-table-toolbar, .mat-cell {
|
||||
button.mat-icon-button {
|
||||
mat-icon {
|
||||
color: rgba(0, 0, 0, .54);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mat-toolbar.mat-primary {
|
||||
button.mat-icon-button {
|
||||
mat-icon {
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.mat-row {
|
||||
transition: background-color .2s;
|
||||
&:hover:not(.tb-current-entity) {
|
||||
background-color: #f4f4f4;
|
||||
}
|
||||
&.tb-current-entity {
|
||||
background-color: #e9e9e9;
|
||||
}
|
||||
}
|
||||
|
||||
.mat-row:not(.mat-row-select), .mat-header-row:not(.mat-row-select) {
|
||||
mat-cell:first-child, mat-footer-cell:first-child, mat-header-cell:first-child {
|
||||
padding: 0 12px;
|
||||
}
|
||||
mat-cell:nth-child(n+2):nth-last-child(n+2), mat-footer-cell:nth-child(n+2):nth-last-child(n+2), mat-header-cell:nth-child(n+2):nth-last-child(n+2) {
|
||||
padding: 0 28px 0 0;
|
||||
}
|
||||
}
|
||||
|
||||
.mat-row.mat-row-select, .mat-header-row.mat-row-select {
|
||||
mat-cell:first-child, mat-footer-cell:first-child, mat-header-cell:first-child {
|
||||
width: 30px;
|
||||
padding: 0 0 0 12px;
|
||||
}
|
||||
mat-cell:nth-child(2), mat-footer-cell:nth-child(2), mat-header-cell:nth-child(2) {
|
||||
padding: 0 12px;
|
||||
}
|
||||
mat-cell:nth-child(n+3):nth-last-child(n+2), mat-footer-cell:nth-child(n+3):nth-last-child(n+2), mat-header-cell:nth-child(n+3):nth-last-child(n+2) {
|
||||
padding: 0 28px 0 0;
|
||||
}
|
||||
&.mat-selected:not(.tb-current-entity) {
|
||||
background-color: #ededed;
|
||||
}
|
||||
}
|
||||
|
||||
.mat-header-cell {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.mat-cell, .mat-header-cell {
|
||||
min-width: 80px;
|
||||
&:last-child {
|
||||
padding: 0 12px 0 0;
|
||||
}
|
||||
&.mat-column-select {
|
||||
min-width: 30px;
|
||||
max-width: 30px;
|
||||
width: 30px;
|
||||
padding: 0 0 0 12px;
|
||||
}
|
||||
&.mat-column-actions {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
.mat-cell, .mat-footer-cell {
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.mat-cell, .mat-footer-cell, .mat-header-cell {
|
||||
// fix for ie11 'align-items: center'
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
.mat-toolbar-tools {
|
||||
font-size: 20px;
|
||||
letter-spacing: .005em;
|
||||
box-sizing: border-box;
|
||||
font-weight: 400;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: row;
|
||||
width: 100%;
|
||||
height: 64px;
|
||||
max-height: 64px;
|
||||
padding: 0 16px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.mat-icon {
|
||||
vertical-align: middle;
|
||||
&.tb-mat-32 {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
font-size: 32px;
|
||||
svg {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
transform: scale(1.33);
|
||||
}
|
||||
}
|
||||
&.tb-mat-96 {
|
||||
width: 96px;
|
||||
height: 96px;
|
||||
font-size: 96px;
|
||||
svg {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
transform: scale(4);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.mat-icon-button {
|
||||
&.tb-mat-32 {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
}
|
||||
&.tb-mat-96 {
|
||||
width: 96px;
|
||||
height: 96px;
|
||||
line-height: 96px;
|
||||
}
|
||||
}
|
||||
|
||||
.mat-snack-bar-container {
|
||||
position: absolute;
|
||||
background: none;
|
||||
box-shadow: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: none;
|
||||
border-radius: inherit;
|
||||
max-width: inherit;
|
||||
min-width: inherit;
|
||||
pointer-events: none;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.mat-snack-bar-handset {
|
||||
.mat-snack-bar-container {
|
||||
position: relative !important;
|
||||
width: 100% !important;
|
||||
top: 0 !important;
|
||||
left: 0 !important;
|
||||
height: inherit !important;
|
||||
tb-snack-bar-component {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.mat-drawer-side {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.mat-drawer-inner-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
mat-drawer.tb-details-drawer {
|
||||
z-index: 59 !important;
|
||||
width: 100% !important;
|
||||
max-width: 100% !important;
|
||||
@media #{$mat-gt-sm} {
|
||||
width: 80% !important;
|
||||
}
|
||||
@media #{$mat-gt-md} {
|
||||
width: 65% !important;
|
||||
}
|
||||
}
|
||||
|
||||
.mat-card-subtitle, .mat-card-content {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.mat-toolbar > button:first-child {
|
||||
margin-left: -8px;
|
||||
}
|
||||
|
||||
.mat-toolbar > button:last-child {
|
||||
margin-right: -8px;
|
||||
}
|
||||
|
||||
.mat-toolbar {
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
mat-toolbar *, mat-toolbar :after, mat-toolbar :before {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.mat-button, .mat-flat-button, .mat-stroked-button, .mat-raised-button {
|
||||
&:not(.mat-icon-button) {
|
||||
@media #{$mat-lt-md} {
|
||||
padding: 0 6px;
|
||||
min-width: 88px;
|
||||
}
|
||||
mat-icon {
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tb-dialog {
|
||||
.mat-dialog-container {
|
||||
padding: 0;
|
||||
> *:first-child, form {
|
||||
max-width: 100%;
|
||||
min-width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: auto;
|
||||
height: 100%;
|
||||
}
|
||||
.mat-dialog-content {
|
||||
margin: 0;
|
||||
padding: 24px;
|
||||
}
|
||||
.mat-dialog-actions {
|
||||
margin-bottom: 0;
|
||||
padding: 8px 8px 8px 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tb-fullscreen-dialog-gt-sm {
|
||||
@media #{$mat-gt-sm} {
|
||||
min-height: 100%;
|
||||
min-width: 100%;
|
||||
max-width: none !important;
|
||||
position: absolute !important;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
.mat-dialog-container {
|
||||
> *:first-child, form {
|
||||
min-width: 100% !important;
|
||||
}
|
||||
.mat-dialog-content {
|
||||
max-height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tb-fullscreen-dialog {
|
||||
@media #{$mat-lt-md} {
|
||||
min-height: 100%;
|
||||
min-width: 100%;
|
||||
max-width: none !important;
|
||||
position: absolute !important;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
.mat-dialog-container {
|
||||
> *:first-child, form {
|
||||
min-width: 100% !important;
|
||||
}
|
||||
.mat-dialog-content {
|
||||
max-height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tb-absolute-fill {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
span.no-data-found {
|
||||
position: relative;
|
||||
display: flex;
|
||||
height: calc(100% - 57px);
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
|
||||
mat-tab-group.tb-headless {
|
||||
margin-top: -50px;
|
||||
}
|
||||
|
||||
.mat-tab-label {
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.tb-primary-background {
|
||||
background-color: $primary;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
BIN
ui-ngx/src/thingsboard.ico
Normal file
BIN
ui-ngx/src/thingsboard.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
11
ui-ngx/src/tsconfig.app.json
Normal file
11
ui-ngx/src/tsconfig.app.json
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../out-tsc/app",
|
||||
"types": ["node"]
|
||||
},
|
||||
"exclude": [
|
||||
"test.ts",
|
||||
"**/*.spec.ts"
|
||||
]
|
||||
}
|
||||
18
ui-ngx/src/tsconfig.spec.json
Normal file
18
ui-ngx/src/tsconfig.spec.json
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../out-tsc/spec",
|
||||
"types": [
|
||||
"jasmine",
|
||||
"node"
|
||||
]
|
||||
},
|
||||
"files": [
|
||||
"test.ts",
|
||||
"polyfills.ts"
|
||||
],
|
||||
"include": [
|
||||
"**/*.spec.ts",
|
||||
"**/*.d.ts"
|
||||
]
|
||||
}
|
||||
17
ui-ngx/src/tslint.json
Normal file
17
ui-ngx/src/tslint.json
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"extends": "../tslint.json",
|
||||
"rules": {
|
||||
"directive-selector": [
|
||||
true,
|
||||
"attribute",
|
||||
"tb",
|
||||
"camelCase"
|
||||
],
|
||||
"component-selector": [
|
||||
true,
|
||||
"element",
|
||||
"tb",
|
||||
"kebab-case"
|
||||
]
|
||||
}
|
||||
}
|
||||
31
ui-ngx/tsconfig.json
Normal file
31
ui-ngx/tsconfig.json
Normal file
@ -0,0 +1,31 @@
|
||||
{
|
||||
"compileOnSave": false,
|
||||
"compilerOptions": {
|
||||
"baseUrl": "./",
|
||||
"outDir": "./dist/out-tsc",
|
||||
"sourceMap": true,
|
||||
"declaration": false,
|
||||
"module": "es2015",
|
||||
"moduleResolution": "node",
|
||||
"emitDecoratorMetadata": true,
|
||||
"experimentalDecorators": true,
|
||||
"importHelpers": true,
|
||||
"target": "es5",
|
||||
"typeRoots": [
|
||||
"node_modules/@types"
|
||||
],
|
||||
"paths": {
|
||||
"@app/*": ["src/app/*"],
|
||||
"@env/*": [
|
||||
"src/environments/*"
|
||||
],
|
||||
"@core/*": ["src/app/core/*"],
|
||||
"@modules/*": ["src/app/modules/*"],
|
||||
"@shared/*": ["src/app/shared/*"]
|
||||
},
|
||||
"lib": [
|
||||
"es2018",
|
||||
"dom"
|
||||
]
|
||||
}
|
||||
}
|
||||
75
ui-ngx/tslint.json
Normal file
75
ui-ngx/tslint.json
Normal file
@ -0,0 +1,75 @@
|
||||
{
|
||||
"extends": "tslint:recommended",
|
||||
"rulesDirectory": [
|
||||
"codelyzer"
|
||||
],
|
||||
"rules": {
|
||||
"array-type": false,
|
||||
"arrow-parens": false,
|
||||
"deprecation": {
|
||||
"severity": "warn"
|
||||
},
|
||||
"import-blacklist": [
|
||||
true,
|
||||
"rxjs/Rx"
|
||||
],
|
||||
"interface-name": false,
|
||||
"max-classes-per-file": false,
|
||||
"max-line-length": [
|
||||
true,
|
||||
140
|
||||
],
|
||||
"member-access": false,
|
||||
"member-ordering": [
|
||||
true,
|
||||
{
|
||||
"order": [
|
||||
"static-field",
|
||||
"instance-field",
|
||||
"static-method",
|
||||
"instance-method"
|
||||
]
|
||||
}
|
||||
],
|
||||
"no-consecutive-blank-lines": false,
|
||||
"no-console": [
|
||||
true,
|
||||
"debug",
|
||||
"info",
|
||||
"time",
|
||||
"timeEnd",
|
||||
"trace"
|
||||
],
|
||||
"no-empty": false,
|
||||
"no-inferrable-types": [
|
||||
true,
|
||||
"ignore-params"
|
||||
],
|
||||
"no-non-null-assertion": true,
|
||||
"no-redundant-jsdoc": true,
|
||||
"no-switch-case-fall-through": true,
|
||||
"no-use-before-declare": true,
|
||||
"no-var-requires": false,
|
||||
"object-literal-key-quotes": [
|
||||
true,
|
||||
"as-needed"
|
||||
],
|
||||
"object-literal-sort-keys": false,
|
||||
"ordered-imports": false,
|
||||
"quotemark": [
|
||||
true,
|
||||
"single"
|
||||
],
|
||||
"trailing-comma": false,
|
||||
"no-output-on-prefix": true,
|
||||
"use-input-property-decorator": true,
|
||||
"use-output-property-decorator": true,
|
||||
"use-host-property-decorator": true,
|
||||
"no-input-rename": true,
|
||||
"no-output-rename": true,
|
||||
"use-life-cycle-interface": true,
|
||||
"use-pipe-transform-interface": true,
|
||||
"component-class-suffix": true,
|
||||
"directive-class-suffix": true
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user