diff options
author | st782s <statta@research.att.com> | 2018-01-30 17:29:36 -0500 |
---|---|---|
committer | st782s <statta@research.att.com> | 2018-02-01 15:10:02 -0500 |
commit | 21a8761f684745bb300e075c7e98ad897ace9eed (patch) | |
tree | 6d585c3fe39fbb42a314941dbc8646e6ccf188cf /ecomp-portal-DB-os/EcompPortalDMLMySql_1707_OS.sql | |
parent | 3af8af1310d5a27cb58be29505573f0bbdc1717c (diff) |
Security/ Package Name changes
Issue-ID: PORTAL-174, PORTAL-157, PORTAL-156, PORTAL-148, PORTAL-145,
PORTAL-140, PORTAL-133, PORTAL-121, PORTAL-111, PORTAL-88
Includes security fixes, Role Centralization, replace certain ECOMP
occurrences etc
Change-Id: I3c8b706709c6b92e646e3cbe50c2d660e8a46ef4
Signed-off-by: st782s <statta@research.att.com>
Diffstat (limited to 'ecomp-portal-DB-os/EcompPortalDMLMySql_1707_OS.sql')
-rw-r--r-- | ecomp-portal-DB-os/EcompPortalDMLMySql_1707_OS.sql | 84 |
1 files changed, 0 insertions, 84 deletions
diff --git a/ecomp-portal-DB-os/EcompPortalDMLMySql_1707_OS.sql b/ecomp-portal-DB-os/EcompPortalDMLMySql_1707_OS.sql deleted file mode 100644 index ace9d45e..00000000 --- a/ecomp-portal-DB-os/EcompPortalDMLMySql_1707_OS.sql +++ /dev/null @@ -1,84 +0,0 @@ --- --------------------------------------------------------------------------------------------------------------- --- This is the default data for the 1707 Version of ECOMP Portal database called portal - the Opensource project --- First run the common Opensource DML; then run this file to add The Opensource only data - -USE portal; - -set foreign_key_checks=1; - --- fn_user -Insert into fn_user (USER_ID, ORG_ID, MANAGER_ID,FIRST_NAME,MIDDLE_NAME,LAST_NAME,PHONE,FAX,CELLULAR,EMAIL,ADDRESS_ID,ALERT_METHOD_CD,HRID,ORG_USER_ID,ORG_CODE,LOGIN_ID,LOGIN_PWD,LAST_LOGIN_DATE,ACTIVE_YN,CREATED_ID,CREATED_DATE,MODIFIED_ID,MODIFIED_DATE,IS_INTERNAL_YN,ADDRESS_LINE_1,ADDRESS_LINE_2,CITY,STATE_CD,ZIP_CODE,COUNTRY_CD,LOCATION_CLLI,ORG_MANAGER_USERID,COMPANY,DEPARTMENT_NAME,JOB_TITLE,TIMEZONE,DEPARTMENT,BUSINESS_UNIT,BUSINESS_UNIT_NAME,COST_CENTER,FIN_LOC_CODE,SILO_STATUS) values (1,NULL,NULL,'Demo',NULL,'User',NULL,NULL,NULL,'demo@openecomp.org',NULL,NULL,NULL,'demo',NULL,'demo','95LidzVz7nSpsTsRUrDNVA==','2016-10-20 15:11:16','Y',NULL,'2016-10-14 21:00:00',1,'2016-10-20 15:11:16','N',NULL,NULL,NULL,'NJ',NULL,'US',NULL,NULL,NULL,NULL,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL); - --- fn_app -Insert INTO fn_app (APP_ID, APP_NAME, APP_IMAGE_URL, APP_DESCRIPTION, APP_NOTES, APP_URL, APP_ALTERNATE_URL, APP_REST_ENDPOINT, ML_APP_NAME, ML_APP_ADMIN_ID, MOTS_ID, APP_PASSWORD, OPEN, ENABLED, THUMBNAIL, APP_USERNAME, UEB_KEY, UEB_SECRET, UEB_TOPIC_NAME, APP_TYPE) values (1,'Default','assets/images/tmp/portal1.png','Some Default Description','Some Default Note','http://localhost','http://localhost','http://localhost:8080/ecompportal','EcompPortal','',NULL,'','N','N',NULL,NULL,NULL,NULL,NULL,1); - --- fn_user_role -Insert into fn_user_role (USER_ID,ROLE_ID,PRIORITY,APP_ID) values (1,1,NULL,1); -Insert into fn_user_role (USER_ID,ROLE_ID,PRIORITY,APP_ID) values (1,950,NULL,1); -Insert into fn_user_role (USER_ID,ROLE_ID,PRIORITY,APP_ID) values (1,999,NULL,1); - --- change to inactive for following menu -update fn_menu set active_yn='N' where menu_id=14; /* web analytics */ -update fn_menu set active_yn='N' where menu_id=16; /* web analytics onboarding*/ - -INSERT INTO cr_report - (rep_id, title, descr, public_yn, report_xml, create_id, create_date, maint_id, maint_date, menu_id, menu_approved_yn, owner_id, folder_id, dashboard_type_yn, dashboard_yn) - VALUES ( - 15, - 'Application Usage Report Wid', - '', - 'Y', - '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n<customReport pageSize="200" reportType="Linear">\n <reportName>Application Usage Report Wid</reportName>\n <reportDescr></reportDescr>\n <dbInfo>local</dbInfo>\n <dbType>mysql</dbType>\n <chartType>BarChart3D</chartType>\n <chartWidth>700</chartWidth>\n <chartHeight>500</chartHeight>\n <showChartTitle>false</showChartTitle>\n <public>false</public>\n <hideFormFieldAfterRun>false</hideFormFieldAfterRun>\n <createId>27</createId>\n <createDate>2017-01-28-05:00</createDate>\n <reportSQL>SELECT \n l.date audit_date, \n app_id app_id, \n IF(CHAR_LENGTH(l.app_name) >14, CONCAT(CONCAT(SUBSTR(l.app_name,1,7),\'...\'), SUBSTR(l.app_name, CHAR_LENGTH(l.app_name)-3,CHAR_LENGTH(l.app_name))) , l.app_name) app_name, \n IFNULL(r.ct,0) ct \nfrom\n(\n select a.Date, app_id, app_name\n from (\n select curdate() - INTERVAL (a.a + (10 * b.a) + (100 * c.a)) DAY as Date\n from (select 0 as a union all select 1 union all select 2 union all select 3 union all select 4 union all select 5 union all select 6 union all select 7 union all select 8 union all select 9) as a\n cross join (select 0 as a union all select 1 union all select 2 union all select 3 union all select 4 union all select 5 union all select 6 union all select 7 union all select 8 union all select 9) as b\n cross join (select 0 as a union all select 1 union all select 2 union all select 3 union all select 4 union all select 5 union all select 6 union all select 7 union all select 8 union all select 9) as c\n ) a, \n (\n SELECT \n app_id, app_name\n from\n (\n select @rn := @rn+1 AS rowId, app_id, app_name from \n (\n select app_id, app_name, ct from \n (\n select affected_record_id, count(*) ct\n from fn_audit_log l\n where audit_date > date_add( curdate(), interval -6 day)\n and affected_record_id not in ( 1, -1)\n and activity_cd in (\'tab_access\', \'app_access\')\n and user_id = [USER_ID]\n group by affected_record_id\n ) a, fn_app f\n where a.affected_record_id = f.app_id\n order by ct desc \n ) b,\n (SELECT @rn := 0) t2\n ) mm where rowId <= 4\n )b\n where a.Date between date_add( curdate(), interval -6 day) and curdate()\n) l left outer join\n(\n select app_name, DATE(audit_date) audit_date_1 ,count(*) ct from fn_audit_log a, fn_app b\n where user_id = [USER_ID]\n and audit_date > date_add( curdate(), interval -6 day)\n and activity_cd in (\'tab_access\', \'app_access\')\n and a.affected_record_id = b.app_id\n and b.app_id <> 1\n and b.app_id in \n (\n SELECT \n app_id\n from\n (\n select @rn := @rn+1 AS rowId, app_id from \n (\n select app_id, ct from \n (\n select affected_record_id app_id, count(*) ct\n from fn_audit_log \n where audit_date > date_add( curdate(), interval -6 day)\n and affected_record_id not in ( 1, -1)\n and activity_cd in (\'tab_access\', \'app_access\')\n and user_id = [USER_ID]\n group by affected_record_id\n ) a\n order by ct desc \n ) b,\n (SELECT @rn := 0) t2\n ) mm \n )\n group by app_name, DATE(audit_date)\n) r\non l.Date = r.audit_date_1\nand l.app_name = r.app_name</reportSQL>\n <reportTitle></reportTitle>\n <reportSubTitle></reportSubTitle>\n <reportHeader></reportHeader>\n <frozenColumns>0</frozenColumns>\n <emptyMessage>Your Search didn\'t yield any results.</emptyMessage>\n <dataGridAlign>left</dataGridAlign>\n <reportFooter></reportFooter>\n <numFormCols>1</numFormCols>\n <displayOptions>NNNNNNN</displayOptions>\n <dataContainerHeight>100</dataContainerHeight>\n <dataContainerWidth>100</dataContainerWidth>\n <allowSchedule>N</allowSchedule>\n <multiGroupColumn>N</multiGroupColumn>\n <topDown>N</topDown>\n <sizedByContent>N</sizedByContent>\n <comment>N|</comment>\n <dataSourceList>\n <dataSource tableId="du0">\n <tableName>DUAL</tableName>\n <tablePK></tablePK>\n <displayName>DUAL</displayName>\n <dataColumnList>\n <dataColumn colId="audit_date">\n <tableId>du0</tableId>\n <dbColName>l.date</dbColName>\n <colName>l.date</colName>\n <displayName>audit_date_1</displayName>\n <displayWidth>10</displayWidth>\n <displayWidthInPxls>nullpxpx</displayWidthInPxls>\n <displayAlignment>Left</displayAlignment>\n <orderSeq>1</orderSeq>\n <visible>true</visible>\n <calculated>true</calculated>\n <colType>VARCHAR2</colType>\n <groupBreak>false</groupBreak>\n <colOnChart>LEGEND</colOnChart>\n <chartSeq>1</chartSeq>\n <chartColor></chartColor>\n <chartLineType></chartLineType>\n <chartSeries>false</chartSeries>\n <dbColType>VARCHAR2</dbColType>\n <chartGroup></chartGroup>\n <yAxis></yAxis>\n </dataColumn>\n <dataColumn colId="app_id">\n <tableId>du0</tableId>\n <dbColName>app_id</dbColName>\n <colName>app_id</colName>\n <displayName>app_id</displayName>\n <displayWidth>10</displayWidth>\n <displayAlignment>Left</displayAlignment>\n <orderSeq>2</orderSeq>\n <visible>true</visible>\n <calculated>true</calculated>\n <colType>VARCHAR2</colType>\n <groupBreak>false</groupBreak>\n <dbColType>VARCHAR2</dbColType>\n </dataColumn>\n <dataColumn colId="app_name">\n <tableId>du0</tableId>\n <dbColName>IF(CHAR_LENGTH(l.app_name) >14, CONCAT(CONCAT(SUBSTR(l.app_name,1,7),\'...\'), SUBSTR(l.app_name, CHAR_LENGTH(l.app_name)-3,CHAR_LENGTH(l.app_name))) , l.app_name)</dbColName>\n <colName>IF(CHAR_LENGTH(l.app_name) >14, CONCAT(CONCAT(SUBSTR(l.app_name,1,7),\'...\'), SUBSTR(l.app_name, CHAR_LENGTH(l.app_name)-3,CHAR_LENGTH(l.app_name))) , l.app_name)</colName>\n <displayName>app_name</displayName>\n <displayWidth>10</displayWidth>\n <displayWidthInPxls>nullpxpx</displayWidthInPxls>\n <displayAlignment>Left</displayAlignment>\n <orderSeq>3</orderSeq>\n <visible>true</visible>\n <calculated>true</calculated>\n <colType>VARCHAR2</colType>\n <groupBreak>false</groupBreak>\n <chartSeq>2</chartSeq>\n <chartColor></chartColor>\n <chartLineType></chartLineType>\n <chartSeries>true</chartSeries>\n <dbColType>VARCHAR2</dbColType>\n <chartGroup></chartGroup>\n <yAxis></yAxis>\n </dataColumn>\n <dataColumn colId="ct">\n <tableId>du0</tableId>\n <dbColName>IFNULL(r.ct,0)</dbColName>\n <colName>IFNULL(r.ct,0)</colName>\n <displayName>ct</displayName>\n <displayWidth>10</displayWidth>\n <displayWidthInPxls>nullpxpx</displayWidthInPxls>\n <displayAlignment>Left</displayAlignment>\n <orderSeq>4</orderSeq>\n <visible>true</visible>\n <calculated>true</calculated>\n <colType>VARCHAR2</colType>\n <groupBreak>false</groupBreak>\n <colOnChart>0</colOnChart>\n <chartSeq>1</chartSeq>\n <chartColor></chartColor>\n <chartLineType></chartLineType>\n <chartSeries>false</chartSeries>\n <dbColType>VARCHAR2</dbColType>\n <chartGroup></chartGroup>\n <yAxis></yAxis>\n </dataColumn>\n </dataColumnList>\n </dataSource>\n </dataSourceList>\n <reportInNewWindow>false</reportInNewWindow>\n <displayFolderTree>false</displayFolderTree>\n <maxRowsInExcelDownload>500</maxRowsInExcelDownload>\n <chartAdditionalOptions>\n <chartOrientation>vertical</chartOrientation>\n <hidechartLegend>N</hidechartLegend>\n <legendPosition>bottom</legendPosition>\n <labelAngle>up90</labelAngle>\n <rangeAxisUpperLimit></rangeAxisUpperLimit>\n <rangeAxisLowerLimit></rangeAxisLowerLimit>\n <animate>true</animate>\n <animateAnimatedChart>true</animateAnimatedChart>\n <stacked>true</stacked>\n <barControls>false</barControls>\n <xAxisDateType>false</xAxisDateType>\n <lessXaxisTickers>false</lessXaxisTickers>\n <timeAxis>true</timeAxis>\n <logScale>false</logScale>\n <topMargin>30</topMargin>\n <bottomMargin>50</bottomMargin>\n <rightMargin>60</rightMargin>\n <leftMargin>100</leftMargin>\n </chartAdditionalOptions>\n <folderId>NULL</folderId>\n <isOneTimeScheduleAllowed>N</isOneTimeScheduleAllowed>\n <isHourlyScheduleAllowed>N</isHourlyScheduleAllowed>\n <isDailyScheduleAllowed>N</isDailyScheduleAllowed>\n <isDailyMFScheduleAllowed>N</isDailyMFScheduleAllowed>\n <isWeeklyScheduleAllowed>N</isWeeklyScheduleAllowed>\n <isMonthlyScheduleAllowed>N</isMonthlyScheduleAllowed>\n</customReport>\n', - 1, - now(), - 1, - now(), - '', - 'N', - (select user_id from fn_user where org_user_id = 'demo'), - NULL, - 'N', - 'N' - ); - --- new for 1707 -INSERT INTO cr_report - (rep_id, title, descr, public_yn, report_xml, create_id, create_date, maint_id, maint_date, menu_id, menu_approved_yn, owner_id, folder_id, dashboard_type_yn, dashboard_yn) - VALUES ( - 18, - 'Application Usage bar Wid', - '', - 'Y', - '<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<customReport pageSize=\"200\" reportType=\"Linear\">\n <reportName>Application Usage Line Wid</reportName>\n <reportDescr></reportDescr>\n <dbInfo>local</dbInfo>\n <dbType>mysql</dbType>\n <chartType>TimeSeriesChart</chartType>\n <chartMultiSeries>N</chartMultiSeries>\n <chartWidth>700</chartWidth>\n <chartHeight>300</chartHeight>\n <showChartTitle>false</showChartTitle>\n <public>false</public>\n <hideFormFieldAfterRun>false</hideFormFieldAfterRun>\n <createId>27</createId>\n <createDate>2017-01-28-05:00</createDate>\n <reportSQL>SELECT \n l.date audit_date, \n IF(CHAR_LENGTH(l.app_name) >14, CONCAT(CONCAT(SUBSTR(l.app_name,1,7),\'...\'), SUBSTR(l.app_name, CHAR_LENGTH(l.app_name)-3,CHAR_LENGTH(l.app_name))) , l.app_name) app_name, \n IFNULL(r.ct,0) ct \nfrom\n(\n select a.Date, app_id, app_name\n from (\n select curdate() - INTERVAL (a.a + (10 * b.a) + (100 * c.a)) DAY as Date\n from (select 0 as a union all select 1 union all select 2 union all select 3 union all select 4 union all select 5 union all select 6 union all select 7 union all select 8 union all select 9) as a\n cross join (select 0 as a union all select 1 union all select 2 union all select 3 union all select 4 union all select 5 union all select 6 union all select 7 union all select 8 union all select 9) as b\n cross join (select 0 as a union all select 1 union all select 2 union all select 3 union all select 4 union all select 5 union all select 6 union all select 7 union all select 8 union all select 9) as c\n ) a, \n (\n SELECT \n app_id, app_name\n from\n (\n select @rn := @rn+1 AS rowId, app_id, app_name from \n (\n select app_id, app_name, ct from \n (\n select affected_record_id, count(*) ct\n from fn_audit_log l\n where audit_date > date_add( curdate(), interval -30 day)\n and affected_record_id not in ( 1, -1)\n and activity_cd in (\'tab_access\', \'app_access\')\n and user_id = [USER_ID]\n group by affected_record_id\n ) a, fn_app f\n where a.affected_record_id = f.app_id\n order by ct desc \n ) b,\n (SELECT @rn := 0) t2\n ) mm where rowId <= 4\n )b\n where a.Date between date_add( curdate(), interval -30 day) and curdate()\n) l left outer join\n(\n select app_name, DATE(audit_date) audit_date_1 ,count(*) ct from fn_audit_log a, fn_app b\n where user_id = [USER_ID]\n and audit_date > date_add( curdate(), interval -30 day)\n and activity_cd in (\'tab_access\', \'app_access\')\n and a.affected_record_id = b.app_id\n and b.app_id <> 1\n and b.app_id in \n (\n SELECT \n app_id\n from\n (\n select @rn := @rn+1 AS rowId, app_id from \n (\n select app_id, ct from \n (\n select affected_record_id app_id, count(*) ct\n from fn_audit_log \n where audit_date > date_add( curdate(), interval -30 day)\n and affected_record_id not in ( 1, -1)\n and activity_cd in (\'tab_access\', \'app_access\')\n and user_id = [USER_ID]\n group by affected_record_id\n ) a\n order by ct desc \n ) b,\n (SELECT @rn := 0) t2\n ) mm \n )\n group by app_name, DATE(audit_date)\n) r\non l.Date = r.audit_date_1\nand l.app_name = r.app_name</reportSQL>\n <reportTitle></reportTitle>\n <reportSubTitle></reportSubTitle>\n <reportHeader></reportHeader>\n <frozenColumns>0</frozenColumns>\n <emptyMessage>Your Search didn\'t yield any results.</emptyMessage>\n <dataGridAlign>left</dataGridAlign>\n <reportFooter></reportFooter>\n <numFormCols>1</numFormCols>\n <displayOptions>NNNNNNN</displayOptions>\n <dataContainerHeight>100</dataContainerHeight>\n <dataContainerWidth>100</dataContainerWidth>\n <allowSchedule>N</allowSchedule>\n <multiGroupColumn>N</multiGroupColumn>\n <topDown>N</topDown>\n <sizedByContent>N</sizedByContent>\n <comment>N|</comment>\n <dataSourceList>\n <dataSource tableId=\"du0\">\n <tableName>DUAL</tableName>\n <tablePK></tablePK>\n <displayName>DUAL</displayName>\n <dataColumnList>\n <dataColumn colId=\"audit_date\">\n <tableId>du0</tableId>\n <dbColName>l.date</dbColName>\n <colName>l.date</colName>\n <displayName>audit_date_1</displayName>\n <displayWidth>10</displayWidth>\n <displayWidthInPxls>nullpxpx</displayWidthInPxls>\n <displayAlignment>Left</displayAlignment>\n <orderSeq>1</orderSeq>\n <visible>true</visible>\n <calculated>true</calculated>\n <colType>VARCHAR2</colType>\n <groupBreak>false</groupBreak>\n <colOnChart>LEGEND</colOnChart>\n <chartSeq>1</chartSeq>\n <chartSeries>false</chartSeries>\n <isRangeAxisFilled>false</isRangeAxisFilled>\n <drillinPoPUp>false</drillinPoPUp>\n <dbColType>VARCHAR2</dbColType>\n <enhancedPagination>false</enhancedPagination>\n </dataColumn>\n <dataColumn colId=\"app_name\">\n <tableId>du0</tableId>\n <dbColName>IF(CHAR_LENGTH(l.app_name) >14, CONCAT(CONCAT(SUBSTR(l.app_name,1,7),\'...\'), SUBSTR(l.app_name, CHAR_LENGTH(l.app_name)-3,CHAR_LENGTH(l.app_name))) , l.app_name)</dbColName>\n <colName>IF(CHAR_LENGTH(l.app_name) >14, CONCAT(CONCAT(SUBSTR(l.app_name,1,7),\'...\'), SUBSTR(l.app_name, CHAR_LENGTH(l.app_name)-3,CHAR_LENGTH(l.app_name))) , l.app_name)</colName>\n <displayName>app_name</displayName>\n <displayWidth>10</displayWidth>\n <displayWidthInPxls>nullpxpx</displayWidthInPxls>\n <displayAlignment>Left</displayAlignment>\n <orderSeq>2</orderSeq>\n <visible>true</visible>\n <calculated>true</calculated>\n <colType>VARCHAR2</colType>\n <groupBreak>false</groupBreak>\n <colOnChart>0</colOnChart>\n <chartSeq>2</chartSeq>\n <chartColor></chartColor>\n <chartLineType></chartLineType>\n <chartSeries>true</chartSeries>\n <isRangeAxisFilled>false</isRangeAxisFilled>\n <drillinPoPUp>false</drillinPoPUp>\n <dbColType>VARCHAR2</dbColType>\n <chartGroup></chartGroup>\n <yAxis></yAxis>\n <enhancedPagination>false</enhancedPagination>\n </dataColumn>\n <dataColumn colId=\"ct\">\n <tableId>du0</tableId>\n <dbColName>IFNULL(r.ct,0)</dbColName>\n <colName>IFNULL(r.ct,0)</colName>\n <displayName>ct</displayName>\n <displayWidth>10</displayWidth>\n <displayWidthInPxls>nullpxpx</displayWidthInPxls>\n <displayAlignment>Left</displayAlignment>\n <orderSeq>3</orderSeq>\n <visible>true</visible>\n <calculated>true</calculated>\n <colType>VARCHAR2</colType>\n <groupBreak>false</groupBreak>\n <colOnChart>0</colOnChart>\n <chartSeq>1</chartSeq>\n <chartColor></chartColor>\n <chartLineType></chartLineType>\n <chartSeries>false</chartSeries>\n <isRangeAxisFilled>false</isRangeAxisFilled>\n <drillinPoPUp>false</drillinPoPUp>\n <dbColType>VARCHAR2</dbColType>\n <chartGroup></chartGroup>\n <yAxis></yAxis>\n <enhancedPagination>false</enhancedPagination>\n </dataColumn>\n </dataColumnList>\n </dataSource>\n </dataSourceList>\n <reportInNewWindow>false</reportInNewWindow>\n <displayFolderTree>false</displayFolderTree>\n <maxRowsInExcelDownload>500</maxRowsInExcelDownload>\n <chartAdditionalOptions>\n <chartOrientation>vertical</chartOrientation>\n <hidechartLegend>N</hidechartLegend>\n <legendPosition>bottom</legendPosition>\n <labelAngle>down45</labelAngle>\n <animate>true</animate>\n <animateAnimatedChart>true</animateAnimatedChart>\n <stacked>true</stacked>\n <barControls>false</barControls>\n <xAxisDateType>false</xAxisDateType>\n <lessXaxisTickers>false</lessXaxisTickers>\n <timeAxis>true</timeAxis>\n <timeSeriesRender>line</timeSeriesRender>\n <multiSeries>false</multiSeries>\n <showXAxisLabel>false</showXAxisLabel>\n <addXAxisTickers>false</addXAxisTickers>\n <topMargin>30</topMargin>\n <bottomMargin>50</bottomMargin>\n <rightMargin>60</rightMargin>\n <leftMargin>100</leftMargin>\n </chartAdditionalOptions>\n <folderId>NULL</folderId>\n <drillURLInPoPUpPresent>false</drillURLInPoPUpPresent>\n <isOneTimeScheduleAllowed>N</isOneTimeScheduleAllowed>\n <isHourlyScheduleAllowed>N</isHourlyScheduleAllowed>\n <isDailyScheduleAllowed>N</isDailyScheduleAllowed>\n <isDailyMFScheduleAllowed>N</isDailyMFScheduleAllowed>\n <isWeeklyScheduleAllowed>N</isWeeklyScheduleAllowed>\n <isMonthlyScheduleAllowed>N</isMonthlyScheduleAllowed>\n</customReport>\n', - 1, - now(), - 1, - now(), - '', - 'N', - (select user_id from fn_user where org_user_id = 'demo'), - NULL, - 'N', - 'N' - ); - -INSERT INTO cr_report - (rep_id, title, descr, public_yn, report_xml, create_id, create_date, maint_id, maint_date, menu_id, menu_approved_yn, owner_id, folder_id, dashboard_type_yn, dashboard_yn) - VALUES ( - 20, - 'Average time spend on portal', - '', - 'Y', - '<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<customReport pageSize=\"200\" reportType=\"Linear\">\n <reportName>Average time spend on portal</reportName>\n <reportDescr></reportDescr>\n <dbInfo>local</dbInfo>\n <dbType>mysql</dbType>\n <chartType>TimeSeriesChart</chartType>\n <chartMultiSeries>N</chartMultiSeries>\n <chartWidth>700</chartWidth>\n <chartHeight>300</chartHeight>\n <showChartTitle>false</showChartTitle>\n <public>true</public>\n <hideFormFieldAfterRun>false</hideFormFieldAfterRun>\n <createId>27</createId>\n <createDate>2017-01-28-05:00</createDate>\n <reportSQL>SELECT \n d.dat audit_date, \n \'# of Minutes\' app, \n coalesce(diff, null, 0) mins \nfrom\n(\n select * from\n (\n select curdate() - INTERVAL (a.a + (10 * b.a) + (100 * c.a)) DAY as dat\n from (select 0 as a union all select 1 union all select 2 union all select 3 union all select 4 union all select 5 union all select 6 union all select 7 union all select 8 union all select 9) as a\n cross join (select 0 as a union all select 1 union all select 2 union all select 3 union all select 4 union all select 5 union all select 6 union all select 7 union all select 8 union all select 9) as b\n cross join (select 0 as a union all select 1 union all select 2 union all select 3 union all select 4 union all select 5 union all select 6 union all select 7 union all select 8 union all select 9) as c \n ) d where d.dat between date_add( curdate(), interval -30 day) and curdate()\n) d left outer join\n(\n select dat, mi, mx, TIMESTAMPDIFF(MINUTE, coalesce(mi, null, 0), coalesce(mx, null, 0)) + 30 diff\n from\n (\n select DATE(audit_date) dat, coalesce(min(audit_date), null, 0) mi, coalesce(max(audit_date), null, 0) mx\n from fn_audit_log \n where user_id = [USER_ID] and DATE(audit_date) between CURDATE()-300 and CURDATE()\n group by DATE(audit_date)\n ) a\n) a\non a.dat = d.dat\norder by 1</reportSQL>\n <reportTitle></reportTitle>\n <reportSubTitle></reportSubTitle>\n <reportHeader></reportHeader>\n <frozenColumns>0</frozenColumns>\n <emptyMessage>Your Search didn\'t yield any results.</emptyMessage>\n <dataGridAlign>left</dataGridAlign>\n <reportFooter></reportFooter>\n <numFormCols>1</numFormCols>\n <displayOptions>NNNNNNN</displayOptions>\n <dataContainerHeight>100</dataContainerHeight>\n <dataContainerWidth>100</dataContainerWidth>\n <allowSchedule>N</allowSchedule>\n <multiGroupColumn>N</multiGroupColumn>\n <topDown>N</topDown>\n <sizedByContent>N</sizedByContent>\n <comment>N|</comment>\n <dataSourceList>\n <dataSource tableId=\"du0\">\n <tableName>DUAL</tableName>\n <tablePK></tablePK>\n <displayName>DUAL</displayName>\n <dataColumnList>\n <dataColumn colId=\"audit_date\">\n <tableId>du0</tableId>\n <dbColName>d.dat</dbColName>\n <colName>d.dat</colName>\n <displayName>audit_date_1</displayName>\n <displayWidth>10</displayWidth>\n <displayWidthInPxls>nullpxpx</displayWidthInPxls>\n <displayAlignment>Left</displayAlignment>\n <orderSeq>1</orderSeq>\n <visible>true</visible>\n <calculated>true</calculated>\n <colType>VARCHAR2</colType>\n <groupBreak>false</groupBreak>\n <colOnChart>LEGEND</colOnChart>\n <chartSeq>1</chartSeq>\n <chartSeries>false</chartSeries>\n <isRangeAxisFilled>false</isRangeAxisFilled>\n <drillinPoPUp>false</drillinPoPUp>\n <dbColType>VARCHAR2</dbColType>\n <enhancedPagination>false</enhancedPagination>\n </dataColumn>\n <dataColumn colId=\"app\">\n <tableId>du0</tableId>\n <dbColName>\'# of Minutes\'</dbColName>\n <colName>\'# of Minutes\'</colName>\n <displayName>app</displayName>\n <displayWidth>10</displayWidth>\n <displayWidthInPxls>nullpxpx</displayWidthInPxls>\n <displayAlignment>Left</displayAlignment>\n <orderSeq>2</orderSeq>\n <visible>true</visible>\n <calculated>true</calculated>\n <colType>VARCHAR2</colType>\n <groupBreak>false</groupBreak>\n <chartSeries>true</chartSeries>\n <dbColType>VARCHAR2</dbColType>\n </dataColumn>\n <dataColumn colId=\"mins\">\n <tableId>du0</tableId>\n <dbColName>coalesce(diff, null, 0)</dbColName>\n <colName>coalesce(diff, null, 0)</colName>\n <displayName>mins</displayName>\n <displayWidth>10</displayWidth>\n <displayWidthInPxls>nullpxpx</displayWidthInPxls>\n <displayAlignment>Left</displayAlignment>\n <orderSeq>3</orderSeq>\n <visible>true</visible>\n <calculated>true</calculated>\n <colType>VARCHAR2</colType>\n <groupBreak>false</groupBreak>\n <colOnChart>0</colOnChart>\n <chartSeq>1</chartSeq>\n <chartColor></chartColor>\n <chartLineType></chartLineType>\n <chartSeries>false</chartSeries>\n <dbColType>VARCHAR2</dbColType>\n <chartGroup></chartGroup>\n <yAxis></yAxis>\n </dataColumn>\n </dataColumnList>\n </dataSource>\n </dataSourceList>\n <reportInNewWindow>false</reportInNewWindow>\n <displayFolderTree>false</displayFolderTree>\n <maxRowsInExcelDownload>500</maxRowsInExcelDownload>\n <chartAdditionalOptions>\n <chartOrientation>vertical</chartOrientation>\n <hidechartLegend>N</hidechartLegend>\n <legendPosition>bottom</legendPosition>\n <labelAngle>down45</labelAngle>\n <animate>true</animate>\n <animateAnimatedChart>true</animateAnimatedChart>\n <stacked>true</stacked>\n <barControls>false</barControls>\n <xAxisDateType>false</xAxisDateType>\n <lessXaxisTickers>false</lessXaxisTickers>\n <timeAxis>true</timeAxis>\n <timeSeriesRender>line</timeSeriesRender>\n <multiSeries>false</multiSeries>\n <showXAxisLabel>false</showXAxisLabel>\n <addXAxisTickers>false</addXAxisTickers>\n <topMargin>30</topMargin>\n <bottomMargin>50</bottomMargin>\n <rightMargin>60</rightMargin>\n <leftMargin>100</leftMargin>\n </chartAdditionalOptions>\n <folderId>NULL</folderId>\n <drillURLInPoPUpPresent>false</drillURLInPoPUpPresent>\n <isOneTimeScheduleAllowed>N</isOneTimeScheduleAllowed>\n <isHourlyScheduleAllowed>N</isHourlyScheduleAllowed>\n <isDailyScheduleAllowed>N</isDailyScheduleAllowed>\n <isDailyMFScheduleAllowed>N</isDailyMFScheduleAllowed>\n <isWeeklyScheduleAllowed>N</isWeeklyScheduleAllowed>\n <isMonthlyScheduleAllowed>N</isMonthlyScheduleAllowed>\n</customReport>\n', - 1, - now(), - 1, - now(), - '', - 'N', - (select user_id from fn_user where org_user_id = 'demo'), - NULL, - 'N', - 'N' - ); -commit;
\ No newline at end of file |