summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk/epsdk-app-common
diff options
context:
space:
mode:
Diffstat (limited to 'ecomp-sdk/epsdk-app-common')
-rw-r--r--ecomp-sdk/epsdk-app-common/.gitignore5
-rw-r--r--ecomp-sdk/epsdk-app-common/README.md31
-rw-r--r--ecomp-sdk/epsdk-app-common/db-scripts/EcompSdkDDLMySql_1707_Common.sql1399
-rw-r--r--ecomp-sdk/epsdk-app-common/db-scripts/EcompSdkDMLMySql_1707_Common.sql2837
-rw-r--r--ecomp-sdk/epsdk-app-common/db-scripts/readme.txt54
-rw-r--r--ecomp-sdk/epsdk-app-common/pom.xml294
-rw-r--r--ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/AdminController.java52
-rw-r--r--ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/AngularAdminController.java51
-rw-r--r--ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/CacheAdminController.java248
-rw-r--r--ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/FavoritesController.java118
-rw-r--r--ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/FnMenuController.java223
-rw-r--r--ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/FuncMenuController.java175
-rw-r--r--ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/LogoutController.java113
-rw-r--r--ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/ManifestController.java111
-rw-r--r--ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/MenuListController.java255
-rw-r--r--ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/PostSearchController.java211
-rw-r--r--ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/ProfileController.java352
-rw-r--r--ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/ProfileSearchController.java163
-rw-r--r--ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/RoleController.java342
-rw-r--r--ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/RoleFunctionListController.java172
-rw-r--r--ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/RoleListController.java170
-rw-r--r--ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/SDKLoginController.java99
-rw-r--r--ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/SingleSignOnController.java223
-rw-r--r--ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/UsageListController.java165
-rw-r--r--ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/UserProfileController.java68
-rw-r--r--ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/WelcomeController.java43
-rw-r--r--ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/package-info.java6
-rw-r--r--ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/AngularSinglePageController.java49
-rw-r--r--ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/BroadcastController.java131
-rw-r--r--ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/BroadcastListController.java143
-rw-r--r--ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/CallflowController.java45
-rw-r--r--ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/CamundaCockpitController.java60
-rw-r--r--ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/CollaborateListController.java85
-rw-r--r--ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/CollaborationController.java55
-rw-r--r--ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/DS2SampleController.java54
-rw-r--r--ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/ElasticSearchController.java128
-rw-r--r--ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/ElementModelController.java87
-rw-r--r--ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/LeafletMapContoller.java43
-rw-r--r--ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/NetMapController.java57
-rw-r--r--ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/PostDroolsController.java122
-rw-r--r--ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/ReportDashboardController.java46
-rw-r--r--ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/SamplePageController.java50
-rw-r--r--ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/package-info.java5
-rw-r--r--ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/model/Result.java37
-rw-r--r--ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/scheduler/LogJob.java45
-rw-r--r--ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/scheduler/LogRegistry.java57
-rw-r--r--ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/service/IAdminAuthExtension.java65
-rw-r--r--ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/service/OnBoardingApiServiceImpl.java361
-rw-r--r--ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/util/CustomLoggingFilter.java54
-rw-r--r--ecomp-sdk/epsdk-app-common/src/main/webapp/app/fusion/external/d3/js/intro.js1
-rw-r--r--ecomp-sdk/epsdk-app-common/src/test/java/org/openecomp/portalapp/SanityTest.java20
-rw-r--r--ecomp-sdk/epsdk-app-common/src/test/java/org/openecomp/portalapp/controller/CollaborationControllerTest.java29
-rw-r--r--ecomp-sdk/epsdk-app-common/src/test/java/org/openecomp/portalapp/controller/NetMapTest.java19
-rw-r--r--ecomp-sdk/epsdk-app-common/src/test/java/org/openecomp/portalapp/core/MockApplicationContextTestSuite.java127
-rw-r--r--ecomp-sdk/epsdk-app-common/src/test/java/org/openecomp/portalapp/service/ProfileServiceTest.java39
-rw-r--r--ecomp-sdk/epsdk-app-common/src/test/java/org/openecomp/portalapp/workflow/services/WorkflowScheduleServiceTest.java44
56 files changed, 10038 insertions, 0 deletions
diff --git a/ecomp-sdk/epsdk-app-common/.gitignore b/ecomp-sdk/epsdk-app-common/.gitignore
new file mode 100644
index 0000000..aa0c881
--- /dev/null
+++ b/ecomp-sdk/epsdk-app-common/.gitignore
@@ -0,0 +1,5 @@
+/target
+/bin/
+/.settings/
+.project
+.classpath
diff --git a/ecomp-sdk/epsdk-app-common/README.md b/ecomp-sdk/epsdk-app-common/README.md
new file mode 100644
index 0000000..c3a9fab
--- /dev/null
+++ b/ecomp-sdk/epsdk-app-common/README.md
@@ -0,0 +1,31 @@
+# ECOMP SDK Web Application Common Files
+
+## Overview
+
+This is a Maven project with the ECOMP SDK classes that are used in the open-source version of the ECOMP SDK sample web
+application. Those specific versions are built using separate Maven projects.
+
+The java code depends on the following ECOMP SDK libraries that are developed
+by the ECOMP Portal team:
+
+* ECOMP SDK Framework library
+* ECOMP SDK Core library
+* ECOMP SDK Analytics library
+* ECOMP SDK Workflow library
+
+Use Apache Maven to build, package and deploy this webapp to a Maven repository.
+This project is not intended to be deployed to a web container like Tomcat.
+
+## Release Notes
+
+SDK is currently using AngularJS version 1.4.8 for compatibility with b2b library
+version 1.0.1. Note that previous versions of the EPSDK web application used
+AngularJS version 1.5.0.
+
+### OpenECOMP Distributions
+
+Version 1.1.0
+- [Portal-7] Improvements added as part of the rebasing process
+
+Version 1.0.0
+- Initial release
diff --git a/ecomp-sdk/epsdk-app-common/db-scripts/EcompSdkDDLMySql_1707_Common.sql b/ecomp-sdk/epsdk-app-common/db-scripts/EcompSdkDDLMySql_1707_Common.sql
new file mode 100644
index 0000000..ae534dd
--- /dev/null
+++ b/ecomp-sdk/epsdk-app-common/db-scripts/EcompSdkDDLMySql_1707_Common.sql
@@ -0,0 +1,1399 @@
+-- ---------------------------------------------------------------------------------------------------------------
+-- This script creates tables in the 1707 COMMON version of the ECOMP SDK application database.
+-- Additional DDL scripts may be required!
+--
+-- Note to database admin: set the MySQL system variable called lower_case_table_names to 1
+-- It can be set 3 different ways:
+-- command-line options (Cmd-line),
+-- options valid in configuration files (Option file), or
+-- server system variables (System Var).
+--
+-- When set to 1 table names are stored in lowercase on disk and comparisons are not case sensitive.
+--
+-- MySql/MariaDB Version compatibility information
+--
+-- bash-4.2$ mysql --version – cluster version
+-- mysql Ver 15.1 Distrib 10.1.17-MariaDB, for Linux (x86_64) using readline 5.1
+--
+-- All versions newer or older than these DO NOT necessarily mean they are compatible.
+-- ---------------------------------------------------------------------------------------------------------------
+
+SET FOREIGN_KEY_CHECKS=1;
+
+CREATE DATABASE IF NOT EXISTS ecomp_sdk;
+
+USE ecomp_sdk;
+
+-- ---------- create table SECTION
+--
+-- NAME: CR_FAVORITE_REPORTS; TYPE: TABLE
+--
+create table cr_favorite_reports (
+ USER_ID INTEGER NOT NULL,
+ REP_ID INTEGER NOT NULL
+);
+
+--
+-- NAME: CR_FILEHIST_LOG; TYPE: TABLE
+--
+create table cr_filehist_log (
+ SCHEDULE_ID NUMERIC(11,0) NOT NULL,
+ URL CHARACTER VARYING(4000),
+ NOTES CHARACTER VARYING(3500),
+ RUN_TIME TIMESTAMP
+);
+
+--
+-- NAME: CR_FOLDER; TYPE: TABLE
+--
+create table cr_folder (
+ FOLDER_ID INTEGER NOT NULL,
+ FOLDER_NAME CHARACTER VARYING(50) NOT NULL,
+ DESCR CHARACTER VARYING(500),
+ CREATE_ID INTEGER NOT NULL,
+ CREATE_DATE TIMESTAMP NOT NULL,
+ PARENT_FOLDER_ID INTEGER,
+ PUBLIC_YN CHARACTER VARYING(1) DEFAULT 'N' NOT NULL
+);
+
+--
+-- NAME: CR_FOLDER_ACCESS; TYPE: TABLE
+--
+create table cr_folder_access (
+ FOLDER_ACCESS_ID NUMERIC(11,0) NOT NULL,
+ FOLDER_ID NUMERIC(11,0) NOT NULL,
+ ORDER_NO NUMERIC(11,0) NOT NULL,
+ ROLE_ID NUMERIC(11,0),
+ USER_ID NUMERIC(11,0),
+ READ_ONLY_YN CHARACTER VARYING(1) DEFAULT 'N' NOT NULL
+);
+
+--
+-- NAME: CR_HIST_USER_MAP; TYPE: TABLE
+--
+create table cr_hist_user_map (
+ HIST_ID INT(11) NOT NULL,
+ USER_ID INT(11) NOT NULL
+);
+
+--
+-- NAME: CR_LU_FILE_TYPE; TYPE: TABLE
+--
+create table cr_lu_file_type (
+ LOOKUP_ID NUMERIC(2,0) NOT NULL,
+ LOOKUP_DESCR CHARACTER VARYING(255) NOT NULL,
+ ACTIVE_YN CHARACTER(1) DEFAULT 'Y',
+ ERROR_CODE NUMERIC(11,0)
+);
+
+--
+-- NAME: CR_RAPTOR_ACTION_IMG; TYPE: TABLE
+--
+create table cr_raptor_action_img (
+ IMAGE_ID CHARACTER VARYING(100) NOT NULL,
+ IMAGE_LOC CHARACTER VARYING(400)
+);
+
+--
+-- NAME: CR_RAPTOR_PDF_IMG; TYPE: TABLE
+--
+create table cr_raptor_pdf_img (
+ IMAGE_ID CHARACTER VARYING(100) NOT NULL,
+ IMAGE_LOC CHARACTER VARYING(400)
+);
+
+--
+-- NAME: CR_REMOTE_SCHEMA_INFO; TYPE: TABLE
+--
+create table cr_remote_schema_info (
+ SCHEMA_PREFIX CHARACTER VARYING(5) NOT NULL,
+ SCHEMA_DESC CHARACTER VARYING(75) NOT NULL,
+ DATASOURCE_TYPE CHARACTER VARYING(100)
+);
+
+--
+-- NAME: CR_REPORT; TYPE: TABLE
+--
+create table cr_report (
+ REP_ID NUMERIC(11,0) NOT NULL,
+ TITLE CHARACTER VARYING(100) NOT NULL,
+ DESCR CHARACTER VARYING(255),
+ PUBLIC_YN CHARACTER VARYING(1) DEFAULT 'N' NOT NULL,
+ REPORT_XML TEXT,
+ CREATE_ID NUMERIC(11,0),
+ CREATE_DATE TIMESTAMP default now(),
+ MAINT_ID NUMERIC(11,0),
+ MAINT_DATE TIMESTAMP DEFAULT NOW(),
+ MENU_ID CHARACTER VARYING(500),
+ MENU_APPROVED_YN CHARACTER VARYING(1) DEFAULT 'N' NOT NULL,
+ OWNER_ID NUMERIC(11,0),
+ FOLDER_ID INTEGER DEFAULT 0,
+ DASHBOARD_TYPE_YN CHARACTER VARYING(1) DEFAULT 'N',
+ DASHBOARD_YN CHARACTER VARYING(1) DEFAULT 'N'
+);
+
+--
+-- NAME: CR_REPORT_ACCESS; TYPE: TABLE
+--
+create table cr_report_access (
+ REP_ID NUMERIC(11,0) NOT NULL,
+ ORDER_NO NUMERIC(11,0) NOT NULL,
+ ROLE_ID NUMERIC(11,0),
+ USER_ID NUMERIC(11,0),
+ READ_ONLY_YN CHARACTER VARYING(1) DEFAULT 'N' NOT NULL
+);
+
+--
+-- NAME: CR_REPORT_DWNLD_LOG; TYPE: TABLE
+--
+create table cr_report_dwnld_log (
+ USER_ID NUMERIC(11,0) NOT NULL,
+ REP_ID INTEGER NOT NULL,
+ FILE_NAME CHARACTER VARYING(100) NOT NULL,
+ DWNLD_START_TIME TIMESTAMP DEFAULT NOW() NOT NULL,
+ RECORD_READY_TIME TIMESTAMP DEFAULT NOW(),
+ FILTER_PARAMS CHARACTER VARYING(2000)
+);
+
+--
+-- NAME: CR_REPORT_EMAIL_SENT_LOG; TYPE: TABLE
+--
+create table cr_report_email_sent_log (
+ LOG_ID INTEGER NOT NULL,
+ SCHEDULE_ID NUMERIC(11,0),
+ GEN_KEY CHARACTER VARYING(25) NOT NULL,
+ REP_ID NUMERIC(11,0) NOT NULL,
+ USER_ID NUMERIC(11,0),
+ SENT_DATE TIMESTAMP DEFAULT NOW(),
+ ACCESS_FLAG CHARACTER VARYING(1) DEFAULT 'Y' NOT NULL,
+ TOUCH_DATE TIMESTAMP DEFAULT NOW()
+);
+
+--
+-- NAME: CR_REPORT_FILE_HISTORY; TYPE: TABLE
+--
+create table cr_report_file_history (
+ HIST_ID INT(11) NOT NULL,
+ SCHED_USER_ID NUMERIC(11,0) NOT NULL,
+ SCHEDULE_ID NUMERIC(11,0) NOT NULL,
+ USER_ID NUMERIC(11,0) NOT NULL,
+ REP_ID NUMERIC(11,0),
+ RUN_DATE TIMESTAMP,
+ RECURRENCE CHARACTER VARYING(50),
+ FILE_TYPE_ID NUMERIC(2,0),
+ FILE_NAME CHARACTER VARYING(80),
+ FILE_BLOB BLOB,
+ FILE_SIZE NUMERIC(11,0),
+ RAPTOR_URL CHARACTER VARYING(4000),
+ ERROR_YN CHARACTER(1) DEFAULT 'N',
+ ERROR_CODE NUMERIC(11,0),
+ DELETED_YN CHARACTER(1) DEFAULT 'N',
+ DELETED_BY NUMERIC(38,0)
+);
+
+--
+-- NAME: CR_REPORT_LOG; TYPE: TABLE
+--
+create table cr_report_log (
+ REP_ID NUMERIC(11,0) NOT NULL,
+ LOG_TIME TIMESTAMP NOT NULL,
+ USER_ID NUMERIC(11,0) NOT NULL,
+ ACTION CHARACTER VARYING(2000) NOT NULL,
+ ACTION_VALUE CHARACTER VARYING(50),
+ FORM_FIELDS CHARACTER VARYING(4000)
+);
+
+--
+-- NAME: CR_REPORT_SCHEDULE; TYPE: TABLE
+--
+create table cr_report_schedule (
+ SCHEDULE_ID NUMERIC(11,0) NOT NULL,
+ SCHED_USER_ID NUMERIC(11,0) NOT NULL,
+ REP_ID NUMERIC(11,0) NOT NULL,
+ ENABLED_YN CHARACTER VARYING(1) NOT NULL,
+ START_DATE TIMESTAMP DEFAULT NOW(),
+ END_DATE TIMESTAMP DEFAULT NOW(),
+ RUN_DATE TIMESTAMP DEFAULT NOW(),
+ RECURRENCE CHARACTER VARYING(50),
+ CONDITIONAL_YN CHARACTER VARYING(1) NOT NULL,
+ CONDITION_SQL CHARACTER VARYING(4000),
+ NOTIFY_TYPE INTEGER DEFAULT 0,
+ MAX_ROW INTEGER DEFAULT 1000,
+ INITIAL_FORMFIELDS CHARACTER VARYING(3500),
+ PROCESSED_FORMFIELDS CHARACTER VARYING(3500),
+ FORMFIELDS CHARACTER VARYING(3500),
+ CONDITION_LARGE_SQL TEXT,
+ ENCRYPT_YN CHARACTER(1) DEFAULT 'N',
+ ATTACHMENT_YN CHARACTER(1) DEFAULT 'Y'
+);
+
+--
+-- NAME: CR_REPORT_SCHEDULE_USERS; TYPE: TABLE
+--
+create table cr_report_schedule_users (
+ SCHEDULE_ID NUMERIC(11,0) NOT NULL,
+ REP_ID NUMERIC(11,0) NOT NULL,
+ USER_ID NUMERIC(11,0) NOT NULL,
+ ROLE_ID NUMERIC(11,0),
+ ORDER_NO NUMERIC(11,0) NOT NULL
+);
+
+--
+-- NAME: CR_REPORT_TEMPLATE_MAP; TYPE: TABLE
+--
+create table cr_report_template_map (
+ REPORT_ID INTEGER NOT NULL,
+ TEMPLATE_FILE CHARACTER VARYING(200)
+);
+
+--
+-- NAME: CR_SCHEDULE_ACTIVITY_LOG; TYPE: TABLE
+--
+create table cr_schedule_activity_log (
+ SCHEDULE_ID NUMERIC(11,0) NOT NULL,
+ URL CHARACTER VARYING(4000),
+ NOTES CHARACTER VARYING(2000),
+ RUN_TIME TIMESTAMP
+);
+
+--
+-- NAME: CR_TABLE_JOIN; TYPE: TABLE
+--
+create table cr_table_join (
+ SRC_TABLE_NAME CHARACTER VARYING(30) NOT NULL,
+ DEST_TABLE_NAME CHARACTER VARYING(30) NOT NULL,
+ JOIN_EXPR CHARACTER VARYING(500) NOT NULL
+);
+
+--
+-- NAME: CR_TABLE_ROLE; TYPE: TABLE
+--
+create table cr_table_role (
+ TABLE_NAME CHARACTER VARYING(30) NOT NULL,
+ ROLE_ID NUMERIC(11,0) NOT NULL
+);
+
+--
+-- NAME: CR_TABLE_SOURCE; TYPE: TABLE
+--
+create table cr_table_source (
+ TABLE_NAME CHARACTER VARYING(30) NOT NULL,
+ DISPLAY_NAME CHARACTER VARYING(30) NOT NULL,
+ PK_FIELDS CHARACTER VARYING(200),
+ WEB_VIEW_ACTION CHARACTER VARYING(50),
+ LARGE_DATA_SOURCE_YN CHARACTER VARYING(1) DEFAULT 'N' NOT NULL,
+ FILTER_SQL CHARACTER VARYING(4000),
+ SOURCE_DB CHARACTER VARYING(50)
+);
+
+--
+-- NAME: FN_LU_TIMEZONE; TYPE: TABLE
+--
+create table fn_lu_timezone (
+ TIMEZONE_ID INT(11) NOT NULL,
+ TIMEZONE_NAME CHARACTER VARYING(100) NOT NULL,
+ TIMEZONE_VALUE CHARACTER VARYING(100) NOT NULL
+);
+
+create table fn_user (
+ USER_ID INT(11) NOT NULL PRIMARY KEY AUTO_INCREMENT,
+ ORG_ID INT(11),
+ MANAGER_ID INT(11),
+ FIRST_NAME CHARACTER VARYING(50),
+ MIDDLE_NAME CHARACTER VARYING(50),
+ LAST_NAME CHARACTER VARYING(50),
+ PHONE CHARACTER VARYING(25),
+ FAX CHARACTER VARYING(25),
+ CELLULAR CHARACTER VARYING(25),
+ EMAIL CHARACTER VARYING(50),
+ ADDRESS_ID NUMERIC(11,0),
+ ALERT_METHOD_CD CHARACTER VARYING(10),
+ HRID CHARACTER VARYING(20),
+ ORG_USER_ID CHARACTER VARYING(20),
+ ORG_CODE CHARACTER VARYING(30),
+ LOGIN_ID CHARACTER VARYING(25),
+ LOGIN_PWD CHARACTER VARYING(25),
+ LAST_LOGIN_DATE TIMESTAMP,
+ ACTIVE_YN CHARACTER VARYING(1) DEFAULT 'Y' NOT NULL,
+ CREATED_ID INT(11),
+ CREATED_DATE TIMESTAMP DEFAULT NOW(),
+ MODIFIED_ID INT(11),
+ MODIFIED_DATE TIMESTAMP default now(),
+ IS_INTERNAL_YN CHARACTER(1) DEFAULT 'N' NOT NULL,
+ ADDRESS_LINE_1 CHARACTER VARYING(100),
+ ADDRESS_LINE_2 CHARACTER VARYING(100),
+ CITY CHARACTER VARYING(50),
+ STATE_CD CHARACTER VARYING(3),
+ ZIP_CODE CHARACTER VARYING(11),
+ COUNTRY_CD CHARACTER VARYING(3),
+ LOCATION_CLLI CHARACTER VARYING(8),
+ ORG_MANAGER_USERID CHARACTER VARYING(20),
+ COMPANY CHARACTER VARYING(100),
+ DEPARTMENT_NAME CHARACTER VARYING(100),
+ JOB_TITLE CHARACTER VARYING(100),
+ TIMEZONE INT(11),
+ DEPARTMENT CHARACTER VARYING(25),
+ BUSINESS_UNIT CHARACTER VARYING(25),
+ BUSINESS_UNIT_NAME CHARACTER VARYING(100),
+ COST_CENTER CHARACTER VARYING(25),
+ FIN_LOC_CODE CHARACTER VARYING(10),
+ SILO_STATUS CHARACTER VARYING(10)
+);
+
+--
+-- NAME: FN_ROLE; TYPE: TABLE
+--
+create table fn_role (
+ ROLE_ID INT(11) NOT NULL PRIMARY KEY AUTO_INCREMENT,
+ ROLE_NAME CHARACTER VARYING(50) NOT NULL,
+ ACTIVE_YN CHARACTER VARYING(1) DEFAULT 'Y' NOT NULL,
+ PRIORITY NUMERIC(4,0)
+);
+
+--
+-- NAME: FN_AUDIT_ACTION; TYPE: TABLE
+--
+create table fn_audit_action (
+ AUDIT_ACTION_ID INTEGER NOT NULL,
+ CLASS_NAME CHARACTER VARYING(500) NOT NULL,
+ METHOD_NAME CHARACTER VARYING(50) NOT NULL,
+ AUDIT_ACTION_CD CHARACTER VARYING(20) NOT NULL,
+ AUDIT_ACTION_DESC CHARACTER VARYING(200),
+ ACTIVE_YN CHARACTER VARYING(1)
+);
+
+--
+-- NAME: FN_AUDIT_ACTION_LOG; TYPE: TABLE
+--
+create table fn_audit_action_log (
+ AUDIT_LOG_ID INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT,
+ AUDIT_ACTION_CD CHARACTER VARYING(200),
+ ACTION_TIME TIMESTAMP,
+ USER_ID NUMERIC(11,0),
+ CLASS_NAME CHARACTER VARYING(100),
+ METHOD_NAME CHARACTER VARYING(50),
+ SUCCESS_MSG CHARACTER VARYING(20),
+ ERROR_MSG CHARACTER VARYING(500)
+);
+
+--
+-- NAME: FN_LU_ACTIVITY; TYPE: TABLE
+--
+create table fn_lu_activity (
+ ACTIVITY_CD CHARACTER VARYING(50) NOT NULL PRIMARY KEY,
+ ACTIVITY CHARACTER VARYING(50) NOT NULL
+);
+
+--
+-- NAME: FN_AUDIT_LOG; TYPE: TABLE
+--
+create table fn_audit_log (
+ LOG_ID INT(11) NOT NULL PRIMARY KEY AUTO_INCREMENT,
+ USER_ID INT(11) NOT NULL,
+ ACTIVITY_CD CHARACTER VARYING(50) NOT NULL,
+ AUDIT_DATE TIMESTAMP DEFAULT NOW() NOT NULL,
+ COMMENTS CHARACTER VARYING(1000),
+ AFFECTED_RECORD_ID_BK CHARACTER VARYING(500),
+ AFFECTED_RECORD_ID CHARACTER VARYING(4000),
+ CONSTRAINT FK_FN_AUDIT_REF_209_FN_USER FOREIGN KEY (USER_ID) REFERENCES FN_USER(USER_ID)
+);
+
+--
+-- NAME: FN_BROADCAST_MESSAGE; TYPE: TABLE
+--
+create table fn_broadcast_message (
+ MESSAGE_ID INT(11) NOT NULL PRIMARY KEY AUTO_INCREMENT,
+ MESSAGE_TEXT CHARACTER VARYING(1000) NOT NULL,
+ MESSAGE_LOCATION_ID NUMERIC(11,0) NOT NULL,
+ BROADCAST_START_DATE TIMESTAMP NOT NULL DEFAULT NOW(),
+ BROADCAST_END_DATE TIMESTAMP NOT NULL DEFAULT NOW(),
+ ACTIVE_YN CHARACTER(1) DEFAULT 'Y' NOT NULL,
+ SORT_ORDER NUMERIC(4,0) NOT NULL,
+ BROADCAST_SITE_CD CHARACTER VARYING(50)
+);
+
+--
+-- NAME: FN_CHAT_LOGS; TYPE: TABLE
+--
+create table fn_chat_logs (
+ CHAT_LOG_ID INTEGER NOT NULL,
+ CHAT_ROOM_ID INTEGER,
+ USER_ID INTEGER,
+ MESSAGE CHARACTER VARYING(1000),
+ MESSAGE_DATE_TIME TIMESTAMP
+);
+
+--
+-- NAME: FN_CHAT_ROOM; TYPE: TABLE
+--
+create table fn_chat_room (
+ CHAT_ROOM_ID INTEGER NOT NULL,
+ NAME CHARACTER VARYING(50) NOT NULL,
+ DESCRIPTION CHARACTER VARYING(500),
+ OWNER_ID INTEGER,
+ CREATED_DATE TIMESTAMP DEFAULT NOW(),
+ UPDATED_DATE TIMESTAMP DEFAULT NOW()
+);
+
+--
+-- NAME: FN_CHAT_USERS; TYPE: TABLE
+--
+create table fn_chat_users (
+ CHAT_ROOM_ID INTEGER,
+ USER_ID INTEGER,
+ LAST_ACTIVITY_DATE_TIME TIMESTAMP,
+ CHAT_STATUS CHARACTER VARYING(20),
+ ID INTEGER NOT NULL
+);
+
+--
+-- NAME: FN_DATASOURCE; TYPE: TABLE
+--
+create table fn_datasource (
+ ID INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT,
+ NAME CHARACTER VARYING(50),
+ DRIVER_NAME CHARACTER VARYING(256),
+ SERVER CHARACTER VARYING(256),
+ PORT INTEGER,
+ USER_NAME CHARACTER VARYING(256),
+ PASSWORD CHARACTER VARYING(256),
+ URL CHARACTER VARYING(256),
+ MIN_POOL_SIZE INTEGER,
+ MAX_POOL_SIZE INTEGER,
+ ADAPTER_ID INTEGER,
+ DS_TYPE CHARACTER VARYING(20)
+);
+
+--
+-- NAME: FN_FUNCTION; TYPE: TABLE
+--
+create table fn_function (
+ FUNCTION_CD CHARACTER VARYING(30) NOT NULL PRIMARY KEY,
+ FUNCTION_NAME CHARACTER VARYING(50) NOT NULL
+);
+
+--
+-- NAME: FN_LU_ALERT_METHOD; TYPE: TABLE
+--
+create table fn_lu_alert_method (
+ ALERT_METHOD_CD CHARACTER VARYING(10) NOT NULL,
+ ALERT_METHOD CHARACTER VARYING(50) NOT NULL
+);
+
+--
+-- NAME: FN_LU_BROADCAST_SITE; TYPE: TABLE
+--
+create table fn_lu_broadcast_site (
+ BROADCAST_SITE_CD CHARACTER VARYING(50) NOT NULL,
+ BROADCAST_SITE_DESCR CHARACTER VARYING(100)
+);
+--
+-- NAME: FN_LU_MENU_SET; TYPE: TABLE
+--
+create table fn_lu_menu_set (
+ MENU_SET_CD CHARACTER VARYING(10) NOT NULL PRIMARY KEY,
+ MENU_SET_NAME CHARACTER VARYING(50) NOT NULL
+);
+
+--
+-- NAME: FN_LU_PRIORITY; TYPE: TABLE
+--
+create table fn_lu_priority (
+ PRIORITY_ID NUMERIC(11,0) NOT NULL,
+ PRIORITY CHARACTER VARYING(50) NOT NULL,
+ ACTIVE_YN CHARACTER(1) NOT NULL,
+ SORT_ORDER NUMERIC(5,0)
+);
+
+--
+-- NAME: FN_LU_ROLE_TYPE; TYPE: TABLE
+--
+create table fn_lu_role_type (
+ ROLE_TYPE_ID NUMERIC(11,0) NOT NULL,
+ ROLE_TYPE CHARACTER VARYING(50) NOT NULL
+);
+--
+-- NAME: FN_LU_TAB_SET; TYPE: TABLE
+--
+create table fn_lu_tab_set (
+ TAB_SET_CD CHARACTER VARYING(30) NOT NULL,
+ TAB_SET_NAME CHARACTER VARYING(50) NOT NULL
+);
+
+--
+-- NAME: FN_MENU; TYPE: TABLE
+--
+create table fn_menu (
+ MENU_ID INT(11) NOT NULL PRIMARY KEY AUTO_INCREMENT,
+ LABEL CHARACTER VARYING(100),
+ PARENT_ID INT(11),
+ SORT_ORDER NUMERIC(4,0),
+ ACTION CHARACTER VARYING(200),
+ FUNCTION_CD CHARACTER VARYING(30),
+ ACTIVE_YN CHARACTER VARYING(1) DEFAULT 'Y' NOT NULL,
+ SERVLET CHARACTER VARYING(50),
+ QUERY_STRING CHARACTER VARYING(200),
+ EXTERNAL_URL CHARACTER VARYING(200),
+ TARGET CHARACTER VARYING(25),
+ MENU_SET_CD CHARACTER VARYING(10) DEFAULT 'APP',
+ SEPARATOR_YN CHARACTER(1) DEFAULT 'N',
+ IMAGE_SRC CHARACTER VARYING(100),
+ CONSTRAINT FK_FN_MENU_REF_196_FN_MENU FOREIGN KEY (PARENT_ID) REFERENCES FN_MENU(MENU_ID),
+ CONSTRAINT FK_FN_MENU_MENU_SET_CD FOREIGN KEY (MENU_SET_CD) REFERENCES FN_LU_MENU_SET(MENU_SET_CD),
+ CONSTRAINT FK_FN_MENU_REF_223_FN_FUNCT FOREIGN KEY (FUNCTION_CD) REFERENCES FN_FUNCTION(FUNCTION_CD)
+);
+
+--
+-- NAME: FN_ORG; TYPE: TABLE
+--
+create table fn_org (
+ ORG_ID INT(11) NOT NULL,
+ ORG_NAME CHARACTER VARYING(50) NOT NULL,
+ ACCESS_CD CHARACTER VARYING(10)
+);
+
+--
+-- NAME: FN_RESTRICTED_URL; TYPE: TABLE
+--
+create table fn_restricted_url (
+ RESTRICTED_URL CHARACTER VARYING(250) NOT NULL,
+ FUNCTION_CD CHARACTER VARYING(30) NOT NULL
+);
+
+--
+-- NAME: FN_ROLE_COMPOSITE; TYPE: TABLE
+--
+create table fn_role_composite (
+ PARENT_ROLE_ID INT(11) NOT NULL,
+ CHILD_ROLE_ID INT(11) NOT NULL,
+ CONSTRAINT FK_FN_ROLE_COMPOSITE_CHILD FOREIGN KEY (CHILD_ROLE_ID) REFERENCES FN_ROLE(ROLE_ID),
+ CONSTRAINT FK_FN_ROLE_COMPOSITE_PARENT FOREIGN KEY (PARENT_ROLE_ID) REFERENCES FN_ROLE(ROLE_ID)
+);
+
+--
+-- NAME: FN_ROLE_FUNCTION; TYPE: TABLE
+--
+create table fn_role_function (
+ ROLE_ID INT(11) NOT NULL,
+ FUNCTION_CD CHARACTER VARYING(30) NOT NULL,
+ CONSTRAINT FK_FN_ROLE__REF_198_FN_ROLE FOREIGN KEY (ROLE_ID) REFERENCES FN_ROLE(ROLE_ID)
+);
+
+--
+-- NAME: FN_TAB; TYPE: TABLE
+--
+create table fn_tab (
+ TAB_CD CHARACTER VARYING(30) NOT NULL,
+ TAB_NAME CHARACTER VARYING(50) NOT NULL,
+ TAB_DESCR CHARACTER VARYING(100),
+ ACTION CHARACTER VARYING(100) NOT NULL,
+ FUNCTION_CD CHARACTER VARYING(30) NOT NULL,
+ ACTIVE_YN CHARACTER(1) NOT NULL,
+ SORT_ORDER NUMERIC(11,0) NOT NULL,
+ PARENT_TAB_CD CHARACTER VARYING(30),
+ TAB_SET_CD CHARACTER VARYING(30)
+);
+
+--
+-- NAME: FN_TAB_SELECTED; TYPE: TABLE
+--
+create table fn_tab_selected (
+ SELECTED_TAB_CD CHARACTER VARYING(30) NOT NULL,
+ TAB_URI CHARACTER VARYING(40) NOT NULL
+);
+
+--
+-- NAME: FN_USER_PSEUDO_ROLE; TYPE: TABLE
+--
+create table fn_user_pseudo_role (
+ PSEUDO_ROLE_ID INT(11) NOT NULL,
+ USER_ID INT(11) NOT NULL
+);
+
+--
+-- NAME: FN_USER_ROLE; TYPE: TABLE
+--
+create table fn_user_role (
+ USER_ID INT(10) NOT NULL,
+ ROLE_ID INT(10) NOT NULL,
+ PRIORITY NUMERIC(4,0),
+ APP_ID INT(11) DEFAULT 1,
+ CONSTRAINT FK_FN_USER__REF_172_FN_USER FOREIGN KEY (USER_ID) REFERENCES FN_USER(USER_ID),
+ CONSTRAINT FK_FN_USER__REF_175_FN_ROLE FOREIGN KEY (ROLE_ID) REFERENCES FN_ROLE(ROLE_ID)
+);
+--
+-- NAME: SCHEMA_INFO; TYPE: TABLE
+--
+create table schema_info (
+ SCHEMA_ID CHARACTER VARYING(25) NOT NULL,
+ SCHEMA_DESC CHARACTER VARYING(75) NOT NULL,
+ DATASOURCE_TYPE CHARACTER VARYING(100),
+ CONNECTION_URL VARCHAR(200) NOT NULL,
+ USER_NAME VARCHAR(45) NOT NULL,
+ PASSWORD VARCHAR(45) NULL DEFAULT NULL,
+ DRIVER_CLASS VARCHAR(100) NOT NULL,
+ MIN_POOL_SIZE INT NOT NULL,
+ MAX_POOL_SIZE INT NOT NULL,
+ IDLE_CONNECTION_TEST_PERIOD INT NOT NULL
+
+);
+
+-- ----------------------------------------------------------
+-- NAME: FN_APP; TYPE: TABLE
+-- ----------------------------------------------------------
+create table fn_app (
+ APP_ID int(11) PRIMARY KEY NOT NULL AUTO_INCREMENT,
+ APP_NAME varchar(100) NOT NULL DEFAULT '?',
+ APP_IMAGE_URL varchar(256) DEFAULT NULL,
+ APP_DESCRIPTION varchar(512) DEFAULT NULL,
+ APP_NOTES varchar(4096) DEFAULT NULL,
+ APP_URL varchar(256) DEFAULT NULL,
+ APP_ALTERNATE_URL varchar(256) DEFAULT NULL,
+ APP_REST_ENDPOINT varchar(2000) DEFAULT NULL,
+ ML_APP_NAME varchar(50) NOT NULL DEFAULT '?',
+ ML_APP_ADMIN_ID varchar(7) NOT NULL DEFAULT '?',
+ MOTS_ID int(11) DEFAULT NULL,
+ APP_PASSWORD varchar(256) NOT NULL DEFAULT '?',
+ OPEN char(1) DEFAULT 'N',
+ ENABLED char(1) DEFAULT 'Y',
+ THUMBNAIL mediumblob,
+ APP_USERNAME varchar(50),
+ UEB_KEY VARCHAR(256) DEFAULT NULL,
+ UEB_SECRET VARCHAR(256) DEFAULT NULL,
+ UEB_TOPIC_NAME VARCHAR(256) DEFAULT NULL
+
+);
+
+-- ----------------------------------------------------------
+-- NAME: FN_FN_WORKFLOW; TYPE: TABLE
+-- ----------------------------------------------------------
+create table fn_workflow (
+ id mediumint(9) NOT NULL AUTO_INCREMENT,
+ name varchar(20) NOT NULL,
+ description varchar(500) DEFAULT NULL,
+ run_link varchar(300) DEFAULT NULL,
+ suspend_link varchar(300) DEFAULT NULL,
+ modified_link varchar(300) DEFAULT NULL,
+ active_yn varchar(300) DEFAULT NULL,
+ created varchar(300) DEFAULT NULL,
+ created_by int(11) DEFAULT NULL,
+ modified varchar(300) DEFAULT NULL,
+ modified_by int(11) DEFAULT NULL,
+ workflow_key varchar(50) DEFAULT NULL,
+ PRIMARY KEY (id),
+ UNIQUE KEY name (name)
+);
+
+-- ----------------------------------------------------------
+-- NAME: FN_SCHEDULE_WORKFLOWS; TYPE: TABLE
+-- ----------------------------------------------------------
+create table fn_schedule_workflows (
+ id_schedule_workflows bigint(25) PRIMARY KEY NOT NULL AUTO_INCREMENT,
+ workflow_server_url varchar(45) DEFAULT NULL,
+ workflow_key varchar(45) NOT NULL,
+ workflow_arguments varchar(45) DEFAULT NULL,
+ startDateTimeCron varchar(45) DEFAULT NULL,
+ endDateTime TIMESTAMP DEFAULT NOW(),
+ start_date_time TIMESTAMP DEFAULT NOW(),
+ recurrence varchar(45) DEFAULT NULL
+ );
+
+-- For demo reporting application add : demo_bar_chart, demo_bar_chart_inter, demo_line_chart, demo_pie_chart and demo_util_chart
+-- demo_scatter_chart, demo_scatter_plot
+-- ----------------------------------------------------------
+-- NAME: DEMO_BAR_CHART; TYPE: TABLE
+-- ----------------------------------------------------------
+create table demo_bar_chart (
+ label varchar(20),
+ value numeric(25,15)
+ );
+
+-- ----------------------------------------------------------
+-- NAME: DEMO_BAR_CHART_INTER; TYPE: TABLE
+-- ----------------------------------------------------------
+create table demo_bar_chart_inter (
+ spam_date date,
+ num_rpt_sources numeric(10,0),
+ num_det_sources numeric(10,0)
+ );
+
+-- ----------------------------------------------------------
+-- NAME: DEMO_LINE_CHART; TYPE: TABLE
+-- ----------------------------------------------------------
+create table demo_line_chart (
+ series varchar(20),
+ log_date date,
+ data_value numeric(10,5)
+ );
+
+-- ----------------------------------------------------------
+-- NAME: DEMO_PIE_CHART; TYPE: TABLE
+-- ----------------------------------------------------------
+create table demo_pie_chart (
+ legend varchar(20),
+ data_value numeric(10,5)
+ );
+
+-- ----------------------------------------------------------
+-- NAME: DEMO_UTIL_CHART; TYPE: TABLE
+-- ----------------------------------------------------------
+create table demo_util_chart (
+ traffic_date date,
+ util_perc numeric(10,5)
+ );
+
+-- ----------------------------------------------------------
+-- NAME: DEMO_SCATTER_CHART; TYPE: TABLE
+-- ----------------------------------------------------------
+create table demo_scatter_chart (
+ rainfall numeric(10,2),
+ key_value varchar(20),
+ measurements numeric(10,2)
+);
+
+-- ----------------------------------------------------------
+-- NAME: DEMO_SCATTER_PLOT; TYPE: TABLE
+-- ----------------------------------------------------------
+create table demo_scatter_plot
+(
+ SERIES VARCHAR(20),
+ VALUEX numeric(25,15),
+ VALUEY numeric(25,15)
+);
+
+-- ----------------------------------------------------------
+-- NAME: FN_QZ_JOB_DETAILS; TYPE: TABLE
+-- ----------------------------------------------------------
+create table fn_qz_job_details (
+SCHED_NAME VARCHAR(120) NOT NULL,
+JOB_NAME VARCHAR(200) NOT NULL,
+JOB_GROUP VARCHAR(200) NOT NULL,
+DESCRIPTION VARCHAR(250) NULL,
+JOB_CLASS_NAME VARCHAR(250) NOT NULL,
+IS_DURABLE VARCHAR(1) NOT NULL,
+IS_NONCONCURRENT VARCHAR(1) NOT NULL,
+IS_UPDATE_DATA VARCHAR(1) NOT NULL,
+REQUESTS_RECOVERY VARCHAR(1) NOT NULL,
+JOB_DATA BLOB NULL,
+PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+-- ----------------------------------------------------------
+-- NAME: FN_QZ_TRIGGERS; TYPE: TABLE
+-- ----------------------------------------------------------
+create table fn_qz_triggers (
+SCHED_NAME VARCHAR(120) NOT NULL,
+TRIGGER_NAME VARCHAR(200) NOT NULL,
+TRIGGER_GROUP VARCHAR(200) NOT NULL,
+JOB_NAME VARCHAR(200) NOT NULL,
+JOB_GROUP VARCHAR(200) NOT NULL,
+DESCRIPTION VARCHAR(250) NULL,
+NEXT_FIRE_TIME BIGINT(13) NULL,
+PREV_FIRE_TIME BIGINT(13) NULL,
+PRIORITY INTEGER NULL,
+TRIGGER_STATE VARCHAR(16) NOT NULL,
+TRIGGER_TYPE VARCHAR(8) NOT NULL,
+START_TIME BIGINT(13) NOT NULL,
+END_TIME BIGINT(13) NULL,
+CALENDAR_NAME VARCHAR(200) NULL,
+MISFIRE_INSTR SMALLINT(2) NULL,
+JOB_DATA BLOB NULL,
+PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)
+REFERENCES FN_QZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)
+);
+
+-- ----------------------------------------------------------
+-- NAME: FN_QZ_SIMPLE_TRIGGERS; TYPE: TABLE
+-- ----------------------------------------------------------
+create table fn_qz_simple_triggers (
+SCHED_NAME VARCHAR(120) NOT NULL,
+TRIGGER_NAME VARCHAR(200) NOT NULL,
+TRIGGER_GROUP VARCHAR(200) NOT NULL,
+REPEAT_COUNT BIGINT(7) NOT NULL,
+REPEAT_INTERVAL BIGINT(12) NOT NULL,
+TIMES_TRIGGERED BIGINT(10) NOT NULL,
+PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+REFERENCES FN_QZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+-- ----------------------------------------------------------
+-- NAME: FN_QZ_CRON_TRIGGERS; TYPE: TABLE
+-- ----------------------------------------------------------
+create table fn_qz_cron_triggers (
+SCHED_NAME VARCHAR(120) NOT NULL,
+TRIGGER_NAME VARCHAR(200) NOT NULL,
+TRIGGER_GROUP VARCHAR(200) NOT NULL,
+CRON_EXPRESSION VARCHAR(120) NOT NULL,
+TIME_ZONE_ID VARCHAR(80),
+PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+REFERENCES FN_QZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+-- ----------------------------------------------------------
+-- NAME: FN_QZ_SIMPROP_TRIGGERS; TYPE: TABLE
+-- ----------------------------------------------------------
+create table fn_qz_simprop_triggers
+ (
+ SCHED_NAME VARCHAR(120) NOT NULL,
+ TRIGGER_NAME VARCHAR(200) NOT NULL,
+ TRIGGER_GROUP VARCHAR(200) NOT NULL,
+ STR_PROP_1 VARCHAR(512) NULL,
+ STR_PROP_2 VARCHAR(512) NULL,
+ STR_PROP_3 VARCHAR(512) NULL,
+ INT_PROP_1 INT NULL,
+ INT_PROP_2 INT NULL,
+ LONG_PROP_1 BIGINT NULL,
+ LONG_PROP_2 BIGINT NULL,
+ DEC_PROP_1 NUMERIC(13,4) NULL,
+ DEC_PROP_2 NUMERIC(13,4) NULL,
+ BOOL_PROP_1 VARCHAR(1) NULL,
+ BOOL_PROP_2 VARCHAR(1) NULL,
+ PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+ FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+ REFERENCES FN_QZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+-- ----------------------------------------------------------
+-- NAME: FN_QZ_BLOB_TRIGGERS; TYPE: TABLE
+-- ----------------------------------------------------------
+create table fn_qz_blob_triggers (
+SCHED_NAME VARCHAR(120) NOT NULL,
+TRIGGER_NAME VARCHAR(200) NOT NULL,
+TRIGGER_GROUP VARCHAR(200) NOT NULL,
+BLOB_DATA BLOB NULL,
+PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP),
+INDEX (SCHED_NAME,TRIGGER_NAME, TRIGGER_GROUP),
+FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+REFERENCES FN_QZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)
+);
+
+-- ----------------------------------------------------------
+-- NAME: FN_QZ_CALENDARS; TYPE: TABLE
+-- ----------------------------------------------------------
+create table fn_qz_calendars (
+SCHED_NAME VARCHAR(120) NOT NULL,
+CALENDAR_NAME VARCHAR(200) NOT NULL,
+CALENDAR BLOB NOT NULL,
+PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)
+);
+
+-- ----------------------------------------------------------
+-- NAME: FN_QZ_PAUSED_TRIGGER_GRPS; TYPE: TABLE
+-- ----------------------------------------------------------
+create table fn_qz_paused_trigger_grps (
+SCHED_NAME VARCHAR(120) NOT NULL,
+TRIGGER_GROUP VARCHAR(200) NOT NULL,
+PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)
+);
+
+-- ----------------------------------------------------------
+-- NAME: FN_QZ_FIRED_TRIGGERS; TYPE: TABLE
+-- ----------------------------------------------------------
+create table fn_qz_fired_triggers (
+SCHED_NAME VARCHAR(120) NOT NULL,
+ENTRY_ID VARCHAR(95) NOT NULL,
+TRIGGER_NAME VARCHAR(200) NOT NULL,
+TRIGGER_GROUP VARCHAR(200) NOT NULL,
+INSTANCE_NAME VARCHAR(200) NOT NULL,
+FIRED_TIME BIGINT(13) NOT NULL,
+SCHED_TIME BIGINT(13) NOT NULL,
+PRIORITY INTEGER NOT NULL,
+STATE VARCHAR(16) NOT NULL,
+JOB_NAME VARCHAR(200) NULL,
+JOB_GROUP VARCHAR(200) NULL,
+IS_NONCONCURRENT VARCHAR(1) NULL,
+REQUESTS_RECOVERY VARCHAR(1) NULL,
+PRIMARY KEY (SCHED_NAME,ENTRY_ID)
+);
+
+-- ----------------------------------------------------------
+-- NAME: FN_QZ_SCHEDULER_STATE; TYPE: TABLE
+-- ----------------------------------------------------------
+create table fn_qz_scheduler_state (
+SCHED_NAME VARCHAR(120) NOT NULL,
+INSTANCE_NAME VARCHAR(200) NOT NULL,
+LAST_CHECKIN_TIME BIGINT(13) NOT NULL,
+CHECKIN_INTERVAL BIGINT(13) NOT NULL,
+PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)
+);
+
+-- ----------------------------------------------------------
+-- NAME: FN_QZ_LOCKS; TYPE: TABLE
+-- ----------------------------------------------------------
+create table fn_qz_locks (
+SCHED_NAME VARCHAR(120) NOT NULL,
+LOCK_NAME VARCHAR(40) NOT NULL,
+PRIMARY KEY (SCHED_NAME,LOCK_NAME)
+);
+
+--
+-- name: rcloudinvocation; type: table
+--
+create table rcloudinvocation (
+ id varchar(128) not null primary key,
+ created timestamp not null,
+ userinfo varchar(2048) not null,
+ notebookid varchar(128) not null,
+ parameters varchar(2048) default null,
+ tokenreaddate timestamp null
+);
+
+--
+-- name: rcloudnotebook; type: table
+--
+create table rcloudnotebook (
+ notebookname varchar(128) not null primary key,
+ notebookid varchar(128) not null
+);
+
+--
+-- Name: fn_lu_message_location; Type: TABLE
+--
+
+CREATE TABLE fn_lu_message_location (
+ message_location_id numeric(11,0) NOT NULL,
+ message_location_descr character varying(30) NOT NULL
+);
+
+-- ------------------ CREATE VIEW SECTION
+--
+-- NAME: V_URL_ACCESS; TYPE: VIEW
+--
+CREATE VIEW v_url_access AS
+ SELECT DISTINCT M.ACTION AS URL,
+ M.FUNCTION_CD
+ FROM FN_MENU M
+ WHERE (M.ACTION IS NOT NULL)
+UNION
+ SELECT DISTINCT T.ACTION AS URL,
+ T.FUNCTION_CD
+ FROM FN_TAB T
+ WHERE (T.ACTION IS NOT NULL)
+UNION
+ SELECT R.RESTRICTED_URL AS URL,
+ R.FUNCTION_CD
+ FROM FN_RESTRICTED_URL R;
+
+-- ------------------ ALTER TABLE ADD CONSTRAINT PRIMARY KEY SECTION
+--
+-- NAME: CR_FAVORITE_REPORTS_USER_IDREP_ID; TYPE: CONSTRAINT
+--
+alter table cr_favorite_reports
+ add constraint cr_favorite_reports_user_idrep_id primary key (user_id, rep_id);
+--
+-- NAME: CR_FOLDER_FOLDER_ID; TYPE: CONSTRAINT
+--
+alter table cr_folder
+ add constraint cr_folder_folder_id primary key (folder_id);
+--
+-- NAME: CR_FOLDER_ACCESS_FOLDER_ACCESS_ID; TYPE: CONSTRAINT
+--
+alter table cr_folder_access
+ add constraint cr_folder_access_folder_access_id primary key (folder_access_id);
+--
+-- NAME: CR_HIST_USER_MAP_HIST_IDUSER_ID; TYPE: CONSTRAINT
+--
+alter table cr_hist_user_map
+ add constraint cr_hist_user_map_hist_iduser_id primary key (hist_id, user_id);
+--
+-- NAME: CR_LU_FILE_TYPE_LOOKUP_ID; TYPE: CONSTRAINT
+--
+alter table cr_lu_file_type
+ add constraint cr_lu_file_type_lookup_id primary key (lookup_id);
+--
+-- NAME: CR_RAPTOR_ACTION_IMG_IMAGE_ID; TYPE: CONSTRAINT
+--
+alter table cr_raptor_action_img
+ add constraint cr_raptor_action_img_image_id primary key (image_id);
+--
+-- NAME: CR_RAPTOR_PDF_IMG_IMAGE_ID; TYPE: CONSTRAINT
+--
+alter table cr_raptor_pdf_img
+ add constraint cr_raptor_pdf_img_image_id primary key (image_id);
+--
+-- NAME: CR_REMOTE_SCHEMA_INFO_SCHEMA_PREFIX; TYPE: CONSTRAINT
+--
+alter table cr_remote_schema_info
+ add constraint cr_remote_schema_info_schema_prefix primary key (schema_prefix);
+--
+-- NAME: CR_REPORT_REP_ID; TYPE: CONSTRAINT
+--
+alter table cr_report
+ add constraint cr_report_rep_id primary key (rep_id);
+--
+-- NAME: CR_REPORT_ACCESS_REP_IDORDER_NO; TYPE: CONSTRAINT
+--
+alter table cr_report_access
+ add constraint cr_report_access_rep_idorder_no primary key (rep_id, order_no);
+--
+-- NAME: CR_REPORT_EMAIL_SENT_LOG_LOG_ID; TYPE: CONSTRAINT
+--
+alter table cr_report_email_sent_log
+ add constraint cr_report_email_sent_log_log_id primary key (log_id);
+--
+-- NAME: CR_REPORT_FILE_HISTORY_HIST_ID; TYPE: CONSTRAINT
+--
+alter table cr_report_file_history
+ add constraint cr_report_file_history_hist_id primary key (hist_id);
+--
+-- NAME: CR_REPORT_SCHEDULE_SCHEDULE_ID; TYPE: CONSTRAINT
+--
+alter table cr_report_schedule
+ add constraint cr_report_schedule_schedule_id primary key (schedule_id);
+--
+-- NAME: CR_REPORT_SCHEDULE_USERS_SCHEDULE_IDREP_IDUSER_IDORDER_NO; TYPE: CONSTRAINT
+--
+alter table cr_report_schedule_users
+ add constraint cr_report_schedule_users_schedule_idrep_iduser_idorder_no primary key (schedule_id, rep_id, user_id, order_no);
+--
+-- NAME: CR_REPORT_TEMPLATE_MAP_REPORT_ID; TYPE: CONSTRAINT
+--
+alter table cr_report_template_map
+ add constraint cr_report_template_map_report_id primary key (report_id);
+--
+-- NAME: CR_TABLE_ROLE_TABLE_NAMEROLE_ID; TYPE: CONSTRAINT
+--
+alter table cr_table_role
+ add constraint cr_table_role_table_namerole_id primary key (table_name, role_id);
+--
+-- NAME: CR_TABLE_SOURCE_TABLE_NAME; TYPE: CONSTRAINT
+--
+alter table cr_table_source
+ add constraint cr_table_source_table_name primary key (table_name);
+--
+-- NAME: FN_AUDIT_ACTION_AUDIT_ACTION_ID; TYPE: CONSTRAINT
+--
+alter table fn_audit_action
+ add constraint fn_audit_action_audit_action_id primary key (audit_action_id);
+--
+-- NAME: FN_CHAT_LOGS_CHAT_LOG_ID; TYPE: CONSTRAINT
+--
+alter table fn_chat_logs
+ add constraint fn_chat_logs_chat_log_id primary key (chat_log_id);
+--
+-- NAME: FN_CHAT_ROOM_CHAT_ROOM_ID; TYPE: CONSTRAINT
+--
+alter table fn_chat_room
+ add constraint fn_chat_room_chat_room_id primary key (chat_room_id);
+--
+-- NAME: FN_CHAT_USERS_ID; TYPE: CONSTRAINT
+--
+alter table fn_chat_users
+ add constraint fn_chat_users_id primary key (id);
+--
+-- NAME: FN_LU_ALERT_METHOD_ALERT_METHOD_CD; TYPE: CONSTRAINT
+--
+alter table fn_lu_alert_method
+ add constraint fn_lu_alert_method_alert_method_cd primary key (alert_method_cd);
+--
+-- NAME: FN_LU_BROADCAST_SITE_BROADCAST_SITE_CD; TYPE: CONSTRAINT
+--
+alter table fn_lu_broadcast_site
+ add constraint fn_lu_broadcast_site_broadcast_site_cd primary key (broadcast_site_cd);
+--
+-- NAME: FN_LU_PRIORITY_PRIORITY_ID; TYPE: CONSTRAINT
+--
+alter table fn_lu_priority
+ add constraint fn_lu_priority_priority_id primary key (priority_id);
+--
+-- NAME: FN_LU_ROLE_TYPE_ROLE_TYPE_ID; TYPE: CONSTRAINT
+--
+alter table fn_lu_role_type
+ add constraint fn_lu_role_type_role_type_id primary key (role_type_id);
+--
+-- NAME: FN_LU_TAB_SET_TAB_SET_CD; TYPE: CONSTRAINT
+--
+alter table fn_lu_tab_set
+ add constraint fn_lu_tab_set_tab_set_cd primary key (tab_set_cd);
+--
+-- NAME: FN_LU_TIMEZONE_TIMEZONE_ID; TYPE: CONSTRAINT
+--
+alter table fn_lu_timezone
+ add constraint fn_lu_timezone_timezone_id primary key (timezone_id);
+--
+-- NAME: FN_ORG_ORG_ID; TYPE: CONSTRAINT
+--
+alter table fn_org
+ add constraint fn_org_org_id primary key (org_id);
+--
+-- NAME: FN_RESTRICTED_URL_RESTRICTED_URLFUNCTION_CD; TYPE: CONSTRAINT
+--
+alter table fn_restricted_url
+ add constraint fn_restricted_url_restricted_urlfunction_cd primary key (restricted_url, function_cd);
+--
+-- NAME: FN_ROLE_COMPOSITE_PARENT_ROLE_IDCHILD_ROLE_ID; TYPE: CONSTRAINT
+--
+alter table fn_role_composite
+ add constraint fn_role_composite_parent_role_idchild_role_id primary key (parent_role_id, child_role_id);
+--
+-- NAME: FN_ROLE_FUNCTION_ROLE_IDFUNCTION_CD; TYPE: CONSTRAINT
+--
+alter table fn_role_function
+ add constraint fn_role_function_role_idfunction_cd primary key (role_id, function_cd);
+--
+-- NAME: FN_TAB_TAB_CD; TYPE: CONSTRAINT
+--
+alter table fn_tab
+ add constraint fn_tab_tab_cd primary key (tab_cd);
+--
+-- NAME: FN_TAB_SELECTED_SELECTED_TAB_CDTAB_URI; TYPE: CONSTRAINT
+--
+alter table fn_tab_selected
+ add constraint fn_tab_selected_selected_tab_cdtab_uri primary key (selected_tab_cd, tab_uri);
+--
+-- NAME: FN_USER_PSEUDO_ROLE_PSEUDO_ROLE_IDUSER_ID; TYPE: CONSTRAINT
+--
+alter table fn_user_pseudo_role
+ add constraint fn_user_pseudo_role_pseudo_role_iduser_id primary key (pseudo_role_id, user_id);
+--
+-- NAME: FN_USER_ROLE_USER_IDROLE_ID; TYPE: CONSTRAINT
+--
+alter table fn_user_role
+ add constraint fn_user_role_user_idrole_id primary key (user_id, role_id, app_id);
+--
+-- Name: fn_lu_message_location_MESSAGE_LOCATION_ID; Type: CONSTRAINT
+--
+
+ALTER TABLE fn_lu_message_location
+ ADD CONSTRAINT fn_lu_message_location_MESSAGE_LOCATION_ID PRIMARY KEY (message_location_id);
+
+-- ------------------ CREATE INDEX SECTION
+--
+-- NAME: CR_REPORT_CREATE_IDPUBLIC_YNTITLE; TYPE: INDEX
+--
+create index cr_report_create_idpublic_yntitle using btree on cr_report (create_id, public_yn, title);
+--
+-- NAME: CR_TABLE_JOIN_DEST_TABLE_NAME; TYPE: INDEX
+--
+create index cr_table_join_dest_table_name using btree on cr_table_join (dest_table_name);
+--
+-- NAME: CR_TABLE_JOIN_SRC_TABLE_NAME; TYPE: INDEX
+--
+create index cr_table_join_src_table_name using btree on cr_table_join (src_table_name);
+--
+-- NAME: FN_AUDIT_LOG_ACTIVITY_CD; TYPE: INDEX
+--
+create index fn_audit_log_activity_cd using btree on fn_audit_log (activity_cd);
+--
+-- NAME: FN_AUDIT_LOG_USER_ID; TYPE: INDEX
+--
+create index fn_audit_log_user_id using btree on fn_audit_log (user_id);
+--
+-- NAME: FN_MENU_FUNCTION_CD; TYPE: INDEX
+--
+create index fn_menu_function_cd using btree on fn_menu (function_cd);
+--
+-- NAME: FN_ORG_ACCESS_CD; TYPE: INDEX
+--
+create index fn_org_access_cd using btree on fn_org (access_cd);
+--
+-- NAME: FN_ROLE_FUNCTION_FUNCTION_CD; TYPE: INDEX
+--
+create index fn_role_function_function_cd using btree on fn_role_function (function_cd);
+--
+-- NAME: FN_ROLE_FUNCTION_ROLE_ID; TYPE: INDEX
+--
+create index fn_role_function_role_id using btree on fn_role_function (role_id);
+--
+-- NAME: FN_USER_ADDRESS_ID; TYPE: INDEX
+--
+create index fn_user_address_id using btree on fn_user (address_id);
+--
+-- NAME: FN_USER_ALERT_METHOD_CD; TYPE: INDEX
+--
+create index fn_user_alert_method_cd using btree on fn_user (alert_method_cd);
+--
+-- NAME: FN_USER_HRID; TYPE: INDEX
+--
+create unique index fn_user_hrid using btree on fn_user (hrid);
+--
+-- NAME: FN_USER_LOGIN_ID; TYPE: INDEX
+--
+create unique index fn_user_login_id using btree on fn_user (login_id);
+--
+-- NAME: FN_USER_ORG_ID; TYPE: INDEX
+--
+create index fn_user_org_id using btree on fn_user (org_id);
+--
+-- NAME: FN_USER_ROLE_ROLE_ID; TYPE: INDEX
+--
+create index fn_user_role_role_id using btree on fn_user_role (role_id);
+--
+-- NAME: FN_USER_ROLE_USER_ID; TYPE: INDEX
+--
+create index fn_user_role_user_id using btree on fn_user_role (user_id);
+--
+-- NAME: FK_FN_USER__REF_178_FN_APP_idx; TYPE: INDEX
+--
+create index fk_fn_user__ref_178_fn_app_IDX on fn_user_role (app_id);
+
+-- ----------------------------------------------------------
+-- NAME: QUARTZ TYPE: INDEXES
+-- ----------------------------------------------------------
+create index idx_fn_qz_j_req_recovery on fn_qz_job_details(sched_name,requests_recovery);
+create index idx_fn_qz_j_grp on fn_qz_job_details(sched_name,job_group);
+create index idx_fn_qz_t_j on fn_qz_triggers(sched_name,job_name,job_group);
+create index idx_fn_qz_t_jg on fn_qz_triggers(sched_name,job_group);
+create index idx_fn_qz_t_c on fn_qz_triggers(sched_name,calendar_name);
+create index idx_fn_qz_t_g on fn_qz_triggers(sched_name,trigger_group);
+create index idx_fn_qz_t_state on fn_qz_triggers(sched_name,trigger_state);
+create index idx_fn_qz_t_n_state on fn_qz_triggers(sched_name,trigger_name,trigger_group,trigger_state);
+create index idx_fn_qz_t_n_g_state on fn_qz_triggers(sched_name,trigger_group,trigger_state);
+create index idx_fn_qz_t_next_fire_time on fn_qz_triggers(sched_name,next_fire_time);
+create index idx_fn_qz_t_nft_st on fn_qz_triggers(sched_name,trigger_state,next_fire_time);
+create index idx_fn_qz_t_nft_misfire on fn_qz_triggers(sched_name,misfire_instr,next_fire_time);
+create index idx_fn_qz_t_nft_st_misfire on fn_qz_triggers(sched_name,misfire_instr,next_fire_time,trigger_state);
+create index idx_fn_qz_t_nft_st_misfire_grp on fn_qz_triggers(sched_name,misfire_instr,next_fire_time,trigger_group,trigger_state);
+create index idx_fn_qz_ft_trig_inst_name on fn_qz_fired_triggers(sched_name,instance_name);
+create index idx_fn_qz_ft_inst_job_req_rcvry on fn_qz_fired_triggers(sched_name,instance_name,requests_recovery);
+create index idx_fn_qz_ft_j_g on fn_qz_fired_triggers(sched_name,job_name,job_group);
+create index idx_fn_qz_ft_jg on fn_qz_fired_triggers(sched_name,job_group);
+create index idx_fn_qz_ft_t_g on fn_qz_fired_triggers(sched_name,trigger_name,trigger_group);
+create index idx_fn_qz_ft_tg on fn_qz_fired_triggers(sched_name,trigger_group);
+
+-- ------------------ ALTER TABLE ADD CONSTRAINT FOREIGN KEY SECTION
+--
+-- NAME: FK_FN_AUDIT_REF_205_FN_LU_AC; TYPE: CONSTRAINT
+--
+alter table fn_audit_log
+ add constraint fk_fn_audit_ref_205_fn_lu_ac foreign key (activity_cd) references fn_lu_activity(activity_cd);
+--
+-- NAME: FK_FN_ROLE__REF_201_FN_FUNCT; TYPE: CONSTRAINT
+--
+alter table fn_role_function
+ add constraint fk_fn_role__ref_201_fn_funct foreign key (function_cd) references fn_function(function_cd);
+--
+-- NAME: FK_FN_USER__REF_178_FN_APP; TYPE: FK CONSTRAINT
+--
+alter table fn_user_role
+ add constraint fk_fn_user__ref_178_fn_app foreign key (app_id) references fn_app(app_id);
+--
+-- NAME: FK_CR_REPOR_REF_14707_CR_REPOR; TYPE: FK CONSTRAINT
+--
+alter table cr_report_schedule
+ add constraint fk_cr_repor_ref_14707_cr_repor foreign key (rep_id) references cr_report(rep_id);
+--
+-- NAME: FK_CR_REPOR_REF_14716_CR_REPOR; TYPE: FK CONSTRAINT
+--
+alter table cr_report_schedule_users
+ add constraint fk_cr_repor_ref_14716_cr_repor foreign key (schedule_id) references cr_report_schedule(schedule_id);
+--
+-- NAME: FK_CR_REPOR_REF_17645_CR_REPOR; TYPE: FK CONSTRAINT
+--
+alter table cr_report_log
+ add constraint fk_cr_repor_ref_17645_cr_repor foreign key (rep_id) references cr_report(rep_id);
+--
+-- NAME: FK_CR_REPOR_REF_8550_CR_REPOR; TYPE: FK CONSTRAINT
+--
+alter table cr_report_access
+ add constraint fk_cr_repor_ref_8550_cr_repor foreign key (rep_id) references cr_report(rep_id);
+--
+-- NAME: FK_CR_REPORT_REP_ID; TYPE: FK CONSTRAINT
+--
+alter table cr_report_email_sent_log
+ add constraint fk_cr_report_rep_id foreign key (rep_id) references cr_report(rep_id);
+--
+-- NAME: FK_CR_TABLE_REF_311_CR_TAB; TYPE: FK CONSTRAINT
+--
+alter table cr_table_join
+ add constraint fk_cr_table_ref_311_cr_tab foreign key (src_table_name) references cr_table_source(table_name);
+--
+-- NAME: FK_CR_TABLE_REF_315_CR_TAB; TYPE: FK CONSTRAINT
+--
+alter table cr_table_join
+ add constraint fk_cr_table_ref_315_cr_tab foreign key (dest_table_name) references cr_table_source(table_name);
+--
+-- NAME: FK_CR_TABLE_REF_32384_CR_TABLE; TYPE: FK CONSTRAINT
+--
+alter table cr_table_role
+ add constraint fk_cr_table_ref_32384_cr_table foreign key (table_name) references cr_table_source(table_name);
+--
+-- NAME: FK_FN_TAB_FUNCTION_CD; TYPE: FK CONSTRAINT
+--
+alter table fn_tab
+ add constraint fk_fn_tab_function_cd foreign key (function_cd) references fn_function(function_cd);
+--
+-- NAME: FK_FN_TAB_SELECTED_TAB_CD; TYPE: FK CONSTRAINT
+--
+alter table fn_tab_selected
+ add constraint fk_fn_tab_selected_tab_cd foreign key (selected_tab_cd) references fn_tab(tab_cd);
+--
+-- NAME: FK_FN_TAB_SET_CD; TYPE: FK CONSTRAINT
+--
+alter table fn_tab
+ add constraint fk_fn_tab_set_cd foreign key (tab_set_cd) references fn_lu_tab_set(tab_set_cd);
+--
+-- NAME: FK_FN_USER_REF_110_FN_ORG; TYPE: FK CONSTRAINT
+--
+alter table fn_user
+ add constraint fk_fn_user_ref_110_fn_org foreign key (org_id) references fn_org(org_id);
+--
+-- NAME: FK_FN_USER_REF_123_FN_LU_AL; TYPE: FK CONSTRAINT
+--
+alter table fn_user
+ add constraint fk_fn_user_ref_123_fn_lu_al foreign key (alert_method_cd) references fn_lu_alert_method(alert_method_cd);
+--
+-- NAME: FK_FN_USER_REF_197_FN_USER; TYPE: FK CONSTRAINT
+--
+alter table fn_user
+ add constraint fk_fn_user_ref_197_fn_user foreign key (manager_id) references fn_user(user_id);
+--
+-- NAME: FK_FN_USER_REF_198_FN_USER; TYPE: FK CONSTRAINT
+--
+alter table fn_user
+ add constraint fk_fn_user_ref_198_fn_user foreign key (created_id) references fn_user(user_id);
+--
+-- NAME: FK_FN_USER_REF_199_FN_USER; TYPE: FK CONSTRAINT
+--
+alter table fn_user
+ add constraint fk_fn_user_ref_199_fn_user foreign key (modified_id) references fn_user(user_id);
+--
+-- NAME: FK_PARENT_KEY_CR_FOLDER; TYPE: FK CONSTRAINT
+--
+alter table cr_folder
+ add constraint fk_parent_key_cr_folder foreign key (parent_folder_id) references cr_folder(folder_id);
+--
+-- NAME: FK_PSEUDO_ROLE_PSEUDO_ROLE_ID; TYPE: FK CONSTRAINT
+--
+alter table fn_user_pseudo_role
+ add constraint fk_pseudo_role_pseudo_role_id foreign key (pseudo_role_id) references fn_role(role_id);
+--
+-- NAME: FK_PSEUDO_ROLE_USER_ID; TYPE: FK CONSTRAINT
+--
+alter table fn_user_pseudo_role
+ add constraint fk_pseudo_role_user_id foreign key (user_id) references fn_user(user_id);
+--
+-- NAME: FK_RESTRICTED_URL_FUNCTION_CD; TYPE: FK CONSTRAINT
+--
+alter table fn_restricted_url
+ add constraint fk_restricted_url_function_cd foreign key (function_cd) references fn_function(function_cd);
+--
+-- NAME: FK_TIMEZONE; TYPE: FK CONSTRAINT
+--
+alter table fn_user
+ add constraint fk_timezone foreign key (timezone) references fn_lu_timezone(timezone_id);
+--
+-- NAME: SYS_C0014614; TYPE: FK CONSTRAINT
+--
+alter table cr_report_file_history
+ add constraint sys_c0014614 foreign key (file_type_id) references cr_lu_file_type(lookup_id);
+--
+-- NAME: SYS_C0014615; TYPE: FK CONSTRAINT
+--
+alter table cr_report_file_history
+ add constraint sys_c0014615 foreign key (rep_id) references cr_report(rep_id);
+--
+-- NAME: SYS_C0014616; TYPE: FK CONSTRAINT
+--
+alter table cr_hist_user_map
+ add constraint sys_c0014616 foreign key (hist_id) references cr_report_file_history(hist_id);
+--
+-- NAME: SYS_C0014617; TYPE: FK CONSTRAINT
+--
+alter table cr_hist_user_map
+ add constraint sys_c0014617 foreign key (user_id) references fn_user(user_id);
+
+commit;
diff --git a/ecomp-sdk/epsdk-app-common/db-scripts/EcompSdkDMLMySql_1707_Common.sql b/ecomp-sdk/epsdk-app-common/db-scripts/EcompSdkDMLMySql_1707_Common.sql
new file mode 100644
index 0000000..5a01537
--- /dev/null
+++ b/ecomp-sdk/epsdk-app-common/db-scripts/EcompSdkDMLMySql_1707_Common.sql
@@ -0,0 +1,2837 @@
+-- ---------------------------------------------------------------------------------------------------------------
+-- This script populates tables in the 1707 COMMON version of the ECOMP SDK application database.
+-- Additional DML scripts may be required!
+-- ---------------------------------------------------------------------------------------------------------------
+
+SET FOREIGN_KEY_CHECKS=1;
+
+USE ecomp_sdk;
+
+-- fn_function
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_process','Process List');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_job','Job Menu');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_job_create','Job Create');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_job_designer','Process in Designer view');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_task','Task Menu');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_task_search','Task Search');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_map','Map Menu');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_sample','Sample Pages Menu');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('login','Login');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_home','Home Menu');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_customer','Customer Menu');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_reports','Reports Menu');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_profile','Profile Menu');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_admin','Admin Menu');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_feedback','Feedback Menu');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_help','Help Menu');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_logout','Logout Menu');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_notes','Notes Menu');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_ajax','Ajax Menu');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_customer_create','Customer Create');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_profile_create','Profile Create');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_profile_import','Profile Import');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('menu_tab','Sample Tab Menu');
+Insert into fn_function (FUNCTION_CD,FUNCTION_NAME) values ('view_reports','View Raptor reports');
+
+-- fn_lu_activity
+Insert into fn_lu_activity (ACTIVITY_CD,ACTIVITY) values ('add_role','add_role');
+Insert into fn_lu_activity (ACTIVITY_CD,ACTIVITY) values ('remove_role','remove_role');
+Insert into fn_lu_activity (ACTIVITY_CD,ACTIVITY) values ('add_user_role','add_user_role');
+Insert into fn_lu_activity (ACTIVITY_CD,ACTIVITY) values ('remove_user_role','remove_user_role');
+Insert into fn_lu_activity (ACTIVITY_CD,ACTIVITY) values ('add_role_function','add_role_function');
+Insert into fn_lu_activity (ACTIVITY_CD,ACTIVITY) values ('remove_role_function','remove_role_function');
+Insert into fn_lu_activity (ACTIVITY_CD,ACTIVITY) values ('add_child_role','add_child_role');
+Insert into fn_lu_activity (ACTIVITY_CD,ACTIVITY) values ('remove_child_role','remove_child_role');
+Insert into fn_lu_activity (ACTIVITY_CD,ACTIVITY) values ('mobile_login','Mobile Login');
+Insert into fn_lu_activity (ACTIVITY_CD,ACTIVITY) values ('mobile_logout','Mobile Logout');
+Insert into fn_lu_activity (ACTIVITY_CD,ACTIVITY) values ('login','Login');
+Insert into fn_lu_activity (ACTIVITY_CD,ACTIVITY) values ('logout','Logout');
+
+-- fn_lu_alert_method
+Insert into fn_lu_alert_method (ALERT_METHOD_CD,ALERT_METHOD) values ('PHONE','Phone');
+Insert into fn_lu_alert_method (ALERT_METHOD_CD,ALERT_METHOD) values ('FAX','Fax');
+Insert into fn_lu_alert_method (ALERT_METHOD_CD,ALERT_METHOD) values ('PAGER','Pager');
+Insert into fn_lu_alert_method (ALERT_METHOD_CD,ALERT_METHOD) values ('EMAIL','Email');
+Insert into fn_lu_alert_method (ALERT_METHOD_CD,ALERT_METHOD) values ('SMS','SMS');
+
+-- fn_lu_menu_set
+Insert into fn_lu_menu_set (MENU_SET_CD,MENU_SET_NAME) values ('APP','Application Menu');
+
+-- fn_lu_priority
+Insert into fn_lu_priority (PRIORITY_ID,PRIORITY,ACTIVE_YN,SORT_ORDER) values (10,'Low','Y',10);
+Insert into fn_lu_priority (PRIORITY_ID,PRIORITY,ACTIVE_YN,SORT_ORDER) values (20,'Normal','Y',20);
+Insert into fn_lu_priority (PRIORITY_ID,PRIORITY,ACTIVE_YN,SORT_ORDER) values (30,'High','Y',30);
+Insert into fn_lu_priority (PRIORITY_ID,PRIORITY,ACTIVE_YN,SORT_ORDER) values (40,'Urgent','Y',40);
+Insert into fn_lu_priority (PRIORITY_ID,PRIORITY,ACTIVE_YN,SORT_ORDER) values (50,'Fatal','Y',50);
+
+-- fn_lu_tab_set
+Insert into fn_lu_tab_set (TAB_SET_CD,TAB_SET_NAME) values ('APP','Application Tabs');
+
+-- fn_lu_timezone
+Insert into fn_lu_timezone (TIMEZONE_ID,TIMEZONE_NAME,TIMEZONE_VALUE) values (10,'US/Eastern','US/Eastern');
+Insert into fn_lu_timezone (TIMEZONE_ID,TIMEZONE_NAME,TIMEZONE_VALUE) values (20,'US/Central','US/Central');
+Insert into fn_lu_timezone (TIMEZONE_ID,TIMEZONE_NAME,TIMEZONE_VALUE) values (30,'US/Mountain','US/Mountain');
+Insert into fn_lu_timezone (TIMEZONE_ID,TIMEZONE_NAME,TIMEZONE_VALUE) values (40,'US/Arizona','America/Phoenix');
+Insert into fn_lu_timezone (TIMEZONE_ID,TIMEZONE_NAME,TIMEZONE_VALUE) values (50,'US/Pacific','US/Pacific');
+Insert into fn_lu_timezone (TIMEZONE_ID,TIMEZONE_NAME,TIMEZONE_VALUE) values (60,'US/Alaska','US/Alaska');
+Insert into fn_lu_timezone (TIMEZONE_ID,TIMEZONE_NAME,TIMEZONE_VALUE) values (70,'US/Hawaii','US/Hawaii');
+
+-- fn_restricted_url
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('attachment.htm','menu_admin');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('broadcast.htm','menu_admin');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('file_upload.htm','menu_admin');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('job.htm','menu_admin');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('role.htm','menu_admin');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('role_function.htm','menu_admin');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('test.htm','menu_admin');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('async_test.htm','menu_home');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('chatWindow.htm','menu_home');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('contact_list.htm','menu_home');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('customer_dynamic_list.htm','menu_home');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('event.htm','menu_home');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('event_list.htm','menu_home');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('mobile_welcome.htm','menu_home');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('sample_map.htm','menu_home');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('template.jsp','menu_home');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('jbpm_designer.htm','menu_job_create');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('jbpm_drools.htm','menu_job_create');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('process_job.htm','menu_job_create');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('profile.htm','menu_profile_create');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('raptor.htm','menu_reports');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('raptor2.htm','menu_reports');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('raptor_blob_extract.htm','menu_reports');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('raptor_email_attachment.htm','menu_reports');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('raptor_search.htm','menu_reports');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('report_list.htm','menu_reports');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('gauge.htm','menu_tab');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('gmap_controller.htm','menu_tab');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('gmap_frame.htm','menu_tab');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('map.htm','menu_tab');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('map_download.htm','menu_tab');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('map_grid_search.htm','menu_tab');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('sample_animated_map.htm','menu_tab');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('sample_map_2.htm','menu_tab');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('sample_map_3.htm','menu_tab');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('tab2_sub1.htm','menu_tab');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('tab2_sub2_link1.htm','menu_tab');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('tab2_sub2_link2.htm','menu_tab');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('tab2_sub3.htm','menu_tab');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('tab3.htm','menu_tab');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('tab4.htm','menu_tab');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('raptor.htm','view_reports');
+INSERT INTO fn_restricted_url (restricted_url, function_cd) VALUES ('raptor_blob_extract.htm','view_reports');
+
+-- fn_role
+Insert into fn_role (ROLE_ID,ROLE_NAME,ACTIVE_YN,PRIORITY) values (16,'Standard User','Y',5);
+Insert into fn_role (ROLE_ID,ROLE_NAME,ACTIVE_YN,PRIORITY) values (1,'System Administrator','Y',1);
+
+-- fn_role_composite
+Insert into fn_role_composite (PARENT_ROLE_ID,CHILD_ROLE_ID) values (1,16);
+
+-- fn_role_function
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'login');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'menu_admin');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'menu_ajax');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'menu_customer');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'menu_customer_create');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'menu_feedback');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'menu_help');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'menu_home');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'menu_job');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'menu_job_create');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'menu_logout');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'menu_notes');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'menu_process');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'menu_profile');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'menu_profile_create');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'menu_profile_import');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'menu_reports');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'menu_sample');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (1,'menu_tab');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (16,'login');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (16,'menu_ajax');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (16,'menu_customer');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (16,'menu_customer_create');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (16,'menu_home');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (16,'menu_logout');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (16,'menu_map');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (16,'menu_profile');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (16,'menu_reports');
+Insert into fn_role_function (ROLE_ID,FUNCTION_CD) values (16,'menu_tab');
+
+-- fn_tab
+Insert into fn_tab (TAB_CD,TAB_NAME,TAB_DESCR,ACTION,FUNCTION_CD,ACTIVE_YN,SORT_ORDER,PARENT_TAB_CD,TAB_SET_CD) values ('TAB2_SUB1_S1','Left Tab 1','Sub - Sub Tab 1 Information','tab2_sub1.htm','menu_tab','Y',10,'TAB2_SUB1','APP');
+Insert into fn_tab (TAB_CD,TAB_NAME,TAB_DESCR,ACTION,FUNCTION_CD,ACTIVE_YN,SORT_ORDER,PARENT_TAB_CD,TAB_SET_CD) values ('TAB1','Tab 1','Tab 1 Information','tab1.htm','menu_tab','Y',10,null,'APP');
+Insert into fn_tab (TAB_CD,TAB_NAME,TAB_DESCR,ACTION,FUNCTION_CD,ACTIVE_YN,SORT_ORDER,PARENT_TAB_CD,TAB_SET_CD) values ('TAB2','Tab 2','Tab 2 Information','tab2_sub1.htm','menu_tab','Y',20,null,'APP');
+Insert into fn_tab (TAB_CD,TAB_NAME,TAB_DESCR,ACTION,FUNCTION_CD,ACTIVE_YN,SORT_ORDER,PARENT_TAB_CD,TAB_SET_CD) values ('TAB3','Tab 3','Tab 3 Information','tab3.htm','menu_tab','Y',30,null,'APP');
+Insert into fn_tab (TAB_CD,TAB_NAME,TAB_DESCR,ACTION,FUNCTION_CD,ACTIVE_YN,SORT_ORDER,PARENT_TAB_CD,TAB_SET_CD) values ('TAB4','Tab 4','Tab 4 Information','tab4.htm','menu_tab','Y',40,null,'APP');
+Insert into fn_tab (TAB_CD,TAB_NAME,TAB_DESCR,ACTION,FUNCTION_CD,ACTIVE_YN,SORT_ORDER,PARENT_TAB_CD,TAB_SET_CD) values ('TAB2_SUB1','Sub Tab 1','Sub Tab 1 Information','tab2_sub1.htm','menu_tab','Y',10,'TAB2','APP');
+Insert into fn_tab (TAB_CD,TAB_NAME,TAB_DESCR,ACTION,FUNCTION_CD,ACTIVE_YN,SORT_ORDER,PARENT_TAB_CD,TAB_SET_CD) values ('TAB2_SUB2','Sub Tab 2','Sub Tab 2 Information','tab2_sub2.htm','menu_tab','Y',20,'TAB2','APP');
+Insert into fn_tab (TAB_CD,TAB_NAME,TAB_DESCR,ACTION,FUNCTION_CD,ACTIVE_YN,SORT_ORDER,PARENT_TAB_CD,TAB_SET_CD) values ('TAB2_SUB3','Sub Tab 3','Sub Tab 3 Information','tab2_sub3.htm','menu_tab','Y',30,'TAB2','APP');
+
+-- fn_tab_selected
+Insert into fn_tab_selected (SELECTED_TAB_CD,TAB_URI) values ('TAB1','tab1');
+Insert into fn_tab_selected (SELECTED_TAB_CD,TAB_URI) values ('TAB2','tab2_sub1');
+Insert into fn_tab_selected (SELECTED_TAB_CD,TAB_URI) values ('TAB2','tab2_sub2');
+Insert into fn_tab_selected (SELECTED_TAB_CD,TAB_URI) values ('TAB2','tab2_sub3');
+Insert into fn_tab_selected (SELECTED_TAB_CD,TAB_URI) values ('TAB2_SUB1','tab2_sub1');
+Insert into fn_tab_selected (SELECTED_TAB_CD,TAB_URI) values ('TAB2_SUB1_S1','tab2_sub1');
+Insert into fn_tab_selected (SELECTED_TAB_CD,TAB_URI) values ('TAB2_SUB2','tab2_sub2');
+Insert into fn_tab_selected (SELECTED_TAB_CD,TAB_URI) values ('TAB2_SUB3','tab2_sub3');
+Insert into fn_tab_selected (SELECTED_TAB_CD,TAB_URI) values ('TAB3','tab3');
+Insert into fn_tab_selected (SELECTED_TAB_CD,TAB_URI) values ('TAB4','tab4');
+
+-- DEMO_BAR_CHART
+Insert into demo_bar_chart (label, value) values ('A', 29.765957771107);
+Insert into demo_bar_chart (label, value) values ('B', 0);
+Insert into demo_bar_chart (label, value) values ('C', 32.807804682612);
+Insert into demo_bar_chart (label, value) values ('D', 196.45946739256);
+Insert into demo_bar_chart (label, value) values ('E', 0.19434030906893);
+Insert into demo_bar_chart (label, value) values ('F', 98.079782601442);
+Insert into demo_bar_chart (label, value) values ('G', 13.925743130903);
+Insert into demo_bar_chart (label, value) values ('H', 5.1387322875705);
+
+-- DEMO_BAR_CHART_INTER
+Insert into demo_bar_chart_inter (spam_date, num_rpt_sources, num_det_sources) values (STR_TO_DATE('6-Mar-13','%e-%b-%y'), 198, 220);
+Insert into demo_bar_chart_inter (spam_date, num_rpt_sources, num_det_sources) values (STR_TO_DATE('5-Mar-13','%e-%b-%y'), 198, 220);
+Insert into demo_bar_chart_inter (spam_date, num_rpt_sources, num_det_sources) values (STR_TO_DATE('4-Mar-13','%e-%b-%y'), 238, 235);
+Insert into demo_bar_chart_inter (spam_date, num_rpt_sources, num_det_sources) values (STR_TO_DATE('3-Mar-13','%e-%b-%y'), 238, 235);
+Insert into demo_bar_chart_inter (spam_date, num_rpt_sources, num_det_sources) values (STR_TO_DATE('2-Mar-13','%e-%b-%y'), 256, 275);
+Insert into demo_bar_chart_inter (spam_date, num_rpt_sources, num_det_sources) values (STR_TO_DATE('1-Mar-13','%e-%b-%y'), 239, 260);
+Insert into demo_bar_chart_inter (spam_date, num_rpt_sources, num_det_sources) values (STR_TO_DATE('28-Feb-13','%e-%b-%y'), 247, 255);
+Insert into demo_bar_chart_inter (spam_date, num_rpt_sources, num_det_sources) values (STR_TO_DATE('27-Feb-13','%e-%b-%y'), 252, 265);
+Insert into demo_bar_chart_inter (spam_date, num_rpt_sources, num_det_sources) values (STR_TO_DATE('26-Feb-13','%e-%b-%y'), 198, 220);
+
+-- DEMO_LINE_CHART
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('1-May-12','%e-%b-%y'),582.13);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('30-Apr-12','%e-%b-%y'),583.98);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('27-Apr-12','%e-%b-%y'),603);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('26-Apr-12','%e-%b-%y'),607.7);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('25-Apr-12','%e-%b-%y'),610);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('24-Apr-12','%e-%b-%y'),560.28);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('23-Apr-12','%e-%b-%y'),571.7);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('20-Apr-12','%e-%b-%y'),572.98);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('19-Apr-12','%e-%b-%y'),587.44);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('18-Apr-12','%e-%b-%y'),608.34);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('17-Apr-12','%e-%b-%y'),609.7);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('16-Apr-12','%e-%b-%y'),580.13);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('13-Apr-12','%e-%b-%y'),605.23);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('12-Apr-12','%e-%b-%y'),622.77);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('11-Apr-12','%e-%b-%y'),626.2);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('10-Apr-12','%e-%b-%y'),628.44);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('9-Apr-12','%e-%b-%y'),636.23);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('5-Apr-12','%e-%b-%y'),633.68);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('4-Apr-12','%e-%b-%y'),624.31);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('3-Apr-12','%e-%b-%y'),629.32);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('2-Apr-12','%e-%b-%y'),618.63);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('30-Mar-12','%e-%b-%y'),599.55);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('29-Mar-12','%e-%b-%y'),609.86);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('28-Mar-12','%e-%b-%y'),617.62);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('27-Mar-12','%e-%b-%y'),614.48);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('26-Mar-12','%e-%b-%y'),606.98);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('23-Mar-12','%e-%b-%y'),596.05);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('22-Mar-12','%e-%b-%y'),599.34);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('21-Mar-12','%e-%b-%y'),602.5);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('20-Mar-12','%e-%b-%y'),605.96);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('19-Mar-12','%e-%b-%y'),601.1);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('16-Mar-12','%e-%b-%y'),585.57);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('15-Mar-12','%e-%b-%y'),585.56);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('14-Mar-12','%e-%b-%y'),589.58);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('13-Mar-12','%e-%b-%y'),568.1);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('12-Mar-12','%e-%b-%y'),552);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('9-Mar-12','%e-%b-%y'),545.17);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('8-Mar-12','%e-%b-%y'),541.99);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('7-Mar-12','%e-%b-%y'),530.69);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('6-Mar-12','%e-%b-%y'),530.26);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('5-Mar-12','%e-%b-%y'),533.16);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('2-Mar-12','%e-%b-%y'),545.18);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('1-Mar-12','%e-%b-%y'),544.47);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('29-Feb-12','%e-%b-%y'),542.44);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('28-Feb-12','%e-%b-%y'),535.41);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('27-Feb-12','%e-%b-%y'),525.76);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('24-Feb-12','%e-%b-%y'),522.41);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('23-Feb-12','%e-%b-%y'),516.39);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('22-Feb-12','%e-%b-%y'),513.04);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('21-Feb-12','%e-%b-%y'),514.85);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('17-Feb-12','%e-%b-%y'),502.12);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('16-Feb-12','%e-%b-%y'),502.21);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('15-Feb-12','%e-%b-%y'),497.67);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('14-Feb-12','%e-%b-%y'),509.46);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('13-Feb-12','%e-%b-%y'),502.6);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('10-Feb-12','%e-%b-%y'),493.42);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('9-Feb-12','%e-%b-%y'),493.17);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('8-Feb-12','%e-%b-%y'),476.68);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('7-Feb-12','%e-%b-%y'),468.83);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('6-Feb-12','%e-%b-%y'),463.97);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('3-Feb-12','%e-%b-%y'),459.68);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('2-Feb-12','%e-%b-%y'),455.12);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('1-Feb-12','%e-%b-%y'),456.19);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('31-Jan-12','%e-%b-%y'),456.48);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('30-Jan-12','%e-%b-%y'),453.01);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('27-Jan-12','%e-%b-%y'),447.28);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('26-Jan-12','%e-%b-%y'),444.63);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('25-Jan-12','%e-%b-%y'),446.66);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('24-Jan-12','%e-%b-%y'),420.41);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('23-Jan-12','%e-%b-%y'),427.41);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('20-Jan-12','%e-%b-%y'),420.3);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('19-Jan-12','%e-%b-%y'),427.75);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('18-Jan-12','%e-%b-%y'),429.11);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('17-Jan-12','%e-%b-%y'),424.7);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('13-Jan-12','%e-%b-%y'),419.81);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('12-Jan-12','%e-%b-%y'),421.39);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('11-Jan-12','%e-%b-%y'),422.55);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('10-Jan-12','%e-%b-%y'),423.24);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('9-Jan-12','%e-%b-%y'),421.73);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('6-Jan-12','%e-%b-%y'),422.4);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('5-Jan-12','%e-%b-%y'),418.03);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('4-Jan-12','%e-%b-%y'),413.44);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('3-Jan-12','%e-%b-%y'),411.23);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('30-Dec-11','%e-%b-%y'),405);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('29-Dec-11','%e-%b-%y'),405.12);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('28-Dec-11','%e-%b-%y'),402.64);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('27-Dec-11','%e-%b-%y'),406.53);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('23-Dec-11','%e-%b-%y'),403.43);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('22-Dec-11','%e-%b-%y'),398.55);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('21-Dec-11','%e-%b-%y'),396.44);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('20-Dec-11','%e-%b-%y'),395.95);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('19-Dec-11','%e-%b-%y'),382.21);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('16-Dec-11','%e-%b-%y'),381.02);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('15-Dec-11','%e-%b-%y'),378.94);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('14-Dec-11','%e-%b-%y'),380.19);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('13-Dec-11','%e-%b-%y'),388.81);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('12-Dec-11','%e-%b-%y'),391.84);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('9-Dec-11','%e-%b-%y'),393.62);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('8-Dec-11','%e-%b-%y'),390.66);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('7-Dec-11','%e-%b-%y'),389.09);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('6-Dec-11','%e-%b-%y'),390.95);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('5-Dec-11','%e-%b-%y'),393.01);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('2-Dec-11','%e-%b-%y'),389.7);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('1-Dec-11','%e-%b-%y'),387.93);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('30-Nov-11','%e-%b-%y'),382.2);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('29-Nov-11','%e-%b-%y'),373.2);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('28-Nov-11','%e-%b-%y'),376.12);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('25-Nov-11','%e-%b-%y'),363.57);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('23-Nov-11','%e-%b-%y'),366.99);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('22-Nov-11','%e-%b-%y'),376.51);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('21-Nov-11','%e-%b-%y'),369.01);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('18-Nov-11','%e-%b-%y'),374.94);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('17-Nov-11','%e-%b-%y'),377.41);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('16-Nov-11','%e-%b-%y'),384.77);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('15-Nov-11','%e-%b-%y'),388.83);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('14-Nov-11','%e-%b-%y'),379.26);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('11-Nov-11','%e-%b-%y'),384.62);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('10-Nov-11','%e-%b-%y'),385.22);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('9-Nov-11','%e-%b-%y'),395.28);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('8-Nov-11','%e-%b-%y'),406.23);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('7-Nov-11','%e-%b-%y'),399.73);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('4-Nov-11','%e-%b-%y'),400.24);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('3-Nov-11','%e-%b-%y'),403.07);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('2-Nov-11','%e-%b-%y'),397.41);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('1-Nov-11','%e-%b-%y'),396.51);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('31-Oct-11','%e-%b-%y'),404.78);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('28-Oct-11','%e-%b-%y'),404.95);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('27-Oct-11','%e-%b-%y'),404.69);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('26-Oct-11','%e-%b-%y'),400.6);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('25-Oct-11','%e-%b-%y'),397.77);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('24-Oct-11','%e-%b-%y'),405.77);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('21-Oct-11','%e-%b-%y'),392.87);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('20-Oct-11','%e-%b-%y'),395.31);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('19-Oct-11','%e-%b-%y'),398.62);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('18-Oct-11','%e-%b-%y'),422.24);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('17-Oct-11','%e-%b-%y'),419.99);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('14-Oct-11','%e-%b-%y'),422);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('13-Oct-11','%e-%b-%y'),408.43);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('12-Oct-11','%e-%b-%y'),402.19);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('11-Oct-11','%e-%b-%y'),400.29);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('10-Oct-11','%e-%b-%y'),388.81);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('7-Oct-11','%e-%b-%y'),369.8);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('6-Oct-11','%e-%b-%y'),377.37);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('5-Oct-11','%e-%b-%y'),378.25);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('4-Oct-11','%e-%b-%y'),372.5);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('3-Oct-11','%e-%b-%y'),374.6);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('30-Sep-11','%e-%b-%y'),381.32);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('29-Sep-11','%e-%b-%y'),390.57);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('28-Sep-11','%e-%b-%y'),397.01);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('27-Sep-11','%e-%b-%y'),399.26);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('26-Sep-11','%e-%b-%y'),403.17);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('23-Sep-11','%e-%b-%y'),404.3);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('22-Sep-11','%e-%b-%y'),401.82);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('21-Sep-11','%e-%b-%y'),412.14);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('20-Sep-11','%e-%b-%y'),413.45);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('19-Sep-11','%e-%b-%y'),411.63);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('16-Sep-11','%e-%b-%y'),400.5);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('15-Sep-11','%e-%b-%y'),392.96);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('14-Sep-11','%e-%b-%y'),389.3);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('13-Sep-11','%e-%b-%y'),384.62);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('12-Sep-11','%e-%b-%y'),379.94);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('9-Sep-11','%e-%b-%y'),377.48);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('8-Sep-11','%e-%b-%y'),384.14);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('7-Sep-11','%e-%b-%y'),383.93);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('6-Sep-11','%e-%b-%y'),379.74);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('2-Sep-11','%e-%b-%y'),374.05);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('1-Sep-11','%e-%b-%y'),381.03);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('31-Aug-11','%e-%b-%y'),384.83);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('30-Aug-11','%e-%b-%y'),389.99);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('29-Aug-11','%e-%b-%y'),389.97);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('26-Aug-11','%e-%b-%y'),383.58);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('25-Aug-11','%e-%b-%y'),373.72);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('24-Aug-11','%e-%b-%y'),376.18);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('23-Aug-11','%e-%b-%y'),373.6);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('22-Aug-11','%e-%b-%y'),356.44);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('19-Aug-11','%e-%b-%y'),356.03);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('18-Aug-11','%e-%b-%y'),366.05);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('17-Aug-11','%e-%b-%y'),380.44);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('16-Aug-11','%e-%b-%y'),380.48);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('15-Aug-11','%e-%b-%y'),383.41);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('12-Aug-11','%e-%b-%y'),376.99);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('11-Aug-11','%e-%b-%y'),373.7);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('10-Aug-11','%e-%b-%y'),363.69);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('9-Aug-11','%e-%b-%y'),374.01);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('8-Aug-11','%e-%b-%y'),353.21);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('5-Aug-11','%e-%b-%y'),373.62);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('4-Aug-11','%e-%b-%y'),377.37);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('3-Aug-11','%e-%b-%y'),392.57);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('2-Aug-11','%e-%b-%y'),388.91);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('1-Aug-11','%e-%b-%y'),396.75);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('29-Jul-11','%e-%b-%y'),390.48);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('28-Jul-11','%e-%b-%y'),391.82);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('27-Jul-11','%e-%b-%y'),392.59);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('26-Jul-11','%e-%b-%y'),403.41);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('25-Jul-11','%e-%b-%y'),398.5);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('22-Jul-11','%e-%b-%y'),393.3);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('21-Jul-11','%e-%b-%y'),387.29);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('20-Jul-11','%e-%b-%y'),386.9);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('19-Jul-11','%e-%b-%y'),376.85);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('18-Jul-11','%e-%b-%y'),373.8);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('15-Jul-11','%e-%b-%y'),364.92);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('14-Jul-11','%e-%b-%y'),357.77);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('13-Jul-11','%e-%b-%y'),358.02);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('12-Jul-11','%e-%b-%y'),353.75);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('11-Jul-11','%e-%b-%y'),354);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('8-Jul-11','%e-%b-%y'),359.71);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('7-Jul-11','%e-%b-%y'),357.2);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('6-Jul-11','%e-%b-%y'),351.76);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('5-Jul-11','%e-%b-%y'),349.43);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('1-Jul-11','%e-%b-%y'),343.26);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('30-Jun-11','%e-%b-%y'),335.67);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('29-Jun-11','%e-%b-%y'),334.04);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('28-Jun-11','%e-%b-%y'),335.26);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('27-Jun-11','%e-%b-%y'),332.04);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('24-Jun-11','%e-%b-%y'),326.35);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('23-Jun-11','%e-%b-%y'),331.23);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('22-Jun-11','%e-%b-%y'),322.61);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('21-Jun-11','%e-%b-%y'),325.3);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('20-Jun-11','%e-%b-%y'),315.32);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('17-Jun-11','%e-%b-%y'),320.26);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('16-Jun-11','%e-%b-%y'),325.16);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('15-Jun-11','%e-%b-%y'),326.75);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('14-Jun-11','%e-%b-%y'),332.44);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('13-Jun-11','%e-%b-%y'),326.6);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('10-Jun-11','%e-%b-%y'),325.9);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('9-Jun-11','%e-%b-%y'),331.49);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('8-Jun-11','%e-%b-%y'),332.24);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('7-Jun-11','%e-%b-%y'),332.04);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('6-Jun-11','%e-%b-%y'),338.04);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('3-Jun-11','%e-%b-%y'),343.44);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('2-Jun-11','%e-%b-%y'),346.1);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('1-Jun-11','%e-%b-%y'),345.51);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('31-May-11','%e-%b-%y'),347.83);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('27-May-11','%e-%b-%y'),337.41);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('26-May-11','%e-%b-%y'),335);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('25-May-11','%e-%b-%y'),336.78);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('24-May-11','%e-%b-%y'),332.19);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('23-May-11','%e-%b-%y'),334.4);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('20-May-11','%e-%b-%y'),335.22);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('19-May-11','%e-%b-%y'),340.53);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('18-May-11','%e-%b-%y'),339.87);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('17-May-11','%e-%b-%y'),336.14);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('16-May-11','%e-%b-%y'),333.3);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('13-May-11','%e-%b-%y'),340.5);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('12-May-11','%e-%b-%y'),346.57);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('11-May-11','%e-%b-%y'),347.23);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('10-May-11','%e-%b-%y'),349.45);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('9-May-11','%e-%b-%y'),347.6);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('6-May-11','%e-%b-%y'),346.66);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('5-May-11','%e-%b-%y'),346.75);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('4-May-11','%e-%b-%y'),349.57);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('3-May-11','%e-%b-%y'),348.2);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('2-May-11','%e-%b-%y'),346.28);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('29-Apr-11','%e-%b-%y'),350.13);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('28-Apr-11','%e-%b-%y'),346.75);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('27-Apr-11','%e-%b-%y'),350.15);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('26-Apr-11','%e-%b-%y'),350.42);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('25-Apr-11','%e-%b-%y'),353.01);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('21-Apr-11','%e-%b-%y'),350.7);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('20-Apr-11','%e-%b-%y'),342.41);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('19-Apr-11','%e-%b-%y'),337.86);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('18-Apr-11','%e-%b-%y'),331.85);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('15-Apr-11','%e-%b-%y'),327.46);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('14-Apr-11','%e-%b-%y'),332.42);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('13-Apr-11','%e-%b-%y'),336.13);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('12-Apr-11','%e-%b-%y'),332.4);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('11-Apr-11','%e-%b-%y'),330.8);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('8-Apr-11','%e-%b-%y'),335.06);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('7-Apr-11','%e-%b-%y'),338.08);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('6-Apr-11','%e-%b-%y'),338.04);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('5-Apr-11','%e-%b-%y'),338.89);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('4-Apr-11','%e-%b-%y'),341.19);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('1-Apr-11','%e-%b-%y'),344.56);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('31-Mar-11','%e-%b-%y'),348.51);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('30-Mar-11','%e-%b-%y'),348.63);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('29-Mar-11','%e-%b-%y'),350.96);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('28-Mar-11','%e-%b-%y'),350.44);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('25-Mar-11','%e-%b-%y'),351.54);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('24-Mar-11','%e-%b-%y'),344.97);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('23-Mar-11','%e-%b-%y'),339.19);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('22-Mar-11','%e-%b-%y'),341.2);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('21-Mar-11','%e-%b-%y'),339.3);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('18-Mar-11','%e-%b-%y'),330.67);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('17-Mar-11','%e-%b-%y'),334.64);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('16-Mar-11','%e-%b-%y'),330.01);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('15-Mar-11','%e-%b-%y'),345.43);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('14-Mar-11','%e-%b-%y'),353.56);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('11-Mar-11','%e-%b-%y'),351.99);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('10-Mar-11','%e-%b-%y'),346.67);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('9-Mar-11','%e-%b-%y'),352.47);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('8-Mar-11','%e-%b-%y'),355.76);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('7-Mar-11','%e-%b-%y'),355.36);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('4-Mar-11','%e-%b-%y'),360);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('3-Mar-11','%e-%b-%y'),359.56);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('2-Mar-11','%e-%b-%y'),352.12);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('1-Mar-11','%e-%b-%y'),349.31);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('28-Feb-11','%e-%b-%y'),353.21);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('25-Feb-11','%e-%b-%y'),348.16);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('24-Feb-11','%e-%b-%y'),342.88);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('23-Feb-11','%e-%b-%y'),342.62);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('22-Feb-11','%e-%b-%y'),338.61);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('18-Feb-11','%e-%b-%y'),350.56);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('17-Feb-11','%e-%b-%y'),358.3);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('16-Feb-11','%e-%b-%y'),363.13);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('15-Feb-11','%e-%b-%y'),359.9);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('14-Feb-11','%e-%b-%y'),359.18);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('11-Feb-11','%e-%b-%y'),356.85);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('10-Feb-11','%e-%b-%y'),354.54);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('9-Feb-11','%e-%b-%y'),358.16);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('8-Feb-11','%e-%b-%y'),355.2);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('7-Feb-11','%e-%b-%y'),351.88);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('4-Feb-11','%e-%b-%y'),346.5);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('3-Feb-11','%e-%b-%y'),343.44);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('2-Feb-11','%e-%b-%y'),344.32);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('1-Feb-11','%e-%b-%y'),345.03);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('31-Jan-11','%e-%b-%y'),339.32);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('28-Jan-11','%e-%b-%y'),336.1);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('27-Jan-11','%e-%b-%y'),343.21);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('26-Jan-11','%e-%b-%y'),343.85);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('25-Jan-11','%e-%b-%y'),341.4);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('24-Jan-11','%e-%b-%y'),337.45);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('21-Jan-11','%e-%b-%y'),326.72);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('20-Jan-11','%e-%b-%y'),332.68);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('19-Jan-11','%e-%b-%y'),338.84);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('18-Jan-11','%e-%b-%y'),340.65);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('14-Jan-11','%e-%b-%y'),348.48);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('13-Jan-11','%e-%b-%y'),345.68);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('12-Jan-11','%e-%b-%y'),344.42);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('11-Jan-11','%e-%b-%y'),341.64);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('10-Jan-11','%e-%b-%y'),342.46);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('7-Jan-11','%e-%b-%y'),336.12);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('6-Jan-11','%e-%b-%y'),333.73);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('5-Jan-11','%e-%b-%y'),334);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('4-Jan-11','%e-%b-%y'),331.29);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('3-Jan-11','%e-%b-%y'),329.57);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('31-Dec-10','%e-%b-%y'),322.56);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('30-Dec-10','%e-%b-%y'),323.66);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('29-Dec-10','%e-%b-%y'),325.29);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('28-Dec-10','%e-%b-%y'),325.47);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('27-Dec-10','%e-%b-%y'),324.68);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('23-Dec-10','%e-%b-%y'),323.6);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('22-Dec-10','%e-%b-%y'),325.16);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('21-Dec-10','%e-%b-%y'),324.2);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('20-Dec-10','%e-%b-%y'),322.21);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('17-Dec-10','%e-%b-%y'),320.61);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('16-Dec-10','%e-%b-%y'),321.25);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('15-Dec-10','%e-%b-%y'),320.36);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('14-Dec-10','%e-%b-%y'),320.29);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('13-Dec-10','%e-%b-%y'),321.67);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('10-Dec-10','%e-%b-%y'),320.56);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('9-Dec-10','%e-%b-%y'),319.76);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('8-Dec-10','%e-%b-%y'),321.01);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('7-Dec-10','%e-%b-%y'),318.21);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('6-Dec-10','%e-%b-%y'),320.15);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('3-Dec-10','%e-%b-%y'),317.44);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('2-Dec-10','%e-%b-%y'),318.15);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('1-Dec-10','%e-%b-%y'),316.4);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('30-Nov-10','%e-%b-%y'),311.15);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('29-Nov-10','%e-%b-%y'),316.87);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('26-Nov-10','%e-%b-%y'),315);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('24-Nov-10','%e-%b-%y'),314.8);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('23-Nov-10','%e-%b-%y'),308.73);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('22-Nov-10','%e-%b-%y'),313.36);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('19-Nov-10','%e-%b-%y'),306.73);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('18-Nov-10','%e-%b-%y'),308.43);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('17-Nov-10','%e-%b-%y'),300.5);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('16-Nov-10','%e-%b-%y'),301.59);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('15-Nov-10','%e-%b-%y'),307.04);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('12-Nov-10','%e-%b-%y'),308.03);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('11-Nov-10','%e-%b-%y'),316.66);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('10-Nov-10','%e-%b-%y'),318.03);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('9-Nov-10','%e-%b-%y'),316.08);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('8-Nov-10','%e-%b-%y'),318.62);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('5-Nov-10','%e-%b-%y'),317.13);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('4-Nov-10','%e-%b-%y'),318.27);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('3-Nov-10','%e-%b-%y'),312.8);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('2-Nov-10','%e-%b-%y'),309.36);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('1-Nov-10','%e-%b-%y'),304.18);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('29-Oct-10','%e-%b-%y'),300.98);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('28-Oct-10','%e-%b-%y'),305.24);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('27-Oct-10','%e-%b-%y'),307.83);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('26-Oct-10','%e-%b-%y'),308.05);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('25-Oct-10','%e-%b-%y'),308.84);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('22-Oct-10','%e-%b-%y'),307.47);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('21-Oct-10','%e-%b-%y'),309.52);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('20-Oct-10','%e-%b-%y'),310.53);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('19-Oct-10','%e-%b-%y'),309.49);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('18-Oct-10','%e-%b-%y'),318);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('15-Oct-10','%e-%b-%y'),314.74);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('14-Oct-10','%e-%b-%y'),302.31);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('13-Oct-10','%e-%b-%y'),300.14);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('12-Oct-10','%e-%b-%y'),298.54);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('11-Oct-10','%e-%b-%y'),295.36);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('8-Oct-10','%e-%b-%y'),294.07);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('7-Oct-10','%e-%b-%y'),289.22);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('6-Oct-10','%e-%b-%y'),289.19);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('5-Oct-10','%e-%b-%y'),288.94);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('4-Oct-10','%e-%b-%y'),278.64);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('1-Oct-10','%e-%b-%y'),282.52);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('30-Sep-10','%e-%b-%y'),283.75);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('29-Sep-10','%e-%b-%y'),287.37);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('28-Sep-10','%e-%b-%y'),286.86);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('27-Sep-10','%e-%b-%y'),291.16);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('24-Sep-10','%e-%b-%y'),292.32);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('23-Sep-10','%e-%b-%y'),288.92);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('22-Sep-10','%e-%b-%y'),287.75);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('21-Sep-10','%e-%b-%y'),283.77);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('20-Sep-10','%e-%b-%y'),283.23);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('17-Sep-10','%e-%b-%y'),275.37);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('16-Sep-10','%e-%b-%y'),276.57);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('15-Sep-10','%e-%b-%y'),270.22);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('14-Sep-10','%e-%b-%y'),268.06);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('13-Sep-10','%e-%b-%y'),267.04);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('10-Sep-10','%e-%b-%y'),263.41);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('9-Sep-10','%e-%b-%y'),263.07);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('8-Sep-10','%e-%b-%y'),262.92);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('7-Sep-10','%e-%b-%y'),257.81);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('6-Sep-10','%e-%b-%y'),258.77);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('3-Sep-10','%e-%b-%y'),258.77);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('2-Sep-10','%e-%b-%y'),252.17);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('1-Sep-10','%e-%b-%y'),250.33);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('31-Aug-10','%e-%b-%y'),243.1);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('30-Aug-10','%e-%b-%y'),242.5);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('27-Aug-10','%e-%b-%y'),241.62);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('26-Aug-10','%e-%b-%y'),240.28);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('25-Aug-10','%e-%b-%y'),242.89);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('24-Aug-10','%e-%b-%y'),239.93);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('23-Aug-10','%e-%b-%y'),245.8);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('20-Aug-10','%e-%b-%y'),249.64);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('19-Aug-10','%e-%b-%y'),249.88);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('18-Aug-10','%e-%b-%y'),253.07);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('17-Aug-10','%e-%b-%y'),251.97);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('16-Aug-10','%e-%b-%y'),247.64);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('13-Aug-10','%e-%b-%y'),249.1);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('12-Aug-10','%e-%b-%y'),251.79);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('11-Aug-10','%e-%b-%y'),250.19);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('10-Aug-10','%e-%b-%y'),259.41);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('9-Aug-10','%e-%b-%y'),261.75);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('6-Aug-10','%e-%b-%y'),260.09);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('5-Aug-10','%e-%b-%y'),261.7);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('4-Aug-10','%e-%b-%y'),262.98);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('3-Aug-10','%e-%b-%y'),261.93);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('2-Aug-10','%e-%b-%y'),261.85);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('30-Jul-10','%e-%b-%y'),257.25);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('29-Jul-10','%e-%b-%y'),258.11);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('28-Jul-10','%e-%b-%y'),260.96);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('27-Jul-10','%e-%b-%y'),264.08);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('26-Jul-10','%e-%b-%y'),259.28);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('23-Jul-10','%e-%b-%y'),259.94);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('22-Jul-10','%e-%b-%y'),259.02);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('21-Jul-10','%e-%b-%y'),254.24);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('20-Jul-10','%e-%b-%y'),251.89);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('19-Jul-10','%e-%b-%y'),245.58);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('16-Jul-10','%e-%b-%y'),249.9);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('15-Jul-10','%e-%b-%y'),251.45);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('14-Jul-10','%e-%b-%y'),252.73);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('13-Jul-10','%e-%b-%y'),251.8);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('12-Jul-10','%e-%b-%y'),257.28);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('9-Jul-10','%e-%b-%y'),259.62);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('8-Jul-10','%e-%b-%y'),258.09);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('7-Jul-10','%e-%b-%y'),258.66);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('6-Jul-10','%e-%b-%y'),248.63);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('5-Jul-10','%e-%b-%y'),246.94);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('2-Jul-10','%e-%b-%y'),246.94);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('1-Jul-10','%e-%b-%y'),248.48);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('30-Jun-10','%e-%b-%y'),251.53);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('29-Jun-10','%e-%b-%y'),256.17);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('28-Jun-10','%e-%b-%y'),268.3);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('25-Jun-10','%e-%b-%y'),266.7);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('24-Jun-10','%e-%b-%y'),269);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('23-Jun-10','%e-%b-%y'),270.97);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('22-Jun-10','%e-%b-%y'),273.85);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('21-Jun-10','%e-%b-%y'),270.17);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('18-Jun-10','%e-%b-%y'),274.07);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('17-Jun-10','%e-%b-%y'),271.87);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('16-Jun-10','%e-%b-%y'),267.25);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('15-Jun-10','%e-%b-%y'),259.69);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('14-Jun-10','%e-%b-%y'),254.28);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('11-Jun-10','%e-%b-%y'),253.51);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('10-Jun-10','%e-%b-%y'),250.51);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('9-Jun-10','%e-%b-%y'),243.2);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('8-Jun-10','%e-%b-%y'),249.33);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('7-Jun-10','%e-%b-%y'),250.94);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('4-Jun-10','%e-%b-%y'),255.96);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('3-Jun-10','%e-%b-%y'),263.12);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('2-Jun-10','%e-%b-%y'),263.95);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('1-Jun-10','%e-%b-%y'),260.83);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('31-May-10','%e-%b-%y'),256.88);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('28-May-10','%e-%b-%y'),256.88);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('27-May-10','%e-%b-%y'),253.35);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('26-May-10','%e-%b-%y'),244.11);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('25-May-10','%e-%b-%y'),245.22);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('24-May-10','%e-%b-%y'),246.76);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('21-May-10','%e-%b-%y'),242.32);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('20-May-10','%e-%b-%y'),237.76);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('19-May-10','%e-%b-%y'),248.34);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('18-May-10','%e-%b-%y'),252.36);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('17-May-10','%e-%b-%y'),254.22);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('14-May-10','%e-%b-%y'),253.82);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('13-May-10','%e-%b-%y'),258.36);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('12-May-10','%e-%b-%y'),262.09);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('11-May-10','%e-%b-%y'),256.52);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('10-May-10','%e-%b-%y'),253.99);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('7-May-10','%e-%b-%y'),235.86);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('6-May-10','%e-%b-%y'),246.25);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('5-May-10','%e-%b-%y'),255.98);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('4-May-10','%e-%b-%y'),258.68);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('3-May-10','%e-%b-%y'),266.35);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('30-Apr-10','%e-%b-%y'),261.09);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('29-Apr-10','%e-%b-%y'),268.64);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('28-Apr-10','%e-%b-%y'),261.6);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('27-Apr-10','%e-%b-%y'),262.04);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('26-Apr-10','%e-%b-%y'),269.5);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('23-Apr-10','%e-%b-%y'),270.83);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('22-Apr-10','%e-%b-%y'),266.47);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('21-Apr-10','%e-%b-%y'),259.22);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('20-Apr-10','%e-%b-%y'),244.59);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('19-Apr-10','%e-%b-%y'),247.07);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('16-Apr-10','%e-%b-%y'),247.4);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('15-Apr-10','%e-%b-%y'),248.92);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('14-Apr-10','%e-%b-%y'),245.69);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('13-Apr-10','%e-%b-%y'),242.43);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('12-Apr-10','%e-%b-%y'),242.29);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('9-Apr-10','%e-%b-%y'),241.79);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('8-Apr-10','%e-%b-%y'),239.95);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('7-Apr-10','%e-%b-%y'),240.6);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('6-Apr-10','%e-%b-%y'),239.54);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('5-Apr-10','%e-%b-%y'),238.49);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('2-Apr-10','%e-%b-%y'),235.97);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('1-Apr-10','%e-%b-%y'),235.97);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('31-Mar-10','%e-%b-%y'),235);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('30-Mar-10','%e-%b-%y'),235.84);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('29-Mar-10','%e-%b-%y'),232.39);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('26-Mar-10','%e-%b-%y'),230.9);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('25-Mar-10','%e-%b-%y'),226.65);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('24-Mar-10','%e-%b-%y'),229.37);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('23-Mar-10','%e-%b-%y'),228.36);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('22-Mar-10','%e-%b-%y'),224.75);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('19-Mar-10','%e-%b-%y'),222.25);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('18-Mar-10','%e-%b-%y'),224.65);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('17-Mar-10','%e-%b-%y'),224.12);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('16-Mar-10','%e-%b-%y'),224.45);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('15-Mar-10','%e-%b-%y'),223.84);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('12-Mar-10','%e-%b-%y'),226.6);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('11-Mar-10','%e-%b-%y'),225.5);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('10-Mar-10','%e-%b-%y'),224.84);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('9-Mar-10','%e-%b-%y'),223.02);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('8-Mar-10','%e-%b-%y'),219.08);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('5-Mar-10','%e-%b-%y'),218.95);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('4-Mar-10','%e-%b-%y'),210.71);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('3-Mar-10','%e-%b-%y'),209.33);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('2-Mar-10','%e-%b-%y'),208.85);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('1-Mar-10','%e-%b-%y'),208.99);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('26-Feb-10','%e-%b-%y'),204.62);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('25-Feb-10','%e-%b-%y'),202);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('24-Feb-10','%e-%b-%y'),200.66);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('23-Feb-10','%e-%b-%y'),197.06);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('22-Feb-10','%e-%b-%y'),200.42);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('19-Feb-10','%e-%b-%y'),201.67);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('18-Feb-10','%e-%b-%y'),202.93);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('17-Feb-10','%e-%b-%y'),202.55);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('16-Feb-10','%e-%b-%y'),203.4);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('15-Feb-10','%e-%b-%y'),200.38);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('12-Feb-10','%e-%b-%y'),200.38);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('11-Feb-10','%e-%b-%y'),198.67);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('10-Feb-10','%e-%b-%y'),195.12);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('9-Feb-10','%e-%b-%y'),196.19);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('8-Feb-10','%e-%b-%y'),194.12);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('5-Feb-10','%e-%b-%y'),195.46);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('4-Feb-10','%e-%b-%y'),192.05);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('3-Feb-10','%e-%b-%y'),199.23);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('2-Feb-10','%e-%b-%y'),195.86);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('1-Feb-10','%e-%b-%y'),194.73);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('29-Jan-10','%e-%b-%y'),192.06);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('28-Jan-10','%e-%b-%y'),199.29);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('27-Jan-10','%e-%b-%y'),207.88);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('26-Jan-10','%e-%b-%y'),205.94);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('25-Jan-10','%e-%b-%y'),203.08);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('22-Jan-10','%e-%b-%y'),197.75);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('21-Jan-10','%e-%b-%y'),208.07);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('20-Jan-10','%e-%b-%y'),211.72);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('19-Jan-10','%e-%b-%y'),215.04);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('18-Jan-10','%e-%b-%y'),205.93);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('15-Jan-10','%e-%b-%y'),205.93);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('14-Jan-10','%e-%b-%y'),209.43);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('13-Jan-10','%e-%b-%y'),210.65);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('12-Jan-10','%e-%b-%y'),207.72);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('11-Jan-10','%e-%b-%y'),210.11);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('8-Jan-10','%e-%b-%y'),211.98);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('7-Jan-10','%e-%b-%y'),210.58);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('6-Jan-10','%e-%b-%y'),210.97);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('5-Jan-10','%e-%b-%y'),214.38);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('4-Jan-10','%e-%b-%y'),214.01);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('1-Jan-10','%e-%b-%y'),210.73);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('31-Dec-09','%e-%b-%y'),210.73);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('30-Dec-09','%e-%b-%y'),211.64);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('29-Dec-09','%e-%b-%y'),209.1);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('28-Dec-09','%e-%b-%y'),211.61);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('25-Dec-09','%e-%b-%y'),209.04);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('24-Dec-09','%e-%b-%y'),209.04);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('23-Dec-09','%e-%b-%y'),202.1);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('22-Dec-09','%e-%b-%y'),200.36);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('21-Dec-09','%e-%b-%y'),198.23);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('18-Dec-09','%e-%b-%y'),195.43);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('17-Dec-09','%e-%b-%y'),191.86);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('16-Dec-09','%e-%b-%y'),195.03);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('15-Dec-09','%e-%b-%y'),194.17);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('14-Dec-09','%e-%b-%y'),196.98);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('11-Dec-09','%e-%b-%y'),194.67);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('10-Dec-09','%e-%b-%y'),196.43);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('9-Dec-09','%e-%b-%y'),197.8);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('8-Dec-09','%e-%b-%y'),189.87);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('7-Dec-09','%e-%b-%y'),188.95);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('4-Dec-09','%e-%b-%y'),193.32);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('3-Dec-09','%e-%b-%y'),196.48);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('2-Dec-09','%e-%b-%y'),196.23);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('1-Dec-09','%e-%b-%y'),196.97);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('30-Nov-09','%e-%b-%y'),199.91);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('27-Nov-09','%e-%b-%y'),200.59);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('26-Nov-09','%e-%b-%y'),204.19);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('25-Nov-09','%e-%b-%y'),204.19);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('24-Nov-09','%e-%b-%y'),204.44);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('23-Nov-09','%e-%b-%y'),205.88);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('20-Nov-09','%e-%b-%y'),199.92);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('19-Nov-09','%e-%b-%y'),200.51);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('18-Nov-09','%e-%b-%y'),205.96);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('17-Nov-09','%e-%b-%y'),207);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('16-Nov-09','%e-%b-%y'),206.63);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('13-Nov-09','%e-%b-%y'),204.45);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('12-Nov-09','%e-%b-%y'),201.99);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('11-Nov-09','%e-%b-%y'),203.25);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('10-Nov-09','%e-%b-%y'),202.98);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('9-Nov-09','%e-%b-%y'),201.46);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('6-Nov-09','%e-%b-%y'),194.34);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('5-Nov-09','%e-%b-%y'),194.03);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('4-Nov-09','%e-%b-%y'),190.81);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('3-Nov-09','%e-%b-%y'),188.75);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('2-Nov-09','%e-%b-%y'),189.31);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('30-Oct-09','%e-%b-%y'),188.5);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('29-Oct-09','%e-%b-%y'),196.35);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('28-Oct-09','%e-%b-%y'),192.4);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('27-Oct-09','%e-%b-%y'),197.37);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('26-Oct-09','%e-%b-%y'),202.48);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('23-Oct-09','%e-%b-%y'),203.94);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('22-Oct-09','%e-%b-%y'),205.2);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('21-Oct-09','%e-%b-%y'),204.92);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('20-Oct-09','%e-%b-%y'),198.76);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('19-Oct-09','%e-%b-%y'),189.86);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('16-Oct-09','%e-%b-%y'),188.05);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('15-Oct-09','%e-%b-%y'),190.56);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('14-Oct-09','%e-%b-%y'),191.29);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('13-Oct-09','%e-%b-%y'),190.02);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('12-Oct-09','%e-%b-%y'),190.81);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('9-Oct-09','%e-%b-%y'),190.47);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('8-Oct-09','%e-%b-%y'),189.27);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('7-Oct-09','%e-%b-%y'),190.25);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('6-Oct-09','%e-%b-%y'),190.01);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('5-Oct-09','%e-%b-%y'),186.02);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('2-Oct-09','%e-%b-%y'),184.9);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('1-Oct-09','%e-%b-%y'),180.86);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('30-Sep-09','%e-%b-%y'),185.35);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('29-Sep-09','%e-%b-%y'),185.38);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('28-Sep-09','%e-%b-%y'),186.15);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('25-Sep-09','%e-%b-%y'),182.37);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('24-Sep-09','%e-%b-%y'),183.82);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('23-Sep-09','%e-%b-%y'),185.5);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('22-Sep-09','%e-%b-%y'),184.48);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('21-Sep-09','%e-%b-%y'),184.02);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('18-Sep-09','%e-%b-%y'),185.02);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('17-Sep-09','%e-%b-%y'),184.55);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('16-Sep-09','%e-%b-%y'),181.87);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('15-Sep-09','%e-%b-%y'),175.16);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('14-Sep-09','%e-%b-%y'),173.72);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('11-Sep-09','%e-%b-%y'),172.16);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('10-Sep-09','%e-%b-%y'),172.56);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('9-Sep-09','%e-%b-%y'),171.14);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('8-Sep-09','%e-%b-%y'),172.93);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('4-Sep-09','%e-%b-%y'),170.31);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('3-Sep-09','%e-%b-%y'),166.55);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('2-Sep-09','%e-%b-%y'),165.18);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('1-Sep-09','%e-%b-%y'),165.3);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('31-Aug-09','%e-%b-%y'),168.21);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('28-Aug-09','%e-%b-%y'),170.05);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('27-Aug-09','%e-%b-%y'),169.45);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('26-Aug-09','%e-%b-%y'),167.41);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('25-Aug-09','%e-%b-%y'),169.4);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('24-Aug-09','%e-%b-%y'),169.06);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('21-Aug-09','%e-%b-%y'),169.22);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('20-Aug-09','%e-%b-%y'),166.33);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('19-Aug-09','%e-%b-%y'),164.6);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('18-Aug-09','%e-%b-%y'),164);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('17-Aug-09','%e-%b-%y'),159.59);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('14-Aug-09','%e-%b-%y'),166.78);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('13-Aug-09','%e-%b-%y'),168.42);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('12-Aug-09','%e-%b-%y'),165.31);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('10-Aug-09','%e-%b-%y'),164.72);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('7-Aug-09','%e-%b-%y'),165.51);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('6-Aug-09','%e-%b-%y'),163.91);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('5-Aug-09','%e-%b-%y'),165.11);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('4-Aug-09','%e-%b-%y'),165.55);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('3-Aug-09','%e-%b-%y'),166.43);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('31-Jul-09','%e-%b-%y'),163.39);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('30-Jul-09','%e-%b-%y'),162.79);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('29-Jul-09','%e-%b-%y'),160.03);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('28-Jul-09','%e-%b-%y'),160);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('27-Jul-09','%e-%b-%y'),160.1);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('24-Jul-09','%e-%b-%y'),159.99);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('23-Jul-09','%e-%b-%y'),157.82);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('22-Jul-09','%e-%b-%y'),156.74);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('21-Jul-09','%e-%b-%y'),151.51);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('20-Jul-09','%e-%b-%y'),152.91);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('17-Jul-09','%e-%b-%y'),151.75);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('16-Jul-09','%e-%b-%y'),147.52);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('15-Jul-09','%e-%b-%y'),146.88);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('14-Jul-09','%e-%b-%y'),142.27);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('13-Jul-09','%e-%b-%y'),142.34);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('10-Jul-09','%e-%b-%y'),138.52);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('9-Jul-09','%e-%b-%y'),136.36);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('8-Jul-09','%e-%b-%y'),137.22);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('7-Jul-09','%e-%b-%y'),135.4);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('6-Jul-09','%e-%b-%y'),138.61);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('3-Jul-09','%e-%b-%y'),140.02);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('2-Jul-09','%e-%b-%y'),140.02);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('1-Jul-09','%e-%b-%y'),142.83);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('30-Jun-09','%e-%b-%y'),142.43);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('29-Jun-09','%e-%b-%y'),141.97);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('26-Jun-09','%e-%b-%y'),142.44);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('25-Jun-09','%e-%b-%y'),139.86);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('24-Jun-09','%e-%b-%y'),136.22);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('23-Jun-09','%e-%b-%y'),134.01);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('22-Jun-09','%e-%b-%y'),137.37);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('19-Jun-09','%e-%b-%y'),139.48);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('18-Jun-09','%e-%b-%y'),135.88);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('17-Jun-09','%e-%b-%y'),135.58);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('16-Jun-09','%e-%b-%y'),136.35);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('15-Jun-09','%e-%b-%y'),136.09);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('12-Jun-09','%e-%b-%y'),136.97);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('11-Jun-09','%e-%b-%y'),139.95);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('10-Jun-09','%e-%b-%y'),140.25);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('9-Jun-09','%e-%b-%y'),142.72);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('8-Jun-09','%e-%b-%y'),143.85);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('5-Jun-09','%e-%b-%y'),144.67);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('4-Jun-09','%e-%b-%y'),143.74);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('3-Jun-09','%e-%b-%y'),140.95);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('2-Jun-09','%e-%b-%y'),139.49);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('1-Jun-09','%e-%b-%y'),139.35);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('29-May-09','%e-%b-%y'),135.81);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('28-May-09','%e-%b-%y'),135.07);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('27-May-09','%e-%b-%y'),133.05);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('26-May-09','%e-%b-%y'),130.78);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('22-May-09','%e-%b-%y'),122.5);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('21-May-09','%e-%b-%y'),124.18);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('20-May-09','%e-%b-%y'),125.87);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('19-May-09','%e-%b-%y'),127.45);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('18-May-09','%e-%b-%y'),126.65);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('15-May-09','%e-%b-%y'),122.42);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('14-May-09','%e-%b-%y'),122.95);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('13-May-09','%e-%b-%y'),119.49);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('12-May-09','%e-%b-%y'),124.42);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('11-May-09','%e-%b-%y'),129.57);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('8-May-09','%e-%b-%y'),129.19);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('7-May-09','%e-%b-%y'),129.06);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('6-May-09','%e-%b-%y'),132.5);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('5-May-09','%e-%b-%y'),132.71);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('4-May-09','%e-%b-%y'),132.07);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('1-May-09','%e-%b-%y'),127.24);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('30-Apr-09','%e-%b-%y'),125.83);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('29-Apr-09','%e-%b-%y'),125.14);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('28-Apr-09','%e-%b-%y'),123.9);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('27-Apr-09','%e-%b-%y'),124.73);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('24-Apr-09','%e-%b-%y'),123.9);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('23-Apr-09','%e-%b-%y'),125.4);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('22-Apr-09','%e-%b-%y'),121.51);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('21-Apr-09','%e-%b-%y'),121.76);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('20-Apr-09','%e-%b-%y'),120.5);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('17-Apr-09','%e-%b-%y'),123.42);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('16-Apr-09','%e-%b-%y'),121.45);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('15-Apr-09','%e-%b-%y'),117.64);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('14-Apr-09','%e-%b-%y'),118.31);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('13-Apr-09','%e-%b-%y'),120.22);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('10-Apr-09','%e-%b-%y'),119.57);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('9-Apr-09','%e-%b-%y'),119.57);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('8-Apr-09','%e-%b-%y'),116.32);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('7-Apr-09','%e-%b-%y'),115);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('6-Apr-09','%e-%b-%y'),118.45);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('3-Apr-09','%e-%b-%y'),115.99);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('2-Apr-09','%e-%b-%y'),112.71);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('1-Apr-09','%e-%b-%y'),108.69);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('31-Mar-09','%e-%b-%y'),105.12);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('30-Mar-09','%e-%b-%y'),104.49);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('27-Mar-09','%e-%b-%y'),106.85);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('26-Mar-09','%e-%b-%y'),109.87);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('25-Mar-09','%e-%b-%y'),106.49);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('24-Mar-09','%e-%b-%y'),106.5);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('23-Mar-09','%e-%b-%y'),107.66);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('20-Mar-09','%e-%b-%y'),101.59);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('19-Mar-09','%e-%b-%y'),101.62);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('18-Mar-09','%e-%b-%y'),101.52);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('17-Mar-09','%e-%b-%y'),99.66);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('16-Mar-09','%e-%b-%y'),95.42);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('13-Mar-09','%e-%b-%y'),95.93);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('12-Mar-09','%e-%b-%y'),96.35);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('11-Mar-09','%e-%b-%y'),92.68);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('10-Mar-09','%e-%b-%y'),88.63);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('9-Mar-09','%e-%b-%y'),83.11);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('6-Mar-09','%e-%b-%y'),85.3);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('5-Mar-09','%e-%b-%y'),88.84);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('4-Mar-09','%e-%b-%y'),91.17);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('3-Mar-09','%e-%b-%y'),88.37);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('2-Mar-09','%e-%b-%y'),87.94);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('27-Feb-09','%e-%b-%y'),89.31);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('26-Feb-09','%e-%b-%y'),89.19);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('25-Feb-09','%e-%b-%y'),91.16);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('24-Feb-09','%e-%b-%y'),90.25);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('23-Feb-09','%e-%b-%y'),86.95);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('20-Feb-09','%e-%b-%y'),91.2);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('19-Feb-09','%e-%b-%y'),90.64);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('18-Feb-09','%e-%b-%y'),94.37);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('17-Feb-09','%e-%b-%y'),94.53);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('13-Feb-09','%e-%b-%y'),99.16);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('12-Feb-09','%e-%b-%y'),99.27);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('11-Feb-09','%e-%b-%y'),96.82);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('10-Feb-09','%e-%b-%y'),97.83);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('9-Feb-09','%e-%b-%y'),102.51);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('6-Feb-09','%e-%b-%y'),99.72);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('5-Feb-09','%e-%b-%y'),96.46);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('4-Feb-09','%e-%b-%y'),93.55);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('3-Feb-09','%e-%b-%y'),92.98);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('2-Feb-09','%e-%b-%y'),91.51);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('30-Jan-09','%e-%b-%y'),90.13);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('29-Jan-09','%e-%b-%y'),93);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('28-Jan-09','%e-%b-%y'),94.2);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('27-Jan-09','%e-%b-%y'),90.73);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('26-Jan-09','%e-%b-%y'),89.64);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('23-Jan-09','%e-%b-%y'),88.36);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('22-Jan-09','%e-%b-%y'),88.36);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('21-Jan-09','%e-%b-%y'),82.83);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('20-Jan-09','%e-%b-%y'),78.2);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('16-Jan-09','%e-%b-%y'),82.33);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('15-Jan-09','%e-%b-%y'),83.38);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('14-Jan-09','%e-%b-%y'),85.33);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('13-Jan-09','%e-%b-%y'),87.71);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('12-Jan-09','%e-%b-%y'),88.66);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('9-Jan-09','%e-%b-%y'),90.58);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('8-Jan-09','%e-%b-%y'),92.7);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('7-Jan-09','%e-%b-%y'),91.01);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('6-Jan-09','%e-%b-%y'),93.02);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('5-Jan-09','%e-%b-%y'),94.58);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('2-Jan-09','%e-%b-%y'),90.75);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('1-Jan-09','%e-%b-%y'),85.35);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('31-Dec-08','%e-%b-%y'),85.35);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('30-Dec-08','%e-%b-%y'),86.29);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('29-Dec-08','%e-%b-%y'),86.61);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('26-Dec-08','%e-%b-%y'),85.81);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('25-Dec-08','%e-%b-%y'),85.04);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('24-Dec-08','%e-%b-%y'),85.04);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('23-Dec-08','%e-%b-%y'),86.38);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('22-Dec-08','%e-%b-%y'),85.74);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('19-Dec-08','%e-%b-%y'),90);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('18-Dec-08','%e-%b-%y'),89.43);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('17-Dec-08','%e-%b-%y'),89.16);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('16-Dec-08','%e-%b-%y'),95.43);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('15-Dec-08','%e-%b-%y'),94.75);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('12-Dec-08','%e-%b-%y'),98.27);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('11-Dec-08','%e-%b-%y'),95);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('10-Dec-08','%e-%b-%y'),98.21);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('9-Dec-08','%e-%b-%y'),100.06);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('8-Dec-08','%e-%b-%y'),99.72);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('5-Dec-08','%e-%b-%y'),94);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('4-Dec-08','%e-%b-%y'),91.41);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('3-Dec-08','%e-%b-%y'),95.9);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('2-Dec-08','%e-%b-%y'),92.47);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('1-Dec-08','%e-%b-%y'),88.93);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('28-Nov-08','%e-%b-%y'),92.67);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('27-Nov-08','%e-%b-%y'),95);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('26-Nov-08','%e-%b-%y'),95);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('25-Nov-08','%e-%b-%y'),90.8);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('24-Nov-08','%e-%b-%y'),92.95);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('21-Nov-08','%e-%b-%y'),82.58);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('20-Nov-08','%e-%b-%y'),80.49);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('19-Nov-08','%e-%b-%y'),86.29);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('18-Nov-08','%e-%b-%y'),89.91);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('17-Nov-08','%e-%b-%y'),88.14);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('14-Nov-08','%e-%b-%y'),90.24);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('13-Nov-08','%e-%b-%y'),96.44);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('12-Nov-08','%e-%b-%y'),90.12);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('11-Nov-08','%e-%b-%y'),94.77);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('10-Nov-08','%e-%b-%y'),95.88);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('7-Nov-08','%e-%b-%y'),98.24);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('6-Nov-08','%e-%b-%y'),99.1);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('5-Nov-08','%e-%b-%y'),103.3);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('4-Nov-08','%e-%b-%y'),110.99);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('3-Nov-08','%e-%b-%y'),106.96);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('31-Oct-08','%e-%b-%y'),107.59);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('30-Oct-08','%e-%b-%y'),111.04);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('29-Oct-08','%e-%b-%y'),104.55);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('28-Oct-08','%e-%b-%y'),99.91);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('27-Oct-08','%e-%b-%y'),92.09);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('24-Oct-08','%e-%b-%y'),96.38);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('23-Oct-08','%e-%b-%y'),98.23);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('22-Oct-08','%e-%b-%y'),96.87);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('21-Oct-08','%e-%b-%y'),91.49);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('20-Oct-08','%e-%b-%y'),98.44);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('17-Oct-08','%e-%b-%y'),97.4);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('16-Oct-08','%e-%b-%y'),101.89);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('15-Oct-08','%e-%b-%y'),97.95);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('14-Oct-08','%e-%b-%y'),104.08);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('13-Oct-08','%e-%b-%y'),110.26);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('10-Oct-08','%e-%b-%y'),96.8);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('9-Oct-08','%e-%b-%y'),88.74);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('8-Oct-08','%e-%b-%y'),89.79);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('7-Oct-08','%e-%b-%y'),89.16);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('6-Oct-08','%e-%b-%y'),98.14);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('3-Oct-08','%e-%b-%y'),97.07);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('2-Oct-08','%e-%b-%y'),100.1);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('1-Oct-08','%e-%b-%y'),109.12);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('30-Sep-08','%e-%b-%y'),113.66);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('29-Sep-08','%e-%b-%y'),105.26);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('26-Sep-08','%e-%b-%y'),128.24);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('25-Sep-08','%e-%b-%y'),131.93);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('24-Sep-08','%e-%b-%y'),128.71);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('23-Sep-08','%e-%b-%y'),126.84);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('22-Sep-08','%e-%b-%y'),131.05);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('19-Sep-08','%e-%b-%y'),140.91);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('18-Sep-08','%e-%b-%y'),134.09);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('17-Sep-08','%e-%b-%y'),127.83);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('16-Sep-08','%e-%b-%y'),139.88);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('15-Sep-08','%e-%b-%y'),140.36);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('12-Sep-08','%e-%b-%y'),148.94);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('11-Sep-08','%e-%b-%y'),152.65);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('10-Sep-08','%e-%b-%y'),151.61);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('9-Sep-08','%e-%b-%y'),151.68);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('8-Sep-08','%e-%b-%y'),157.92);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('5-Sep-08','%e-%b-%y'),160.18);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('4-Sep-08','%e-%b-%y'),161.22);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('3-Sep-08','%e-%b-%y'),166.96);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('2-Sep-08','%e-%b-%y'),166.19);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('29-Aug-08','%e-%b-%y'),169.53);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('28-Aug-08','%e-%b-%y'),173.74);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('27-Aug-08','%e-%b-%y'),174.67);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('26-Aug-08','%e-%b-%y'),173.64);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('25-Aug-08','%e-%b-%y'),172.55);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('22-Aug-08','%e-%b-%y'),176.79);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('21-Aug-08','%e-%b-%y'),174.29);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('20-Aug-08','%e-%b-%y'),175.84);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('19-Aug-08','%e-%b-%y'),173.53);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('18-Aug-08','%e-%b-%y'),175.39);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('15-Aug-08','%e-%b-%y'),175.74);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('14-Aug-08','%e-%b-%y'),179.32);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('13-Aug-08','%e-%b-%y'),179.3);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('12-Aug-08','%e-%b-%y'),176.73);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('11-Aug-08','%e-%b-%y'),173.56);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('8-Aug-08','%e-%b-%y'),169.55);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('7-Aug-08','%e-%b-%y'),163.57);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('6-Aug-08','%e-%b-%y'),164.19);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('5-Aug-08','%e-%b-%y'),160.64);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('4-Aug-08','%e-%b-%y'),153.23);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('1-Aug-08','%e-%b-%y'),156.66);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('31-Jul-08','%e-%b-%y'),158.95);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('30-Jul-08','%e-%b-%y'),159.88);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('29-Jul-08','%e-%b-%y'),157.08);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('28-Jul-08','%e-%b-%y'),154.4);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('25-Jul-08','%e-%b-%y'),162.12);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('24-Jul-08','%e-%b-%y'),159.03);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('23-Jul-08','%e-%b-%y'),166.26);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('22-Jul-08','%e-%b-%y'),162.02);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('21-Jul-08','%e-%b-%y'),166.29);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('18-Jul-08','%e-%b-%y'),165.15);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('17-Jul-08','%e-%b-%y'),171.81);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('16-Jul-08','%e-%b-%y'),172.81);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('15-Jul-08','%e-%b-%y'),169.64);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('14-Jul-08','%e-%b-%y'),173.88);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('11-Jul-08','%e-%b-%y'),172.58);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('10-Jul-08','%e-%b-%y'),176.63);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('9-Jul-08','%e-%b-%y'),174.25);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('8-Jul-08','%e-%b-%y'),179.55);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('7-Jul-08','%e-%b-%y'),175.16);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('3-Jul-08','%e-%b-%y'),170.12);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('2-Jul-08','%e-%b-%y'),168.18);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('1-Jul-08','%e-%b-%y'),174.68);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('30-Jun-08','%e-%b-%y'),167.44);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('27-Jun-08','%e-%b-%y'),170.09);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('26-Jun-08','%e-%b-%y'),168.26);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('25-Jun-08','%e-%b-%y'),177.39);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('24-Jun-08','%e-%b-%y'),173.25);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('23-Jun-08','%e-%b-%y'),173.16);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('20-Jun-08','%e-%b-%y'),175.27);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('19-Jun-08','%e-%b-%y'),180.9);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('18-Jun-08','%e-%b-%y'),178.75);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('17-Jun-08','%e-%b-%y'),181.43);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('16-Jun-08','%e-%b-%y'),176.84);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('13-Jun-08','%e-%b-%y'),172.37);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('12-Jun-08','%e-%b-%y'),173.26);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('11-Jun-08','%e-%b-%y'),180.81);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('10-Jun-08','%e-%b-%y'),185.64);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('9-Jun-08','%e-%b-%y'),181.61);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('6-Jun-08','%e-%b-%y'),185.64);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('5-Jun-08','%e-%b-%y'),189.43);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('4-Jun-08','%e-%b-%y'),185.19);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('3-Jun-08','%e-%b-%y'),185.37);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('2-Jun-08','%e-%b-%y'),186.1);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('30-May-08','%e-%b-%y'),188.75);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('29-May-08','%e-%b-%y'),186.69);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('28-May-08','%e-%b-%y'),187.01);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('27-May-08','%e-%b-%y'),186.43);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('23-May-08','%e-%b-%y'),181.17);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('22-May-08','%e-%b-%y'),177.05);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('21-May-08','%e-%b-%y'),178.19);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('20-May-08','%e-%b-%y'),185.9);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('19-May-08','%e-%b-%y'),183.6);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('16-May-08','%e-%b-%y'),187.62);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('15-May-08','%e-%b-%y'),189.73);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('14-May-08','%e-%b-%y'),186.26);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('13-May-08','%e-%b-%y'),189.96);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('12-May-08','%e-%b-%y'),188.16);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('9-May-08','%e-%b-%y'),183.45);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('8-May-08','%e-%b-%y'),185.06);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('7-May-08','%e-%b-%y'),182.59);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('6-May-08','%e-%b-%y'),186.66);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('5-May-08','%e-%b-%y'),184.73);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('2-May-08','%e-%b-%y'),180.94);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('1-May-08','%e-%b-%y'),180);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('30-Apr-08','%e-%b-%y'),173.95);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('29-Apr-08','%e-%b-%y'),175.05);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('28-Apr-08','%e-%b-%y'),172.24);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('25-Apr-08','%e-%b-%y'),169.73);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('24-Apr-08','%e-%b-%y'),168.94);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('23-Apr-08','%e-%b-%y'),162.89);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('22-Apr-08','%e-%b-%y'),160.2);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('21-Apr-08','%e-%b-%y'),168.16);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('18-Apr-08','%e-%b-%y'),161.04);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('17-Apr-08','%e-%b-%y'),154.49);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('16-Apr-08','%e-%b-%y'),153.7);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('15-Apr-08','%e-%b-%y'),148.38);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('14-Apr-08','%e-%b-%y'),147.78);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('11-Apr-08','%e-%b-%y'),147.14);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('10-Apr-08','%e-%b-%y'),154.55);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('9-Apr-08','%e-%b-%y'),151.44);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('8-Apr-08','%e-%b-%y'),152.84);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('7-Apr-08','%e-%b-%y'),155.89);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('4-Apr-08','%e-%b-%y'),153.08);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('3-Apr-08','%e-%b-%y'),151.61);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('2-Apr-08','%e-%b-%y'),147.49);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('1-Apr-08','%e-%b-%y'),149.53);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('31-Mar-08','%e-%b-%y'),143.5);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('28-Mar-08','%e-%b-%y'),143.01);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('27-Mar-08','%e-%b-%y'),140.25);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('26-Mar-08','%e-%b-%y'),145.06);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('25-Mar-08','%e-%b-%y'),140.98);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('24-Mar-08','%e-%b-%y'),139.53);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('20-Mar-08','%e-%b-%y'),133.27);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('19-Mar-08','%e-%b-%y'),129.67);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('18-Mar-08','%e-%b-%y'),132.82);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('17-Mar-08','%e-%b-%y'),126.73);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('14-Mar-08','%e-%b-%y'),126.61);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('13-Mar-08','%e-%b-%y'),127.94);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('12-Mar-08','%e-%b-%y'),126.03);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('11-Mar-08','%e-%b-%y'),127.35);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('10-Mar-08','%e-%b-%y'),119.69);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('7-Mar-08','%e-%b-%y'),122.25);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('6-Mar-08','%e-%b-%y'),120.93);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('5-Mar-08','%e-%b-%y'),124.49);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('4-Mar-08','%e-%b-%y'),124.62);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('3-Mar-08','%e-%b-%y'),121.73);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('29-Feb-08','%e-%b-%y'),125.02);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('28-Feb-08','%e-%b-%y'),129.91);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('27-Feb-08','%e-%b-%y'),122.96);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('26-Feb-08','%e-%b-%y'),119.15);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('25-Feb-08','%e-%b-%y'),119.74);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('22-Feb-08','%e-%b-%y'),119.46);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('21-Feb-08','%e-%b-%y'),121.54);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('20-Feb-08','%e-%b-%y'),123.82);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('19-Feb-08','%e-%b-%y'),122.18);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('15-Feb-08','%e-%b-%y'),124.63);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('14-Feb-08','%e-%b-%y'),127.46);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('13-Feb-08','%e-%b-%y'),129.4);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('12-Feb-08','%e-%b-%y'),124.86);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('11-Feb-08','%e-%b-%y'),129.45);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('8-Feb-08','%e-%b-%y'),125.48);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('7-Feb-08','%e-%b-%y'),121.24);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('6-Feb-08','%e-%b-%y'),122);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('5-Feb-08','%e-%b-%y'),129.36);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('4-Feb-08','%e-%b-%y'),131.65);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('1-Feb-08','%e-%b-%y'),133.75);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('31-Jan-08','%e-%b-%y'),135.36);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('30-Jan-08','%e-%b-%y'),132.18);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('29-Jan-08','%e-%b-%y'),131.54);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('28-Jan-08','%e-%b-%y'),130.01);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('25-Jan-08','%e-%b-%y'),130.01);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('24-Jan-08','%e-%b-%y'),135.6);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('23-Jan-08','%e-%b-%y'),139.07);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('22-Jan-08','%e-%b-%y'),155.64);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('18-Jan-08','%e-%b-%y'),161.36);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('17-Jan-08','%e-%b-%y'),160.89);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('16-Jan-08','%e-%b-%y'),159.64);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('15-Jan-08','%e-%b-%y'),169.04);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('14-Jan-08','%e-%b-%y'),178.78);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('11-Jan-08','%e-%b-%y'),172.69);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('10-Jan-08','%e-%b-%y'),178.02);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('9-Jan-08','%e-%b-%y'),179.4);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('8-Jan-08','%e-%b-%y'),171.25);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('7-Jan-08','%e-%b-%y'),177.64);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('4-Jan-08','%e-%b-%y'),180.05);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('3-Jan-08','%e-%b-%y'),194.93);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('2-Jan-08','%e-%b-%y'),194.84);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('31-Dec-07','%e-%b-%y'),198.08);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('28-Dec-07','%e-%b-%y'),199.83);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('27-Dec-07','%e-%b-%y'),198.57);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('26-Dec-07','%e-%b-%y'),198.95);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('24-Dec-07','%e-%b-%y'),198.8);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('21-Dec-07','%e-%b-%y'),193.91);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('20-Dec-07','%e-%b-%y'),187.21);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('19-Dec-07','%e-%b-%y'),183.12);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('18-Dec-07','%e-%b-%y'),182.98);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('17-Dec-07','%e-%b-%y'),184.4);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('14-Dec-07','%e-%b-%y'),190.39);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('13-Dec-07','%e-%b-%y'),191.83);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('12-Dec-07','%e-%b-%y'),190.86);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('11-Dec-07','%e-%b-%y'),188.54);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('10-Dec-07','%e-%b-%y'),194.21);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('7-Dec-07','%e-%b-%y'),194.3);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('6-Dec-07','%e-%b-%y'),189.95);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('5-Dec-07','%e-%b-%y'),185.5);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('4-Dec-07','%e-%b-%y'),179.81);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('3-Dec-07','%e-%b-%y'),178.86);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('30-Nov-07','%e-%b-%y'),182.22);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('29-Nov-07','%e-%b-%y'),184.29);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('28-Nov-07','%e-%b-%y'),180.22);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('27-Nov-07','%e-%b-%y'),174.81);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('26-Nov-07','%e-%b-%y'),172.54);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('23-Nov-07','%e-%b-%y'),171.54);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('21-Nov-07','%e-%b-%y'),168.46);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('20-Nov-07','%e-%b-%y'),168.85);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('19-Nov-07','%e-%b-%y'),163.95);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('16-Nov-07','%e-%b-%y'),166.39);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('15-Nov-07','%e-%b-%y'),164.3);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('14-Nov-07','%e-%b-%y'),166.11);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('13-Nov-07','%e-%b-%y'),169.96);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('12-Nov-07','%e-%b-%y'),153.76);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('9-Nov-07','%e-%b-%y'),165.37);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('8-Nov-07','%e-%b-%y'),175.47);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('7-Nov-07','%e-%b-%y'),186.3);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('6-Nov-07','%e-%b-%y'),191.79);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('5-Nov-07','%e-%b-%y'),186.18);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('2-Nov-07','%e-%b-%y'),187.87);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('1-Nov-07','%e-%b-%y'),187.44);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('31-Oct-07','%e-%b-%y'),189.95);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('30-Oct-07','%e-%b-%y'),187);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('29-Oct-07','%e-%b-%y'),185.09);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('26-Oct-07','%e-%b-%y'),184.7);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('25-Oct-07','%e-%b-%y'),182.78);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('24-Oct-07','%e-%b-%y'),185.93);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('23-Oct-07','%e-%b-%y'),186.16);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('22-Oct-07','%e-%b-%y'),174.36);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('19-Oct-07','%e-%b-%y'),170.42);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('18-Oct-07','%e-%b-%y'),173.5);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('17-Oct-07','%e-%b-%y'),172.75);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('16-Oct-07','%e-%b-%y'),169.58);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('15-Oct-07','%e-%b-%y'),166.98);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('12-Oct-07','%e-%b-%y'),167.25);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('11-Oct-07','%e-%b-%y'),162.23);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('10-Oct-07','%e-%b-%y'),166.79);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('9-Oct-07','%e-%b-%y'),167.86);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('8-Oct-07','%e-%b-%y'),167.91);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('5-Oct-07','%e-%b-%y'),161.45);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('4-Oct-07','%e-%b-%y'),156.24);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('3-Oct-07','%e-%b-%y'),157.92);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('2-Oct-07','%e-%b-%y'),158.45);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('1-Oct-07','%e-%b-%y'),156.34);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('28-Sep-07','%e-%b-%y'),153.47);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('27-Sep-07','%e-%b-%y'),154.5);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('26-Sep-07','%e-%b-%y'),152.77);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('25-Sep-07','%e-%b-%y'),153.18);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('24-Sep-07','%e-%b-%y'),148.28);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('21-Sep-07','%e-%b-%y'),144.15);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('20-Sep-07','%e-%b-%y'),140.31);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('19-Sep-07','%e-%b-%y'),140.77);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('18-Sep-07','%e-%b-%y'),140.92);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('17-Sep-07','%e-%b-%y'),138.41);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('14-Sep-07','%e-%b-%y'),138.81);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('13-Sep-07','%e-%b-%y'),137.2);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('12-Sep-07','%e-%b-%y'),136.85);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('11-Sep-07','%e-%b-%y'),135.49);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('10-Sep-07','%e-%b-%y'),136.71);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('7-Sep-07','%e-%b-%y'),131.77);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('6-Sep-07','%e-%b-%y'),135.01);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('5-Sep-07','%e-%b-%y'),136.76);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('4-Sep-07','%e-%b-%y'),144.16);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('31-Aug-07','%e-%b-%y'),138.48);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('30-Aug-07','%e-%b-%y'),136.25);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('29-Aug-07','%e-%b-%y'),134.08);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('28-Aug-07','%e-%b-%y'),126.82);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('27-Aug-07','%e-%b-%y'),132.25);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('24-Aug-07','%e-%b-%y'),135.3);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('23-Aug-07','%e-%b-%y'),131.07);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('22-Aug-07','%e-%b-%y'),132.51);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('21-Aug-07','%e-%b-%y'),127.57);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('20-Aug-07','%e-%b-%y'),122.22);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('17-Aug-07','%e-%b-%y'),122.06);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('16-Aug-07','%e-%b-%y'),117.05);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('15-Aug-07','%e-%b-%y'),119.9);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('14-Aug-07','%e-%b-%y'),124.03);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('13-Aug-07','%e-%b-%y'),127.79);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('10-Aug-07','%e-%b-%y'),125);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('9-Aug-07','%e-%b-%y'),126.39);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('8-Aug-07','%e-%b-%y'),134.01);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('7-Aug-07','%e-%b-%y'),135.03);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('6-Aug-07','%e-%b-%y'),135.25);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('3-Aug-07','%e-%b-%y'),131.85);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('2-Aug-07','%e-%b-%y'),136.49);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('1-Aug-07','%e-%b-%y'),135);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('31-Jul-07','%e-%b-%y'),131.76);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('30-Jul-07','%e-%b-%y'),141.43);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('27-Jul-07','%e-%b-%y'),143.85);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('26-Jul-07','%e-%b-%y'),146);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('25-Jul-07','%e-%b-%y'),137.26);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('24-Jul-07','%e-%b-%y'),134.89);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('23-Jul-07','%e-%b-%y'),143.7);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('20-Jul-07','%e-%b-%y'),143.75);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('19-Jul-07','%e-%b-%y'),140);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('18-Jul-07','%e-%b-%y'),138.12);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('17-Jul-07','%e-%b-%y'),138.91);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('16-Jul-07','%e-%b-%y'),138.1);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('13-Jul-07','%e-%b-%y'),137.73);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('12-Jul-07','%e-%b-%y'),134.07);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('11-Jul-07','%e-%b-%y'),132.39);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('10-Jul-07','%e-%b-%y'),132.35);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('9-Jul-07','%e-%b-%y'),130.33);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('6-Jul-07','%e-%b-%y'),132.3);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('5-Jul-07','%e-%b-%y'),132.75);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('3-Jul-07','%e-%b-%y'),127.17);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('2-Jul-07','%e-%b-%y'),121.26);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('29-Jun-07','%e-%b-%y'),122.04);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('28-Jun-07','%e-%b-%y'),120.56);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('27-Jun-07','%e-%b-%y'),121.89);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('26-Jun-07','%e-%b-%y'),119.65);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('25-Jun-07','%e-%b-%y'),122.34);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('22-Jun-07','%e-%b-%y'),123);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('21-Jun-07','%e-%b-%y'),123.9);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('20-Jun-07','%e-%b-%y'),121.55);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('19-Jun-07','%e-%b-%y'),123.66);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('18-Jun-07','%e-%b-%y'),125.09);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('15-Jun-07','%e-%b-%y'),120.5);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('14-Jun-07','%e-%b-%y'),118.75);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('13-Jun-07','%e-%b-%y'),117.5);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('12-Jun-07','%e-%b-%y'),120.38);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('11-Jun-07','%e-%b-%y'),120.19);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('8-Jun-07','%e-%b-%y'),124.49);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('7-Jun-07','%e-%b-%y'),124.07);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('6-Jun-07','%e-%b-%y'),123.64);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('5-Jun-07','%e-%b-%y'),122.67);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('4-Jun-07','%e-%b-%y'),121.33);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('1-Jun-07','%e-%b-%y'),118.4);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('31-May-07','%e-%b-%y'),121.19);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('30-May-07','%e-%b-%y'),118.77);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('29-May-07','%e-%b-%y'),114.35);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('25-May-07','%e-%b-%y'),113.62);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('24-May-07','%e-%b-%y'),110.69);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('23-May-07','%e-%b-%y'),112.89);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('22-May-07','%e-%b-%y'),113.54);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('21-May-07','%e-%b-%y'),111.98);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('18-May-07','%e-%b-%y'),110.02);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('17-May-07','%e-%b-%y'),109.44);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('16-May-07','%e-%b-%y'),107.34);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('15-May-07','%e-%b-%y'),107.52);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('14-May-07','%e-%b-%y'),109.36);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('11-May-07','%e-%b-%y'),108.74);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('10-May-07','%e-%b-%y'),107.34);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('9-May-07','%e-%b-%y'),106.88);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('8-May-07','%e-%b-%y'),105.06);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('7-May-07','%e-%b-%y'),103.92);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('4-May-07','%e-%b-%y'),100.81);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('3-May-07','%e-%b-%y'),100.4);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('2-May-07','%e-%b-%y'),100.39);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series3',STR_TO_DATE('1-May-07','%e-%b-%y'),99.47);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('30-Apr-07','%e-%b-%y'),99.8);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('27-Apr-07','%e-%b-%y'),99.92);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('26-Apr-07','%e-%b-%y'),98.84);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series2',STR_TO_DATE('25-Apr-07','%e-%b-%y'),95.35);
+Insert into demo_line_chart (series, log_date, data_value) values ('Series1',STR_TO_DATE('24-Apr-07','%e-%b-%y'),93.24);
+
+-- DEMO_PIE_CHART
+Insert into demo_pie_chart (legend, data_value) values ('One', 5);
+Insert into demo_pie_chart (legend, data_value) values ('Two', 2);
+Insert into demo_pie_chart (legend, data_value) values ('Three', 9);
+Insert into demo_pie_chart (legend, data_value) values ('Four', 7);
+Insert into demo_pie_chart (legend, data_value) values ('Five', 4);
+Insert into demo_pie_chart (legend, data_value) values ('Six', 3);
+Insert into demo_pie_chart (legend, data_value) values ('Seven', .5);
+
+
+-- DEMO_SCATTER_CHART
+Insert into demo_scatter_chart (rainfall, key_value, measurements) values (4.1, 'Particulate', 122);
+Insert into demo_scatter_chart (rainfall, key_value, measurements) values (4.3, 'Particulate', 117);
+Insert into demo_scatter_chart (rainfall, key_value, measurements) values (5.7, 'Particulate', 112);
+Insert into demo_scatter_chart (rainfall, key_value, measurements) values (5.4, 'Particulate', 114);
+Insert into demo_scatter_chart (rainfall, key_value, measurements) values (5.9, 'Particulate', 110);
+Insert into demo_scatter_chart (rainfall, key_value, measurements) values (5.0, 'Particulate', 114);
+Insert into demo_scatter_chart (rainfall, key_value, measurements) values (3.6, 'Particulate', 128);
+Insert into demo_scatter_chart (rainfall, key_value, measurements) values (1.9, 'Particulate', 137);
+Insert into demo_scatter_chart (rainfall, key_value, measurements) values (7.3, 'Particulate', 104);
+Insert into demo_scatter_chart (rainfall, key_value, measurements) values (6.9, 'Humidity', 119);
+Insert into demo_scatter_chart (rainfall, key_value, measurements) values (7.9, 'Humidity', 118);
+Insert into demo_scatter_chart (rainfall, key_value, measurements) values (9.8, 'Humidity', 103);
+Insert into demo_scatter_chart (rainfall, key_value, measurements) values (4.9, 'Humidity', 137);
+Insert into demo_scatter_chart (rainfall, key_value, measurements) values (6.8, 'Humidity', 102);
+Insert into demo_scatter_chart (rainfall, key_value, measurements) values (4.7, 'Humidity', 89);
+Insert into demo_scatter_chart (rainfall, key_value, measurements) values (2.7, 'Humidity', 98);
+Insert into demo_scatter_chart (rainfall, key_value, measurements) values (3.7, 'Humidity', 145);
+Insert into demo_scatter_chart (rainfall, key_value, measurements) values (7.4, 'Humidity', 118);
+
+-- DEMO_SCATTER_PLOT
+
+-- SET DEFINE OFF;
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', -46.5901128883449, -464.477370615131);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', -85.0293361247543, -362.252178232471);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', 70.9700275365898, 402.214363675566);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', -50.1110580054506, -310.108907443154);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', 85.043005750476, 813.481841353449);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', -14.2356123424179, -134.200903707809);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', -66.7014933188071, -445.754374526706);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', -79.941582021797, -694.089097548454);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', -64.4665101305822, -431.660620986243);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', 13.718818366452, 100.010719918027);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', 35.457456199233, 223.254643848734);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', 55.2326402548387, 268.940835852805);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', -32.9989160276248, -237.280626944034);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', -0.464911506111831, -2.65656324666862);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', -59.0205101710777, -498.895652307826);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', 28.0939970575828, 117.200615553207);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', 31.7305239061572, 186.662624012256);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', 50.9035126419798, 440.937283203403);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', 58.3875046571053, 547.879249694999);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', 76.7846997917459, 525.020578968308);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', 1.73485745801611, 7.28149474936192);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', 15.304841061276, 71.2374666595537);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', 75.1342455000693, 381.145932349436);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', -58.2087417684623, -573.630956069476);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', 76.7977837302114, 624.733726327778);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', 56.3295585433654, 309.697529902676);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', -9.27601440680639, -49.5126219388194);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', 98.3002030040236, 765.653589829535);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', -25.0987502451517, -174.651201240269);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', 39.9215299020147, 337.889176256456);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', 77.9225832868337, 356.183903852096);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', 75.4311841137638, 14.5258766665983);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', 58.9445375968278, 376.359576288564);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', 46.9521897141796, 3.5679984193934);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', -49.0378307695689, -230.816092788509);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', -96.2461776340861, -863.765255159092);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', -96.3388912796447, -538.147283544646);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', -21.4684477767032, -200.140077054848);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', -30.3532837083366, -226.462637188158);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample0', -17.5055590488884, -118.709622452841);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', 56.6394671790491, 385.48951169801);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', 70.4622912302344, 356.986529538635);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', 58.2647422222769, 489.418744916999);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', -92.16093253903, -425.576081634713);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', -2.64574970943097, -26.190027661226);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', -16.7568654181289, -117.460886096034);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', 68.215377945908, 606.917788617984);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', 53.7387814434413, 367.53491797949);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', -51.8861573715238, -289.998186955562);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', -15.9721784074351, -75.335027134323);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', 63.2540648905791, 602.546517566905);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', -53.376167960458, -470.921238684285);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', 40.8307443439851, 276.112653117961);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', -13.0540977188468, -127.648158921993);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', -43.7358336047599, -435.080470107322);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', -74.5673321340732, -617.960236798371);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', -6.47907144443936, -55.654651151187);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', 68.1915507628225, 352.320728639801);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', -23.5393521654339, -137.714557244391);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', 28.3621412621467, 141.103859877604);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', -99.5615230664525, -974.857161307048);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', -77.7132553058204, -736.182131225006);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', 95.9321864873013, 478.286112499176);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', 97.7451855292708, 940.301427763062);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', -10.2483179758141, -70.1145330070458);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', -24.0750124187893, -113.523998470537);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', -5.5721118558967, -43.8516395203455);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', -55.5378338160537, -368.506951528332);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', 52.6669516338013, 38.2926120131942);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', -74.1981412067658, -436.990411988621);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', -8.70511941690364, -71.3277811558721);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', 63.2921735621378, 534.825008407329);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', 97.9066635843841, 678.994971737474);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', -83.1613916743288, -494.53303650568);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', 23.4730547863992, 223.031148353333);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', 40.6105099506845, 199.937366405274);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', 35.4473225526307, 331.61786915261);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', 27.2050975460142, 146.277993239147);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', -1.54684302938646, -12.6706471561247);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample1', 45.8386162291745, 401.780882699918);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', 43.4241956158593, 228.71488367607);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', -23.4517134254585, -165.958577325218);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', -98.8954664030229, -829.964553125469);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', 48.0527046113198, 451.527720751234);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', -77.8912947988124, -416.867729852279);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', 23.8325471824168, 206.907438743452);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', 83.2787398847467, 814.01250022556);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', 49.1572992549647, 451.03037365466);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', -11.1351768833872, -57.3863334655361);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', 71.1980242104626, 572.745863967841);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', 15.0952976022392, 103.30274980367);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', 75.0300005037414, 406.581640027236);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', -82.0092720309019, -690.340287049552);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', 40.2433497232209, 363.579616486762);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', 26.8157962678174, 262.150124949525);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', -83.9563210001448, -432.739081022174);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', -20.6480437627346, -161.330015497217);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', 37.1388896882226, 161.352404658606);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', 20.2126667486174, 168.833789818416);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', 58.3723632769494, 293.206814023827);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', -20.2876832456236, -88.0090685884954);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', 72.9768050433371, 691.684023528398);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', -21.6612128833675, -130.834158714088);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', 97.4870524045038, 806.47904449193);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', 60.6688063197852, 255.749289305775);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', -44.235772358471, -336.262226570567);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', -47.39573087854, -321.133647936626);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', -24.7522484346097, -204.548308435727);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', -42.903238078129, -239.651563752902);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', 20.4656734934697, 172.700213789797);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', 56.0665747085147, 365.360390019834);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', 31.9979219049038, 237.490140339893);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', -29.9884426739069, -203.821484170813);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', 13.5011085362703, 79.4784314297668);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', 41.8402945507358, 297.04934398378);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', -84.9323678979223, -345.2331996232);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', -42.2469964847455, -361.468816319656);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', 98.1057699772752, 445.181262282444);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', 95.5327901766563, 522.663100406047);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample2', 35.0916611161316, 246.796980313209);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', 99.3987950082867, 401.97428571655);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', -3.0419413965969, -14.5325761725203);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', -79.388026451666, -701.817589967372);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', -88.451242397524, -668.370526000304);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', 34.3131838963851, 254.418322223563);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', -61.518208630511, -347.521623572776);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', 45.6124480237487, 356.33565541369);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', -1.0716036518037, -7.80544934354423);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', 31.7371714687412, 283.925868763573);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', -76.771029786315, -626.268489584739);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', -67.913690110843, -614.736930677921);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', 34.9311671860034, 171.384205820777);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', 94.3264454603021, 914.267819214392);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', 76.7493996267558, 705.649611960615);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', -87.795202856922, -749.505178721718);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', 2.10914716736019, 15.4036733330536);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', -50.456669557937, -318.410608422062);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', -94.646644883092, -734.660992935541);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', 34.9170862075359, 347.583881438806);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', 44.3524585090071, 294.615219199443);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', -67.191016143335, -609.956472872497);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', -78.826443879164, -369.129912603377);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', -50.427554400015, -418.144241602024);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', -70.371769526721, -307.02193189609);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', 16.3220947890044, 97.0997346831135);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', -47.067245718878, -398.27032236792);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', 5.91206661301702, 24.7239863780181);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', -99.621681801868, -843.593457399484);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', 87.4503492670535, 695.345037859433);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', -91.176921118057, -683.305064255346);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', -0.6632900001386, -5.34157539224209);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', 2.98188785882178, 12.1181973600389);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', 30.6008700087597, 205.922863867274);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', 7.90348761612496, 65.5271597329641);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', 40.3565229854156, 268.058138389501);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', 37.6892733312091, 247.519083233639);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', 16.4759733864001, 107.72661087278);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', -53.578492311122, -369.768816039059);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', 77.1292326560541, 765.262108306778);
+Insert into demo_scatter_plot
+ (SERIES, VALUEX, VALUEY)
+ Values
+ ('Sample3', -79.566811593352, -677.545127214159);
+
+-- DEMO_UTIL_CHART
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-04-17','%Y-%m-%d'),53.86667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-08-10','%Y-%m-%d'),62.95747);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-04-21','%Y-%m-%d'),48.80000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-04-22','%Y-%m-%d'),51.33333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-08-11','%Y-%m-%d'),56.13373);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-04-23','%Y-%m-%d'),53.40000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-08-12','%Y-%m-%d'),57.05287);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-04-24','%Y-%m-%d'),51.00000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-08-13','%Y-%m-%d'),55.78947);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-04-25','%Y-%m-%d'),54.60000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-08-14','%Y-%m-%d'),63.34907);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-04-26','%Y-%m-%d'),50.86667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-08-15','%Y-%m-%d'),52.21327);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-04-27','%Y-%m-%d'),48.33333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-08-16','%Y-%m-%d'),51.32080);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-04-28','%Y-%m-%d'),50.26667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-08-17','%Y-%m-%d'),58.35720);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-04-29','%Y-%m-%d'),51.73333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-08-18','%Y-%m-%d'),57.62293);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-04-30','%Y-%m-%d'),67.60000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-08-19','%Y-%m-%d'),55.25000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-05-01','%Y-%m-%d'),59.89393);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-08-20','%Y-%m-%d'),58.79573);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-05-02','%Y-%m-%d'),61.20753);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-08-21','%Y-%m-%d'),54.09720);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-05-03','%Y-%m-%d'),58.98340);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-08-22','%Y-%m-%d'),59.95813);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-05-04','%Y-%m-%d'),59.55873);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-08-23','%Y-%m-%d'),62.03067);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-05-05','%Y-%m-%d'),58.73680);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-08-24','%Y-%m-%d'),61.97620);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-05-06','%Y-%m-%d'),59.89967);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-08-25','%Y-%m-%d'),58.00207);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-05-07','%Y-%m-%d'),60.67973);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-08-26','%Y-%m-%d'),59.95440);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-05-08','%Y-%m-%d'),60.85913);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-08-27','%Y-%m-%d'),55.43747);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-05-09','%Y-%m-%d'),60.62460);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-08-28','%Y-%m-%d'),52.53933);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-05-10','%Y-%m-%d'),59.51887);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-08-29','%Y-%m-%d'),57.46260);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-05-11','%Y-%m-%d'),61.57187);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-08-30','%Y-%m-%d'),60.04787);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-05-12','%Y-%m-%d'),60.70000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-08-31','%Y-%m-%d'),58.79480);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-05-13','%Y-%m-%d'),69.85133);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-09-01','%Y-%m-%d'),54.40107);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-05-14','%Y-%m-%d'),68.99620);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-09-02','%Y-%m-%d'),62.26007);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-05-15','%Y-%m-%d'),67.64080);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-09-03','%Y-%m-%d'),60.72360);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-05-16','%Y-%m-%d'),59.71433);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-09-04','%Y-%m-%d'),60.95847);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-05-17','%Y-%m-%d'),59.99667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-09-05','%Y-%m-%d'),59.45920);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-05-18','%Y-%m-%d'),63.27207);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-09-06','%Y-%m-%d'),60.58620);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-05-19','%Y-%m-%d'),60.32080);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-09-07','%Y-%m-%d'),61.94207);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-05-20','%Y-%m-%d'),57.32907);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-09-08','%Y-%m-%d'),59.03327);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-05-21','%Y-%m-%d'),59.76933);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-09-09','%Y-%m-%d'),62.83087);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-05-22','%Y-%m-%d'),59.12453);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-09-10','%Y-%m-%d'),59.36840);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-05-23','%Y-%m-%d'),57.10167);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-09-11','%Y-%m-%d'),56.11480);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-05-24','%Y-%m-%d'),58.45820);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-09-12','%Y-%m-%d'),62.23393);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-05-25','%Y-%m-%d'),59.45440);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-09-13','%Y-%m-%d'),59.72313);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-05-26','%Y-%m-%d'),60.12807);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-09-14','%Y-%m-%d'),53.37093);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-05-27','%Y-%m-%d'),59.11760);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-09-15','%Y-%m-%d'),52.99233);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-05-28','%Y-%m-%d'),57.32020);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-09-16','%Y-%m-%d'),55.99080);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-05-29','%Y-%m-%d'),59.80360);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-09-17','%Y-%m-%d'),53.93853);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-05-30','%Y-%m-%d'),66.73280);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-09-18','%Y-%m-%d'),55.99313);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-05-31','%Y-%m-%d'),58.78673);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-09-19','%Y-%m-%d'),68.23393);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-06-01','%Y-%m-%d'),58.82773);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-09-20','%Y-%m-%d'),61.86213);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-06-02','%Y-%m-%d'),63.12100);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-09-21','%Y-%m-%d'),61.20307);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-06-03','%Y-%m-%d'),59.70467);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-09-22','%Y-%m-%d'),61.05900);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-06-04','%Y-%m-%d'),58.85173);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-09-23','%Y-%m-%d'),58.41040);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-06-05','%Y-%m-%d'),61.21880);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-09-24','%Y-%m-%d'),59.15967);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-06-06','%Y-%m-%d'),58.99920);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-09-25','%Y-%m-%d'),56.42153);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-06-07','%Y-%m-%d'),59.94693);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-09-26','%Y-%m-%d'),60.46580);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-06-08','%Y-%m-%d'),66.27293);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-09-27','%Y-%m-%d'),57.44333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-06-09','%Y-%m-%d'),61.46773);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-09-28','%Y-%m-%d'),56.88887);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-06-10','%Y-%m-%d'),59.70467);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-09-29','%Y-%m-%d'),61.85773);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-06-11','%Y-%m-%d'),60.16000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-09-30','%Y-%m-%d'),61.96400);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-06-12','%Y-%m-%d'),61.20300);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-10-01','%Y-%m-%d'),65.88833);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-06-13','%Y-%m-%d'),60.95673);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-10-02','%Y-%m-%d'),62.67920);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-06-14','%Y-%m-%d'),60.70207);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-10-03','%Y-%m-%d'),63.52047);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-06-15','%Y-%m-%d'),61.02520);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-10-04','%Y-%m-%d'),58.60280);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-06-16','%Y-%m-%d'),60.33953);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-10-05','%Y-%m-%d'),63.74487);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-06-17','%Y-%m-%d'),61.20300);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-10-06','%Y-%m-%d'),59.94880);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-06-18','%Y-%m-%d'),63.12100);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-10-07','%Y-%m-%d'),59.44380);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-06-23','%Y-%m-%d'),61.09153);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-10-08','%Y-%m-%d'),59.16320);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-06-24','%Y-%m-%d'),61.28867);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-10-09','%Y-%m-%d'),60.84593);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-06-25','%Y-%m-%d'),60.95673);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-10-10','%Y-%m-%d'),58.84113);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-06-26','%Y-%m-%d'),60.61100);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-10-11','%Y-%m-%d'),62.59827);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-06-27','%Y-%m-%d'),61.22913);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-10-12','%Y-%m-%d'),60.94660);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-06-28','%Y-%m-%d'),58.88507);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-10-13','%Y-%m-%d'),59.37593);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-06-29','%Y-%m-%d'),59.73693);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-10-14','%Y-%m-%d'),67.21840);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-06-30','%Y-%m-%d'),62.45307);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-10-15','%Y-%m-%d'),68.56020);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-07-01','%Y-%m-%d'),61.30167);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-10-16','%Y-%m-%d'),57.56493);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-07-02','%Y-%m-%d'),62.92727);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-10-17','%Y-%m-%d'),57.02280);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-07-03','%Y-%m-%d'),60.05887);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-10-18','%Y-%m-%d'),56.20947);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-07-06','%Y-%m-%d'),61.20100);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-10-19','%Y-%m-%d'),55.69353);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-07-07','%Y-%m-%d'),60.66120);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-10-20','%Y-%m-%d'),57.17640);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-07-08','%Y-%m-%d'),59.78180);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-10-21','%Y-%m-%d'),57.50867);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-07-09','%Y-%m-%d'),58.74653);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-10-22','%Y-%m-%d'),61.67860);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-07-10','%Y-%m-%d'),59.77893);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-10-23','%Y-%m-%d'),57.34867);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-07-11','%Y-%m-%d'),67.34500);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-10-24','%Y-%m-%d'),61.68080);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-07-12','%Y-%m-%d'),57.07293);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-10-25','%Y-%m-%d'),55.55793);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-07-13','%Y-%m-%d'),57.37567);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-10-26','%Y-%m-%d'),55.81013);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-07-14','%Y-%m-%d'),63.97820);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-10-27','%Y-%m-%d'),59.85540);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-07-15','%Y-%m-%d'),56.06647);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-10-28','%Y-%m-%d'),61.05073);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-07-16','%Y-%m-%d'),53.66347);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-10-29','%Y-%m-%d'),59.81253);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-07-23','%Y-%m-%d'),56.50813);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-10-30','%Y-%m-%d'),61.02047);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-07-24','%Y-%m-%d'),53.19667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-10-31','%Y-%m-%d'),60.60413);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-07-25','%Y-%m-%d'),51.57133);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-11-01','%Y-%m-%d'),57.43067);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-07-26','%Y-%m-%d'),45.98160);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-11-02','%Y-%m-%d'),58.63027);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-07-27','%Y-%m-%d'),49.21113);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-11-03','%Y-%m-%d'),59.08127);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-07-28','%Y-%m-%d'),49.67213);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-11-04','%Y-%m-%d'),59.37373);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-07-29','%Y-%m-%d'),52.94053);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-11-05','%Y-%m-%d'),58.13413);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-07-30','%Y-%m-%d'),57.55727);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-11-06','%Y-%m-%d'),57.18893);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-07-31','%Y-%m-%d'),61.76900);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-11-07','%Y-%m-%d'),56.72853);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-08-01','%Y-%m-%d'),56.51953);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-11-08','%Y-%m-%d'),56.47340);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-08-02','%Y-%m-%d'),61.04853);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-11-09','%Y-%m-%d'),62.02333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-08-03','%Y-%m-%d'),70.06067);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-11-10','%Y-%m-%d'),61.21787);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-08-04','%Y-%m-%d'),60.97787);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-11-11','%Y-%m-%d'),62.01087);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-08-05','%Y-%m-%d'),59.25967);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-11-12','%Y-%m-%d'),62.67573);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-08-06','%Y-%m-%d'),56.12287);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-11-13','%Y-%m-%d'),59.23993);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-08-07','%Y-%m-%d'),63.99913);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-11-14','%Y-%m-%d'),67.34973);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-08-08','%Y-%m-%d'),58.71127);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-11-15','%Y-%m-%d'),60.93753);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-08-09','%Y-%m-%d'),64.01913);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-11-16','%Y-%m-%d'),54.52607);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-11-17','%Y-%m-%d'),57.81127);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-11-18','%Y-%m-%d'),63.53027);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-11-19','%Y-%m-%d'),58.13000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-11-20','%Y-%m-%d'),58.46827);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-11-21','%Y-%m-%d'),65.27807);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-11-22','%Y-%m-%d'),53.74513);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-11-23','%Y-%m-%d'),60.99107);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-11-24','%Y-%m-%d'),60.45427);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-11-25','%Y-%m-%d'),56.16847);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-11-26','%Y-%m-%d'),59.04040);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-11-27','%Y-%m-%d'),54.62040);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-11-28','%Y-%m-%d'),56.34687);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-11-29','%Y-%m-%d'),54.81560);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-11-30','%Y-%m-%d'),60.22753);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-12-01','%Y-%m-%d'),59.07307);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-12-02','%Y-%m-%d'),59.73553);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-12-03','%Y-%m-%d'),68.69447);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-12-04','%Y-%m-%d'),68.91767);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-12-05','%Y-%m-%d'),67.86460);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-12-06','%Y-%m-%d'),64.43120);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-03-01','%Y-%m-%d'),61.22507);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-12-07','%Y-%m-%d'),60.67793);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-03-02','%Y-%m-%d'),63.27533);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-12-08','%Y-%m-%d'),62.47060);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-03-03','%Y-%m-%d'),69.88087);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-12-09','%Y-%m-%d'),58.26053);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-03-04','%Y-%m-%d'),66.84920);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-12-10','%Y-%m-%d'),61.03340);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-03-05','%Y-%m-%d'),61.57367);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-12-11','%Y-%m-%d'),57.32620);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-03-06','%Y-%m-%d'),60.52293);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-12-12','%Y-%m-%d'),63.10353);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-03-07','%Y-%m-%d'),62.21027);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-12-13','%Y-%m-%d'),61.73167);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-03-08','%Y-%m-%d'),63.20380);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-12-14','%Y-%m-%d'),65.31080);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-03-09','%Y-%m-%d'),62.72427);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-12-15','%Y-%m-%d'),64.67620);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-03-10','%Y-%m-%d'),61.59373);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-12-16','%Y-%m-%d'),62.87287);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-03-11','%Y-%m-%d'),61.21280);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-12-17','%Y-%m-%d'),60.14680);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-03-12','%Y-%m-%d'),60.79787);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-12-18','%Y-%m-%d'),63.01007);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-03-13','%Y-%m-%d'),60.00080);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-12-19','%Y-%m-%d'),57.82680);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-03-14','%Y-%m-%d'),60.82333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-12-20','%Y-%m-%d'),62.59173);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-03-15','%Y-%m-%d'),59.62020);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-12-21','%Y-%m-%d'),61.65607);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-03-16','%Y-%m-%d'),60.27420);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-12-23','%Y-%m-%d'),61.80000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-03-17','%Y-%m-%d'),60.06200);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-12-24','%Y-%m-%d'),59.93333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-03-18','%Y-%m-%d'),60.88900);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-12-25','%Y-%m-%d'),50.93333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-03-19','%Y-%m-%d'),59.92547);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-12-26','%Y-%m-%d'),60.46667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-03-20','%Y-%m-%d'),59.99853);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-12-27','%Y-%m-%d'),62.06667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-03-21','%Y-%m-%d'),58.65873);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-12-28','%Y-%m-%d'),61.93333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-03-22','%Y-%m-%d'),60.61000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-12-29','%Y-%m-%d'),61.26667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-03-23','%Y-%m-%d'),59.92280);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-12-30','%Y-%m-%d'),61.60000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-03-24','%Y-%m-%d'),59.52427);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2014-12-31','%Y-%m-%d'),62.86667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-03-25','%Y-%m-%d'),59.44887);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-01-01','%Y-%m-%d'),60.93333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-03-26','%Y-%m-%d'),60.23540);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-01-02','%Y-%m-%d'),62.66667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-03-27','%Y-%m-%d'),61.18333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-01-03','%Y-%m-%d'),62.46667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-03-28','%Y-%m-%d'),60.88133);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-01-04','%Y-%m-%d'),60.80000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-03-29','%Y-%m-%d'),61.74160);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-01-06','%Y-%m-%d'),62.40000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-03-30','%Y-%m-%d'),60.25647);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-01-08','%Y-%m-%d'),61.40000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-03-31','%Y-%m-%d'),60.41220);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-01-09','%Y-%m-%d'),63.20000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-04-01','%Y-%m-%d'),59.21053);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-01-10','%Y-%m-%d'),61.82227);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-04-02','%Y-%m-%d'),55.04713);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-01-11','%Y-%m-%d'),61.89553);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-04-03','%Y-%m-%d'),56.08473);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-01-12','%Y-%m-%d'),60.90127);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-04-04','%Y-%m-%d'),64.51107);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-01-13','%Y-%m-%d'),62.23660);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-04-05','%Y-%m-%d'),56.75193);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-01-14','%Y-%m-%d'),61.76947);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-04-06','%Y-%m-%d'),61.64240);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-01-15','%Y-%m-%d'),63.08853);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-04-07','%Y-%m-%d'),61.33653);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-01-16','%Y-%m-%d'),60.12627);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-04-08','%Y-%m-%d'),69.28867);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-01-17','%Y-%m-%d'),60.60020);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-04-09','%Y-%m-%d'),60.87507);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-01-18','%Y-%m-%d'),60.43440);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-04-10','%Y-%m-%d'),68.08707);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-01-19','%Y-%m-%d'),65.02820);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-04-11','%Y-%m-%d'),60.57680);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-01-20','%Y-%m-%d'),62.95593);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-04-12','%Y-%m-%d'),61.52467);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-01-21','%Y-%m-%d'),61.23967);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-04-13','%Y-%m-%d'),58.06567);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-01-22','%Y-%m-%d'),62.61853);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-04-14','%Y-%m-%d'),59.80807);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-01-23','%Y-%m-%d'),63.64227);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-04-15','%Y-%m-%d'),79.90007);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-01-24','%Y-%m-%d'),63.42147);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-04-16','%Y-%m-%d'),54.75020);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-01-25','%Y-%m-%d'),60.82687);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-04-17','%Y-%m-%d'),65.69500);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-01-26','%Y-%m-%d'),60.66260);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-04-18','%Y-%m-%d'),68.56247);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-01-27','%Y-%m-%d'),60.12767);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-04-19','%Y-%m-%d'),72.67153);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-01-28','%Y-%m-%d'),60.51513);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-04-20','%Y-%m-%d'),71.30720);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-01-29','%Y-%m-%d'),61.71520);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-04-21','%Y-%m-%d'),57.75233);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-01-30','%Y-%m-%d'),60.89553);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-04-22','%Y-%m-%d'),59.04200);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-01-31','%Y-%m-%d'),63.50540);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-04-23','%Y-%m-%d'),62.30153);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-02-01','%Y-%m-%d'),62.37533);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-04-24','%Y-%m-%d'),67.68287);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-02-02','%Y-%m-%d'),60.31400);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-04-25','%Y-%m-%d'),69.21800);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-02-03','%Y-%m-%d'),63.43920);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-04-26','%Y-%m-%d'),69.75993);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-02-04','%Y-%m-%d'),61.20487);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-04-27','%Y-%m-%d'),64.64113);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-02-05','%Y-%m-%d'),62.11167);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-04-28','%Y-%m-%d'),60.10053);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-02-06','%Y-%m-%d'),59.96140);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-04-29','%Y-%m-%d'),58.67653);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-02-07','%Y-%m-%d'),62.60727);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-04-30','%Y-%m-%d'),58.29180);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-02-08','%Y-%m-%d'),61.95493);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-05-01','%Y-%m-%d'),60.56173);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-02-09','%Y-%m-%d'),58.89653);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-05-02','%Y-%m-%d'),57.15840);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-02-10','%Y-%m-%d'),66.20167);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-05-03','%Y-%m-%d'),54.49167);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-02-11','%Y-%m-%d'),64.76873);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-05-04','%Y-%m-%d'),61.54087);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-02-12','%Y-%m-%d'),69.90680);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-05-05','%Y-%m-%d'),63.86073);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-02-13','%Y-%m-%d'),68.49253);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-05-06','%Y-%m-%d'),64.13460);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-02-14','%Y-%m-%d'),63.19360);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-05-07','%Y-%m-%d'),65.30087);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-02-15','%Y-%m-%d'),63.35453);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-05-08','%Y-%m-%d'),64.46353);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-02-16','%Y-%m-%d'),59.78020);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-05-09','%Y-%m-%d'),62.81193);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-02-17','%Y-%m-%d'),60.70760);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-05-10','%Y-%m-%d'),56.14480);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-02-18','%Y-%m-%d'),58.05167);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-05-11','%Y-%m-%d'),61.47853);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-02-19','%Y-%m-%d'),57.12700);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-05-12','%Y-%m-%d'),63.39287);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-02-20','%Y-%m-%d'),59.49013);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-05-13','%Y-%m-%d'),64.30640);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-02-21','%Y-%m-%d'),59.18607);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-05-14','%Y-%m-%d'),64.29447);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-02-22','%Y-%m-%d'),60.94680);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-05-15','%Y-%m-%d'),65.63307);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-02-23','%Y-%m-%d'),59.85807);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-05-16','%Y-%m-%d'),62.32887);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-02-24','%Y-%m-%d'),60.06767);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-05-17','%Y-%m-%d'),56.52853);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-02-25','%Y-%m-%d'),61.60267);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-05-18','%Y-%m-%d'),70.26520);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-02-26','%Y-%m-%d'),60.94220);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-05-19','%Y-%m-%d'),64.38267);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-02-27','%Y-%m-%d'),59.99040);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-05-20','%Y-%m-%d'),63.01447);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-02-28','%Y-%m-%d'),63.05567);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-05-21','%Y-%m-%d'),61.89200);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-05-22','%Y-%m-%d'),62.06920);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-05-23','%Y-%m-%d'),68.49253);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-05-24','%Y-%m-%d'),69.98867);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-05-25','%Y-%m-%d'),60.26940);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-05-26','%Y-%m-%d'),62.91493);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-06-09','%Y-%m-%d'),62.28433);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-05-27','%Y-%m-%d'),62.36827);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-06-10','%Y-%m-%d'),64.38787);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-06-11','%Y-%m-%d'),61.17093);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-05-28','%Y-%m-%d'),60.33887);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-06-12','%Y-%m-%d'),57.17713);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-05-29','%Y-%m-%d'),83.89220);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-06-13','%Y-%m-%d'),57.69653);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-05-30','%Y-%m-%d'),60.96747);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-06-14','%Y-%m-%d'),55.97980);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-05-31','%Y-%m-%d'),57.80627);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-06-15','%Y-%m-%d'),62.08940);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-06-01','%Y-%m-%d'),61.60173);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-06-16','%Y-%m-%d'),83.81047);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-06-02','%Y-%m-%d'),63.23627);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-06-17','%Y-%m-%d'),61.32540);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-06-03','%Y-%m-%d'),58.39987);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-06-18','%Y-%m-%d'),61.08900);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-06-04','%Y-%m-%d'),69.51947);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-06-19','%Y-%m-%d'),67.26267);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-06-05','%Y-%m-%d'),69.67787);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-06-20','%Y-%m-%d'),58.71120);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-06-06','%Y-%m-%d'),62.40513);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-06-21','%Y-%m-%d'),55.77320);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-06-07','%Y-%m-%d'),61.01893);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-06-22','%Y-%m-%d'),59.99420);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-06-08','%Y-%m-%d'),61.34813);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-06-23','%Y-%m-%d'),60.83867);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-06-24','%Y-%m-%d'),59.57020);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-06-25','%Y-%m-%d'),63.20393);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-09-17','%Y-%m-%d'),67.93333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-06-26','%Y-%m-%d'),58.30480);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-09-18','%Y-%m-%d'),64.06667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-06-27','%Y-%m-%d'),58.79667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-09-19','%Y-%m-%d'),60.13333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-06-28','%Y-%m-%d'),54.04967);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-09-20','%Y-%m-%d'),57.86667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-06-29','%Y-%m-%d'),57.88313);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-09-21','%Y-%m-%d'),58.33333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-06-30','%Y-%m-%d'),56.94940);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-09-22','%Y-%m-%d'),59.86667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-07-01','%Y-%m-%d'),65.01080);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-09-23','%Y-%m-%d'),59.60000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-07-02','%Y-%m-%d'),64.97013);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-09-24','%Y-%m-%d'),59.80000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-07-03','%Y-%m-%d'),65.06647);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-09-25','%Y-%m-%d'),59.46667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-07-04','%Y-%m-%d'),64.08287);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-09-26','%Y-%m-%d'),76.00000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-07-05','%Y-%m-%d'),65.40367);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-09-27','%Y-%m-%d'),59.86667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-07-06','%Y-%m-%d'),72.61373);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-09-28','%Y-%m-%d'),59.13333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-07-07','%Y-%m-%d'),72.53120);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-09-29','%Y-%m-%d'),58.93333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-07-08','%Y-%m-%d'),72.54133);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-12-26','%Y-%m-%d'),58.93333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-09-30','%Y-%m-%d'),54.00000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-10-01','%Y-%m-%d'),58.26667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-10-02','%Y-%m-%d'),59.46667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-10-03','%Y-%m-%d'),58.86667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-10-04','%Y-%m-%d'),60.33333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-10-05','%Y-%m-%d'),101.00000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-10-06','%Y-%m-%d'),58.00000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-10-07','%Y-%m-%d'),59.53333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-10-08','%Y-%m-%d'),56.00000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-10-09','%Y-%m-%d'),57.93333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-10-10','%Y-%m-%d'),65.73333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-10-11','%Y-%m-%d'),56.00000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-10-12','%Y-%m-%d'),54.86667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-10-13','%Y-%m-%d'),68.60000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-10-14','%Y-%m-%d'),69.93333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-10-15','%Y-%m-%d'),66.86667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-10-16','%Y-%m-%d'),58.66667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-10-17','%Y-%m-%d'),60.06667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-10-18','%Y-%m-%d'),58.40000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-10-19','%Y-%m-%d'),55.26667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-10-20','%Y-%m-%d'),55.86667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-10-21','%Y-%m-%d'),57.86667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-10-22','%Y-%m-%d'),57.40000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-10-23','%Y-%m-%d'),58.20000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-10-24','%Y-%m-%d'),57.93333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-10-25','%Y-%m-%d'),58.60000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-10-26','%Y-%m-%d'),61.66667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-10-27','%Y-%m-%d'),57.66667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-10-28','%Y-%m-%d'),58.40000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-10-29','%Y-%m-%d'),59.33333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-10-30','%Y-%m-%d'),55.73333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-10-31','%Y-%m-%d'),53.80000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-11-01','%Y-%m-%d'),56.86667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-11-02','%Y-%m-%d'),57.00000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-11-03','%Y-%m-%d'),55.00000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-11-04','%Y-%m-%d'),57.06667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-11-05','%Y-%m-%d'),65.13333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-11-06','%Y-%m-%d'),55.26667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-11-07','%Y-%m-%d'),57.60000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-11-08','%Y-%m-%d'),59.06667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-11-09','%Y-%m-%d'),60.13333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-11-10','%Y-%m-%d'),58.93333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-11-11','%Y-%m-%d'),58.13333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-11-12','%Y-%m-%d'),57.40000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-11-13','%Y-%m-%d'),57.66667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-11-14','%Y-%m-%d'),55.80000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-11-15','%Y-%m-%d'),55.66667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-11-16','%Y-%m-%d'),58.26667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-11-17','%Y-%m-%d'),58.93333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-11-18','%Y-%m-%d'),64.73333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-11-19','%Y-%m-%d'),59.26667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-11-20','%Y-%m-%d'),57.66667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-11-21','%Y-%m-%d'),57.00000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-11-22','%Y-%m-%d'),59.00000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-11-23','%Y-%m-%d'),56.80000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-11-24','%Y-%m-%d'),58.60000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-11-25','%Y-%m-%d'),57.80000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-11-26','%Y-%m-%d'),57.13333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-11-27','%Y-%m-%d'),53.00000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-11-28','%Y-%m-%d'),58.80000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-11-29','%Y-%m-%d'),56.80000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-11-30','%Y-%m-%d'),58.93333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-12-01','%Y-%m-%d'),60.40000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-12-02','%Y-%m-%d'),59.60000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-12-03','%Y-%m-%d'),58.53333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-12-04','%Y-%m-%d'),77.60000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-12-05','%Y-%m-%d'),56.53333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-12-06','%Y-%m-%d'),55.93333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-12-07','%Y-%m-%d'),57.13333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-12-08','%Y-%m-%d'),57.20000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-12-09','%Y-%m-%d'),71.86667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-12-10','%Y-%m-%d'),62.53333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-12-11','%Y-%m-%d'),59.93333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-12-12','%Y-%m-%d'),59.13333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-12-13','%Y-%m-%d'),62.73333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-12-14','%Y-%m-%d'),59.66667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-12-15','%Y-%m-%d'),59.86667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-12-16','%Y-%m-%d'),62.00000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-12-17','%Y-%m-%d'),66.73333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-12-18','%Y-%m-%d'),59.46667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-12-19','%Y-%m-%d'),60.66667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-12-20','%Y-%m-%d'),57.26667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-12-21','%Y-%m-%d'),60.86667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-12-22','%Y-%m-%d'),59.86667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-12-23','%Y-%m-%d'),61.13333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-12-24','%Y-%m-%d'),57.93333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-12-25','%Y-%m-%d'),52.73333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-07-09','%Y-%m-%d'),70.77980);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-07-10','%Y-%m-%d'),70.40000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-07-11','%Y-%m-%d'),60.00000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-07-12','%Y-%m-%d'),58.40000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-07-13','%Y-%m-%d'),58.80000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-07-14','%Y-%m-%d'),58.73333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-07-15','%Y-%m-%d'),68.86667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-07-16','%Y-%m-%d'),84.00000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-07-17','%Y-%m-%d'),61.13333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-07-18','%Y-%m-%d'),64.40000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-07-19','%Y-%m-%d'),59.60000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-07-20','%Y-%m-%d'),77.00000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-07-21','%Y-%m-%d'),60.53333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-07-22','%Y-%m-%d'),65.33333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-07-23','%Y-%m-%d'),68.06667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-07-24','%Y-%m-%d'),58.53333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-07-25','%Y-%m-%d'),56.86667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-07-26','%Y-%m-%d'),58.73333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-07-27','%Y-%m-%d'),59.06667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-07-28','%Y-%m-%d'),59.73333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-07-29','%Y-%m-%d'),58.46667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-07-30','%Y-%m-%d'),59.40000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-12-27','%Y-%m-%d'),59.06667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-07-31','%Y-%m-%d'),57.93333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-12-28','%Y-%m-%d'),305.60000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-08-01','%Y-%m-%d'),59.93333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-12-29','%Y-%m-%d'),62.26667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-08-02','%Y-%m-%d'),61.26667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-12-30','%Y-%m-%d'),60.53333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-08-03','%Y-%m-%d'),59.06667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-12-31','%Y-%m-%d'),60.66667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-08-04','%Y-%m-%d'),83.00000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-01-01','%Y-%m-%d'),55.00000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-08-05','%Y-%m-%d'),59.80000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-01-02','%Y-%m-%d'),61.26667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-08-06','%Y-%m-%d'),58.53333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-01-03','%Y-%m-%d'),61.20000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-08-07','%Y-%m-%d'),59.13333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-01-04','%Y-%m-%d'),62.46667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-08-08','%Y-%m-%d'),57.33333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-01-05','%Y-%m-%d'),61.40000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-08-09','%Y-%m-%d'),58.66667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-01-06','%Y-%m-%d'),61.13333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-08-10','%Y-%m-%d'),59.06667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-01-07','%Y-%m-%d'),62.46667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-08-11','%Y-%m-%d'),58.80000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-01-08','%Y-%m-%d'),100.66667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-08-12','%Y-%m-%d'),57.20000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-01-09','%Y-%m-%d'),62.60000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-08-13','%Y-%m-%d'),61.60000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-01-10','%Y-%m-%d'),66.00000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-08-14','%Y-%m-%d'),58.66667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-01-11','%Y-%m-%d'),61.20000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-08-15','%Y-%m-%d'),59.66667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-01-12','%Y-%m-%d'),60.46667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-08-16','%Y-%m-%d'),61.40000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-01-13','%Y-%m-%d'),61.46667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-08-17','%Y-%m-%d'),59.06667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-01-14','%Y-%m-%d'),60.93333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-08-18','%Y-%m-%d'),59.60000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-01-15','%Y-%m-%d'),61.26667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-08-19','%Y-%m-%d'),59.60000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-01-16','%Y-%m-%d'),61.53333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-08-20','%Y-%m-%d'),60.33333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-01-17','%Y-%m-%d'),70.93333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-08-21','%Y-%m-%d'),63.80000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-01-18','%Y-%m-%d'),61.46667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-08-22','%Y-%m-%d'),58.53333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-01-19','%Y-%m-%d'),61.33333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-08-23','%Y-%m-%d'),59.00000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-01-20','%Y-%m-%d'),61.00000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-08-24','%Y-%m-%d'),59.66667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-01-21','%Y-%m-%d'),61.86667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-08-25','%Y-%m-%d'),63.06667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-01-22','%Y-%m-%d'),60.93333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-08-26','%Y-%m-%d'),61.33333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-01-23','%Y-%m-%d'),61.26667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-08-27','%Y-%m-%d'),60.73333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-01-24','%Y-%m-%d'),60.80000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-08-28','%Y-%m-%d'),57.13333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-01-25','%Y-%m-%d'),61.13333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-08-29','%Y-%m-%d'),59.13333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-01-26','%Y-%m-%d'),61.86667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-08-30','%Y-%m-%d'),57.13333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-01-27','%Y-%m-%d'),61.93333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-08-31','%Y-%m-%d'),59.86667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-01-28','%Y-%m-%d'),61.33333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-09-01','%Y-%m-%d'),58.26667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-01-29','%Y-%m-%d'),61.06667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-09-02','%Y-%m-%d'),61.46667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-01-30','%Y-%m-%d'),61.46667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-09-03','%Y-%m-%d'),59.60000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-01-31','%Y-%m-%d'),59.26667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-09-04','%Y-%m-%d'),59.53333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-02-01','%Y-%m-%d'),60.86667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-09-05','%Y-%m-%d'),59.93333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-02-02','%Y-%m-%d'),60.86667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-09-06','%Y-%m-%d'),61.66667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-02-03','%Y-%m-%d'),60.00000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-09-07','%Y-%m-%d'),59.20000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-02-04','%Y-%m-%d'),61.06667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-09-08','%Y-%m-%d'),61.73333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-02-05','%Y-%m-%d'),60.80000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-09-09','%Y-%m-%d'),61.60000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-02-06','%Y-%m-%d'),60.46667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-09-10','%Y-%m-%d'),60.26667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-02-07','%Y-%m-%d'),60.66667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-09-11','%Y-%m-%d'),58.00000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-02-08','%Y-%m-%d'),61.00000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-09-12','%Y-%m-%d'),58.60000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-02-09','%Y-%m-%d'),61.26667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-09-13','%Y-%m-%d'),58.53333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-02-10','%Y-%m-%d'),60.60000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-09-14','%Y-%m-%d'),60.66667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-02-11','%Y-%m-%d'),60.13333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-09-15','%Y-%m-%d'),62.06667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-02-12','%Y-%m-%d'),59.93333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2015-09-16','%Y-%m-%d'),65.60000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-02-13','%Y-%m-%d'),61.60000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-02-14','%Y-%m-%d'),69.33333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-02-15','%Y-%m-%d'),59.80000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-02-16','%Y-%m-%d'),59.80000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-02-17','%Y-%m-%d'),60.46667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-02-18','%Y-%m-%d'),61.26667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-02-19','%Y-%m-%d'),62.33333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-02-20','%Y-%m-%d'),60.93333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-02-21','%Y-%m-%d'),59.73333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-02-22','%Y-%m-%d'),61.40000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-02-23','%Y-%m-%d'),60.93333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-02-24','%Y-%m-%d'),64.13333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-02-25','%Y-%m-%d'),61.53333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-02-26','%Y-%m-%d'),59.06667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-02-27','%Y-%m-%d'),61.60000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-02-28','%Y-%m-%d'),60.86667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-02-29','%Y-%m-%d'),61.00000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-03-01','%Y-%m-%d'),61.86667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-03-02','%Y-%m-%d'),61.66667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-03-03','%Y-%m-%d'),60.73333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-03-04','%Y-%m-%d'),61.26667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-03-05','%Y-%m-%d'),61.60000);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-03-06','%Y-%m-%d'),61.33333);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-03-07','%Y-%m-%d'),61.86667);
+INSERT INTO demo_util_chart (TRAFFIC_DATE,UTIL_PERC ) VALUES (str_to_date('2016-03-08','%Y-%m-%d'),62.00000);
+
+commit;
diff --git a/ecomp-sdk/epsdk-app-common/db-scripts/readme.txt b/ecomp-sdk/epsdk-app-common/db-scripts/readme.txt
new file mode 100644
index 0000000..d128cbd
--- /dev/null
+++ b/ecomp-sdk/epsdk-app-common/db-scripts/readme.txt
@@ -0,0 +1,54 @@
+This Readme file contains a description of all the database scripts located in
+
+ epsdk-app-common / db-scripts /
+
+***************************************************************************************************************************************
+
+Directions:
+
+DDL
+EcompSdkDDLMySql_1707_Common.sql - this is the DDL entries that are in common
+
+DML
+EcompSdkDMLMySql_1707_Common.sql - this is the DML entries that are in common
+
+
+***************************************************************************************************************************************
+ epsdk-app-common / db-scripts /
+***************************************************************************************************************************************
+5.EcompSdkDDLMySql_1707_Common.sql This script creates tables in the 1707 COMMON version of the ECOMP SDK application database.
+ Additional DDL scripts may be required for different versions!
+6.EcompSdkDMLMySql_1707_Common.sql This script populates tables in the 1707 COMMON version of the ECOMP SDK application database.
+ Additional DML scripts are required for different versions!
+
+
+*****************************************************
+Upgrading from 1607 SDK to 1610 SDK
+*****************************************************
+EcompSdkDDL_1610_Add.sql This is the Upgrade script for the 1610 Version of the SDK database called ecomp_sdk;
+ upgrading from the 1607 version
+EcompSdkDML_1610_Add.sql This is the Upgrade script for the default data for the 1610 Version of the SDK database called ecomp_sdk;
+ upgrading from the 1607 version
+*****************************************************
+Upgrading from 1610 SDK to 1702 SDK
+*****************************************************
+If you are starting with a 1610 environment and want to bring it up to 1702,
+you can run the following scripts in this order:
+EcompSdkDML_1702_Add_1.sql
+EcompSdkDML_1702_Add_2.sql
+EcompSdkDML_1702_Add_3.sql
+EcompSdkDML_1702_Add_4.sql
+EcompSdkDML_1702_Add_5.sql
+
+You can roll back the changes from the corresponding 1702 Add scripts with these rollback scripts:
+EcompSdkDML_1702_Rollback_1.sql
+EcompSdkDML_1702_Rollback_2.sql
+EcompSdkDML_1702_Rollback_3.sql
+EcompSdkDML_1702_Rollback_4.sql
+EcompSdkDML_1702_Rollback_5.sql
+
+*****************************************************
+Complete Scripts for 1702
+*****************************************************
+EcompSdkDDLMySql_1702.sql This is for the 1702 DDL Version of SDK database called ecomp_sdk
+EcompSdkDMLMySql_1702.sql This is for the default data for 1702 Version of SDK database called ecomp_sdk
diff --git a/ecomp-sdk/epsdk-app-common/pom.xml b/ecomp-sdk/epsdk-app-common/pom.xml
new file mode 100644
index 0000000..dbf4733
--- /dev/null
+++ b/ecomp-sdk/epsdk-app-common/pom.xml
@@ -0,0 +1,294 @@
+<?xml version="1.0"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.openecomp.ecompsdkos</groupId>
+ <artifactId>epsdk-project</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ </parent>
+
+ <!-- GroupId is inherited from parent -->
+ <artifactId>epsdk-app-common</artifactId>
+ <!-- Version is inherited from parent -->
+ <packaging>jar</packaging>
+ <name>ECOMP Portal SDK Webapp Common Classes</name>
+ <description>ECOMP Portal SDK Web Application common classes</description>
+ <url>https://wiki.onap.org/display/DW/Portal</url>
+
+ <properties>
+ <encoding>UTF-8</encoding>
+ <epsdk.version>1.1.0-SNAPSHOT</epsdk.version>
+ <springframework.version>4.2.0.RELEASE</springframework.version>
+ <hibernate.version>4.3.11.Final</hibernate.version>
+ <!-- Skip assembling the zip; assemble via mvn -Dskipassembly=false .. -->
+ <skipassembly>true</skipassembly>
+ <!-- Tests usually require some setup that maven cannot do, so skip. -->
+ <skiptests>true</skiptests>
+ <nexusproxy>https://nexus.onap.org</nexusproxy>
+ <snapshotNexusPath>/content/repositories/snapshots/</snapshotNexusPath>
+ <releaseNexusPath>/content/repositories/releases/</releaseNexusPath>
+ <stagingNexusPath>/content/repositories/staging/</stagingNexusPath>
+ </properties>
+
+ <repositories>
+ <repository>
+ <!-- Releases repository has ECOMP release artifacts -->
+ <id>ecomp-releases</id>
+ <name>OpenECOMP - Release Repository</name>
+ <url>${nexusproxy}/${releaseNexusPath}</url>
+ </repository>
+ <repository>
+ <!-- Snapshots repository has ECOMP snapshot artifacts -->
+ <id>ecomp-snapshots</id>
+ <name>OpenECOMP - Snapshot Repository</name>
+ <url>${nexusproxy}/${snapshotNexusPath}</url>
+ </repository>
+ <repository>
+ <!-- Staging repository has ECOMP staging artifacts -->
+ <id>ecomp-staging</id>
+ <name>OpenECOMP - Staging Repository</name>
+ <url>${nexusproxy}/${stagingNexusPath}</url>
+ </repository>
+ <repository>
+ <!-- Snapshots repository has ECOMP snapshot artifacts -->
+ <id>oss-snapshots</id>
+ <name>oss Central - Snapshots</name>
+ <url>https://oss.sonatype.org/service/local/repositories/releases/content/</url>
+ </repository>
+ </repositories>
+
+ <profiles>
+ <!-- disable doclint, a new feature in Java 8, when generating javadoc -->
+ <profile>
+ <id>doclint-java8-disable</id>
+ <activation>
+ <jdk>[1.8,)</jdk>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.10.4</version>
+ <configuration>
+ <additionalparam>-Xdoclint:none</additionalparam>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
+ <build>
+
+ <plugins>
+ <!-- Compile to Java 1.8 class output format -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>3.1</version>
+ <configuration>
+ <source>1.8</source>
+ <target>1.8</target>
+ </configuration>
+ </plugin>
+
+ <!-- Put version into jar also -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>2.6</version>
+ <configuration>
+ <archive>
+ <manifestEntries>
+ <archive-version>${project.version}</archive-version>
+ </manifestEntries>
+ </archive>
+ </configuration>
+ </plugin>
+
+ <!-- Generate javadoc jar; see profile for Java 8 -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.10.3</version>
+ <executions>
+ <execution>
+ <id>attach-javadocs</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <!-- Generate source jar -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <version>3.0.0</version>
+ <executions>
+ <execution>
+ <id>attach-sources</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.19.1</version>
+ <configuration>
+ <skipTests>${skiptests}</skipTests>
+ <includes>
+ <include>**/Test*.java</include>
+ <include>**/*Test.java</include>
+ <include>**/*TestCase.java</include>
+ </includes>
+ <additionalClasspathElements>
+ <additionalClasspathElement>${basedir}/war</additionalClasspathElement>
+ </additionalClasspathElements>
+ <systemPropertyVariables>
+ <container.classpath>classpath:</container.classpath>
+ </systemPropertyVariables>
+ </configuration>
+ </plugin>
+
+
+ </plugins>
+ </build>
+ <dependencies>
+ <!-- SDK components -->
+ <dependency>
+ <groupId>org.openecomp.ecompsdkos</groupId>
+ <artifactId>epsdk-core</artifactId>
+ <version>${epsdk.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.ecompsdkos</groupId>
+ <artifactId>epsdk-analytics</artifactId>
+ <version>${epsdk.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.ecompsdkos</groupId>
+ <artifactId>epsdk-workflow</artifactId>
+ <version>${epsdk.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.att.eelf</groupId>
+ <artifactId>eelf-core</artifactId>
+ <version>1.0.0</version>
+ </dependency>
+ <!-- Mapper -->
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-annotations</artifactId>
+ <version>2.6.3</version>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-core</artifactId>
+ <version>2.6.3</version>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-databind</artifactId>
+ <version>2.6.3</version>
+ </dependency>
+ <dependency>
+ <groupId>com.mchange</groupId>
+ <artifactId>c3p0</artifactId>
+ <version>0.9.5.2</version>
+ </dependency>
+ <dependency>
+ <groupId>io.searchbox</groupId>
+ <artifactId>jest</artifactId>
+ <version>2.0.0</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>javax.servlet-api</artifactId>
+ <version>3.1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.12</version>
+ </dependency>
+ <!-- Elastic Search -->
+ <dependency>
+ <groupId>org.elasticsearch</groupId>
+ <artifactId>elasticsearch</artifactId>
+ <version>2.2.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.json</groupId>
+ <artifactId>json</artifactId>
+ <version>20160212</version>
+ </dependency>
+ <dependency>
+ <groupId>org.quartz-scheduler</groupId>
+ <artifactId>quartz</artifactId>
+ <version>2.2.1</version>
+ <exclusions>
+ <!-- exclude 0.9.1.1 to avoid dupe of com.mchange:c3p0:0.9.2.1 -->
+ <exclusion>
+ <groupId>c3p0</groupId>
+ <artifactId>c3p0</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <!-- bridge to implement commons-logging using slf4j -->
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>jcl-over-slf4j</artifactId>
+ <version>1.7.12</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context-support</artifactId>
+ <version>${springframework.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-core</artifactId>
+ <version>${springframework.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-test</artifactId>
+ <version>${springframework.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-tx</artifactId>
+ <version>${springframework.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-web</artifactId>
+ <version>${springframework.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-webmvc</artifactId>
+ <version>${springframework.version}</version>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/AdminController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/AdminController.java
new file mode 100644
index 0000000..c090470
--- /dev/null
+++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/AdminController.java
@@ -0,0 +1,52 @@
+/*-
+ * ================================================================================
+ * ECOMP Portal SDK
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.controller.core;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.openecomp.portalsdk.core.controller.RestrictedBaseController;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.servlet.ModelAndView;
+
+public class AdminController {
+ @Controller
+ @RequestMapping("/")
+ public class AngularSinglePageController extends RestrictedBaseController {
+
+ @RequestMapping(value = { "/admin" }, method = RequestMethod.GET)
+ public ModelAndView view(HttpServletRequest request) {
+ Map<String, Object> model = new HashMap<String, Object>();
+ return new ModelAndView("admin", "model", model);
+ }
+
+ @RequestMapping(value = { "/admin2" }, method = RequestMethod.GET)
+ public ModelAndView adminView(HttpServletRequest request) {
+ Map<String, Object> model = new HashMap<String, Object>();
+ return new ModelAndView("admin2", "model", model);
+ }
+
+
+ }
+}
diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/AngularAdminController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/AngularAdminController.java
new file mode 100644
index 0000000..7441106
--- /dev/null
+++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/AngularAdminController.java
@@ -0,0 +1,51 @@
+/*-
+ * ================================================================================
+ * ECOMP Portal SDK
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.controller.core;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.openecomp.portalsdk.core.controller.RestrictedBaseController;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.servlet.ModelAndView;
+
+@Controller
+@RequestMapping("/")
+public class AngularAdminController extends RestrictedBaseController{
+
+ @RequestMapping(value = {"/userProfile" }, method = RequestMethod.GET)
+ public ModelAndView view(HttpServletRequest request) {
+ Map<String, Object> model = new HashMap<String, Object>();
+
+ return new ModelAndView("user_profile_list","model", model);
+ }
+
+ @RequestMapping(value = {"/admin" }, method = RequestMethod.GET)
+ public ModelAndView adminView(HttpServletRequest request) {
+ Map<String, Object> model = new HashMap<String, Object>();
+
+ return new ModelAndView(getViewName(),"model", model);
+ }
+
+} \ No newline at end of file
diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/CacheAdminController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/CacheAdminController.java
new file mode 100644
index 0000000..81d35f3
--- /dev/null
+++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/CacheAdminController.java
@@ -0,0 +1,248 @@
+/*-
+ * ================================================================================
+ * ECOMP Portal SDK
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.controller.core;
+
+import java.io.PrintWriter;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.jcs.JCS;
+import org.apache.jcs.admin.CacheRegionInfo;
+import org.apache.jcs.admin.JCSAdminBean;
+import org.apache.jcs.engine.behavior.ICacheElement;
+import org.json.JSONArray;
+import org.json.JSONObject;
+import org.openecomp.portalsdk.core.controller.RestrictedBaseController;
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.portalsdk.core.web.support.JsonMessage;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.servlet.ModelAndView;
+
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializationFeature;
+
+@Controller
+@RequestMapping("/")
+public class CacheAdminController extends RestrictedBaseController {
+
+ private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(CacheAdminController.class);
+
+ private JCSAdminBean jcsAdminBean = new JCSAdminBean();
+
+ @RequestMapping(value = { "/jcs_admin" }, method = RequestMethod.GET)
+ public ModelAndView cacheAdmin(HttpServletRequest request) {
+ Map<String, Object> model = new HashMap<String, Object>();
+
+ model.put("model", getRegions());
+
+ return new ModelAndView(getViewName(), model);
+ }
+
+ @RequestMapping(value = { "/get_regions" }, method = RequestMethod.GET)
+ public void getRegions(HttpServletRequest request, HttpServletResponse response) {
+ try {
+ JsonMessage msg = new JsonMessage(getRegions().toString());
+ JSONObject j = new JSONObject(msg);
+ response.getWriter().write(j.toString());
+ } catch (Exception e) {
+ logger.error(EELFLoggerDelegate.errorLogger, "getRegions failed", e);
+ }
+ }
+
+ @RequestMapping(value = { "/jcs_admin/clearRegion" }, method = RequestMethod.GET)
+ public void clearRegion(HttpServletRequest request, HttpServletResponse response) throws Exception {
+ String cacheName = (String) request.getParameter("cacheName");
+ clearCacheRegion(cacheName);
+
+ response.setContentType("application/json");
+ PrintWriter out = response.getWriter();
+ out.write(getRegions().toString());
+ }
+
+ @RequestMapping(value = { "/jcs_admin/clearAll" }, method = RequestMethod.GET)
+ public void clearAll(HttpServletRequest request, HttpServletResponse response) throws Exception {
+ clearAllRegions();
+
+ response.setContentType("application/json");
+ PrintWriter out = response.getWriter();
+ out.write(getRegions().toString());
+ }
+
+ @RequestMapping(value = { "/jcs_admin/clearItem" }, method = RequestMethod.GET)
+ public void clearItem(HttpServletRequest request, HttpServletResponse response) throws Exception {
+ String keyName = (String) request.getParameter("keyName");
+ String cacheName = (String) request.getParameter("cacheName");
+ clearCacheRegionItem(cacheName, keyName);
+
+ response.setContentType("application/json");
+ PrintWriter out = response.getWriter();
+ out.write(getRegions().toString());
+ }
+
+ @RequestMapping(value = { "/jcs_admin/showItemDetails" }, method = RequestMethod.GET)
+ public void showItemDetails(HttpServletRequest request, HttpServletResponse response) throws Exception {
+ String cacheName = (String) request.getParameter("cacheName");
+ String keyName = (String) request.getParameter("keyName");
+ String details = null;
+
+ try {
+ details = getItemDetails(cacheName, keyName);
+ } catch (Exception e) {
+ details = "There was an error retrieving the region details. Please try again.";
+ logger.error(EELFLoggerDelegate.errorLogger, "showItemDetails failed for cache name " + cacheName, e);
+ }
+ JSONObject j = new JSONObject(details);
+ response.setContentType("application/json");
+ // response.setContentType("text/plain");
+ PrintWriter out = response.getWriter();
+ out.write(j.toString());
+ }
+
+ @RequestMapping(value = { "/jcs_admin/showRegionDetails" }, method = RequestMethod.GET)
+ public void showRegionDetails(HttpServletRequest request, HttpServletResponse response) throws Exception {
+ String cacheName = (String) request.getParameter("cacheName");
+ String details = null;
+ ObjectMapper mapper = new ObjectMapper();
+ JSONObject j = null;
+ try {
+ details = getRegionStats(cacheName);
+ JsonMessage msg = new JsonMessage(mapper.writeValueAsString(details));
+ j = new JSONObject(msg);
+
+ } catch (Exception e) {
+ details = "There was an error retrieving the region details. Please try again.";
+ logger.error(EELFLoggerDelegate.errorLogger, "showRegionDetailed failed for cache name " + cacheName, e);
+ }
+
+ response.setContentType("application/json");
+
+ PrintWriter out = response.getWriter();
+ // out.write(details);
+ out.write(j.toString());
+ }
+
+ @SuppressWarnings("unchecked")
+ public JSONArray getRegions() {
+ LinkedList<CacheRegionInfo> regions = null;
+ JSONArray ja = new JSONArray();
+ try {
+ regions = getJcsAdminBean().buildCacheInfo();
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+ mapper.disable(SerializationFeature.FAIL_ON_EMPTY_BEANS);
+ for (CacheRegionInfo cri : regions) {
+ if (cri.getCache().getCacheName() != null && !cri.getCache().getCacheName().equals("[object Object]")) {
+ JSONObject jo = new JSONObject();
+ jo.put("cacheName", cri.getCache().getCacheName());
+ jo.put("size", cri.getCache().getSize());
+ jo.put("byteCount", cri.getByteCount());
+ jo.put("status", cri.getStatus());
+ jo.put("hitCountRam", cri.getCache().getHitCountRam());
+ jo.put("hitCountAux", cri.getCache().getHitCountAux());
+ jo.put("missCountNotFound", cri.getCache().getMissCountNotFound());
+ jo.put("missCountExpired", cri.getCache().getMissCountExpired());
+ jo.put("items",
+ new JSONArray(mapper.writeValueAsString(getRegionItems(cri.getCache().getCacheName()))));
+ ja.put(jo);
+ }
+ }
+ } catch (Exception e) {
+ logger.error(EELFLoggerDelegate.errorLogger, "getRegions failed", e);
+ }
+
+ return ja;
+ }
+
+ private String getRegionStats(String cacheName) throws Exception {
+ String stats = "";
+
+ JCS cache = JCS.getInstance(cacheName);
+ stats = cache.getStats();
+
+ return stats;
+ }
+
+ private String getItemDetails(String cacheName, String keyName) throws Exception {
+ String details = "";
+
+ JCS cache = JCS.getInstance(cacheName);
+ ICacheElement element = cache.getCacheElement(keyName);
+
+ if (element != null) {
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.disable(SerializationFeature.FAIL_ON_EMPTY_BEANS);
+ details = mapper.writeValueAsString(element);
+ }
+
+ return details;
+ }
+
+ @SuppressWarnings("rawtypes")
+ private List getRegionItems(String cacheName) {
+ List items = null;
+
+ try {
+ items = getJcsAdminBean().buildElementInfo(cacheName);
+ } catch (Exception e) {
+ logger.error(EELFLoggerDelegate.errorLogger, "getRegionItems failed for cache name " + cacheName, e);
+ }
+ return items;
+ }
+
+ private void clearAllRegions() {
+ try {
+ getJcsAdminBean().clearAllRegions();
+ } catch (Exception e) {
+ logger.error(EELFLoggerDelegate.errorLogger, "clearAllRegions faield", e);
+ }
+ }
+
+ private void clearCacheRegion(String cacheName) {
+ try {
+ getJcsAdminBean().clearRegion(cacheName);
+ } catch (Exception e) {
+ logger.error(EELFLoggerDelegate.errorLogger, "clearCacheRegion failed for cache name " + cacheName, e);
+ }
+ }
+
+ private void clearCacheRegionItem(String cacheName, String keyName) {
+ try {
+ getJcsAdminBean().removeItem(cacheName, keyName);
+ } catch (Exception e) {
+ logger.error(EELFLoggerDelegate.errorLogger, "clearCacheRegionItem failed for key name " + keyName, e);
+ }
+ }
+
+ public JCSAdminBean getJcsAdminBean() {
+ return jcsAdminBean;
+ }
+
+ public void setJcsAdminBean(JCSAdminBean jcsAdminBean) {
+ this.jcsAdminBean = jcsAdminBean;
+ }
+}
diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/FavoritesController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/FavoritesController.java
new file mode 100644
index 0000000..023f8d7
--- /dev/null
+++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/FavoritesController.java
@@ -0,0 +1,118 @@
+/*-
+ * ================================================================================
+ * ECOMP Portal SDK
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.controller.core;
+
+import static com.att.eelf.configuration.Configuration.MDC_KEY_REQUEST_ID;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+
+import org.json.JSONArray;
+import org.json.JSONObject;
+import org.openecomp.portalsdk.core.controller.RestrictedBaseController;
+import org.openecomp.portalsdk.core.domain.App;
+import org.openecomp.portalsdk.core.domain.User;
+import org.openecomp.portalsdk.core.logging.aspect.AuditLog;
+import org.openecomp.portalsdk.core.logging.format.AlarmSeverityEnum;
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.portalsdk.core.onboarding.rest.FavoritesClient;
+import org.openecomp.portalsdk.core.onboarding.util.CipherUtil;
+import org.openecomp.portalsdk.core.service.AppService;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.slf4j.MDC;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.EnableAspectJAutoProxy;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+
+@Controller
+@RequestMapping("/")
+@org.springframework.context.annotation.Configuration
+@EnableAspectJAutoProxy
+@AuditLog
+public class FavoritesController extends RestrictedBaseController {
+
+ private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(FavoritesController.class);
+
+ @Autowired
+ private AppService appService;
+
+ /**
+ * Makes the REST API call to Portal Back-end and retrieves Favorite menu
+ * items for the currently logged in user.
+ *
+ * @param request
+ * @param response
+ */
+ @RequestMapping(value = { "/get_favorites" }, method = RequestMethod.GET)
+ public void getFavorites(HttpServletRequest request, HttpServletResponse response) {
+ String appName = "";
+ String requestId = "";
+ String appUserName = "";
+ String decryptedPwd = "";
+
+ try {
+ HttpSession session = request.getSession();
+ User user = (User) session.getAttribute(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME));
+ if (user == null || user.getId() == null) {
+ logger.info(EELFLoggerDelegate.errorLogger,
+ ("Http request did not contain user info, cannot retrieve favorites."));
+
+ response.setContentType("application/json");
+ JSONArray jsonResponse = new JSONArray();
+ JSONObject error = new JSONObject();
+ error.put("error", "Http request did not contain user info, cannot retrieve favorites.");
+ jsonResponse.put(error);
+ response.getWriter().write(jsonResponse.toString());
+ } else {
+ logger.info(EELFLoggerDelegate.errorLogger,
+ "Retrieving Favorites for the user '" + MDC.get(SystemProperties.MDC_LOGIN_ID) + "'.");
+
+ App app = appService.getDefaultApp();
+ if (app!=null) {
+ appName = app.getName();
+ appUserName = app.getUsername();
+ try{
+ decryptedPwd = CipherUtil.decrypt(app.getAppPassword(), SystemProperties.getProperty(SystemProperties.Decryption_Key));
+ } catch(Exception e) {
+ logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred in WebServiceCallServiceImpl.get while decrypting the password. Details: " + e.getMessage());
+ }
+ } else {
+ logger.warn(EELFLoggerDelegate.errorLogger, "Unable to locate the app information from the database.");
+ appName = SystemProperties.SDK_NAME;
+ }
+ requestId = MDC.get(MDC_KEY_REQUEST_ID);
+
+ String jsonResponse = FavoritesClient.getFavorites(MDC.get(SystemProperties.MDC_LOGIN_ID), appName, requestId, appUserName, decryptedPwd);
+
+ logger.debug(EELFLoggerDelegate.debugLogger, "FavoritesMenu response: " + jsonResponse);
+
+ response.setContentType("application/json");
+ response.getWriter().write(jsonResponse);
+ }
+ } catch (Exception e) {
+ logger.error(EELFLoggerDelegate.errorLogger,
+ "Exception occurred in FavoritesController.getFavorites while performing get_favorites. Details: "
+ + e.getMessage(), AlarmSeverityEnum.MINOR);
+ }
+ }
+}
diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/FnMenuController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/FnMenuController.java
new file mode 100644
index 0000000..2c58999
--- /dev/null
+++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/FnMenuController.java
@@ -0,0 +1,223 @@
+/*-
+ * ================================================================================
+ * ECOMP Portal SDK
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.controller.core;
+
+import java.io.PrintWriter;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.json.JSONObject;
+import org.openecomp.portalsdk.core.controller.RestrictedBaseController;
+import org.openecomp.portalsdk.core.domain.Menu;
+import org.openecomp.portalsdk.core.domain.MenuData;
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.portalsdk.core.service.FnMenuService;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.openecomp.portalsdk.core.web.support.JsonMessage;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.servlet.ModelAndView;
+
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+/**
+ * A controller for Admin to add/edit/delete menu items from FN_MENU.
+ */
+
+@Controller
+@RequestMapping("/")
+public class FnMenuController extends RestrictedBaseController {
+
+ private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(FnMenuController.class);
+
+ @Autowired
+ FnMenuService service;
+
+ private String viewName;
+
+ @RequestMapping(value = { "/admin_fn_menu/get_parent_list" }, method = RequestMethod.GET)
+ public void getParentList(HttpServletRequest request, HttpServletResponse response) throws Exception {
+ ObjectMapper mapper = new ObjectMapper();
+ try {
+ response.getWriter().write(mapper.writeValueAsString(service.getParentList()));
+ } catch (Exception e) {
+ logger.error(EELFLoggerDelegate.errorLogger, "getParentListFailed", e);
+ response.setCharacterEncoding("UTF-8");
+ request.setCharacterEncoding("UTF-8");
+ PrintWriter out = response.getWriter();
+ out.write(e.getMessage());
+ }
+ }
+
+ @RequestMapping(value = { "/admin_fn_menu/get_function_cd_list" }, method = RequestMethod.GET)
+ public void getFunctionCDList(HttpServletRequest request, HttpServletResponse response) throws Exception {
+ ObjectMapper mapper = new ObjectMapper();
+ try {
+ response.getWriter().write(mapper.writeValueAsString(service.getFunctionCDList()));
+ } catch (Exception e) {
+ logger.error(EELFLoggerDelegate.errorLogger, "getFunctionCDList", e);
+ response.setCharacterEncoding("UTF-8");
+ request.setCharacterEncoding("UTF-8");
+ PrintWriter out = response.getWriter();
+ out.write(e.getMessage());
+ }
+
+ }
+
+ @RequestMapping(value = { "/admin_fn_menu" }, method = RequestMethod.GET)
+ public void getFnMenuList(HttpServletRequest request, HttpServletResponse response) {
+ Map<String, Object> model = new HashMap<String, Object>();
+ ObjectMapper mapper = new ObjectMapper();
+ List<MenuData> temp = null;
+ List<List<MenuData>> childItemList = new ArrayList<List<MenuData>>();
+ List<MenuData> parentList = new ArrayList<>();
+
+ try {
+ temp = service.getFnMenuItems();
+ for (MenuData menu : temp) {
+ MenuData parentData = new MenuData();
+ parentData.setId(menu.getId());
+ parentData.setLabel(menu.getLabel());
+ if (menu.getParentMenu() != null) {
+ parentData.setParentId(menu.getParentMenu().getId());
+ }
+ parentData.setAction(menu.getAction());
+ parentData.setFunctionCd(menu.getFunctionCd());
+ parentData.setImageSrc(menu.getImageSrc());
+ parentData.setSortOrder(menu.getSortOrder());
+ parentData.setActive(menu.isActive());
+ parentData.setServlet(menu.getServlet());
+ parentData.setQueryString(menu.getQueryString());
+ parentData.setExternalUrl(menu.getExternalUrl());
+ parentData.setTarget(menu.getTarget());
+ parentData.setMenuSetCode(menu.getMenuSetCode());
+ parentData.setSeparator(menu.isSeparator());
+ parentData.setImageSrc(menu.getImageSrc());
+ parentList.add(parentData);
+ List<MenuData> tempList = new ArrayList<MenuData>();
+ // int countChildAction = 0;
+ /*
+ * for(Object o:menu.getChildMenus()){ Menu m = (Menu)o; Menu
+ * data = new Menu(); data.setId(m.getId());
+ * data.setLabel(m.getLabel()); data.setAction(m.getAction());
+ * data.setImageSrc(m.getImageSrc()); tempList.add(data); }
+ */
+ childItemList.add(tempList);
+ }
+ model.put("fnMenuItems", parentList);
+ // JsonMessage msg = new
+ // JsonMessage(mapper.writeValueAsString(parentList),mapper.writeValueAsString(childItemList),"none");
+
+ JsonMessage msg = new JsonMessage(mapper.writeValueAsString(model));
+ JSONObject j = new JSONObject(msg);
+ response.getWriter().write(j.toString());
+ } catch (Exception e) {
+ logger.error(EELFLoggerDelegate.errorLogger, "getFnMenuList failed", e);
+ }
+
+ }
+
+ @RequestMapping(value = { "/admin_fn_menu/updateFnMenu" }, method = RequestMethod.POST)
+ public ModelAndView updateFnMenu(HttpServletRequest request, HttpServletResponse response) throws Exception {
+
+ try {
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+ JsonNode root = mapper.readTree(request.getReader());
+ Menu fnMenuItem = mapper.readValue(root.get("availableFnMenuItem").toString(), Menu.class);
+
+ service.saveFnMenu(fnMenuItem);
+ request.getSession()
+ .removeAttribute(SystemProperties.getProperty(SystemProperties.APPLICATION_MENU_ATTRIBUTE_NAME));
+ request.getSession().removeAttribute(SystemProperties.LEFT_MENU_CHILDREND);
+ request.getSession().removeAttribute(SystemProperties.LEFT_MENU_PARENT);
+
+ response.setCharacterEncoding("UTF-8");
+ response.setContentType("application / json");
+ request.setCharacterEncoding("UTF-8");
+
+ PrintWriter out = response.getWriter();
+ String responseString = mapper.writeValueAsString(service.getMenuItem(fnMenuItem.getId()));
+
+ out.write(responseString);
+
+ return null;
+
+ } catch (Exception e) {
+ logger.error(EELFLoggerDelegate.errorLogger, "updateFnMenu failed", e);
+ response.setCharacterEncoding("UTF-8");
+ request.setCharacterEncoding("UTF-8");
+ PrintWriter out = response.getWriter();
+ out.write(e.getMessage());
+ }
+ return null;
+
+ }
+
+ @RequestMapping(value = { "/admin_fn_menu/removeMenuItem" }, method = RequestMethod.POST)
+ public ModelAndView removeFnMenu(HttpServletRequest request, HttpServletResponse response) throws Exception {
+
+ try {
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+ JsonNode root = mapper.readTree(request.getReader());
+ Menu fnMenuItem = mapper.readValue(root.get("fnMenuItem").toString(), Menu.class);
+ Menu fnMenuItemRow = service.getMenuItemRow(fnMenuItem.getId());
+
+ service.removeMenuItem(fnMenuItemRow);
+
+ response.setCharacterEncoding("UTF-8");
+ response.setContentType("application / json");
+ request.setCharacterEncoding("UTF-8");
+ PrintWriter out = response.getWriter();
+ String responseString = mapper.writeValueAsString(service.getMenuItem(fnMenuItem.getId()));
+ out.write(responseString);
+
+ return null;
+
+ } catch (Exception e) {
+ logger.error(EELFLoggerDelegate.errorLogger, "removeFnMenu failed", e);
+ response.setCharacterEncoding("UTF-8");
+ request.setCharacterEncoding("UTF-8");
+ PrintWriter out = response.getWriter();
+ out.write(e.getMessage());
+ }
+ return null;
+
+ }
+
+ public String getViewName() {
+ return viewName;
+ }
+
+ public void setViewName(String viewName) {
+ this.viewName = viewName;
+ }
+
+}
diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/FuncMenuController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/FuncMenuController.java
new file mode 100644
index 0000000..8e17eaa
--- /dev/null
+++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/FuncMenuController.java
@@ -0,0 +1,175 @@
+/*-
+ * ================================================================================
+ * ECOMP Portal SDK
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.controller.core;
+
+import static com.att.eelf.configuration.Configuration.MDC_KEY_REQUEST_ID;
+
+import java.io.IOException;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.json.JSONArray;
+import org.json.JSONObject;
+import org.openecomp.portalsdk.core.controller.RestrictedBaseController;
+import org.openecomp.portalsdk.core.domain.App;
+import org.openecomp.portalsdk.core.domain.User;
+import org.openecomp.portalsdk.core.logging.aspect.AuditLog;
+import org.openecomp.portalsdk.core.logging.format.AlarmSeverityEnum;
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.portalsdk.core.onboarding.rest.FunctionalMenuClient;
+import org.openecomp.portalsdk.core.onboarding.ueb.UebException;
+import org.openecomp.portalsdk.core.onboarding.ueb.UebManager;
+import org.openecomp.portalsdk.core.onboarding.ueb.UebMsg;
+import org.openecomp.portalsdk.core.onboarding.ueb.UebMsgTypes;
+import org.openecomp.portalsdk.core.onboarding.util.CipherUtil;
+import org.openecomp.portalsdk.core.onboarding.util.PortalApiConstants;
+import org.openecomp.portalsdk.core.onboarding.util.PortalApiProperties;
+import org.openecomp.portalsdk.core.service.AppService;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.openecomp.portalsdk.core.web.support.UserUtils;
+import org.slf4j.MDC;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.EnableAspectJAutoProxy;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+
+@Controller
+@RequestMapping("/")
+@org.springframework.context.annotation.Configuration
+@EnableAspectJAutoProxy
+public class FuncMenuController extends RestrictedBaseController{
+
+ private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(FuncMenuController.class);
+
+ @Autowired
+ AppService appService;
+
+ @AuditLog
+ @RequestMapping(value = {"/get_functional_menu" }, method = RequestMethod.GET)
+ public void functionalMenu(HttpServletRequest request, HttpServletResponse response) {
+
+ User user = UserUtils.getUserSession(request);
+ //JSONArray validMenu = new JSONArray("[{\"menuId\":140,\"column\":1,\"text\":\"RT SDK Menu\",\"parentMenuId\":139,\"url\":\"http://www.cnn.com\"},{\"menuId\":139,\"column\":1,\"text\":\"RT Menu\",\"parentMenuId\":11,\"url\":\"\"},{\"menuId\":11,\"column\":1,\"text\":\"Product Design\",\"parentMenuId\":1,\"url\":\"\"},{\"menuId\":1,\"column\":1,\"text\":\"Design\",\"url\":\"\"}]");
+
+ try {
+ if ( user != null ) {
+ String useRestForFunctionalMenu = PortalApiProperties.getProperty(PortalApiConstants.USE_REST_FOR_FUNCTIONAL_MENU);
+ String funcMenuJsonString = "";
+ if (useRestForFunctionalMenu==null || useRestForFunctionalMenu=="" || useRestForFunctionalMenu.equalsIgnoreCase("false")) {
+ logger.info(EELFLoggerDelegate.errorLogger, "Making use of UEB communication and Requesting functional menu for user " + user.getOrgUserId());
+ funcMenuJsonString = getFunctionalMenu(user.getOrgUserId());
+ } else {
+ funcMenuJsonString = getFunctionalMenuViaREST(user.getOrgUserId());
+ }
+ response.setContentType("application/json");
+ response.getWriter().write(funcMenuJsonString);
+ } else {
+ logger.info(EELFLoggerDelegate.errorLogger, "Http request did not contain user info, cannot retrieve functional menu");
+ response.setContentType("application/json");
+ JSONArray jsonResponse = new JSONArray();
+ JSONObject error = new JSONObject();
+ error.put("error","Http request did not contain user info, cannot retrieve functional menu");
+ jsonResponse.put(error);
+ response.getWriter().write(jsonResponse.toString());
+ }
+ } catch (Exception e) {
+ response.setCharacterEncoding("UTF-8");
+ response.setContentType("application/json");
+ JSONArray jsonResponse = new JSONArray();
+ JSONObject error = new JSONObject();
+ try {
+ if ( null == e.getMessage() ) {
+ error.put("error","No menu data");
+ } else {
+ error.put("error",e.getMessage());
+ }
+ jsonResponse.put(error);
+ response.getWriter().write(jsonResponse.toString());
+ logger.error(EELFLoggerDelegate.errorLogger, "Error getting functional_menu: " + e.getMessage(),AlarmSeverityEnum.MAJOR);
+ } catch (IOException e1) {
+ e1.printStackTrace();
+ }
+ }
+
+ }
+
+ //--------------------------------------------------------------------------
+ // Makes a synchronous call to ECOMP Portal to get the JSON file that
+ // contains the contents of the functional menu. The JSON file will be
+ // in the payload of the returned UEB message.
+ //--------------------------------------------------------------------------
+ private String getFunctionalMenu(String userId) throws UebException
+ {
+ String returnString = null;
+ UebMsg funcMenuUebMsg = null;
+ UebMsg msg = new UebMsg();
+ msg.putMsgType(UebMsgTypes.UEB_MSG_TYPE_GET_FUNC_MENU);
+ msg.putUserId(userId);
+ funcMenuUebMsg = UebManager.getInstance().requestReply(msg);
+ if (funcMenuUebMsg != null) {
+ if (funcMenuUebMsg.getPayload().startsWith("Error:")) {
+ logger.error(EELFLoggerDelegate.errorLogger, "getFunctionalMenu received an error in UEB msg = " + funcMenuUebMsg.getPayload());
+ } else {
+ returnString = funcMenuUebMsg.getPayload();
+ }
+ }
+
+ logger.debug(EELFLoggerDelegate.debugLogger, "FunctionalMenu response: " + returnString);
+
+ return returnString;
+ }
+
+ private String getFunctionalMenuViaREST(String userId) {
+ String appName = "";
+ String requestId = "";
+ String appUserName = "";
+ String decryptedPwd = "";
+
+ logger.info(EELFLoggerDelegate.debugLogger, "Making use of REST API communication and Requesting functional menu for user " + userId);
+
+ App app = appService.getDefaultApp();
+ if (app!=null) {
+ appName = app.getName();
+ appUserName = app.getUsername();
+ try{
+ decryptedPwd = CipherUtil.decrypt(app.getAppPassword(), SystemProperties.getProperty(SystemProperties.Decryption_Key));
+ } catch(Exception e) {
+ logger.error(EELFLoggerDelegate.errorLogger, "Exception occurred in WebServiceCallServiceImpl.get while decrypting the password. Details: " + e.toString());
+ }
+ } else {
+ logger.warn(EELFLoggerDelegate.errorLogger, "Unable to locate the app information from the database.");
+ appName = SystemProperties.SDK_NAME;
+ }
+ requestId = MDC.get(MDC_KEY_REQUEST_ID);
+
+ String fnMenu = null;
+ try {
+ fnMenu = FunctionalMenuClient.getFunctionalMenu(userId, appName, requestId, appUserName, decryptedPwd);
+ }catch(Exception ex) {
+ fnMenu = "Failed to get functional menu: " + ex.toString();
+ }
+
+ logger.debug(EELFLoggerDelegate.debugLogger, "FunctionalMenu response: {}", fnMenu);
+
+ return fnMenu;
+ }
+} \ No newline at end of file
diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/LogoutController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/LogoutController.java
new file mode 100644
index 0000000..467bd3c
--- /dev/null
+++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/LogoutController.java
@@ -0,0 +1,113 @@
+/*-
+ * ================================================================================
+ * ECOMP Portal SDK
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.controller.core;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.openecomp.portalsdk.core.controller.UnRestrictedBaseController;
+import org.openecomp.portalsdk.core.domain.User;
+import org.openecomp.portalsdk.core.logging.format.AlarmSeverityEnum;
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.portalsdk.core.onboarding.util.PortalApiConstants;
+import org.openecomp.portalsdk.core.onboarding.util.PortalApiProperties;
+import org.openecomp.portalsdk.core.web.support.UserUtils;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.context.request.RequestContextHolder;
+import org.springframework.web.context.request.ServletRequestAttributes;
+import org.springframework.web.servlet.ModelAndView;
+
+@Controller
+@RequestMapping("/")
+public class LogoutController extends UnRestrictedBaseController{
+
+ private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(LogoutController.class);
+
+ private User user;
+
+ /**
+ * @param request
+ * @param response
+ * @return modelView
+ *
+ * globalLogout will invalid the current application session, then redirects to portal logout
+ */
+ @RequestMapping(value = {"/logout.htm" }, method = RequestMethod.GET)
+ public ModelAndView globalLogout(HttpServletRequest request, HttpServletResponse response) {
+ ModelAndView modelView = null;
+ try{
+ chatRoomLogout(request);
+ request.getSession().invalidate();
+ String portalUrl = PortalApiProperties.getProperty(PortalApiConstants.ECOMP_REDIRECT_URL);
+ String portalDomain = portalUrl.substring(0, portalUrl.lastIndexOf('/'));
+ String redirectUrl = portalDomain+"/logout.htm";
+ modelView = new ModelAndView("redirect:"+redirectUrl);
+ }catch(Exception e){
+ logger.error(EELFLoggerDelegate.errorLogger, "Logout Error: " + e.getMessage(),AlarmSeverityEnum.MAJOR);
+ }
+ return modelView;
+ }
+
+ /**
+ * @param request
+ * @param response
+ * @return modelView
+ *
+ * appLogout is a function that will invalid the current session (application logout) and redirects user to Portal.
+ */
+ @RequestMapping(value = {"/app_logout.htm" }, method = RequestMethod.GET)
+ public ModelAndView appLogout(HttpServletRequest request, HttpServletResponse response) {
+ ModelAndView modelView = null;
+ try{
+ chatRoomLogout(request);
+ modelView = new ModelAndView("redirect:"+PortalApiProperties.getProperty(PortalApiConstants.ECOMP_REDIRECT_URL));
+ UserUtils.clearUserSession(request);
+ request.getSession().invalidate();
+ }catch(Exception e){
+ logger.error(EELFLoggerDelegate.errorLogger, "Application Logout Error: " + e.getMessage(),AlarmSeverityEnum.MAJOR);
+ }
+ return modelView;
+ }
+
+
+ public void chatRoomLogout(HttpServletRequest request){
+ request = ((ServletRequestAttributes)RequestContextHolder.currentRequestAttributes()).getRequest();
+ setUser(UserUtils.getUserSession(request));
+ // if(getUser()!=null){
+ // Long login_IdLong = getUser().getId();
+ // String name = getUser().getFirstName();
+ // String login_IdStr = Long.toString(login_IdLong);
+ // }
+ //UserListName.getInstance().delUserName(name);
+ //UserListID.getInstance().delUserName(login_IdStr);
+ }
+
+ public User getUser() {
+ return user;
+ }
+
+ public void setUser(User user) {
+ this.user = user;
+ }
+
+
+}
diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/ManifestController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/ManifestController.java
new file mode 100644
index 0000000..ae212b5
--- /dev/null
+++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/ManifestController.java
@@ -0,0 +1,111 @@
+/*-
+ * ================================================================================
+ * ECOMP Portal SDK
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.controller.core;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.jar.Attributes;
+import java.util.jar.Manifest;
+
+import javax.servlet.ServletContext;
+import javax.servlet.http.HttpServletRequest;
+
+import org.openecomp.portalsdk.core.controller.RestrictedBaseController;
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * This controller responds to a request for the web application manifest,
+ * returning a JSON with the information that was created at build time.
+ *
+ * Manifest entries have names with hyphens, which means Javascript code can't
+ * simply use the shorthand object.key; instead use object['key'].
+ */
+@RestController
+@RequestMapping("/")
+public class ManifestController extends RestrictedBaseController {
+
+ private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ManifestController.class);
+
+ /**
+ * Required to obtain the webapp manifest.
+ */
+ @Autowired
+ private ServletContext context;
+
+ /** Path to resource on classpath */
+ private final String MANIFEST_RESOURCE_PATH = "/META-INF/MANIFEST.MF";
+
+ /**
+ * Gets the content of the webapp manifest file META-INF/MANIFEST.MF.
+ *
+ * @return Attributes object with key-value pairs from the manifest
+ * @throws IOException
+ */
+ private Attributes getWebappManifest() throws IOException {
+ // Manifest is formatted as Java-style properties
+ InputStream inputStream = context.getResourceAsStream(MANIFEST_RESOURCE_PATH);
+ if (inputStream == null)
+ throw new IOException("getWebappManifest: failed to get resource at path " + MANIFEST_RESOURCE_PATH);
+ Manifest manifest = new Manifest(inputStream);
+ inputStream.close();
+ return manifest.getMainAttributes();
+ }
+
+ /**
+ * Gets the webapp manifest contents as a JSON object.
+ *
+ * @param request
+ * @return A map of key-value pairs. On success:
+ *
+ * <pre>
+ * {
+ * "key1": "value1",
+ * "key2": "value2"
+ * }
+ * </pre>
+ *
+ * On failure:
+ *
+ * <pre>
+ * { "error": "message" }
+ * </pre>
+ */
+ @RequestMapping(value = { "/manifest" }, method = RequestMethod.GET, produces = "application/json")
+ @ResponseBody
+ public Map<Object, Object> getManifest(HttpServletRequest request) {
+ try {
+ Attributes attributes = getWebappManifest();
+ return attributes;
+ } catch (Exception ex) {
+ logger.error(EELFLoggerDelegate.errorLogger, "getManifest failed", ex);
+ Map<Object, Object> response = new HashMap<Object, Object>();
+ response.put("error", "failed to get manifest: " + ex.toString());
+ return response;
+ }
+ }
+
+}
diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/MenuListController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/MenuListController.java
new file mode 100644
index 0000000..ce5ec97
--- /dev/null
+++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/MenuListController.java
@@ -0,0 +1,255 @@
+/*-
+ * ================================================================================
+ * ECOMP Portal SDK
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.controller.core;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import javax.servlet.http.Cookie;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+
+import org.json.JSONObject;
+import org.openecomp.portalsdk.core.controller.RestrictedBaseController;
+import org.openecomp.portalsdk.core.domain.MenuData;
+import org.openecomp.portalsdk.core.domain.User;
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.portalsdk.core.onboarding.util.PortalApiConstants;
+import org.openecomp.portalsdk.core.onboarding.util.PortalApiProperties;
+import org.openecomp.portalsdk.core.restful.client.SharedContextRestClient;
+import org.openecomp.portalsdk.core.restful.domain.SharedContext;
+import org.openecomp.portalsdk.core.service.FnMenuService;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.openecomp.portalsdk.core.web.support.JsonMessage;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+@Controller
+@RequestMapping("/")
+public class MenuListController extends RestrictedBaseController {
+
+ private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(MenuListController.class);
+
+ @Autowired
+ private FnMenuService fnMenuService;
+ @Autowired
+ private SharedContextRestClient sharedContextRestClient;
+
+ /**
+ *
+ * Gets Menu items and stores into session.
+ *
+ * @param request
+ * @param response
+ */
+ @SuppressWarnings("unchecked")
+ @RequestMapping(value = { "/get_menu" }, method = RequestMethod.GET)
+ public void getMenu(HttpServletRequest request, HttpServletResponse response) {
+ logger.debug(EELFLoggerDelegate.debugLogger, "getMenu begins");
+ try {
+ ObjectMapper mapper = new ObjectMapper();
+ Set<MenuData> menuResult = null;
+ HttpSession session = request.getSession();
+ List<List<MenuData>> childItemList = (List<List<MenuData>>) session
+ .getAttribute(SystemProperties.LEFT_MENU_CHILDREND);
+ List<MenuData> parentList = (List<MenuData>) session.getAttribute(SystemProperties.LEFT_MENU_PARENT);
+ if (parentList == null || childItemList == null || parentList.size() == 0 || childItemList.size() == 0) {
+ childItemList = new ArrayList<List<MenuData>>();
+ parentList = new ArrayList<MenuData>();
+ menuResult = (Set<MenuData>) session
+ .getAttribute(SystemProperties.getProperty(SystemProperties.APPLICATION_MENU_ATTRIBUTE_NAME));
+ fnMenuService.setMenuDataStructure(childItemList, parentList, menuResult);
+ logger.debug(EELFLoggerDelegate.debugLogger, "storing leftmenu items into session");
+ session.setAttribute(SystemProperties.LEFT_MENU_PARENT, parentList);
+ session.setAttribute(SystemProperties.LEFT_MENU_CHILDREND, childItemList);
+ }
+ String userName = (String) session.getAttribute(SystemProperties.getProperty(SystemProperties.USER_NAME));
+ JsonMessage msg = new JsonMessage(mapper.writeValueAsString(parentList),
+ mapper.writeValueAsString(childItemList), userName);
+ JSONObject j = new JSONObject(msg);
+ response.setContentType("application/json");
+ response.getWriter().write(j.toString());
+ logger.debug(EELFLoggerDelegate.debugLogger, "getMenu ends");
+ } catch (Exception e) {
+ logger.error(EELFLoggerDelegate.errorLogger, "getMenu failed", e);
+ }
+ }
+
+ /**
+ *
+ * Gets app name from system.properties file.
+ *
+ * @param request
+ * @param response
+ */
+ @RequestMapping(value = { "/get_app_name" }, method = RequestMethod.GET)
+ public void getAppName(HttpServletRequest request, HttpServletResponse response) {
+ logger.debug(EELFLoggerDelegate.debugLogger, "getAppName begins");
+ HttpSession session = request.getSession(true);
+ try {
+ String appName = (String) session
+ .getAttribute(SystemProperties.getProperty(SystemProperties.APP_DISPLAY_NAME));
+ if (appName != null && appName.equals("app_display_name")) {
+ appName = "";
+ }
+ JsonMessage msg = new JsonMessage(appName);
+ JSONObject j = new JSONObject(msg);
+ response.setContentType("application/json");
+ response.getWriter().write(j.toString());
+ logger.debug(EELFLoggerDelegate.debugLogger, "getAppName ends");
+ } catch (Exception e) {
+ logger.error(EELFLoggerDelegate.errorLogger, "getAppName failed", e);
+ }
+ }
+
+ /**
+ * Apparently unused?
+ *
+ * @param request
+ * @return Map with childItemList and parentList keys, associated values.
+ */
+ @SuppressWarnings("unchecked")
+ @ModelAttribute("menu")
+ public Map<String, Object> getLeftMenuJSP(HttpServletRequest request) {
+ logger.debug(EELFLoggerDelegate.debugLogger, "getLeftMenuJSP begins");
+ ObjectMapper mapper = new ObjectMapper();
+ Map<String, Object> model = new HashMap<String, Object>();
+ try {
+ HttpSession session = request.getSession();
+ List<List<MenuData>> childItemList = (List<List<MenuData>>) session
+ .getAttribute(SystemProperties.LEFT_MENU_CHILDREND);
+ List<MenuData> parentList = (List<MenuData>) session.getAttribute(SystemProperties.LEFT_MENU_PARENT);
+ if (parentList == null || childItemList == null) {
+ childItemList = new ArrayList<List<MenuData>>();
+ parentList = new ArrayList<MenuData>();
+ Set<MenuData> menuResult = (Set<MenuData>) session
+ .getAttribute(SystemProperties.getProperty(SystemProperties.APPLICATION_MENU_ATTRIBUTE_NAME));
+ fnMenuService.setMenuDataStructure(childItemList, parentList, menuResult);
+ session.setAttribute(SystemProperties.LEFT_MENU_PARENT, parentList);
+ session.setAttribute(SystemProperties.LEFT_MENU_CHILDREND, childItemList);
+ }
+ model.put("childItemList", mapper.writeValueAsString(childItemList));
+ model.put("parentList", mapper.writeValueAsString(parentList));
+ } catch (Exception e) {
+ logger.error(EELFLoggerDelegate.errorLogger, "getLeftMenuJSP failed", e);
+ }
+ logger.debug(EELFLoggerDelegate.debugLogger, "getLeftMenuJSP ends");
+ return model;
+ }
+
+ /**
+ * Answers requests for user information, which is fetched from the shared
+ * context at Portal.
+ *
+ * @param request
+ * @param response
+ */
+ @RequestMapping(value = { "/get_userinfo" }, method = RequestMethod.GET)
+ public void getUserInfo(HttpServletRequest request, HttpServletResponse response) {
+ logger.debug(EELFLoggerDelegate.debugLogger, "getUserInfo begins");
+ try {
+ String contextId = null;
+ if (request.getCookies() != null) {
+ for (Cookie ck : request.getCookies()) {
+ if (ck.getName().equalsIgnoreCase("EPService"))
+ contextId = ck.getValue();
+ }
+ }
+ logger.debug(EELFLoggerDelegate.debugLogger, "getUserInfo: ContextId is : " + contextId);
+ List<SharedContext> sharedContextRes = sharedContextRestClient.getUserContext(contextId);
+ logger.debug(EELFLoggerDelegate.debugLogger, "getUserInfo: Shared Context Response is {}",
+ sharedContextRes);
+ Map<String, Object> model = new HashMap<String, Object>();
+ for (SharedContext sharedContext : sharedContextRes) {
+ model.put(sharedContext.getCkey(), sharedContext.getCvalue());
+ }
+ JSONObject j = new JSONObject(model);
+ response.setContentType("application/json");
+ response.getWriter().write(j.toString());
+ } catch (Exception e) {
+ logger.error(EELFLoggerDelegate.errorLogger, "getUserInfo failed", e);
+ }
+ }
+
+ /**
+ * Get User information from app sessions
+ *
+ * @param request
+ * @param response
+ */
+ @RequestMapping(value = { "/get_topMenuInfo" }, method = RequestMethod.GET)
+ public void getTopMenu(HttpServletRequest request, HttpServletResponse response) {
+
+ HttpSession session = request.getSession();
+ try {
+ String userName = (String) session.getAttribute(SystemProperties.getProperty(SystemProperties.USER_NAME));
+ String firstName = (String) session.getAttribute(SystemProperties.FIRST_NAME);
+ String lastName = (String) session.getAttribute(SystemProperties.LAST_NAME);
+ User user = (User) session.getAttribute(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME));
+ Map<String, String> map = new HashMap<String, String>();
+ String redirectUrl = PortalApiProperties.getProperty(PortalApiConstants.ECOMP_REDIRECT_URL);
+ String portalDomain = redirectUrl.substring(0, redirectUrl.lastIndexOf('/'));
+ String portalUrl = portalDomain + "/process_csp";
+ String getAccessUrl = portalDomain + "/get_access";
+ String contactUsLink = SystemProperties.getProperty(SystemProperties.CONTACT_US_LINK);
+ map.put("portalUrl", portalUrl);
+ map.put("contactUsLink", contactUsLink);
+ map.put("userName", userName);
+ map.put("firstName", firstName);
+ map.put("lastName", lastName);
+ map.put("userid", user.getOrgUserId());
+ map.put("email", user.getEmail());
+ map.put("getAccessUrl", getAccessUrl);
+ JSONObject j = new JSONObject(map);
+ response.setContentType("application/json");
+ response.getWriter().write(j.toString());
+ } catch (Exception e) {
+ logger.error(EELFLoggerDelegate.errorLogger, "Failed to serialize JSON", e);
+ }
+
+ }
+
+ @RequestMapping(value = { "/page_redirect" }, method = RequestMethod.GET)
+ public void pageRedirect(HttpServletRequest request, HttpServletResponse response) {
+ String pageToURL = null;
+ try {
+ String pageTo = request.getParameter("page");
+ if (pageTo.equals("contact"))
+ pageToURL = SystemProperties.getProperty(SystemProperties.CONTACT_US_LINK);
+ else if (pageTo.equals("access")) {
+ String redirectUrl = PortalApiProperties.getProperty(PortalApiConstants.ECOMP_REDIRECT_URL);
+ String portalDomain = redirectUrl.substring(0, redirectUrl.lastIndexOf('/'));
+ pageToURL = portalDomain + "/get_access";
+ }
+ response.getWriter().write(pageToURL);
+ } catch (Exception e) {
+ logger.error(EELFLoggerDelegate.errorLogger, "pageRedirect failed", e);
+ }
+ }
+}
diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/PostSearchController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/PostSearchController.java
new file mode 100644
index 0000000..2da1e6a
--- /dev/null
+++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/PostSearchController.java
@@ -0,0 +1,211 @@
+/*-
+ * ================================================================================
+ * ECOMP Portal SDK
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.controller.core;
+
+import java.io.PrintWriter;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.json.JSONObject;
+import org.openecomp.portalsdk.core.command.PostSearchBean;
+import org.openecomp.portalsdk.core.command.support.SearchResult;
+import org.openecomp.portalsdk.core.controller.RestrictedBaseController;
+import org.openecomp.portalsdk.core.domain.Lookup;
+import org.openecomp.portalsdk.core.domain.Profile;
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.portalsdk.core.service.LdapService;
+import org.openecomp.portalsdk.core.service.PostSearchService;
+import org.openecomp.portalsdk.core.service.ProfileService;
+import org.openecomp.portalsdk.core.web.support.JsonMessage;
+import org.openecomp.portalsdk.core.web.support.UserUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.ModelAttribute;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.servlet.ModelAndView;
+
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+@Controller
+@RequestMapping("/")
+public class PostSearchController extends RestrictedBaseController {
+
+ private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(PostSearchController.class);
+
+ @SuppressWarnings("rawtypes")
+ private static List sortByList = null;
+
+ @Autowired
+ private PostSearchService postSearchService;
+
+ @Autowired
+ private LdapService ldapService;
+
+ @Autowired
+ private ProfileService profileService;
+
+ @RequestMapping(value = { "/post_search" }, method = RequestMethod.GET)
+ public ModelAndView welcome(HttpServletRequest request,
+ @ModelAttribute("postSearchBean") PostSearchBean postSearchBean) {
+ Map<String, Object> model = new HashMap<String, Object>();
+
+ ObjectMapper mapper = new ObjectMapper();
+ try {
+ postSearchBean = new PostSearchBean();
+ model.put("profileList", mapper.writeValueAsString(postSearchBean.getSearchResult()));
+ model.put("postSearchBean", mapper.writeValueAsString(postSearchBean));
+ model.put("existingUsers", mapper.writeValueAsString(getExistingUsers()));
+ model.put("sortByList", mapper.writeValueAsString(getSortByList()));
+ } catch (Exception ex) {
+ logger.error(EELFLoggerDelegate.errorLogger, "welcome: failed to write JSON" + ex.getMessage());
+ }
+
+ return new ModelAndView(getViewName(), model);
+ }
+
+ @RequestMapping(value = { "/post_search_sample" }, method = RequestMethod.GET)
+ public void getPostSearchProfile(HttpServletRequest request, HttpServletResponse response,
+ @ModelAttribute("postSearchBean") PostSearchBean postSearchBean) {
+ Map<String, Object> model = new HashMap<String, Object>();
+
+ ObjectMapper mapper = new ObjectMapper();
+ try {
+ postSearchBean = new PostSearchBean();
+ model.put("profileList", mapper.writeValueAsString(postSearchBean.getSearchResult()));
+ model.put("postSearchBean", mapper.writeValueAsString(postSearchBean));
+ model.put("existingUsers", mapper.writeValueAsString(getExistingUsers()));
+ model.put("sortByList", mapper.writeValueAsString(getSortByList()));
+ JsonMessage msg = new JsonMessage(mapper.writeValueAsString(model));
+ JSONObject j = new JSONObject(msg);
+ response.getWriter().write(j.toString());
+ } catch (Exception ex) {
+ logger.error(EELFLoggerDelegate.errorLogger, "getPostSearchProfile: failed to write JSON" + ex.getMessage());
+ }
+
+ }
+
+ @SuppressWarnings({ "unchecked", "rawtypes" })
+ private HashMap getExistingUsers() {
+ HashMap existingUsers = new HashMap();
+
+ // get the list of user ids in the system
+ List<Profile> list = profileService.findAll();
+
+ if (list != null) {
+ Iterator<Profile> i = list.iterator();
+ while (i.hasNext()) {
+ Profile user = i.next();
+ String orgUserId = user.getOrgUserId(); // userid scalar
+ Long id = user.getId(); // id scalar
+ if (orgUserId != null)
+ existingUsers.put(orgUserId, id);
+ }
+ }
+ return existingUsers;
+ }
+
+ @RequestMapping(value = { "/post_search/search" }, method = RequestMethod.POST)
+ public ModelAndView search(HttpServletRequest request, HttpServletResponse response) throws Exception {
+ try {
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+ JsonNode root = mapper.readTree(request.getReader());
+ PostSearchBean postSearchBean = mapper.readValue(root.get("postSearchBean").toString(),
+ PostSearchBean.class);
+
+ postSearchBean.setSearchResult(loadSearchResultData(request, postSearchBean));
+
+ response.setCharacterEncoding("UTF-8");
+ response.setContentType("application / json");
+ request.setCharacterEncoding("UTF-8");
+
+ PrintWriter out = response.getWriter();
+ String responseString = mapper.writeValueAsString(postSearchBean);
+ JSONObject j = new JSONObject("{postSearchBean: " + responseString + "}");
+
+ out.write(j.toString());
+ } catch (Exception ex) {
+ logger.error(EELFLoggerDelegate.errorLogger, "search: failed to send search result" + ex.getMessage());
+ }
+
+ return null;
+ }
+
+ @SuppressWarnings({ "unchecked", "rawtypes" })
+ public static List getSortByList() {
+ if (sortByList == null) {
+ sortByList = new ArrayList();
+ sortByList.add(new Lookup("Last Name", "last_name"));
+ sortByList.add(new Lookup("First Name", "first_name"));
+ sortByList.add(new Lookup("HRID", "hrid"));
+ sortByList.add(new Lookup("SBCID", "sbcid"));
+ sortByList.add(new Lookup("Organization", "org_code"));
+ sortByList.add(new Lookup("Email", "email"));
+ } // if
+
+ return sortByList;
+ } // getSortByList
+
+ private SearchResult loadSearchResultData(HttpServletRequest request, PostSearchBean searchCriteria)
+ throws Exception {
+ return ldapService.searchPost(searchCriteria.getUser(), searchCriteria.getSortBy1(),
+ searchCriteria.getSortBy2(), searchCriteria.getSortBy3(), searchCriteria.getPageNo(),
+ searchCriteria.getNewDataSize(), UserUtils.getUserSession(request).getId().intValue());
+ }
+
+ @RequestMapping(value = { "/post_search/process" }, method = RequestMethod.POST)
+ public ModelAndView process(HttpServletRequest request, HttpServletResponse response) throws Exception {
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+ mapper.configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, true);
+ JsonNode root = mapper.readTree(request.getReader());
+ PostSearchBean postSearch = mapper.readValue(root.get("postSearchBean").toString(), PostSearchBean.class);
+ String errorMsg = "{}";
+ try{
+ postSearchService.process(request, postSearch);
+ postSearch.setSearchResult(loadSearchResultData(request, postSearch));
+ }catch(Exception e){
+ errorMsg=e.getMessage();
+ logger.error(EELFLoggerDelegate.errorLogger,"Exception occurred while performing PostSearchController.process. Details:", e);
+ }
+ logger.info(EELFLoggerDelegate.auditLogger, "Import new user from webphone ");
+ response.setCharacterEncoding("UTF-8");
+ response.setContentType("application / json");
+ request.setCharacterEncoding("UTF-8");
+
+ PrintWriter out = response.getWriter();
+ String postSearchString = mapper.writeValueAsString(postSearch);
+ JSONObject j = new JSONObject("{postSearchBean: " + postSearchString + ",existingUsers: "
+ + mapper.writeValueAsString(getExistingUsers()) + ",errorMsg:"+errorMsg+"}");
+
+ out.write(j.toString());
+
+ return null;
+ }
+}
diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/ProfileController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/ProfileController.java
new file mode 100644
index 0000000..a774274
--- /dev/null
+++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/ProfileController.java
@@ -0,0 +1,352 @@
+/*-
+ * ================================================================================
+ * ECOMP Portal SDK
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.controller.core;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.UnsupportedEncodingException;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.json.JSONObject;
+import org.openecomp.portalsdk.core.controller.RestrictedBaseController;
+import org.openecomp.portalsdk.core.domain.Role;
+import org.openecomp.portalsdk.core.domain.User;
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.portalsdk.core.service.RoleService;
+import org.openecomp.portalsdk.core.service.UserProfileService;
+import org.openecomp.portalsdk.core.web.support.AppUtils;
+import org.openecomp.portalsdk.core.web.support.JsonMessage;
+import org.openecomp.portalsdk.core.web.support.UserUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.servlet.ModelAndView;
+
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+@Controller
+@RequestMapping("/")
+public class ProfileController extends RestrictedBaseController {
+
+ private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ProfileController.class);
+
+ @Autowired
+ UserProfileService service;
+
+ @Autowired
+ RoleService roleService;
+
+ private String viewName;
+
+ @RequestMapping(value = { "/profile" }, method = RequestMethod.GET)
+ public ModelAndView profile(HttpServletRequest request) {
+ Map<String, Object> model = new HashMap<String, Object>();
+ ObjectMapper mapper = new ObjectMapper();
+
+ User profile = null;
+ Long profileId = null;
+
+ if (request.getRequestURI().indexOf("self_profile.htm") > -1) {
+ profile = UserUtils.getUserSession(request);
+ profileId = profile.getId();
+ } else {
+ profileId = Long.parseLong(request.getParameter("profile_id"));
+ profile = (User) service.getUser(request.getParameter("profile_id"));
+ }
+
+ try {
+ model.put("stateList", mapper.writeValueAsString(getStates()));
+ model.put("countries", mapper.writeValueAsString(getCountries()));
+ model.put("timeZones", mapper.writeValueAsString(getTimeZones()));
+ model.put("availableRoles", mapper.writeValueAsString(getAvailableRoles()));
+ model.put("profile", mapper.writeValueAsString(profile));
+ model.put("profileId", mapper.writeValueAsString(profileId));
+ } catch (Exception e) {
+ logger.error(EELFLoggerDelegate.errorLogger, "profile: failed to write JSON", e);
+ }
+ return new ModelAndView("profile", "model", model);
+ }
+
+ @RequestMapping(value = { "/self_profile" }, method = RequestMethod.GET)
+ public ModelAndView self_profile(HttpServletRequest request) {
+ Map<String, Object> model = new HashMap<String, Object>();
+ ObjectMapper mapper = new ObjectMapper();
+
+ User profile = null;
+ Long profileId = null;
+
+ profile = UserUtils.getUserSession(request);
+ profileId = profile.getId();
+ profile = (User) service.getUser(profileId.toString());
+
+ try {
+ model.put("stateList", mapper.writeValueAsString(getStates()));
+ model.put("countries", mapper.writeValueAsString(getCountries()));
+ model.put("timeZones", mapper.writeValueAsString(getTimeZones()));
+ model.put("availableRoles", mapper.writeValueAsString(getAvailableRoles()));
+ model.put("profile", mapper.writeValueAsString(profile));
+ model.put("profileId", mapper.writeValueAsString(profileId));
+ } catch (Exception e) {
+ logger.error(EELFLoggerDelegate.errorLogger, "self_profile: failed to write JSON" + e.getMessage());
+ }
+ return new ModelAndView("profile", "model", model);
+ }
+
+ @RequestMapping(value = { "/get_self_profile" }, method = RequestMethod.GET)
+ public void getSelfProfile(HttpServletRequest request, HttpServletResponse response) {
+ Map<String, Object> model = new HashMap<String, Object>();
+ ObjectMapper mapper = new ObjectMapper();
+
+ User profile = null;
+ Long profileId = null;
+
+ profile = UserUtils.getUserSession(request);
+ profileId = profile.getId();
+ profile = (User) service.getUser(profileId.toString());
+
+ try {
+ model.put("stateList", mapper.writeValueAsString(getStates()));
+ model.put("countries", mapper.writeValueAsString(getCountries()));
+ model.put("timeZones", mapper.writeValueAsString(getTimeZones()));
+ model.put("availableRoles", mapper.writeValueAsString(getAvailableRoles()));
+ model.put("profile", mapper.writeValueAsString(profile));
+ model.put("profileId", mapper.writeValueAsString(profileId));
+ JsonMessage msg = new JsonMessage(mapper.writeValueAsString(model));
+ JSONObject j = new JSONObject(msg);
+ response.getWriter().write(j.toString());
+ } catch (Exception e) {
+ logger.error(EELFLoggerDelegate.errorLogger, "getSelfProfile: failed to write JSON" + e.getMessage());
+ }
+
+ }
+
+ @RequestMapping(value = { "/get_profile" }, method = RequestMethod.GET)
+ public void GetUser(HttpServletRequest request, HttpServletResponse response) {
+ Map<String, Object> model = new HashMap<String, Object>();
+ ObjectMapper mapper = new ObjectMapper();
+ try {
+ User profile = null;
+ Long profileId = null;
+ if (request.getRequestURI().indexOf("self_profile.htm") > -1) {
+ profile = UserUtils.getUserSession(request);
+ profileId = profile.getId();
+ } else {
+ profileId = Long.parseLong(request.getParameter("profile_id"));
+ profile = (User) service.getUser(request.getParameter("profile_id"));
+ }
+ model.put("stateList", mapper.writeValueAsString(getStates()));
+ model.put("countries", mapper.writeValueAsString(getCountries()));
+ model.put("timeZones", mapper.writeValueAsString(getTimeZones()));
+ model.put("availableRoles", mapper.writeValueAsString(getAvailableRoles()));
+ model.put("profile", mapper.writeValueAsString(profile));
+ model.put("profileId", mapper.writeValueAsString(profileId));
+ JsonMessage msg = new JsonMessage(mapper.writeValueAsString(model));
+ JSONObject j = new JSONObject(msg);
+ response.getWriter().write(j.toString());
+
+ } catch (Exception e) {
+ logger.error(EELFLoggerDelegate.errorLogger, "GetUser: failed to write JSON" + e.getMessage());
+ }
+ }
+
+ @RequestMapping(value = { "/profile/saveProfile" }, method = RequestMethod.POST)
+ public ModelAndView saveProfile(HttpServletRequest request, HttpServletResponse response) {
+ logger.info(EELFLoggerDelegate.debugLogger, "ProfileController.save");
+ try {
+
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+ JsonNode root = mapper.readTree(request.getReader());
+ User user = mapper.readValue(root.get("profile").toString(), User.class);
+
+ String selectedCountry = mapper.readValue(root.get("selectedCountry").toString(), String.class);
+ String selectedState = mapper.readValue(root.get("selectedState").toString(), String.class);
+ String selectedTimeZone = mapper.readValue(root.get("selectedTimeZone").toString(), String.class);
+
+ Long profileId = Long.parseLong(request.getParameter("profile_id"));
+
+ User domainUser = (User) service.getUser(request.getParameter("profile_id"));
+ // user.setRoles(domainUser.getRoles());
+ user.setPseudoRoles(domainUser.getPseudoRoles());
+ user.setUserApps(domainUser.getUserApps());
+ if (!selectedCountry.equals("")) {
+ user.setCountry(selectedCountry);
+ }
+ if (!selectedState.equals("")) {
+ user.setState(selectedState);
+ }
+ if (!selectedTimeZone.equals("")) {
+ user.setTimeZoneId(Long.parseLong(selectedTimeZone));
+ }
+ service.saveUser(user);
+ logger.info(EELFLoggerDelegate.auditLogger, "Save user's profile for user " + profileId);
+
+ response.setCharacterEncoding("UTF-8");
+ response.setContentType("application / json");
+ request.setCharacterEncoding("UTF-8");
+
+ PrintWriter out = response.getWriter();
+ out.write("" + profileId);
+ return null;
+ } catch (Exception e) {
+ response.setCharacterEncoding("UTF-8");
+ try {
+ request.setCharacterEncoding("UTF-8");
+ } catch (UnsupportedEncodingException e1) {
+
+ e1.printStackTrace();
+
+ }
+ PrintWriter out = null;
+ try {
+ out = response.getWriter();
+ } catch (IOException e1) {
+ logger.error(EELFLoggerDelegate.errorLogger, "saveProfile: failed to get writer" + e1.getMessage());
+ }
+ out.write(e.getMessage());
+ return null;
+ }
+ }
+
+ @RequestMapping(value = { "/profile/removeRole" }, method = RequestMethod.POST)
+ public ModelAndView removeRole(HttpServletRequest request, HttpServletResponse response) throws Exception {
+
+ logger.info(EELFLoggerDelegate.debugLogger, "ProfileController.save");
+ try {
+
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+ JsonNode root = mapper.readTree(request.getReader());
+ Role role = mapper.readValue(root.get("role").toString(), Role.class);
+
+ // Long profileId = Long.parseLong(request.getParameter("profile_id"));
+
+ User domainUser = (User) service.getUser(request.getParameter("profile_id"));
+
+ domainUser.removeRole(role.getId());
+
+ service.saveUser(domainUser);
+ logger.info(EELFLoggerDelegate.auditLogger, "Remove role " + role.getId() + " from user " + request.getParameter("profile_id"));
+
+ response.setCharacterEncoding("UTF-8");
+ response.setContentType("application / json");
+ request.setCharacterEncoding("UTF-8");
+
+ PrintWriter out = response.getWriter();
+
+ Map<String, Object> model = new HashMap<String, Object>();
+ model.put("profile", mapper.writeValueAsString(domainUser));
+ JSONObject j = new JSONObject(mapper.writeValueAsString(domainUser));
+
+ out.write(j.toString());
+
+ return null;
+ } catch (Exception e) {
+ logger.error(EELFLoggerDelegate.errorLogger, "removeRole" + e.getMessage());
+ response.setCharacterEncoding("UTF-8");
+ request.setCharacterEncoding("UTF-8");
+ PrintWriter out = response.getWriter();
+ out.write(e.getMessage());
+ return null;
+ }
+
+ }
+
+ @RequestMapping(value = { "/profile/addNewRole" }, method = RequestMethod.POST)
+ public ModelAndView addNewRole(HttpServletRequest request, HttpServletResponse response) throws Exception {
+
+ logger.info(EELFLoggerDelegate.debugLogger, "ProfileController.save" );
+ try {
+
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+ JsonNode root = mapper.readTree(request.getReader());
+ Role role = mapper.readValue(root.get("role").toString(), Role.class);
+
+ // Long profileId = Long.parseLong(request.getParameter("profile_id"));
+
+ User domainUser = (User) service.getUser(request.getParameter("profile_id"));
+
+ domainUser.addRole(role);
+
+ service.saveUser(domainUser);
+ logger.info(EELFLoggerDelegate.auditLogger, "Add new role " + role.getName() + " to user " + request.getParameter("profile_id"));
+
+ response.setCharacterEncoding("UTF-8");
+ response.setContentType("application / json");
+ request.setCharacterEncoding("UTF-8");
+
+ PrintWriter out = response.getWriter();
+
+ Map<String, Object> model = new HashMap<String, Object>();
+ model.put("profile", mapper.writeValueAsString(domainUser));
+ JSONObject j = new JSONObject(mapper.writeValueAsString(domainUser));
+
+ out.write(j.toString());
+
+ return null;
+ } catch (Exception e) {
+ logger.error(EELFLoggerDelegate.errorLogger, "addNewRole" + e.getMessage());
+ response.setCharacterEncoding("UTF-8");
+ request.setCharacterEncoding("UTF-8");
+ PrintWriter out = response.getWriter();
+ out.write(e.getMessage());
+ return null;
+ }
+
+ }
+
+ public String getViewName() {
+ return viewName;
+ }
+
+ public void setViewName(String viewName) {
+ this.viewName = viewName;
+ }
+
+ @SuppressWarnings("rawtypes")
+ public List getStates() {
+ return AppUtils.getLookupList("FN_LU_STATE", "STATE_CD", "STATE", null, "STATE_CD");
+ }
+
+ @SuppressWarnings("rawtypes")
+ public List getCountries() {
+ return AppUtils.getLookupList("FN_LU_COUNTRY", "COUNTRY_CD", "COUNTRY", null, "COUNTRY");
+ }
+
+ @SuppressWarnings("rawtypes")
+ public List getTimeZones() {
+ return AppUtils.getLookupList("FN_LU_TIMEZONE", "TIMEZONE_ID", "TIMEZONE_NAME", null, "TIMEZONE_NAME");
+ }
+
+ @SuppressWarnings("rawtypes")
+ public List getAvailableRoles() {
+ return roleService.getAvailableRoles();
+ }
+
+} \ No newline at end of file
diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/ProfileSearchController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/ProfileSearchController.java
new file mode 100644
index 0000000..c5614f8
--- /dev/null
+++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/ProfileSearchController.java
@@ -0,0 +1,163 @@
+/*-
+ * ================================================================================
+ * ECOMP Portal SDK
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.controller.core;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+
+import org.json.JSONObject;
+import org.openecomp.portalsdk.core.controller.RestrictedBaseController;
+import org.openecomp.portalsdk.core.domain.MenuData;
+import org.openecomp.portalsdk.core.domain.User;
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.portalsdk.core.service.FnMenuService;
+import org.openecomp.portalsdk.core.service.UserProfileService;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.openecomp.portalsdk.core.web.support.JsonMessage;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.servlet.ModelAndView;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+@Controller
+@RequestMapping("/")
+public class ProfileSearchController extends RestrictedBaseController {
+
+ private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ProfileSearchController.class);
+
+ @Autowired
+ UserProfileService service;
+
+ @Autowired
+ FnMenuService fnMenuService;
+
+ @RequestMapping(value = { "/profile_search" }, method = RequestMethod.GET)
+ public ModelAndView ProfileSearch(HttpServletRequest request) {
+ Map<String, Object> model = new HashMap<String, Object>();
+ ObjectMapper mapper = new ObjectMapper();
+ List<User> profileList = null;
+ logger.info(EELFLoggerDelegate.applicationLogger, "Initiating ProfileSearch in ProfileSearchController");
+ try {
+ profileList = service.findAll();
+ model.putAll(setDashboardData(request));
+ model.put("profileList", mapper.writeValueAsString(profileList));
+ } catch (Exception e) {
+ logger.error(EELFLoggerDelegate.applicationLogger,
+ "error while profile_search process in ProfileSearchController" + e.getMessage());
+ }
+ return new ModelAndView(getViewName(), "model", model);
+ }
+
+ @RequestMapping(value = { "/get_user" }, method = RequestMethod.GET)
+ public void GetUser(HttpServletRequest request, HttpServletResponse response) {
+ logger.info(EELFLoggerDelegate.applicationLogger, "Initiating get_user in ProfileSearchController");
+ ObjectMapper mapper = new ObjectMapper();
+ List<User> profileList = null;
+ try {
+ profileList = service.findAll();
+ JsonMessage msg = new JsonMessage(mapper.writeValueAsString(profileList));
+ JSONObject j = new JSONObject(msg);
+ response.getWriter().write(j.toString());
+
+ } catch (Exception e) {
+ logger.error(EELFLoggerDelegate.applicationLogger,
+ "error while get_user process in ProfileSearchController" + e.getMessage());
+ }
+ }
+
+ @RequestMapping(value = { "/get_user_pagination" }, method = RequestMethod.GET)
+ public void getUserPagination(HttpServletRequest request, HttpServletResponse response) {
+ Map<String, Object> model = new HashMap<String, Object>();
+ ObjectMapper mapper = new ObjectMapper();
+ logger.info(EELFLoggerDelegate.applicationLogger, "Initiating get_user_pagination in ProfileSearchController");
+ int pageNum = Integer.parseInt(request.getParameter("pageNum"));
+ int viewPerPage = Integer.parseInt(request.getParameter("viewPerPage"));
+ List<User> profileList = null;
+ try {
+ profileList = service.findAll();
+ model.put("totalPage", (int) Math.ceil((double) profileList.size() / viewPerPage));
+ profileList = profileList.subList(
+ viewPerPage * (pageNum - 1) < profileList.size() ? viewPerPage * (pageNum - 1) : profileList.size(),
+ viewPerPage * pageNum < profileList.size() ? viewPerPage * pageNum : profileList.size());
+ model.put("profileList", mapper.writeValueAsString(profileList));
+ JsonMessage msg = new JsonMessage(mapper.writeValueAsString(model));
+ JSONObject j = new JSONObject(msg);
+ response.getWriter().write(j.toString());
+
+ } catch (Exception e) {
+ logger.error(EELFLoggerDelegate.applicationLogger,
+ "error while get_user_pagination process in ProfileSearchController" + e.getMessage());
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ public Map<String, Object> setDashboardData(HttpServletRequest request) throws Exception {
+ ObjectMapper mapper = new ObjectMapper();
+ Map<String, Object> model = new HashMap<String, Object>();
+ List<List<MenuData>> childItemList = new ArrayList<List<MenuData>>();
+ List<MenuData> parentList = new ArrayList<MenuData>();
+ logger.info(EELFLoggerDelegate.applicationLogger, "Initiating setDashboardData in ProfileSearchController");
+ HttpSession session = request.getSession();
+ try {
+ Set<MenuData> menuResult = (Set<MenuData>) session
+ .getAttribute(SystemProperties.getProperty(SystemProperties.APPLICATION_MENU_ATTRIBUTE_NAME));
+ fnMenuService.setMenuDataStructure(childItemList, parentList, menuResult);
+ } catch (Exception e) {
+ logger.error(EELFLoggerDelegate.applicationLogger,
+ "error while setDashboardData process in ProfileSearchController" + e.getMessage());
+ }
+ model.put("childItemList", mapper.writeValueAsString(childItemList));
+ model.put("parentList", mapper.writeValueAsString(parentList));
+ return model;
+ }
+
+ @RequestMapping(value = { "/profile/toggleProfileActive" }, method = RequestMethod.GET)
+ public void toggleProfileActive(HttpServletRequest request, HttpServletResponse response) throws IOException {
+ try {
+ logger.info(EELFLoggerDelegate.applicationLogger,
+ "Initiating toggleProfileActive in ProfileSearchController");
+ String userId = request.getParameter("profile_id");
+ User user = (User) service.getUser(userId);
+ user.setActive(!user.getActive());
+ service.saveUser(user);
+ logger.info(EELFLoggerDelegate.auditLogger,
+ "Change active status for user " + user.getId() + " to " + user.getActive());
+ ObjectMapper mapper = new ObjectMapper();
+ response.setContentType("application/json");
+ PrintWriter out = response.getWriter();
+ out.write(mapper.writeValueAsString(user.getActive()));
+ } catch (Exception e) {
+ logger.error(EELFLoggerDelegate.applicationLogger,
+ "error while toggleProfileActive process in ProfileSearchController" + e.getMessage());
+ }
+ }
+}
diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/RoleController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/RoleController.java
new file mode 100644
index 0000000..ca902c4
--- /dev/null
+++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/RoleController.java
@@ -0,0 +1,342 @@
+/*-
+ * ================================================================================
+ * ECOMP Portal SDK
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.controller.core;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.json.JSONObject;
+import org.openecomp.portalsdk.core.controller.RestrictedBaseController;
+import org.openecomp.portalsdk.core.domain.Role;
+import org.openecomp.portalsdk.core.domain.RoleFunction;
+import org.openecomp.portalsdk.core.logging.aspect.EELFLoggerAdvice;
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.portalsdk.core.service.RoleService;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.openecomp.portalsdk.core.web.support.JsonMessage;
+import org.slf4j.MDC;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.ServletRequestUtils;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.servlet.ModelAndView;
+
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.type.TypeFactory;
+
+@Controller
+@RequestMapping("/")
+public class RoleController extends RestrictedBaseController {
+ private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(RoleController.class);
+
+ @Autowired
+ RoleService roleService;
+
+ private String viewName;
+
+ @RequestMapping(value = { "/role" }, method = RequestMethod.GET)
+ public ModelAndView role(HttpServletRequest request) {
+ Map<String, Object> model = new HashMap<String, Object>();
+ ObjectMapper mapper = new ObjectMapper();
+
+ Role role = roleService.getRole(new Long(ServletRequestUtils.getIntParameter(request, "role_id", 0)));
+ logger.info("role_id" + role.getId());
+ try {
+ model.put("availableRoleFunctions", mapper.writeValueAsString(roleService.getRoleFunctions()));
+ model.put("availableRoles", mapper.writeValueAsString(roleService.getAvailableChildRoles(role.getId())));
+ model.put("role", mapper.writeValueAsString(role));
+ } catch (Exception e) {
+ logger.error("role: failed", e);
+ logger.error(EELFLoggerDelegate.errorLogger, "role failed", e);
+ }
+ return new ModelAndView(getViewName(), model);
+ }
+
+ @RequestMapping(value = { "/get_role" }, method = RequestMethod.GET)
+ public void getRole(HttpServletRequest request, HttpServletResponse response) {
+ Map<String, Object> model = new HashMap<String, Object>();
+ ObjectMapper mapper = new ObjectMapper();
+
+ Role role = roleService.getRole(new Long(ServletRequestUtils.getIntParameter(request, "role_id", 0)));
+ logger.info(EELFLoggerDelegate.applicationLogger, "role_id" + role.getId());
+ try {
+ model.put("availableRoleFunctions", mapper.writeValueAsString(roleService.getRoleFunctions()));
+ model.put("availableRoles", mapper.writeValueAsString(roleService.getAvailableChildRoles(role.getId())));
+ model.put("role", mapper.writeValueAsString(role));
+
+ JsonMessage msg = new JsonMessage(mapper.writeValueAsString(model));
+ JSONObject j = new JSONObject(msg);
+ response.getWriter().write(j.toString());
+ } catch (Exception e) {
+ logger.error(EELFLoggerDelegate.errorLogger, "getRole failed", e);
+ }
+
+ }
+
+ /**
+ * Creates a new role or updates an existing role.
+ *
+ * @param request
+ * @param response
+ * @return Always returns null.
+ * @throws IOException
+ * If the write to the result project fails
+ */
+ @RequestMapping(value = { "/role/saveRole" }, method = RequestMethod.POST)
+ public ModelAndView saveRole(HttpServletRequest request, HttpServletResponse response) throws IOException {
+ JSONObject j = null;
+ logger.debug(EELFLoggerDelegate.debugLogger, "RoleController.save");
+ try {
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+ JsonNode root = mapper.readTree(request.getReader());
+ Role role = mapper.readValue(root.get("role").toString(), Role.class);
+
+ List<Role> childRoles = mapper.readValue(root.get("childRoles").toString(),
+ TypeFactory.defaultInstance().constructCollectionType(List.class, Role.class));
+
+ List<RoleFunction> roleFunctions = mapper.readValue(root.get("roleFunctions").toString(),
+ TypeFactory.defaultInstance().constructCollectionType(List.class, RoleFunction.class));
+
+ Role domainRole = null;
+ if (role.getId() != null) {
+ doAuditLog("saveRole: updating existing role {}", role.getId());
+ domainRole = roleService.getRole(role.getId());
+
+ domainRole.setName(role.getName());
+ domainRole.setPriority(role.getPriority());
+ } else {
+ doAuditLog("saveRole: creating new role", role.getName());
+ // check for existing role of same name
+ List<Role> roles = roleService.getAvailableRoles();
+ for (Role existRole : roles)
+ if (existRole.getName().equalsIgnoreCase(role.getName()))
+ throw new Exception("role already exists: " + existRole.getName());
+
+ domainRole = new Role();
+ domainRole.setName(role.getName());
+ domainRole.setPriority(role.getPriority());
+ if (role.getChildRoles().size() > 0) {
+ for (Object childRole : childRoles) {
+ domainRole.addChildRole((Role) childRole);
+ }
+ }
+ if (role.getRoleFunctions().size() > 0) {
+ for (Object roleFunction : roleFunctions) {
+ domainRole.addRoleFunction((RoleFunction) roleFunction);
+ }
+ }
+ }
+
+ roleService.saveRole(domainRole);
+
+ String responseString = mapper.writeValueAsString(domainRole);
+ j = new JSONObject("{role: " + responseString + "}");
+ } catch (Exception e) {
+ // Produce JSON error message
+ logger.error(EELFLoggerDelegate.errorLogger, "saveRole failed", e);
+ j = new JSONObject("{error: '" + e.getMessage() + "'}");
+ }
+
+ response.setCharacterEncoding("UTF-8");
+ response.setContentType("application/json");
+ PrintWriter out = response.getWriter();
+ out.write(j.toString());
+ return null;
+ }
+
+ @RequestMapping(value = { "/role/removeRoleFunction" }, method = RequestMethod.POST)
+ public ModelAndView removeRoleFunction(HttpServletRequest request, HttpServletResponse response) throws Exception {
+
+ logger.info(EELFLoggerDelegate.applicationLogger, "RoleController.removeRoleFunction");
+ try {
+
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+ JsonNode root = mapper.readTree(request.getReader());
+ RoleFunction roleFunction = mapper.readValue(root.get("roleFunction").toString(), RoleFunction.class);
+
+ Role domainRole = roleService.getRole(new Long(ServletRequestUtils.getIntParameter(request, "role_id", 0)));
+ doAuditLog("Remove role function {} from role {}", roleFunction.getCode(),
+ ServletRequestUtils.getIntParameter(request, "role_id", 0));
+
+ domainRole.removeRoleFunction(roleFunction.getCode());
+
+ roleService.saveRole(domainRole);
+
+ response.setCharacterEncoding("UTF-8");
+ response.setContentType("application/json");
+ String responseString = mapper.writeValueAsString(domainRole);
+ JSONObject j = new JSONObject("{role: " + responseString + "}");
+ PrintWriter out = response.getWriter();
+ out.write(j.toString());
+ return null;
+ } catch (Exception e) {
+ logger.error(EELFLoggerDelegate.errorLogger, "removeRole failed", e);
+ response.setCharacterEncoding("UTF-8");
+ PrintWriter out = response.getWriter();
+ out.write(e.getMessage());
+ return null;
+ }
+
+ }
+
+ @RequestMapping(value = { "/role/addRoleFunction" }, method = RequestMethod.POST)
+ public ModelAndView addRoleFunction(HttpServletRequest request, HttpServletResponse response) throws Exception {
+
+ logger.info(EELFLoggerDelegate.applicationLogger, "RoleController.removeRoleFunction");
+ try {
+
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+ JsonNode root = mapper.readTree(request.getReader());
+ RoleFunction roleFunction = mapper.readValue(root.get("roleFunction").toString(), RoleFunction.class);
+
+ Role domainRole = roleService.getRole(new Long(ServletRequestUtils.getIntParameter(request, "role_id", 0)));
+
+ domainRole.addRoleFunction(roleFunction);
+
+ roleService.saveRole(domainRole);
+ doAuditLog("Add role function {} to role {}", roleFunction.getCode(),
+ ServletRequestUtils.getIntParameter(request, "role_id", 0));
+
+ response.setCharacterEncoding("UTF-8");
+ response.setContentType("application/json");
+ String responseString = mapper.writeValueAsString(domainRole);
+ JSONObject j = new JSONObject("{role: " + responseString + "}");
+ PrintWriter out = response.getWriter();
+ out.write(j.toString());
+ return null;
+ } catch (Exception e) {
+ logger.error(EELFLoggerDelegate.errorLogger, "removeRoleFunction failed", e);
+ response.setCharacterEncoding("UTF-8");
+ PrintWriter out = response.getWriter();
+ out.write(e.getMessage());
+ return null;
+ }
+
+ }
+
+ @RequestMapping(value = { "/role/removeChildRole" }, method = RequestMethod.POST)
+ public ModelAndView removeChildRole(HttpServletRequest request, HttpServletResponse response) throws Exception {
+
+ logger.info(EELFLoggerDelegate.applicationLogger, "RoleController.removeChileRole");
+ try {
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+ JsonNode root = mapper.readTree(request.getReader());
+ Role childRole = mapper.readValue(root.get("childRole").toString(), Role.class);
+
+ Role domainRole = roleService.getRole(new Long(ServletRequestUtils.getIntParameter(request, "role_id", 0)));
+
+ domainRole.removeChildRole(childRole.getId());
+ doAuditLog("remove child role {} from role {}", childRole.getId(),
+ ServletRequestUtils.getIntParameter(request, "role_id", 0));
+
+ roleService.saveRole(domainRole);
+
+ response.setCharacterEncoding("UTF-8");
+ response.setContentType("application/json");
+ String responseString = mapper.writeValueAsString(domainRole);
+ JSONObject j = new JSONObject("{role: " + responseString + "}");
+ PrintWriter out = response.getWriter();
+ out.write(j.toString());
+ return null;
+ } catch (Exception e) {
+ logger.error(EELFLoggerDelegate.errorLogger, "removeChildRole failed", e);
+ response.setCharacterEncoding("UTF-8");
+ PrintWriter out = response.getWriter();
+ out.write(e.getMessage());
+ return null;
+ }
+
+ }
+
+ @RequestMapping(value = { "/role/addChildRole" }, method = RequestMethod.POST)
+ public ModelAndView addChildRole(HttpServletRequest request, HttpServletResponse response) throws Exception {
+
+ logger.info(EELFLoggerDelegate.applicationLogger, "RoleController.addChileRole");
+ try {
+
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+ JsonNode root = mapper.readTree(request.getReader());
+ Role childRole = mapper.readValue(root.get("childRole").toString(), Role.class);
+
+ Role domainRole = roleService.getRole(new Long(ServletRequestUtils.getIntParameter(request, "role_id", 0)));
+
+ domainRole.addChildRole(childRole);
+
+ roleService.saveRole(domainRole);
+ doAuditLog("Add child role {} to role {}", childRole.getId(),
+ ServletRequestUtils.getIntParameter(request, "role_id", 0));
+
+ response.setCharacterEncoding("UTF-8");
+ response.setContentType("application/json");
+ String responseString = mapper.writeValueAsString(domainRole);
+ JSONObject j = new JSONObject("{role: " + responseString + "}");
+ PrintWriter out = response.getWriter();
+ out.write(j.toString());
+ return null;
+ } catch (Exception e) {
+ logger.error(EELFLoggerDelegate.errorLogger, "addChildRole failed", e);
+ response.setCharacterEncoding("UTF-8");
+ PrintWriter out = response.getWriter();
+ out.write(e.getMessage());
+ return null;
+ }
+
+ }
+
+ /**
+ * Sets context with begin and end timestamps at current date & time, writes
+ * the specified message and parameters to the audit log, then removes the
+ * timestamps from context.
+ *
+ * @param message
+ * @param parameters
+ */
+ private void doAuditLog(String message, Object... parameters) {
+ final String currentDateTime = EELFLoggerAdvice.getCurrentDateTimeUTC();
+ // Set the MDC with audit properties
+ MDC.put(SystemProperties.AUDITLOG_BEGIN_TIMESTAMP, currentDateTime);
+ MDC.put(SystemProperties.AUDITLOG_END_TIMESTAMP, currentDateTime);
+ logger.info(EELFLoggerDelegate.auditLogger, message, parameters);
+ MDC.remove(SystemProperties.AUDITLOG_BEGIN_TIMESTAMP);
+ MDC.remove(SystemProperties.AUDITLOG_END_TIMESTAMP);
+ }
+
+ public String getViewName() {
+ return viewName;
+ }
+
+ public void setViewName(String viewName) {
+ this.viewName = viewName;
+ }
+} \ No newline at end of file
diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/RoleFunctionListController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/RoleFunctionListController.java
new file mode 100644
index 0000000..13b3a7c
--- /dev/null
+++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/RoleFunctionListController.java
@@ -0,0 +1,172 @@
+/*-
+ * ================================================================================
+ * ECOMP Portal SDK
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.controller.core;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.json.JSONObject;
+import org.openecomp.portalsdk.core.controller.RestrictedBaseController;
+import org.openecomp.portalsdk.core.domain.RoleFunction;
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.portalsdk.core.service.RoleService;
+import org.openecomp.portalsdk.core.web.support.JsonMessage;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.servlet.ModelAndView;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+@Controller
+@RequestMapping("/")
+public class RoleFunctionListController extends RestrictedBaseController {
+ private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(RoleFunctionListController.class);
+
+ @Autowired
+ RoleService service;
+
+ private String viewName;
+
+ @RequestMapping(value = {"/role_function_list" }, method = RequestMethod.GET)
+ public ModelAndView welcome(HttpServletRequest request) {
+ Map<String, Object> model = new HashMap<String, Object>();
+ ObjectMapper mapper = new ObjectMapper();
+
+ try {
+ model.put("availableRoleFunctions", mapper.writeValueAsString(service.getRoleFunctions()));
+ } catch (Exception e) {
+ logger.error(EELFLoggerDelegate.errorLogger, "welcome failed", e);
+ }
+
+ return new ModelAndView(getViewName(),model);
+ }
+
+ @RequestMapping(value = {"/get_role_functions" }, method = RequestMethod.GET)
+ public void getRoleFunctionList(HttpServletRequest request,HttpServletResponse response) {
+ Map<String, Object> model = new HashMap<String, Object>();
+ ObjectMapper mapper = new ObjectMapper();
+
+ try {
+ model.put("availableRoleFunctions", mapper.writeValueAsString(service.getRoleFunctions()));
+ JsonMessage msg = new JsonMessage(mapper.writeValueAsString(model));
+ JSONObject j = new JSONObject(msg);
+ response.getWriter().write(j.toString());
+ } catch (Exception e) {
+ logger.error(EELFLoggerDelegate.errorLogger, "getROleFunctionList failed", e);
+ }
+
+ }
+
+ @RequestMapping(value = {"/role_function_list/saveRoleFunction" }, method = RequestMethod.POST)
+ public void saveRoleFunction(HttpServletRequest request,
+ HttpServletResponse response, @RequestBody String roleFunc) throws Exception {
+ ObjectMapper mapper = new ObjectMapper();
+ String restCallStatus = "";
+ try {
+ String data = roleFunc;
+ RoleFunction availableRoleFunction = mapper.readValue(data, RoleFunction.class);
+ String code = availableRoleFunction.getCode();
+ RoleFunction domainRoleFunction = service.getRoleFunction(code);
+ domainRoleFunction.setName(availableRoleFunction.getName());
+ domainRoleFunction.setCode(code);
+ restCallStatus="success";
+ service.saveRoleFunction(domainRoleFunction);
+ } catch (Exception e) {
+ restCallStatus="fail";
+ logger.error(EELFLoggerDelegate.errorLogger, "saveRoleFunction failed", e);
+ }
+ JsonMessage msg = new JsonMessage(mapper.writeValueAsString(restCallStatus));
+ JSONObject j = new JSONObject(msg);
+ response.getWriter().write(j.toString());
+ }
+
+ @RequestMapping(value = {"/role_function_list/addRoleFunction" }, method = RequestMethod.POST)
+ public void addRoleFunction(HttpServletRequest request,
+ HttpServletResponse response, @RequestBody String roleFunc) throws Exception {
+ ObjectMapper mapper = new ObjectMapper();
+ String restCallStatus = "";
+ boolean canSave=true;
+ try {
+ String data = roleFunc;
+ RoleFunction availableRoleFunction = mapper.readValue(data, RoleFunction.class);
+ String code = availableRoleFunction.getCode();
+ RoleFunction domainRoleFunction = service.getRoleFunction(code);
+ domainRoleFunction.setName(availableRoleFunction.getName());
+ domainRoleFunction.setCode(code);
+ List<RoleFunction> currentRoleFunction = service.getRoleFunctions();
+ restCallStatus="success";
+ for(RoleFunction roleF:currentRoleFunction){
+ if(roleF.getCode().equals(code)){
+ restCallStatus="code exists";
+ canSave=false;
+ break;
+ }
+ }
+ if(canSave)
+ service.saveRoleFunction(domainRoleFunction);
+ } catch (Exception e) {
+ restCallStatus="fail";
+ logger.error(EELFLoggerDelegate.errorLogger, "addRoleFunction failed", e);
+ }
+ JsonMessage msg = new JsonMessage(mapper.writeValueAsString(restCallStatus));
+ JSONObject j = new JSONObject(msg);
+ response.getWriter().write(j.toString());
+ }
+
+ @RequestMapping(value = {"/role_function_list/removeRoleFunction" }, method = RequestMethod.POST)
+ public void removeRoleFunction(HttpServletRequest request,
+ HttpServletResponse response, @RequestBody String roleFunc) throws Exception {
+ ObjectMapper mapper = new ObjectMapper();
+ String restCallStatus = "";
+ try {
+ String data = roleFunc;
+
+ RoleFunction availableRoleFunction = mapper.readValue(data, RoleFunction.class);
+
+ RoleFunction domainRoleFunction = service.getRoleFunction(availableRoleFunction.getCode());
+
+ service.deleteRoleFunction(domainRoleFunction);
+ logger.info(EELFLoggerDelegate.auditLogger, "Remove role function " + domainRoleFunction.getName());
+ restCallStatus="success";
+ } catch (Exception e) {
+ restCallStatus="fail";
+ logger.error(EELFLoggerDelegate.errorLogger, "removeRoleFunction failed", e);
+ }
+ JsonMessage msg = new JsonMessage(mapper.writeValueAsString(restCallStatus));
+ JSONObject j = new JSONObject(msg);
+ response.getWriter().write(j.toString());
+ }
+
+ public String getViewName() {
+ return viewName;
+ }
+ public void setViewName(String viewName) {
+ this.viewName = viewName;
+ }
+
+
+}
diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/RoleListController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/RoleListController.java
new file mode 100644
index 0000000..be08d4e
--- /dev/null
+++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/RoleListController.java
@@ -0,0 +1,170 @@
+/*-
+ * ================================================================================
+ * ECOMP Portal SDK
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.controller.core;
+
+import java.io.PrintWriter;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.json.JSONObject;
+import org.openecomp.portalsdk.core.controller.RestrictedBaseController;
+import org.openecomp.portalsdk.core.domain.Role;
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.portalsdk.core.service.RoleService;
+import org.openecomp.portalsdk.core.web.support.JsonMessage;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.servlet.ModelAndView;
+
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+@Controller
+@RequestMapping("/")
+public class RoleListController extends RestrictedBaseController {
+
+ private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(RoleListController.class);
+ @Autowired
+ RoleService service;
+
+ private String viewName;
+
+ @RequestMapping(value = {"/role_list" }, method = RequestMethod.GET)
+ public ModelAndView getRoleList(HttpServletRequest request) {
+ Map<String, Object> model = new HashMap<String, Object>();
+ ObjectMapper mapper = new ObjectMapper();
+
+ try {
+ model.put("availableRoles", mapper.writeValueAsString(service.getAvailableRoles()));
+ } catch (Exception e) {
+ logger.error(EELFLoggerDelegate.errorLogger, "getRoleList failed", e);
+ }
+
+ return new ModelAndView(getViewName(),model);
+ }
+
+ @RequestMapping(value = {"/get_roles" }, method = RequestMethod.GET)
+ public void getRoles(HttpServletRequest request, HttpServletResponse response) {
+ Map<String, Object> model = new HashMap<String, Object>();
+ ObjectMapper mapper = new ObjectMapper();
+
+ try {
+ model.put("availableRoles", mapper.writeValueAsString(service.getAvailableRoles()));
+ JsonMessage msg = new JsonMessage(mapper.writeValueAsString(model));
+ JSONObject j = new JSONObject(msg);
+ response.getWriter().write(j.toString());
+ } catch (Exception e) {
+ logger.error(EELFLoggerDelegate.errorLogger, "getRoles failed", e);
+ }
+ }
+
+
+ @RequestMapping(value = {"/role_list/toggleRole" }, method = RequestMethod.POST)
+ public ModelAndView toggleRole(HttpServletRequest request,
+ HttpServletResponse response) throws Exception {
+
+ try {
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+ JsonNode root = mapper.readTree(request.getReader());
+ Role role = mapper.readValue(root.get("role").toString(), Role.class);
+
+ Role domainRole = service.getRole(role.getId());
+ //role. toggle active ind
+ boolean active = domainRole.getActive();
+ domainRole.setActive(!active);
+
+ service.saveRole(domainRole);
+ logger.info(EELFLoggerDelegate.auditLogger, "Toggle active status for role " + domainRole.getId());
+
+ response.setCharacterEncoding("UTF-8");
+ response.setContentType("application / json");
+ request.setCharacterEncoding("UTF-8");
+
+ PrintWriter out = response.getWriter();
+ String responseString = mapper.writeValueAsString(service.getAvailableRoles());
+ JSONObject j = new JSONObject("{availableRoles: "+responseString+"}");
+
+ out.write(j.toString());
+
+ return null;
+ } catch (Exception e) {
+ logger.error(EELFLoggerDelegate.errorLogger, "toggleRole failed", e);
+ response.setCharacterEncoding("UTF-8");
+ request.setCharacterEncoding("UTF-8");
+ PrintWriter out = response.getWriter();
+ out.write(e.getMessage());
+ return null;
+ }
+
+ }
+
+ @RequestMapping(value = {"/role_list/removeRole" }, method = RequestMethod.POST)
+ public ModelAndView removeRole(HttpServletRequest request,
+ HttpServletResponse response) throws Exception {
+
+ try {
+
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+ JsonNode root = mapper.readTree(request.getReader());
+ Role role = mapper.readValue(root.get("role").toString(), Role.class);
+
+ Role domainRole = service.getRole(role.getId());
+
+ service.deleteDependcyRoleRecord(role.getId());
+ service.deleteRole(domainRole);
+ logger.info(EELFLoggerDelegate.auditLogger, "Remove role " + domainRole.getId());
+
+ response.setCharacterEncoding("UTF-8");
+ response.setContentType("application / json");
+ request.setCharacterEncoding("UTF-8");
+
+ PrintWriter out = response.getWriter();
+
+ String responseString = mapper.writeValueAsString(service.getAvailableRoles());
+ JSONObject j = new JSONObject("{availableRoles: "+responseString+"}");
+ out.write(j.toString());
+
+ return null;
+ } catch (Exception e) {
+ logger.error(EELFLoggerDelegate.errorLogger, "removeRole failed", e);
+ response.setCharacterEncoding("UTF-8");
+ request.setCharacterEncoding("UTF-8");
+ PrintWriter out = response.getWriter();
+ out.write(e.getMessage());
+ return null;
+ }
+
+ }
+
+ public String getViewName() {
+ return viewName;
+ }
+ public void setViewName(String viewName) {
+ this.viewName = viewName;
+ }
+}
diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/SDKLoginController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/SDKLoginController.java
new file mode 100644
index 0000000..10d2b95
--- /dev/null
+++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/SDKLoginController.java
@@ -0,0 +1,99 @@
+/*-
+ * ================================================================================
+ * ECOMP Portal SDK
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.controller.core;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.openecomp.portalsdk.core.auth.LoginStrategy;
+import org.openecomp.portalsdk.core.controller.UnRestrictedBaseController;
+import org.openecomp.portalsdk.core.onboarding.listener.PortalTimeoutHandler;
+import org.openecomp.portalsdk.core.service.LoginService;
+import org.openecomp.portalsdk.core.service.ProfileService;
+import org.openecomp.portalsdk.core.web.support.AppUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.servlet.ModelAndView;
+
+@Controller
+@RequestMapping("/")
+public class SDKLoginController extends UnRestrictedBaseController {
+ @Autowired
+ ProfileService service;
+ @Autowired
+ private LoginService loginService;
+ @Autowired
+ private LoginStrategy loginStrategy;
+
+ private String viewName;
+
+ @RequestMapping(value = { "/login.htm" }, method = RequestMethod.GET)
+ public ModelAndView login(HttpServletRequest request) {
+ Map<String, Object> model = new HashMap<String, Object>();
+ return new ModelAndView("login", "model", model);
+ }
+
+ @RequestMapping(value = { "/login_external.htm" }, method = RequestMethod.GET)
+ public ModelAndView externalLogin(HttpServletRequest request) {
+ Map<String, Object> model = new HashMap<String, Object>();
+ return new ModelAndView("login_external", "model", model);
+ }
+
+ @RequestMapping(value = { "/login_external" }, method = RequestMethod.POST)
+ public ModelAndView doexternalLogin(HttpServletRequest request, HttpServletResponse response) throws Exception {
+ return loginStrategy.doExternalLogin(request, response);
+ }
+
+ @RequestMapping(value = { "/doLogin" }, method = RequestMethod.GET)
+ public ModelAndView doLogin(HttpServletRequest request, HttpServletResponse response) throws Exception {
+ return loginStrategy.doLogin(request, response);
+ }
+
+ public String getJessionId(HttpServletRequest request) {
+ return request.getSession().getId();
+ }
+
+ protected void initateSessionMgtHandler(HttpServletRequest request) {
+ String jSessionId = getJessionId(request);
+ PortalTimeoutHandler.sessionCreated(jSessionId, jSessionId, AppUtils.getSession(request));
+ }
+
+ public String getViewName() {
+ return viewName;
+ }
+
+ public void setViewName(String viewName) {
+ this.viewName = viewName;
+ }
+
+ public LoginService getLoginService() {
+ return loginService;
+ }
+
+ public void setLoginService(LoginService loginService) {
+ this.loginService = loginService;
+ }
+
+}
diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/SingleSignOnController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/SingleSignOnController.java
new file mode 100644
index 0000000..9ffa1d1
--- /dev/null
+++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/SingleSignOnController.java
@@ -0,0 +1,223 @@
+/*-
+ * ================================================================================
+ * ECOMP Portal SDK
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.controller.core;
+
+import java.net.URLDecoder;
+import java.net.URLEncoder;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.servlet.http.Cookie;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSession;
+
+import org.openecomp.portalsdk.core.auth.LoginStrategy;
+import org.openecomp.portalsdk.core.command.LoginBean;
+import org.openecomp.portalsdk.core.controller.UnRestrictedBaseController;
+import org.openecomp.portalsdk.core.domain.User;
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.portalsdk.core.menu.MenuProperties;
+import org.openecomp.portalsdk.core.onboarding.listener.PortalTimeoutHandler;
+import org.openecomp.portalsdk.core.onboarding.util.PortalApiConstants;
+import org.openecomp.portalsdk.core.onboarding.util.PortalApiProperties;
+import org.openecomp.portalsdk.core.service.LoginService;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.openecomp.portalsdk.core.web.support.AppUtils;
+import org.openecomp.portalsdk.core.web.support.UserUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.servlet.ModelAndView;
+import org.springframework.web.util.WebUtils;
+
+@Controller
+@RequestMapping("/")
+public class SingleSignOnController extends UnRestrictedBaseController {
+
+ private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(SingleSignOnController.class);
+
+ @Autowired
+ private LoginService loginService;
+
+ @Autowired
+ private LoginStrategy loginStrategy;
+
+ private String viewName;
+ private String welcomeView;
+
+ public String getWelcomeView() {
+ return welcomeView;
+ }
+
+ public void setWelcomeView(String welcomeView) {
+ this.welcomeView = welcomeView;
+ }
+
+ /**
+ * Handles requests directed to the single sign-on page by the session
+ * timeout interceptor.
+ *
+ * @param request
+ * @return Redirect to an appropriate address
+ * @throws Exception
+ */
+ @RequestMapping(value = { "/single_signon.htm" }, method = RequestMethod.GET)
+ public ModelAndView singleSignOnLogin(HttpServletRequest request) throws Exception {
+
+ Map<String, String> model = new HashMap<String, String>();
+ HashMap<String, String> additionalParamsMap = new HashMap<String, String>();
+ LoginBean commandBean = new LoginBean();
+
+ // SessionTimeoutInterceptor sets these parameters
+ String forwardURL = URLDecoder.decode(request.getParameter("forwardURL"), "UTF-8");
+ String redirectToPortal = request.getParameter("redirectToPortal");
+
+ if (isLoginCookieExist(request) && redirectToPortal == null) {
+ HttpSession session = null;
+ session = AppUtils.getSession(request);
+ User user = UserUtils.getUserSession(request);
+ if (session == null || user == null) {
+
+ final String authMech = SystemProperties.getProperty(SystemProperties.AUTHENTICATION_MECHANISM);
+ String userId = loginStrategy.getUserId(request);
+ commandBean.setUserid(userId);
+ commandBean = getLoginService().findUser(commandBean,
+ (String) request.getAttribute(MenuProperties.MENU_PROPERTIES_FILENAME_KEY),
+ additionalParamsMap);
+ if (commandBean.getUser() == null) {
+ String loginErrorMessage = (commandBean.getLoginErrorMessage() != null)
+ ? commandBean.getLoginErrorMessage()
+ : SystemProperties.MESSAGE_KEY_LOGIN_ERROR_USER_NOT_FOUND;
+ model.put(LoginStrategy.ERROR_MESSAGE_KEY, SystemProperties.getProperty(loginErrorMessage));
+ final String redirectUrl = PortalApiProperties.getProperty(PortalApiConstants.ECOMP_REDIRECT_URL)
+ + "?noUserError=Yes";
+ logger.debug(EELFLoggerDelegate.debugLogger, "singleSignOnLogin: user is null, redirect URL is {}",
+ redirectUrl);
+ return new ModelAndView("redirect:" + redirectUrl);
+ } else {
+ // store the user's information in the session
+ String loginMethod;
+ if (null == authMech || "".equals(authMech) || "BOTH".equals(authMech)) {
+ loginMethod = SystemProperties.getProperty(SystemProperties.LOGIN_METHOD_CSP);
+ } else if ("CSP".equals(authMech)) {
+ loginMethod = SystemProperties.getProperty(SystemProperties.LOGIN_METHOD_CSP);
+ } else {
+ loginMethod = SystemProperties.getProperty(SystemProperties.LOGIN_METHOD_WEB_JUNCTION);
+ }
+ UserUtils.setUserSession(request, commandBean.getUser(), commandBean.getMenu(),
+ commandBean.getBusinessDirectMenu(), loginMethod);
+ initateSessionMgtHandler(request);
+ logger.debug(EELFLoggerDelegate.debugLogger,
+ "singleSignOnLogin: create new user session for expired user {}; user {} exists in the system",
+ userId, commandBean.getUser().getOrgUserId());
+ return new ModelAndView("redirect:" + forwardURL);
+ }
+ } // user is null or session is null
+ else {
+ // both user and session are non-null.
+ logger.info(EELFLoggerDelegate.debugLogger, "singleSignOnLogin: redirecting to the forwardURL {}",
+ forwardURL);
+ return new ModelAndView("redirect:" + forwardURL);
+ }
+
+ } else {
+ /*
+ * Login cookie not found, or redirect-to-portal parameter was
+ * found.
+ *
+ * Redirect the user to the portal with a suitable return URL. The
+ * forwardURL parameter that arrives as a parameter is a partial
+ * (not absolute) request path for a page in the application. The
+ * challenge here is to compute the correct absolute path for the
+ * original request so the portal can redirect the user back to the
+ * right place. If the application sits behind WebJunction, or if
+ * separate FE-BE hosts are used, then the URL yielded by the
+ * request has a host name that is not reachable by the user.
+ */
+ String returnToAppUrl = null;
+ if (SystemProperties.containsProperty(SystemProperties.APP_BASE_URL)) {
+ // New feature as of 1610, release 3.3.3:
+ // application can publish a base URL in system.properties
+ String appUrl = SystemProperties.getProperty(SystemProperties.APP_BASE_URL);
+ returnToAppUrl = appUrl + (appUrl.endsWith("/") ? "" : "/") + forwardURL;
+ logger.debug(EELFLoggerDelegate.debugLogger,
+ "singleSignOnLogin: using app base URL {} and redirectURL {}", appUrl, returnToAppUrl);
+ } else {
+ // Be backward compatible with applications that don't need this
+ // feature.
+ // This is the controller for the single_signon.htm page, so the
+ // replace
+ // should always find the specified token.
+ returnToAppUrl = ((HttpServletRequest) request).getRequestURL().toString().replace("single_signon.htm",
+ forwardURL);
+ logger.debug(EELFLoggerDelegate.debugLogger, "singleSignOnLogin: computed redirectURL {}",
+ returnToAppUrl);
+ }
+ final String encodedReturnToAppUrl = URLEncoder.encode(returnToAppUrl, "UTF-8");
+ // Also send the application's UEB key so Portal can block URL
+ // reflection attacks.
+ final String uebAppKey = PortalApiProperties.getProperty(PortalApiConstants.UEB_APP_KEY);
+ final String url = PortalApiProperties.getProperty(PortalApiConstants.ECOMP_REDIRECT_URL);
+ final String portalUrl = url.substring(0, url.lastIndexOf('/')) + "/process_csp";
+ final String redirectUrl = portalUrl + "?uebAppKey=" + uebAppKey + "&redirectUrl=" + encodedReturnToAppUrl;
+ logger.debug(EELFLoggerDelegate.debugLogger, "singleSignOnLogin: portal-bound redirect URL is {}",
+ redirectUrl);
+ return new ModelAndView("redirect:" + redirectUrl);
+ }
+ }
+
+ protected void initateSessionMgtHandler(HttpServletRequest request) {
+ String portalJSessionId = getPortalJSessionId(request);
+ String jSessionId = getJessionId(request);
+ PortalTimeoutHandler.sessionCreated(portalJSessionId, jSessionId, AppUtils.getSession(request));
+ }
+
+ public boolean isLoginCookieExist(HttpServletRequest request) {
+ Cookie ep = WebUtils.getCookie(request, LoginStrategy.EP_SERVICE);
+ return (ep != null);
+ }
+
+ public String getPortalJSessionId(HttpServletRequest request) {
+ Cookie ep = WebUtils.getCookie(request, LoginStrategy.EP_SERVICE);
+ return ep.getValue();
+ }
+
+ public String getJessionId(HttpServletRequest request) {
+ return request.getSession().getId();
+ }
+
+ public String getViewName() {
+ return viewName;
+ }
+
+ public void setViewName(String viewName) {
+ this.viewName = viewName;
+ }
+
+ public LoginService getLoginService() {
+ return loginService;
+ }
+
+ public void setLoginService(LoginService loginService) {
+ this.loginService = loginService;
+ }
+
+}
diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/UsageListController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/UsageListController.java
new file mode 100644
index 0000000..d7dfbaa
--- /dev/null
+++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/UsageListController.java
@@ -0,0 +1,165 @@
+/*-
+ * ================================================================================
+ * ECOMP Portal SDK
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.controller.core;
+
+import java.io.PrintWriter;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+
+import org.json.JSONArray;
+import org.json.JSONObject;
+import org.openecomp.portalsdk.core.command.UserRowBean;
+import org.openecomp.portalsdk.core.controller.RestrictedBaseController;
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.portalsdk.core.util.UsageUtils;
+import org.openecomp.portalsdk.core.web.support.JsonMessage;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.servlet.ModelAndView;
+
+@Controller
+@RequestMapping("/")
+public class UsageListController extends RestrictedBaseController {
+
+ private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(UsageListController.class);
+
+ @SuppressWarnings({ "unchecked", "rawtypes" })
+ @RequestMapping(value = { "/usage_list" }, method = RequestMethod.GET)
+ public ModelAndView usageList(HttpServletRequest request) {
+ Map<String, Object> model = new HashMap<String, Object>();
+
+ HttpSession httpSession = request.getSession();
+ HashMap activeUsers = (HashMap) httpSession.getServletContext().getAttribute("activeUsers");
+ if (activeUsers.size() == 0) {
+ activeUsers.put(httpSession.getId(), httpSession);
+ httpSession.getServletContext().setAttribute("activeUsers", activeUsers);
+ }
+ ArrayList<UserRowBean> rows = UsageUtils.getActiveUsers(activeUsers);
+ JSONArray ja = new JSONArray();
+ try {
+ for (UserRowBean userRowBean : rows) {
+ JSONObject jo = new JSONObject();
+ jo.put("id", userRowBean.getId());
+ jo.put("lastName", userRowBean.getLastName());
+ jo.put("email", userRowBean.getEmail());
+ jo.put("lastAccess", userRowBean.getLastAccess());
+ jo.put("remaining", userRowBean.getRemaining());
+ jo.put("sessionId", userRowBean.getSessionId());
+ if (!(httpSession.getId().equals(userRowBean.getSessionId()))) {
+ jo.put("delete", "yes");
+ } else {
+ jo.put("delete", "no");
+ }
+ ja.put(jo);
+ }
+ } catch (Exception e) {
+ logger.error(EELFLoggerDelegate.errorLogger, "usageList failed", e);
+ }
+
+ model.put("model", ja);
+
+ return new ModelAndView(getViewName(), model);
+ }
+
+ @SuppressWarnings({ "unchecked", "rawtypes" })
+ @RequestMapping(value = { "/get_usage_list" }, method = RequestMethod.GET)
+ public void getUsageList(HttpServletRequest request, HttpServletResponse response) {
+
+ HttpSession httpSession = request.getSession();
+ HashMap activeUsers = (HashMap) httpSession.getServletContext().getAttribute("activeUsers");
+ if (activeUsers.size() == 0) {
+ activeUsers.put(httpSession.getId(), httpSession);
+ httpSession.getServletContext().setAttribute("activeUsers", activeUsers);
+ }
+ ArrayList<UserRowBean> rows = UsageUtils.getActiveUsers(activeUsers);
+ JSONArray ja = new JSONArray();
+ try {
+ for (UserRowBean userRowBean : rows) {
+ JSONObject jo = new JSONObject();
+ jo.put("id", userRowBean.getId());
+ jo.put("lastName", userRowBean.getLastName());
+ jo.put("email", userRowBean.getEmail());
+ jo.put("lastAccess", userRowBean.getLastAccess());
+ jo.put("remaining", userRowBean.getRemaining());
+ jo.put("sessionId", userRowBean.getSessionId());
+ if (!(httpSession.getId().equals(userRowBean.getSessionId()))) {
+ jo.put("delete", "yes");
+ } else {
+ jo.put("delete", "no");
+ }
+ ja.put(jo);
+ }
+ } catch (Exception e) {
+ logger.error(EELFLoggerDelegate.errorLogger, "getUsageList failed", e);
+ }
+ JsonMessage msg;
+ try {
+ msg = new JsonMessage(ja.toString());
+ JSONObject j = new JSONObject(msg);
+ response.getWriter().write(j.toString());
+ } catch (Exception e) {
+ logger.error(EELFLoggerDelegate.errorLogger, "getUsageList failed to serialize", e);
+ }
+
+ }
+
+ @SuppressWarnings("rawtypes")
+ @RequestMapping(value = { "/usage_list/removeSession" }, method = RequestMethod.GET)
+ public void removeSession(HttpServletRequest request, HttpServletResponse response) throws Exception {
+ HashMap activeUsers = (HashMap) request.getSession().getServletContext().getAttribute("activeUsers");
+ UserRowBean data = new UserRowBean();
+ data.setSessionId(request.getParameter("deleteSessionId"));
+ UsageUtils.getActiveUsersAfterDelete(activeUsers, data);
+
+ HttpSession httpSession = request.getSession();
+ ArrayList<UserRowBean> rows = UsageUtils.getActiveUsers(activeUsers);
+ JSONArray ja = new JSONArray();
+ try {
+ for (UserRowBean userRowBean : rows) {
+ JSONObject jo = new JSONObject();
+ jo.put("id", userRowBean.getId());
+ jo.put("lastName", userRowBean.getLastName());
+ jo.put("email", userRowBean.getEmail());
+ jo.put("lastAccess", userRowBean.getLastAccess());
+ jo.put("remaining", userRowBean.getRemaining());
+ jo.put("sessionId", userRowBean.getSessionId());
+ if (!(httpSession.getId().equals(userRowBean.getSessionId()))) {
+ jo.put("delete", "yes");
+ } else {
+ jo.put("delete", "no");
+ }
+ ja.put(jo);
+ }
+ } catch (Exception e) {
+ logger.error(EELFLoggerDelegate.errorLogger, "removeSession failed", e);
+ }
+
+ response.setContentType("application/json");
+ PrintWriter out = response.getWriter();
+ out.write(ja.toString());
+ }
+
+}
diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/UserProfileController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/UserProfileController.java
new file mode 100644
index 0000000..cee60e4
--- /dev/null
+++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/UserProfileController.java
@@ -0,0 +1,68 @@
+/*-
+ * ================================================================================
+ * ECOMP Portal SDK
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.controller.core;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.openecomp.portalsdk.core.controller.RestrictedBaseController;
+import org.openecomp.portalsdk.core.domain.Profile;
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.portalsdk.core.service.ProfileService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.servlet.ModelAndView;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+/**
+ * Controller for user profile view. The view is restricted to authenticated
+ * users. The view name resolves to page user_profile.jsp which uses Angular.
+ */
+
+@Controller
+@RequestMapping("/")
+public class UserProfileController extends RestrictedBaseController {
+
+ private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(UserProfileController.class);
+
+ @Autowired
+ ProfileService service;
+
+ @RequestMapping(value = { "/user_profile" }, method = RequestMethod.GET)
+ public ModelAndView userProfile(HttpServletRequest request) {
+ Map<String, Object> model = new HashMap<String, Object>();
+ ObjectMapper mapper = new ObjectMapper();
+ List<Profile> profileList = service.findAll();
+ try {
+ model.put("customerInfo", mapper.writeValueAsString(profileList));
+ } catch (Exception e) {
+ logger.error(EELFLoggerDelegate.errorLogger, "userProfile failed", e);
+ }
+
+ return new ModelAndView("user_profile", "model", model);
+ }
+
+} \ No newline at end of file
diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/WelcomeController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/WelcomeController.java
new file mode 100644
index 0000000..5ebe907
--- /dev/null
+++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/WelcomeController.java
@@ -0,0 +1,43 @@
+/*-
+ * ================================================================================
+ * ECOMP Portal SDK
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.controller.core;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.openecomp.portalsdk.core.controller.RestrictedBaseController;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.servlet.ModelAndView;
+
+/**
+ * Controller for welcome view. The view is restricted to authenticated users.
+ * The view name defaults to the request name with no suffix, "welcome", which
+ * resolves to page welcome.jsp.
+ */
+@Controller
+@RequestMapping("/")
+public class WelcomeController extends RestrictedBaseController {
+ @RequestMapping(value = { "/welcome" }, method = RequestMethod.GET)
+ public ModelAndView welcome(HttpServletRequest request) {
+ final String defaultViewName = null;
+ return new ModelAndView(defaultViewName);
+ }
+}
diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/package-info.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/package-info.java
new file mode 100644
index 0000000..0930ab3
--- /dev/null
+++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/core/package-info.java
@@ -0,0 +1,6 @@
+package org.openecomp.portalapp.controller.core;
+
+/**
+ * Provides controllers for EPSDK application core functionality such as logging
+ * in, managing roles, editing menus, etc.
+ */
diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/AngularSinglePageController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/AngularSinglePageController.java
new file mode 100644
index 0000000..efcd429
--- /dev/null
+++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/AngularSinglePageController.java
@@ -0,0 +1,49 @@
+/*-
+ * ================================================================================
+ * ECOMP Portal SDK
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.controller.sample;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.servlet.ModelAndView;
+
+import org.openecomp.portalsdk.core.controller.RestrictedBaseController;
+
+/**
+ * Controller for a single-page application sample. The view is restricted to
+ * authenticated users. The named view resolves to page singlePageSample.html,
+ * which uses Angular.
+ */
+@Controller
+@RequestMapping("/")
+public class AngularSinglePageController extends RestrictedBaseController {
+
+ @RequestMapping(value = { "/singlePageSample" }, method = RequestMethod.GET)
+ public ModelAndView view(HttpServletRequest request) {
+ Map<String, Object> model = new HashMap<String, Object>();
+ return new ModelAndView("single_page_sample", "model", model);
+ }
+
+}
diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/BroadcastController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/BroadcastController.java
new file mode 100644
index 0000000..9c04ce8
--- /dev/null
+++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/BroadcastController.java
@@ -0,0 +1,131 @@
+/*-
+ * ================================================================================
+ * ECOMP Portal SDK
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.controller.sample;
+
+import java.io.PrintWriter;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.json.JSONObject;
+import org.openecomp.portalsdk.core.controller.RestrictedBaseController;
+import org.openecomp.portalsdk.core.domain.BroadcastMessage;
+import org.openecomp.portalsdk.core.service.BroadcastService;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.openecomp.portalsdk.core.web.support.AppUtils;
+import org.openecomp.portalsdk.core.web.support.JsonMessage;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.servlet.ModelAndView;
+
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+@Controller
+@RequestMapping("/")
+public class BroadcastController extends RestrictedBaseController {
+
+ @Autowired
+ private BroadcastService broadcastService;
+
+ @RequestMapping(value = { "/broadcast" }, method = RequestMethod.GET)
+ public ModelAndView broadcast(HttpServletRequest request) {
+ Map<String, Object> model = new HashMap<String, Object>();
+ ObjectMapper mapper = new ObjectMapper();
+
+ try {
+ model.put("broadcastMessage", mapper.writeValueAsString(broadcastService.getBroadcastMessage(request)));
+ model.put("broadcastSites", mapper.writeValueAsString(referenceData(request).get("broadcastSites")));
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ return new ModelAndView(getViewName(), model);
+ }
+
+ @RequestMapping(value = { "/get_broadcast" }, method = RequestMethod.GET)
+ public void getBroadcast(HttpServletRequest request, HttpServletResponse response) {
+ Map<String, Object> model = new HashMap<String, Object>();
+ ObjectMapper mapper = new ObjectMapper();
+
+ try {
+
+ model.put("broadcastMessage", mapper.writeValueAsString(broadcastService.getBroadcastMessage(request)));
+ model.put("broadcastSites", mapper.writeValueAsString(referenceData(request).get("broadcastSites")));
+ JsonMessage msg = new JsonMessage(mapper.writeValueAsString(model));
+ JSONObject j = new JSONObject(msg);
+ response.getWriter().write(j.toString());
+
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+ }
+
+ @SuppressWarnings({ "unchecked", "rawtypes" })
+ protected Map referenceData(HttpServletRequest request) {
+ Map lookupData = new HashMap();
+
+ if ("true".equals(SystemProperties.getProperty(SystemProperties.CLUSTERED))) {
+ lookupData.put("broadcastSites", AppUtils.getLookupList("fn_lu_broadcast_site", "broadcast_site_cd",
+ "broadcast_site_descr", "", "broadcast_site_descr"));
+ }
+
+ return lookupData;
+ }
+
+ @RequestMapping(value = { "/broadcast/save" }, method = RequestMethod.POST)
+ public ModelAndView save(HttpServletRequest request, HttpServletResponse response) throws Exception {
+
+ try {
+
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+ JsonNode root = mapper.readTree(request.getReader());
+ BroadcastMessage broadcastMessage = mapper.readValue(root.get("broadcastMessage").toString(),
+ BroadcastMessage.class);
+
+ broadcastService.saveBroadcastMessage(broadcastMessage);
+
+ response.setCharacterEncoding("UTF-8");
+ response.setContentType("application / json");
+ request.setCharacterEncoding("UTF-8");
+
+ PrintWriter out = response.getWriter();
+ String responseString = mapper.writeValueAsString(broadcastMessage);
+ JSONObject j = new JSONObject("{broadcastMessage: " + responseString + "}");
+
+ out.write(j.toString());
+
+ return null;
+ } catch (Exception e) {
+ response.setCharacterEncoding("UTF-8");
+ request.setCharacterEncoding("UTF-8");
+ PrintWriter out = response.getWriter();
+ out.write(e.getMessage());
+ return null;
+ }
+
+ }
+}
diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/BroadcastListController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/BroadcastListController.java
new file mode 100644
index 0000000..4160346
--- /dev/null
+++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/BroadcastListController.java
@@ -0,0 +1,143 @@
+/*-
+ * ================================================================================
+ * ECOMP Portal SDK
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.controller.sample;
+
+import java.io.PrintWriter;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.json.JSONObject;
+import org.openecomp.portalsdk.core.controller.RestrictedBaseController;
+import org.openecomp.portalsdk.core.domain.BroadcastMessage;
+import org.openecomp.portalsdk.core.service.BroadcastService;
+import org.openecomp.portalsdk.core.web.support.JsonMessage;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.servlet.ModelAndView;
+
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+@Controller
+@RequestMapping("/")
+public class BroadcastListController extends RestrictedBaseController {
+
+ @Autowired
+ private BroadcastService broadcastService;
+
+ @RequestMapping(value = { "/broadcast_list" }, method = RequestMethod.GET)
+ public ModelAndView broadcastList(HttpServletRequest request) {
+ Map<String, Object> model = new HashMap<String, Object>();
+
+ model.put("model", broadcastService.getBcModel(request));
+ return new ModelAndView(getViewName(), model);
+ }
+
+ @RequestMapping(value = { "/get_broadcast_list" }, method = RequestMethod.GET)
+ public void getBroadcast(HttpServletRequest request, HttpServletResponse response) {
+ Map<String, Object> model = new HashMap<String, Object>();
+ ObjectMapper mapper = new ObjectMapper();
+ try {
+ model.put("model", broadcastService.getBcModel(request));
+ model.put("messagesList", broadcastService.getBcModel(request).get("messagesList"));
+ model.put("messageLocations", broadcastService.getBcModel(request).get("messageLocations"));
+ JsonMessage msg = new JsonMessage(mapper.writeValueAsString(model));
+ JSONObject j = new JSONObject(msg);
+ response.getWriter().write(j.toString());
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+ }
+
+ @RequestMapping(value = { "/broadcast_list/remove" }, method = RequestMethod.POST)
+ public ModelAndView remove(HttpServletRequest request, HttpServletResponse response) throws Exception {
+
+ try {
+
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+ JsonNode root = mapper.readTree(request.getReader());
+ BroadcastMessage broadcastMessage = mapper.readValue(root.get("broadcastMessage").toString(),
+ BroadcastMessage.class);
+
+ broadcastService.removeBroadcastMessage(broadcastMessage);
+
+ response.setCharacterEncoding("UTF-8");
+ response.setContentType("application / json");
+ request.setCharacterEncoding("UTF-8");
+
+ PrintWriter out = response.getWriter();
+ String responseString = mapper.writeValueAsString(broadcastMessage);
+ JSONObject j = new JSONObject("{broadcastMessage: " + responseString + "}");
+
+ out.write(j.toString());
+
+ return null;
+ } catch (Exception e) {
+ response.setCharacterEncoding("UTF-8");
+ request.setCharacterEncoding("UTF-8");
+ PrintWriter out = response.getWriter();
+ out.write(e.getMessage());
+ return null;
+ }
+
+ }
+
+ @RequestMapping(value = { "/broadcast_list/toggleActive" }, method = RequestMethod.POST)
+ public ModelAndView toggleActive(HttpServletRequest request, HttpServletResponse response) throws Exception {
+
+ try {
+
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+ JsonNode root = mapper.readTree(request.getReader());
+ BroadcastMessage broadcastMessage = mapper.readValue(root.get("broadcastMessage").toString(),
+ BroadcastMessage.class);
+
+ broadcastService.saveBroadcastMessage(broadcastMessage);
+
+ response.setCharacterEncoding("UTF-8");
+ response.setContentType("application / json");
+ request.setCharacterEncoding("UTF-8");
+
+ PrintWriter out = response.getWriter();
+ String responseString = mapper.writeValueAsString(broadcastMessage);
+ JSONObject j = new JSONObject("{broadcastMessage: " + responseString + "}");
+
+ out.write(j.toString());
+
+ return null;
+ } catch (Exception e) {
+ response.setCharacterEncoding("UTF-8");
+ request.setCharacterEncoding("UTF-8");
+ PrintWriter out = response.getWriter();
+ out.write(e.getMessage());
+ return null;
+ }
+
+ }
+}
diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/CallflowController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/CallflowController.java
new file mode 100644
index 0000000..b25cbef
--- /dev/null
+++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/CallflowController.java
@@ -0,0 +1,45 @@
+/*-
+ * ================================================================================
+ * ECOMP Portal SDK
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.controller.sample;
+
+import org.openecomp.portalsdk.core.controller.RestrictedBaseController;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.servlet.ModelAndView;
+
+
+/**
+ * Controller for a message sequence chart view. The view is restricted to
+ * authenticated users. The view name defaults to the request name with no
+ * suffix, "callflow", which resolves to page details.jsp. That page is an
+ * iframe around page details.html.
+ */
+@Controller
+@RequestMapping("/")
+public class CallflowController extends RestrictedBaseController {
+
+ @RequestMapping(value = { "/callflow" }, method = RequestMethod.GET)
+ public ModelAndView plot() {
+ final String defaultViewName = null;
+ return new ModelAndView(defaultViewName);
+ }
+
+}
diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/CamundaCockpitController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/CamundaCockpitController.java
new file mode 100644
index 0000000..e5cfb3f
--- /dev/null
+++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/CamundaCockpitController.java
@@ -0,0 +1,60 @@
+/*-
+ * ================================================================================
+ * ECOMP Portal SDK
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.controller.sample;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.openecomp.portalsdk.core.controller.RestrictedBaseController;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+
+
+/**
+ * @author chris zeng
+ *
+ */
+
+@Controller
+@RequestMapping("/")
+public class CamundaCockpitController extends RestrictedBaseController {
+ @SuppressWarnings("rawtypes")
+ @RequestMapping(value = {"/get_camunda_cockpit_link" }, method = RequestMethod.GET, produces = "application/json")
+ @ResponseBody
+ public Map getCamundaCockpitLink(HttpServletRequest request,HttpServletResponse response) {
+ Map<String,String> map = new HashMap<String,String>();
+ String camundaCockpitUrl = "";
+ String camundaCockpitlinkDefined = "false";
+ if (SystemProperties.containsProperty("camunda_cockpit_link")){
+ camundaCockpitUrl = SystemProperties.getProperty("camunda_cockpit_link");
+ camundaCockpitlinkDefined = "true";
+ };
+ map.put("link_defined", camundaCockpitlinkDefined);
+ map.put("camunda_cockpit_link", camundaCockpitUrl);
+ return map;
+ };
+}
diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/CollaborateListController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/CollaborateListController.java
new file mode 100644
index 0000000..03aaab5
--- /dev/null
+++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/CollaborateListController.java
@@ -0,0 +1,85 @@
+/*-
+ * ================================================================================
+ * ECOMP Portal SDK
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.controller.sample;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.json.JSONObject;
+import org.openecomp.portalsdk.core.controller.RestrictedBaseController;
+import org.openecomp.portalsdk.core.domain.User;
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.portalsdk.core.service.UserProfileService;
+import org.openecomp.portalsdk.core.web.support.JsonMessage;
+import org.openecomp.portalsdk.core.web.support.UserUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.servlet.ModelAndView;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+@Controller
+@RequestMapping("/")
+public class CollaborateListController extends RestrictedBaseController{
+ @Autowired
+ UserProfileService service;
+ EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(CollaborateListController.class);
+
+ @RequestMapping(value = {"/collaborate_list" }, method = RequestMethod.GET)
+ public ModelAndView ProfileSearch(HttpServletRequest request) {
+ Map<String, Object> model = new HashMap<String, Object>();
+ ObjectMapper mapper = new ObjectMapper();
+ User user = UserUtils.getUserSession(request);
+
+ List<User> profileList =null;
+ try {
+ profileList = service.findAllUserWithOnOffline(user.getOrgUserId());
+ model.put("profileList", mapper.writeValueAsString(profileList));
+ } catch (Exception e) {
+ logger.error(EELFLoggerDelegate.errorLogger, "Error happened during collaborate list search" + e.getMessage());
+
+ }
+ return new ModelAndView(getViewName(),"model", model);
+ }
+
+ @RequestMapping(value = {"/get_collaborate_list" }, method = RequestMethod.GET)
+ public void getCollaborateList(HttpServletRequest request,HttpServletResponse response) {
+
+ ObjectMapper mapper = new ObjectMapper();
+ User user = UserUtils.getUserSession(request);
+
+ List<User> profileList =null;
+ try {
+ profileList = service.findAllUserWithOnOffline(user.getOrgUserId());
+ JsonMessage msg = new JsonMessage(mapper.writeValueAsString(profileList));
+ JSONObject j = new JSONObject(msg);
+ response.getWriter().write(j.toString());
+ } catch (Exception e) {
+ logger.error(EELFLoggerDelegate.errorLogger, "Error happened during get collaborate list" + e.getMessage());
+
+ }
+ }
+}
diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/CollaborationController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/CollaborationController.java
new file mode 100644
index 0000000..55920bb
--- /dev/null
+++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/CollaborationController.java
@@ -0,0 +1,55 @@
+/*-
+ * ================================================================================
+ * ECOMP Portal SDK
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.controller.sample;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.openecomp.portalsdk.core.controller.RestrictedBaseController;
+import org.openecomp.portalsdk.core.domain.User;
+import org.openecomp.portalsdk.core.web.support.UserUtils;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.servlet.ModelAndView;
+
+@Controller
+@RequestMapping("/")
+public class CollaborationController extends RestrictedBaseController{
+
+ @RequestMapping(value = {"/collaboration" }, method = RequestMethod.GET)
+ public ModelAndView view(HttpServletRequest request) {
+ Map<String, Object> model = new HashMap<String, Object>();
+ User user = UserUtils.getUserSession(request);
+
+ model.put("name",(user.getFirstName() + " " + (user.getLastName() != null? user.getLastName().substring(0,1): "" )));
+ return new ModelAndView(getViewName(),"model", model);
+ }
+ @RequestMapping(value = {"/openCollaboration" }, method = RequestMethod.GET)
+ public ModelAndView openCollaboration(HttpServletRequest request) {
+ Map<String, Object> model = new HashMap<String, Object>();
+ User user = UserUtils.getUserSession(request);
+
+ model.put("name",(user.getFirstName() + " " + (user.getLastName() != null? user.getLastName().substring(0,1): "" )));
+ return new ModelAndView("openCollaboration","model", model);
+ }
+} \ No newline at end of file
diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/DS2SampleController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/DS2SampleController.java
new file mode 100644
index 0000000..17f33c7
--- /dev/null
+++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/DS2SampleController.java
@@ -0,0 +1,54 @@
+/*-
+ * ================================================================================
+ * ECOMP Portal SDK
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.controller.sample;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.openecomp.portalsdk.core.controller.UnRestrictedBaseController;
+import org.openecomp.portalsdk.core.service.ProfileService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.servlet.ModelAndView;
+
+
+/**
+ * Controller for user profile view. The view is restricted to authenticated
+ * users. The view name resolves to page user_profile.jsp which uses Angular.
+ */
+
+@Controller
+@RequestMapping("/")
+public class DS2SampleController extends UnRestrictedBaseController {
+
+ @Autowired
+ ProfileService service;
+
+ @RequestMapping(value = { "/ds2_sample" }, method = RequestMethod.GET)
+ public ModelAndView ProfileSearch(HttpServletRequest request) {
+ Map<String, Object> model = new HashMap<String, Object>();
+ return new ModelAndView("ds2_sample", "model", model);
+ }
+
+} \ No newline at end of file
diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/ElasticSearchController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/ElasticSearchController.java
new file mode 100644
index 0000000..69e5051
--- /dev/null
+++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/ElasticSearchController.java
@@ -0,0 +1,128 @@
+/*-
+ * ================================================================================
+ * ECOMP Portal SDK
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.controller.sample;
+
+import java.io.IOException;
+
+import org.json.JSONObject;
+import org.openecomp.portalapp.model.Result;
+import org.openecomp.portalsdk.core.controller.RestrictedBaseController;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.servlet.ModelAndView;
+
+import io.searchbox.client.JestClient;
+import io.searchbox.client.JestClientFactory;
+import io.searchbox.client.config.HttpClientConfig;
+import io.searchbox.core.Search;
+import io.searchbox.core.SearchResult;
+import io.searchbox.core.Suggest;
+import io.searchbox.core.SuggestResult;
+import io.searchbox.params.Parameters;
+
+/**
+ * Controller for views that demonstrate Elastic Search features.
+ */
+@RestController
+public class ElasticSearchController extends RestrictedBaseController{
+
+ @RequestMapping(value = {"/es_search_demo" }, method = RequestMethod.GET)
+ public ModelAndView search() {
+ return new ModelAndView("es_search_demo");
+ }
+
+ @RequestMapping(value = {"/es_suggest_demo" }, method = RequestMethod.GET)
+ public ModelAndView suggest() {
+ return new ModelAndView("es_suggest_demo");
+ }
+
+ @RequestMapping(value="/es_suggest/{task}",method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
+ public ResponseEntity<Result> doSuggest(@PathVariable("task") String task) throws IOException {
+ JSONObject obj = new JSONObject(task);
+ String searchTerm = obj.getString("data");
+ String searchSize = obj.getString("size");
+ String searchFuzzy = obj.getString("fuzzy");
+ String resultName = obj.getString("resultname");
+
+ JestClientFactory factory = new JestClientFactory();
+ factory.setHttpClientConfig(new HttpClientConfig
+ .Builder("http://todo_elastic_search_server")
+ .multiThreaded(true)
+ .build());
+ JestClient client = factory.getObject();
+
+
+ Suggest suggest = new Suggest.Builder("{\n"
+ +"\"" + resultName +"\" : {\n"
+ +"\"text\" : \""+ searchTerm +"\",\n"
+ +"\"completion\" : {\n"
+ +"\"field\" : \"suggest\",\n"
+ +"\"size\" : " + searchSize + ",\n"
+ +"\"fuzzy\" : \"" + searchFuzzy + "\"\n"
+ +"}\n"
+ +"}\n"
+ +"}").addIndex("customer").build();
+
+ SuggestResult result = client.execute(suggest);
+ System.err.println(result.getJsonObject().toString());
+ return new ResponseEntity<Result>(new Result(result.getJsonObject().toString()),HttpStatus.OK);
+ }
+
+ @RequestMapping(value="/es_search/{task}",method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
+ public ResponseEntity<Result> doSearch(@PathVariable("task") String task) throws IOException {
+ JSONObject obj = new JSONObject(task);
+ String searchTerm = obj.getString("data");
+ String searchSize = obj.getString("size");
+ // String searchFuzzy = obj.getString("fuzzy");
+
+ JestClientFactory factory = new JestClientFactory();
+ factory.setHttpClientConfig(new HttpClientConfig
+ .Builder("http://todo_elastic_search_server")
+ .multiThreaded(true)
+ .build());
+ JestClient client = factory.getObject();
+
+ Search search = new Search.Builder("{\n"
+ +"\"query\" : {\n"
+ +"\"query_string\" : {\n"
+ +"\"query\" : \"name:"+ searchTerm +"\"\n"
+ +"}\n"
+ +"}\n"
+ +"}").addIndex("customer").setParameter(Parameters.SIZE,Integer.valueOf(searchSize)).build();
+
+ SearchResult result = client.execute(search);
+ System.err.println(result.getJsonObject().toString());
+ return new ResponseEntity<Result>(new Result(result.getJsonObject().toString()),HttpStatus.OK);
+ }
+
+ public ResponseEntity<Result> sendResult(Result result) {
+ return new ResponseEntity<Result>(result, HttpStatus.OK);
+ }
+
+ @Override
+ public boolean isRESTfulCall() {
+ return true;
+ }
+} \ No newline at end of file
diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/ElementModelController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/ElementModelController.java
new file mode 100644
index 0000000..e36458f
--- /dev/null
+++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/ElementModelController.java
@@ -0,0 +1,87 @@
+/*-
+ * ================================================================================
+ * ECOMP Portal SDK
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.controller.sample;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.openecomp.portalsdk.core.controller.RestrictedBaseController;
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.portalsdk.core.service.ElementLinkService;
+import org.openecomp.portalsdk.core.service.ElementMapService;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+@RequestMapping("/")
+public class ElementModelController extends RestrictedBaseController {
+
+ private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(ElementModelController.class);
+
+ @RequestMapping(value = { "/elementMapLayout" }, method = RequestMethod.GET, produces = "text/plain")
+ public String layout(HttpServletRequest request, HttpServletResponse response) throws Exception {
+
+ String collapseDomains = request.getParameter("collapsedDomains");
+ String expandDomains = request.getParameter("expandedDomains");
+
+ String contentFileName = request.getParameter("contentFileName");
+ String layoutFileName = request.getParameter("layoutFileName");
+
+ final String realPath = request.getServletContext().getRealPath("/");
+ logger.debug(EELFLoggerDelegate.debugLogger, "layout: servlet context real path: {}", realPath);
+
+ ElementMapService eltMapSvc = new ElementMapService();
+ String yamlString = eltMapSvc.buildElementMapYaml(
+ new String[] { collapseDomains, expandDomains, realPath, contentFileName, layoutFileName });
+
+ return yamlString;
+ }
+
+ @RequestMapping(value = { "/elementMapLink" }, method = RequestMethod.GET, produces = "text/plain")
+ public String callflow(HttpServletRequest request, HttpServletResponse response) throws Exception {
+
+ String callFlowName = request.getParameter("callFlowName");
+ String callFlowStep = request.getParameter("callFlowStep");
+
+ final String realPath = request.getServletContext().getRealPath("/");
+ logger.debug(EELFLoggerDelegate.debugLogger, "callflow: servlet context real path: {}", realPath);
+
+ ElementLinkService eltLinkSvc = new ElementLinkService();
+ String yamlString = eltLinkSvc.buildElementLinkYaml(new String[] { realPath, callFlowName, callFlowStep });
+
+ return yamlString;
+ }
+
+ /*
+ public ModelAndView callflowAdditional(HttpServletRequest request, HttpServletResponse response) throws Exception {
+
+ Map<String, Object> model = new HashMap<String, Object>();
+ String callFlowName = request.getParameter("callFlowName");
+ String callFlowStep = request.getParameter("callFlowStep");
+
+ ElementLinkService main = new ElementLinkService();
+ String yamlString = main.main2(new String[] { callFlowName, callFlowStep });
+ model.put("output_string", yamlString);
+ return new ModelAndView("data_out", "model", model);
+ }
+ */
+
+}
diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/LeafletMapContoller.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/LeafletMapContoller.java
new file mode 100644
index 0000000..bda3c0a
--- /dev/null
+++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/LeafletMapContoller.java
@@ -0,0 +1,43 @@
+/*-
+ * ================================================================================
+ * ECOMP Portal SDK
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.controller.sample;
+
+import org.openecomp.portalsdk.core.controller.RestrictedBaseController;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.servlet.ModelAndView;
+
+/**
+ * Controller for geographic map view. The view is restricted to authenticated
+ * users. The view name defaults to the request name with no suffix,
+ * "leafletMap", which resolves to page leafletMap.jsp.
+ */
+@Controller
+@RequestMapping("/")
+public class LeafletMapContoller extends RestrictedBaseController {
+
+ @RequestMapping(value = { "/leafletMap" }, method = RequestMethod.GET)
+ public ModelAndView plot() {
+ final String defaultViewName = null;
+ return new ModelAndView(defaultViewName);
+ }
+
+}
diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/NetMapController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/NetMapController.java
new file mode 100644
index 0000000..1961edf
--- /dev/null
+++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/NetMapController.java
@@ -0,0 +1,57 @@
+/*-
+ * ================================================================================
+ * ECOMP Portal SDK
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.controller.sample;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.openecomp.portalsdk.core.controller.RestrictedBaseController;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.servlet.ModelAndView;
+
+/**
+ * Controller for a network map view that uses iframes. The view is restricted
+ * to authenticated users.
+ */
+@Controller
+@RequestMapping("/")
+public class NetMapController extends RestrictedBaseController {
+
+ @RequestMapping(value = { "/net_map" }, method = RequestMethod.GET)
+ public ModelAndView plot(HttpServletRequest request) {
+ Map<String, Object> model = new HashMap<String, Object>();
+ model.put("frame_int", "net_map_int");
+ // This view resolves to page frame_insert.jsp
+ return new ModelAndView("frame_insert", model);
+ }
+
+ @RequestMapping(value = { "/net_map_int" }, method = RequestMethod.GET)
+ public ModelAndView plot2() {
+ // The view name defaults to the request without any suffix.
+ final String defaultViewName = null;
+ // This view resolves to page net_map.jsp
+ return new ModelAndView(defaultViewName);
+ }
+
+}
diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/PostDroolsController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/PostDroolsController.java
new file mode 100644
index 0000000..5a0719e
--- /dev/null
+++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/PostDroolsController.java
@@ -0,0 +1,122 @@
+/*-
+ * ================================================================================
+ * ECOMP Portal SDK
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.controller.sample;
+
+import java.io.PrintWriter;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.json.JSONObject;
+import org.openecomp.portalsdk.core.command.PostDroolsBean;
+import org.openecomp.portalsdk.core.controller.RestrictedBaseController;
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.portalsdk.core.service.PostDroolsService;
+import org.openecomp.portalsdk.core.web.support.JsonMessage;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.servlet.ModelAndView;
+
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+@Controller
+@RequestMapping("/")
+public class PostDroolsController extends RestrictedBaseController {
+
+ private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(PostDroolsController.class);
+
+ @Autowired
+ private PostDroolsService postDroolsService;
+
+ @RequestMapping(value = { "/drools" }, method = RequestMethod.GET)
+ public ModelAndView drools(HttpServletRequest request) {
+ return new ModelAndView(getViewName());
+ }
+
+ @RequestMapping(value = { "/getDrools" }, method = RequestMethod.GET)
+ public void getDrools(HttpServletRequest request, HttpServletResponse response) {
+ // Map<String, Object> model = new HashMap<String, Object>();
+
+ ObjectMapper mapper = new ObjectMapper();
+ try {
+ List<PostDroolsBean> beanList = postDroolsService.fetchDroolBeans();
+ JsonMessage msg = new JsonMessage(mapper.writeValueAsString(beanList));
+ JSONObject j = new JSONObject(msg);
+ response.getWriter().write(j.toString());
+ } catch (Exception e) {
+ logger.error(EELFLoggerDelegate.errorLogger, "getDrools failed", e);
+ }
+ }
+
+ @RequestMapping(value = { "/getDroolDetails" }, method = RequestMethod.GET)
+ public void getDroolDetails(HttpServletRequest request, HttpServletResponse response) {
+
+ ObjectMapper mapper = new ObjectMapper();
+ try {
+
+ PostDroolsBean postDroolsBean = new PostDroolsBean();
+ String selectedFile = request.getParameter("selectedFile");
+ postDroolsBean.setDroolsFile(selectedFile);// sample populated
+ // postDroolsBean.setSelectedRules("[\"NJ\",\"NY\",\"KY\"]");
+ postDroolsBean.setClassName(postDroolsService.retrieveClass(selectedFile));
+
+ JsonMessage msg = new JsonMessage(mapper.writeValueAsString(postDroolsBean));
+ JSONObject j = new JSONObject(msg);
+ response.getWriter().write(j.toString());
+
+ } catch (Exception e) {
+ logger.error(EELFLoggerDelegate.errorLogger, "getDroolDetails failed", e);
+ }
+ }
+
+ @RequestMapping(value = { "/post_drools/execute" }, method = RequestMethod.POST)
+ public ModelAndView search(HttpServletRequest request, HttpServletResponse response) throws Exception {
+ try {
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
+ JsonNode root = mapper.readTree(request.getReader());
+ PostDroolsBean postDroolsBean = mapper.readValue(root.get("postDroolsBean").toString(),
+ PostDroolsBean.class);
+
+ String resultsString = postDroolsService.execute(postDroolsBean.getDroolsFile(),
+ postDroolsBean.getClassName(), postDroolsBean.getSelectedRules());
+
+ response.setCharacterEncoding("UTF-8");
+ response.setContentType("application / json");
+ request.setCharacterEncoding("UTF-8");
+
+ PrintWriter out = response.getWriter();
+ // String responseString = mapper.writeValueAsString(resultsString);
+ JSONObject j = new JSONObject("{resultsString: " + resultsString + "}");
+
+ out.write(j.toString());
+ } catch (Exception e) {
+ logger.error(EELFLoggerDelegate.errorLogger, "search failed", e);
+ }
+
+ return null;
+ }
+
+}
diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/ReportDashboardController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/ReportDashboardController.java
new file mode 100644
index 0000000..9cc44c8
--- /dev/null
+++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/ReportDashboardController.java
@@ -0,0 +1,46 @@
+/*-
+ * ================================================================================
+ * ECOMP Portal SDK
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.controller.sample;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.openecomp.portalsdk.core.controller.RestrictedBaseController;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.servlet.ModelAndView;
+
+/**
+ * Report dashboard
+ *
+ */
+
+@Controller
+@RequestMapping("/")
+public class ReportDashboardController extends RestrictedBaseController {
+ @RequestMapping(value = {"/report_dashboard" }, method = RequestMethod.GET)
+ public ModelAndView adminView(HttpServletRequest request) {
+ Map<String, Object> model = new HashMap<String, Object>();
+ return new ModelAndView(getViewName(),"model", model);
+ }
+} \ No newline at end of file
diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/SamplePageController.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/SamplePageController.java
new file mode 100644
index 0000000..e01bb8c
--- /dev/null
+++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/SamplePageController.java
@@ -0,0 +1,50 @@
+/*-
+ * ================================================================================
+ * ECOMP Portal SDK
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.controller.sample;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.openecomp.portalsdk.core.controller.RestrictedBaseController;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.servlet.ModelAndView;
+
+/**
+ * Controller for a network map view that uses iframes. The view is restricted
+ * to authenticated users.
+ */
+@Controller
+@RequestMapping("/")
+public class SamplePageController extends RestrictedBaseController {
+
+ @RequestMapping(value = { "/samplePage" }, method = RequestMethod.GET)
+ public ModelAndView plot(HttpServletRequest request) {
+ Map<String, Object> model = new HashMap<String, Object>();
+ /*model.put("frame_int", "net_map_int");
+ // This view resolves to page frame_insert.jsp
+ return new ModelAndView("frame_insert", model);*/
+ return new ModelAndView("samplePage", "model", model);
+ }
+
+}
diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/package-info.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/package-info.java
new file mode 100644
index 0000000..8c04d60
--- /dev/null
+++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/controller/sample/package-info.java
@@ -0,0 +1,5 @@
+package org.openecomp.portalapp.controller.sample;
+
+/**
+ * Provides controllers for EPSDK application sample pages such as call flow etc.
+ */
diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/model/Result.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/model/Result.java
new file mode 100644
index 0000000..ba07bd3
--- /dev/null
+++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/model/Result.java
@@ -0,0 +1,37 @@
+/*-
+ * ================================================================================
+ * ECOMP Portal SDK
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.model;
+
+public class Result {
+ private String result;
+
+ public Result(String result) {
+ this.result = result;
+ }
+
+ public String getResult() {
+ return result;
+ }
+
+ public void setResult(String result) {
+ this.result = result;
+ }
+
+}
diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/scheduler/LogJob.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/scheduler/LogJob.java
new file mode 100644
index 0000000..f620618
--- /dev/null
+++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/scheduler/LogJob.java
@@ -0,0 +1,45 @@
+/*-
+ * ================================================================================
+ * ECOMP Portal SDK
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.scheduler;
+
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.quartz.DisallowConcurrentExecution;
+import org.quartz.JobExecutionContext;
+import org.quartz.JobExecutionException;
+import org.quartz.PersistJobDataAfterExecution;
+import org.springframework.scheduling.quartz.QuartzJobBean;
+
+@PersistJobDataAfterExecution
+@DisallowConcurrentExecution
+public class LogJob extends QuartzJobBean {
+
+ EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(LogJob.class);
+
+ @Override
+ protected void executeInternal(JobExecutionContext ctx)
+ throws JobExecutionException {
+ // JobDataMap dataMap = ctx.getJobDetail().getJobDataMap();
+ //int cnt = dataMap.getInt("");
+ // JobKey jobKey = ctx.getJobDetail().getKey();
+ logger.info(EELFLoggerDelegate.debugLogger, (Runtime.getRuntime().maxMemory() + " " + Runtime.getRuntime().maxMemory()));
+
+ }
+
+}
diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/scheduler/LogRegistry.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/scheduler/LogRegistry.java
new file mode 100644
index 0000000..bffc3d0
--- /dev/null
+++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/scheduler/LogRegistry.java
@@ -0,0 +1,57 @@
+/*-
+ * ================================================================================
+ * ECOMP Portal SDK
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.scheduler;
+
+import java.text.ParseException;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.openecomp.portalsdk.core.scheduler.CronRegistry;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.springframework.context.annotation.DependsOn;
+import org.springframework.scheduling.quartz.CronTriggerFactoryBean;
+import org.springframework.scheduling.quartz.JobDetailFactoryBean;
+import org.springframework.stereotype.Component;
+
+@Component
+@DependsOn({ "systemProperties" })
+public class LogRegistry extends CronRegistry {
+
+ private static final String groupName = "AppGroup";
+ private static final String jobName = "LogJob";
+ private static final String triggerName = "LogTrigger";
+
+ // @Autowired
+ // private SystemProperties systemProperties;
+
+ // @Bean
+ public JobDetailFactoryBean jobDetailFactoryBean() {
+ Map<String, Object> map = new HashMap<String, Object>();
+ map.put("units", "bytes");
+ return jobDetailFactoryBean(groupName, jobName, LogJob.class, map);
+ }
+
+ // @Bean
+ public CronTriggerFactoryBean cronTriggerFactoryBean() throws ParseException {
+ // "0 * * * * ? *
+ return cronTriggerFactoryBean(groupName, triggerName, SystemProperties.getProperty(SystemProperties.LOG_CRON));
+ }
+
+}
diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/service/IAdminAuthExtension.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/service/IAdminAuthExtension.java
new file mode 100644
index 0000000..c670c2b
--- /dev/null
+++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/service/IAdminAuthExtension.java
@@ -0,0 +1,65 @@
+/*-
+ * ================================================================================
+ * ECOMP Portal SDK
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+
+package org.openecomp.portalapp.service;
+
+import java.util.Set;
+
+import org.openecomp.portalsdk.core.domain.Role;
+import org.openecomp.portalsdk.core.domain.User;
+
+/**
+ * Defines methods that can be used to extend the features of the user/role
+ * provisioning class supplied in EPSDK-Common.
+ */
+public interface IAdminAuthExtension {
+
+ /**
+ * Invoked from OnBoardingApiServiceImpl#pushUser after user was saved. App
+ * developers can provide a class with their own logic following this
+ * action; for example, updating app's related tables
+ *
+ * @param user
+ * User object sent by Portal
+ */
+ public void saveUserExtension(User user);
+
+ /**
+ * Invoked from OnBoardingApiServiceImpl#editUser after user was updated.
+ * App developers can provide a class with their own logic following this
+ * action; for example, updating app's related tables
+ *
+ * @param user
+ * User object sent by Portal
+ */
+ public void editUserExtension(User user);
+
+ /**
+ * Invoked from OnBoardingApiServiceImpl#pushUserRole after user's roles
+ * were updated. App developers can provide a class with their own logic
+ * following this action; for example, updating app's related tables
+ *
+ * @param roles
+ * Roles object sent by Portal
+ * @param user
+ * User object sent by Portal
+ */
+ public void saveUserRoleExtension(Set<Role> roles, User user);
+}
diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/service/OnBoardingApiServiceImpl.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/service/OnBoardingApiServiceImpl.java
new file mode 100644
index 0000000..cb82249
--- /dev/null
+++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/service/OnBoardingApiServiceImpl.java
@@ -0,0 +1,361 @@
+/*-
+ * ================================================================================
+ * ECOMP Portal SDK
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.service;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+import java.util.SortedSet;
+import java.util.TreeSet;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.openecomp.portalsdk.core.auth.LoginStrategy;
+import org.openecomp.portalsdk.core.domain.Role;
+import org.openecomp.portalsdk.core.domain.User;
+import org.openecomp.portalsdk.core.domain.UserApp;
+import org.openecomp.portalsdk.core.logging.logic.EELFLoggerDelegate;
+import org.openecomp.portalsdk.core.onboarding.client.AppContextManager;
+import org.openecomp.portalsdk.core.onboarding.crossapi.IPortalRestAPIService;
+import org.openecomp.portalsdk.core.onboarding.exception.PortalAPIException;
+import org.openecomp.portalsdk.core.onboarding.listener.PortalTimeoutHandler;
+import org.openecomp.portalsdk.core.restful.domain.EcompRole;
+import org.openecomp.portalsdk.core.restful.domain.EcompUser;
+import org.openecomp.portalsdk.core.service.RoleService;
+import org.openecomp.portalsdk.core.service.UserProfileService;
+import org.openecomp.portalsdk.core.service.WebServiceCallService;
+import org.openecomp.portalsdk.core.util.JSONUtil;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.openecomp.portalsdk.core.web.support.UserUtils;
+import org.slf4j.MDC;
+import org.springframework.context.ApplicationContext;
+
+/**
+ * Implements the REST API interface to answer requests made by Portal app about
+ * users and active sessions.
+ *
+ * Since an instance of this class will be instantiated by the OnBoarding
+ * servlet from the ecompFW library, we cannot use Spring injections here. This
+ * 'injection' is done indirectly using AppContextManager class.
+ *
+ * @author Ikram Ikramullah
+ *
+ */
+public class OnBoardingApiServiceImpl implements IPortalRestAPIService {
+
+ private RoleService roleService;
+ private UserProfileService userProfileService;
+ private IAdminAuthExtension adminAuthExtensionServiceImpl;
+
+ private LoginStrategy loginStrategy;
+
+ EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(OnBoardingApiServiceImpl.class);
+
+ public OnBoardingApiServiceImpl() {
+ // Defend against null-pointer exception during server startup
+ // that was caused by a spurious Spring annotation on this class.
+ ApplicationContext appContext = AppContextManager.getAppContext();
+ if (appContext == null)
+ throw new RuntimeException("OnBoardingApiServiceImpl ctor failed to get appContext");
+ roleService = appContext.getBean(RoleService.class);
+ userProfileService = appContext.getBean(UserProfileService.class);
+ loginStrategy = appContext.getBean(LoginStrategy.class);
+ // initialize the base class definition for Admin Auth Extension
+ adminAuthExtensionServiceImpl = appContext.getBean(IAdminAuthExtension.class);
+ }
+
+ private void setCurrentAttributes(User user, EcompUser userJson) {
+
+ user.setEmail(userJson.getEmail());
+ user.setFirstName(userJson.getFirstName());
+ user.setHrid(userJson.getHrid());
+ user.setJobTitle(userJson.getJobTitle());
+ user.setLastName(userJson.getLastName());
+ user.setLoginId(userJson.getLoginId());
+ user.setOrgManagerUserId(userJson.getOrgManagerUserId());
+ user.setMiddleInitial(userJson.getMiddleInitial());
+ user.setOrgCode(userJson.getOrgCode());
+ user.setOrgId(userJson.getOrgId());
+ user.setPhone(userJson.getPhone());
+ user.setOrgUserId(userJson.getOrgUserId());
+ user.setActive(userJson.isActive());
+ // user.setRoles(new TreeSet(userJson.getRoles()));
+ }
+
+ @Override
+ public void pushUser(EcompUser userJson) throws PortalAPIException {
+
+ if (logger.isDebugEnabled())
+ logger.debug(EELFLoggerDelegate.debugLogger, "pushUser was invoked: {}", userJson);
+ User user = new User();
+ String response = "";
+ try {
+ // Set input attributes to the object obout to be saved
+ setCurrentAttributes(user, userJson);
+ user.setRoles(new TreeSet<Role>());
+ user.setUserApps(new TreeSet<UserApp>());
+ user.setPseudoRoles(new TreeSet<Role>());
+ userProfileService.saveUser(user);
+ logger.debug(EELFLoggerDelegate.debugLogger, "push user success.");
+
+ // After successful creation, call admin auth extension
+ if (adminAuthExtensionServiceImpl != null) {
+ try {
+ adminAuthExtensionServiceImpl.saveUserExtension(user);
+ } catch (Exception ex) {
+ logger.error("pushUser: saveUserExtension failed", ex);
+ }
+ }
+
+ response = "push user success.";
+ response = JSONUtil.convertResponseToJSON(response);
+ } catch (Exception e) {
+ response = "OnboardingApiService.pushUser failed";
+ logger.error(EELFLoggerDelegate.errorLogger, response, e);
+ throw new PortalAPIException(response, e);
+ } finally {
+ MDC.remove(SystemProperties.MDC_TIMER);
+ }
+ }
+
+ @Override
+ public void editUser(String loginId, EcompUser userJson) throws PortalAPIException {
+
+ if (logger.isDebugEnabled())
+ logger.debug(EELFLoggerDelegate.debugLogger, "OnboardingApi editUser was invoked with loginID {}, JSON {}",
+ loginId, userJson);
+ User editUser = new User();
+ String response = "";
+ try {
+ setCurrentAttributes(editUser, userJson);
+ if (editUser.getOrgUserId() != null) {
+ editUser.setLoginId(editUser.getOrgUserId());
+ }
+ User domainUser = userProfileService.getUserByLoginId(loginId);
+ if (domainUser != null)
+ domainUser = JSONUtil.mapToDomainUser(domainUser, editUser);
+ else
+ domainUser = editUser;
+ userProfileService.saveUser(domainUser);
+ logger.debug(EELFLoggerDelegate.debugLogger, "edit user success.");
+
+ // After successful edit, call the admin auth extension
+ if (adminAuthExtensionServiceImpl != null) {
+ try {
+ adminAuthExtensionServiceImpl.editUserExtension(domainUser);
+ } catch (Exception ex) {
+ logger.error("editUser: editUserExtension failed", ex);
+ }
+ }
+
+ response = "edit user success.";
+ response = JSONUtil.convertResponseToJSON(response);
+ } catch (Exception e) {
+ response = "OnboardingApiService.editUser failed";
+ logger.error(EELFLoggerDelegate.errorLogger, response, e);
+ throw new PortalAPIException(response, e);
+ } finally {
+ MDC.remove(SystemProperties.MDC_TIMER);
+ }
+
+ // return response;
+ }
+
+ @Override
+ public EcompUser getUser(String loginId) throws PortalAPIException {
+ try {
+ if (logger.isDebugEnabled())
+ logger.debug(EELFLoggerDelegate.debugLogger, "## REST API ## loginId: {}", loginId);
+ User user = userProfileService.getUserByLoginId(loginId);
+ if (user == null) {
+ logger.info(EELFLoggerDelegate.debugLogger, "User + " + loginId + " doesn't exist");
+ return null;
+ // Unfortunately, Portal is not ready to accept proper error
+ // response yet ..
+ // commenting throw clauses until portal is ready
+ // throw new PortalAPIException("User + " + loginId + " doesn't
+ // exist");
+ } else
+ return UserUtils.convertToEcompUser(user);
+ } catch (Exception e) {
+ String response = "OnboardingApiService.getUser failed";
+ logger.error(EELFLoggerDelegate.errorLogger, response, e);
+ return null;
+ // Unfortunately, Portal is not ready to accept proper error response
+ // yet .. commenting throw clauses until portal is ready
+ // throw new PortalAPIException(response, e);
+ }
+
+ }
+
+ @Override
+ public List<EcompUser> getUsers() throws PortalAPIException {
+ try {
+ List<User> users = userProfileService.findAllActive();
+ List<EcompUser> ecompUsers = new ArrayList<EcompUser>();
+ for (User user : users)
+ ecompUsers.add(UserUtils.convertToEcompUser(user));
+ return ecompUsers;
+ } catch (Exception e) {
+ String response = "OnboardingApiService.getUsers failed";
+ logger.error(EELFLoggerDelegate.errorLogger, response, e);
+ throw new PortalAPIException(response, e);
+ }
+ }
+
+ @Override
+ public List<EcompRole> getAvailableRoles() throws PortalAPIException {
+ try {
+ List<Role> roles = roleService.getActiveRoles();
+ List<EcompRole> ecompRoles = new ArrayList<EcompRole>();
+ for (Role role : roles)
+ ecompRoles.add(UserUtils.convertToEcompRole(role));
+ return ecompRoles;
+ } catch (Exception e) {
+ String response = "OnboardingApiService.getAvailableRoles failed";
+ logger.error(EELFLoggerDelegate.errorLogger, response, e);
+ throw new PortalAPIException(response, e);
+ }
+ }
+
+ @Override
+ public void pushUserRole(String loginId, List<EcompRole> rolesJson) throws PortalAPIException {
+ String response = "";
+ try {
+ if (logger.isDebugEnabled())
+ logger.debug(EELFLoggerDelegate.debugLogger, "## REST API ## loginId: {}, roles Json {}", loginId,
+ rolesJson);
+ User user = userProfileService.getUserByLoginId(loginId);
+ /*
+ * List<EcompRole> ecompRoles = mapper.readValue(rolesJson,
+ * TypeFactory.defaultInstance().constructCollectionType(List.class,
+ * EcompRole.class));
+ */
+ SortedSet<Role> roles = new TreeSet<Role>();
+ for (EcompRole role : rolesJson) {
+ roles.add(roleService.getRole(role.getId()));
+ }
+ // Replace existing roles with new ones
+ replaceExistingRoles(roles, user);
+
+ logger.debug(EELFLoggerDelegate.debugLogger, "push user role success.");
+
+ // After successful creation, call admin auth extension
+ if (adminAuthExtensionServiceImpl != null) {
+ try {
+ adminAuthExtensionServiceImpl.saveUserRoleExtension(roles, user);
+ } catch (Exception ex) {
+ logger.error("pushUserRole: saveUserRoleExtension failed", ex);
+ }
+ }
+ response = "push user role success.";
+ response = JSONUtil.convertResponseToJSON(response);
+
+ } catch (Exception e) {
+ response = "OnboardingApiService.pushUserRole failed";
+ logger.error(EELFLoggerDelegate.errorLogger, response, e);
+ throw new PortalAPIException(response, e);
+ } finally {
+ MDC.remove(SystemProperties.MDC_TIMER);
+ }
+
+ }
+
+ @Override
+ public List<EcompRole> getUserRoles(String loginId) throws PortalAPIException {
+ if (logger.isDebugEnabled())
+ logger.debug(EELFLoggerDelegate.debugLogger, "## REST API ## loginId: {}", loginId);
+ List<EcompRole> ecompRoles = new ArrayList<EcompRole>();
+ try {
+ User user = userProfileService.getUserByLoginId(loginId);
+ SortedSet<Role> currentRoles = null;
+ if (user != null) {
+ currentRoles = user.getRoles();
+ if (currentRoles != null)
+ for (Role role : currentRoles)
+ ecompRoles.add(UserUtils.convertToEcompRole(role));
+ }
+ return ecompRoles;
+ } catch (Exception e) {
+ String response = "OnboardingApiService.getUserRoles failed";
+ logger.error(EELFLoggerDelegate.errorLogger, response, e);
+ throw new PortalAPIException(response, e);
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ private void replaceExistingRoles(SortedSet<Role> roles, User user) {
+ // 1. remove existing roles
+ Set<UserApp> userApps = user.getUserApps();
+ Iterator<UserApp> appsItr = userApps.iterator();
+ while (appsItr.hasNext()) {
+ UserApp tempUserApp = appsItr.next();
+ boolean roleFound = false;
+ for (Role role : roles) {
+ if (tempUserApp.getRole().getId().equals(role.getId())) {
+ roleFound = true;
+ break;
+ }
+ }
+ if (!roleFound)
+ appsItr.remove();
+ }
+ user.setUserApps(userApps);
+ userProfileService.saveUser(user);
+
+ // 2. add new roles
+ user.setRoles(roles);
+ userProfileService.saveUser(user);
+ }
+
+ @Override
+ public boolean isAppAuthenticated(HttpServletRequest request) throws PortalAPIException {
+ WebServiceCallService securityService = AppContextManager.getAppContext().getBean(WebServiceCallService.class);
+ try {
+ String appUser = request.getHeader("username");
+ String password = request.getHeader("password");
+ // System.out.println("username = " + appUser);
+ // System.out.println("password = " + password);
+ boolean flag = securityService.verifyRESTCredential(null, appUser, password);
+ // System.out.println("username = " + appUser);
+ // System.out.println("password = " + password);
+ return flag;
+
+ } catch (Exception e) {
+ String response = "OnboardingApiService.isAppAuthenticated failed";
+ logger.error(EELFLoggerDelegate.errorLogger, response, e);
+ throw new PortalAPIException(response, e);
+ }
+ }
+
+ public String getSessionTimeOuts() throws Exception {
+ return PortalTimeoutHandler.gatherSessionExtensions();
+ }
+
+ public void updateSessionTimeOuts(String sessionMap) throws Exception {
+ PortalTimeoutHandler.updateSessionExtensions(sessionMap);
+ }
+
+ @Override
+ public String getUserId(HttpServletRequest request) throws PortalAPIException {
+ return loginStrategy.getUserId(request);
+ }
+}
diff --git a/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/util/CustomLoggingFilter.java b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/util/CustomLoggingFilter.java
new file mode 100644
index 0000000..00c1d86
--- /dev/null
+++ b/ecomp-sdk/epsdk-app-common/src/main/java/org/openecomp/portalapp/util/CustomLoggingFilter.java
@@ -0,0 +1,54 @@
+/*-
+ * ================================================================================
+ * ECOMP Portal SDK
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ================================================================================
+ */
+package org.openecomp.portalapp.util;
+
+import ch.qos.logback.classic.Level;
+import ch.qos.logback.classic.spi.ILoggingEvent;
+import ch.qos.logback.core.filter.Filter;
+import ch.qos.logback.core.spi.FilterReply;
+
+/**
+ * Custom Filter class bind with logback.xml
+ * configuration file to strip out certain log messages
+ * coming out of special packages or classes.
+ *
+ */
+public class CustomLoggingFilter extends Filter<ILoggingEvent> {
+
+ /**
+ * Custom Filter is added to strip out the continuous U-EB logging messages
+ * But make sure we log the ERROR & WARNING Level messages.
+ */
+ @Override
+ public FilterReply decide(ILoggingEvent event) {
+ try {
+ if ((event.getLevel() != Level.ERROR || event.getLevel() != Level.WARN) &&
+ (event.getThreadName().equalsIgnoreCase("UEBConsumerThread")) &&
+ (event.getLoggerName().contains("org.openecomp.nsa") || event.getLoggerName().contains("org.apache.http"))
+ ) {
+ return FilterReply.DENY;
+ } else {
+ return FilterReply.NEUTRAL;
+ }
+ } catch(Exception e) {
+ return FilterReply.NEUTRAL;
+ }
+ }
+}
diff --git a/ecomp-sdk/epsdk-app-common/src/main/webapp/app/fusion/external/d3/js/intro.js b/ecomp-sdk/epsdk-app-common/src/main/webapp/app/fusion/external/d3/js/intro.js
new file mode 100644
index 0000000..0c3a328
--- /dev/null
+++ b/ecomp-sdk/epsdk-app-common/src/main/webapp/app/fusion/external/d3/js/intro.js
@@ -0,0 +1 @@
+(function(){})
diff --git a/ecomp-sdk/epsdk-app-common/src/test/java/org/openecomp/portalapp/SanityTest.java b/ecomp-sdk/epsdk-app-common/src/test/java/org/openecomp/portalapp/SanityTest.java
new file mode 100644
index 0000000..96d6b0f
--- /dev/null
+++ b/ecomp-sdk/epsdk-app-common/src/test/java/org/openecomp/portalapp/SanityTest.java
@@ -0,0 +1,20 @@
+package org.openecomp.portalapp;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.openecomp.portalapp.core.MockApplicationContextTestSuite;
+import org.springframework.test.web.servlet.ResultActions;
+import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
+
+public class SanityTest extends MockApplicationContextTestSuite {
+
+ @Test
+ public void testGetAvailableRoles() throws Exception {
+
+ ResultActions ra =getMockMvc().perform(MockMvcRequestBuilders.get("/api/roles"));
+ //Assert.assertEquals(UrlAccessRestrictedException.class,ra.andReturn().getResolvedException().getClass());
+ Assert.assertEquals("application/json",ra.andReturn().getResponse().getContentType());
+ }
+
+
+}
diff --git a/ecomp-sdk/epsdk-app-common/src/test/java/org/openecomp/portalapp/controller/CollaborationControllerTest.java b/ecomp-sdk/epsdk-app-common/src/test/java/org/openecomp/portalapp/controller/CollaborationControllerTest.java
new file mode 100644
index 0000000..2751a66
--- /dev/null
+++ b/ecomp-sdk/epsdk-app-common/src/test/java/org/openecomp/portalapp/controller/CollaborationControllerTest.java
@@ -0,0 +1,29 @@
+package org.openecomp.portalapp.controller;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.openecomp.portalapp.core.MockApplicationContextTestSuite;
+import org.openecomp.portalsdk.core.domain.User;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.springframework.test.web.servlet.ResultActions;
+import org.springframework.test.web.servlet.request.MockHttpServletRequestBuilder;
+import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
+
+
+
+public class CollaborationControllerTest extends MockApplicationContextTestSuite{
+
+ @Test
+ public void testGetAvailableRoles() throws Exception {
+ MockHttpServletRequestBuilder requestBuilder = MockMvcRequestBuilders.get("/collaborate_list");
+ User user = new User();
+ user.setId(1l);
+ //user.setOrgUserId("abc");
+ requestBuilder.sessionAttr(SystemProperties.getProperty(SystemProperties.USER_ATTRIBUTE_NAME), user);
+
+ ResultActions ra =getMockMvc().perform(requestBuilder);
+ Assert.assertEquals(2,ra.andReturn().getModelAndView().getModelMap().size());
+ }
+
+
+}
diff --git a/ecomp-sdk/epsdk-app-common/src/test/java/org/openecomp/portalapp/controller/NetMapTest.java b/ecomp-sdk/epsdk-app-common/src/test/java/org/openecomp/portalapp/controller/NetMapTest.java
new file mode 100644
index 0000000..0f06ea7
--- /dev/null
+++ b/ecomp-sdk/epsdk-app-common/src/test/java/org/openecomp/portalapp/controller/NetMapTest.java
@@ -0,0 +1,19 @@
+package org.openecomp.portalapp.controller;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.openecomp.portalapp.core.MockApplicationContextTestSuite;
+import org.springframework.test.web.servlet.ResultActions;
+import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
+
+public class NetMapTest extends MockApplicationContextTestSuite {
+
+ @Test
+ public void testGetNetMap() throws Exception {
+ ResultActions ra =getMockMvc().perform(MockMvcRequestBuilders.get("/net_map"));
+ //Assert.assertEquals(UrlAccessRestrictedException.class,ra.andReturn().getResolvedException().getClass());
+ Assert.assertEquals("net_map_int",ra.andReturn().getModelAndView().getModel().get("frame_int"));
+ }
+
+
+}
diff --git a/ecomp-sdk/epsdk-app-common/src/test/java/org/openecomp/portalapp/core/MockApplicationContextTestSuite.java b/ecomp-sdk/epsdk-app-common/src/test/java/org/openecomp/portalapp/core/MockApplicationContextTestSuite.java
new file mode 100644
index 0000000..8a86cd5
--- /dev/null
+++ b/ecomp-sdk/epsdk-app-common/src/test/java/org/openecomp/portalapp/core/MockApplicationContextTestSuite.java
@@ -0,0 +1,127 @@
+package org.openecomp.portalapp.core;
+
+import java.io.IOException;
+
+import org.junit.Before;
+import org.junit.runner.RunWith;
+import org.openecomp.portalsdk.core.conf.AppConfig;
+import org.openecomp.portalsdk.core.objectcache.AbstractCacheManager;
+import org.openecomp.portalsdk.core.util.CacheManager;
+import org.openecomp.portalsdk.core.util.SystemProperties;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Profile;
+import org.springframework.test.context.ActiveProfiles;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+import org.springframework.test.context.web.AnnotationConfigWebContextLoader;
+import org.springframework.test.context.web.WebAppConfiguration;
+import org.springframework.test.web.servlet.MockMvc;
+import org.springframework.test.web.servlet.setup.MockMvcBuilders;
+import org.springframework.web.context.WebApplicationContext;
+import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
+
+
+
+/**
+ *
+ *
+ *
+ * In order to write a unit test,
+ * 1. inherit this class - See SanityTest.java
+ * 2. place the "war" folder on your test class's classpath
+ * 3. run the test with the following VM argument; This is important because when starting the application from Container, the System Properties file (SystemProperties.java) can have the direct path
+ * but, when running from the Mock Junit container, the path should be prefixed with "classpath" to enable the mock container to search for the file in the classpath
+ * -Dcontainer.classpath="classpath:"
+ *
+ */
+
+@RunWith(SpringJUnit4ClassRunner.class)
+@WebAppConfiguration
+@ContextConfiguration(loader = AnnotationConfigWebContextLoader.class, classes = {MockAppConfig.class})
+@ActiveProfiles(value="test")
+public class MockApplicationContextTestSuite {
+
+ @Autowired
+ public WebApplicationContext wac;
+
+ private MockMvc mockMvc;
+
+ @Before
+ public void setup() {
+ if(mockMvc == null) {
+ this.mockMvc = MockMvcBuilders.webAppContextSetup(this.wac).build();
+
+ }
+ }
+
+ public Object getBean(String name) {
+ return this.wac.getBean(name);
+ }
+
+
+ public MockMvc getMockMvc() {
+ return mockMvc;
+ }
+
+ public void setMockMvc(MockMvc mockMvc) {
+ this.mockMvc = mockMvc;
+ }
+
+ public WebApplicationContext getWebApplicationContext() {
+ return wac;
+ }
+
+
+
+
+}
+
+
+ @Configuration
+ @ComponentScan(basePackages = "org.openecomp",
+ excludeFilters = {
+ }
+ )
+ @Profile("test")
+ class MockAppConfig extends AppConfig {
+
+ @Bean
+ public SystemProperties systemProperties(){
+ return new MockSystemProperties();
+ }
+
+ @Bean
+ public AbstractCacheManager cacheManager() {
+ return new CacheManager() {
+
+ public void configure() throws IOException {
+
+ }
+ };
+ }
+
+ protected String[] tileDefinitions() {
+ return new String[] {"classpath:/WEB-INF/fusion/defs/definitions.xml", "classpath:/WEB-INF/defs/definitions.xml"};
+ }
+
+ @Override
+ public void addInterceptors(InterceptorRegistry registry) {
+ //registry.addInterceptor(new SessionTimeoutInterceptor()).excludePathPatterns(getExcludeUrlPathsForSessionTimeout());
+ //registry.addInterceptor(resourceInterceptor());
+ }
+
+ public static class MockSystemProperties extends SystemProperties {
+
+ public MockSystemProperties() {
+ }
+
+ }
+
+ }
+
+
+
+
diff --git a/ecomp-sdk/epsdk-app-common/src/test/java/org/openecomp/portalapp/service/ProfileServiceTest.java b/ecomp-sdk/epsdk-app-common/src/test/java/org/openecomp/portalapp/service/ProfileServiceTest.java
new file mode 100644
index 0000000..ea78a77
--- /dev/null
+++ b/ecomp-sdk/epsdk-app-common/src/test/java/org/openecomp/portalapp/service/ProfileServiceTest.java
@@ -0,0 +1,39 @@
+package org.openecomp.portalapp.service;
+
+import java.util.List;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.openecomp.portalapp.core.MockApplicationContextTestSuite;
+import org.openecomp.portalsdk.core.domain.Profile;
+import org.openecomp.portalsdk.core.domain.User;
+import org.openecomp.portalsdk.core.service.ProfileService;
+import org.openecomp.portalsdk.core.service.UserProfileService;
+import org.springframework.beans.factory.annotation.Autowired;
+
+
+
+
+public class ProfileServiceTest extends MockApplicationContextTestSuite {
+
+ @Autowired
+ ProfileService service;
+
+ @Autowired
+ UserProfileService userProfileService;
+
+ @Test
+ public void testFindAll() {
+
+ List<Profile> profiles = service.findAll();
+ Assert.assertTrue(profiles.size() > 0);
+ }
+
+ @Test
+ public void testFindAllActive() {
+
+ List<User> users = userProfileService.findAllActive();
+ List<User> activeUsers = userProfileService.findAllActive();
+ Assert.assertTrue(users.size() - activeUsers.size() >= 0);
+ }
+}
diff --git a/ecomp-sdk/epsdk-app-common/src/test/java/org/openecomp/portalapp/workflow/services/WorkflowScheduleServiceTest.java b/ecomp-sdk/epsdk-app-common/src/test/java/org/openecomp/portalapp/workflow/services/WorkflowScheduleServiceTest.java
new file mode 100644
index 0000000..c390a84
--- /dev/null
+++ b/ecomp-sdk/epsdk-app-common/src/test/java/org/openecomp/portalapp/workflow/services/WorkflowScheduleServiceTest.java
@@ -0,0 +1,44 @@
+package org.openecomp.portalapp.workflow.services;
+
+import java.util.Calendar;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.openecomp.portalapp.core.MockApplicationContextTestSuite;
+import org.openecomp.portalsdk.workflow.domain.WorkflowSchedule;
+import org.openecomp.portalsdk.workflow.services.WorkflowScheduleService;
+import org.springframework.beans.factory.annotation.Autowired;
+
+
+
+public class WorkflowScheduleServiceTest extends MockApplicationContextTestSuite {
+
+ @Autowired
+ WorkflowScheduleService service;
+// @Autowired
+// SchedulerFactoryBean schedulerBean;
+
+ @Test
+ public void testFire() {
+
+ // List<WorkflowSchedule> wfs = service.findAll();
+
+ final WorkflowSchedule ws = new WorkflowSchedule();
+ ws.setId(999L);
+ ws.setWorkflowKey("test");
+ ws.setCronDetails("0 38 13 3 5 ? 2016");
+ final Calendar instance = Calendar.getInstance();
+ instance.add(Calendar.YEAR, 3);
+ ws.setEndDateTime(instance.getTime());
+
+ ws.setStartDateTime(Calendar.getInstance().getTime());
+ try{
+ service.saveWorkflowSchedule(ws);
+ Assert.assertTrue(true);
+ } catch(Exception e) {
+ Assert.fail(e.getMessage());
+ }
+
+ }
+
+}