diff --git a/.angular-cli.json b/.angular-cli.json
deleted file mode 100644
index fa4eaf6..0000000
--- a/.angular-cli.json
+++ /dev/null
@@ -1,72 +0,0 @@
-{
- "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
- "project": {
- "name": "ng-pi-admin"
- },
- "apps": [{
- "root": "src",
- "outDir": "dist",
- "assets": [
- "assets",
- "favicon.ico"
- ],
- "index": "index.html",
- "main": "main.ts",
- "polyfills": "polyfills.ts",
- "test": "test.ts",
- "tsconfig": "tsconfig.app.json",
- "testTsconfig": "tsconfig.spec.json",
- "prefix": "app",
- "styles": [
- "../node_modules/normalize.css/normalize.css",
- "../node_modules/font-awesome/scss/font-awesome.scss",
- "../node_modules/bootstrap/less/bootstrap.less",
- "../node_modules/sweetalert2/dist/sweetalert2.css",
- "../node_modules/animate.css/animate.css",
- "assets/iconfonts/iconfont.css",
- "app/shared/_styles.scss",
- "styles.scss"
- ],
- "scripts": [
- "../node_modules/jquery/dist/jquery.js",
- "../node_modules/bootstrap/dist/js/bootstrap.js",
- "../node_modules/sweetalert2/dist/sweetalert2.js",
- "../node_modules/echarts/dist/echarts.min.js",
- "../node_modules/echarts/map/js/china.js",
- "../node_modules/echarts/dist/extension/bmap.js",
- "app/shared/theme/echarts/dark.js"
- ],
- "environmentSource": "environments/environment.ts",
- "environments": {
- "dev": "environments/environment.ts",
- "prod": "environments/environment.prod.ts"
- }
- }],
- "e2e": {
- "protractor": {
- "config": "./protractor.conf.js"
- }
- },
- "lint": [{
- "project": "src/tsconfig.app.json",
- "exclude": "**/node_modules/**"
- },
- {
- "project": "src/tsconfig.spec.json",
- "exclude": "**/node_modules/**"
- },
- {
- "project": "e2e/tsconfig.e2e.json",
- "exclude": "**/node_modules/**"
- }
- ],
- "test": {
- "karma": {
- "config": "./karma.conf.js"
- }
- },
- "defaults": {
- "styleExt": "scss",
- "component": {}
- }
-}
diff --git a/.gitignore b/.gitignore
index 6b66814..675a5e7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -33,6 +33,7 @@ npm-debug.log
testem.log
/typings
yarn-error.log
+yarn.lock
# e2e
/e2e/*.js
diff --git a/.travis.yml b/.travis.yml
index b6ab409..fd697d2 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -3,7 +3,7 @@ sudo: false
language: node_js
node_js:
- - 6.0
+ - 8.9
branches:
only:
@@ -14,7 +14,7 @@ before_install:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
-script:
+script:
- npm run build:ci
git:
diff --git a/README.md b/README.md
index bd3281d..418e04f 100644
--- a/README.md
+++ b/README.md
@@ -9,11 +9,11 @@ Default | Dark | Light
## Based on
-Angular 4+, Angular CLI, TypeScript, Scss, Bootstrap
+Angular 7+, Angular CLI, TypeScript, Scss, Bootstrap 3
## Demo
-[Live Demo](http://treesflower.com/ng-pi-admin)
+[Live Demo](https://treesflower.com/dist/)
## Getting started
```
@@ -25,6 +25,10 @@ ng serve
localhost:4200
```
+## Change theme
+```
+Edit src\app\shared\theme\conf.scss
+```
## License
[MIT license](LICENSE)
diff --git a/angular.json b/angular.json
new file mode 100644
index 0000000..958c803
--- /dev/null
+++ b/angular.json
@@ -0,0 +1,162 @@
+{
+ "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
+ "version": 1,
+ "newProjectRoot": "projects",
+ "projects": {
+ "ng-pi-admin": {
+ "root": "",
+ "sourceRoot": "src",
+ "projectType": "application",
+ "architect": {
+ "build": {
+ "builder": "@angular-devkit/build-angular:browser",
+ "options": {
+ "outputPath": "dist",
+ "index": "src/index.html",
+ "main": "src/main.ts",
+ "tsConfig": "src/tsconfig.app.json",
+ "polyfills": "src/polyfills.ts",
+ "assets": [
+ "src/assets",
+ "src/favicon.ico"
+ ],
+ "styles": [
+ "node_modules/normalize.css/normalize.css",
+ "node_modules/font-awesome/scss/font-awesome.scss",
+ "node_modules/bootstrap/less/bootstrap.less",
+ "node_modules/sweetalert2/dist/sweetalert2.css",
+ "node_modules/animate.css/animate.css",
+ "src/assets/iconfonts/iconfont.css",
+ "src/app/shared/_styles.scss",
+ "src/styles.scss"
+ ],
+ "scripts": [
+ "node_modules/jquery/dist/jquery.js",
+ "node_modules/bootstrap/dist/js/bootstrap.js",
+ "node_modules/sweetalert2/dist/sweetalert2.js",
+ "node_modules/echarts/dist/echarts.min.js",
+ "node_modules/echarts/map/js/china.js",
+ "node_modules/echarts/dist/extension/bmap.js",
+ "src/app/shared/theme/echarts/dark.js"
+ ]
+ },
+ "configurations": {
+ "production": {
+ "optimization": true,
+ "outputHashing": "all",
+ "sourceMap": false,
+ "extractCss": true,
+ "namedChunks": false,
+ "aot": true,
+ "extractLicenses": true,
+ "vendorChunk": false,
+ "buildOptimizer": true,
+ "fileReplacements": [
+ {
+ "replace": "src/environments/environment.ts",
+ "with": "src/environments/environment.prod.ts"
+ }
+ ]
+ }
+ }
+ },
+ "serve": {
+ "builder": "@angular-devkit/build-angular:dev-server",
+ "options": {
+ "browserTarget": "ng-pi-admin:build"
+ },
+ "configurations": {
+ "production": {
+ "browserTarget": "ng-pi-admin:build:production"
+ }
+ }
+ },
+ "extract-i18n": {
+ "builder": "@angular-devkit/build-angular:extract-i18n",
+ "options": {
+ "browserTarget": "ng-pi-admin:build"
+ }
+ },
+ "test": {
+ "builder": "@angular-devkit/build-angular:karma",
+ "options": {
+ "main": "src/test.ts",
+ "karmaConfig": "./karma.conf.js",
+ "polyfills": "src/polyfills.ts",
+ "tsConfig": "src/tsconfig.spec.json",
+ "scripts": [
+ "node_modules/jquery/dist/jquery.js",
+ "node_modules/bootstrap/dist/js/bootstrap.js",
+ "node_modules/sweetalert2/dist/sweetalert2.js",
+ "node_modules/echarts/dist/echarts.min.js",
+ "node_modules/echarts/map/js/china.js",
+ "node_modules/echarts/dist/extension/bmap.js",
+ "src/app/shared/theme/echarts/dark.js"
+ ],
+ "styles": [
+ "node_modules/normalize.css/normalize.css",
+ "node_modules/font-awesome/scss/font-awesome.scss",
+ "node_modules/bootstrap/less/bootstrap.less",
+ "node_modules/sweetalert2/dist/sweetalert2.css",
+ "node_modules/animate.css/animate.css",
+ "src/assets/iconfonts/iconfont.css",
+ "src/app/shared/_styles.scss",
+ "src/styles.scss"
+ ],
+ "assets": [
+ "src/assets",
+ "src/favicon.ico"
+ ]
+ }
+ },
+ "lint": {
+ "builder": "@angular-devkit/build-angular:tslint",
+ "options": {
+ "tsConfig": [
+ "src/tsconfig.app.json",
+ "src/tsconfig.spec.json"
+ ],
+ "exclude": [
+ "**/node_modules/**"
+ ]
+ }
+ }
+ }
+ },
+ "ng-pi-admin-e2e": {
+ "root": "e2e",
+ "sourceRoot": "e2e",
+ "projectType": "application",
+ "architect": {
+ "e2e": {
+ "builder": "@angular-devkit/build-angular:protractor",
+ "options": {
+ "protractorConfig": "./protractor.conf.js",
+ "devServerTarget": "ng-pi-admin:serve"
+ }
+ },
+ "lint": {
+ "builder": "@angular-devkit/build-angular:tslint",
+ "options": {
+ "tsConfig": [
+ "e2e/tsconfig.e2e.json"
+ ],
+ "exclude": [
+ "**/node_modules/**"
+ ]
+ }
+ }
+ }
+ }
+ },
+ "defaultProject": "ng-pi-admin",
+ "schematics": {
+ "@schematics/angular:component": {
+ "prefix": "app",
+ "styleext": "scss"
+ },
+ "@schematics/angular:directive": {
+ "prefix": "app"
+ }
+ }
+}
\ No newline at end of file
diff --git a/karma.conf.js b/karma.conf.js
index 1479998..4f78ebb 100644
--- a/karma.conf.js
+++ b/karma.conf.js
@@ -4,24 +4,22 @@
module.exports = function (config) {
const configuration = {
basePath: '',
- frameworks: ['jasmine', '@angular/cli'],
+ 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/cli/plugins/karma')
+ require('@angular-devkit/build-angular/plugins/karma')
],
client:{
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
- reports: [ 'html', 'lcovonly' ],
+ dir: require('path').join(__dirname, 'coverage'), reports: [ 'html', 'lcovonly' ],
fixWebpackSourcePaths: true
},
- angularCli: {
- environment: 'dev'
- },
+
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
diff --git a/package.json b/package.json
index ee92f0d..340a0df 100644
--- a/package.json
+++ b/package.json
@@ -14,53 +14,58 @@
},
"private": true,
"dependencies": {
- "@angular/animations": "^4.2.4",
- "@angular/common": "^4.2.4",
- "@angular/compiler": "^4.2.4",
- "@angular/core": "^4.2.4",
- "@angular/forms": "^4.2.4",
- "@angular/http": "^4.2.4",
- "@angular/platform-browser": "^4.2.4",
- "@angular/platform-browser-dynamic": "^4.2.4",
- "@angular/router": "^4.2.4",
- "angular2-froala-wysiwyg": "^2.6.0",
+ "@angular/animations": "^7.2.10",
+ "@angular/common": "^7.2.10",
+ "@angular/compiler": "^7.2.10",
+ "@angular/core": "^7.2.10",
+ "@angular/forms": "^7.2.10",
+ "@angular/http": "^7.2.10",
+ "@angular/platform-browser": "^7.2.10",
+ "@angular/platform-browser-dynamic": "^7.2.10",
+ "@angular/router": "^7.2.10",
+ "angular-froala-wysiwyg": "^2.9.3",
"animate.css": "^3.5.2",
"bootstrap": "^3.3.7",
- "core-js": "^2.4.1",
+ "core-js": "^2.5.4",
"echarts": "^3.8.5",
"font-awesome": "^4.7.0",
+ "fontface-source-sans-pro": "^2.0.10-alpha1",
"jquery": "^3.2.1",
"ng2-file-upload": "^1.3.0",
"ng2-select": "^2.0.0",
"ngx-echarts": "^2.0.0",
- "ngx-modal": "0.0.29",
+ "ngx-modal": "^0.0.29",
"ngx-pagination": "^3.0.3",
+ "node-sass": "^4.12.0",
"normalize.css": "^7.0.0",
"pell": "^1.0.4",
"roboto-fontface": "^0.8.0",
- "rxjs": "^5.4.2",
+ "rxjs": "^6.4.0",
+ "rxjs-compat": "^6.0.0-rc.0",
"sweetalert2": "^7.6.3",
- "zone.js": "^0.8.14"
+ "tslib": "^1.9.0",
+ "zone.js": "~0.8.26"
},
"devDependencies": {
- "@angular/cli": "1.3.1",
- "@angular/compiler-cli": "^4.2.4",
- "@angular/language-service": "^4.2.4",
- "@types/jasmine": "~2.5.53",
- "@types/jasminewd2": "~2.0.2",
- "@types/node": "~6.0.60",
- "codelyzer": "~3.1.1",
- "jasmine-core": "~2.6.2",
- "jasmine-spec-reporter": "~4.1.0",
- "karma": "~1.7.0",
- "karma-chrome-launcher": "~2.1.1",
+ "@angular-devkit/build-angular": "~0.13.0",
+ "@angular/cli": "^7.3.6",
+ "@angular/compiler-cli": "^7.2.10",
+ "@angular/language-service": "^7.2.10",
+ "@types/jasmine": "~2.8.8",
+ "@types/jasminewd2": "~2.0.3",
+ "@types/node": "~8.9.4",
+ "codelyzer": "~4.5.0",
+ "jasmine-core": "~2.99.1",
+ "jasmine-spec-reporter": "~4.2.1",
+ "karma": "~4.0.0",
+ "karma-chrome-launcher": "~2.2.0",
"karma-cli": "~1.0.1",
- "karma-coverage-istanbul-reporter": "^1.2.1",
- "karma-jasmine": "~1.1.0",
+ "karma-coverage-istanbul-reporter": "~2.0.1",
+ "karma-jasmine": "~1.1.2",
"karma-jasmine-html-reporter": "^0.2.2",
- "protractor": "~5.1.2",
- "ts-node": "~3.2.0",
- "tslint": "~5.3.2",
- "typescript": "~2.3.3"
+ "protractor": "~5.4.0",
+ "ts-node": "~7.0.0",
+ "tslint": "~5.11.0",
+ "typescript": "~3.2.2"
}
}
diff --git a/src/app/pages/index/index.component.html b/src/app/pages/index/index.component.html
index 7891764..f9b3870 100644
--- a/src/app/pages/index/index.component.html
+++ b/src/app/pages/index/index.component.html
@@ -2,8 +2,8 @@
-
Current Users
- 102,018 / 200,450
+ Users
+ 118 / 251