├── src ├── assets │ ├── .gitkeep │ ├── favicon.ico │ ├── close-button.svg │ └── devexpress-logo.svg ├── environments │ ├── environment.prod.ts │ └── environment.ts ├── app │ ├── app-routing.module.ts │ ├── app.component.scss │ ├── app.component.html │ ├── app.component.ts │ ├── demo-popup │ │ ├── demo-popup.component.ts │ │ ├── demo-popup.component.scss │ │ └── demo-popup.component.html │ └── app.module.ts ├── main.ts ├── styles.scss ├── test.ts ├── index.html └── polyfills.ts ├── images └── demo-image-main.png ├── .editorconfig ├── e2e ├── src │ ├── app.po.ts │ └── app.e2e-spec.ts ├── tsconfig.json └── protractor.conf.js ├── tsconfig.app.json ├── tsconfig.spec.json ├── tsconfig.json ├── .gitignore ├── .browserslistrc ├── .github └── workflows │ └── main.yml ├── karma.conf.js ├── package.json ├── README.md ├── tslint.json └── angular.json /src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /src/assets/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevExpress/web-dashboard-demo/HEAD/src/assets/favicon.ico -------------------------------------------------------------------------------- /images/demo-image-main.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DevExpress/web-dashboard-demo/HEAD/images/demo-image-main.png -------------------------------------------------------------------------------- /src/app/app-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { Routes, RouterModule } from '@angular/router'; 3 | 4 | const routes: Routes = []; 5 | 6 | @NgModule({ 7 | imports: [RouterModule.forRoot(routes)], 8 | exports: [RouterModule] 9 | }) 10 | export class AppRoutingModule { } 11 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see https://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.ts] 12 | quote_type = single 13 | 14 | [*.md] 15 | max_line_length = off 16 | trim_trailing_whitespace = false 17 | -------------------------------------------------------------------------------- /e2e/src/app.po.ts: -------------------------------------------------------------------------------- 1 | import { browser, by, element } from 'protractor'; 2 | 3 | export class AppPage { 4 | navigateTo(): Promise { 5 | return browser.get(browser.baseUrl) as Promise; 6 | } 7 | 8 | getTitleText(): Promise { 9 | return element(by.css('app-root .content span')).getText() as Promise; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /e2e/tsconfig.json: -------------------------------------------------------------------------------- 1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */ 2 | { 3 | "extends": "../tsconfig.json", 4 | "compilerOptions": { 5 | "outDir": "../out-tsc/e2e", 6 | "module": "commonjs", 7 | "target": "es2018", 8 | "types": [ 9 | "jasmine", 10 | "jasminewd2", 11 | "node" 12 | ] 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /tsconfig.app.json: -------------------------------------------------------------------------------- 1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */ 2 | { 3 | "extends": "./tsconfig.json", 4 | "compilerOptions": { 5 | "outDir": "./out-tsc/app", 6 | "types": [] 7 | }, 8 | "files": [ 9 | "src/main.ts", 10 | "src/polyfills.ts" 11 | ], 12 | "include": [ 13 | "src/**/*.d.ts" 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /src/app/app.component.scss: -------------------------------------------------------------------------------- 1 | .header { 2 | display: flex; 3 | position: absolute; 4 | top: 0; 5 | height: 46px; 6 | right: 0; 7 | left: 0; 8 | > .dx-widget { 9 | margin: 5px; 10 | } 11 | 12 | } 13 | .content { 14 | position: absolute; 15 | position: absolute; 16 | top: 46px; 17 | bottom: 0; 18 | right: 0; 19 | left: 0; 20 | 21 | } -------------------------------------------------------------------------------- /src/app/app.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 10 | 11 | 12 |
-------------------------------------------------------------------------------- /tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */ 2 | { 3 | "extends": "./tsconfig.json", 4 | "compilerOptions": { 5 | "outDir": "./out-tsc/spec", 6 | "types": [ 7 | "jasmine" 8 | ] 9 | }, 10 | "files": [ 11 | "src/test.ts", 12 | "src/polyfills.ts" 13 | ], 14 | "include": [ 15 | "src/**/*.spec.ts", 16 | "src/**/*.d.ts" 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /src/main.ts: -------------------------------------------------------------------------------- 1 | import { enableProdMode } from '@angular/core'; 2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 3 | 4 | import { AppModule } from './app/app.module'; 5 | import { environment } from './environments/environment'; 6 | 7 | if (environment.production) { 8 | enableProdMode(); 9 | } 10 | 11 | platformBrowserDynamic().bootstrapModule(AppModule) 12 | .catch(err => console.error(err)); 13 | -------------------------------------------------------------------------------- /src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { DashboardControlArgs, DashboardPanelExtension } from 'devexpress-dashboard/common'; 3 | 4 | @Component({ 5 | selector: 'app-root', 6 | templateUrl: './app.component.html', 7 | styleUrls: ['./app.component.scss'] 8 | }) 9 | export class AppComponent { 10 | title = 'web-dashboard-demo'; 11 | 12 | 13 | onBeforeRender(args: DashboardControlArgs) { 14 | args.component.registerExtension(new DashboardPanelExtension(args.component)); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */ 2 | { 3 | "compileOnSave": false, 4 | "compilerOptions": { 5 | "baseUrl": "./", 6 | "outDir": "./dist/out-tsc", 7 | "sourceMap": true, 8 | "declaration": false, 9 | "downlevelIteration": true, 10 | "experimentalDecorators": true, 11 | "moduleResolution": "node", 12 | "importHelpers": true, 13 | "target": "es2015", 14 | "module": "es2020", 15 | "strict": false, 16 | "lib": [ 17 | "es2018", 18 | "dom" 19 | ] 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/styles.scss: -------------------------------------------------------------------------------- 1 | @import url("../node_modules/jquery-ui/themes/base/all.css"); 2 | @import url("../node_modules/devextreme/dist/css/dx.common.css"); 3 | @import url("../node_modules/devextreme/dist/css/dx.light.css"); 4 | @import url("../node_modules/@devexpress/analytics-core/dist/css/dx-analytics.common.css"); 5 | @import url("../node_modules/@devexpress/analytics-core/dist/css/dx-analytics.light.css"); 6 | @import url("../node_modules/@devexpress/analytics-core/dist/css/dx-querybuilder.css"); 7 | @import url("../node_modules/devexpress-dashboard/dist/css/dx-dashboard.light.css"); -------------------------------------------------------------------------------- /src/app/demo-popup/demo-popup.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-demo-popup', 5 | templateUrl: './demo-popup.component.html', 6 | styleUrls: ['./demo-popup.component.scss'] 7 | }) 8 | export class DemoPopupComponent implements OnInit { 9 | 10 | visible: boolean = true; 11 | constructor() { } 12 | 13 | ngOnInit() { 14 | } 15 | get nativeWindow() : Window { 16 | return window; 17 | } 18 | 19 | hideDemoPopup() { 20 | this.visible = false; 21 | } 22 | popupHeight() { 23 | return this.nativeWindow.innerHeight; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { BrowserModule } from '@angular/platform-browser'; 2 | import { NgModule } from '@angular/core'; 3 | 4 | import { AppComponent } from './app.component'; 5 | import { DxDashboardControlModule } from 'devexpress-dashboard-angular'; 6 | import { DxPopupModule } from 'devextreme-angular/ui/popup'; 7 | import { DemoPopupComponent } from './demo-popup/demo-popup.component' 8 | 9 | @NgModule({ 10 | declarations: [ 11 | AppComponent, 12 | DemoPopupComponent, 13 | ], 14 | imports: [ 15 | BrowserModule, 16 | DxDashboardControlModule, 17 | DxPopupModule 18 | ], 19 | providers: [], 20 | bootstrap: [AppComponent] 21 | }) 22 | export class AppModule { } -------------------------------------------------------------------------------- /src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | // This file can be replaced during build by using the `fileReplacements` array. 2 | // `ng build --prod` replaces `environment.ts` with `environment.prod.ts`. 3 | // The list of file replacements can be found in `angular.json`. 4 | 5 | export const environment = { 6 | production: false 7 | }; 8 | 9 | /* 10 | * For easier debugging in development mode, you can import the following file 11 | * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`. 12 | * 13 | * This import should be commented out in production mode because it will have a negative impact 14 | * on performance if an error is thrown. 15 | */ 16 | // import 'zone.js/plugins/zone-error'; // Included with Angular CLI. 17 | -------------------------------------------------------------------------------- /e2e/src/app.e2e-spec.ts: -------------------------------------------------------------------------------- 1 | import { AppPage } from './app.po'; 2 | import { browser, logging } from 'protractor'; 3 | 4 | describe('workspace-project App', () => { 5 | let page: AppPage; 6 | 7 | beforeEach(() => { 8 | page = new AppPage(); 9 | }); 10 | 11 | it('should display welcome message', () => { 12 | page.navigateTo(); 13 | expect(page.getTitleText()).toEqual('web-dashboard-demo app is running!'); 14 | }); 15 | 16 | afterEach(async () => { 17 | // Assert that there are no errors emitted from the browser 18 | const logs = await browser.manage().logs().get(logging.Type.BROWSER); 19 | expect(logs).not.toContain(jasmine.objectContaining({ 20 | level: logging.Level.SEVERE, 21 | } as logging.Entry)); 22 | }); 23 | }); 24 | -------------------------------------------------------------------------------- /src/assets/close-button.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /tmp 6 | /out-tsc 7 | # Only exists if Bazel was run 8 | /bazel-out 9 | 10 | # dependencies 11 | /node_modules 12 | 13 | # profiling files 14 | chrome-profiler-events*.json 15 | speed-measure-plugin*.json 16 | 17 | # IDEs and editors 18 | /.idea 19 | .project 20 | .classpath 21 | .c9/ 22 | *.launch 23 | .settings/ 24 | *.sublime-workspace 25 | 26 | # IDE - VSCode 27 | .vscode/* 28 | !.vscode/settings.json 29 | !.vscode/tasks.json 30 | !.vscode/launch.json 31 | !.vscode/extensions.json 32 | .history/* 33 | 34 | # misc 35 | /.sass-cache 36 | /connect.lock 37 | /coverage 38 | /libpeerconnection.log 39 | npm-debug.log 40 | yarn-error.log 41 | testem.log 42 | /typings 43 | 44 | # System Files 45 | .DS_Store 46 | Thumbs.db 47 | -------------------------------------------------------------------------------- /src/test.ts: -------------------------------------------------------------------------------- 1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files 2 | 3 | import 'zone.js/testing'; 4 | import { getTestBed } from '@angular/core/testing'; 5 | import { 6 | BrowserDynamicTestingModule, 7 | platformBrowserDynamicTesting 8 | } from '@angular/platform-browser-dynamic/testing'; 9 | 10 | declare const require: { 11 | context(path: string, deep?: boolean, filter?: RegExp): { 12 | keys(): string[]; 13 | (id: string): T; 14 | }; 15 | }; 16 | 17 | // First, initialize the Angular testing environment. 18 | getTestBed().initTestEnvironment( 19 | BrowserDynamicTestingModule, 20 | platformBrowserDynamicTesting() 21 | ); 22 | // Then we find all the tests. 23 | const context = require.context('./', true, /\.spec\.ts$/); 24 | // And load the modules. 25 | context.keys().map(context); 26 | -------------------------------------------------------------------------------- /.browserslistrc: -------------------------------------------------------------------------------- 1 | # This file is used by the build system to adjust CSS and JS output to support the specified browsers below. 2 | # For additional information regarding the format and rule options, please see: 3 | # https://github.com/browserslist/browserslist#queries 4 | 5 | # For the full list of supported browsers by the Angular framework, please see: 6 | # https://angular.io/guide/browser-support 7 | 8 | # You can see what browsers were selected by your queries by running: 9 | # npx browserslist 10 | 11 | last 1 Chrome version 12 | last 1 Firefox version 13 | last 2 Edge major versions 14 | last 2 Safari major versions 15 | last 2 iOS major versions 16 | Firefox ESR 17 | not IE 9-10 # Angular support for IE 9-10 has been deprecated and will be removed as of Angular v11. To opt-in, remove the 'not' prefix on this line. 18 | not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line. 19 | -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: Build and Deploy 2 | on: 3 | push: 4 | branches: 5 | - master 6 | jobs: 7 | build: 8 | 9 | runs-on: ubuntu-latest 10 | 11 | steps: 12 | - uses: actions/checkout@v2 13 | - name: Angular Deploy gh-pages Actions 14 | # You may pin to the exact commit or the version. 15 | # uses: AhsanAyaz/angular-deploy-gh-pages-actions@26ffbdb76b46ce3d649d046f1f7f45099654cfd7 16 | uses: AhsanAyaz/angular-deploy-gh-pages-actions@v1.3.1 17 | with: 18 | # Github access token token used to deploy on gh_pages. You can find it on Github. 19 | github_access_token: ${{ secrets.GITHUB_TOKEN }} 20 | # base href for the app 21 | base_href: https://devexpress.github.io/web-dashboard-demo/ 22 | angular_dist_build_folder: dist/web-dashboard-demo 23 | # branch on which the angular build will be deployed 24 | deploy_branch: site 25 | -------------------------------------------------------------------------------- /e2e/protractor.conf.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | // Protractor configuration file, see link for more information 3 | // https://github.com/angular/protractor/blob/master/lib/config.ts 4 | 5 | const { SpecReporter, StacktraceOption } = require('jasmine-spec-reporter'); 6 | 7 | /** 8 | * @type { import("protractor").Config } 9 | */ 10 | exports.config = { 11 | allScriptsTimeout: 11000, 12 | specs: [ 13 | './src/**/*.e2e-spec.ts' 14 | ], 15 | capabilities: { 16 | browserName: 'chrome' 17 | }, 18 | directConnect: true, 19 | baseUrl: 'http://localhost:4200/', 20 | framework: 'jasmine', 21 | jasmineNodeOpts: { 22 | showColors: true, 23 | defaultTimeoutInterval: 30000, 24 | print: function() {} 25 | }, 26 | onPrepare() { 27 | require('ts-node').register({ 28 | project: require('path').join(__dirname, './tsconfig.json') 29 | }); 30 | jasmine.getEnv().addReporter(new SpecReporter({ 31 | spec: { 32 | displayStacktrace: StacktraceOption.PRETTY 33 | } 34 | })); 35 | } 36 | }; -------------------------------------------------------------------------------- /karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration file, see link for more information 2 | // https://karma-runner.github.io/1.0/config/configuration-file.html 3 | 4 | module.exports = function (config) { 5 | config.set({ 6 | basePath: '', 7 | frameworks: ['jasmine', '@angular-devkit/build-angular'], 8 | plugins: [ 9 | require('karma-jasmine'), 10 | require('karma-chrome-launcher'), 11 | require('karma-jasmine-html-reporter'), 12 | require('karma-coverage-istanbul-reporter'), 13 | require('@angular-devkit/build-angular/plugins/karma') 14 | ], 15 | client: { 16 | clearContext: false // leave Jasmine Spec Runner output visible in browser 17 | }, 18 | coverageIstanbulReporter: { 19 | dir: require('path').join(__dirname, './coverage/web-dashboard-demo'), 20 | reports: ['html', 'lcovonly', 'text-summary'], 21 | fixWebpackSourcePaths: true 22 | }, 23 | reporters: ['progress', 'kjhtml'], 24 | port: 9876, 25 | colors: true, 26 | logLevel: config.LOG_INFO, 27 | autoWatch: true, 28 | browsers: ['Chrome'], 29 | singleRun: false, 30 | restartOnFileChange: true 31 | }); 32 | }; 33 | -------------------------------------------------------------------------------- /src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | HTML JavaScript Web Dashboard Application | DevExpress 7 | 8 | 9 | 10 | 11 | 16 | 17 | 18 | 19 | 20 | 21 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/app/demo-popup/demo-popup.component.scss: -------------------------------------------------------------------------------- 1 | ::ng-deep .demo-popup { 2 | .dx-popup-wrapper > .dx-overlay-content { 3 | border-radius: 0px; 4 | border: none; 5 | box-shadow: 0px 0px 32px rgba(0, 0, 0, 0.25); 6 | } 7 | 8 | .dx-popup-content { 9 | padding: 50px; 10 | } 11 | 12 | .dx-popup-title { 13 | border-bottom: 0px; 14 | } 15 | .dx-overlay-wrapper { 16 | background-color: rgba(155,155,155, 0.5); 17 | } 18 | h1 { 19 | margin: 0px; 20 | color: #579ADD; 21 | font-size: 17pt; 22 | font-weight: 400; 23 | } 24 | 25 | p { 26 | color: #5C5C5C; 27 | font-size: 11pt; 28 | margin-bottom: 30px; 29 | } 30 | p.description { 31 | line-height: 1.6; 32 | margin-bottom: 50px; 33 | } 34 | p a { 35 | color: #448BD2; 36 | font-size: 10pt; 37 | } 38 | 39 | .logo { 40 | position: absolute; 41 | bottom: 50px; 42 | left: 50px; 43 | width: 170px; 44 | height: 28px; 45 | } 46 | 47 | .closeButton { 48 | position: absolute; 49 | width: 18px; 50 | height: 18px; 51 | top: 25px; 52 | right: 25px; 53 | } 54 | .closeButton img { 55 | cursor: pointer; 56 | } 57 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "web-dashboard-demo", 3 | "version": "0.0.0", 4 | "scripts": { 5 | "ng": "ng", 6 | "start": "ng serve", 7 | "build": "ng build", 8 | "test": "ng test", 9 | "lint": "ng lint", 10 | "e2e": "ng e2e" 11 | }, 12 | "private": true, 13 | "dependencies": { 14 | "@angular/animations": "~12.1.3", 15 | "@angular/common": "~12.1.3", 16 | "@angular/compiler": "~12.1.3", 17 | "@angular/core": "~12.1.3", 18 | "@angular/forms": "~12.1.3", 19 | "@angular/platform-browser": "~12.1.3", 20 | "@angular/platform-browser-dynamic": "~12.1.3", 21 | "@angular/router": "~12.1.3", 22 | "@devexpress/analytics-core": "~21.1.3", 23 | "devexpress-dashboard": "~21.1.3", 24 | "devexpress-dashboard-angular": "~21.1.3", 25 | "devextreme": "~21.1.3", 26 | "devextreme-angular": "~21.1.3", 27 | "rxjs": "~6.5.5", 28 | "tslib": "^2.0.0", 29 | "zone.js": "~0.11.4" 30 | }, 31 | "devDependencies": { 32 | "@angular-devkit/build-angular": "~12.1.3", 33 | "glob-parent": ">=5.1.2", 34 | "@angular/cli": "~12.1.3", 35 | "@angular/compiler-cli": "~12.1.3", 36 | "@types/node": "^12.11.1", 37 | "@types/jasmine": "~3.6.0", 38 | "@types/jasminewd2": "~2.0.3", 39 | "codelyzer": "^6.0.0", 40 | "jasmine-core": "~3.6.0", 41 | "jasmine-spec-reporter": "~5.0.0", 42 | "karma": "~6.3.4", 43 | "karma-chrome-launcher": "~3.1.0", 44 | "karma-coverage-istanbul-reporter": "~3.0.2", 45 | "karma-jasmine": "~4.0.0", 46 | "karma-jasmine-html-reporter": "^1.5.0", 47 | "protractor": "~7.0.0", 48 | "ts-node": "~8.3.0", 49 | "tslint": "~6.1.0", 50 | "typescript": "~4.3.5" 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/app/demo-popup/demo-popup.component.html: -------------------------------------------------------------------------------- 1 | 10 | 14 | 15 | 16 |
17 |
18 | 19 |
20 |
21 |

DevExpress Dashboard

22 |

The following application demonstrates how to create a Web Dashboard applicaiton with the DevExpress Dashboard Component for Angular. The application requires ASP.NET Core / MVC backend to get data from.

23 | 24 |

Get Started:
https://docs.devexpress.com/Dashboard/400322

25 |

Documentation:
https://docs.devexpress.com/Dashboard/401976/

26 |

Source Code:
https://github.com/DevExpress/web-dashboard-demo

27 |
28 | 33 |
34 |
35 | 36 | -------------------------------------------------------------------------------- /src/polyfills.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file includes polyfills needed by Angular and is loaded before the app. 3 | * You can add your own extra polyfills to this file. 4 | * 5 | * This file is divided into 2 sections: 6 | * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. 7 | * 2. Application imports. Files imported after ZoneJS that should be loaded before your main 8 | * file. 9 | * 10 | * The current setup is for so-called "evergreen" browsers; the last versions of browsers that 11 | * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera), 12 | * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. 13 | * 14 | * Learn more in https://angular.io/guide/browser-support 15 | */ 16 | 17 | /*************************************************************************************************** 18 | * BROWSER POLYFILLS 19 | */ 20 | 21 | /** IE10 and IE11 requires the following for NgClass support on SVG elements */ 22 | // import 'classlist.js'; // Run `npm install --save classlist.js`. 23 | 24 | /** 25 | * Web Animations `@angular/platform-browser/animations` 26 | * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari. 27 | * Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0). 28 | */ 29 | // import 'web-animations-js'; // Run `npm install --save web-animations-js`. 30 | 31 | /** 32 | * By default, zone.js will patch all possible macroTask and DomEvents 33 | * user can disable parts of macroTask/DomEvents patch by setting following flags 34 | * because those flags need to be set before `zone.js` being loaded, and webpack 35 | * will put import in the top of bundle, so user need to create a separate file 36 | * in this directory (for example: zone-flags.ts), and put the following flags 37 | * into that file, and then add the following code before importing zone.js. 38 | * import './zone-flags'; 39 | * 40 | * The flags allowed in zone-flags.ts are listed here. 41 | * 42 | * The following flags will work for all browsers. 43 | * 44 | * (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame 45 | * (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick 46 | * (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames 47 | * 48 | * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js 49 | * with the following flag, it will bypass `zone.js` patch for IE/Edge 50 | * 51 | * (window as any).__Zone_enable_cross_context_check = true; 52 | * 53 | */ 54 | 55 | /*************************************************************************************************** 56 | * Zone JS is required by default for Angular itself. 57 | */ 58 | import 'zone.js'; // Included with Angular CLI. 59 | 60 | 61 | /*************************************************************************************************** 62 | * APPLICATION IMPORTS 63 | */ 64 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Web Dashboard Application on Angular 2 | 3 | The following application contains the DevExpress Dashboard Component for Angular. The client side is hosted on the GitHub Pages and gets data from the server side that hosts on DevExpress.com. 4 | 5 | **Demo:** https://devexpress.github.io/web-dashboard-demo/ 6 | 7 | 8 | ![demo-image-main](images/demo-image-main.png) 9 | 10 | 11 | The Web Dashboard can be rendered on the client side, with data supplied by an ASP.NET Core / ASP.NET MVC backend. This allows you to do the following: 12 | 13 | - Publish a Web Dashboard as part of an Angular application. 14 | - Integrate the Web Dashboard into anything that supports HTTP requests (e.g., websites, web applications). See the following demo for details: [DevExpress Dashboard Demo](https://devexpress.github.io/web-dashboard-demo/)). 15 | - Use the Web Dashboard with [DevExtreme](https://js.devexpress.com) client-side widgets to create responsive web apps. 16 | 17 | Visit our product page for more information about BI Dashboard: [DevExpress Dashboard for .NET, Angular, React, and Vue](https://www.devexpress.com/products/net/dashboard/) 18 | 19 | ## Demo Structure 20 | This demo application uses the following DevExpress npm packages: 21 | - `devexpress-dashboard` 22 | - `devexpress-dashboard-angular` 23 | - `@devexpress/analytics-core` 24 | - `devextreme devextreme-angular` 25 | 26 | When you create your own application with a Dashboard Angular component, ensure that the following requirements are met: 27 | 28 | - The script version on the client side should match the library version (including the minor version) on the server side. 29 | - The DevExpress npm package versions should be identical (major and minor versions should be the same). 30 | 31 | The client part is an Angular application, where the `DxDashboardControlModule` module is used. Take a look at the following files: 32 | 33 | - [app.module.ts](./src/app/app.module.ts) 34 | 35 | Imports the `DxDashboardControlModule` module. 36 | - [app.component.html](./src/app/app.component.html) 37 | 38 | Embeds the `dx-dashboard-control` component. 39 | - [app.component.ts](./src/app/app.component.ts) 40 | 41 | Contains the application logic. 42 | 43 | The server side of this project is an ASP.NET Core application hosted on DevExpress.com (`https://demos.devexpress.com/services/dashboard/api`). 44 | 45 | ## Documentation 46 | 47 | - [Get Started: How to Create a Dashboard Angular Application](https://docs.devexpress.com/Dashboard/400322) 48 | - [Client-Side Configuration (Angular)](https://docs.devexpress.com/Dashboard/400409) 49 | - [Server-Side Configuration (ASP.NET Core)](https://docs.devexpress.com/Dashboard/119166) 50 | - [Server-Side Configuration (ASP.NET MVC)](https://docs.devexpress.com/Dashboard/119500) 51 | 52 | ## Examples 53 | 54 | - [Get Started - Client-Side Dashboard Application (Angular)](https://github.com/DevExpress-Examples/dashboard-angular-app-get-started) 55 | - [Dashboard Component for Angular - Configuration](https://github.com/DevExpress-Examples/dashboard-angular-app-configuration) 56 | 57 | ## License 58 | 59 | These files are distributed under the **MIT** license (free and open-source), but can only be used with a commercial DevExpress Dashboard software product. You can [review the license terms](https://www.devexpress.com/Support/EULAs/NetComponents.xml) or [download a free trial version](https://go.devexpress.com/DevExpressDownload_UniversalTrial.aspx) of the Dashboard suite at [DevExpress.com](https://www.devexpress.com). 60 | -------------------------------------------------------------------------------- /tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "tslint:recommended", 3 | "rules": { 4 | "align": { 5 | "options": [ 6 | "parameters", 7 | "statements" 8 | ] 9 | }, 10 | "array-type": false, 11 | "arrow-return-shorthand": true, 12 | "curly": true, 13 | "deprecation": { 14 | "severity": "warning" 15 | }, 16 | "component-class-suffix": true, 17 | "contextual-lifecycle": true, 18 | "directive-class-suffix": true, 19 | "directive-selector": [ 20 | true, 21 | "attribute", 22 | "app", 23 | "camelCase" 24 | ], 25 | "component-selector": [ 26 | true, 27 | "element", 28 | "app", 29 | "kebab-case" 30 | ], 31 | "eofline": true, 32 | "import-blacklist": [ 33 | true, 34 | "rxjs/Rx" 35 | ], 36 | "import-spacing": true, 37 | "indent": { 38 | "options": [ 39 | "spaces" 40 | ] 41 | }, 42 | "max-classes-per-file": false, 43 | "max-line-length": [ 44 | true, 45 | 140 46 | ], 47 | "member-ordering": [ 48 | true, 49 | { 50 | "order": [ 51 | "static-field", 52 | "instance-field", 53 | "static-method", 54 | "instance-method" 55 | ] 56 | } 57 | ], 58 | "no-console": [ 59 | true, 60 | "debug", 61 | "info", 62 | "time", 63 | "timeEnd", 64 | "trace" 65 | ], 66 | "no-empty": false, 67 | "no-inferrable-types": [ 68 | true, 69 | "ignore-params" 70 | ], 71 | "no-non-null-assertion": true, 72 | "no-redundant-jsdoc": true, 73 | "no-switch-case-fall-through": true, 74 | "no-var-requires": false, 75 | "object-literal-key-quotes": [ 76 | true, 77 | "as-needed" 78 | ], 79 | "quotemark": [ 80 | true, 81 | "single" 82 | ], 83 | "semicolon": { 84 | "options": [ 85 | "always" 86 | ] 87 | }, 88 | "space-before-function-paren": { 89 | "options": { 90 | "anonymous": "never", 91 | "asyncArrow": "always", 92 | "constructor": "never", 93 | "method": "never", 94 | "named": "never" 95 | } 96 | }, 97 | "typedef": [ 98 | true, 99 | "call-signature" 100 | ], 101 | "typedef-whitespace": { 102 | "options": [ 103 | { 104 | "call-signature": "nospace", 105 | "index-signature": "nospace", 106 | "parameter": "nospace", 107 | "property-declaration": "nospace", 108 | "variable-declaration": "nospace" 109 | }, 110 | { 111 | "call-signature": "onespace", 112 | "index-signature": "onespace", 113 | "parameter": "onespace", 114 | "property-declaration": "onespace", 115 | "variable-declaration": "onespace" 116 | } 117 | ] 118 | }, 119 | "variable-name": { 120 | "options": [ 121 | "ban-keywords", 122 | "check-format", 123 | "allow-pascal-case" 124 | ] 125 | }, 126 | "whitespace": { 127 | "options": [ 128 | "check-branch", 129 | "check-decl", 130 | "check-operator", 131 | "check-separator", 132 | "check-type", 133 | "check-typecast" 134 | ] 135 | }, 136 | "no-conflicting-lifecycle": true, 137 | "no-host-metadata-property": true, 138 | "no-input-rename": true, 139 | "no-inputs-metadata-property": true, 140 | "no-output-native": true, 141 | "no-output-on-prefix": true, 142 | "no-output-rename": true, 143 | "no-outputs-metadata-property": true, 144 | "template-banana-in-box": true, 145 | "template-no-negated-async": true, 146 | "use-lifecycle-interface": true, 147 | "use-pipe-transform-interface": true 148 | }, 149 | "rulesDirectory": [ 150 | "codelyzer" 151 | ] 152 | } -------------------------------------------------------------------------------- /angular.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "./node_modules/@angular/cli/lib/config/schema.json", 3 | "version": 1, 4 | "newProjectRoot": "projects", 5 | "projects": { 6 | "web-dashboard-demo": { 7 | "projectType": "application", 8 | "schematics": { 9 | "@schematics/angular:component": { 10 | "style": "scss" 11 | } 12 | }, 13 | "root": "", 14 | "sourceRoot": "src", 15 | "prefix": "app", 16 | "architect": { 17 | "build": { 18 | "builder": "@angular-devkit/build-angular:browser", 19 | "options": { 20 | "outputPath": "dist/web-dashboard-demo", 21 | "index": "src/index.html", 22 | "main": "src/main.ts", 23 | "polyfills": "src/polyfills.ts", 24 | "tsConfig": "tsconfig.app.json", 25 | "assets": [ 26 | "src/favicon.ico", 27 | "src/assets" 28 | ], 29 | "styles": [ 30 | "src/styles.scss" 31 | ], 32 | "scripts": [], 33 | "vendorChunk": true, 34 | "extractLicenses": false, 35 | "buildOptimizer": false, 36 | "sourceMap": true, 37 | "optimization": false, 38 | "namedChunks": true 39 | }, 40 | "configurations": { 41 | "production": { 42 | "fileReplacements": [ 43 | { 44 | "replace": "src/environments/environment.ts", 45 | "with": "src/environments/environment.prod.ts" 46 | } 47 | ], 48 | "optimization": { 49 | "scripts": true, 50 | "styles": { 51 | "minify": true, 52 | "inlineCritical": false 53 | }, 54 | "fonts": true 55 | }, 56 | "outputHashing": "all", 57 | "sourceMap": false, 58 | "namedChunks": false, 59 | "extractLicenses": true, 60 | "vendorChunk": false, 61 | "buildOptimizer": true, 62 | "budgets": [ 63 | { 64 | "type": "initial", 65 | "maximumWarning": "10mb", 66 | "maximumError": "10mb" 67 | }, 68 | { 69 | "type": "anyComponentStyle", 70 | "maximumWarning": "6kb", 71 | "maximumError": "10kb" 72 | } 73 | ] 74 | } 75 | }, 76 | "defaultConfiguration": "" 77 | }, 78 | "serve": { 79 | "builder": "@angular-devkit/build-angular:dev-server", 80 | "options": { 81 | "browserTarget": "web-dashboard-demo:build" 82 | }, 83 | "configurations": { 84 | "production": { 85 | "browserTarget": "web-dashboard-demo:build:production" 86 | } 87 | } 88 | }, 89 | "extract-i18n": { 90 | "builder": "@angular-devkit/build-angular:extract-i18n", 91 | "options": { 92 | "browserTarget": "web-dashboard-demo:build" 93 | } 94 | }, 95 | "test": { 96 | "builder": "@angular-devkit/build-angular:karma", 97 | "options": { 98 | "main": "src/test.ts", 99 | "polyfills": "src/polyfills.ts", 100 | "tsConfig": "tsconfig.spec.json", 101 | "karmaConfig": "karma.conf.js", 102 | "assets": [ 103 | "src/favicon.ico", 104 | "src/assets" 105 | ], 106 | "styles": [ 107 | "src/styles.scss" 108 | ], 109 | "scripts": [] 110 | } 111 | }, 112 | "lint": { 113 | "builder": "@angular-devkit/build-angular:tslint", 114 | "options": { 115 | "tsConfig": [ 116 | "tsconfig.app.json", 117 | "tsconfig.spec.json", 118 | "e2e/tsconfig.json" 119 | ], 120 | "exclude": [ 121 | "**/node_modules/**" 122 | ] 123 | } 124 | }, 125 | "e2e": { 126 | "builder": "@angular-devkit/build-angular:protractor", 127 | "options": { 128 | "protractorConfig": "e2e/protractor.conf.js", 129 | "devServerTarget": "web-dashboard-demo:serve" 130 | }, 131 | "configurations": { 132 | "production": { 133 | "devServerTarget": "web-dashboard-demo:serve:production" 134 | } 135 | } 136 | } 137 | } 138 | }}, 139 | "defaultProject": "web-dashboard-demo" 140 | } 141 | -------------------------------------------------------------------------------- /src/assets/devexpress-logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 9 | 10 | 11 | 12 | 15 | 18 | 20 | 22 | 23 | 24 | 26 | 28 | 31 | 33 | 36 | 39 | 42 | 44 | 47 | 51 | 52 | 53 | 54 | 57 | 59 | 62 | 63 | 66 | 67 | 70 | 74 | 76 | 77 | 78 | 79 | --------------------------------------------------------------------------------