diff --git a/angular.json b/angular.json
index b6483a046..8da15540b 100644
--- a/angular.json
+++ b/angular.json
@@ -24,9 +24,10 @@
"app/"
],
"styles": [
- "app/app.css"
+ "app/app.css",
+ "node_modules/bootstrap/dist/css/bootstrap.min.css"
],
- "scripts": []
+ "scripts": ["node_modules/mathjax/es5/tex-mml-chtml.js"]
},
"configurations": {
"production": {
@@ -89,9 +90,10 @@
"app/favicon.ico"
],
"styles": [
- "app/app.css"
+ "app/app.css",
+ "node_modules/bootstrap/dist/css/bootstrap.min.css"
],
- "scripts": []
+ "scripts": ["node_modules/mathjax/es5/tex-mml-chtml.js"]
}
}
}
diff --git a/app/app-upgraded-providers.js b/app/app-upgraded-providers.js
new file mode 100644
index 000000000..af96cf9e4
--- /dev/null
+++ b/app/app-upgraded-providers.js
@@ -0,0 +1,130 @@
+export function kommonitorCacheHelperServiceFactory(injector) {
+ return injector.get('kommonitorCacheHelperService');
+}
+export const ajskommonitorCacheHelperServiceProvider = {
+ deps: ['$injector'],
+ provide: 'kommonitorCacheHelperService',
+ useFactory: kommonitorCacheHelperServiceFactory,
+};
+export function kommonitorBatchUpdateHelperServiceFactory(injector) {
+ return injector.get('kommonitorBatchUpdateHelperService');
+}
+export const ajskommonitorBatchUpdateHelperServiceProvider = {
+ deps: ['$injector'],
+ provide: 'kommonitorBatchUpdateHelperService',
+ useFactory: kommonitorBatchUpdateHelperServiceFactory,
+};
+export function kommonitorConfigStorageServiceFactory(injector) {
+ return injector.get('kommonitorConfigStorageService');
+}
+export const ajskommonitorConfigStorageServiceProvider = {
+ deps: ['$injector'],
+ provide: 'kommonitorConfigStorageService',
+ useFactory: kommonitorConfigStorageServiceFactory,
+};
+//data exchange
+export function kommonitorDataExchangeServiceFactory(injector) {
+ return injector.get('kommonitorDataExchangeService');
+}
+export const ajskommonitorDataExchangeServiceeProvider = {
+ deps: ['$injector'],
+ provide: 'kommonitorDataExchangeService',
+ useFactory: kommonitorDataExchangeServiceFactory,
+};
+//data grid helper
+export function kommonitorDataGridHelperServiceFactory(injector) {
+ return injector.get('kommonitorDataGridHelperService');
+}
+export const ajskommonitorDataGridHelperServiceProvider = {
+ deps: ['$injector'],
+ provide: 'kommonitorDataGridHelperService',
+ useFactory: kommonitorDataGridHelperServiceFactory,
+};
+//diagram helper
+export function kommonitorDiagramHelperServiceFactory(injector) {
+ return injector.get('kommonitorDiagramHelperService');
+}
+export const ajskommonitorDiagramHelperServiceProvider = {
+ deps: ['$injector'],
+ provide: 'kommonitorDiagramHelperService',
+ useFactory: kommonitorDiagramHelperServiceFactory,
+};
+//filter helper
+export function kommonitorFilterHelperServiceFactory(injector) {
+ return injector.get('kommonitorFilterHelperService');
+}
+export const ajskommonitorFilterHelperServiceProvider = {
+ deps: ['$injector'],
+ provide: 'kommonitorFilterHelperService',
+ useFactory: kommonitorFilterHelperServiceFactory,
+};
+//keycloack helper
+export function kommonitorKeycloackHelperServiceFactory(injector) {
+ return injector.get('kommonitorKeycloackHelperService');
+}
+export const ajskommonitorKeycloackHelperServiceProvider = {
+ deps: ['$injector'],
+ provide: 'kommonitorKeycloackHelperService',
+ useFactory: kommonitorKeycloackHelperServiceFactory,
+};
+//multistep form
+export function kommonitorMultiStepFormHelperServiceFactory(injector) {
+ return injector.get('kommonitorMultiStepFormHelperService');
+}
+export const ajskommonitorMultiStepFormHelperServiceProvider = {
+ deps: ['$injector'],
+ provide: 'kommonitorMultiStepFormHelperService',
+ useFactory: kommonitorMultiStepFormHelperServiceFactory,
+};
+//script helpet
+export function kommonitorScriptHelperServiceFactory(injector) {
+ return injector.get('kommonitorScriptHelperService');
+}
+export const ajskommonitorScriptHelperServiceProvider = {
+ deps: ['$injector'],
+ provide: 'kommonitorScriptHelperService',
+ useFactory: kommonitorScriptHelperServiceFactory,
+};
+//share Helper
+export function kommonitorShareHelperServiceFactory(injector) {
+ return injector.get('kommonitorShareHelperService');
+}
+export const ajskommonitorShareHelperServiceProvider = {
+ deps: ['$injector'],
+ provide: 'kommonitorShareHelperService',
+ useFactory: kommonitorShareHelperServiceFactory,
+};
+//single feature map helper
+export function kommonitorSingleFeatureMapServiceFactory(injector) {
+ return injector.get('kommonitorSingleFeatureMapService');
+}
+export const ajskommonitorSingleFeatureMapServiceProvider = {
+ deps: ['$injector'],
+ provide: 'kommonitorSingleFeatureMapService',
+ useFactory: kommonitorSingleFeatureMapServiceFactory,
+};
+//visually style helper
+export function kommonitorVisualStyleHelperServiceFactory(injector) {
+ return injector.get('kommonitorVisualStyleHelperService');
+}
+export const ajskommonitorVisualStyleHelperServiceProvider = {
+ deps: ['$injector'],
+ provide: 'kommonitorVisualStyleHelperService',
+ useFactory: kommonitorVisualStyleHelperServiceFactory,
+};
+export const serviceProviders = [
+ ajskommonitorCacheHelperServiceProvider,
+ ajskommonitorBatchUpdateHelperServiceProvider,
+ ajskommonitorConfigStorageServiceProvider,
+ ajskommonitorDataExchangeServiceeProvider,
+ ajskommonitorDataGridHelperServiceProvider,
+ ajskommonitorDiagramHelperServiceProvider,
+ ajskommonitorFilterHelperServiceProvider,
+ ajskommonitorKeycloackHelperServiceProvider,
+ ajskommonitorMultiStepFormHelperServiceProvider,
+ ajskommonitorScriptHelperServiceProvider,
+ ajskommonitorShareHelperServiceProvider,
+ ajskommonitorSingleFeatureMapServiceProvider,
+ ajskommonitorVisualStyleHelperServiceProvider
+];
+//# sourceMappingURL=app-upgraded-providers.js.map
\ No newline at end of file
diff --git a/app/app-upgraded-providers.js.map b/app/app-upgraded-providers.js.map
new file mode 100644
index 000000000..2bada0d1b
--- /dev/null
+++ b/app/app-upgraded-providers.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"app-upgraded-providers.js","sourceRoot":"","sources":["app-upgraded-providers.ts"],"names":[],"mappings":"AAiBA,MAAM,UAAU,mCAAmC,CAAC,QAAY;IAC5D,OAAO,QAAQ,CAAC,GAAG,CAAC,8BAA8B,CAAC,CAAC;AACxD,CAAC;AACD,MAAM,CAAC,MAAM,uCAAuC,GAAQ;IACxD,IAAI,EAAE,CAAC,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QAAY;IAC7D,OAAO,QAAQ,CAAC,GAAG,CAAC,8BAA8B,CAAC,CAAA;AACvD,CAAC;AAED,MAAM,CAAC,MAAM,uCAAuC,GAAQ;IACxD,IAAI,EAAE,CAAC,WAAW,CAAC;IACnB,OAAO,EAAE,8BAA8B;IACvC,UAAU,EAAC,mCAAmC;CAC/C,CAAC;AAEJ,2BAA2B;AAC3B,MAAM,UAAU,wCAAwC,CAAE,QAAY;IAClE,OAAO,QAAQ,CAAC,GAAG,CAAC,mCAAmC,CAAC,CAAA;AAC5D,CAAC;AAED,MAAM,CAAC,MAAM,4CAA4C,GAAQ;IAC7D,IAAI,EAAE,CAAC,WAAW,CAAC;IACnB,OAAO,EAAE,mCAAmC;IAC5C,UAAU,EAAC,wCAAwC;CACpD,CAAC;AAIJ,uBAAuB;AAEvB,MAAM,UAAU,yCAAyC,CAAE,QAAY;IACnE,OAAO,QAAQ,CAAC,GAAG,CAAC,oCAAoC,CAAC,CAAA;AAC7D,CAAC;AAED,MAAM,CAAC,MAAM,6CAA6C,GAAQ;IAC9D,IAAI,EAAE,CAAC,WAAW,CAAC;IACnB,OAAO,EAAE,oCAAoC;IAC7C,UAAU,EAAC,yCAAyC;CACrD,CAAC;AAQF,MAAM,CAAC,MAAM,gBAAgB,GAAU;IACrC,uCAAuC;IACxC,6CAA6C;IAC5C,yCAAyC;IACzC,yCAAyC;IACzC,0CAA0C;IAC1C,yCAAyC;IACzC,wCAAwC;IAC5C,2CAA2C;IAC3C,+CAA+C;IAC/C,wCAAwC;IACxC,uCAAuC;IACvC,4CAA4C;IAC5C,6CAA6C;CAC1C,CAAC"}
\ No newline at end of file
diff --git a/app/app-upgraded-providers.ts b/app/app-upgraded-providers.ts
new file mode 100644
index 000000000..025d6c4f0
--- /dev/null
+++ b/app/app-upgraded-providers.ts
@@ -0,0 +1,178 @@
+import { Injector, Injectable } from '@angular/core';
+import { KommonitorElementVisibilityHelperService } from "util/genericServices/kommonitorElementVisibilityHelperService/kommonitor-element-visibility-helper-service.service";
+import { kommonitorCacheHelperService } from 'util/genericServices/kommonitorCacheHelperService/kommonitor-cache-helper-service.module';
+import {kommonitorBatchUpdateHelperService} from 'util/genericServices/kommonitorBatchUpdateHelperService/kommonitor-batch-update-helper-service.module';
+import {kommonitorConfigStorageService} from 'util/genericServices/kommonitorConfigStorageService/kommonitor-config-storage-service.module';
+import {kommonitorDataExchangeService} from 'util/genericServices/kommonitorDataExchangeService/kommonitor-data-exchange-service.module';
+import {kommonitorDataGridHelperService} from 'util/genericServices/kommonitorDataGridHelperService/kommonitor-data-grid-helper-service.module';
+import {kommonitorDiagramHelperService} from 'util/genericServices/kommonitorDiagramHelperService/kommonitor-diagram-helper-service.module';
+import {kommonitorFilterHelperService} from 'util/genericServices/kommonitorFilterHelperService/kommonitor-filter-helper-service.module';
+import {kommonitorImporterHelperService} from 'util/genericServices/kommonitorImporterHelperService/kommonitor-importer-helper-service.module';
+import {kommonitorKeycloackHelperService} from 'util/genericServices/kommonitorKeycloakHelperService/kommonitor-keycloak-helper-service.module'
+import {kommonitorMultistepFormHelperService} from 'util/genericServices/kommonitorMultiStepFormHelperService/kommonitor-multi-step-form-helper-service.module'
+import {kommonitorScriptHelperService} from'util/genericServices/kommonitorScriptHelperService/kommonitor-script-helper-service.module';
+import {kommonitorShareHelperService} from 'util/genericServices/kommonitorShareHelperService/kommonitor-share-helper-service.module'
+import {kommonitorSingleFeatureMapHelperService} from 'util/genericServices/kommonitorSingleFeatureMapHelperService/kommonitor-single-feature-map-helper-service.module'
+import {kommonitorVisualStyleHelperService} from 'util/genericServices/kommonitorVisualStyleHelperService/kommonitor-visual-style-helper-service.module'
+
+export function kommonitorCacheHelperServiceFactory(injector:any){
+ return injector.get('kommonitorCacheHelperService');
+}
+export const ajskommonitorCacheHelperServiceProvider: any = {
+ deps: ['$injector'],
+ provide: 'kommonitorCacheHelperService',
+ useFactory:kommonitorCacheHelperServiceFactory ,
+ };
+
+
+export function kommonitorBatchUpdateHelperServiceFactory (injector:any){
+ return injector.get('kommonitorBatchUpdateHelperService')
+}
+
+export const ajskommonitorBatchUpdateHelperServiceProvider: any = {
+ deps: ['$injector'],
+ provide: 'kommonitorBatchUpdateHelperService',
+ useFactory:kommonitorBatchUpdateHelperServiceFactory ,
+ };
+
+ export function kommonitorConfigStorageServiceFactory (injector:any){
+ return injector.get('kommonitorConfigStorageService')
+}
+
+export const ajskommonitorConfigStorageServiceProvider: any = {
+ deps: ['$injector'],
+ provide: 'kommonitorConfigStorageService',
+ useFactory:kommonitorConfigStorageServiceFactory,
+ };
+//data exchange
+ export function kommonitorDataExchangeServiceFactory (injector:any){
+ return injector.get('kommonitorDataExchangeService')
+}
+
+export const ajskommonitorDataExchangeServiceeProvider: any = {
+ deps: ['$injector'],
+ provide: 'kommonitorDataExchangeService',
+ useFactory:kommonitorDataExchangeServiceFactory,
+ };
+//data grid helper
+ export function kommonitorDataGridHelperServiceFactory (injector:any){
+ return injector.get('kommonitorDataGridHelperService')
+}
+
+export const ajskommonitorDataGridHelperServiceProvider: any = {
+ deps: ['$injector'],
+ provide: 'kommonitorDataGridHelperService',
+ useFactory:kommonitorDataGridHelperServiceFactory,
+ };
+//diagram helper
+ export function kommonitorDiagramHelperServiceFactory (injector:any){
+ return injector.get('kommonitorDiagramHelperService')
+}
+
+export const ajskommonitorDiagramHelperServiceProvider: any = {
+ deps: ['$injector'],
+ provide: 'kommonitorDiagramHelperService',
+ useFactory:kommonitorDiagramHelperServiceFactory,
+ };
+
+ //filter helper
+ export function kommonitorFilterHelperServiceFactory (injector:any){
+ return injector.get('kommonitorFilterHelperService')
+}
+
+export const ajskommonitorFilterHelperServiceProvider: any = {
+ deps: ['$injector'],
+ provide: 'kommonitorFilterHelperService',
+ useFactory:kommonitorFilterHelperServiceFactory,
+ };
+
+//keycloack helper
+ export function kommonitorKeycloackHelperServiceFactory (injector:any){
+ return injector.get('kommonitorKeycloackHelperService')
+}
+
+export const ajskommonitorKeycloackHelperServiceProvider: any = {
+ deps: ['$injector'],
+ provide: 'kommonitorKeycloackHelperService',
+ useFactory:kommonitorKeycloackHelperServiceFactory,
+ };
+
+ //multistep form
+ export function kommonitorMultiStepFormHelperServiceFactory (injector:any){
+ return injector.get('kommonitorMultiStepFormHelperService')
+}
+
+export const ajskommonitorMultiStepFormHelperServiceProvider: any = {
+ deps: ['$injector'],
+ provide: 'kommonitorMultiStepFormHelperService',
+ useFactory:kommonitorMultiStepFormHelperServiceFactory,
+ };
+
+//script helpet
+
+export function kommonitorScriptHelperServiceFactory (injector:any){
+ return injector.get('kommonitorScriptHelperService')
+}
+
+export const ajskommonitorScriptHelperServiceProvider: any = {
+ deps: ['$injector'],
+ provide: 'kommonitorScriptHelperService',
+ useFactory:kommonitorScriptHelperServiceFactory,
+ };
+//share Helper
+export function kommonitorShareHelperServiceFactory (injector:any){
+ return injector.get('kommonitorShareHelperService')
+}
+
+export const ajskommonitorShareHelperServiceProvider: any = {
+ deps: ['$injector'],
+ provide: 'kommonitorShareHelperService',
+ useFactory:kommonitorShareHelperServiceFactory,
+ };
+
+//single feature map helper
+export function kommonitorSingleFeatureMapServiceFactory (injector:any){
+ return injector.get('kommonitorSingleFeatureMapService')
+}
+
+export const ajskommonitorSingleFeatureMapServiceProvider: any = {
+ deps: ['$injector'],
+ provide: 'kommonitorSingleFeatureMapService',
+ useFactory:kommonitorSingleFeatureMapServiceFactory,
+ };
+
+
+
+//visually style helper
+
+export function kommonitorVisualStyleHelperServiceFactory (injector:any){
+ return injector.get('kommonitorVisualStyleHelperService')
+}
+
+export const ajskommonitorVisualStyleHelperServiceProvider: any = {
+ deps: ['$injector'],
+ provide: 'kommonitorVisualStyleHelperService',
+ useFactory:kommonitorVisualStyleHelperServiceFactory,
+ };
+
+
+
+
+
+
+
+ export const serviceProviders: any[] = [
+ ajskommonitorCacheHelperServiceProvider,
+ ajskommonitorBatchUpdateHelperServiceProvider,
+ ajskommonitorConfigStorageServiceProvider,
+ ajskommonitorDataExchangeServiceeProvider,
+ ajskommonitorDataGridHelperServiceProvider,
+ ajskommonitorDiagramHelperServiceProvider,
+ ajskommonitorFilterHelperServiceProvider,
+ajskommonitorKeycloackHelperServiceProvider,
+ajskommonitorMultiStepFormHelperServiceProvider,
+ajskommonitorScriptHelperServiceProvider,
+ajskommonitorShareHelperServiceProvider,
+ajskommonitorSingleFeatureMapServiceProvider,
+ajskommonitorVisualStyleHelperServiceProvider
+ ];
diff --git a/app/app.module.js b/app/app.module.js
new file mode 100644
index 000000000..8ce767982
--- /dev/null
+++ b/app/app.module.js
@@ -0,0 +1,453 @@
+import { __decorate } from "tslib";
+import { NgModule } from '@angular/core';
+import { BrowserModule } from '@angular/platform-browser';
+import { UpgradeModule } from '@angular/upgrade/static';
+import { downgradeComponent } from '@angular/upgrade/static';
+import * as $ from 'jquery';
+import Keycloak from 'keycloak-js';
+import angular from "angular";
+import { RouterModule } from '@angular/router';
+import { HashLocationStrategy, LocationStrategy } from '@angular/common';
+import { NgxEchartsModule } from 'ngx-echarts';
+import { EchartsxModule } from 'echarts-for-angular';
+import { InfoModalComponent } from 'components/kommonitorUserInterface/kommonitorControls/infoModal/info-modal.component';
+import { VersionInfoComponent } from 'components/kommonitorUserInterface/kommonitorControls/versionInfo/version-info.component';
+import { KommonitorDiagramsComponent } from 'components/kommonitorUserInterface/kommonitorControls/kommonitorDiagrams/kommonitor-diagrams.component';
+// import { InfoModalModule } from 'components/kommonitorUserInterface/kommonitorControls/infoModal/info-modal.module';
+// import { VersionInfoModule } from 'components/kommonitorUserInterface/kommonitorControls/versionInfo/version-info.module';
+import { ajskommonitorCacheHelperServiceProvider, ajskommonitorBatchUpdateHelperServiceProvider, ajskommonitorConfigStorageServiceProvider, ajskommonitorDataExchangeServiceeProvider, ajskommonitorDataGridHelperServiceProvider, ajskommonitorDiagramHelperServiceProvider, ajskommonitorFilterHelperServiceProvider, ajskommonitorKeycloackHelperServiceProvider, ajskommonitorMultiStepFormHelperServiceProvider, ajskommonitorSingleFeatureMapServiceProvider } from 'app-upgraded-providers';
+// currently the AngularJS routing is still used as part of kommonitorClient module
+const routes = [];
+export let AppModule = class AppModule {
+ constructor(upgrade) {
+ this.upgrade = upgrade;
+ this.env = {};
+ }
+ async ngDoBootstrap() {
+ this.checkBrowser();
+ await this.loadConfigs();
+ // instantiate env variable
+ this.env = window.__env || {};
+ this.downgradeDependencies();
+ // initialize kommonitorClient module
+ await this.initKomMonitorClientModule();
+ // init keycloak authentication
+ await this.initKeycloak();
+ this.upgrade.bootstrap(document.documentElement, ['kommonitorClient']);
+ // setUpLocationSync(this.upgrade);
+ }
+ downgradeDependencies() {
+ // to inject already upgraded KomMonitor Angular components into "old" AngluarJS components, we must do 2 things
+ // 1. downgrade the new Angular component and register it as directive within each requiring AngularJS module/component
+ // --> this especially means all components, where the downgraded component is used within the HTML part as directive
+ // 2. in order to prevent no module errors we must remove the old module reference within the .module file of the AngularJS modules/components
+ angular.module('kommonitorUserInterface')
+ .directive('infoModal', downgradeComponent({ component: InfoModalComponent }));
+ angular.module('kommonitorUserInterface')
+ .directive('versionInfo', downgradeComponent({ component: VersionInfoComponent }));
+ angular.module('kommonitorUserInterface')
+ .directive('kommonitor-diagrams', downgradeComponent({ component: KommonitorDiagramsComponent }));
+ console.log("registered downgraded Angular components for AngularJS usage");
+ }
+ checkBrowser() {
+ if (/MSIE 9/i.test(navigator.userAgent) || /MSIE 10/i.test(navigator.userAgent) || /rv:11.0/i.test(navigator.userAgent)) {
+ // This is internet explorer 9, 10 or 11
+ window.alert('Internet Explorer erkannt. Für eine optimale Nutzung von KomMonitor nutzen Sie nach Möglichkeit die Browser Firefox oder Chrome.');
+ }
+ if (/Edge\/\d./i.test(navigator.userAgent)) {
+ // This is Microsoft Edge
+ window.alert('Microsoft Edge erkannt. Für eine optimale Nutzung von KomMonitor nutzen Sie nach Möglichkeit die Browser Firefox oder Chrome.');
+ }
+ }
+ async loadConfigs() {
+ console.log("start loading required config files");
+ let self = this;
+ await $.when(this.ajaxCall_keycloakConfig_localBackup(window.__env.configStorageServerConfig), this.ajaxCall_controlsConfig_localBackup(window.__env.configStorageServerConfig)).then(async function (ajax1Results, ajax2Results) {
+ console.log("local backup configs have been loaded in case config server is not reachable.");
+ await self.ajaxCall_configServerFile();
+ }, async function () {
+ // on fail
+ console.log("all configs have been loaded - at least some from local backup values. See console log for details");
+ await self.ajaxCall_configServerFile();
+ });
+ }
+ ;
+ /*
+ LOAD CONFIG FILES FROM CONFIG STORAGE SERVER
+ */
+ ajaxCall_keycloakConfig(configStorageServerConfig) {
+ console.log("try to fetch keycloak config file");
+ return $.ajax({
+ url: configStorageServerConfig.targetUrlToConfigStorageServer_keycloakConfig,
+ success: function (result) {
+ console.log("keycloak config file fetched");
+ window.__env.keycloakConfig = result;
+ return;
+ },
+ error: function (XMLHttpRequest, textStatus, errorThrown) {
+ console.log("Use keycloak.json local backup default values");
+ }
+ });
+ }
+ ajaxCall_appConfig(configStorageServerConfig) {
+ console.log("try to fetch app config file");
+ return $.ajax({
+ url: configStorageServerConfig.targetUrlToConfigStorageServer_appConfig,
+ success: function (result) {
+ console.log("app config file fetched");
+ window.__env.appConfig = result;
+ return;
+ },
+ error: function (XMLHttpRequest, textStatus, errorThrown) {
+ console.log("Use env.js local backup default values");
+ }
+ });
+ }
+ ajaxCall_controlsConfig(configStorageServerConfig) {
+ console.log("try to fetch controls config file");
+ return $.ajax({
+ url: configStorageServerConfig.targetUrlToConfigStorageServer_controlsConfig,
+ success: function (result) {
+ console.log("controls config file fetched");
+ window.__env.controlsConfig = result;
+ return;
+ },
+ error: function (XMLHttpRequest, textStatus, errorThrown) {
+ console.log("Use controls-config.json local backup default values that has no widget restrictions.");
+ }
+ });
+ }
+ /*
+ LOAD CONFIG FILES FROM LOCAL BACKUP FILES
+ */
+ ajaxCall_keycloakConfig_localBackup(configStorageServerConfig) {
+ return $.ajax({
+ url: "./config/keycloak_backup.json",
+ success: function (result) {
+ console.log("local keycloak config file with default values fetched");
+ window.__env.keycloakConfig = result;
+ return;
+ },
+ error: function (XMLHttpRequest, textStatus, errorThrown) {
+ console.log("Error parsing local keycloak.json backup file");
+ }
+ });
+ }
+ ajaxCall_controlsConfig_localBackup(configStorageServerConfig) {
+ return $.ajax({
+ url: "./config/controls-config_backup.json",
+ success: function (result) {
+ console.log("local controls-config file with default values fetched");
+ window.__env.controlsConfig = result;
+ return;
+ },
+ error: function (XMLHttpRequest, textStatus, errorThrown) {
+ console.log("Error parsing local controlsConfig.json backup file");
+ }
+ });
+ }
+ loadAppConfigScriptDynamically(scriptUrl) {
+ return new Promise(function (res, rej) {
+ let script = document.createElement('script');
+ script.src = scriptUrl;
+ script.type = 'text/javascript';
+ script.onerror = rej;
+ script.async = true;
+ script.onload = res;
+ script.addEventListener('error', rej);
+ script.addEventListener('load', res);
+ document.head.appendChild(script);
+ });
+ }
+ initEnvVariables() {
+ // Import variables if present (from env.js)
+ if (window) {
+ Object.assign(this.env, window.__env);
+ }
+ if (!this.env.enableDebug) {
+ if (window) {
+ window.console.log = function () { };
+ }
+ }
+ }
+ ajaxCall_configServerFile() {
+ let self = this;
+ return $.ajax({
+ url: "./config/config-storage-server.json",
+ success: function (result) {
+ window.__env = window.__env || {};
+ window.__env.configStorageServerConfig = result;
+ // inject script tag dynamically to DOM to load ENV variables
+ console.log("dynamically load env.js");
+ const event = self.loadAppConfigScriptDynamically(window.__env.configStorageServerConfig.targetUrlToConfigStorageServer_appConfig)
+ .then(() => { console.log("loaded"); })
+ .catch(() => {
+ console.log("Error while loading app config from client config storage server. Will use defaults instead");
+ alert("Error while loading app config from client config storage server. Will use defaults instead.");
+ });
+ return $.when(self.ajaxCall_keycloakConfig(window.__env.configStorageServerConfig), self.ajaxCall_controlsConfig(window.__env.configStorageServerConfig), self.ajaxCall_appConfig(window.__env.configStorageServerConfig)).then(function (ajax1Results, ajax2Results, ajax3Results) {
+ console.log("all configs have been loaded");
+ self.initEnvVariables();
+ return;
+ }, function () {
+ // on fail
+ console.log("all configs have been loaded - at least some from local backup values. See console log for details");
+ self.initEnvVariables();
+ return;
+ });
+ }
+ });
+ }
+ initKomMonitorClientModule() {
+ let self = this;
+ // Register environment in AngularJS as constant
+ angular.module('kommonitorClient').constant('__env', window.__env);
+ // MathJx directive
+ angular.module('kommonitorClient').directive("mathjaxBind", function () {
+ return {
+ restrict: "EA",
+ controller: [
+ "$scope",
+ "$element",
+ "$attrs",
+ function ($scope, $element, $attrs) {
+ $scope.$watch($attrs.mathjaxBind, function (texExpression) {
+ $element.html(texExpression);
+ // only if texExpression contains the special character '$' which is used to mark tex code
+ // then call MathJax function
+ if (texExpression && texExpression.includes("$")) {
+ MathJax.typesetPromise([$element[0]]);
+ }
+ });
+ },
+ ],
+ };
+ });
+ // custom unique filter
+ angular.module('kommonitorClient').filter('unique', function () {
+ return function (collection, primaryKey) {
+ var output = [], keys = [];
+ var splitKeys = primaryKey.split('.'); //split by period
+ angular.forEach(collection, function (item) {
+ let key = "";
+ angular.copy(item, key);
+ for (var i = 0; i < splitKeys.length; i++) {
+ key = key[splitKeys[i]];
+ }
+ if (keys.indexOf(key) === -1) {
+ keys.push(key);
+ output.push(item);
+ }
+ });
+ return output;
+ };
+ });
+ angular.module('kommonitorClient').service("ControlsConfigService", ['$http', function ($http) {
+ window.__env.config = null;
+ // var resourcePath = window.__env.configStorageServerConfig ? window.__env.configStorageServerConfig.targetUrlToConfigStorageServer_controlsConfig : './config/controls-config_backup.json';
+ var resourcePath = './config/controls-config_backup.json';
+ var promise = $http.get(resourcePath).then(function (response) {
+ // window.__env.config = response.data;
+ window.__env.config = window.__env.controlsConfig;
+ });
+ return {
+ promise: promise,
+ setData: function (response) {
+ window.__env.config = window.__env.controlsConfig;
+ },
+ getControlsConfig: function () {
+ return window.__env.config;
+ }
+ };
+ }]);
+ // init/configure SPA routing
+ angular.module('kommonitorClient').
+ config(['$routeProvider', '$locationProvider',
+ function config($routeProvider, $locationProvider) {
+ $locationProvider.hashPrefix('!');
+ $routeProvider.
+ when('/', {
+ template: '',
+ resolve: {
+ "ControlsConfigService": function (ControlsConfigService) {
+ return ControlsConfigService.promise;
+ }
+ }
+ }).
+ when('/administration', {
+ template: '',
+ resolve: {
+ 'auth': function (Auth, $q, $location) {
+ if (window.__env.enableKeycloakSecurity) {
+ if (Auth.keycloak.authenticated) {
+ if (Auth.keycloak.tokenParsed
+ && Auth.keycloak.tokenParsed.realm_access
+ && Auth.keycloak.tokenParsed.realm_access.roles
+ && Auth.keycloak.tokenParsed.realm_access.roles.some(role => role.endsWith("-creator") || role.endsWith("-publisher") || role.endsWith("-editor"))) {
+ Auth.keycloak.showAdminView = true;
+ }
+ if (Auth.keycloak.showAdminView) {
+ return true;
+ }
+ else {
+ return $q.reject('Not Authenticated');
+ }
+ }
+ else {
+ Auth.keycloak.login({
+ redirectUri: $location.absUrl()
+ });
+ }
+ }
+ }
+ }
+ })
+ .otherwise('/');
+ }
+ ]);
+ // register auth interceptor to refresh Keycloak login on each user request
+ angular.module('kommonitorClient').factory('authInterceptor', ['$q', 'Auth', function ($q, Auth) {
+ return {
+ request: function (config) {
+ var deferred = $q.defer();
+ if (Auth.keycloak.token && self.urlRequiresKeycloakAuthHeader(config.url)) {
+ Auth.keycloak.updateToken(5).then(function () {
+ config.headers = config.headers || {};
+ config.headers.Authorization = 'Bearer ' + Auth.keycloak.token;
+ deferred.resolve(config);
+ }).catch(function () {
+ deferred.reject('Failed to refresh token');
+ console.error('Failed to refresh token. Will redirect to Login screen');
+ Auth.keycloak.login();
+ });
+ return deferred.promise;
+ }
+ else {
+ return config;
+ }
+ }
+ };
+ }]);
+ angular.module('kommonitorClient').config(['$httpProvider', function ($httpProvider) {
+ $httpProvider.interceptors.push('authInterceptor');
+ }]);
+ }
+ urlRequiresKeycloakAuthHeader(url) {
+ // /admin/ is used to make admin requests against keycloak
+ if (url.includes("/admin/")) {
+ return false;
+ }
+ // ORS isochrones and directions requests
+ if (url.includes("isochrones")) {
+ return false;
+ }
+ if (url.includes("routes")) {
+ return false;
+ }
+ // for KomMonitor public requests we do not need any authentication
+ if (url.includes("/public/")) {
+ return false;
+ }
+ return true;
+ }
+ ;
+ isBase64(str) {
+ var notBase64 = /[^A-Z0-9+\/=]/i;
+ const len = str.length;
+ if (!len || len % 4 !== 0 || notBase64.test(str)) {
+ return false;
+ }
+ const firstPaddingChar = str.indexOf('=');
+ return firstPaddingChar === -1 ||
+ firstPaddingChar === len - 1 ||
+ (firstPaddingChar === len - 2 && str[len - 1] === '=');
+ }
+ ;
+ // private decryptAesCBC(encryptedString: string) {
+ // var hashedKey = CryptoJS.SHA256(this.env.encryption.password);
+ // // from BASE64 encoded encrypted string
+ // var encryptedWordArray = CryptoJS.enc.Base64.parse(encryptedString);
+ // // get IV from beginning
+ // var iv = CryptoJS.lib.WordArray.create(
+ // encryptedWordArray.words.slice(0, (this.env.encryption.ivLength_byte) / 4)
+ // );
+ // var decrypted = CryptoJS.AES.decrypt(
+ // {
+ // ciphertext: CryptoJS.lib.WordArray.create(
+ // encryptedWordArray.words.slice(this.env.encryption.ivLength_byte / 4)
+ // )
+ // },
+ // hashedKey,
+ // { iv: iv }
+ // );
+ // var decryptedString = decrypted.toString(CryptoJS.enc.Utf8);
+ // var decryptedJson = JSON.parse(decryptedString);
+ // // sometimes a response might still be BASE64 encoded in addition
+ // // if so, then resolve that
+ // if (typeof decryptedJson === 'string' && this.isBase64(decryptedJson)) {
+ // decryptedJson = CryptoJS.enc.Base64.parse(decryptedJson).toString(CryptoJS.enc.Utf8);
+ // decryptedJson = JSON.parse(decryptedJson);
+ // }
+ // return decryptedJson;
+ // };
+ async initKeycloak() {
+ let auth = {
+ keycloak: {}
+ };
+ if (window.__env.enableKeycloakSecurity) {
+ var keycloakAdapter = new Keycloak(window.__env.configStorageServerConfig.targetUrlToConfigStorageServer_keycloakConfig);
+ // https://www.keycloak.org/docs/latest/securing_apps/#session-status-iframe
+ // https://www.keycloak.org/docs/latest/securing_apps/#_modern_browsers
+ return await keycloakAdapter.init({
+ onLoad: 'check-sso',
+ checkLoginIframe: false,
+ silentCheckSsoFallback: false
+ }).then(function (authenticated) {
+ console.log(authenticated ? 'User is authenticated!' : 'User is not authenticated!');
+ auth.keycloak = keycloakAdapter;
+ angular.module('kommonitorClient').factory('Auth', function () {
+ return auth;
+ });
+ try {
+ console.debug('Trying to bootstrap application.');
+ }
+ catch (e) {
+ console.error('Application bootstrapping failed.');
+ console.error(e);
+ }
+ }).catch(function () {
+ console.log('Failed to initialize authentication adapter. Will try to bootstrap application without keycloak security');
+ alert('Failed to initialize keycloak authentication adapter. Will try to bootstrap application without keycloak security');
+ });
+ }
+ }
+};
+AppModule = __decorate([
+ NgModule({
+ imports: [
+ BrowserModule,
+ UpgradeModule,
+ RouterModule.forRoot(routes, { useHash: true }),
+ NgxEchartsModule.forRoot({
+ echarts: () => import('echarts')
+ }),
+ EchartsxModule,
+ // InfoModalModule,
+ // VersionInfoModule
+ ],
+ providers: [
+ { provide: LocationStrategy, useClass: HashLocationStrategy },
+ ajskommonitorCacheHelperServiceProvider, ajskommonitorBatchUpdateHelperServiceProvider,
+ ajskommonitorConfigStorageServiceProvider, ajskommonitorKeycloackHelperServiceProvider,
+ ajskommonitorMultiStepFormHelperServiceProvider, ajskommonitorDataExchangeServiceeProvider,
+ ajskommonitorDataGridHelperServiceProvider, ajskommonitorSingleFeatureMapServiceProvider,
+ ajskommonitorDiagramHelperServiceProvider, ajskommonitorFilterHelperServiceProvider,
+ ],
+ declarations: [
+ InfoModalComponent,
+ VersionInfoComponent,
+ KommonitorDiagramsComponent
+ ]
+ })
+], AppModule);
+//# sourceMappingURL=app.module.js.map
\ No newline at end of file
diff --git a/app/app.module.js.map b/app/app.module.js.map
new file mode 100644
index 000000000..2c0ce8637
--- /dev/null
+++ b/app/app.module.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"app.module.js","sourceRoot":"","sources":["app.module.ts"],"names":[],"mappings":";AAAA,OAAO,EAAe,QAAQ,EAAW,MAAM,eAAe,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D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AK,CAAC,CAAC,CAAC,CAAC;iBAClB;YACH,CAAC,CAAC,CAAC,KAAK,CAAC;gBACP,OAAO,CAAC,GAAG,CAAC,0GAA0G,CAAC,CAAC;gBACxH,KAAK,CAAC,mHAAmH,CAAC,CAAC;YAC7H,CAAC,CAAC,CAAC;SACJ;IACH,CAAC;CAEF,CAAA;AAteY,SAAS;IA5BrB,QAAQ,CAAC;QACR,OAAO,EAAE;YACP,aAAa;YACb,aAAa;YACb,YAAY,CAAC,OAAO,CAAC,MAAM,EAAG,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;YAClD,gBAAgB,CAAC,OAAO,CAAC;gBACvB,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC;aACjC,CAAC;YACF,cAAc;YACZ,mBAAmB;YACnB,oBAAoB;SACrB;QACD,SAAS,EAAC;YACR,EAAC,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,oBAAoB,EAAC;YAC3D,uCAAuC,EAAC,6CAA6C;YACrF,yCAAyC,EAAC,2CAA2C;YACrF,+CAA+C,EAAC,yCAAyC;YACzF,0CAA0C,EAAC,4CAA4C;YACvF,yCAAyC,EAAC,wCAAwC;SACnF;QAED,YAAY,EAAE;YACZ,kBAAkB;YAClB,oBAAoB;YACtB,2BAA2B;SAC1B;KACF,CAAC;GAEW,SAAS,CAserB"}
\ No newline at end of file
diff --git a/app/app.module.ts b/app/app.module.ts
index 6203e5750..1f668d4db 100644
--- a/app/app.module.ts
+++ b/app/app.module.ts
@@ -1,22 +1,56 @@
-import { DoBootstrap, NgModule } from '@angular/core';
+import { DoBootstrap, NgModule, Version } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { UpgradeModule } from '@angular/upgrade/static';
-import $ from 'jquery';
+import { downgradeComponent } from '@angular/upgrade/static';
+import * as bootstrap from 'bootstrap';
+import * as $ from 'jquery'
import Keycloak from 'keycloak-js';
import angular from "angular";
+import * as echarts from 'echarts';
import { RouterModule, Routes } from '@angular/router';
import { HashLocationStrategy, LocationStrategy } from '@angular/common';
+import { NgxEchartsModule } from 'ngx-echarts';
+import { EchartsDirective, EchartsxModule } from 'echarts-for-angular';
+import { InfoModalComponent } from 'components/kommonitorUserInterface/kommonitorControls/infoModal/info-modal.component';
+import { VersionInfoComponent } from 'components/kommonitorUserInterface/kommonitorControls/versionInfo/version-info.component';
+import { KommonitorDiagramsComponent } from 'components/kommonitorUserInterface/kommonitorControls/kommonitorDiagrams/kommonitor-diagrams.component';
+// import { InfoModalModule } from 'components/kommonitorUserInterface/kommonitorControls/infoModal/info-modal.module';
+// import { VersionInfoModule } from 'components/kommonitorUserInterface/kommonitorControls/versionInfo/version-info.module';
+
+import { ajskommonitorCacheHelperServiceProvider,ajskommonitorBatchUpdateHelperServiceProvider,ajskommonitorConfigStorageServiceProvider,ajskommonitorDataExchangeServiceeProvider,ajskommonitorDataGridHelperServiceProvider,ajskommonitorDiagramHelperServiceProvider,ajskommonitorFilterHelperServiceProvider,ajskommonitorKeycloackHelperServiceProvider,ajskommonitorMultiStepFormHelperServiceProvider, ajskommonitorSingleFeatureMapServiceProvider } from 'app-upgraded-providers';
+//import { KommonitorDiagramsComponent } from 'components/kommonitorUserInterface/kommonitorControls/kommonitorDiagrams/kommonitor-diagrams.component';
// currently the AngularJS routing is still used as part of kommonitorClient module
const routes: Routes = [];
+declare var MathJax;
+
@NgModule({
imports: [
BrowserModule,
UpgradeModule,
- RouterModule.forRoot(routes , { useHash: true })
+ RouterModule.forRoot(routes , { useHash: true }),
+ NgxEchartsModule.forRoot({
+ echarts: () => import('echarts')
+ }),
+ EchartsxModule,
+ // InfoModalModule,
+ // VersionInfoModule
+ ],
+ providers:[
+ {provide: LocationStrategy, useClass: HashLocationStrategy},
+ ajskommonitorCacheHelperServiceProvider,ajskommonitorBatchUpdateHelperServiceProvider,
+ ajskommonitorConfigStorageServiceProvider,ajskommonitorKeycloackHelperServiceProvider,
+ ajskommonitorMultiStepFormHelperServiceProvider,ajskommonitorDataExchangeServiceeProvider,
+ ajskommonitorDataGridHelperServiceProvider,ajskommonitorSingleFeatureMapServiceProvider,
+ ajskommonitorDiagramHelperServiceProvider,ajskommonitorFilterHelperServiceProvider,
],
- providers: [{provide: LocationStrategy, useClass: HashLocationStrategy}],
+
+ declarations: [
+ InfoModalComponent,
+ VersionInfoComponent,
+KommonitorDiagramsComponent
+ ]
})
export class AppModule implements DoBootstrap {
@@ -34,6 +68,8 @@ export class AppModule implements DoBootstrap {
// instantiate env variable
this.env = window.__env || {};
+ this.downgradeDependencies();
+
// initialize kommonitorClient module
await this.initKomMonitorClientModule();
@@ -45,6 +81,27 @@ export class AppModule implements DoBootstrap {
}
+ private downgradeDependencies(): void {
+
+ // to inject already upgraded KomMonitor Angular components into "old" AngluarJS components, we must do 2 things
+ // 1. downgrade the new Angular component and register it as directive within each requiring AngularJS module/component
+ // --> this especially means all components, where the downgraded component is used within the HTML part as directive
+ // 2. in order to prevent no module errors we must remove the old module reference within the .module file of the AngularJS modules/components
+ angular.module('kommonitorUserInterface')
+ .directive('infoModal', downgradeComponent({ component: InfoModalComponent }) as angular.IDirectiveFactory);
+
+ angular.module('kommonitorUserInterface')
+ .directive('versionInfo', downgradeComponent({ component: VersionInfoComponent }) as angular.IDirectiveFactory);
+
+
+
+
+ angular.module('kommonitorUserInterface')
+ .directive('kommonitorDiagrams', downgradeComponent({ component: KommonitorDiagramsComponent }) as angular.IDirectiveFactory);
+
+ console.log("registered downgraded Angular components for AngularJS usage");
+ }
+
private checkBrowser(): void {
if (/MSIE 9/i.test(navigator.userAgent) || /MSIE 10/i.test(navigator.userAgent) || /rv:11.0/i.test(navigator.userAgent)) {
// This is internet explorer 9, 10 or 11
@@ -243,7 +300,7 @@ export class AppModule implements DoBootstrap {
// only if texExpression contains the special character '$' which is used to mark tex code
// then call MathJax function
if (texExpression && texExpression.includes("$")) {
- // MathJax.typesetPromise([$element[0]]);
+ MathJax.typesetPromise([$element[0]]);
}
});
},
diff --git a/app/components/kommonitorUserInterface/kommonitorControls/indicatorRadar/indicator-radar.component.ts b/app/components/kommonitorUserInterface/kommonitorControls/indicatorRadar/indicator-radar.component.ts
deleted file mode 100644
index 95cceef81..000000000
--- a/app/components/kommonitorUserInterface/kommonitorControls/indicatorRadar/indicator-radar.component.ts
+++ /dev/null
@@ -1,612 +0,0 @@
-angular
- .module('indicatorRadar')
- .component(
- 'indicatorRadar',
- {
- templateUrl: "components/kommonitorUserInterface/kommonitorControls/indicatorRadar/indicator-radar.template.html",
-
- controller: [
- 'kommonitorDataExchangeService', 'kommonitorDiagramHelperService', 'kommonitorFilterHelperService', '$scope', '$rootScope', '$timeout', '$http', '__env',
- function indicatorRadarController(
- kommonitorDataExchangeService, kommonitorDiagramHelperService, kommonitorFilterHelperService, $scope, $rootScope, $timeout, $http, __env) {
- /*
- * reference to kommonitorDataExchangeService instances
- */
- this.kommonitorDataExchangeServiceInstance = kommonitorDataExchangeService;
- this.kommonitorDiagramHelperServiceInstance = kommonitorDiagramHelperService;
-
- var self = this;
-
- $scope.activeTab = 0;
-
- // initialize any adminLTE box widgets
- $('.box').boxWidget();
-
- $(window).on('resize', function () {
- if ($scope.radarChart != null && $scope.radarChart != undefined) {
- $scope.radarChart.resize();
- }
- });
-
- $scope.$on("resizeDiagrams", function (event) {
-
- setTimeout(function () {
- if ($scope.radarChart != null && $scope.radarChart != undefined) {
- $scope.radarChart.resize();
- }
- }, 350);
- });
-
- const DATE_PREFIX = __env.indicatorDatePrefix;
-
- $scope.indicatorNameFilter = undefined;
-
- $scope.eventsRegistered = false;
-
- var numberOfDecimals = __env.numberOfDecimals;
-
- $scope.setupCompleted = true;
-
- $scope.onChangeFilterSameUnitAndSameTime = function(){
- if($scope.radarChart){
- $scope.radarChart.dispose();
- $scope.radarChart = echarts.init(document.getElementById('radarDiagram'));
- }
- kommonitorDiagramHelperService.indicatorPropertiesForCurrentSpatialUnitAndTime = [];
-
- kommonitorDiagramHelperService.setupIndicatorPropertiesForCurrentSpatialUnitAndTime(kommonitorDiagramHelperService.filterSameUnitAndSameTime);
- };
-
- $scope.date;
- $scope.spatialUnitName;
-
- $scope.$on("updateDiagrams", function (event, indicatorMetadataAndGeoJSON, spatialUnitName, spatialUnitId, date, defaultBrew, gtMeasureOfValueBrew, ltMeasureOfValueBrew, dynamicIncreaseBrew, dynamicDecreaseBrew, isMeasureOfValueChecked, measureOfValue, justRestyling) {
-
- // if the layer is just restyled (i.e. due to change of measureOfValue)
- // then we do not need to costly update the radar diagram
- if (justRestyling) {
- return;
- }
-
- console.log("updating radar diagram");
-
- $scope.setupCompleted = false;
-
- updateRadarChart(indicatorMetadataAndGeoJSON, spatialUnitName, spatialUnitId, date);
-
- $rootScope.$broadcast("preserveHighlightedFeatures");
-
- });
-
- // RADAR CHART TIME SERIES FUNCTION
- var updateRadarChart = async function (indicatorMetadataAndGeoJSON, spatialUnitName, spatialUnitId, date) {
- // based on prepared DOM, initialize echarts instance
- $scope.date = date;
- $scope.spatialUnitName = spatialUnitName;
-
- if (!$scope.radarChart)
- $scope.radarChart = echarts.init(document.getElementById('radarDiagram'));
- else {
- // explicitly kill and reinstantiate radar diagram to avoid zombie states on spatial unit change
- $scope.radarChart.dispose();
- $scope.radarChart = echarts.init(document.getElementById('radarDiagram'));
- kommonitorDiagramHelperService.indicatorPropertiesForCurrentSpatialUnitAndTime = new Array();
- }
-
- await $scope.radarChart.showLoading();
-
- kommonitorDiagramHelperService.setupIndicatorPropertiesForCurrentSpatialUnitAndTime();
-
- $scope.activeTab = 0;
- if(kommonitorDataExchangeService.selectedIndicator.creationType == "COMPUTATION"){
- $scope.activeTab = 1;
- }
- if(kommonitorDataExchangeService.selectedIndicator.isHeadlineIndicator){
- $scope.activeTab = 2;
- }
-
- modifyRadarContent(kommonitorDiagramHelperService.indicatorPropertiesForCurrentSpatialUnitAndTime);
- };
-
- $scope.onChangeSelectedDate = function(input){
- if(input.isSelected){
- modifyRadarContent(kommonitorDiagramHelperService.indicatorPropertiesForCurrentSpatialUnitAndTime);
- }
- };
-
- var wait = ms => new Promise((r, j) => setTimeout(r, ms));
-
- $scope.$on("allIndicatorPropertiesForCurrentSpatialUnitAndTime setup begin", async function (event) {
-
- await wait(130);
- $scope.setupCompleted = false;
-
-
- $timeout(function(){
- $scope.$digest();
- }, 500);
-
- });
-
- $scope.$on("allIndicatorPropertiesForCurrentSpatialUnitAndTime setup completed", async function (event) {
-
- await wait(130);
- $scope.setupCompleted = true;
-
-
- $timeout(function(){
- $scope.$digest();
- self.filterDisplayedIndicatorsOnRadar();
- }, 500);
-
- });
-
- var modifyRadarContent = async function (indicatorsForRadar) {
- var indicatorArrayForRadarChart = new Array();
- var defaultSeriesValueArray = new Array();
-
- var sampleProperties = null;
-
- for (var i = 0; i < indicatorsForRadar.length; i++) {
- if (indicatorsForRadar[i].isSelected) {
-
- await kommonitorDiagramHelperService.fetchIndicatorPropertiesIfNotExists(i);
-
- // make object to hold indicatorName, max value and average value
- var indicatorProperties = indicatorsForRadar[i].indicatorProperties;
-
- if(kommonitorFilterHelperService.completelyRemoveFilteredFeaturesFromDisplay && kommonitorFilterHelperService.filteredIndicatorFeatureIds.size > 0){
- indicatorProperties = indicatorProperties.filter(featureProperties => ! kommonitorFilterHelperService.featureIsCurrentlyFiltered(featureProperties[__env.FEATURE_ID_PROPERTY_NAME]));
- }
-
- sampleProperties = indicatorsForRadar[i].indicatorProperties;
-
- // var closestApplicableTimestamp = kommonitorDiagramHelperService.findClostestTimestamForTargetDate(indicatorsForRadar[i], $scope.date);
- // indicatorsForRadar[i].closestTimestamp = closestApplicableTimestamp;
-
- var sample = indicatorProperties[0];
- var maxValue = sample[DATE_PREFIX + indicatorsForRadar[i].selectedDate];
- var minValue = sample[DATE_PREFIX + indicatorsForRadar[i].selectedDate];
- var valueSum = 0;
-
- for (var indicatorPropertyInstance of indicatorProperties) {
- // for average only apply real numeric values
- if (!kommonitorDataExchangeService.indicatorValueIsNoData(indicatorPropertyInstance[DATE_PREFIX + indicatorsForRadar[i].selectedDate])) {
- var value = kommonitorDataExchangeService.getIndicatorValueFromArray_asNumber(indicatorPropertyInstance, indicatorsForRadar[i].selectedDate)
- valueSum += value;
-
- if (value > maxValue)
- maxValue = value;
-
- if (value < minValue)
- minValue = value;
- }
- }
-
- if (minValue == null) {
- minValue = 0;
- }
-
- if (maxValue == null) {
- maxValue = 1;
- }
-
- // IT MIGHT HAPPEN THAT AN INDICATOR IS INSPECTED THAT DOES NOT SUPPORT THE DATE
- // HENCE ONLY ADD VALUES TO DEFAULT IF THEY SHOW MEANINGFUL VALUES
- // if(valueSum != null){
- indicatorArrayForRadarChart.push({
- name: indicatorsForRadar[i].indicatorMetadata.indicatorName + " - " + indicatorsForRadar[i].selectedDate,
- unit: indicatorsForRadar[i].indicatorMetadata.unit,
- max: maxValue,
- min: minValue
- });
-
- defaultSeriesValueArray.push(kommonitorDataExchangeService.getIndicatorValue_asNumber(Number(valueSum / indicatorProperties.length)));
- // }
- }
-
- }
-
- if (defaultSeriesValueArray.length === 0) {
-
- if ($scope.radarChart) {
- $scope.radarChart.dispose();
- $scope.radarChart = undefined;
- }
-
- }
- else {
-
- if (!$scope.radarChart)
- $scope.radarChart = echarts.init(document.getElementById('radarDiagram'));
- // else{
- // // explicitly kill and reinstantiate radar diagram to avoid zombie states on spatial unit change
- // $scope.radarChart.dispose();
- // $scope.radarChart = echarts.init(document.getElementById('radarDiagram'));
- // }
-
- $scope.radarOption = {
- grid: {
- left: '4%',
- top: 0,
- right: '4%',
- bottom: 30,
- containLabel: true
- },
- title: {
- text: 'Indikatorenradar - ' + $scope.spatialUnitName + ' - ' + $scope.date,
- left: 'center',
- top: 0,
- show: false
- },
- tooltip: {
- confine: 'true',
- formatter: function (params) {
-
- var string = "" + params.name + "
";
-
- for (var index = 0; index < params.value.length; index++) {
- string += $scope.radarOption.radar.indicator[index].name + ": " + kommonitorDataExchangeService.getIndicatorValue_asFormattedText(params.value[index]) + " [" + $scope.radarOption.radar.indicator[index].unit + "]
";
- };
-
- return string;
- }
- // position: ['50%', '50%']
- },
- toolbox: {
- show: true,
- right: '15',
- feature: {
- // mark : {show: true},
- dataView: {
- show: kommonitorDataExchangeService.showDiagramExportButtons, readOnly: true, title: "Datenansicht", lang: ['Datenansicht - Indikatorenradar', 'schließen', 'refresh'], optionToContent: function (opt) {
-
- //
- //
- //
- // | Indikator-Name |
- // Beschreibung der Verknüpfung |
- //
- //
- //
- //
- // | {{indicator.referencedIndicatorName}} |
- // {{indicator.referencedIndicatorDescription}} |
- //
- //
- //
-
- var radarSeries = opt.series[0].data;
- var indicators = opt.radar[0].indicator;
-
- var dataTableId = "radarDataTable";
- var tableExportName = opt.title[0].text;
-
- var htmlString = '';
- htmlString += "";
- htmlString += "";
- htmlString += "| Feature-Name | ";
-
- for (var i = 0; i < indicators.length; i++) {
- htmlString += "" + indicators[i].name + " [" + indicators[i].unit + "] | ";
- }
-
- htmlString += "
";
- htmlString += "";
-
- htmlString += "";
-
-
-
- for (var j = 0; j < radarSeries.length; j++) {
- htmlString += "";
- htmlString += "| " + radarSeries[j].name + " | ";
- for (var k = 0; k < indicators.length; k++) {
- htmlString += "" + kommonitorDataExchangeService.getIndicatorValue_asNumber(radarSeries[j].value[k]) + " | ";
- }
- htmlString += "
";
- }
-
- htmlString += "";
- htmlString += "
";
-
- $rootScope.$broadcast("AppendExportButtonsForTable", dataTableId, tableExportName);
-
- return htmlString;
- }
- },
- restore: { show: false, title: "Darstellung erneuern" },
- saveAsImage: { show: true, title: "Export", pixelRatio: 4 }
- }
- },
- legend: {
- type: "scroll",
- bottom: 0,
- align: 'left',
- left: 5,
- data: ['Arithmetisches Mittel']
- },
- radar: {
- // shape: 'circle',
- // name: {
- // textStyle: {
- // color: '#fff',
- // backgroundColor: '#999',
- // borderRadius: 3,
- // padding: [3, 5]
- // }
- // },
- name: {
- formatter: function (value, indicator) {
-
- return kommonitorDataExchangeService.formatIndicatorNameForLabel(value, 15);
- },
- textStyle: {
- color: '#525252'
- },
- fontSize: 11
- },
- indicator: indicatorArrayForRadarChart
- },
- series: [{
- name: 'Indikatorvergleich',
- type: 'radar',
- symbolSize: 8,
- data: [
- {
- value: defaultSeriesValueArray,
- name: 'Arithmetisches Mittel',
- lineStyle: {
- color: 'gray',
- type: 'dashed',
- width: 3
- },
- itemStyle: {
- borderWidth: 2,
- color: 'gray'
- },
- emphasis: {
- lineStyle: {
- width: 4
- },
- itemStyle: {
- borderType: 'dashed'
- }
- }
- }
- ]
- }]
- };
-
- // check if any feature is still clicked/selected
- // then append those as series within radar chart
- appendSelectedFeaturesIfNecessary(sampleProperties);
-
- // use configuration item and data specified to show chart
- $scope.radarChart.setOption($scope.radarOption);
-
- $scope.radarChart.hideLoading();
- setTimeout(function () {
- $scope.radarChart.resize();
- $scope.$digest();
- }, 350);
- registerEventsIfNecessary();
-
- }
-
- }
-
- var appendSelectedFeaturesIfNecessary = function (sampleProperties) {
-
- for (var propertiesInstance of sampleProperties) {
- if (kommonitorFilterHelperService.featureIsCurrentlySelected(propertiesInstance[__env.FEATURE_ID_PROPERTY_NAME])) {
- appendSeriesToRadarChart(propertiesInstance);
- }
- }
- };
-
- function registerEventsIfNecessary() {
- if (!$scope.eventsRegistered) {
- // when hovering over elements of the chart then highlight them in the map.
- $scope.radarChart.on('mouseOver', function (params) {
- // $scope.userHoveresOverItem = true;
- var spatialFeatureName = params.data.name;
- // console.log(spatialFeatureName);
- if(spatialFeatureName){
- $rootScope.$broadcast("highlightFeatureOnMap", spatialFeatureName);
- }
-
- });
-
- $scope.radarChart.on('mouseOut', function (params) {
- // $scope.userHoveresOverItem = false;
-
- var spatialFeatureName = params.data.name;
- // console.log(spatialFeatureName);
- if(spatialFeatureName){
- $rootScope.$broadcast("unhighlightFeatureOnMap", spatialFeatureName);
- }
-
- });
-
- //disable feature removal for radar chart - seems to be unintuititve
- // $scope.radarChart.on('click', function(params){
- // var spatialFeatureName = params.data.name;
- // // console.log(spatialFeatureName);
- // if(spatialFeatureName){
- // $rootScope.$broadcast("switchHighlightFeatureOnMap", spatialFeatureName);
- // }
- // });
-
- $scope.eventsRegistered = true;
- }
- };
-
-
- $scope.$on("updateDiagramsForHoveredFeature", function (event, featureProperties) {
-
- if (!$scope.radarChart || !$scope.radarOption || !$scope.radarOption.legend || !$scope.radarOption.series) {
- return;
- }
-
- if (!kommonitorFilterHelperService.featureIsCurrentlySelected(featureProperties[__env.FEATURE_ID_PROPERTY_NAME])) {
- appendSeriesToRadarChart(featureProperties);
- }
-
- highlightFeatureInRadarChart(featureProperties);
- });
-
- var appendSeriesToRadarChart = function (featureProperties) {
- // append feature name to legend
- $scope.radarOption.legend.data.push(featureProperties[__env.FEATURE_NAME_PROPERTY_NAME]);
-
- // create feature data series
- var featureSeries = {};
- featureSeries.name = featureProperties[__env.FEATURE_NAME_PROPERTY_NAME];
- featureSeries.value = new Array();
- featureSeries.emphasis = {
- lineStyle: {
- width: 4,
- type: 'dotted'
- }
- };
- featureSeries.lineStyle = {
- width: 3,
- type: 'solid'
- };
- featureSeries.itemStyle = {
- borderWidth: 2
- };
-
-
- // for each indicator create series data entry for feature
- for (var i = 0; i < kommonitorDiagramHelperService.indicatorPropertiesForCurrentSpatialUnitAndTime.length; i++) {
- if (kommonitorDiagramHelperService.indicatorPropertiesForCurrentSpatialUnitAndTime[i].isSelected) {
- // make object to hold indicatorName, max value and average value
- var indicatorProperties = kommonitorDiagramHelperService.indicatorPropertiesForCurrentSpatialUnitAndTime[i].indicatorProperties;
- var date = kommonitorDiagramHelperService.indicatorPropertiesForCurrentSpatialUnitAndTime[i].selectedDate;
-
- for (var indicatorPropertyInstance of indicatorProperties) {
- if (indicatorPropertyInstance[__env.FEATURE_NAME_PROPERTY_NAME] == featureProperties[__env.FEATURE_NAME_PROPERTY_NAME]) {
- if (!kommonitorDataExchangeService.indicatorValueIsNoData(indicatorPropertyInstance[DATE_PREFIX + date])) {
- featureSeries.value.push(kommonitorDataExchangeService.getIndicatorValueFromArray_asNumber(indicatorPropertyInstance, date));
- }
- else {
- featureSeries.value.push(null);
- }
- break;
- }
- }
- }
-
- }
-
- $scope.radarOption.series[0].data.push(featureSeries);
-
- $scope.radarChart.setOption($scope.radarOption);
- setTimeout(function () {
- $scope.radarChart.resize();
- }, 350);
- registerEventsIfNecessary();
- };
-
- var highlightFeatureInRadarChart = function (featureProperties) {
- // highlight the corresponding bar diagram item
- // get series index of series
- var dataIndex = getSeriesDataIndexByFeatureName(featureProperties[__env.FEATURE_NAME_PROPERTY_NAME]);
-
- if (dataIndex > -1) {
- $scope.radarChart.dispatchAction({
- type: 'highlight',
- seriesIndex: 0,
- dataIndex: dataIndex
- });
- }
- };
-
- $scope.$on("updateDiagramsForUnhoveredFeature", function (event, featureProperties) {
-
- if (!$scope.radarChart || !$scope.radarOption || !$scope.radarOption.legend || !$scope.radarOption.series) {
- return;
- }
-
- unhighlightFeatureInRadarChart(featureProperties);
-
- if (!kommonitorFilterHelperService.featureIsCurrentlySelected(featureProperties[__env.FEATURE_ID_PROPERTY_NAME])) {
- removeSeriesFromRadarChart(featureProperties);
- }
- });
-
- var getSeriesDataIndexByFeatureName = function (featureName) {
- for (var index = 0; index < $scope.radarOption.series[0].data.length; index++) {
- if ($scope.radarOption.series[0].data[index].name == featureName)
- return index;
- }
-
- //return -1 if none was found
- return -1;
- };
-
- var removeSeriesFromRadarChart = function (featureProperties) {
- // remove feature from legend
- var legendIndex = $scope.radarOption.legend.data.indexOf(featureProperties[__env.FEATURE_NAME_PROPERTY_NAME]);
- if (legendIndex > -1) {
- $scope.radarOption.legend.data.splice(legendIndex, 1);
- }
-
- // remove feature data series
- var dataIndex = getSeriesDataIndexByFeatureName(featureProperties[__env.FEATURE_NAME_PROPERTY_NAME]);
- if (dataIndex > -1) {
- $scope.radarOption.series[0].data.splice(dataIndex, 1);
- }
-
- // second parameter tells echarts to not merge options with previous data. hence really remove series from graphic
- $scope.radarChart.setOption($scope.radarOption, true);
- setTimeout(function () {
- $scope.radarChart.resize();
- }, 350);
- registerEventsIfNecessary();
- };
-
- var unhighlightFeatureInRadarChart = function (featureProperties) {
- // highlight the corresponding bar diagram item
- // get series index of series
- var dataIndex = getSeriesDataIndexByFeatureName(featureProperties[__env.FEATURE_NAME_PROPERTY_NAME]);
-
- if (dataIndex > -1) {
- $scope.radarChart.dispatchAction({
- type: 'downplay',
- seriesIndex: 0,
- dataIndex: dataIndex
- });
- }
- };
-
- this.filterDisplayedIndicatorsOnRadar = function () {
- console.log("Filtering indicator radar");
-
- modifyRadarContent(kommonitorDiagramHelperService.indicatorPropertiesForCurrentSpatialUnitAndTime);
-
- }
-
- this.selectAllIndicatorsForRadar = function () {
-
- for (var indicator of kommonitorDiagramHelperService.indicatorPropertiesForCurrentSpatialUnitAndTime) {
- indicator.isSelected = true;
- }
-
- modifyRadarContent(kommonitorDiagramHelperService.indicatorPropertiesForCurrentSpatialUnitAndTime);
- }
-
- this.deselectAllIndicatorsForRadar = function () {
-
- for (var indicator of kommonitorDiagramHelperService.indicatorPropertiesForCurrentSpatialUnitAndTime) {
- indicator.isSelected = false;
- }
-
- modifyRadarContent(kommonitorDiagramHelperService.indicatorPropertiesForCurrentSpatialUnitAndTime);
- }
-
-
- }]
- });
diff --git a/app/components/kommonitorUserInterface/kommonitorControls/indicatorRadar/indicator-radar.module.ts b/app/components/kommonitorUserInterface/kommonitorControls/indicatorRadar/indicator-radar.module.ts
index 4358673cd..37894ffeb 100644
--- a/app/components/kommonitorUserInterface/kommonitorControls/indicatorRadar/indicator-radar.module.ts
+++ b/app/components/kommonitorUserInterface/kommonitorControls/indicatorRadar/indicator-radar.module.ts
@@ -1 +1,16 @@
-angular.module('indicatorRadar', [ 'kommonitorDataExchange', 'kommonitorDiagramHelper']);
+// indicator-radar.module.ts
+
+import { NgModule } from '@angular/core';
+
+import { kommonitorDiagramHelperServiceFactory } from 'app-upgraded-providers';
+import { kommonitorDataExchangeServiceFactory } from 'app-upgraded-providers';
+import { IndicatorRadarComponent } from './indicator-radar';
+@NgModule({
+ imports: [
+
+ ],
+ providers:[kommonitorDataExchangeServiceFactory,kommonitorDiagramHelperServiceFactory],
+ declarations: [IndicatorRadarComponent],
+ exports: []
+})
+export class IndicatorRadarModule { }
diff --git a/app/components/kommonitorUserInterface/kommonitorControls/indicatorRadar/indicator-radar.ts b/app/components/kommonitorUserInterface/kommonitorControls/indicatorRadar/indicator-radar.ts
new file mode 100644
index 000000000..e1e71017c
--- /dev/null
+++ b/app/components/kommonitorUserInterface/kommonitorControls/indicatorRadar/indicator-radar.ts
@@ -0,0 +1,473 @@
+import { Component, OnInit, ElementRef } from '@angular/core';
+
+
+@Component({
+ selector: 'indicator-radar',
+ templateUrl: 'indicator-radar.component.html',
+ styleUrls: ['indicator-radar.component.css'],
+})
+export class IndicatorRadarComponent implements OnInit {
+ activeTab = 0;
+ radarChart: any;
+ indicatorNameFilter: any;
+ eventsRegistered = false;
+ numberOfDecimals: number | undefined;
+ setupCompleted = true;
+ date: any;
+ spatialUnitName: any;
+ $scope: any;
+ $rootScope: any;
+
+ constructor(
+ private kommonitorDataExchangeService: KommonitorDataExchangeService,
+ private kommonitorDiagramHelperService: KommonitorDiagramHelperService,
+ private elementRef: ElementRef
+ ) {}
+
+ ngOnInit(): void {
+ this.$scope.$on("updateDiagramsForHoveredFeature", (event: any, featureProperties: any) => {
+ if (!this.radarChart || !this.radarOption || !this.radarOption.legend || !this.radarOption.series) {
+ return;
+ }
+
+ if (!kommonitorFilterHelperService.featureIsCurrentlySelected(featureProperties[__env.FEATURE_ID_PROPERTY_NAME])) {
+ this.appendSeriesToRadarChart(featureProperties);
+ }
+
+ this.highlightFeatureInRadarChart(featureProperties);
+ });
+
+ this.$scope.$on('allIndicatorPropertiesForCurrentSpatialUnitAndTime setup begin', async (event) => {
+ await this.wait(130);
+ this.setupCompleted = false;
+ this.$timeout(() => {
+ this.$scope.$digest();
+ }, 500);
+ });
+
+
+ this.$scope.$on('allIndicatorPropertiesForCurrentSpatialUnitAndTime setup completed', async (event) => {
+ await this.wait(130);
+ this.setupCompleted = true;
+ this.$timeout(() => {
+ this.$scope.$digest();
+ this.filterDisplayedIndicatorsOnRadar();
+ }, 500);
+ });
+ // Initialize any adminLTE box widgets
+ $(this.elementRef.nativeElement).find('.box').boxWidget();
+
+ $(window).on('resize', () => {
+ if (this.radarChart != null && this.radarChart != undefined) {
+ this.radarChart.resize();
+ }
+ });
+
+ this.kommonitorDiagramHelperService.setupIndicatorPropertiesForCurrentSpatialUnitAndTime(this.kommonitorDiagramHelperService.filterSameUnitAndSameTime);
+
+
+ onChangeFilterSameUnitAndSameTime() {
+ if (this.radarChart) {
+ this.radarChart.dispose();
+ this.radarChart = echarts.init(document.getElementById('radarDiagram'));
+ }
+ this.kommonitorDiagramHelperService.indicatorPropertiesForCurrentSpatialUnitAndTime = [];
+
+ this.kommonitorDiagramHelperService.setupIndicatorPropertiesForCurrentSpatialUnitAndTime(this.kommonitorDiagramHelperService.filterSameUnitAndSameTime);
+ }
+
+ this.$scope.$on('updateDiagrams', (event, indicatorMetadataAndGeoJSON, spatialUnitName, spatialUnitId, date, defaultBrew, gtMeasureOfValueBrew, ltMeasureOfValueBrew, dynamicIncreaseBrew, dynamicDecreaseBrew, isMeasureOfValueChecked, measureOfValue, justRestyling) => {
+ // if the layer is just restyled (i.e. due to change of measureOfValue)
+ // then we do not need to costly update the radar diagram
+ if (justRestyling) {
+ return;
+ }
+
+ console.log('Updating radar diagram');
+
+ this.setupCompleted = false;
+
+
+ this.updateRadarChart(indicatorMetadataAndGeoJSON, spatialUnitName, spatialUnitId, date);
+
+ this.$rootScope.$broadcast('preserveHighlightedFeatures');
+ });
+
+ }
+ $timeout(arg0: () => void, arg1: number) {
+ throw new Error('Method not implemented.');
+ }
+
+
+
+ updateRadarChart(
+ indicatorMetadataAndGeoJSON: any,
+ spatialUnitName: any,
+ spatialUnitId: any,
+ date: any
+ ) {
+
+ this.date = date;
+ this.spatialUnitName = spatialUnitName;
+
+ if (!this.radarChart) {
+ this.radarChart = echarts.init(document.getElementById('radarDiagram'));
+ } else {
+
+ this.radarChart.dispose();
+ this.radarChart = echarts.init(document.getElementById('radarDiagram'));
+ this.kommonitorDiagramHelperService.indicatorPropertiesForCurrentSpatialUnitAndTime = [];
+ }
+
+ await this.radarChart.showLoading();
+
+ this.kommonitorDiagramHelperService.setupIndicatorPropertiesForCurrentSpatialUnitAndTime();
+
+ this.activeTab = 0;
+ if (this.kommonitorDataExchangeService.selectedIndicator.creationType == 'COMPUTATION') {
+ this.activeTab = 1;
+ }
+ if (this.kommonitorDataExchangeService.selectedIndicator.isHeadlineIndicator) {
+ this.activeTab = 2;
+ }
+
+ this.modifyRadarContent(this.kommonitorDiagramHelperService.indicatorPropertiesForCurrentSpatialUnitAndTime);
+ }
+
+
+
+
+ wait(ms: number) {
+ return new Promise((resolve, reject) => {
+ setTimeout(resolve, ms);
+ });
+ }
+
+
+// Add this method inside your TypeScript class
+async modifyRadarContent(indicatorsForRadar: any) {
+ const indicatorArrayForRadarChart = new Array();
+ const defaultSeriesValueArray = new Array();
+
+ let sampleProperties = null;
+
+ for (let i = 0; i < indicatorsForRadar.length; i++) {
+ if (indicatorsForRadar[i].isSelected) {
+ await this.kommonitorDiagramHelperService.fetchIndicatorPropertiesIfNotExists(i);
+
+ // Create an object to hold indicatorName, max value, and average value
+ const indicatorProperties = indicatorsForRadar[i].indicatorProperties;
+
+ if (
+ this.kommonitorFilterHelperService.completelyRemoveFilteredFeaturesFromDisplay &&
+ this.kommonitorFilterHelperService.filteredIndicatorFeatureIds.size > 0
+ ) {
+ indicatorProperties = indicatorProperties.filter((featureProperties) =>
+ !this.kommonitorFilterHelperService.featureIsCurrentlyFiltered(
+ featureProperties[__env.FEATURE_ID_PROPERTY_NAME]
+ )
+ );
+ }
+
+ sampleProperties = indicatorsForRadar[i].indicatorProperties;
+
+ // Initialize variables
+ let maxValue = sampleProperties[0][`${DATE_PREFIX}${indicatorsForRadar[i].selectedDate}`];
+ let minValue = sampleProperties[0][`${DATE_PREFIX}${indicatorsForRadar[i].selectedDate}`];
+ let valueSum = 0;
+
+ for (const indicatorPropertyInstance of indicatorProperties) {
+ // For average, only apply real numeric values
+ if (
+ !this.kommonitorDataExchangeService.indicatorValueIsNoData(
+ indicatorPropertyInstance[`${DATE_PREFIX}${indicatorsForRadar[i].selectedDate}`]
+ )
+ ) {
+ const value = this.kommonitorDataExchangeService.getIndicatorValueFromArray_asNumber(
+ indicatorPropertyInstance,
+ indicatorsForRadar[i].selectedDate
+ );
+ valueSum += value;
+
+ if (value > maxValue) {
+ maxValue = value;
+ }
+
+ if (value < minValue) {
+ minValue = value;
+ }
+ }
+ }
+
+ if (minValue == null) {
+ minValue = 0;
+ }
+
+ if (maxValue == null) {
+ maxValue = 1;
+ }
+
+ // Push the indicator data to the arrays
+ indicatorArrayForRadarChart.push({
+ name: `${indicatorsForRadar[i].indicatorMetadata.indicatorName} - ${indicatorsForRadar[i].selectedDate}`,
+ unit: indicatorsForRadar[i].indicatorMetadata.unit,
+ max: maxValue,
+ min: minValue,
+ });
+
+ defaultSeriesValueArray.push(
+ this.kommonitorDataExchangeService.getIndicatorValue_asNumber(
+ Number(valueSum / indicatorProperties.length)
+ )
+ );
+ }
+ }
+
+ if (defaultSeriesValueArray.length === 0) {
+ if (this.$scope.radarChart) {
+ this.$scope.radarChart.dispose();
+ this.$scope.radarChart = undefined;
+ }
+ } else {
+ if (!this.$scope.radarChart) {
+ this.$scope.radarChart = echarts.init(this.elementRef.nativeElement.querySelector('#radarDiagram'));
+ }
+
+ // Define the radarOption here as you did before
+
+ // Check if any feature is still clicked/selected
+ // then append those as series within radar chart
+ this.appendSelectedFeaturesIfNecessary(sampleProperties);
+
+ // Use configuration item and data specified to show chart
+ this.$scope.radarChart.setOption(this.radarOption);
+
+ this.$scope.radarChart.hideLoading();
+ setTimeout(() => {
+ this.$scope.radarChart.resize();
+ this.$scope.$digest();
+ }, 350);
+ this.registerEventsIfNecessary();
+ }
+ }
+
+
+appendSelectedFeaturesIfNecessary(sampleProperties: any) {
+ for (const propertiesInstance of sampleProperties) {
+ if (this.kommonitorFilterHelperService.featureIsCurrentlySelected(propertiesInstance[__env.FEATURE_ID_PROPERTY_NAME])) {
+ this.appendSeriesToRadarChart(propertiesInstance);
+ }
+ }
+ }
+
+
+ filterDisplayedIndicatorsOnRadar() {
+ console.log("Filtering indicator radar");
+ this.modifyRadarContent(kommonitorDiagramHelperService.indicatorPropertiesForCurrentSpatialUnitAndTime);
+ }
+
+ selectAllIndicatorsForRadar() {
+ for (const indicator of kommonitorDiagramHelperService.indicatorPropertiesForCurrentSpatialUnitAndTime) {
+ indicator.isSelected = true;
+ }
+
+ this.modifyRadarContent(kommonitorDiagramHelperService.indicatorPropertiesForCurrentSpatialUnitAndTime);
+ }
+
+
+ deselectAllIndicatorsForRadar() {
+ for (const indicator of kommonitorDiagramHelperService.indicatorPropertiesForCurrentSpatialUnitAndTime) {
+ indicator.isSelected = false;
+ }
+
+ this.modifyRadarContent(kommonitorDiagramHelperService.indicatorPropertiesForCurrentSpatialUnitAndTime);
+ }
+
+registerEventsIfNecessary() {
+ if (!this.eventsRegistered) {
+ // when hovering over elements of the chart then highlight them in the map.
+ this.radarChart.on('mouseover', (params: any) => {
+ const spatialFeatureName = params.data.name;
+ if (spatialFeatureName) {
+ this.$rootScope.$broadcast("highlightFeatureOnMap", spatialFeatureName);
+ }
+ });
+
+ this.radarChart.on('mouseout', (params: any) => {
+ const spatialFeatureName = params.data.name;
+ if (spatialFeatureName) {
+ this.$rootScope.$broadcast("unhighlightFeatureOnMap", spatialFeatureName);
+ }
+ });
+
+ // Disable feature removal for radar chart - seems to be unintuitive
+ // this.radarChart.on('click', (params: any) => {
+ // const spatialFeatureName = params.data.name;
+ // if (spatialFeatureName) {
+ // this.$rootScope.$broadcast("switchHighlightFeatureOnMap", spatialFeatureName);
+ // }
+ // });
+
+ this.eventsRegistered = true;
+ }
+ }
+
+
+
+ appendSeriesToRadarChart(featureProperties: any) {
+ // Append feature name to legend
+ this.radarOption.legend.data.push(featureProperties[__env.FEATURE_NAME_PROPERTY_NAME]);
+
+ // Create feature data series
+ const featureSeries: any = {};
+ featureSeries.name = featureProperties[__env.FEATURE_NAME_PROPERTY_NAME];
+ featureSeries.value = new Array();
+ featureSeries.emphasis = {
+ lineStyle: {
+ width: 4,
+ type: 'dotted'
+ }
+ };
+ featureSeries.lineStyle = {
+ width: 3,
+ type: 'solid'
+ };
+ featureSeries.itemStyle = {
+ borderWidth: 2
+ };
+
+ // For each indicator, create series data entry for the feature
+ for (let i = 0; i < kommonitorDiagramHelperService.indicatorPropertiesForCurrentSpatialUnitAndTime.length; i++) {
+ if (kommonitorDiagramHelperService.indicatorPropertiesForCurrentSpatialUnitAndTime[i].isSelected) {
+ // Make an object to hold indicatorName, max value, and average value
+ const indicatorProperties = kommonitorDiagramHelperService.indicatorPropertiesForCurrentSpatialUnitAndTime[i].indicatorProperties;
+ const date = kommonitorDiagramHelperService.indicatorPropertiesForCurrentSpatialUnitAndTime[i].selectedDate;
+
+ for (const indicatorPropertyInstance of indicatorProperties) {
+ if (indicatorPropertyInstance[__env.FEATURE_NAME_PROPERTY_NAME] === featureProperties[__env.FEATURE_NAME_PROPERTY_NAME]) {
+ if (!kommonitorDataExchangeService.indicatorValueIsNoData(indicatorPropertyInstance[DATE_PREFIX + date])) {
+ featureSeries.value.push(kommonitorDataExchangeService.getIndicatorValueFromArray_asNumber(indicatorPropertyInstance, date));
+ } else {
+ featureSeries.value.push(null);
+ }
+ break;
+ }
+ }
+ }
+ }
+
+ this.radarOption.series[0].data.push(featureSeries);
+
+ this.radarChart.setOption(this.radarOption);
+ setTimeout(() => {
+ this.radarChart.resize();
+ }, 350);
+ this.registerEventsIfNecessary();
+ }
+
+
+ // Add the highlightFeatureInRadarChart function inside your TypeScript class
+highlightFeatureInRadarChart(featureProperties: any) {
+ // Highlight the corresponding radar chart item
+ const dataIndex = this.getSeriesDataIndexByFeatureName(featureProperties[__env.FEATURE_NAME_PROPERTY_NAME]);
+
+ if (dataIndex > -1) {
+ this.radarChart.dispatchAction({
+ type: 'highlight',
+ seriesIndex: 0,
+ dataIndex: dataIndex
+ });
+ }
+ }
+
+ unhighlightFeatureInRadarChart(featureProperties: any) {
+ // Unhighlight the corresponding radar chart item
+ const dataIndex = this.getSeriesDataIndexByFeatureName(featureProperties[__env.FEATURE_NAME_PROPERTY_NAME]);
+
+ if (dataIndex > -1) {
+ this.radarChart.dispatchAction({
+ type: 'downplay',
+ seriesIndex: 0,
+ dataIndex: dataIndex
+ });
+ }
+ }
+
+ // Modifies the $scope.$on("updateDiagramsForUnhoveredFeature") function
+ $scope.$on("updateDiagramsForUnhoveredFeature", (event: any, featureProperties: any) => {
+ if (!this.radarChart || !this.radarOption || !this.radarOption.legend || !this.radarOption.series) {
+ return;
+ }
+
+ this.unhighlightFeatureInRadarChart(featureProperties);
+
+ if (!kommonitorFilterHelperService.featureIsCurrentlySelected(featureProperties[__env.FEATURE_ID_PROPERTY_NAME])) {
+ this.removeSeriesFromRadarChart(featureProperties);
+ }
+ });
+
+ // Modifies the removeSeriesFromRadarChart function
+ removeSeriesFromRadarChart(featureProperties: any) {
+ // Remove feature from legend
+ const legendIndex = this.radarOption.legend.data.indexOf(featureProperties[__env.FEATURE_NAME_PROPERTY_NAME]);
+ if (legendIndex > -1) {
+ this.radarOption.legend.data.splice(legendIndex, 1);
+ }
+
+ const dataIndex = this.getSeriesDataIndexByFeatureName(featureProperties[__env.FEATURE_NAME_PROPERTY_NAME]);
+ if (dataIndex > -1) {
+ this.radarOption.series[0].data.splice(dataIndex, 1);
+ }
+
+
+ this.radarChart.setOption(this.radarOption, true);
+ setTimeout(() => {
+ this.radarChart.resize();
+ }, 350);
+ this.registerEventsIfNecessary();
+ }
+
+ // Modifies the getSeriesDataIndexByFeatureName function
+ getSeriesDataIndexByFeatureName(featureName: string) {
+ for (let index = 0; index < this.radarOption.series[0].data.length; index++) {
+ if (this.radarOption.series[0].data[index].name === featureName) {
+ return index;
+ }
+ }
+
+ // Return -1 if none was found
+ return -1;
+ }
+
+
+
+
+
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/components/kommonitorUserInterface/kommonitorControls/infoModal/info-modal.component.css b/app/components/kommonitorUserInterface/kommonitorControls/infoModal/info-modal.component.css
new file mode 100644
index 000000000..e69de29bb
diff --git a/app/components/kommonitorUserInterface/kommonitorControls/infoModal/info-modal.component.js b/app/components/kommonitorUserInterface/kommonitorControls/infoModal/info-modal.component.js
index 8b665b334..634cc1722 100644
--- a/app/components/kommonitorUserInterface/kommonitorControls/infoModal/info-modal.component.js
+++ b/app/components/kommonitorUserInterface/kommonitorControls/infoModal/info-modal.component.js
@@ -1,78 +1,85 @@
-"use strict";
-angular.module('infoModal').component('infoModal', {
- templateUrl: "components/kommonitorUserInterface/kommonitorControls/infoModal/info-modal.template.html",
- controller: [
- 'kommonitorDataExchangeService', '$scope', '$rootScope', '__env', '$timeout',
- function InfoModalController(kommonitorDataExchangeService, $scope, $rootScope, __env, $timeout) {
- this.kommonitorDataExchangeServiceInstance = kommonitorDataExchangeService;
- $scope.isHideGreetings = false;
-
- //prevent bootrap modals tabs opened by a tag with href elements from adding their anchor location to
- // URL
- $("a[href^='#']").click(function(e) {
- e.preventDefault();
-
- });
-
- $scope.init = function () {
-
-
- if (!(localStorage.getItem("hideKomMonitorAppGreeting") === "true")) {
- $scope.isHideGreetings = false;
- $('#infoModal').modal('show');
- }
- else {
- $scope.isHideGreetings = true;
- $("#changeHideGreetingsInput").prop('checked', true);
- }
- let tab1 = document.getElementById("infoModalTab1");
- tab1.innerHTML = __env.standardInfoModalTabTitle;
- tab1.click();
- tab1.focus();
- if (__env.enableExtendedInfoModal) {
- let tab3 = document.getElementById("infoModalTab3");
- let tab3content = document.getElementById("infoModalTab3Content");
- tab3.innerHTML = __env.extendedInfoModalTabTitle;
- tab3content.innerHTML = __env.extendedInfoModalHTMLMessage;
- }
- else {
- document.getElementById("infoModalTab3").style.display = "none";
- }
- $timeout(function () {
- $scope.$digest();
- }, 250);
- };
- var onChangeHideGreetings = function () {
- if ($scope.isHideGreetings) {
- localStorage.setItem("hideKomMonitorAppGreeting", "true");
- }
- else {
- localStorage.setItem("hideKomMonitorAppGreeting", "false");
- }
- };
- $('#changeHideGreetingsInput').on('click', function (event) {
- if ($scope.isHideGreetings) {
- $scope.isHideGreetings = false;
+import { __decorate } from "tslib";
+import { Component } from '@angular/core';
+import { environment } from 'env_backup';
+import { kommonitorDataExchangeServiceFactory } from 'app-upgraded-providers';
+export let InfoModalComponent = class InfoModalComponent {
+ constructor(modalService) {
+ this.modalService = modalService;
+ this.isHideGreetings = false;
+ this.tab1 = 'null';
+ this.customGreetingsContact_name = "Test";
+ this.customGreetingsContact_organisation = "Test";
+ this.customGreetingsContact_mail = "Test";
+ this.customGreetingsTextInfoMessage = "Test";
+ this.customGreetingsContact_name = "Test";
+ this.customGreetingsContact_organisation = "Test";
+ this.customGreetingsContact_mail = "Test";
+ this.customGreetingsTextInfoMessage = "Test";
+ }
+ ngOnInit() {
+ this.modalService.startGuidedTour$.subscribe(() => {
+ // Call a method to handle the guided tour event
+ this.callStartGuidedTour();
+ });
+ this.kommonitorDataExchangeServiceInstance = kommonitorDataExchangeServiceFactory;
+ if (!(localStorage.getItem("hideKomMonitorAppGreeting") === "true")) {
+ this.isHideGreetings = false;
+ $('#infoModal').modal('show');
+ }
+ else {
+ this.isHideGreetings = true;
+ $("#changeHideGreetingsInput").prop('checked', true);
+ }
+ const tab1 = document.getElementById("infoModalTab1");
+ if (tab1) {
+ tab1.innerHTML = environment.standardInfoModalTabTitle;
+ tab1.click();
+ tab1.focus();
+ if (environment.enableExtendedInfoModal) {
+ const tab3 = document.getElementById("infoModalTab3");
+ const tab3content = document.getElementById("infoModalTab3Content");
+ if (tab3 && tab3content) {
+ tab3.innerHTML = environment.extendedInfoModalTabTitle;
+ tab3content.innerHTML = environment.extendedInfoModalHTMLMessage;
}
else {
- $scope.isHideGreetings = true;
+ alert("not founde");
}
- onChangeHideGreetings();
- event.stopPropagation();
- });
- var callStartGuidedTour = function () {
- $('#infoModal').modal('hide');
- $rootScope.$broadcast("startGuidedTour");
- };
- $(document).on('click', '#callStartGuidedTourButton', function (e) {
- callStartGuidedTour();
- });
- $scope.showFeedbackForm = function () {
- $('#infoModal').modal('hide');
- $('#feedbackModal').modal('show');
- };
- $scope.init();
+ }
+ else {
+ console.log("content hasnt be loaded");
+ }
+ }
+ setTimeout(() => {
+ // You might need to use Angular's change detection instead of $digest
+ }, 250);
+ }
+ onChangeHideGreetings() {
+ if (this.isHideGreetings) {
+ localStorage.setItem("hideKomMonitorAppGreeting", "true");
+ }
+ else {
+ localStorage.setItem("hideKomMonitorAppGreeting", "false");
}
- ]
-});
+ }
+ onToggleHideGreetings() {
+ this.isHideGreetings = !this.isHideGreetings;
+ localStorage.setItem("hideKomMonitorAppGreeting", this.isHideGreetings ? "true" : "false");
+ }
+ callStartGuidedTour() {
+ $('#infoModal').modal('hide');
+ this.modalService.startGuidedTour();
+ }
+ showFeedbackForm() {
+ $('#infoModal').modal('hide');
+ $('#feedbackModal').modal('show');
+ }
+};
+InfoModalComponent = __decorate([
+ Component({
+ selector: 'info-modal',
+ templateUrl: 'info-modal.template.html',
+ styleUrls: ['info-modal.component.css'],
+ })
+], InfoModalComponent);
//# sourceMappingURL=info-modal.component.js.map
\ No newline at end of file
diff --git a/app/components/kommonitorUserInterface/kommonitorControls/infoModal/info-modal.component.js.map b/app/components/kommonitorUserInterface/kommonitorControls/infoModal/info-modal.component.js.map
index cbae76592..70883bd9f 100644
--- a/app/components/kommonitorUserInterface/kommonitorControls/infoModal/info-modal.component.js.map
+++ b/app/components/kommonitorUserInterface/kommonitorControls/infoModal/info-modal.component.js.map
@@ -1 +1 @@
-{"version":3,"file":"info-modal.component.js","sourceRoot":"","sources":["info-modal.component.ts"],"names":[],"mappings":";AAAA,OAAO,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,SAAS,CAAC,WAAW,EAAE;IAClD,WAAW,EAAG,0FAA0F;IACxG,UAAU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AAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QAC9B,IAAI,CAAC,YAAY,CAAC,eAAe,EAAE,CAAC;IAEtC,CAAC;IAED,gBAAgB;QACd,CAAC,CAAC,YAAY,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QAC9B,CAAC,CAAC,gBAAgB,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IACpC,CAAC;CACF,CAAA;AAjGY,kBAAkB;IAN9B,SAAS,CAAC;QACT,QAAQ,EAAE,YAAY;QACtB,WAAW,EAAE,0BAA0B;QACvC,SAAS,EAAE,CAAC,0BAA0B,CAAC;KAExC,CAAC;GACW,kBAAkB,CAiG9B"}
\ No newline at end of file
diff --git a/app/components/kommonitorUserInterface/kommonitorControls/infoModal/info-modal.component.ts b/app/components/kommonitorUserInterface/kommonitorControls/infoModal/info-modal.component.ts
index 18f493962..03905f2a2 100644
--- a/app/components/kommonitorUserInterface/kommonitorControls/infoModal/info-modal.component.ts
+++ b/app/components/kommonitorUserInterface/kommonitorControls/infoModal/info-modal.component.ts
@@ -1,88 +1,109 @@
-angular.module('infoModal').component('infoModal', {
- templateUrl : "components/kommonitorUserInterface/kommonitorControls/infoModal/info-modal.template.html",
- controller : [
- 'kommonitorDataExchangeService', '$scope', '$rootScope', '__env', '$timeout',
- function InfoModalController(kommonitorDataExchangeService, $scope, $rootScope, __env, $timeout) {
+import { Component, OnInit,AfterViewInit } from '@angular/core';
+import { environment } from 'env_backup';
+import { kommonitorDataExchangeServiceFactory } from 'app-upgraded-providers';
+import { ModalService } from 'util/genericServices/modal.service';
+import { VersionInfoComponent } from '../versionInfo/version-info.component';
+@Component({
+ selector: 'info-modal',
+ templateUrl: 'info-modal.template.html',
+ styleUrls: ['info-modal.component.css'],
+
+})
+export class InfoModalComponent implements OnInit{
+ kommonitorDataExchangeServiceInstance: any;
+ isHideGreetings: boolean = false;
+ tab1:any='null';
- this.kommonitorDataExchangeServiceInstance = kommonitorDataExchangeService;
- $scope.isHideGreetings = false;
+ customGreetingsContact_name = "Test";
+ customGreetingsContact_organisation = "Test";
+ customGreetingsContact_mail = "Test";
+ customGreetingsTextInfoMessage = "Test";
+ constructor(private modalService: ModalService) {
+ this.customGreetingsContact_name = "Test";
+ this.customGreetingsContact_organisation = "Test";
+ this.customGreetingsContact_mail = "Test";
+ this.customGreetingsTextInfoMessage = "Test";
+ }
+
- //prevent bootrap modals tabs opened by a tag with href elements from adding their anchor location to
- // URL
- $("a[href^='#']").click(function(e) {
- e.preventDefault();
-
- });
+ ngOnInit(): void {
- $scope.init = function(){
- if(! (localStorage.getItem("hideKomMonitorAppGreeting") === "true")) {
-
- $scope.isHideGreetings = false;
- $('#infoModal').modal('show');
- }
- else{
- $scope.isHideGreetings = true;
- $("#changeHideGreetingsInput").prop('checked', true);
- }
- let tab1 = document.getElementById("infoModalTab1");
- tab1.innerHTML = __env.standardInfoModalTabTitle;
- tab1.click();
- tab1.focus();
+ this.modalService.startGuidedTour$.subscribe(() => {
+ // Call a method to handle the guided tour event
+ this.callStartGuidedTour();
+ });
+ this.kommonitorDataExchangeServiceInstance = kommonitorDataExchangeServiceFactory;
+
+ if (!(localStorage.getItem("hideKomMonitorAppGreeting") === "true")) {
+ this.isHideGreetings = false;
+ $('#infoModal').modal('show');
+ } else {
+ this.isHideGreetings = true;
+ $("#changeHideGreetingsInput").prop('checked', true);
+ }
- if(__env.enableExtendedInfoModal) {
- let tab3 = document.getElementById("infoModalTab3");
- let tab3content = document.getElementById("infoModalTab3Content");
- tab3.innerHTML = __env.extendedInfoModalTabTitle;
- tab3content.innerHTML = __env.extendedInfoModalHTMLMessage;
- } else {
- document.getElementById("infoModalTab3").style.display = "none";
- }
-
+ const tab1 = document.getElementById("infoModalTab1");
+ if(tab1 ){
+ tab1.innerHTML = environment.standardInfoModalTabTitle;
+ tab1.click();
+ tab1.focus();
+
+
- $timeout(function(){
- $scope.$digest();
- }, 250);
-
- };
+ if (environment.enableExtendedInfoModal) {
+ const tab3 = document.getElementById("infoModalTab3");
+ const tab3content = document.getElementById("infoModalTab3Content");
- var onChangeHideGreetings = function(){
- if($scope.isHideGreetings){
- localStorage.setItem("hideKomMonitorAppGreeting", "true");
- }
- else{
- localStorage.setItem("hideKomMonitorAppGreeting", "false");
- }
- };
+ if (tab3 && tab3content) {
+ tab3.innerHTML = environment.extendedInfoModalTabTitle;
+ tab3content.innerHTML =environment.extendedInfoModalHTMLMessage;
+ }
+ else {
+ alert("not founde")
+ }
+
+ }
+ else{
+ console.log("content hasnt be loaded")
+ }
+ }
+ setTimeout(() => {
+ // You might need to use Angular's change detection instead of $digest
+ }, 250);
+
+
+
+
+
+
+
+ }
+
- $('#changeHideGreetingsInput').on('click', function(event) {
+ onChangeHideGreetings(): void {
+ if (this.isHideGreetings) {
+ localStorage.setItem("hideKomMonitorAppGreeting", "true");
+ } else {
+ localStorage.setItem("hideKomMonitorAppGreeting", "false");
+ }
+ }
- if($scope.isHideGreetings){
- $scope.isHideGreetings = false;
- }
- else{
- $scope.isHideGreetings = true;
- }
- onChangeHideGreetings();
- event.stopPropagation();
- });
+ onToggleHideGreetings(): void {
+ this.isHideGreetings = !this.isHideGreetings;
+ localStorage.setItem("hideKomMonitorAppGreeting", this.isHideGreetings ? "true" : "false");
+ }
- var callStartGuidedTour = function(){
- $('#infoModal').modal('hide');
- $rootScope.$broadcast("startGuidedTour");
- };
+ callStartGuidedTour(): void {
+ $('#infoModal').modal('hide');
+ this.modalService.startGuidedTour();
- $(document).on('click', '#callStartGuidedTourButton', function (e) {
- callStartGuidedTour();
- });
+ }
- $scope.showFeedbackForm = function(){
- $('#infoModal').modal('hide');
- $('#feedbackModal').modal('show');
- };
-
- $scope.init();
- }
-]});
+ showFeedbackForm(): void {
+ $('#infoModal').modal('hide');
+ $('#feedbackModal').modal('show');
+ }
+}
diff --git a/app/components/kommonitorUserInterface/kommonitorControls/infoModal/info-modal.module.js b/app/components/kommonitorUserInterface/kommonitorControls/infoModal/info-modal.module.js
index 9c9d0df40..69738db8d 100644
--- a/app/components/kommonitorUserInterface/kommonitorControls/infoModal/info-modal.module.js
+++ b/app/components/kommonitorUserInterface/kommonitorControls/infoModal/info-modal.module.js
@@ -1,3 +1,16 @@
-"use strict";
-angular.module('infoModal', ['versionInfo']);
+import { __decorate } from "tslib";
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+import { InfoModalComponent } from './info-modal.component';
+import { VersionInfoModule } from '../versionInfo/version-info.module';
+export let InfoModalModule = class InfoModalModule {
+};
+InfoModalModule = __decorate([
+ NgModule({
+ declarations: [InfoModalComponent],
+ imports: [CommonModule, VersionInfoModule],
+ exports: [InfoModalComponent],
+ bootstrap: [InfoModalComponent]
+ })
+], InfoModalModule);
//# sourceMappingURL=info-modal.module.js.map
\ No newline at end of file
diff --git a/app/components/kommonitorUserInterface/kommonitorControls/infoModal/info-modal.module.js.map b/app/components/kommonitorUserInterface/kommonitorControls/infoModal/info-modal.module.js.map
index c10e24a3d..8f295cf72 100644
--- a/app/components/kommonitorUserInterface/kommonitorControls/infoModal/info-modal.module.js.map
+++ b/app/components/kommonitorUserInterface/kommonitorControls/infoModal/info-modal.module.js.map
@@ -1 +1 @@
-{"version":3,"file":"info-modal.module.js","sourceRoot":"","sources":["info-modal.module.ts"],"names":[],"mappings":";AAAA,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC"}
\ No newline at end of file
+{"version":3,"file":"info-modal.module.js","sourceRoot":"","sources":["info-modal.module.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAShE,WAAM,eAAe,GAArB,MAAM,eAAe;CAE3B,CAAA;AAFY,eAAe;IAR3B,QAAQ,CAAC;QACV,YAAY,EAAC,CAAC,kBAAkB,CAAC;QACjC,OAAO,EAAC,CAAC,YAAY,EAAC,iBAAiB,CAAC;QACxC,OAAO,EAAC,CAAC,kBAAkB,CAAC;QAC5B,SAAS,EAAC,CAAC,kBAAkB,CAAC;KAE7B,CAAC;GAEW,eAAe,CAE3B"}
\ No newline at end of file
diff --git a/app/components/kommonitorUserInterface/kommonitorControls/infoModal/info-modal.module.ts b/app/components/kommonitorUserInterface/kommonitorControls/infoModal/info-modal.module.ts
index 3b47b77ce..f862dfcd0 100644
--- a/app/components/kommonitorUserInterface/kommonitorControls/infoModal/info-modal.module.ts
+++ b/app/components/kommonitorUserInterface/kommonitorControls/infoModal/info-modal.module.ts
@@ -1 +1,15 @@
-angular.module('infoModal', ['versionInfo']);
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+import { InfoModalComponent } from './info-modal.component';
+import { VersionInfoModule } from '../versionInfo/version-info.module';
+@NgModule({
+declarations:[InfoModalComponent],
+imports:[CommonModule,VersionInfoModule],
+exports:[InfoModalComponent],
+bootstrap:[InfoModalComponent]
+
+})
+
+export class InfoModalModule{
+
+}
\ No newline at end of file
diff --git a/app/components/kommonitorUserInterface/kommonitorControls/infoModal/info-modal.template.html b/app/components/kommonitorUserInterface/kommonitorControls/infoModal/info-modal.template.html
index f77ca3f75..4ee19677f 100644
--- a/app/components/kommonitorUserInterface/kommonitorControls/infoModal/info-modal.template.html
+++ b/app/components/kommonitorUserInterface/kommonitorControls/infoModal/info-modal.template.html
@@ -21,7 +21,7 @@ Wichtige Informationen zu KomMonitor - Version
aria-selected="false">Versionsinfo
-
@@ -47,13 +47,10 @@ Wichtige Informationen zu KomMonitor - Version
Weiterhin bietet die Webseite KomMonitor.de allgemeine Informationen.
- Zuletzt sei auf das Forum https://forum.kommonitor.de/ hingewiesen. Tauschen Sie sich dort gerne mit weiteren Anwendern und Entwicklern aus und tragen so zur Weiterentwicklung des Systems bei.
-
-
-
-
+ Zuletzt sei auf das Forum https://forum.kommonitor.de/ hingewiesen. Tauschen Sie sich dort gerne mit weiteren Anwendern und Entwicklern aus und tragen so zur Weiterentwicklung des Systems bei.
+
-
+
Kontakt
@@ -89,43 +85,32 @@
Wichtige Informationen zu KomMonitor - Version
Entwickelt wird die technische Plattform gemeinsam durch die Hochschule Bochum, Ruhr-Universität Bochum und diverse Kommunen und Kreisverwaltungen, im Rahmen des BMBF-geförderten Forschungsprojekts KomMonitor.
-
-
-
-
-
+
+
-
-
-
-
-
-
diff --git a/app/components/kommonitorUserInterface/kommonitorControls/kommonitorBalance/info-modal.component.js b/app/components/kommonitorUserInterface/kommonitorControls/kommonitorBalance/info-modal.component.js
new file mode 100644
index 000000000..8b665b334
--- /dev/null
+++ b/app/components/kommonitorUserInterface/kommonitorControls/kommonitorBalance/info-modal.component.js
@@ -0,0 +1,78 @@
+"use strict";
+angular.module('infoModal').component('infoModal', {
+ templateUrl: "components/kommonitorUserInterface/kommonitorControls/infoModal/info-modal.template.html",
+ controller: [
+ 'kommonitorDataExchangeService', '$scope', '$rootScope', '__env', '$timeout',
+ function InfoModalController(kommonitorDataExchangeService, $scope, $rootScope, __env, $timeout) {
+ this.kommonitorDataExchangeServiceInstance = kommonitorDataExchangeService;
+ $scope.isHideGreetings = false;
+
+ //prevent bootrap modals tabs opened by a tag with href elements from adding their anchor location to
+ // URL
+ $("a[href^='#']").click(function(e) {
+ e.preventDefault();
+
+ });
+
+ $scope.init = function () {
+
+
+ if (!(localStorage.getItem("hideKomMonitorAppGreeting") === "true")) {
+ $scope.isHideGreetings = false;
+ $('#infoModal').modal('show');
+ }
+ else {
+ $scope.isHideGreetings = true;
+ $("#changeHideGreetingsInput").prop('checked', true);
+ }
+ let tab1 = document.getElementById("infoModalTab1");
+ tab1.innerHTML = __env.standardInfoModalTabTitle;
+ tab1.click();
+ tab1.focus();
+ if (__env.enableExtendedInfoModal) {
+ let tab3 = document.getElementById("infoModalTab3");
+ let tab3content = document.getElementById("infoModalTab3Content");
+ tab3.innerHTML = __env.extendedInfoModalTabTitle;
+ tab3content.innerHTML = __env.extendedInfoModalHTMLMessage;
+ }
+ else {
+ document.getElementById("infoModalTab3").style.display = "none";
+ }
+ $timeout(function () {
+ $scope.$digest();
+ }, 250);
+ };
+ var onChangeHideGreetings = function () {
+ if ($scope.isHideGreetings) {
+ localStorage.setItem("hideKomMonitorAppGreeting", "true");
+ }
+ else {
+ localStorage.setItem("hideKomMonitorAppGreeting", "false");
+ }
+ };
+ $('#changeHideGreetingsInput').on('click', function (event) {
+ if ($scope.isHideGreetings) {
+ $scope.isHideGreetings = false;
+ }
+ else {
+ $scope.isHideGreetings = true;
+ }
+ onChangeHideGreetings();
+ event.stopPropagation();
+ });
+ var callStartGuidedTour = function () {
+ $('#infoModal').modal('hide');
+ $rootScope.$broadcast("startGuidedTour");
+ };
+ $(document).on('click', '#callStartGuidedTourButton', function (e) {
+ callStartGuidedTour();
+ });
+ $scope.showFeedbackForm = function () {
+ $('#infoModal').modal('hide');
+ $('#feedbackModal').modal('show');
+ };
+ $scope.init();
+ }
+ ]
+});
+//# sourceMappingURL=info-modal.component.js.map
\ No newline at end of file
diff --git a/app/components/kommonitorUserInterface/kommonitorControls/kommonitorBalance/info-modal.module.js b/app/components/kommonitorUserInterface/kommonitorControls/kommonitorBalance/info-modal.module.js
new file mode 100644
index 000000000..9c9d0df40
--- /dev/null
+++ b/app/components/kommonitorUserInterface/kommonitorControls/kommonitorBalance/info-modal.module.js
@@ -0,0 +1,3 @@
+"use strict";
+angular.module('infoModal', ['versionInfo']);
+//# sourceMappingURL=info-modal.module.js.map
\ No newline at end of file
diff --git a/app/components/kommonitorUserInterface/kommonitorControls/kommonitorDiagrams/kommonitor-diagrams.component.js b/app/components/kommonitorUserInterface/kommonitorControls/kommonitorDiagrams/kommonitor-diagrams.component.js
index f35a8c56a..0cfc75b1d 100644
--- a/app/components/kommonitorUserInterface/kommonitorControls/kommonitorDiagrams/kommonitor-diagrams.component.js
+++ b/app/components/kommonitorUserInterface/kommonitorControls/kommonitorDiagrams/kommonitor-diagrams.component.js
@@ -1,363 +1,35 @@
-"use strict";
-angular
- .module('kommonitorDiagrams')
- .component('kommonitorDiagrams', {
- templateUrl: "components/kommonitorUserInterface/kommonitorControls/kommonitorDiagrams/kommonitor-diagrams.template.html",
- /*
- * injected with a modules service method that manages
- * enabled tabs
- */
- controller: [
- 'kommonitorDataExchangeService', 'kommonitorDiagramHelperService', 'kommonitorFilterHelperService',
- '$scope', '$rootScope', '__env',
- function kommonitorDiagramsController(kommonitorDataExchangeService, kommonitorDiagramHelperService, kommonitorFilterHelperService, $scope, $rootScope, __env) {
- this.kommonitorDataExchangeServiceInstance = kommonitorDataExchangeService;
- this.kommonitorDiagramHelperServiceInstance = kommonitorDiagramHelperService;
- // initialize any adminLTE box widgets
- $('.box').boxWidget();
- $(window).on('resize', function () {
- if ($scope.histogramChart != null && $scope.histogramChart != undefined) {
- $scope.histogramChart.resize();
- }
- if ($scope.barChart != null && $scope.barChart != undefined) {
- $scope.barChart.resize();
- }
- if ($scope.lineChart != null && $scope.lineChart != undefined) {
- $scope.lineChart.resize();
- }
- });
- $scope.$on("resizeDiagrams", function (event) {
- setTimeout(function () {
- if ($scope.histogramChart != null && $scope.histogramChart != undefined) {
- $scope.histogramChart.resize();
- }
- if ($scope.barChart != null && $scope.barChart != undefined) {
- $scope.barChart.resize();
- }
- if ($scope.lineChart != null && $scope.lineChart != undefined) {
- $scope.lineChart.resize();
- }
- }, 350);
- });
- const INDICATOR_DATE_PREFIX = __env.indicatorDatePrefix;
- const defaultColorForHoveredFeatures = __env.defaultColorForHoveredFeatures;
- const defaultColorForClickedFeatures = __env.defaultColorForClickedFeatures;
- // $scope.userHoveresOverBarItem = false;
- $scope.eventsRegistered = false;
- $scope.isTooManyFeatures = false;
- $scope.histogramCanBeDisplayed = false;
- $scope.spatialUnitName;
- $scope.date;
- var numberOfDecimals = __env.numberOfDecimals;
- var defaultColorForZeroValues = __env.defaultColorForZeroValues;
- var defaultColorForNoDataValues = __env.defaultColorForNoDataValues;
- var defaultColorForFilteredValues = __env.defaultColorForFilteredValues;
- const defaultColorForOutliers_high = __env.defaultColorForOutliers_high;
- const defaultBorderColorForOutliers_high = __env.defaultBorderColorForOutliers_high;
- const defaultFillOpacityForOutliers_high = __env.defaultFillOpacityForOutliers_high;
- const defaultColorForOutliers_low = __env.defaultColorForOutliers_low;
- const defaultBorderColorForOutliers_low = __env.defaultBorderColorForOutliers_low;
- const defaultFillOpacityForOutliers_low = __env.defaultFillOpacityForOutliers_low;
- var compareFeaturesByIndicatorValue = function (featureA, featureB) {
- if (featureA.properties[$scope.indicatorPropertyName] < featureB.properties[$scope.indicatorPropertyName])
- return -1;
- if (featureA.properties[$scope.indicatorPropertyName] > featureB.properties[$scope.indicatorPropertyName])
- return 1;
- return 0;
- };
- var showLoadingIcons = function () {
- if ($scope.histogramChart)
- $scope.histogramChart.showLoading();
- if ($scope.barChart)
- $scope.barChart.showLoading();
- if ($scope.lineChart)
- $scope.lineChart.showLoading();
- };
- $scope.$on("updateDiagrams", function (event, indicatorMetadataAndGeoJSON, spatialUnitName, spatialUnitId, date, defaultBrew, gtMeasureOfValueBrew, ltMeasureOfValueBrew, dynamicIncreaseBrew, dynamicDecreaseBrew, isMeasureOfValueChecked, measureOfValue, justRestyling) {
- // console.log("Updating diagrams!");
- $scope.loadingData = true;
- showLoadingIcons();
- $scope.spatialUnitName = spatialUnitName;
- $scope.date = date;
- kommonitorDiagramHelperService.prepareAllDiagramResources_forCurrentMapIndicator(indicatorMetadataAndGeoJSON, spatialUnitName, date, defaultBrew, gtMeasureOfValueBrew, ltMeasureOfValueBrew, dynamicIncreaseBrew, dynamicDecreaseBrew, isMeasureOfValueChecked, measureOfValue, false);
- // updateHistogramChart();
- updateLineChart();
- updateBarChart();
- $scope.loadingData = false;
- });
- //HISTOGRAM CHART FUNCTION
- var updateHistogramChart = function () {
- $scope.histogramCanBeDisplayed = false;
- if (!$scope.histogramChart)
- $scope.histogramChart = echarts.init(document.getElementById('histogramDiagram'));
- else {
- // explicitly kill and reinstantiate histogram diagram to avoid zombie states on spatial unit change
- $scope.histogramChart.dispose();
- $scope.histogramChart = echarts.init(document.getElementById('histogramDiagram'));
- }
- $scope.histogramOption = kommonitorDiagramHelperService.getHistogramChartOptions();
- $scope.histogramChart.setOption($scope.histogramOption);
- $scope.histogramChart.hideLoading();
- $scope.histogramCanBeDisplayed = true;
- setTimeout(function () {
- $scope.histogramChart.resize();
- }, 350);
- };
- // BAR CHART FUNCTION
- var updateBarChart = function (indicatorMetadataAndGeoJSON, featureNamesArray, indicatorValueBarChartArray) {
- // based on prepared DOM, initialize echarts instance
- $scope.eventsRegistered = false;
- if (!$scope.barChart)
- $scope.barChart = echarts.init(document.getElementById('barDiagram'));
- else {
- // explicitly kill and reinstantiate bar diagram to avoid zombie states on spatial unit change
- $scope.barChart.dispose();
- $scope.barChart = echarts.init(document.getElementById('barDiagram'));
- }
- // use configuration item and data specified to show chart
- $scope.barOption = kommonitorDiagramHelperService.getBarChartOptions();
- $scope.barChart.setOption($scope.barOption);
- $scope.barChart.hideLoading();
- setTimeout(function () {
- $scope.barChart.resize();
- }, 350);
- registerEventsIfNecessary();
- };
- function registerEventsIfNecessary() {
- if (!$scope.eventsRegistered) {
- // when hovering over elements of the chart then highlight them in the map.
- $scope.barChart.on('mouseOver', function (params) {
- // $scope.userHoveresOverBarItem = true;
- var seriesIndex = params.seriesIndex;
- var dataIndex = params.dataIndex;
- // console.log("Series: " + seriesIndex + ", dataIndex: " + dataIndex);
- //
- // var barElement = $scope.barOption.series[seriesIndex].data[dataIndex];
- //
- // console.log(barElement);
- var spatialFeatureName = $scope.barOption.xAxis.data[dataIndex];
- if (spatialFeatureName) {
- // console.log(spatialFeatureName);
- $rootScope.$broadcast("highlightFeatureOnMap", spatialFeatureName);
- }
- });
- $scope.barChart.on('mouseOut', function (params) {
- // $scope.userHoveresOverBarItem = false;
- var seriesIndex = params.seriesIndex;
- var dataIndex = params.dataIndex;
- // console.log("Series: " + seriesIndex + ", dataIndex: " + dataIndex);
- //
- // var barElement = $scope.barOption.series[seriesIndex].data[dataIndex];
- //
- // console.log(barElement);
- var spatialFeatureName = $scope.barOption.xAxis.data[dataIndex];
- // console.log(spatialFeatureName);
- if (spatialFeatureName) {
- $rootScope.$broadcast("unhighlightFeatureOnMap", spatialFeatureName);
- }
- });
- $scope.barChart.on('click', function (params) {
- var seriesIndex = params.seriesIndex;
- var dataIndex = params.dataIndex;
- // console.log("Series: " + seriesIndex + ", dataIndex: " + dataIndex);
- //
- // var barElement = $scope.barOption.series[seriesIndex].data[dataIndex];
- //
- // console.log(barElement);
- var spatialFeatureName = $scope.barOption.xAxis.data[dataIndex];
- // console.log(spatialFeatureName);
- if (spatialFeatureName) {
- $rootScope.$broadcast("switchHighlightFeatureOnMap", spatialFeatureName);
- }
- });
- $scope.eventsRegistered = true;
- }
- }
- ;
- // LINE CHART TIME SERIES FUNCTION
- var updateLineChart = function (indicatorMetadataAndGeoJSON, indicatorTimeSeriesDatesArray, indicatorTimeSeriesAverageArray) {
- // based on prepared DOM, initialize echarts instance
- if (!$scope.lineChart)
- $scope.lineChart = echarts.init(document.getElementById('lineDiagram'));
- else {
- // explicitly kill and reinstantiate line diagram to avoid zombie states on spatial unit change
- $scope.lineChart.dispose();
- $scope.lineChart = echarts.init(document.getElementById('lineDiagram'));
- }
- // use configuration item and data specified to show chart
- $scope.lineOption = kommonitorDiagramHelperService.getLineChartOptions();
- $scope.lineChart.setOption($scope.lineOption);
- $scope.lineChart.hideLoading();
- setTimeout(function () {
- $scope.lineChart.resize();
- }, 350);
- };
- $scope.$on("updateDiagramsForHoveredFeature", function (event, featureProperties) {
- if (!$scope.lineOption.legend.data.includes(featureProperties[__env.FEATURE_NAME_PROPERTY_NAME])) {
- appendSeriesToLineChart(featureProperties);
- }
- highlightFeatureInBarChart(featureProperties);
- highlightFeatureInLineChart(featureProperties);
- });
- var appendSeriesToLineChart = function (featureProperties) {
- // in case of activated balance mode, we must use the properties of kommonitorDataExchangeService.selectedIndicator, to aquire the correct time series item!
- if (kommonitorDataExchangeService.isBalanceChecked) {
- featureProperties = findPropertiesForTimeSeries(featureProperties[__env.FEATURE_NAME_PROPERTY_NAME]);
- }
- // append feature name to legend
- $scope.lineOption.legend.data.push(featureProperties[__env.FEATURE_NAME_PROPERTY_NAME]);
- // create feature data series
- var featureSeries = {};
- featureSeries.name = featureProperties[__env.FEATURE_NAME_PROPERTY_NAME];
- featureSeries.type = 'line';
- featureSeries.data = new Array();
- // for each date create series data entry for feature
- for (var date of $scope.lineOption.xAxis.data) {
- var value;
- if (kommonitorDataExchangeService.indicatorValueIsNoData(featureProperties[INDICATOR_DATE_PREFIX + date])) {
- value = null;
- }
- else {
- value = kommonitorDataExchangeService.getIndicatorValue_asNumber(featureProperties[INDICATOR_DATE_PREFIX + date]);
- }
- featureSeries.data.push(value);
- }
- $scope.lineOption.series.push(featureSeries);
- $scope.lineChart.setOption($scope.lineOption);
- setTimeout(function () {
- $scope.lineChart.resize();
- }, 350);
- };
- var findPropertiesForTimeSeries = function (spatialUnitFeatureName) {
- for (var feature of kommonitorDataExchangeService.selectedIndicator.geoJSON.features) {
- if (feature.properties[__env.FEATURE_NAME_PROPERTY_NAME] == spatialUnitFeatureName) {
- return feature.properties;
- }
- }
- };
- var highlightFeatureInBarChart = function (featureProperties) {
- // highlight the corresponding bar diagram item
- // get index of bar item
- // if($scope.userHoveresOverBarItem){
- // return;
- // }
- var index = -1;
- for (var i = 0; i < $scope.barOption.xAxis.data.length; i++) {
- if ($scope.barOption.xAxis.data[i] === featureProperties[__env.FEATURE_NAME_PROPERTY_NAME]) {
- index = i;
- break;
- }
- }
- if (index > -1) {
- $scope.barChart.dispatchAction({
- type: 'highlight',
- seriesIndex: 0,
- dataIndex: index
- });
- // tooltip
- $scope.barChart.dispatchAction({
- type: 'showTip',
- seriesIndex: 0,
- dataIndex: index
- });
- }
- };
- var highlightFeatureInLineChart = function (featureProperties) {
- // highlight the corresponding bar diagram item
- // get series index of series
- var seriesIndex = getSeriesIndexByFeatureName(featureProperties[__env.FEATURE_NAME_PROPERTY_NAME]);
- if (seriesIndex > -1) {
- $scope.lineChart.dispatchAction({
- type: 'highlight',
- seriesIndex: seriesIndex
- });
- }
- };
- $scope.$on("updateDiagramsForUnhoveredFeature", function (event, featureProperties) {
- if (!kommonitorFilterHelperService.featureIsCurrentlySelected(featureProperties[__env.FEATURE_ID_PROPERTY_NAME])) {
- unhighlightFeatureInLineChart(featureProperties);
- removeSeriesFromLineChart(featureProperties);
- unhighlightFeatureInBarChart(featureProperties);
- }
- });
- var getSeriesIndexByFeatureName = function (featureName) {
- for (var index = 0; index < $scope.lineOption.series.length; index++) {
- if ($scope.lineOption.series[index].name === featureName)
- return index;
- }
- //return -1 if none was found
- return -1;
- };
- var removeSeriesFromLineChart = function (featureProperties) {
- // remove feature from legend
- var legendIndex = $scope.lineOption.legend.data.indexOf(featureProperties[__env.FEATURE_NAME_PROPERTY_NAME]);
- if (legendIndex > -1) {
- $scope.lineOption.legend.data.splice(legendIndex, 1);
- }
- // remove feature data series
- var seriesIndex = getSeriesIndexByFeatureName(featureProperties[__env.FEATURE_NAME_PROPERTY_NAME]);
- if (seriesIndex > -1) {
- $scope.lineOption.series.splice(seriesIndex, 1);
- }
- // second parameter tells echarts to not merge options with previous data. hence really remove series from graphic
- $scope.lineChart.setOption($scope.lineOption, true);
- setTimeout(function () {
- $scope.lineChart.resize();
- }, 350);
- };
- var unhighlightFeatureInBarChart = function (featureProperties) {
- // highlight the corresponding bar diagram item
- // get index of bar item
- var index = -1;
- for (var i = 0; i < $scope.barOption.xAxis.data.length; i++) {
- if ($scope.barOption.xAxis.data[i] === featureProperties[__env.FEATURE_NAME_PROPERTY_NAME]) {
- index = i;
- break;
- }
- }
- if (index > -1) {
- $scope.barChart.dispatchAction({
- type: 'downplay',
- seriesIndex: 0,
- dataIndex: index
- });
- // tooltip
- $scope.barChart.dispatchAction({
- type: 'hideTip',
- seriesIndex: 0,
- dataIndex: index
- });
- }
- };
- var unhighlightFeatureInLineChart = function (featureProperties) {
- // highlight the corresponding bar diagram item
- // get series index of series
- var seriesIndex = getSeriesIndexByFeatureName(featureProperties[__env.FEATURE_NAME_PROPERTY_NAME]);
- if (seriesIndex > -1) {
- $scope.lineChart.dispatchAction({
- type: 'downplay',
- seriesIndex: seriesIndex
- });
- }
- };
- $scope.$on("AppendExportButtonsForTable", function (event, tableId, tableExportName) {
- setTimeout(function () {
- // new TableExport(document.getElementsByTagName("table"), {
- new TableExport(document.getElementById(tableId), {
- headers: true,
- footers: true,
- formats: ['xlsx', 'csv', 'txt'],
- filename: tableExportName,
- bootstrap: true,
- exportButtons: true,
- position: 'top',
- ignoreRows: null,
- ignoreCols: null,
- trimWhitespace: true // (Boolean), remove all leading/trailing newlines, spaces, and tabs from cell text in the exported file(s) (default: false)
- });
- }, 50);
- });
- }
- ]
-});
+import { __decorate } from "tslib";
+import { Component } from '@angular/core';
+import * as echarts from 'echarts'; // Import echarts library
+export let KommonitorDiagramsComponent = class KommonitorDiagramsComponent {
+ constructor() { }
+ ngOnInit() {
+ var chartDom = document.getElementById('main-diag');
+ var myChart = echarts.init(chartDom);
+ var option;
+ option = {
+ xAxis: {
+ type: 'category',
+ data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
+ },
+ yAxis: {
+ type: 'value'
+ },
+ series: [
+ {
+ data: [150, 230, 224, 218, 135, 147, 260],
+ type: 'line'
+ }
+ ]
+ };
+ option && myChart.setOption(option);
+ }
+};
+KommonitorDiagramsComponent = __decorate([
+ Component({
+ selector: 'kommonitor-diagrams',
+ templateUrl: 'kommonitor-diagrams.template.html', // Replace with your actual HTML file path
+ // Replace with your actual CSS file path
+ })
+], KommonitorDiagramsComponent);
//# sourceMappingURL=kommonitor-diagrams.component.js.map
\ No newline at end of file
diff --git a/app/components/kommonitorUserInterface/kommonitorControls/kommonitorDiagrams/kommonitor-diagrams.component.js.map b/app/components/kommonitorUserInterface/kommonitorControls/kommonitorDiagrams/kommonitor-diagrams.component.js.map
index d2ba2e0f5..f6469d732 100644
--- a/app/components/kommonitorUserInterface/kommonitorControls/kommonitorDiagrams/kommonitor-diagrams.component.js.map
+++ b/app/components/kommonitorUserInterface/kommonitorControls/kommonitorDiagrams/kommonitor-diagrams.component.js.map
@@ -1 +1 @@
-{"version":3,"file":"kommonitor-diagrams.component.js","sourceRoot":"","sources":["kommonitor-diagrams.component.ts"],"names":[],"mappings":";AAAA,OAAO;KACL,MAAM,CAAC,oBAAoB,CAAC;KAC5B,SAAS,CACT,oBAAoB,EACpB;IACC,WAAW,EAAE,4GAA4G;IACzH;;;OAGG;IACH,UAAU,EAAE;QACX,+BAA+B,EAAE,gCAAgC,EAAE,+BAA+B;QAClG,QAAQ,EAAE,YAAY,EAAE,OAAO;QAC/B,SAAS,4BAA4B,CAAC,6BAA6B,EAAE,8BAA8B,EAAE,6BAA6B,EACjI,MAAM,EAAE,UAAU,EAAE,KAAK;YACzB,IAAI,CAAC,qCAAqC,GAAG,6BAA6B,CAAC;YAC3E,IAAI,CAAC,sCAAsC,GAAG,8BAA8B,CAAC;YAC7E,sCAAsC;YACtC,CAAC,CAAC,MAAM,CAAC,CAAC,SAAS,EAAE,CAAC;YAEtB,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,QAAQ,EAAE;gBACtB,IAAI,MAAM,CAAC,cAAc,IAAI,IAAI,IAAI,MAAM,CAAC,cAAc,IAAI,SAAS,EAAE;oBACxE,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,CAAC;iBAC/B;gBAED,IAAI,MAAM,CAAC,QAAQ,IAAI,IAAI,IAAI,MAAM,CAAC,QAAQ,IAAI,SAAS,EAAE;oBAC5D,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;iBACzB;gBAED,IAAI,MAAM,CAAC,SAAS,IAAI,IAAI,IAAI,MAAM,CAAC,SAAS,IAAI,SAAS,EAAE;oBAC9D,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I,6BAA6B,GAAG,UAAU,iBAAiB;gBAC9D,+CAA+C;gBAC/C,6BAA6B;gBAC7B,IAAI,WAAW,GAAG,2BAA2B,CAAC,iBAAiB,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAAC,CAAC;gBAEnG,IAAI,WAAW,GAAG,CAAC,CAAC,EAAE;oBACrB,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC;wBAC/B,IAAI,EAAE,UAAU;wBAChB,WAAW,EAAE,WAAW;qBACxB,CAAC,CAAC;iBACH;YACF,CAAC,CAAC;YAEF,MAAM,CAAC,GAAG,CAAC,6BAA6B,EAAE,UAAU,KAAK,EAAE,OAAO,EAAE,eAAe;gBAElF,UAAU,CAAC;oBAGV,4DAA4D;oBAC5D,IAAI,WAAW,CAAC,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE;wBACjD,OAAO,EAAE,IAAI;wBACb,OAAO,EAAE,IAAI;wBACb,OAAO,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC;wBAC/B,QAAQ,EAAE,eAAe;wBACzB,SAAS,EAAE,IAAI;wBACf,aAAa,EAAE,IAAI;wBACnB,QAAQ,EAAE,KAAK;wBACf,UAAU,EAAE,IAAI;wBAChB,UAAU,EAAE,IAAI;wBAChB,cAAc,EAAE,IAAI,CAAwB,4HAA4H;qBACxK,CAAC,CAAC;gBACJ,CAAC,EAAE,EAAE,CAAC,CAAC;YAGR,CAAC,CAAC,CAAC;QAEJ,CAAC;KAAC;CACH,CAAC,CAAC"}
\ No newline at end of file
+{"version":3,"file":"kommonitor-diagrams.component.js","sourceRoot":"","sources":["kommonitor-diagrams.component.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAmC,MAAM,eAAe,CAAC;AAG3E,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC,CAAC,yBAAyB;AAWtD,WAAM,2BAA2B,GAAjC,MAAM,2BAA2B;IAEtC,gBAEG,CAAC;IAEJ,QAAQ;QAGV,IAAI,QAAQ,GAAG,QAAQ,CAAC,cAAc,CAAC,WAAW,CAAE,CAAC;QACrD,IAAI,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACrC,IAAI,MAAqB,CAAC;QAE1B,MAAM,GAAG;YACP,KAAK,EAAE;gBACL,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC;aACxD;YACD,KAAK,EAAE;gBACL,IAAI,EAAE,OAAO;aACd;YACD,MAAM,EAAE;gBACN;oBACE,IAAI,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;oBACzC,IAAI,EAAE,MAAM;iBACb;aACF;SACF,CAAC;QAEF,MAAM,IAAI,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;IAGlC,CAAC;CAKF,CAAA;AArCY,2BAA2B;IALvC,SAAS,CAAC;QACT,QAAQ,EAAE,qBAAqB;QAC/B,WAAW,EAAE,mCAAmC,EAAE,0CAA0C;QAC7F,yCAAyC;KACzC,CAAC;GACW,2BAA2B,CAqCvC"}
\ No newline at end of file
diff --git a/app/components/kommonitorUserInterface/kommonitorControls/kommonitorDiagrams/kommonitor-diagrams.component.ts b/app/components/kommonitorUserInterface/kommonitorControls/kommonitorDiagrams/kommonitor-diagrams.component.ts
index 4c670a9a2..6dfca7886 100644
--- a/app/components/kommonitorUserInterface/kommonitorControls/kommonitorDiagrams/kommonitor-diagrams.component.ts
+++ b/app/components/kommonitorUserInterface/kommonitorControls/kommonitorDiagrams/kommonitor-diagrams.component.ts
@@ -1,451 +1,427 @@
-angular
- .module('kommonitorDiagrams')
- .component(
- 'kommonitorDiagrams',
- {
- templateUrl: "components/kommonitorUserInterface/kommonitorControls/kommonitorDiagrams/kommonitor-diagrams.template.html",
- /*
- * injected with a modules service method that manages
- * enabled tabs
- */
- controller: [
- 'kommonitorDataExchangeService', 'kommonitorDiagramHelperService', 'kommonitorFilterHelperService',
- '$scope', '$rootScope', '__env',
- function kommonitorDiagramsController(kommonitorDataExchangeService, kommonitorDiagramHelperService, kommonitorFilterHelperService,
- $scope, $rootScope, __env) {
- this.kommonitorDataExchangeServiceInstance = kommonitorDataExchangeService;
- this.kommonitorDiagramHelperServiceInstance = kommonitorDiagramHelperService;
- // initialize any adminLTE box widgets
- $('.box').boxWidget();
-
- $(window).on('resize', function () {
- if ($scope.histogramChart != null && $scope.histogramChart != undefined) {
- $scope.histogramChart.resize();
- }
-
- if ($scope.barChart != null && $scope.barChart != undefined) {
- $scope.barChart.resize();
- }
-
- if ($scope.lineChart != null && $scope.lineChart != undefined) {
- $scope.lineChart.resize();
- }
- });
-
- $scope.$on("resizeDiagrams", function (event) {
-
- setTimeout(function () {
- if ($scope.histogramChart != null && $scope.histogramChart != undefined) {
- $scope.histogramChart.resize();
- }
-
- if ($scope.barChart != null && $scope.barChart != undefined) {
- $scope.barChart.resize();
- }
-
- if ($scope.lineChart != null && $scope.lineChart != undefined) {
- $scope.lineChart.resize();
- }
- }, 350);
- });
-
- const INDICATOR_DATE_PREFIX = __env.indicatorDatePrefix;
- const defaultColorForHoveredFeatures = __env.defaultColorForHoveredFeatures;
- const defaultColorForClickedFeatures = __env.defaultColorForClickedFeatures;
-
- // $scope.userHoveresOverBarItem = false;
- $scope.eventsRegistered = false;
- $scope.isTooManyFeatures = false;
- $scope.histogramCanBeDisplayed = false;
- $scope.spatialUnitName;
- $scope.date;
- var numberOfDecimals = __env.numberOfDecimals;
- var defaultColorForZeroValues = __env.defaultColorForZeroValues;
- var defaultColorForNoDataValues = __env.defaultColorForNoDataValues;
- var defaultColorForFilteredValues = __env.defaultColorForFilteredValues;
-
- const defaultColorForOutliers_high = __env.defaultColorForOutliers_high;
- const defaultBorderColorForOutliers_high = __env.defaultBorderColorForOutliers_high;
- const defaultFillOpacityForOutliers_high = __env.defaultFillOpacityForOutliers_high;
- const defaultColorForOutliers_low = __env.defaultColorForOutliers_low;
- const defaultBorderColorForOutliers_low = __env.defaultBorderColorForOutliers_low;
- const defaultFillOpacityForOutliers_low = __env.defaultFillOpacityForOutliers_low;
-
- var compareFeaturesByIndicatorValue = function (featureA, featureB) {
- if (featureA.properties[$scope.indicatorPropertyName] < featureB.properties[$scope.indicatorPropertyName])
- return -1;
- if (featureA.properties[$scope.indicatorPropertyName] > featureB.properties[$scope.indicatorPropertyName])
- return 1;
- return 0;
- }
-
- var showLoadingIcons = function () {
-
- if ($scope.histogramChart)
- $scope.histogramChart.showLoading();
-
- if ($scope.barChart)
- $scope.barChart.showLoading();
-
- if ($scope.lineChart)
- $scope.lineChart.showLoading();
- };
-
- $scope.$on("updateDiagrams", function (event, indicatorMetadataAndGeoJSON, spatialUnitName, spatialUnitId, date, defaultBrew, gtMeasureOfValueBrew, ltMeasureOfValueBrew, dynamicIncreaseBrew, dynamicDecreaseBrew, isMeasureOfValueChecked, measureOfValue, justRestyling) {
-
- // console.log("Updating diagrams!");
-
- $scope.loadingData = true;
-
- showLoadingIcons();
-
- $scope.spatialUnitName = spatialUnitName;
- $scope.date = date;
-
- kommonitorDiagramHelperService.prepareAllDiagramResources_forCurrentMapIndicator(indicatorMetadataAndGeoJSON, spatialUnitName, date, defaultBrew, gtMeasureOfValueBrew, ltMeasureOfValueBrew, dynamicIncreaseBrew, dynamicDecreaseBrew, isMeasureOfValueChecked, measureOfValue, false);
-
- // updateHistogramChart();
-
- updateLineChart();
-
- updateBarChart();
- $scope.loadingData = false;
- });
-
- //HISTOGRAM CHART FUNCTION
- var updateHistogramChart = function () {
-
- $scope.histogramCanBeDisplayed = false;
-
- if (!$scope.histogramChart)
- $scope.histogramChart = echarts.init(document.getElementById('histogramDiagram'));
- else {
- // explicitly kill and reinstantiate histogram diagram to avoid zombie states on spatial unit change
- $scope.histogramChart.dispose();
- $scope.histogramChart = echarts.init(document.getElementById('histogramDiagram'));
- }
-
- $scope.histogramOption = kommonitorDiagramHelperService.getHistogramChartOptions();
-
- $scope.histogramChart.setOption($scope.histogramOption);
- $scope.histogramChart.hideLoading();
- $scope.histogramCanBeDisplayed = true;
- setTimeout(function () {
- $scope.histogramChart.resize();
- }, 350);
- };
-
- // BAR CHART FUNCTION
-
- var updateBarChart = function (indicatorMetadataAndGeoJSON, featureNamesArray, indicatorValueBarChartArray) {
- // based on prepared DOM, initialize echarts instance
- $scope.eventsRegistered = false;
-
- if (!$scope.barChart)
- $scope.barChart = echarts.init(document.getElementById('barDiagram'));
- else {
- // explicitly kill and reinstantiate bar diagram to avoid zombie states on spatial unit change
- $scope.barChart.dispose();
- $scope.barChart = echarts.init(document.getElementById('barDiagram'));
- }
-
- // use configuration item and data specified to show chart
- $scope.barOption = kommonitorDiagramHelperService.getBarChartOptions();
- $scope.barChart.setOption($scope.barOption);
-
- $scope.barChart.hideLoading();
-
- setTimeout(function () {
- $scope.barChart.resize();
- }, 350);
-
- registerEventsIfNecessary();
- };
-
- function registerEventsIfNecessary() {
- if (!$scope.eventsRegistered) {
- // when hovering over elements of the chart then highlight them in the map.
- $scope.barChart.on('mouseOver', function (params) {
- // $scope.userHoveresOverBarItem = true;
- var seriesIndex = params.seriesIndex;
- var dataIndex = params.dataIndex;
-
- // console.log("Series: " + seriesIndex + ", dataIndex: " + dataIndex);
- //
- // var barElement = $scope.barOption.series[seriesIndex].data[dataIndex];
- //
- // console.log(barElement);
-
- var spatialFeatureName = $scope.barOption.xAxis.data[dataIndex];
- if(spatialFeatureName){
- // console.log(spatialFeatureName);
- $rootScope.$broadcast("highlightFeatureOnMap", spatialFeatureName);
- }
-
- });
-
- $scope.barChart.on('mouseOut', function (params) {
- // $scope.userHoveresOverBarItem = false;
- var seriesIndex = params.seriesIndex;
- var dataIndex = params.dataIndex;
-
- // console.log("Series: " + seriesIndex + ", dataIndex: " + dataIndex);
- //
- // var barElement = $scope.barOption.series[seriesIndex].data[dataIndex];
- //
- // console.log(barElement);
-
- var spatialFeatureName = $scope.barOption.xAxis.data[dataIndex];
- // console.log(spatialFeatureName);
- if(spatialFeatureName){
- $rootScope.$broadcast("unhighlightFeatureOnMap", spatialFeatureName);
- }
-
- });
-
- $scope.barChart.on('click', function (params) {
- var seriesIndex = params.seriesIndex;
- var dataIndex = params.dataIndex;
-
- // console.log("Series: " + seriesIndex + ", dataIndex: " + dataIndex);
- //
- // var barElement = $scope.barOption.series[seriesIndex].data[dataIndex];
- //
- // console.log(barElement);
-
- var spatialFeatureName = $scope.barOption.xAxis.data[dataIndex];
- // console.log(spatialFeatureName);
- if(spatialFeatureName){
- $rootScope.$broadcast("switchHighlightFeatureOnMap", spatialFeatureName);
- }
-
- });
-
- $scope.eventsRegistered = true;
- }
- };
-
- // LINE CHART TIME SERIES FUNCTION
- var updateLineChart = function (indicatorMetadataAndGeoJSON, indicatorTimeSeriesDatesArray, indicatorTimeSeriesAverageArray) {
- // based on prepared DOM, initialize echarts instance
- if (!$scope.lineChart)
- $scope.lineChart = echarts.init(document.getElementById('lineDiagram'));
- else {
- // explicitly kill and reinstantiate line diagram to avoid zombie states on spatial unit change
- $scope.lineChart.dispose();
- $scope.lineChart = echarts.init(document.getElementById('lineDiagram'));
- }
-
- // use configuration item and data specified to show chart
- $scope.lineOption = kommonitorDiagramHelperService.getLineChartOptions();
- $scope.lineChart.setOption($scope.lineOption);
-
- $scope.lineChart.hideLoading();
- setTimeout(function () {
- $scope.lineChart.resize();
- }, 350);
- };
-
- $scope.$on("updateDiagramsForHoveredFeature", function (event, featureProperties) {
-
- if (!$scope.lineOption.legend.data.includes(featureProperties[__env.FEATURE_NAME_PROPERTY_NAME])) {
- appendSeriesToLineChart(featureProperties);
- }
-
- highlightFeatureInBarChart(featureProperties);
- highlightFeatureInLineChart(featureProperties);
- });
-
- var appendSeriesToLineChart = function (featureProperties) {
-
- // in case of activated balance mode, we must use the properties of kommonitorDataExchangeService.selectedIndicator, to aquire the correct time series item!
- if (kommonitorDataExchangeService.isBalanceChecked) {
- featureProperties = findPropertiesForTimeSeries(featureProperties[__env.FEATURE_NAME_PROPERTY_NAME]);
- }
-
- // append feature name to legend
- $scope.lineOption.legend.data.push(featureProperties[__env.FEATURE_NAME_PROPERTY_NAME]);
-
- // create feature data series
- var featureSeries = {};
- featureSeries.name = featureProperties[__env.FEATURE_NAME_PROPERTY_NAME];
- featureSeries.type = 'line';
- featureSeries.data = new Array();
-
- // for each date create series data entry for feature
- for (var date of $scope.lineOption.xAxis.data) {
- var value;
- if (kommonitorDataExchangeService.indicatorValueIsNoData(featureProperties[INDICATOR_DATE_PREFIX + date])) {
- value = null;
- }
- else {
- value = kommonitorDataExchangeService.getIndicatorValue_asNumber(featureProperties[INDICATOR_DATE_PREFIX + date]);
- }
- featureSeries.data.push(value);
- }
-
- $scope.lineOption.series.push(featureSeries);
-
- $scope.lineChart.setOption($scope.lineOption);
- setTimeout(function () {
- $scope.lineChart.resize();
- }, 350);
- };
-
- var findPropertiesForTimeSeries = function (spatialUnitFeatureName) {
- for (var feature of kommonitorDataExchangeService.selectedIndicator.geoJSON.features) {
- if (feature.properties[__env.FEATURE_NAME_PROPERTY_NAME] == spatialUnitFeatureName) {
- return feature.properties;
- }
- }
- }
-
- var highlightFeatureInBarChart = function (featureProperties) {
- // highlight the corresponding bar diagram item
- // get index of bar item
-
- // if($scope.userHoveresOverBarItem){
- // return;
- // }
-
- var index = -1;
- for (var i = 0; i < $scope.barOption.xAxis.data.length; i++) {
- if ($scope.barOption.xAxis.data[i] === featureProperties[__env.FEATURE_NAME_PROPERTY_NAME]) {
- index = i;
- break;
- }
- }
-
- if (index > -1) {
- $scope.barChart.dispatchAction({
- type: 'highlight',
- seriesIndex: 0,
- dataIndex: index
- });
- // tooltip
- $scope.barChart.dispatchAction({
- type: 'showTip',
- seriesIndex: 0,
- dataIndex: index
- });
- }
- };
-
- var highlightFeatureInLineChart = function (featureProperties) {
- // highlight the corresponding bar diagram item
- // get series index of series
- var seriesIndex = getSeriesIndexByFeatureName(featureProperties[__env.FEATURE_NAME_PROPERTY_NAME]);
-
- if (seriesIndex > -1) {
- $scope.lineChart.dispatchAction({
- type: 'highlight',
- seriesIndex: seriesIndex
- });
- }
- };
-
- $scope.$on("updateDiagramsForUnhoveredFeature", function (event, featureProperties) {
-
- if (!kommonitorFilterHelperService.featureIsCurrentlySelected(featureProperties[__env.FEATURE_ID_PROPERTY_NAME])) {
- unhighlightFeatureInLineChart(featureProperties);
-
- removeSeriesFromLineChart(featureProperties);
-
- unhighlightFeatureInBarChart(featureProperties);
- }
- });
-
- var getSeriesIndexByFeatureName = function (featureName) {
- for (var index = 0; index < $scope.lineOption.series.length; index++) {
- if ($scope.lineOption.series[index].name === featureName)
- return index;
- }
-
- //return -1 if none was found
- return -1;
- };
-
- var removeSeriesFromLineChart = function (featureProperties) {
- // remove feature from legend
- var legendIndex = $scope.lineOption.legend.data.indexOf(featureProperties[__env.FEATURE_NAME_PROPERTY_NAME]);
- if (legendIndex > -1) {
- $scope.lineOption.legend.data.splice(legendIndex, 1);
- }
-
- // remove feature data series
- var seriesIndex = getSeriesIndexByFeatureName(featureProperties[__env.FEATURE_NAME_PROPERTY_NAME]);
- if (seriesIndex > -1) {
- $scope.lineOption.series.splice(seriesIndex, 1);
- }
-
- // second parameter tells echarts to not merge options with previous data. hence really remove series from graphic
- $scope.lineChart.setOption($scope.lineOption, true);
- setTimeout(function () {
- $scope.lineChart.resize();
- }, 350);
- };
-
- var unhighlightFeatureInBarChart = function (featureProperties) {
- // highlight the corresponding bar diagram item
- // get index of bar item
- var index = -1;
- for (var i = 0; i < $scope.barOption.xAxis.data.length; i++) {
- if ($scope.barOption.xAxis.data[i] === featureProperties[__env.FEATURE_NAME_PROPERTY_NAME]) {
- index = i;
- break;
- }
- }
-
- if (index > -1) {
- $scope.barChart.dispatchAction({
- type: 'downplay',
- seriesIndex: 0,
- dataIndex: index
- });
- // tooltip
- $scope.barChart.dispatchAction({
- type: 'hideTip',
- seriesIndex: 0,
- dataIndex: index
- });
- }
- };
-
- var unhighlightFeatureInLineChart = function (featureProperties) {
- // highlight the corresponding bar diagram item
- // get series index of series
- var seriesIndex = getSeriesIndexByFeatureName(featureProperties[__env.FEATURE_NAME_PROPERTY_NAME]);
-
- if (seriesIndex > -1) {
- $scope.lineChart.dispatchAction({
- type: 'downplay',
- seriesIndex: seriesIndex
- });
- }
- };
-
- $scope.$on("AppendExportButtonsForTable", function (event, tableId, tableExportName) {
-
- setTimeout(function () {
-
-
- // new TableExport(document.getElementsByTagName("table"), {
- new TableExport(document.getElementById(tableId), {
- headers: true, // (Boolean), display table headers (th or td elements) in the , (default: true)
- footers: true, // (Boolean), display table footers (th or td elements) in the , (default: false)
- formats: ['xlsx', 'csv', 'txt'], // (String[]), filetype(s) for the export, (default: ['xlsx', 'csv', 'txt'])
- filename: tableExportName, // (id, String), filename for the downloaded file, (default: 'id')
- bootstrap: true, // (Boolean), style buttons using bootstrap, (default: true)
- exportButtons: true, // (Boolean), automatically generate the built-in export buttons for each of the specified formats (default: true)
- position: 'top', // (top, bottom), position of the caption element relative to table, (default: 'bottom')
- ignoreRows: null, // (Number, Number[]), row indices to exclude from the exported file(s) (default: null)
- ignoreCols: null, // (Number, Number[]), column indices to exclude from the exported file(s) (default: null)
- trimWhitespace: true // (Boolean), remove all leading/trailing newlines, spaces, and tabs from cell text in the exported file(s) (default: false)
- });
- }, 50);
-
-
- });
-
- }]
- });
+import { Component, OnInit, OnDestroy, HostListener } from '@angular/core';
+import { Subscription } from 'rxjs';
+//import { KommonitorDataExchangeService } from 'your-data-exchange-service-path'; // Replace with your actual service path
+//import { KommonitorDiagramHelperService } from 'your-diagram-helper-service-path'; // Replace with your actual service path
+//import { KommonitorFilterHelperService } from 'your-filter-helper-service-path'; // Replace with your actual service path
+import * as echarts from 'echarts'; // Import echarts library
+
+ import { environment } from 'env_backup';
+@Component({
+ selector: 'kommonitor-diagrams',
+ templateUrl: 'kommonitor-diagrams.template.html', // Replace with your actual HTML file path
+
+})
+export class KommonitorDiagramsComponent implements OnInit{
+ //private subscription: Subscription;
+ private eventsRegistered = false;
+ private isTooManyFeatures = false;
+ private histogramCanBeDisplayed = false;
+ private spatialUnitName: string | undefined;
+ private date: string | undefined;
+ private numberOfDecimals: number | undefined;
+ private defaultColorForZeroValues: string | undefined;
+ private defaultColorForNoDataValues: string | undefined;
+ private defaultColorForFilteredValues: string | undefined;
+ private defaultColorForOutliers_high:string | undefined;
+ private defaultBorderColorForOutliers_high: string | undefined;
+ private defaultFillOpacityForOutliers_high: string | undefined;
+ private defaultColorForOutliers_low: string | undefined;
+ private defaultBorderColorForOutliers_low: string | undefined;
+ private defaultFillOpacityForOutliers_low: string | undefined;
+ private histogramChart: echarts.ECharts | undefined; // Define chart properties
+ private BarChart: echarts.ECharts | undefined; // Define chart properties
+ private lineChart: echarts.ECharts | undefined;
+ histogramOption: any;
+ barOption!: echarts.EChartsOption;
+ appendSeriesToLineChart: any;
+
+ constructor(
+
+ ) {}
+
+ ngOnInit() {
+ // Initialize your component here
+ // this.initializeComponent();
+ }
+/*
+ ngOnDestroy() {
+ // Unsubscribe from any subscriptions if needed
+ if (this.subscription) {
+ this.subscription.unsubscribe();
+ }
+ }
+
+ private initializeComponent() {
+ // Add your component initialization logic here
+ this.numberOfDecimals = environment.numberOfDecimals;
+ this.defaultColorForZeroValues = environment.defaultColorForZeroValues;
+ this.defaultColorForNoDataValues = environment.defaultColorForNoDataValues;
+ this.defaultColorForFilteredValues = environment.defaultColorForFilteredValues;
+ this.defaultColorForOutliers_high = environment.defaultColorForOutliers_high;
+ this.defaultBorderColorForOutliers_high = environment.defaultBorderColorForOutliers_high;
+ this.defaultFillOpacityForOutliers_high = environment.defaultFillOpacityForOutliers_high;
+ this.defaultColorForOutliers_low = environment.defaultColorForOutliers_low;
+ this.defaultBorderColorForOutliers_low = environment.defaultBorderColorForOutliers_low;
+ this.defaultFillOpacityForOutliers_low = environment.defaultFillOpacityForOutliers_low;
+
+
+
+ }
+
+ private compareFeaturesByIndicatorValue(featureA, featureB): number {
+ if (featureA.properties[this.indicatorPropertyName] < featureB.properties[this.indicatorPropertyName])
+ return -1;
+ if (featureA.properties[this.indicatorPropertyName] > featureB.properties[this.indicatorPropertyName])
+ return 1;
+ return 0;
+ }
+
+ private showLoadingIcons(): void {
+ if (this.histogramChart) {
+ this.histogramChart.showLoading();
+ }
+ if (this.barChart) {
+ this.barChart.showLoading();
+ }
+ if (this.lineChart) {
+ this.lineChart.showLoading();
+ }
+ }
+
+ // Handle window resize event and trigger chart resizes
+ @HostListener('window:resize', ['$event'])
+ onResize(event: Event): void {
+ if (this.histogramChart) {
+ this.histogramChart.resize();
+ }
+ if (this.barChart) {
+ this.barChart.resize();
+ }
+ if (this.lineChart) {
+ this.lineChart.resize();
+ }
+ }
+
+
+ //HISTOGRAM CHART FUNCTION
+
+private updateHistogramChart(): void {
+ this.histogramCanBeDisplayed = false;
+ if (!this.histogramChart) {
+ this.histogramChart = echarts.init(document.getElementById('histogramDiagram'));
+ } else {
+ // explicitly kill and reinstantiate histogram diagram to avoid zombie states on spatial unit change
+ this.histogramChart.dispose();
+ this.histogramChart = echarts.init(document.getElementById('histogramDiagram'));
+ }
+ this.histogramOption = this.kommonitorDiagramHelperService.getHistogramChartOptions();
+ this.histogramChart.setOption(this.histogramOption);
+ this.histogramChart.hideLoading();
+ this.histogramCanBeDisplayed = true;
+ setTimeout(() => {
+ this.kommonitorDiagramHelperService.histogramChart.resize();
+ }, 350);
+ }
+
+// BAR CHART FUNCTION
+// Inside your Angular component class
+private updateBarChart(
+ indicatorMetadataAndGeoJSON: any, // Replace with the appropriate type
+ featureNamesArray: any[], // Replace with the appropriate type
+ indicatorValueBarChartArray: any[] // Replace with the appropriate type
+ ): void {
+ // based on prepared DOM, initialize echarts instance
+ this.eventsRegistered = false;
+ if (!this.barChart) {
+ this.barChart = echarts.init(document.getElementById('barDiagram'));
+ } else {
+ // explicitly kill and reinstantiate bar diagram to avoid zombie states on spatial unit change
+ this.barChart.dispose();
+ this.barChart = echarts.init(document.getElementById('barDiagram'));
+ }
+ // use configuration item and data specified to show chart
+ this.barOption = this.kommonitorDiagramHelperService.getBarChartOptions();
+ this.barChart.setOption(this.barOption);
+ this.barChart.hideLoading();
+ setTimeout(() => {
+ this.barChart.resize();
+ }, 350);
+ this.registerEventsIfNecessary();
+ }
+
+ // registering events if necessary
+private registerEventsIfNecessary(): void {
+ if (!this.eventsRegistered) {
+ // when hovering over elements of the chart then highlight them in the map.
+ this.barChart.on('mouseOver', (params) => {
+ const seriesIndex = params.seriesIndex;
+ const dataIndex = params.dataIndex;
+ const spatialFeatureName = this.barOption.xAxis.data[dataIndex];
+ if (spatialFeatureName) {
+ this.$rootScope.$broadcast("highlightFeatureOnMap", spatialFeatureName);
+ }
+ });
+
+ this.barChart.on('mouseOut', (params) => {
+ const seriesIndex = params.seriesIndex;
+ const dataIndex = params.dataIndex;
+ const spatialFeatureName = this.barOption.xAxis.data[dataIndex];
+ if (spatialFeatureName) {
+ this.$rootScope.$broadcast("unhighlightFeatureOnMap", spatialFeatureName);
+ }
+ });
+
+ this.barChart.on('click', (params) => {
+ const seriesIndex = params.seriesIndex;
+ const dataIndex = params.dataIndex;
+ const spatialFeatureName = this.barOption.xAxis.data[dataIndex];
+ if (spatialFeatureName) {
+ this.$rootScope.$broadcast("switchHighlightFeatureOnMap", spatialFeatureName);
+ }
+ });
+
+ this.eventsRegistered = true;
+ }
+ }
+
+ // Inside your Angular component class
+private updateLineChart(
+ indicatorMetadataAndGeoJSON: any, // Replace with the appropriate type
+ indicatorTimeSeriesDatesArray: any[], // Replace with the appropriate type
+ indicatorTimeSeriesAverageArray: any[] // Replace with the appropriate type
+ ): void {
+ // based on prepared DOM, initialize echarts instance
+ if (!this.lineChart) {
+ this.lineChart = echarts.init(document.getElementById('lineDiagram'));
+ } else {
+ // explicitly kill and reinstantiate line diagram to avoid zombie states on spatial unit change
+ this.lineChart.dispose();
+ this.lineChart = echarts.init(document.getElementById('lineDiagram'));
+ }
+ // use configuration item and data specified to show chart
+ this.lineOption = this.kommonitorDiagramHelperService.getLineChartOptions();
+ this.lineChart.setOption(this.lineOption);
+ this.lineChart.hideLoading();
+ setTimeout(() => {
+ this.lineChart.resize();
+ }, 350);
+ }
+
+@HostListener('updateDiagramsForHoveredFeature', ['$event', 'featureProperties'])
+private onUpdateDiagramsForHoveredFeature(event: any, featureProperties: any): void {
+ if (!this.lineOption.legend.data.includes(featureProperties[this.environment.FEATURE_NAME_PROPERTY_NAME])) {
+ this.appendSeriesToLineChart(featureProperties);
+ }
+ this.highlightFeatureInBarChart(featureProperties);
+ this.highlightFeatureInLineChart(featureProperties);
+}
+
+
+// Inside your Angular component class
+private appendSeriesToLineChart(featureProperties: any): void {
+ // In case of activated balance mode, we must use the properties of kommonitorDataExchangeService.selectedIndicator to acquire the correct time series item
+ if (this.kommonitorDataExchangeServiceInstance.isBalanceChecked) {
+ featureProperties = this.findPropertiesForTimeSeries(featureProperties[this.environment.FEATURE_NAME_PROPERTY_NAME]);
+ }
+
+ this.lineOption.legend.data.push(featureProperties[this.environment.FEATURE_NAME_PROPERTY_NAME]);
+ // Create feature data series
+ const featureSeries: any = {};
+ featureSeries.name = featureProperties[this.environment.FEATURE_NAME_PROPERTY_NAME];
+ featureSeries.type = 'line';
+ featureSeries.data = new Array();
+ // For each date, create a series data entry for the feature
+ for (const date of this.lineOption.xAxis.data) {
+ let value;
+ if (this.kommonitorDataExchangeServiceInstance.indicatorValueIsNoData(featureProperties[this.INDICATOR_DATE_PREFIX + date])) {
+ value = null;
+ } else {
+ value = this.kommonitorDataExchangeServiceInstance.getIndicatorValue_asNumber(featureProperties[this.INDICATOR_DATE_PREFIX + date]);
+ }
+ featureSeries.data.push(value);
+ }
+ this.lineOption.series.push(featureSeries);
+ this.lineChart.setOption(this.lineOption);
+ setTimeout(() => {
+ this.lineChart.resize();
+ }, 350);
+ }
+
+ private findPropertiesForTimeSeries(spatialUnitFeatureName: string): any {
+ for (const feature of this.kommonitorDataExchangeServiceInstance.selectedIndicator.geoJSON.features) {
+ if (feature.properties[this.environment.FEATURE_NAME_PROPERTY_NAME] === spatialUnitFeatureName) {
+ return feature.properties;
+ }
+ }
+ }
+
+ // Inside your Angular component class
+private highlightFeatureInBarChart(featureProperties: any): void {
+ // Highlight the corresponding bar diagram item
+ // Get index of bar item
+ const index = this.barOption.xAxis.data.findIndex(item => item === featureProperties[this.environment.FEATURE_NAME_PROPERTY_NAME]);
+ if (index > -1) {
+ this.barChart.dispatchAction({
+ type: 'highlight',
+ seriesIndex: 0,
+ dataIndex: index,
+ });
+ // Tooltip
+ this.barChart.dispatchAction({
+ type: 'showTip',
+ seriesIndex: 0,
+ dataIndex: index,
+ });
+ }
+ }
+
+ private highlightFeatureInLineChart(featureProperties: any): void {
+ // Highlight the corresponding bar diagram item
+ // Get series index of series
+ const seriesIndex = this.getSeriesIndexByFeatureName(featureProperties[this.environment.FEATURE_NAME_PROPERTY_NAME]);
+ if (seriesIndex > -1) {
+ this.lineChart.dispatchAction({
+ type: 'highlight',
+ seriesIndex: seriesIndex,
+ });
+ }
+ }
+
+ private unhighlightFeatureInBarChart(featureProperties: any): void {
+ // Unhighlight the corresponding bar diagram item
+ // Get index of bar item
+ const index = this.barOption.xAxis.data.findIndex(item => item === featureProperties[this.environment.FEATURE_NAME_PROPERTY_NAME]);
+ if (index > -1) {
+ this.barChart.dispatchAction({
+ type: 'downplay',
+ seriesIndex: 0,
+ dataIndex: index,
+ });
+ // Tooltip
+ this.barChart.dispatchAction({
+ type: 'hideTip',
+ seriesIndex: 0,
+ dataIndex: index,
+ });
+ }
+ }
+
+ private unhighlightFeatureInLineChart(featureProperties: any): void {
+ // Unhighlight the corresponding bar diagram item
+ // Get series index of series
+ const seriesIndex = this.getSeriesIndexByFeatureName(featureProperties[this.environment.FEATURE_NAME_PROPERTY_NAME]);
+ if (seriesIndex > -1) {
+ this.lineChart.dispatchAction({
+ type: 'downplay',
+ seriesIndex: seriesIndex,
+ });
+ }
+ }
+
+ private getSeriesIndexByFeatureName(featureName: string): number {
+ for (let index = 0; index < this.lineOption.series.length; index++) {
+ if (this.lineOption.series[index].name === featureName) {
+ return index;
+ }
+ }
+ // Return -1 if none was found
+ return -1;
+ }
+ // Inside your Angular component class
+private removeSeriesFromLineChart(featureProperties: any): void {
+ // Remove feature from legend
+ const legendIndex = this.lineOption.legend.data.indexOf(featureProperties[this.environment.FEATURE_NAME_PROPERTY_NAME]);
+ if (legendIndex > -1) {
+ this.lineOption.legend.data.splice(legendIndex, 1);
+ }
+ // Remove feature data series
+ const seriesIndex = this.getSeriesIndexByFeatureName(featureProperties[this.environment.FEATURE_NAME_PROPERTY_NAME]);
+ if (seriesIndex > -1) {
+ this.lineOption.series.splice(seriesIndex, 1);
+ }
+ // Second parameter tells echarts to not merge options with previous data, hence really remove series from graphic
+ this.lineChart.setOption(this.lineOption, true);
+ setTimeout(() => {
+ this.lineChart.resize();
+ }, 350);
+ }
+
+ private unhighlightFeatureInBarChart(featureProperties: any): void {
+ // Unhighlight the corresponding bar diagram item
+ // Get index of bar item
+ const index = this.barOption.xAxis.data.findIndex(item => item === featureProperties[this.environment.FEATURE_NAME_PROPERTY_NAME]);
+ if (index > -1) {
+ this.barChart.dispatchAction({
+ type: 'downplay',
+ seriesIndex: 0,
+ dataIndex: index,
+ });
+ // Tooltip
+ this.barChart.dispatchAction({
+ type: 'hideTip',
+ seriesIndex: 0,
+ dataIndex: index,
+ });
+ }
+ }
+
+ private unhighlightFeatureInLineChart(featureProperties: any): void {
+ // Unhighlight the corresponding bar diagram item
+ // Get series index of series
+ const seriesIndex = this.getSeriesIndexByFeatureName(featureProperties[this.environment.FEATURE_NAME_PROPERTY_NAME]);
+ if (seriesIndex > -1) {
+ this.lineChart.dispatchAction({
+ type: 'downplay',
+ seriesIndex: seriesIndex,
+ });
+ }
+ }
+
+
+ // Use @HostListener to listen for the event
+ document: any.addEventListener('AppendExportButtonsForTable', (event: CustomEvent) => {
+ const tableId = event.detail.tableId;
+ const tableExportName = event.detail.tableExportName;
+
+ setTimeout(() => {
+ new TableExport(document.getElementById(tableId), {
+ headers: true,
+ footers: true,
+ formats: ['xlsx', 'csv', 'txt'],
+ filename: tableExportName,
+ bootstrap: true,
+ exportButtons: true,
+ position: 'top',
+ ignoreRows: null,
+ ignoreCols: null,
+ trimWhitespace: true, // (Boolean), remove all leading/trailing newlines, spaces, and tabs from cell text in the exported file(s) (default: false)
+ });
+ }, 50);
+ });
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+*/
+
+
+
+
+ // Define your methods for updating charts, handling events, etc.
+}
diff --git a/app/components/kommonitorUserInterface/kommonitorControls/kommonitorDiagrams/kommonitor-diagrams.module.js b/app/components/kommonitorUserInterface/kommonitorControls/kommonitorDiagrams/kommonitor-diagrams.module.js
index b909c5448..f0c2fcfb0 100644
--- a/app/components/kommonitorUserInterface/kommonitorControls/kommonitorDiagrams/kommonitor-diagrams.module.js
+++ b/app/components/kommonitorUserInterface/kommonitorControls/kommonitorDiagrams/kommonitor-diagrams.module.js
@@ -1,3 +1,15 @@
-"use strict";
-angular.module('kommonitorDiagrams', ['kommonitorDataExchange', 'kommonitorDiagramHelper']);
+import { __decorate } from "tslib";
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+import { KommonitorDiagramsComponent } from './kommonitor-diagrams.component';
+export let KommonitorDiagramsModule = class KommonitorDiagramsModule {
+};
+KommonitorDiagramsModule = __decorate([
+ NgModule({
+ declarations: [KommonitorDiagramsComponent],
+ imports: [CommonModule],
+ providers: [],
+ bootstrap: [KommonitorDiagramsComponent]
+ })
+], KommonitorDiagramsModule);
//# sourceMappingURL=kommonitor-diagrams.module.js.map
\ No newline at end of file
diff --git a/app/components/kommonitorUserInterface/kommonitorControls/kommonitorDiagrams/kommonitor-diagrams.module.js.map b/app/components/kommonitorUserInterface/kommonitorControls/kommonitorDiagrams/kommonitor-diagrams.module.js.map
index a940e2e05..319105315 100644
--- a/app/components/kommonitorUserInterface/kommonitorControls/kommonitorDiagrams/kommonitor-diagrams.module.js.map
+++ b/app/components/kommonitorUserInterface/kommonitorControls/kommonitorDiagrams/kommonitor-diagrams.module.js.map
@@ -1 +1 @@
-{"version":3,"file":"kommonitor-diagrams.module.js","sourceRoot":"","sources":["kommonitor-diagrams.module.ts"],"names":[],"mappings":";AAAA,OAAO,CAAC,MAAM,CAAC,oBAAoB,EAAE,CAAE,wBAAwB,EAAE,yBAAyB,CAAC,CAAC,CAAC"}
\ No newline at end of file
+{"version":3,"file":"kommonitor-diagrams.module.js","sourceRoot":"","sources":["kommonitor-diagrams.module.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAG/C,OAAO,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAOvE,WAAM,wBAAwB,GAA9B,MAAM,wBAAwB;CAAG,CAAA;AAA3B,wBAAwB;IANpC,QAAQ,CAAC;QACV,YAAY,EAAC,CAAC,2BAA2B,CAAC;QAC1C,OAAO,EAAC,CAAC,YAAY,CAAC;QACtB,SAAS,EAAC,EAAE;QACZ,SAAS,EAAC,CAAC,2BAA2B,CAAC;KACtC,CAAC;GACW,wBAAwB,CAAG"}
\ No newline at end of file
diff --git a/app/components/kommonitorUserInterface/kommonitorControls/kommonitorDiagrams/kommonitor-diagrams.module.ts b/app/components/kommonitorUserInterface/kommonitorControls/kommonitorDiagrams/kommonitor-diagrams.module.ts
index e2e076e1c..74c0ed1ee 100644
--- a/app/components/kommonitorUserInterface/kommonitorControls/kommonitorDiagrams/kommonitor-diagrams.module.ts
+++ b/app/components/kommonitorUserInterface/kommonitorControls/kommonitorDiagrams/kommonitor-diagrams.module.ts
@@ -1 +1,12 @@
-angular.module('kommonitorDiagrams', [ 'kommonitorDataExchange', 'kommonitorDiagramHelper']);
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+import { kommonitorDataExchangeServiceFactory } from 'app-upgraded-providers';
+import { kommonitorDiagramHelperServiceFactory } from 'app-upgraded-providers';
+import { KommonitorDiagramsComponent } from './kommonitor-diagrams.component';
+@NgModule({
+declarations:[],
+imports:[CommonModule],
+providers:[],
+bootstrap:[]
+})
+export class KommonitorDiagramsModule {}
diff --git a/app/components/kommonitorUserInterface/kommonitorControls/kommonitorDiagrams/kommonitor-diagrams.template.html b/app/components/kommonitorUserInterface/kommonitorControls/kommonitorDiagrams/kommonitor-diagrams.template.html
index 0e1f9463a..182fb2acd 100644
--- a/app/components/kommonitorUserInterface/kommonitorControls/kommonitorDiagrams/kommonitor-diagrams.template.html
+++ b/app/components/kommonitorUserInterface/kommonitorControls/kommonitorDiagrams/kommonitor-diagrams.template.html
@@ -23,9 +23,9 @@ gewählte Raumebene enthält zu viele Features. Balkendiagramm kann