diff options
Diffstat (limited to 'ecomp-portal-BE-os/src/main/webapp')
28 files changed, 3074 insertions, 0 deletions
diff --git a/ecomp-portal-BE-os/src/main/webapp/META-INF/MANIFEST.MF b/ecomp-portal-BE-os/src/main/webapp/META-INF/MANIFEST.MF new file mode 100644 index 00000000..254272e1 --- /dev/null +++ b/ecomp-portal-BE-os/src/main/webapp/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + diff --git a/ecomp-portal-BE-os/src/main/webapp/WEB-INF/conf/cache.ccf b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/conf/cache.ccf new file mode 100644 index 00000000..b8a2363d --- /dev/null +++ b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/conf/cache.ccf @@ -0,0 +1,30 @@ +# DEFAULT CACHE REGION +jcs.default=DC +jcs.default.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributes +jcs.default.cacheattributes.MaxObjects=1000 +jcs.default.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory.lru.LRUMemoryCache +jcs.default.elementattributes=org.apache.jcs.engine.ElementAttributes +jcs.default.elementattributes.IsEternal=true +jcs.default.elementattributes.IsSpool=true + + +# MEMORY SHRINKING CONFIGURATION (Commented) +#jcs.default.cacheattributes.UseMemoryShrinker=true +#jcs.default.cacheattributes.MaxMemoryIdleTimeSeconds=3600 +#jcs.default.cacheattributes.ShrinkerIntervalSeconds=60 +#jcs.default.cacheattributes.MaxSpoolPerRun=500 +#jcs.default.elementattributes=org.apache.jcs.engine.ElementAttributes +#jcs.default.elementattributes.IsEternal=false + + +# AUXILLARY CACHE CONFIGURATION +jcs.auxiliary.DC=org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheFactory +jcs.auxiliary.DC.attributes=org.apache.jcs.auxiliary.disk.indexed.IndexedDiskCacheAttributes +jcs.auxiliary.DC.attributes.DiskPath=fusion/cache + + +# PRE-DEFINED REGION FOR LOOKUP DATA +jcs.region.lookUpObjectCache=DC +jcs.region.lookUpObjectCache.cacheattributes=org.apache.jcs.engine.CompositeCacheAttributes +jcs.region.lookUpObjectCache.cacheattributes.MaxObjects=4000 +jcs.region.lookUpObjectCache.cacheattributes.MemoryCacheName=org.apache.jcs.engine.memory.lru.LRUMemoryCache diff --git a/ecomp-portal-BE-os/src/main/webapp/WEB-INF/conf/quartz.properties b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/conf/quartz.properties new file mode 100644 index 00000000..f95f469f --- /dev/null +++ b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/conf/quartz.properties @@ -0,0 +1,55 @@ +### +# ================================================================================ +# eCOMP Portal +# ================================================================================ +# 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. +# ================================================================================ +### +################################################################################# +# Quartz configurations for Quantum Work Flow # +################################################################################# + +org.quartz.scheduler.instanceId = AUTO + +################################################################################# +# Main configurations +org.quartz.threadPool.class = org.quartz.simpl.SimpleThreadPool +org.quartz.threadPool.threadCount = 30 + +============================================================================ +# Configure JobStore +#============================================================================ + +org.quartz.jobStore.misfireThreshold = 60000 + +org.quartz.jobStore.class = org.quartz.impl.jdbcjobstore.JobStoreTX +org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate +org.quartz.jobStore.useProperties = false +#org.quartz.jobStore.dataSource = myDS +org.quartz.jobStore.tablePrefix = FN_QZ_ + +org.quartz.jobStore.isClustered = true +org.quartz.jobStore.clusterCheckinInterval = 20000 + +#============================================================================ +# Configure Datasources +#============================================================================ + +#org.quartz.dataSource.myDS.driver = com.mysql.jdbc.Driver +#org.quartz.dataSource.myDS.URL = jdbc:mysql://localhost:3306/portal +#org.quartz.dataSource.myDS.user = todo +#org.quartz.dataSource.myDS.password = todo +#org.quartz.dataSource.myDS.maxConnections = 5 +#org.quartz.dataSource.myDS.validationQuery=select 0 from dual diff --git a/ecomp-portal-BE-os/src/main/webapp/WEB-INF/conf/raptor.properties b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/conf/raptor.properties new file mode 100644 index 00000000..0c32ef65 --- /dev/null +++ b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/conf/raptor.properties @@ -0,0 +1,185 @@ +### +# ================================================================================ +# eCOMP Portal +# ================================================================================ +# 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. +# ================================================================================ +### +##C## Mention the name of the framework. At present RAPTOR supports FUSION +system=fusion +##C## Determines the priority for the debug message. +debug_level=5 +##C## Determines the number of records can be downloaded in excel when you select "download all" option. +download_limit=65000 +csv_download_limit=10 +##C## Determines the number of records to be displayed in a single page. +default_page_size=50 +##C## Determines the list size in the form field. +form_fields_list_size=99000 +##C## Determines the scheduler interval +#scheduler_interval=0 => disabled +scheduler_interval=0 +##C## System Name +system_name=RAPTOR +##C## This is used for Bread crumbs. +base_title=ANALYSIS +##C## whether to allow SQL-based report definition (security risk); super users are always allowed to create SQL-based reports +allow_sql_based_reports=no +##C## Determines whether to include disclaimer page at the bottom of each screen +show_disclaimer=yes +disclaimer_positioned_top_in_csvexcel=yes +##C## Determines whether to display the form page as a separate page before running the report +display_form_before_run=yes +##C## Determines whether to include the form page on the report data page +include_form_with_data=yes +##C## Determines whether to cache chart data in the session => faster re-display if the data volume does not get too large +cache_chart_data=yes +##C## Determines whether to cache report data for the currently displayed page in the session => faster re-display + ##C## if the data volume does not get too large +cache_cur_page_data=yes +##C## Determines Chart width +default_chart_width=700 +##C## Determines Chart height +default_chart_height=420 +##C## Determines whether to permit report deletion only by report owner or by everyone with "write" access +delete_only_by_owner=yes +##C## Determines whether to log each report execution and update time and user ID +enable_report_log=yes +##C## Determines whether to cache user roles info in memory (saves many DB reads, but does not account for roles + ##C## assigned after the cache was loaded) +cache_user_roles=yes +##C## Determines whether to convert month formats (e.g. MM/YYYY) to the last day of the month (true) or + ##C## first day (false) - like 12/2003 is converted to either 12/31/2003 or 12/01/2003 +month_format_use_last_day=no +##C## Determines whether to print the report title in the download files +print_title_in_download=yes +##C## Determines whether to show report description when the report is run and in the quick links +show_descr_at_runtime=no +##C## Determines whether to skip labels on the Line chart axis when they overlap +#DEPRECATED skip_chart_labels_to_fit=no +##C## Determines whether to show chart types that are purpose and/or data specific +show_nonstandard_charts=yes +##C## Determines whether to allow the user to change the chart type at runtime +allow_runtime_chart_sel=yes +##C## Determines whether to display the report title as chart title as well +display_chart_title=yes +##C## Determines whether to merge/blank multi-level row headings in cross-tab report +merge_crosstab_row_headings=yes +##C## Determines whether to display chart when displaying the report at first or just a "Show Chart" button +display_chart_by_default=yes +##C## Determines whether to print the form field values in the download files +print_params_in_download=yes +##C## Determines the limitation to the characters in chart label. +skip_chart_labels_limit=30 +##C## Determines whether to users with read-only rights for a report can copy it +can_copy_on_read_only=yes +##C## Determines the no of decimals to be displayed in Totals column +#max_decimals_on_totals=-1 => don't truncate, display all decimal digits +max_decimals_on_totals=2 +##C## Determines which JFreeChart to use. +jfree_version=latest +#jfree_version=0.9.11 +# Added this restriction so that heavily used system which contain +# more than 1000 users can enable this feature not to display whole +# users in the drop down menu +display_all_users=yes +##Sheet name +sheet_name=raptor +#shell_script_name=/home/sundar/test.sh +#download_query_folder=/titan/PROJECT3/RAPTOR/raptor/dwnld/query/ +## this directory is mentioned if the flat file is downloaded using shell script +shell_script_dir=/titan/PROJECT3/RAPTOR/raptor/dwnld/ +flat_file_lower_limit=1 +flat_file_upper_limit=200000 +## whatever request mentioned here would be parsed in sql and request parameter would be filled +request_get_params=c_master,isEmbedded +print_footer_in_download=yes +## footer mentioned here appears in downloaded excel +footer_first_line=AT&T Proprietary +footer_second_line=Use Pursuant to Company Instructions +## to run report in popup window +report_in_popup_window=yes +## to run each report in new popup window if the above is selected +popup_in_new_window=yes +## "Yes" allows the request param to be passed to the drill down report +pass_request_param_in_drilldown=yes +## Show PDF download icon +show_pdf_download=yes +# Show Folder Tree +show_folder_tree=no +#Show folder tree only for Admin Users +show_folder_tree_only_to_admin_users=no +#folder tree should be minimized +folder_tree_minimized=yes +## whatever session mentioned here would be parsed in sql and session parameter would be filled +session_params=login_id +display_formfield_info=yes +customize_formfield_info=yes +#schedule limit for end users +schedule_limit=10 +# customized query if you need any restrictions for schedule and security tab for fusion +#schedule_custom_query_for_users=getAllUsersByCustomer +#schedule_custom_query_for_roles=getAllRolesByCustomer +# customized query if you need any restrictions for schedule and security tab for prisms example +#schedule_custom_query_for_users=SELECT au.user_id, au.first_name||' '||au.last_name user_name FROM app_user au order by 2 +schedule_custom_query_for_users=SELECT au.user_id id, au.first_name||' '||au.last_name name FROM app_user au where user_id = 1 order by 2 +#schedule_custom_query_for_roles=SELECT ar.role_id, ar.descr role_name FROM app_role ar order by 2 +schedule_date_pattern=MM/dd/yyyy hh:mm:ss a +## This is used to display in right format in chart timestamp axis as we give in the sql +#chart_yearly_format=yyyy +#chart_monthly_format=MMM-yyyy +#chart_daily_format=MM-dd-yyyy +chart_hourly_format=MM/dd HH +#chart_minute_format=HH:mm +chart_minute_format=MM-dd-yyyy-HH:mm +#chart_second_format=HH:mm:ss +chart_second_format=MM-dd-yyyy +#chart_millisecond_format=HH:mm:ss.S +schedule_help_text=This form is used to schedule a specific Reporting Platform report to be delivered to one or more email addresses associated with your Company's Business Direct user logins. Note that report output delivered via email does not include the capability to drill down/back up to additional data levels. So, select the appropriate data level report for the scheduled report. View the status of scheduled report requests in the My Schedules menu item. +use_loginid_in_schedYN=Y +session_params_for_scheduling=login_id +session_date_formfield_auto_incr=yes +display_session_param_pdfexcel=login_id;Login Id +session_params_for_displaying_in_scheduling=login_id;Login Id +application_server=tomcat +#gmap properties +gmap_key=ABQIAAAAToJSSetKBMjBJx8MiRw4ghQiU0SbbKnm8C5eu25cpyLwgkLzyRShrQTbgZtqnKAqZU9JwcSq1bKwiA +PROJECT-FOLDER=/Users/sundar/git/st_quantum/quantum/target/quantum-1.0 +# +MARKET-SHAPEFILE-FOLDER=resources/files +# output folder for files generated on server side +OUTPUT-FOLDER=resources/temp +# tile size in pixel +TILE-SIZE=256 +#check if map is disabled or not +map_allowed=Y +max_drilldown_level=2 +admin_role_equiv_to_super_role=N +show_loading_during_formfield_chain=Y +show_print_icon=N +globally_nowrap=N +calendar_output_date_format=MM/dd/yyyy +memory_threshold_percentage=99 +print_params_in_csv_download=yes +notitle_in_dashboard=yes +generate_store_sched_reports=yes +show_excel_2007_download=yes +print_excel_in_landscape=yes +show_animated_chart_option=yes +show_animated_chart_only=no +adjust_content_based_on_height=yes +custom_submit_button_text=Run Button +customize_formfield_layout=yes +db_type=postgresql diff --git a/ecomp-portal-BE-os/src/main/webapp/WEB-INF/conf/raptor_app_fusion.properties b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/conf/raptor_app_fusion.properties new file mode 100644 index 00000000..09fe0cec --- /dev/null +++ b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/conf/raptor_app_fusion.properties @@ -0,0 +1,36 @@ +### +# ================================================================================ +# eCOMP Portal +# ================================================================================ +# 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. +# ================================================================================ +### +temp_folder_path=/Users/sundar/git/st_quantum/quantum/target/quantum-1.0/temp/ +upload_folder_path=/Users/sundar/git/st_quantum/quantum/target/quantum-1.0/files/ +excel_template_path=/Users/sundar/git/st_quantum/quantum/target/quantum-1.0/files/raptor_template/ +temp_folder_url=temp/ +upload_folder_url=upload/ +smtp_server=todo_url +default_email_sender=dev-local@email.com +error_page=error_page.jsp +jsp_context_path=raptor/ +img_folder_url=static/fusion/raptor/images/ +base_folder_url=static/fusion/raptor/ +direct_access_url=http://localhost:8080/quantum/raptor_email_attachment.htm?action=raptor&source_page=report_run&display_content=y +base_action_url=raptor.htm?action= +base_action_param=c_master= +super_role_id=1 +admin_role_ids=1 +quick_links_menu_ids=HOME,CUSTOMER,REPORTS diff --git a/ecomp-portal-BE-os/src/main/webapp/WEB-INF/conf/raptor_db_fusion.properties b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/conf/raptor_db_fusion.properties new file mode 100644 index 00000000..497fa16d --- /dev/null +++ b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/conf/raptor_db_fusion.properties @@ -0,0 +1,19 @@ +### +# ================================================================================ +# eCOMP Portal +# ================================================================================ +# 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. +# ================================================================================ +### diff --git a/ecomp-portal-BE-os/src/main/webapp/WEB-INF/conf/raptor_pdf.properties b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/conf/raptor_pdf.properties new file mode 100644 index 00000000..548cf3bf --- /dev/null +++ b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/conf/raptor_pdf.properties @@ -0,0 +1,49 @@ +### +# ================================================================================ +# eCOMP Portal +# ================================================================================ +# 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. +# ================================================================================ +### +## pdf file specific properties +pdf_data_font_size=9 +pdf_data_font_family=Arial +#reduce the font size from html config +pdf_data_font_size_offset=2 +pdf_data_alternate_color=true +#data row background(white), alternate(light light blue/gray) +pdf_data_background_alternate_hex_code=#EDEDED +pdf_data_default_background_hex_code=#FFFFFF +#header font (white) background (gray) +pdf_data_table_header_font_hex_code=#FFFFFF +pdf_data_table_header_background_hex_code=#8A9BB3 +#footer header +pdf_footer_font_size=9 +pdf_footer_font_family=Arial +pdf_att_proprietary=xxxx +pdf_att_proprierary_font_size=7 +pdf_date_timezone=GMT +pdf_date_pattern=MM/dd/yyyy hh:mm:ss a +##page number position at 1 - footer middle, 0 -- header right, 2 - both +pdf_page_number_position=1 +pdf_word_before_page_number=Page +pdf_word_after_page_number= +pdf_coverpage_firstcolumn_size=0.3 +pdf_image_auto_rotate=false +display_create_owner_info=true +#session_info=customer,customerId +display_loginid_for_downloaded_by=false +# please use false if you want landscape to be default. +is_default_orientation_portrait=true diff --git a/ecomp-portal-BE-os/src/main/webapp/WEB-INF/conf/sql.properties b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/conf/sql.properties new file mode 100644 index 00000000..954330d3 --- /dev/null +++ b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/conf/sql.properties @@ -0,0 +1,295 @@ +### +# ================================================================================ +# eCOMP Portal +# ================================================================================ +# 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. +# ================================================================================ +### +#SQL Statements for PostgreSQL + +#ReportLoader.java + +load.custom.report.xml = SELECT cr.report_xml FROM cr_report cr WHERE rep_id=?::int + +db.update.report.xml = SELECT cr.rep_id, cr.report_xml FROM cr_report cr WHERE rep_id=? FOR UPDATE + +update.custom.report.rec = UPDATE cr_report SET title='[Utils.oracleSafe(rw.getReportName())]', descr='[Utils.oracleSafe(rw.getReportDescr())]', public_yn='[(rw.isPublic()]', menu_id='[rw.getMenuID()]', menu_approved_yn='[(rw.isMenuApproved()]', owner_id=[rw.getOwnerID()], maint_id=[rw.getUpdateID()], maint_date=TO_DATE('[rw.getUpdateDate()]', '[Globals.getOracleTimeFormat()]'), dashboard_type_yn='[(rw.isDashboardType()]', dashboard_yn= '[(rw.getReportType().equals(AppConstants.RT_DASHBOARD)]' WHERE rep_id = [rw.getReportID()] + +is.report.already.scheduled = select rep_id from cr_report_schedule where rep_id = ?::int + +create.custom.report.rec = INSERT INTO cr_report(rep_id, title, descr, public_yn, menu_id, menu_approved_yn, report_xml, owner_id, create_id, create_date, maint_id, maint_date, dashboard_type_yn, dashboard_yn, folder_id) VALUES([rw.getReportID()], '[Utils.oracleSafe(rw.getReportName())]', '[Utils.oracleSafe(rw.getReportDescr())]', '[rw.isPublic()]', '[rw.getMenuID()]', '[rw.isMenuApproved()]', '<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>', [rw.getOwnerID()], [rw.getCreateID()], TO_DATE('[rw.getCreateDate()]', '[Globals.getOracleTimeFormat()]'), [rw.getUpdateID()], TO_DATE('[rw.getUpdateDate()]', '[Globals.getOracleTimeFormat()]'), '[rw.isDashboardType()]', '[rw.getReportType().equals(AppConstants.RT_DASHBOARD)]',[rw.getFolderId()]) + +get.user.report.names = SELECT cr.rep_id, cr.title FROM cr_report cr WHERE coalesce(cr.owner_id, cr.create_id) = [userID] + +get.report.owner.id = SELECT coalesce(cr.owner_id, cr.create_id) AS owner FROM cr_report cr WHERE rep_id = ?::int + +delete.report.record.log = DELETE FROM cr_report_log WHERE rep_id = [reportID] + +delete.report.record.users = DELETE FROM cr_report_schedule_users WHERE rep_id = [reportID] + +delete.report.record.schedule = DELETE FROM cr_report_schedule WHERE rep_id = [reportID] + +delete.report.record.access = DELETE FROM cr_report_access WHERE rep_id = [reportID] + +delete.report.record.email = DELETE FROM cr_report_email_sent_log WHERE rep_id = [reportID] + +delete.report.record.favorite = DELETE FROM cr_favorite_reports WHERE rep_id = [reportID] + +delete.report.record.report = DELETE FROM cr_report WHERE rep_id = [reportID] + +load.quick.links = SELECT cr.rep_id, cr.title, cr.descr FROM (SELECT rep_id, MIN(read_only_yn) read_only_yn FROM ((SELECT ua.rep_id, ua.read_only_yn FROM cr_report_access ua WHERE ua.user_id = [userID]) UNION ALL (SELECT ra.rep_id, ra.read_only_yn FROM cr_report_access ra WHERE ra.role_id IN ([roleList.toString()]))) report_access GROUP BY rep_id) ra LEFT JOIN cr_report cr ON cr.rep_id = ra.rep_id WHERE cr.menu_id LIKE '%[nvls(menuId)]%' AND cr.menu_approved_yn = 'Y' AND (coalesce(cr.owner_id, cr.create_id) = [userID] OR cr.public_yn = 'Y' OR ra.read_only_yn IS NOT NULL) ORDER BY cr.title + +load.folder.reports = SELECT cr.rep_id, cr.rep_id report_id, [rep_title_sql] || CASE WHEN cr.public_yn = 'Y' THEN '' ELSE '[PRIVATE_ICON]' END||cr.title||'</a>' title, cr.descr, au.first_name||' '||au.last_name owner_name, TO_CHAR(cr.create_date, 'MM/DD/YYYY') create_date, CASE WHEN coalesce(cr.owner_id, cr.create_id) = [userID] THEN 'N' ELSE coalesce(ra.read_only_yn, 'Y') END read_only_yn, CASE WHEN coalesce(cr.owner_id, cr.create_id) = [userID] THEN 'Y' ELSE 'N' END user_is_owner_yn FROM cr_report cr JOIN app_user au ON coalesce(cr.owner_id, cr.create_id) = au.user_id AND cr.folder_id= '[folderId]' LEFT JOIN (SELECT rep_id, MIN(read_only_yn) read_only_yn FROM ((SELECT ua.rep_id, ua.read_only_yn FROM cr_report_access ua WHERE ua.user_id = [userID]) UNION ALL(SELECT ra.rep_id, ra.read_only_yn FROM cr_report_access ra WHERE ra.role_id IN ([roleList.toString()]))) report_access GROUP BY rep_id) ra ON cr.rep_id = ra.rep_id +#If roleList.toString() is '' PostgreSQL returns an error - needs to be null instead of empty + +load.folder.reports.user = AND coalesce(cr.owner_id, cr.create_id) = [userID] + +load.folder.reports.publicsql = AND (coalesce(cr.owner_id, cr.create_id) = [userID] OR cr.public_yn = 'Y' OR ra.read_only_yn IS NOT NULL) + +load.quick.download.links = SELECT a.file_name, b.title,to_char(a.dwnld_start_time, 'Dy DD-Mon-YYYY HH24:MI:SS') as time, a.dwnld_start_time FROM cr_report_dwnld_log a, cr_report b where a.user_id = [userID] and a.rep_id = b.rep_id and (a.dwnld_start_time) >= to_date(to_char(now()- interval '1 day', 'mm/dd/yyyy'), 'mm/dd/yyyy') and a.record_ready_time is not null order by a.dwnld_start_time + +load.reports.to.schedule = SELECT cr.rep_id, Initcap(cr.title), cr.descr FROM cr_report cr LEFT OUTER JOIN (SELECT rep_id, MIN(read_only_yn) read_only_yn FROM ((SELECT ua.rep_id, ua.read_only_yn FROM cr_report_access ua WHERE ua.user_id = [userID]) UNION ALL (SELECT ra.rep_id, ra.read_only_yn FROM cr_report_access ra WHERE ra.role_id IN ([roleList.toString()]))) report_access GROUP BY rep_id) ra ON cr.rep_id = ra.rep_id AND (cr.public_yn = 'Y' OR ra.read_only_yn IS NOT NULL or cr.owner_id = [userID] )ORDER BY Initcap(cr.title) + +load.reports.to.add.in.dashboard = SELECT cr.rep_id, cr.title, cr.descr FROM cr_report cr LEFT OUTER JOIN (SELECT rep_id, MIN(read_only_yn) read_only_yn FROM ((SELECT ua.rep_id, ua.read_only_yn FROM cr_report_access ua WHERE ua.user_id = [userID]) UNION ALL (SELECT ra.rep_id, ra.read_only_yn FROM cr_report_access ra WHERE ra.role_id IN ([roleList.toString()]))) report_access GROUP BY rep_id) ra ON cr.rep_id = ra.rep_id AND (coalesce(cr.owner_id, cr.create_id) = [userID] OR cr.public_yn = 'Y' OR ra.read_only_yn IS NOT NULL) AND (cr.dashboard_yn = 'N' or cr.dashboard_yn is null) ORDER BY cr.title + +load.my.recent.links = select rep_id, title, descr, form_fields from ( select row_number() OVER () AS rnum, rep_id, title, descr, form_fields from (select cr.rep_id, cr.title, a.form_fields, cr.descr, a.log_time, a.user_id, a.action, a.action_value from cr_report_log a, cr_report cr where user_id = [userID] AND action = 'Report Execution Time' and a.rep_id = cr.rep_id order by log_time desc) AS x) AS y where rnum <= 6 AND rnum >= 1 + +create.report.log.entry = INSERT INTO cr_report_log (rep_id, log_time, user_id, action, action_value, form_fields) VALUES([reportID], now(), [userID], '[action]' , '[executionTime]', '[form_fields]') + +create.report.log.entry.exec.time = INSERT INTO cr_report_log (rep_id, log_time, user_id, action, action_value, form_fields) VALUES([reportID], now()+'1 second', [userID], '[action]' , '[executionTime]', '[formFields]') + +clear.report.log.entries = DELETE FROM cr_report_log WHERE rep_id = ? and user_id = ? + +load.report.log.entries = SELECT x.log_time, x.user_id, (CASE WHEN x.action = 'Report Execution Time' THEN '<a href=\"[AppUtils.getRaptorActionURL()]report.run.container&c_master='||x.rep_id||'&'||x.form_fields||'&fromReportLog=Y&display_content=Y&noFormFields=Y&refresh=Y\">'||x.action||'</a>' ELSE x.action END) action, (CASE WHEN x.action = 'Report Execution Time' THEN action_value ELSE 'N/A' END) time_taken, (CASE WHEN x.action = 'Report Execution Time' THEN '<a href=\"[AppUtils.getRaptorActionURL()]report.run.container&c_master='||x.rep_id||'&'||x.form_fields||'&fromReportLog=Y&display_content=Y&noFormFields=Y&refresh=Y\"><img src=\"[AppUtils.getImgFolderURL()]test_run.gif\" width=\"12\" height=\"12\" border=0 alt=\"Run report\"/></a>' ELSE 'N/A' END) run_image, x.name FROM (SELECT rl.rep_id, TO_CHAR(rl.log_time, 'Month DD, YYYY HH:MI:SS AM') log_time, rl.action_value, fuser.last_name ||', '||fuser.first_name name, rl.user_id, rl.action, rl.form_fields FROM cr_report_log rl, fn_user fuser WHERE rl.rep_id = [nvls(reportId)] and rl.action != 'Report Run' and fuser.user_id = rl.user_id ORDER BY rl.log_time DESC) x WHERE LIMIT 100 + +does.user.can.schedule.report = select crs.sched_user_id, count(*) from cr_report_schedule crs where sched_user_id = [userId] group by crs.sched_user_id having count(*) >= [Globals.getScheduleLimit()] + +does.user.can.schedule = select crs.schedule_id from cr_report_schedule crs where schedule_id = [scheduleId] + +get.system.date.time = select to_char(now(),'MM/dd/yyyy HH24:mi:ss') + +get.next.day.date.time = select to_char(now()+'1 day','MM/dd/yyyy HH24:mi:ss') + +get.next.fifteen.minutes.date.time = select to_char(now()+'15 min','MM/dd/yyyy HH24:mi:ss') + +get.next.thirty.minutes.date.time = select to_char(now()+'30 min','MM/dd/yyyy HH24:mi:ss') + +get.template.file = select template_file from cr_report_template_map where report_id = [reportId] + +load.pdf.img.lookup = select image_id, image_loc from cr_raptor_pdf_img + +load.action.img.lookup = select image_id, image_loc from cr_raptor_action_img + + +#ActionHandler.java + +report.values.map.def.a = SELECT x FROM (SELECT DISTINCT + +report.values.map.def.b = TO_CHAR([colName], '[nvl(displayFormat, AppConstants.DEFAULT_DATE_FORMAT)]') + +report.values.map.def.c = [colName] + +report.values.map.def.d = x FROM [rdef.getTableById(tableId).getTableName()] WHERE [colName] IS NOT NULL ORDER BY 1) xx LIMIT <= [Globals.getDefaultPageSize()] + +test.sched.cond.popup = SELECT 1 WHERE EXISTS ([sql]) + +download.all.email.sent = Select user_id, rep_id from CR_REPORT_EMAIL_SENT_LOG where gen_key='[pdfAttachmentKey.trim()]' and log_id =[report_email_sent_log_id.trim()] and (now() - sent_date) < '1 day' limit 1 + +download.all.gen.key = select schedule_id from cr_report_email_sent_log u where U.GEN_KEY = '[pdfAttachmentKey]' + +download.all.retrieve = SELECT au.user_id FROM (SELECT rs.schedule_id, rs.rep_id FROM cr_report_schedule rs WHERE rs.enabled_yn='Y' AND rs.run_date IS NOT NULL AND rs.schedule_id = [scheduleId]) x, cr_report r, app_user au WHERE x.rep_id = r.rep_id AND au.user_id IN (SELECT rsu.user_id FROM cr_report_schedule_users rsu WHERE rsu.schedule_id = x.schedule_id and rsu.schedule_id = [scheduleId] UNION SELECT ur.user_id FROM fn_user_role ur WHERE ur.role_id IN (SELECT rsu2.role_id FROM cr_report_schedule_users rsu2 WHERE rsu2.schedule_id = x.schedule_id and rsu2.schedule_id = [scheduleId])) + +download.all.insert = insert into cr_report_dwnld_log (user_id,rep_id,file_name,dwnld_start_time,filter_params) values (?,?,?,?,?) + +#ReportWrapper.java + +report.wrapper.format = SELECT coalesce(cr.owner_id, cr.create_id) owner_id, cr.create_id, TO_CHAR(cr.create_date, '[Globals.getOracleTimeFormat()]') create_date, maint_id, TO_CHAR(cr.maint_date, '[Globals.getOracleTimeFormat()]') update_date, cr.menu_id, cr.menu_approved_yn FROM cr_report cr WHERE cr.rep_id= [reportID] + +generate.subset.sql = SELECT [colNames.toString()] FROM (SELECT row_number() OVER () AS rnum, [colNames.toString()] FROM ([reportSQL]) AS x ) AS y + +report.sql.only.first.part = SELECT row_number() OVER () AS rnum, [colNames.toString()] FROM (SELECT row_number() OVER () AS rnum, [colNames.toString()] FROM ( + +report.sql.only.second.part.a = WHERE rnum <= [endRow] + +report.sql.only.second.part.b = AND rnum >= [startRow] ORDER BY rnum + +report.sql.only.second.part.b.noorderby = AND rnum >= [startRow] + +generate.sql.visual.select = SELECT + +generate.sql.visual.count = COUNT(*) cnt + +generate.sql.visual.dual = +#No DUAL table in PostgreSQL so this is blank + +#ReportRuntime.java + +load.crosstab.report.data = SELECT row_number() OVER () AS rnum, [colNames.toString()] FROM ( [reportSQL] + +#RaptorRunHandler.java + +generate.sql.handler = SELECT row_number() OVER () AS rnum, x.* from ([sql]) AS x LIMIT 2 + +generate.sql.select = SELECT [colNames.toString()] FROM (SELECT row_number() OVER () AS rnum, [colNames.toString()] FROM ([sql]) AS y) AS x + +#ReportSchedule.java + +load.schedule.data = SELECT rs.enabled_yn, TO_CHAR(rs.start_date, 'MM/DD/YYYY') start_date, TO_CHAR(rs.end_date, 'MM/DD/YYYY') end_date, TO_CHAR(rs.run_date, 'MM/DD/YYYY') run_date, coalesce(TO_CHAR(rs.run_date, 'HH'), '12') run_hour, coalesce(TO_CHAR(rs.run_date, 'MI'), '00') run_min, coalesce(TO_CHAR(rs.run_date, 'AM'), 'AM') run_ampm, rs.recurrence, rs.conditional_yn, rs.notify_type, rs.max_row, rs.initial_formfields, rs.schedule_id, coalesce(TO_CHAR(rs.end_date, 'HH'), '11') end_hour, coalesce(TO_CHAR(rs.end_date, 'MI'), '45') end_min, coalesce(TO_CHAR(rs.end_date, 'AM'), 'PM') end_ampm, encrypt_yn, attachment_yn FROM cr_report_schedule rs WHERE rs.rep_id = [reportID] + +load.schedule.getid = SELECT rsu.user_id, fuser.last_name||', '||fuser.first_name, fuser.login_id FROM cr_report_schedule_users rsu, fn_user fuser WHERE rsu.rep_id = [reportID] AND rsu.schedule_id = [getScheduleID()] and rsu.user_id IS NOT NULL and rsu.user_id = fuser.user_id + +load.schedule.users = SELECT rsu.role_id FROM cr_report_schedule_users rsu WHERE rsu.rep_id = [reportID] AND rsu.schedule_id = [getScheduleID()] AND rsu.role_id IS NOT NULL + +new.schedule.data = SELECT nextval('SEQ_CR_REPORT_SCHEDULE') AS sequence + +execute.update = DELETE FROM cr_report_schedule_users WHERE rep_id = [reportID] and schedule_id = [getScheduleID()] + +execute.update.users = INSERT INTO cr_report_schedule_users (schedule_id, rep_id, user_id, role_id, order_no) VALUES([getScheduleID()], [reportID], [emailToUsers.get(i)).getId()], NULL, [(i + 1)]) + +execute.update.roles = INSERT INTO cr_report_schedule_users (schedule_id, rep_id, user_id, role_id, order_no) VALUES([getScheduleID()], [reportID], NULL, [emailToRoles.get(i)).getId()], [((emailToUsers.size() + i + 1)]) + +execute.update.activity = INSERT into cr_schedule_activity_log (schedule_id, notes, run_time) values ([getScheduleID()],'Submitted:Schedule',TO_DATE('[getRunDate()] [getRunHour()]:[getRunMin()] [getRunAMPM()]', 'MM/DD/YYYY HH:MI AM')) + +delete.schedule.data = SELECT 1 FROM cr_report_schedule WHERE rep_id = [reportID] and sched_user_id = [getScheduleUserID()] and schedule_id = [getScheduleID()] + +delete.schedule.data.users = DELETE FROM cr_report_schedule_users WHERE rep_id = [reportID] and schedule_id = [getScheduleID()] + +delete.schedule.data.id = DELETE FROM cr_report_schedule where rep_id = [reportID] and sched_user_id = [getScheduleUserID()] and schedule_id = [getScheduleID()] + +load.cond.sql = SELECT condition_large_sql FROM cr_report_schedule WHERE schedule_id=?::int + +load.cond.sql.select = SELECT condition_sql FROM cr_report_schedule WHERE schedule_id = [scheduleId] + +persist.cond.sql.update = update cr_report_schedule set condition_large_sql = '' where schedule_id = [scheduleId] +#EMPTY CLOB() changed to '' + +persist.cond.sql.large = SELECT condition_large_sql FROM cr_report_schedule cr WHERE schedule_id=? FOR UPDATE + +persist.cond.sql.set = update cr_report_schedule set condition_sql = ? where schedule_id = [scheduleId] + +#DataCache.java + +get.data.view.actions = SELECT ts.web_view_action FROM cr_table_source ts WHERE ts.web_view_action IS NOT NULL + +get.public.report.id.names = SELECT rep_id, title FROM cr_report WHERE public_yn = 'Y' ORDER BY title + +get.private.accessible.names.a = SELECT cr.rep_id, cr.title FROM cr_report cr WHERE cr.rep_id not in (select rep_id from cr_report_access cra where user_id = '[user_id]' + +get.private.accessible.names.if = OR role_id in ( + +get.private.accessible.names.b = ) AND public_yn = 'N' and cr.owner_id = '[user_id]' order by 2 + +get.group.accessible.names.a = SELECT cr.rep_id, cr.title FROM cr_report cr WHERE cr.rep_id in (select rep_id from cr_report_access cra where user_id = '[user_id]' + +get.group.accessible.names.b = ) AND public_yn = 'N' order by 2 + +get.report.table.sources.a = SELECT table_name, display_name, pk_fields, web_view_action, large_data_source_yn, filter_sql FROM cr_table_source + +get.report.table.sources.where = where SOURCE_DB= '[dBInfo]' + +get.report.table.sources.if = where SOURCE_DB is null or SOURCE_DB = '[AppConstants.DB_LOCAL]' + +get.report.table.sources.else = ORDER BY table_name + +grab.report.table.a = SELECT ts.table_name, ts.display_name, ts.pk_fields, ts.web_view_action, ts.large_data_source_yn, ts.filter_sql FROM cr_table_source ts WHERE + +grab.report.table.if = ts.SOURCE_DB= '[dBInfo]' + +grab.report.table.else = (ts.SOURCE_DB is null or ts.SOURCE_DB = '[AppConstants.DB_LOCAL]') + +grab.report.table.b = except SELECT ts.table_name, ts.display_name, ts.pk_fields, ts.web_view_action, ts.large_data_source_yn, ts.filter_sql from cr_table_source ts where table_name in (select table_name from cr_table_role where role_id not IN [sb.toString()]) and + +grab.report.table.c = ORDER BY 1 + +get.report.table.crjoin = SELECT src_table_name, dest_table_name, join_expr FROM cr_table_join + +get.report.table.joins = SELECT tj.src_table_name, tj.dest_table_name, tj.join_expr FROM cr_table_join tj WHERE ((EXISTS (SELECT 1 FROM cr_table_role trs WHERE trs.table_name=tj.src_table_name AND trs.role_id IN [sb.toString()])) OR (NOT EXISTS (SELECT 1 FROM cr_table_role trs WHERE trs.table_name=tj.src_table_name))) AND ((EXISTS (SELECT 1 FROM cr_table_role trd WHERE trd.table_name=tj.dest_table_name AND trd.role_id IN [sb.toString()])) OR (NOT EXISTS (SELECT 1 FROM cr_table_role trd WHERE trd.table_name=tj.dest_table_name))) + +generate.report.table.col = SELECT a.table_name, a.column_name, a.data_type, a.label FROM user_column_def a WHERE a.table_name = '[tableName.toUpperCase()]' ORDER BY a.column_id + +generate.db.user.sql.a = SELECT utc.table_name, utc.column_name, utc.data_type, + +generate.db.user.sql.if = utc.column_name FROM user_tab_columns utc + +generate.db.user.sql.else = coalesce(x.label, utc.column_name) FROM user_tab_columns utc + +generate.db.user.sql.b = WHERE utc.table_name = '[tableName.toUpperCase()]' + +generate.db.user.sql.c = AND utc.table_name = x.table_name AND utc.column_name = x.column_name + +generate.db.user.sql.d = ORDER BY utc.column_id + +#SearchHandler.java + +load.report.search.result = SELECT cr.rep_id, cr.rep_id report_id, [rep_title_sql] || CASE WHEN cr.public_yn = 'Y' THEN '' ELSE '[PRIVATE_ICON]' END || cr.title ||'</a>' title, cr.descr, au.first_name||' '||au.last_name owner_name, TO_CHAR(cr.create_date, 'MM/DD/YYYY') create_date, CASE WHEN coalesce(cr.owner_id, cr.create_id) = [userID] THEN 'N' ELSE coalesce(ra.read_only_yn, 'Y') END read_only_yn, CASE WHEN coalesce(cr.owner_id, cr.create_id) = [userID] THEN 'Y' ELSE 'N' END user_is_owner_yn, case when report_xml like '%<allowSchedule>N</allowSchedule>%' then 'N' when report_xml like '%<allowSchedule>Y</allowSchedule>%' or 1 = (select distinct 1 from cr_report_schedule where rep_id = cr.rep_id) then 'Y' else 'N' end FROM cr_report cr JOIN fn_user au ON coalesce (cr.owner_id, cr.create_id) = au.user_id AND TO_CHAR(cr.rep_id, 'FM99999999') like coalesce('%[fReportID]%', TO_CHAR(cr.rep_id, 'FM99999999')) AND UPPER(cr.title) LIKE UPPER('%[fReportName]%') LEFT JOIN(SELECT rep_id, MIN(read_only_yn) read_only_yn FROM ((SELECT ua.rep_id, ua.read_only_yn FROM cr_report_access ua WHERE ua.user_id = [userID]) UNION ALL (SELECT ra.rep_id, ra.read_only_yn FROM cr_report_access ra WHERE ra.role_id IN ([roleList.toString()]))) report_access GROUP BY rep_id) ra ON ra.rep_id = cr.rep_id + +load.report.search.instr = WHERE cr.menu_id LIKE '%[menuId]%' + +load.report.search.result.user = WHERE coalesce(cr.owner_id, cr.create_id) = [userID] + +load.report.search.result.public = WHERE (coalesce(cr.owner_id, cr.create_id) = [userID] OR cr.public_yn = 'Y' OR ra.read_only_yn IS NOT NULL) + +load.report.search.result.fav = WHERE cr.rep_id in (select rep_id from cr_favorite_reports where user_id = [userID] + +load.report.search.result.sort = ORDER BY CASE coalesce(cr.owner_id, cr.create_id) WHEN [userID] THEN ' ' WHEN 'upper(au.first_name||' '||au.last_name)' ELSE 'upper(cr.title)' END + +load.folder.report.result = SELECT cr.rep_id, cr.rep_id report_id, [rep_title_sql] || CASE WHEN cr.public_yn = 'Y' THEN '' ELSE '[PRIVATE_ICON]' END || cr.title || '</a>' title, cr.descr, au.first_name||' '||au.last_name owner_name, TO_CHAR(cr.create_date, 'MM/DD/YYYY') create_date, CASE WHEN coalesce(cr.owner_id, cr.create_id) = [userID] THEN 'N' ELSE coalesce(ra.read_only_yn, 'Y') END read_only_yn, CASE WHEN coalesce(cr.owner_id, cr.create_id) = [userID] THEN 'Y' ELSE 'N' END user_is_owner_yn FROM cr_report cr JOIN fn_user au ON coalesce (cr.owner_id, cr.create_id) = au.user_id AND TO_CHAR(cr.rep_id, 'FM99999999') like coalesce('%[fReportID]%', TO_CHAR(cr.rep_id, 'FM99999999')) AND UPPER(cr.title) LIKE UPPER('%[fReportName]%') LEFT JOIN(SELECT rep_id, MIN(read_only_yn) read_only_yn FROM ((SELECT ua.rep_id, ua.read_only_yn FROM cr_report_access ua WHERE ua.user_id = [userID]) UNION ALL (SELECT ra.rep_id, ra.read_only_yn FROM cr_report_access ra WHERE ra.role_id IN ([roleList.toString()]))) report_access GROUP BY rep_id) ra ON ra.rep_id = cr.rep_id + +load.folder.report.result.sort = ORDER BY CASE coalesce(cr.owner_id, cr.create_id) WHEN [userID] THEN ' ' WHEN '(au.first_name||' '||au.last_name)' ELSE 'cr.title' END + +#WizardProcessor.java + +process.filter.add.edit = '[argValue]' + +#ReportDefinition.java + +persist.report.adhoc = SELECT nextval('[Globals.getAdhocReportSequence()]') AS sequence + +#Globals.java + +initialize.roles = SELECT 1 WHERE EXISTS (SELECT 1 FROM cr_table_role) + +initialize.version = SELECT cr_raptor.get_version + +# scheduler + + +scheduler.available.schedules = SELECT x.rep_id, x.schedule_id, x.conditional_yn, x.condition_large_sql, x.notify_type, x.max_row, x.initial_formfields, x.processed_formfields, r.title, x.user_id FROM ( SELECT rs.rep_id, rs.schedule_id, rs.sched_user_id user_id, rs.conditional_yn, rs.condition_large_sql, rs.notify_type, rs.max_row, rs.initial_formfields, rs.processed_formfields FROM cr_report_schedule rs WHERE rs.enabled_yn='Y' AND rs.start_date <= [currentDate] AND (rs.end_date >= [currentDate] or rs.end_date is null ) AND rs.run_date IS NOT NULL ) x, cr_report r WHERE x.rep_id = r.rep_id + +random.string = select ( 'Z' || round(random() * 1000000000000)) + + +scheduler.user.emails = SELECT au.user_id FROM (SELECT rs.schedule_id, rs.rep_id FROM cr_report_schedule rs WHERE rs.enabled_yn='Y' AND rs.start_date <= now() AND rs.end_date >= now() AND rs.run_date IS NOT NULL AND rs.schedule_id = [p_schedule_id] ) x, cr_report r, fn_user au WHERE x.rep_id = r.rep_id AND au.user_id IN (SELECT rsu.user_id FROM cr_report_schedule_users rsu WHERE rsu.schedule_id = x.schedule_id and rsu.schedule_id = [p_schedule_id] UNION SELECT ur.user_id FROM fn_user_role ur WHERE ur.role_id IN (SELECT rsu2.role_id FROM cr_report_schedule_users rsu2 WHERE rsu2.schedule_id = x.schedule_id and rsu2.schedule_id = [p_schedule_id])) + + +# my logins + +app.query = SELECT APP_ID, ML_APP_NAME, MOTS_ID from fn_app where ((enabled = 'Y' and open = 'N') or app_id = 1 ) + +user.log.query = SELECT DISTINCT IFNULL(ORG_USER_ID, '') CUID, '' AWID, CONCAT('"',IFNULL(ORG_USER_ID, ''),'"') APPLICATIONUSERID, CONCAT('"',IFNULL(FIRST_NAME, ''),'"') FIRST_NAME, CONCAT('"',substr(IFNULL(MIDDLE_NAME, ''), 0, 1),'"') MIDDLE_INITIAL, CONCAT('"',IFNULL(LAST_NAME, ''),'"') LAST_NAME, IFNULL(DATE_FORMAT(LAST_LOGIN_DATE, '%Y/%m/%d'), '') LAST_LOGON_DATE, DATE_FORMAT(CREATED_DATE, '%Y/%m/%d') ACCOUNT_ACTIVATION_DATE, IFNULL(DATE_FORMAT(MODIFIED_DATE, '%Y/%m/%d'), '') LAST_DATE_ACCOUNT_MODIFIED, '' LAST_PASSWORD_CHANGE_DATE, CONCAT('"',IFNULL(FIRST_NAME, ''),' ',IFNULL(MIDDLE_NAME, ''),' ',IFNULL(LAST_NAME, ''),'"') FULL_USER_NAME, '' NT_ID, IFNULL(EMAIL, '') EMAIL FROM FN_USER FU, FN_USER_ROLE FUR, FN_ROLE FR WHERE FU.USER_ID = FUR.USER_ID and FUR.ROLE_ID = FR.ROLE_ID and ((FUR.APP_ID = 1 and FUR.APP_ID = ? and FR.ROLE_NAME <> 'Standard User') or (FUR.APP_ID = ? and FUR.APP_ID <> 1)) and FU.ACTIVE_YN = 'Y' and FU.org_user_id is not null order by 1 + +profile.log.query = SELECT DISTINCT CONCAT('"' , ROLE_NAME , '"') PROFILE_NAME, '""' SECURITY_SETTINGS FROM FN_ROLE FR, FN_USER_ROLE FUR WHERE FUR.ROLE_ID = FR.ROLE_ID and FR.ACTIVE_YN = 'Y' and ((FUR.APP_ID = 1 and FUR.APP_ID = ? and FR.ROLE_NAME <> 'Standard User') or (FUR.APP_ID = ? and FUR.APP_ID <> 1)) ORDER BY 1 + +user.profile.log.query = SELECT DISTINCT IFNULL(ORG_USER_ID, '') CUID, '' AWID, CONCAT('"' , IFNULL(ORG_USER_ID, '') , '"') APPLICATIONUSERID , CONCAT('"' , ROLE_NAME , '"') PROFILE_NAME FROM FN_USER A, FN_USER_ROLE B, FN_ROLE C WHERE A.USER_ID = B.USER_ID AND B.ROLE_ID = C.ROLE_ID AND A.ACTIVE_YN = 'Y' AND C.ACTIVE_YN = 'Y' AND a.ORG_USER_ID is not null AND ((B.APP_ID = 1 and B.APP_ID = ? and C.ROLE_NAME <> 'Standard User') or (B.APP_ID = ? and B.APP_ID <> 1)) ORDER BY 1 + +all.accounts.log.query = SELECT DISTINCT IFNULL(ORG_USER_ID, '') CUID, (case when A.ACTIVE_YN='Y' then 'ACTIVE' else 'INACTIVE' end) ACTIVE_YN, CONCAT('"' , IFNULL(ORG_USER_ID, '') , '"') APPLICATIONUSERID , IFNULL(DATE_FORMAT(LAST_LOGIN_DATE, '%Y/%m/%d'), '') LAST_LOGON_DATE, '' LAST_PASSWORD_CHANGE_DATE, CONCAT('"' , ROLE_NAME , '"') PROFILE_NAME FROM FN_USER A, FN_USER_ROLE B, FN_ROLE C WHERE A.USER_ID = B.USER_ID AND B.ROLE_ID = C.ROLE_ID AND a.ORG_USER_ID is not null AND ((B.APP_ID = 1 and B.APP_ID = ? and C.ROLE_NAME <> 'Standard User') or (B.APP_ID = ? and B.APP_ID <> 1)) ORDER BY 1 + +# basic sql + +seq.next.val = SELECT nextval('[sequenceName]') AS id + +current.date = now() + +nvl = IFNULL diff --git a/ecomp-portal-BE-os/src/main/webapp/WEB-INF/conf/system.properties b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/conf/system.properties new file mode 100644 index 00000000..8c682649 --- /dev/null +++ b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/conf/system.properties @@ -0,0 +1,118 @@ +### +# ================================================================================ +# eCOMP Portal +# ================================================================================ +# 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. +# ================================================================================ +### + +db.driver = com.mysql.jdbc.Driver +db.connectionURL = jdbc:mysql://localhost:3306/ecomp_portal +db.userName = XXXX +db.password = XXXX +# is the db.password property encrypted? +db.encrypt_flag = false + +db.hib.dialect = org.hibernate.dialect.MySQLDialect +db.min_pool_size = 5 +db.max_pool_size = 10 +hb.dialect = org.hibernate.dialect.MySQLDialect +hb.show_sql = false +hb.db_reconnect = true +hb.idle_connection_test_period = 3600 + +app_display_name = app_display_name +files_path = /demeter/WebApps/dev/ECOMP_APP/files +context_root = ECOMPPORTAL +# menu settings +menu_query_name = menuData +menu_properties_file_location = /WEB-INF/fusion/menu/ +application_menu_set_name = APP +application_menu_attribute_name = applicationMenuData +application_menu_properties_name = menu.properties +business_direct_menu_set_name = BD +business_direct_menu_properties_name = bd.menu.properties +business_direct_menu_attribute_name = businessDirectMenuData + +application_user_id = 30000 +post_default_role_id = 1 + +#Enable Fusion Mobile capabilities for the application +mobile_enable = false + +cache_config_file_path = /WEB-INF/conf/cache.ccf +cache_switch = 1 +cache_load_on_startup = false + +user_name = fullName +decryption_key = AGLDdG4D04BKm2lxlWEr8o== + + +#Cron Schedules +cron_site_name = one +log_cron = 0 * * * * ? * +sessiontimeout_feed_cron = 0 0/5 * * * ? * + +#Front end URL +frontend_url = http://localhost:9000/ecompportal/applicationsHome + +#cookie domain PLEASE DO NOT REMOVE THIS VALUE FOR OPEN SOUCE REFACTOR +cookie_domain = openecomp.org + +# An Unique 128-bit value defined to identify a specific version of +# ECOMP Portal deployed on a specific virtual machine. +# This value must be generated and updated at the time of +# the deployment. +# Online Unique UUID generator - https://www.uuidgenerator.net/ +instance_uuid = 90bc9497-10e6-49fe-916b-dcdfaa972383 + +ecomp_shared_context_rest_url= http://todo_enter_be_hostname:9000/ecompportal/context + +ecomp_shared_context_rest_url= http://todo_enter_share_context_rest_hostname:9000/ecompportal/context +elastic_search_url = http://todo_enter_elastic_search_hostname:9200 +contact_us_link = http://todo_enter_contact_us_hostname +user_guide_link = http://todo_enter_user_guide_link + +# Contact Us page properties +ush_ticket_url = http://todo_enter_ush_ticket_url +feedback_email_address = portal@lists.openecomp.org +portal_info_url = https://todo_enter_portal_info_url + +#Online user bar refresh interval, in seconds +online_user_update_rate = 5 + +#Online user bar refresh total duration, in seconds +online_user_update_duration = 900 + +# User notification refresh interval and duration, in seconds +notification_update_rate = 90 +notification_update_duration = 900 + +#Microservices Related Properties for Portal +microservices.widget.username = widget_user +microservices.widget.password = KpuqIB08YHg+btG+pjX+sA== +#This property won't be needed after consul is functional on VMs - +microservices.widget.local.port = 8082 + +#delete auditlog from number of days ago +auditlog_del_day_from = 365 + + +#authenticate user server +authenticate_user_server=http://todo_enter_auth_server_hostname:8383/openid-connect-server-webapp/allUsers + +#window width threshold to collapse left/right menu when page onload +window_width_threshold_left_menu = 1400 +window_width_threshold_right_menu = 1350
\ No newline at end of file diff --git a/ecomp-portal-BE-os/src/main/webapp/WEB-INF/defs/definitions.xml b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/defs/definitions.xml new file mode 100644 index 00000000..603e1144 --- /dev/null +++ b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/defs/definitions.xml @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + ================================================================================ + eCOMP Portal + ================================================================================ + 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. + ================================================================================ + --> + +<!DOCTYPE tiles-definitions PUBLIC + "-//Apache Software Foundation//DTD Tiles Configuration 3.0//EN" + "http://tiles.apache.org/dtds/tiles-config_3_0.dtd"> +<tiles-definitions> + + <definition extends="ebz_template" name="leafletMap"> + <put-attribute name="body" value="/WEB-INF/jsp/leafletMap.jsp"></put-attribute> + </definition> + + <definition extends="ebz_template" name="callflow"> + <put-attribute name="body" value="/WEB-INF/fusion/jsp/sequence/details.jsp"></put-attribute> + </definition> + + + <definition name="net_map_int" template="/WEB-INF/jsp/net_map.jsp"/> + +</tiles-definitions> diff --git a/ecomp-portal-BE-os/src/main/webapp/WEB-INF/fusion/conf/fusion.properties b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/fusion/conf/fusion.properties new file mode 100644 index 00000000..c39588b5 --- /dev/null +++ b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/fusion/conf/fusion.properties @@ -0,0 +1,83 @@ +#os +### +# ================================================================================ +# eCOMP Portal +# ================================================================================ +# 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. +# ================================================================================ +### +# domain settings +#domain_class_location = + +# validator settings +#default_error_message = Default error message + +login_url_no_ret_val = http://localhost:9000/ecompportal/login.htm + +user_attribute_name = user + +# User Session settings +#user_attribute_name = user +roles_attribute_name = roles +role_functions_attribute_name = role_functions +#client_device_attribute_name = client_device +#client_device_emulation = false +#client_device_type_to_emulate = + +# menu settings +menu_query_name = menuData +#menu_properties_file_location = /WEB-INF/fusion/menu/ +application_menu_set_name = APP +application_menu_attribute_name = applicationMenuData +#application_menu_properties_name = menu.properties +business_direct_menu_set_name = BD +#business_direct_menu_properties_name = bd.menu.properties +business_direct_menu_attribute_name = businessDirectMenuData + +# RAPTOR config settings +#raptor_config_file_path = /WEB-INF/conf/ + +# ECOMP settings +ecomp_app_id = 1 +# Role settings +sys_admin_role_id = 1 +account_admin_role_id = 999 +restricted_app_role_id = 900 +#sys_admin_role_function_delete_from_ui = true + +# Profile Search settings +#profile_search_report_id=181 +#callable_profile_search_report_id=386 + + +# Home Page index html + +home_page = /index.html + +authentication_mechanism = DBAUTH + +login.error.hrid.empty = Login failed, please contact system administrator. +login.error.hrid.not-found = User not found, please contact system administrator. +login.error.user.inactive = Account is disabled, please contact system administrator. + +# +# Number of seconds to poll health (database operational, etc.) +# +health_poll_interval_seconds = 5 +# +# If a component is down a log entry will be written that triggers an alert. This parameter specifies how often this alert should be triggered +# if the component remains down. For example a value of 30, would translate to 30 * 60 seconds = 1800 seconds, or every 30 minutes +# +health_fail_alert_every_x_intervals = 30 diff --git a/ecomp-portal-BE-os/src/main/webapp/WEB-INF/fusion/defs/definitions.xml b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/fusion/defs/definitions.xml new file mode 100644 index 00000000..f11b39a0 --- /dev/null +++ b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/fusion/defs/definitions.xml @@ -0,0 +1,120 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + ================================================================================ + eCOMP Portal + ================================================================================ + 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. + ================================================================================ + --> + +<!DOCTYPE tiles-definitions PUBLIC + "-//Apache Software Foundation//DTD Tiles Configuration 3.0//EN" + "http://tiles.apache.org/dtds/tiles-config_3_0.dtd"> +<tiles-definitions> + + <definition name="ebz_template" template="/WEB-INF/fusion/jsp/ebz_template.jsp"> + <put-attribute name="title" value=""></put-attribute> + <put-attribute name="header" value="/WEB-INF/fusion/jsp/ebz/ebz_header.jsp"></put-attribute> + <put-attribute name="body" value=""></put-attribute> + <put-attribute name="footer" value="/WEB-INF/fusion/jsp/ebz/ebz_footer.jsp"></put-attribute> + </definition> + + <definition name="ebz_template_noheader_nofooter" template="/WEB-INF/fusion/jsp/ebz_template_noheader_nofooter.jsp"> + <put-attribute name="body" value=""></put-attribute> + </definition> + + <definition extends="ebz_template" name="user_profile"> + <put-attribute name="body" value="/WEB-INF/jsp/user_profile.jsp"></put-attribute> + </definition> + + <definition extends="ebz_template" name="profile_search"> + <put-attribute name="body" value="/WEB-INF/fusion/jsp/profile_search.jsp"></put-attribute> + <put-attribute name="viewName" value="profile_search"></put-attribute> + </definition> + + <definition extends="ebz_template" name="profile"> + <put-attribute name="body" value="/WEB-INF/fusion/jsp/profile.jsp"></put-attribute> + <put-attribute name="viewName" value="profile"></put-attribute> + </definition> + + <definition extends="ebz_template" name="menu"> + <put-attribute name="body" value="/WEB-INF/jsp/menu.jsp"></put-attribute> + <put-attribute name="viewName" value="menu"></put-attribute> + </definition> + + + <definition extends="ebz_template" name="welcome"> + <put-attribute name="body" value="/WEB-INF/jsp/welcome.jsp"></put-attribute> + <put-attribute name="viewName" value="welcome"></put-attribute> + </definition> + + <definition extends="ebz_template" name="openIdLogin"> + <put-attribute name="body" value="/WEB-INF/jsp/oid-login.jsp"></put-attribute> + <put-attribute name="viewName" value="openIdLogin"></put-attribute> + </definition> + + + <definition extends="ebz_template" name="role_list"> + <put-attribute name="body" value="/WEB-INF/fusion/jsp/role_list.jsp"></put-attribute> + <put-attribute name="viewName" value="role_list"></put-attribute> + </definition> + + <definition extends="ebz_template" name="role"> + <put-attribute name="body" value="/WEB-INF/fusion/jsp/role.jsp"></put-attribute> + <put-attribute name="viewName" value="role"></put-attribute> + </definition> + + <definition extends="ebz_template" name="role_function_list"> + <put-attribute name="body" value="/WEB-INF/fusion/jsp/role_function_list.jsp"></put-attribute> + <put-attribute name="viewName" value="role_function_list"></put-attribute> + </definition> + + <definition extends="ebz_template" name="post_search"> + <put-attribute name="body" value="/WEB-INF/fusion/jsp/post_search.jsp"></put-attribute> + <put-attribute name="viewName" value="post_search"></put-attribute> + </definition> + + <definition extends="ebz_template" name="error"> + <put-attribute name="body" value="/WEB-INF/jsp/error.jsp"></put-attribute> + <put-attribute name="viewName" value="error"></put-attribute> + </definition> + + <definition extends="ebz_template" name="report_search"> + <put-attribute name="body" value="/WEB-INF/fusion/raptor/report_search.jsp"></put-attribute> + <put-attribute name="viewName" value="report_search"></put-attribute> + </definition> + + <definition extends="ebz_template" name="collaborate_list"> + <put-attribute name="body" value="/WEB-INF/fusion/jsp/collaborateList.jsp"></put-attribute> + </definition> + + <definition extends="ebz_template" name="jcs_admin"> + <put-attribute name="body" value="/WEB-INF/fusion/jsp/jcs_admin.jsp"></put-attribute> + <put-attribute name="viewName" value="jcs_admin"></put-attribute> + </definition> + + <definition extends="ebz_template" name="usage_list"> + <put-attribute name="body" value="/WEB-INF/fusion/jsp/usage_list.jsp"></put-attribute> + <put-attribute name="viewName" value="usage_list"></put-attribute> + </definition> + <!-- + <definition extends="ebz_template_noheader_nofooter" name="collaboration"> + <put-attribute name="body" value="/WEB-INF/fusion/jsp/webrtc/collaboration.jsp"></put-attribute> + </definition> + --> + <definition name="collaboration" template="/WEB-INF/fusion/jsp/webrtc/collaboration.jsp"/> + + +</tiles-definitions> diff --git a/ecomp-portal-BE-os/src/main/webapp/WEB-INF/jsp/error.jsp b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/jsp/error.jsp new file mode 100644 index 00000000..c79aa89a --- /dev/null +++ b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/jsp/error.jsp @@ -0,0 +1,20 @@ +<%-- + ================================================================================ + eCOMP Portal + ================================================================================ + 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. + ================================================================================ + --%> +${errMsg} diff --git a/ecomp-portal-BE-os/src/main/webapp/WEB-INF/jsp/index.jsp b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/jsp/index.jsp new file mode 100644 index 00000000..4726ce19 --- /dev/null +++ b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/jsp/index.jsp @@ -0,0 +1,21 @@ +<%-- + ================================================================================ + eCOMP Portal + ================================================================================ + 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. + ================================================================================ + --%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<c:redirect url="/index.html"/> diff --git a/ecomp-portal-BE-os/src/main/webapp/WEB-INF/jsp/login.jsp b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/jsp/login.jsp new file mode 100644 index 00000000..7ca8531c --- /dev/null +++ b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/jsp/login.jsp @@ -0,0 +1,166 @@ +<%-- + ================================================================================ + eCOMP Portal + ================================================================================ + 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. + ================================================================================ + --%> +<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> +<%@ page import="org.openecomp.portalsdk.core.util.SystemProperties" %> +<%@ page import="org.openecomp.portalapp.portal.utils.EPSystemProperties" %> +<c:set var="title" value="Login" /> +<c:set var="isMobileEnabled" + value="<%=(SystemProperties.getProperty(SystemProperties.MOBILE_ENABLE)!= null && SystemProperties.getProperty(SystemProperties.MOBILE_ENABLE).trim().equals(\"true\"))%>" /> + +<!DOCTYPE html> +<html ng-app="abs"> + <head> + <link rel="shortcut icon" href="assets/images/1cc621d2.ecomp_logo.png"> + <title> + Login + </title> + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags --> + <link rel="stylesheet" type="text/css" href="static/fusion/css/jquery-ui.css"> + <script src="static/js/jquery-1.10.2.js" type="text/javascript"></script> + <script src= "static/ebz/angular_js/angular.js"></script> + <script src= "static/ebz/angular_js/angular-sanitize.js"></script> + <script src= "static/ebz/angular_js/app.js"></script> + <script src= "static/ebz/angular_js/gestures.js"></script> + <style> + .terms { + font-family: Verdana,Arial,Helvetica, sans-serif; + font-size: 9px; + } + .login-btn { + cursor: pointer; + background: #d97b34; + background-image: -webkit-linear-gradient(top, #d97b34, #b8632b); + background-image: -moz-linear-gradient(top, #d97b34, #b8632b); + background-image: -ms-linear-gradient(top, #d97b34, #b8632b); + background-image: -o-linear-gradient(top, #d97b34, #b8632b); + background-image: linear-gradient(to bottom, #d97b34, #b8632b); + -webkit-border-radius: 7; + -moz-border-radius: 7; + border-radius: 7px; + font-family: Arial; + color: #ffffff; + font-size: 13px; + padding: 4px 10px 4px 10px; + text-decoration: none; + } + </style> + </head> + <body style="padding-top: 15px;"> + <% + String frontUrl = SystemProperties.getProperty(EPSystemProperties.FE_URL); + %> + <div ng-controller="externalLoginController"> + <div class="centered style="-webkit-transform: translateZ(0);background:white, z-index:0;"> + <div align="center" id="errorInfo" style="display:none;float:left;font-size:12px;margin-left:5px"><span style="color:red">Invaild username or password, Please try again</span></div> + <br/> + <div align="center" style="margin-left:auto;margin-right:auto;width:40%;padding:6px;opacity:0.7;background-color:white"> + <img src="static/fusion/images/ecomp-login.jpg" height="250"/> + <br> + <label> + <label class="form-field__label">Login ID:</label> + </label> + <input type="text" class="fn-ebz-text" ng-model="loginId" style="width: 140px;height:25px;border-radius:7px;font-size:18px;padding-left:5px;" + maxlength="30" /> + <br/> + <br/> + <label > Password:</label> + <input type="password" class="span3" ng-model="password" style="width: 140px;height:25px;border-radius:7px;font-size:18px;padding-left:5px;" + maxlength="30" onkeydown="if (event.keyCode == 13) document.getElementById('loginBtn').click()"/> + <br /> + <br /> + + <a class="login-btn" id="loginBtn" ng-click="loginExternal();">LOGIN</a> + <br> + </div> + </div> + <br/><br/><br/><br/><br/><br/><br/> + </div> + </body> +<script> +app.controller("externalLoginController", function ($scope) { + // Table Data + + $scope.viewPerPage = 200; + $scope.currentPage = 2; + $scope.totalPage; + $scope.searchCategory = ""; + $scope.searchString = ""; + $scope.loginId=""; + $scope.password=""; + $scope.loginError=true; + $scope.viewPerPage = 200; + $scope.currentPage = 2; + $scope.totalPage; + $scope.searchCategory = ""; + $scope.searchString = ""; + $scope.loginId=""; + $scope.password=""; + $scope.loginUrl = ""; + + $scope.loginExternal = function() { + var postData={loginId:$scope.loginId,password:$scope.password}; + $.ajax({ + url: "open_source/login?", + type : "POST", + dataType: 'json', + contentType: 'application/json', + data: JSON.stringify(postData), + success:function (response){ + if(response.success=="success"){ + //window.location.href = 'applicationsHome'; + window.location.href= "<%=frontUrl%>" + }else{ + $("#errorInfo span").text(response); + //$("#errorInfo").text = response; + $("#errorInfo").show(); + } + }, + error:function( jqXHR, status,error ){ + $("#errorInfo").show(); + } + + }); + + }; + /** + $scope.loginExternal = function() { + + + var redirectUrl = "login_external/login"; + var form = $('<form action="' + redirectUrl + '" method="post">' + + '<input type="hidden" name="loginId" value='+$scope.loginId+' />' + + '<input type="hidden" name="password" value='+$scope.password+' />' + + '</form>'); + + $('body').append(form); + $(form).submit(); + + + }; + */ +}); +</script> + +</html> diff --git a/ecomp-portal-BE-os/src/main/webapp/WEB-INF/jsp/oid-admin.jsp b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/jsp/oid-admin.jsp new file mode 100644 index 00000000..93fd69ce --- /dev/null +++ b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/jsp/oid-admin.jsp @@ -0,0 +1,72 @@ +<%-- + ================================================================================ + eCOMP Portal + ================================================================================ + 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. + ================================================================================ + --%> +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> +<%@ taglib prefix="security" uri="http://www.springframework.org/security/tags" %> +<%@ taglib prefix="o" tagdir="/WEB-INF/tags"%> +<o:header title="Admin"/> +<o:topbar pageName="Admin"/> +<div class="container-fluid main"> + <div class="row-fluid"> + <div class="span10 offset1"> + + <h1>Hello ${ userInfo.name }</h1> + + <div> + <p>This page requires that the user be logged in with a valid account and the <code>ROLE_ADMIN</code> Spring Security authority. + If you are reading this page, <span class="text-success">you are currently logged in as an administrator</span>.</p> + + <p>The authorization provider will assign your account a set of authorities depending on how it's configured. + Your current login has the following Spring Security authorities:</p> + + <ul> + <security:authentication property="authorities" var="authorities" /> + <c:forEach items="${authorities}" var="auth"> + <li><code>${ auth }</code></li> + </c:forEach> + </ul> + + </div> + <div> + <h3>Administrators</h3> + + <p>Logged in users are assigned the <code>ROLE_USER</code> authority by default, but the following users + (identified by issuer/subject pairs) will also be given <code>ROLE_ADMIN</code>:</p> + + <table class="table table-striped table-hover span4"> + <tr> + <th>Issuer</th> + <th>Subject</th> + </tr> + <c:forEach items="${ admins }" var="admin"> + <tr> + <td>${ admin.issuer }</td> + <td>${ admin.subject }</td> + </tr> + </c:forEach> + </table> + </div> + + </div> + </div> +</div> + + +<o:footer /> diff --git a/ecomp-portal-BE-os/src/main/webapp/WEB-INF/jsp/oid-home.jsp b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/jsp/oid-home.jsp new file mode 100644 index 00000000..9fd11036 --- /dev/null +++ b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/jsp/oid-home.jsp @@ -0,0 +1,102 @@ +<%-- + ================================================================================ + eCOMP Portal + ================================================================================ + 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. + ================================================================================ + --%> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> +<%@ taglib prefix="security" uri="http://www.springframework.org/security/tags" %> +<%@ taglib prefix="o" tagdir="/WEB-INF/tags"%> +<%@ page session="false" %> +<o:header title="Home"/> +<o:topbar pageName="Home"/> +<div class="container-fluid main"> + <div class="row-fluid"> + <div class="span10 offset1"> + + <h1> + Hello world! + </h1> + + <div> + <p class="well"> + <security:authorize access="hasRole('ROLE_USER')"> + <b><span class="text-success">You are currently logged in.</span></b> + </security:authorize> + <security:authorize access="!hasRole('ROLE_USER')"> + <b><span class="text-error">You are <em>NOT</em> currently logged in.</span></b> + </security:authorize> + </p> + + <p>This example application is configured with several pages requiring different levels of access. + This page does not require the user to be logged in. Use the tabs in the navbar above to navigate to + pages with different access requirements. + </p> + + <ul> + <li><a href="user">User</a>, requires the user to be logged in with the <code>ROLE_USER</code> Spring Security authority.</li> + <li><a href="admin">Admin</a>, requires the user to be logged in with the <code>ROLE_ADMIN</code> Spring Security authority. + See below for the currently configured list of admin accounts.</li> + <security:authorize access="hasRole('ROLE_USER')"> + <li><a href="j_spring_security_logout">Logout</a>, log out directly and return to this page.</li> + </security:authorize> + <security:authorize access="!hasRole('ROLE_USER')"> + <li><a href="login">Log in</a>, log in directly and return to this page.</li> + </security:authorize> + </ul> + + + </div> + + <div> + <h3>Client Filter Configuration</h3> + + <p>This authorization filter for this client has been configured with the following components:</p> + + <ul> + <li>Issuer service: <code>${ issuerServiceClass }</code></li> + <li>Server configuration service: <code>${ serverConfigurationServiceClass }</code></li> + <li>Client configuration service: <code>${ clientConfigurationServiceClass }</code></li> + <li>Auth request options service: <code>${ authRequestOptionsServiceClass }</code></li> + <li>Auth request URI builder: <code>${ authRequestUriBuilderClass }</code></li> + </ul> + </div> + + <div> + <h3>Administrators</h3> + + <p>Logged in users are assigned the <code>ROLE_USER</code> authority by default, but the following users + (identified by issuer/subject pairs) will also be given <code>ROLE_ADMIN</code>:</p> + + <table class="table table-striped table-hover span4"> + <tr> + <th>Issuer</th> + <th>Subject</th> + </tr> + <c:forEach items="${ admins }" var="admin"> + <tr> + <td>${ admin.issuer }</td> + <td>${ admin.subject }</td> + </tr> + </c:forEach> + </table> + </div> + </div> + </div> +</div> + + +<o:footer /> diff --git a/ecomp-portal-BE-os/src/main/webapp/WEB-INF/jsp/oid-login.jsp b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/jsp/oid-login.jsp new file mode 100644 index 00000000..cf2f9bcc --- /dev/null +++ b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/jsp/oid-login.jsp @@ -0,0 +1,76 @@ +<%-- + ================================================================================ + eCOMP Portal + ================================================================================ + 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. + ================================================================================ + --%> +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> +<%@ taglib prefix="security" uri="http://www.springframework.org/security/tags" %> +<%@ taglib prefix="o" tagdir="/WEB-INF/tags"%> +<o:header title="Login"/> +<div class="container-fluid main"> + <div class="row-fluid"> + <div class="span10 offset1"> + + <h2>Welcome to ECOMP Portal OpenId Login</h2> + + <p> + Please provide the URI for your <code>OpenId Authorization Server</code>. Make sure the OpenId Connect Server is Running on the following location + </p> + + <p> + If you do not have one of your own, for a quick start up, you can clone from <a href='https://github.com/mitreid-connect/OpenID-Connect-Java-Spring-Server'>this</a> github location - It's an open source OpenID Connect Server. + </p> + + <p> + Simply clone on your local, go to sub-project directory called 'openid-connect-server-webapp' and do + + <code>mvn jetty:run</code> + + </p> + + <p> + Choose a different port using the jetty plugin inside pom.xml, if the default 8080 is already taken by your Application. + </p> + + + + <div class="well"> + <div class="row-fluid"> + + <div class="span8"> + <form action="openid_connect_login" method="get"> + <input type="text" class="input-xxlarge" name="identifier" id="identifier" value = "http://localhost:8383/openid-connect-server-webapp/" /> + <input type="submit" value="Log In" /> + </form> + </div> + </div> + </div> + </div> +</div> + +<script type="text/javascript"> + $(document).ready(function () { + $('#localhost').on('click', function() { + $('#identifier').val('http://localhost:8383/openid-connect-server-webapp/'); + }); + $('#mitreidorg').on('click', function() { + $('#identifier').val('user@mitreid.org'); + }); + + }); +</script> diff --git a/ecomp-portal-BE-os/src/main/webapp/WEB-INF/jsp/oid-user.jsp b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/jsp/oid-user.jsp new file mode 100644 index 00000000..112415b0 --- /dev/null +++ b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/jsp/oid-user.jsp @@ -0,0 +1,139 @@ +<%-- + ================================================================================ + eCOMP Portal + ================================================================================ + 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. + ================================================================================ + --%> +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> +<%@ taglib prefix="security" uri="http://www.springframework.org/security/tags" %> +<%@ taglib prefix="o" tagdir="/WEB-INF/tags"%> +<o:header title="User"/> +<o:topbar pageName="User"/> +<div class="container-fluid main"> + <div class="row-fluid"> + <div class="span10 offset1"> + + <h1>Hello ${ userInfo.name }</h1> + + <div> + <p>This page requires that the user be logged in with a valid account and the <code>ROLE_USER</code> Spring Security authority. + If you are reading this page, <span class="text-success">you are currently logged in</span>.</p> + + <security:authentication var="user" property="principal" /> + + <p>The authorization provider will create a Principal object based on the <code>iss</code> and <code>sub</code> + claims associated with your ID token. This value can be used as a globally unique username within the application + (though it's not meant to be human-readable). + Your Principal is: <code>${ user }</code></p> + + <p>The authorization provider will assign your account a set of authorities depending on how it's configured. + Your current login has the following Spring Security authorities:</p> + + <ul> + <security:authentication property="authorities" var="authorities" /> + <c:forEach items="${authorities}" var="auth"> + <li><code>${ auth }</code></li> + </c:forEach> + </ul> + + <h3>ID Token</h3> + + <p>Your ID Token has the following set of claims:</p> + + <security:authentication property="idToken" var="idToken" /> + <table class="table table-striped table-hover" id="idTokenTable"> + <thead> + <tr> + <th class="span1">Name</th> + <th class="span11">Value</th> + </tr> + </thead> + <tbody> + </tbody> + </table> + + <p>The ID Token header contains the following claims:</p> + + <table class="table table-striped table-hover" id="idTokenHeader"> + <thead> + <tr> + <th class="span1">Name</th> + <th class="span11">Value</th> + </tr> + </thead> + <tbody> + </tbody> + </table> + + <h3>User Info</h3> + + <p>The call to the User Info Endpoint returned the following set of claims:</p> + + <table class="table table-striped table-hover" id="userInfoTable"> + <thead> + <tr> + <th class="span1">Name</th> + <th class="span11">Value</th> + </tr> + </thead> + <tbody> + </tbody> + </table> + + </div> + + </div> + </div> +</div> + +<script type="text/javascript"> + $(document).ready(function () { + + var idTokenString = "${ idToken.serialize() }"; + var idToken = jwt.WebTokenParser.parse(idTokenString); + var idHeader = JSON.parse(jwt.base64urldecode(idToken.headerSegment)); + var idClaims = JSON.parse(jwt.base64urldecode(idToken.payloadSegment)); + + _.each(idClaims, function(val, key, list) { + if (_.contains(["iat", "exp", "auth_time", "nbf"], key)) { + // it's a date field, parse and print it + var date = new Date(val * 1000); + $('#idTokenTable tbody').append('<tr><td>' + _.escape(key) + '</td><td><span title="' + _.escape(val) + '">' + date + '</span></td></tr>'); + } else { + $('#idTokenTable tbody').append('<tr><td>' + _.escape(key) + '</td><td>' + _.escape(val) + '</td></tr>'); + } + }); + + _.each(idHeader, function(val, key, list) { + if (_.contains(["iat", "exp", "auth_time", "nbf"], key)) { + // it's a date field, parse and print it + var date = new Date(val * 1000); + $('#idTokenHeader tbody').append('<tr><td>' + _.escape(key) + '</td><td><span title="' + _.escape(val) + '">' + date + '</span></td></tr>'); + } else { + $('#idTokenHeader tbody').append('<tr><td>' + _.escape(key) + '</td><td>' + _.escape(val) + '</td></tr>'); + } + }); + + var userInfo = ${ userInfoJson }; + _.each(userInfo, function(val, key, list) { + $('#userInfoTable tbody').append('<tr><td>' + _.escape(key) + '</td><td>' + _.escape(val) + '</td></tr>'); + }); + }); + +</script> + +<o:footer /> diff --git a/ecomp-portal-BE-os/src/main/webapp/WEB-INF/jsp/welcome.jsp b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/jsp/welcome.jsp new file mode 100644 index 00000000..054c38fe --- /dev/null +++ b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/jsp/welcome.jsp @@ -0,0 +1,695 @@ +<%-- + ================================================================================ + eCOMP Portal + ================================================================================ + 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. + ================================================================================ + --%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> + +<link rel="stylesheet" type="text/css" href="static/fusion/sample/css/slider.css"> +<link rel="stylesheet" type="text/css" href="static/fusion/sample/css/scribble.css" /> +<link rel="stylesheet" type="text/css" href="static/fusion/sample/css/spacegallery.css" /> +<link rel="stylesheet" href="static/fusion/css/att_angular_gridster/ui-gridster.css"/> +<link rel="stylesheet" href="static/fusion/css/att_angular_gridster/sandbox-gridster.css"/> + +<script src= "static/ebz/angular_js/angular.js"></script> +<script src= "static/ebz/angular_js/angular-sanitize.js"></script> + +<script src= "static/ebz/angular_js/app.js"></script> +<script src= "static/ebz/angular_js/gestures.js"></script> + +<script src="static/js/jquery-1.10.2.js"></script> +<!-- <script src="static/fusion/js/jquery.resize.js"></script> --> +<script src="static/fusion/js/att_angular_gridster/ui-gridster-tpls.js"></script> +<script src="static/fusion/js/att_angular_gridster/angular-gridster.js"></script> + +<script src= "static/ebz/angular_js/checklist-model.js"></script> +<script src= "static/js/modalService.js"></script> +<script src="static/js/jquery.mask.min.js" type="text/javascript"></script> +<script src="static/js/jquery-ui.js" type="text/javascript"></script> +<script src="static/ebz/sandbox/att-abs-tpls.js" type="text/javascript"></script> +<script src="static/ebz/sandbox/att-abs-tpls.min.js" type="text/javascript"></script> +<style> +.button--small, [class*=bg-] .button--small { + font-size: 14px; + }; +</style> + +<style> +.gridster-item-container .gridster-item-body{ +bottom:0px; +} +.gridster-item-container{ +min-height:50px; +} +.att-accordion { + border-width: 0px; +} +</style> + +<style> + #myGallery { + width: 100%; + height: 400px; + } + + #myGallery img { + border: 2px solid #52697E; + } + + a.loading { + background: #fff url(../images/ajax_small.gif) no-repeat center; + } + + .center { + margin-left: auto; + margin-right: auto; + } + +</style> + +<script type="text/javascript" src="static/fusion/sample/js/FusionCharts.js"></script> <!-- Charts --> +<script type="text/javascript" src="static/fusion/sample/js/charts.js"></script> <!-- Charts --> + +<script type="text/javascript" src="static/fusion/sample/js/slides.min.jquery.js"></script> <!-- Image Slider --> +<script type="text/javascript" src="static/fusion/sample/js/scribble.js"></script> <!-- Scribble --> +<script type="text/javascript" src="static/fusion/sample/js/eye.js"></script> <!-- Space Gallery --> +<script type="text/javascript" src="static/fusion/sample/js/utils.js"></script> <!-- Space Gallery --> +<script type="text/javascript" src="static/fusion/sample/js/spacegallery.js"></script> <!-- Space Gallery --> + + <!-- Carousel rendering --> + <script> + (function($){ + var initLayout = function() { + $('#myGallery').spacegallery({loadingClass: 'loading'}); + }; + + EYE.register(initLayout, 'init'); + })(jQuery) + </script> + + <!-- Slider rendering --> + <script> + $(function(){ + $('#slides').slides({ + preload: true, + preloadImage: 'static/fusion/sample/images/loading.gif', + play: 5000, + pause: 10000, + hoverPause: true, + animationStart: function(current){ + $('.caption').animate({ + bottom:-35 + },100); + if (window.console && console.log) { + // example return of current slide number + //console.log('animationStart on slide: ', current); + }; + }, + animationComplete: function(current){ + $('.caption').animate({ + bottom:0 + },200); + if (window.console && console.log) { + // example return of current slide number + //console.log('animationComplete on slide: ', current); + }; + }, + slidesLoaded: function() { + $('.caption').animate({ + bottom:0 + },200); + } + }); + }); + + + </script> + +<div ng-controller="welcomeController"> + <fmt:message key="general.home" var="title" /> + <div> + <span style="font-weight:bold;font-size:11pt;">Welcome ${sessionScope.user.firstName} ${sessionScope.user.lastName}</span> + (Last Login: <fmt:formatDate value="${sessionScope.user.lastLoginDate}" type="date" pattern="dd MMM yyyy hh:mma zzz" var="lastLogin" /> ${lastLogin}) + </div> + + <div style="float:left; width:320px; height:320px; margin:10px 27px 10px 27px;color:#222222;text-shadow: 1px 1px 2px #A0A0A0;" > + <p style="font-weight:bold;font-size:16pt;color:#0046B8;">Network </p> + <p style="font-weight:bold;font-size:16pt;color:#0046B8;">Visualization </p> + + </div> + + <!-- Spacer required to center the Image slider (can also be used for content) --> + <div style="float:right; width:120px; height:320px; margin:10px 27px 10px 10px;color:#222222;text-shadow: 1px 1px 2px #A0A0A0;"> + <p style="font-weight:bold;font-size:9pt;"> + You can toggle between the Image Slider and Carousel controls by clicking on the respective radio button below: + </p> + <input type="radio" name="viewer" onClick="$('#example').show();$('#myGallery').hide();" value="Slider" />Slider<br/> + <input type="radio" name="viewer" onClick="$('#example').hide();$('#myGallery').show();" value="Carousel" />Carousel + + <br/> + </div> + + <div id="container"> + + <div style="position:relative"> + <div id="myGallery" class="spacegallery" style="position:static"> + <img src="static/fusion/sample/images/carousel/slide_b_drive_test_map.png" alt="Drive test analytics" /> + <img src="static/fusion/sample/images/carousel/slide_b_ios_throughput.png" alt="MTSA - Nationwide DL throughput for iOS devices over cellular network" /> + <img src="static/fusion/sample/images/carousel/slide_b_eppt_county.png" alt="Location based services county level drive test" /> + <img src="static/fusion/sample/images/carousel/slide_b_lata_map.png" alt="Network demand data by LATA (2020 forecast)" /> + <img src="static/fusion/sample/images/carousel/slide_b_eppt_regression.png" alt="Linear regression prediction of LBS/E911 drive test accuracy" /> + <img src="static/fusion/sample/images/carousel/slide_b_nova_sdn_map.png" alt="SDN Simulator - SNRC Traffic" /> + <span style="float:right; color:#222222;">(Click on Image to Rotate)</span> + </div> + </div> + <div id="example"> + <div id="slides"> + <div class="slides_container"> + <div class="slide"> + <a href="#" title="Drive test analytics"><img src="static/fusion/sample/images/carousel/slide_b_drive_test_map.png" width="570" height="270" alt="Drive test analytics"></a> + <div class="caption"> + <p>Drive test analytics</p> + </div> + </div> + <div class="slide"> + <a href="doclib.htm" title="MTSA - Nationwide DL throughput for iOS devices over cellular network"><img src="static/fusion/sample/images/carousel/slide_b_ios_throughput.png" width="570" height="270" alt="MTSA - Nationwide DL throughput for iOS devices over cellular network"></a> + <div class="caption"> + <p>Nationwide DL throughput for iOS devices over cellular network</p> + </div> + </div> + <div class="slide"> + <a href="#" title="Network demand data by LATA (2020 forecast)"><img src="static/fusion/sample/images/carousel/slide_b_lata_map.png" width="570" height="270" alt="Network demand data by LATA (2020 forecast)"></a> + <div class="caption"> + <p>Network demand data by LATA (2020 forecast)</p> + </div> + </div> + <div class="slide"> + <a href="#" title="Location based services county level drive test"><img src="static/fusion/sample/images/carousel/slide_b_eppt_county.png" width="570" height="270" alt="Location based services county level drive test"></a> + <div class="caption"> + <p>Location based services county level drive test</p> + </div> + </div> + <div class="slide"> + <a href="broadcast_list.htm" title="SDN Simulator - SNRC Traffic"><img src="static/fusion/sample/images/carousel/slide_b_nova_sdn_map.png" width="570" height="270" alt="SDN Simulator - SNRC Traffic"></a> + <div class="caption"> + <p>SDN Simulator - SNRC Traffic</p> + </div> + </div> + <div class="slide"> + <a href="#" title="Linear regression prediction of LBS/E911 drive test accuracy"><img src="static/fusion/sample/images/carousel/slide_b_eppt_regression.png" width="570" height="270" alt="Linear regression prediction of LBS/E911 drive test accuracy"></a> + <div class="caption" style="bottom:0"> + <p>Linear regression prediction of LBS/E911 drive test accuracy</p> + </div> + </div> + </div> + <a href="#" class="prev"><img src="static/fusion/sample/images/arrow-prev.png" width="24" height="43" alt="Arrow Prev"></a> + <a href="#" class="next"><img src="static/fusion/sample/images/arrow-next.png" width="24" height="43" alt="Arrow Next"></a> + </div> + <img src="static/fusion/sample/images/example-frame.png" width="739" height="341" alt="Example Frame" id="frame"> + </div> + </div> + + <center> + <div class="gridster-container"> + <div att-gridster att-gridster-options='gridsterOpts'> + <div att-gridster-item='item' ng-repeat="item in standardItems"> + <div att-gridster-item-header + header-text={{item.headerText}} + sub-header-text={{item.subHeaderText}}> + <!--ICON BUTTONS PLACEHOLDER START--> + <div class="tileMinMaxBtn" ng-click="toggleMinMax($index,'')"> + <span class="tileMinMaxIcon"> + <i class="icon-chevron-up" style="color:gray" ng-show="item.max"></i> + <i class="icon-chevron-down" style="color:gray" ng-hide="item.max"></i> + </span> + </div> + <!--ICON BUTTONS PLACEHOLDER END--> + </div> + <div att-gridster-item-body > + <!--ACTUAL BODY CONTENT START--> + <div align="center" style="margin-top:10px;"> + <div align="left" ng-if="item.headerText=='Dashboard' && item.max"> + <label> Sample Charts</label><BR> + <iframe scrolling="no" frameBorder="0" style="width: 430px; height: 360px;" src="static/fusion/sample/html/wordcloud.html"></iframe> + </div> + <div ng-if="item.headerText=='Donut Chart' && item.max"> + <iframe scrolling="no" frameBorder="0" style="width: 310px; height: 210px;" src="static/fusion/sample/html/donut_d3.html"></iframe> + </div> + <div ng-if="item.headerText=='Area Chart' && item.max"> + <iframe scrolling="no" frameBorder="0" style="width: 310px; height: 210px;" src="static/fusion/sample/html/area_chart.html"></iframe> + </div> + <div ng-if="item.headerText=='Pie Chart' && item.max"> + <iframe scrolling="no" frameBorder="0" style="width: 310px; height: 210px;" src="static/fusion/sample/html/pie_chart.html"></iframe> + </div> + <div ng-if="item.headerText=='Line Chart' && item.max"> + <iframe scrolling="no" frameBorder="0" style="width: 310px; height: 210px;" src="static/fusion/sample/html/line_chart.html"></iframe> + </div> + <div ng-if="item.headerText=='Gauges' && item.max"> + <iframe scrolling="no" frameBorder="0" style="width: 310pxx; height: 210px;" src="static/fusion/sample/html/d3_gauges_demo.html"></iframe> + </div> + + <div align="left" ng-if="item.headerText=='Traffic distribution by day of week' && item.max"> + <att-tabs title="gTabs" class="tabs" > + <floating-tabs ng-model='activeTabId' size="small"></floating-tabs> + </att-Tabs> + <div> + <div id="Monday" align="left"><img src="static/fusion/sample/images/tunnels/1_mon.png" width=100% height=100% alt="Monday"></div> + <div id="Tuesday" class="hidden" align="center"><img src="static/fusion/sample/images/tunnels/2_tue.png" width=100% height=100% alt="Tuesday"></div> + <div id="Wednesday" class="hidden" align="center"><img src="static/fusion/sample/images/tunnels/3_wed.png" width=100% height=100% alt="Wednesday"></div> + <div id="Thursday" class="hidden" align="center"><img src="static/fusion/sample/images/tunnels/4_thu.png" width=100% height=100% alt="Thursday"></div> + <div id="Friday" class="hidden" align="center"><img src="static/fusion/sample/images/tunnels/5_fri.png" width=100% height=100% alt="Friday"></div> + <div id="Saturday" class="hidden" align="center"><img src="static/fusion/sample/images/tunnels/6_sat.png" width=100% height=100% alt="Saturday"></div> + <div id="Sunday" class="hidden" align="center"><img src="static/fusion/sample/images/tunnels/7_sun.png" width=100% height=100% alt="Sunday"></div> + </div> + </div> + <div align="left" ng-if="item.headerText=='Busy hour traffic analysis by day of week' && item.max"> + <att-tabs title="gTabs2"> + <floating-tabs ng-model='activeTabId2' size="small"></floating-tabs> + </att-Tabs> + <div> + <div id="Incoming" align="left"><img src="static/fusion/sample/images/tunnels/BH_DLSTX_IN.png" width=100% height=100% alt="Monday"></div> + <div id="Outgoing" class="hidden" align="center"><img src="static/fusion/sample/images/tunnels/BH_DLSTX_OUT.png" width=100% height=100% alt="Tuesday"></div> + <div id="Default" class="hidden" align="center"><img src="static/fusion/sample/images/tunnels/BH_Nat_Def.png" width=100% height=100% alt="Wednesday"></div> + <div id="Priority" class="hidden" align="center"><img src="static/fusion/sample/images/tunnels/BH_Nat_Priority.png" width=100% height=100% alt="Thursday"></div> + <div id="BHNational" class="hidden" align="center"><img src="static/fusion/sample/images/tunnels/BH_Nat.png" width=100% height=100% alt="Friday"></div> + </div> + </div> + + <div align="left" ng-if="item.headerText=='Additional Samples' && item.max"> + <label> Quick Links</label> + <table att-table > + + <tr> + <td att-table-body width="90%" ><a href="" target="_blank">Contacts</a></td> + <td att-table-body width="10%"> + <a ng-click="removeRole();" ><img src="static/fusion/sample/images/deleteicon.gif"></a> + </td> + </tr> + <tr> + <td att-table-body width="90%" ><a href="" target="_blank">Developer Program</a></td> + <td att-table-body width="10%"> + <a ng-click="removeRole();" ><img src="static/fusion/sample/images/deleteicon.gif"></a> + </td> + </tr> + <tr> + <td att-table-body width="90%" ><a href="http://www.zkoss.org" target="_blank">ZK Framework</a></td> + <td att-table-body width="10%"> + <a ng-click="removeRole();" ><img src="static/fusion/sample/images/deleteicon.gif"></a> + </td> + </tr> + <tr> + <td att-table-body width="90%" ><a href="http://jquery.com" target="_blank">JQuery</a></td> + <td att-table-body width="10%"> + <a ng-click="removeRole();" ><img src="static/fusion/sample/images/deleteicon.gif"></a> + </td> + </tr> + <tr> + <td att-table-body width="90%" ><a href="force_cluster.html" target="_blank">RNC Visualization</a></td> + <td att-table-body width="10%"> + <a ng-click="removeRole();" ><img src="static/fusion/sample/images/deleteicon.gif"></a> + </td> + </tr> + <tr> + <td att-table-body width="90%" ><a href="sample_heat_map.htm" target="">Heat Map</a></td> + <td att-table-body width="10%"> + <a ng-click="removeRole();" ><img src="static/fusion/sample/images/deleteicon.gif"></a> + </td> + </tr> + <tr> + <td att-table-body width="90%" ><a href="sample_animated_map.htm" target="">Animated Map</a></td> + <td att-table-body width="10%"> + <a ng-click="removeRole();" ><img src="static/fusion/sample/images/deleteicon.gif"></a> + </td> + </tr> + <tr> + <td att-table-body width="90%" ><a href="jbpm_drools.htm" target="_blank">Process Management</a></td> + <td att-table-body width="10%"> + <a ng-click="removeRole();" ><img src="static/fusion/sample/images/deleteicon.gif"></a> + </td> + </tr> + <tr> + <td att-table-body width="90%" ><a href="chatRoom.htm">Chat Session</a></td> + <td att-table-body width="10%"> + <a ng-click="removeRole();" ><img src="static/fusion/sample/images/deleteicon.gif"></a> + </td> + </tr> + </table> + </div> + <div ng-if="item.headerText=='Sticky Notes' && item.max"> + <div style="width:100%; height:400px" id="scribble-pad"><pre id="scribble" contenteditable="true" onkeyup="storeUserScribble(this.id);"></pre></div> + </div> + <div ng-if="item.headerText=='Service Configuration' && item.max"> + <accordion close-others="true" css="att-accordion"> + <accordion-group heading="Service Configuration" is-open="group11.open"> + <iframe scrolling="no" frameBorder="0" align="center" width="100%" height="400px" src="static/fusion/sample/org_chart/example.html" ></iframe> + </accordion-group> + <accordion-group heading="VSP Service Configuration" is-open="group12.open"> + <iframe scrolling="no" frameBorder="0" align="center" width="100%" height="400px" src="static/fusion/sample/org_chart/example_vsp.html" ></iframe> + </accordion-group> + </accordion> + </div> + + </div> + + <!--ACTUAL BODY CONTENT END--> + </div> + <!-- <div att-gridster-item-footer + att-gridster-item-footer-link={{item.footerLink}}> + {{item.footerLinkText}} + </div> --> + </div> + </div> + </div> + </center> + +</div> + +<script> +$(document).ready(function(){ + $( "#rightIcon" ).hide(); + $( "#leftIcon" ).show(); +}); +var app=angular.module("abs", ["att.abs", "modalServices","att.gridster","checklist-model"]); +app.controller('welcomeController', function ($scope, modalService, $modal) { + + $scope.gridsterOpts = { + columns: 3, // the width of the grid, in columns + pushing: true, // whether to push other items out of the way on move or resize + floating: true, // whether to automatically float items up so they stack (you can temporarily disable if you are adding unsorted items with ng-repeat) + width: 'auto', // can be an integer or 'auto'. 'auto' scales gridster to be the full width of its containing element + colWidth: 'auto', // can be an integer or 'auto'. 'auto' uses the pixel width of the element divided by 'columns' + rowHeight: 60, // can be an integer or 'match'. Match uses the colWidth, giving you square widgets. + margins: [10, 10], // the pixel distance between each widget + outerMargin: true, // whether margins apply to outer edges of the grid + swapping: true, + draggable: { + enabled: true, // whether dragging items is supported + stop: function(event, uiWidget, $element) {$scope.setCookie();} // optional callback fired when item is finished dragging + } + + }; + + /* $scope.gridsterOpts = { + columns: 6, + width: 'auto', + colWidth: '230', + rowHeight: '120', + margins: [10, 10], + outerMargin: true, + pushing: true, + floating: true, + swapping: true + }; */ + + + $scope.toggleMinMax = function(index, tileName){ + if(tileName==''){ + $scope.standardItems[index].max = !$scope.standardItems[index].max; + if($scope.standardItems[index].max) + $scope.standardItems[index].sizeY=$scope.standardItems[index].maxHeight; + else + $scope.standardItems[index].sizeY=0; + }else{ + $scope.tileTemp = $scope.$eval(tileName); + var tileMax = $parse(tileName+'.max'); + tileMax.assign($scope, !$scope.$eval(tileName).max); + var tileSizeY = $parse(tileName+'.sizeY'); + if($scope.tileTemp.max) + tileSizeY.assign($scope, $scope.tileTemp.maxHeight); + else + tileSizeY.assign($scope, 0); + } + }; + // These map directly to gridsterItem options + // IMPORTANT: Items should be placed in the grid in the order in which + // they should appear. + // In most cases the sorting should be by row ASC, col ASC + $scope.standardItems = [{ + sizeX: 1, + sizeY: 8, + maxHeight: 8, + row: 0, + col: 0, + headerText:'Dashboard', + max:false + + + }, + { + sizeX: 1, + sizeY: 5, + maxHeight: 5, + row: 0, + col: 1, + headerText:'Donut Chart', + max:false + + }, + { + sizeX: 1, + sizeY: 5, + maxHeight: 5, + row: 0, + col: 2, + headerText:'Area Chart', + max:true + }, + { + sizeX: 1, + sizeY: 5, + maxHeight: 5, + row: 8, + col: 0, + headerText:'Pie Chart', + max:false + }, + { + sizeX: 1, + sizeY: 5, + maxHeight: 5, + row: 8, + col: 1, + headerText:'Line Chart', + max:true + }, + { + sizeX: 1, + sizeY: 5, + maxHeight: 5, + row: 8, + col: 2, + headerText:'Gauges', + max:false + }, + { + sizeX: 1, + sizeY: 8, + maxHeight: 8, + row: 16, + col: 0, + headerText:'Traffic distribution by day of week', + max:false + }, + { + sizeX: 1, + sizeY: 8, + maxHeight: 8, + row: 16, + col: 1, + headerText:'Busy hour traffic analysis by day of week', + max:false + }, + { + sizeX: 1, + sizeY: 6, + maxHeight: 6, + row: 24, + col: 0, + headerText:'Additional Samples', + max:false + }, + { + sizeX: 1, + sizeY: 8, + maxHeight: 8, + row: 24, + col: 1, + headerText:'Sticky Notes', + max:false + }, + { + sizeX: 3, + sizeY: 10, + maxHeight: 10, + row: 32, + col: 0, + headerText:'Service Configuration', + max:false + }]; + + $.each($scope.standardItems, function(i, a){ + $scope.toggleMinMax(i,''); + }); + $scope.activeTabId = 'Monday'; + //for generic tabs + $scope.gTabs = [{ + title: 'Monday', + id: 'Monday', + url: '#Monday', + selected: true + },{ + title: 'Tuesday', + id: 'Tuesday', + url: '#Tuesday' + },{ + title: 'Wednesday', + id: 'Wednesday', + url: '#Wednesday' + },{ + title: 'Thursday', + id: 'Thursday', + url: '#Thursday' + },{ + title: 'Friday', + id: 'Friday', + url: '#Friday' + },{ + title: 'Saturday', + id: 'Saturday', + url: '#Saturday' + },{ + title: 'Sunday', + id: 'Sunday', + url: '#Sunday' + } + ]; + + $scope.activeTabId2 = 'Incoming'; + //for generic tabs + $scope.gTabs2 = [{ + title: 'BH SNRC DLSTX - Incoming', + id: 'Incoming', + url: '#Incoming', + selected: true + },{ + title: 'BH SNRC DLSTX - Outgoing', + id: 'Outgoing', + url: '#Outgoing' + },{ + title: 'BH National - Default', + id: 'Default', + url: '#Default' + },{ + title: 'BH National - Priority', + id: 'Priority', + url: '#Priority' + },{ + title: 'BH National', + id: 'BHNational', + url: '#BHNational' + } + ]; + + $scope.activeTabId3 = 'Incoming'; + //for generic tabs + $scope.gTabs3 = [{ + title: 'BH SNRC DLSTX - Incoming', + id: 'Incoming', + url: '#Incoming', + selected: true + },{ + title: 'BH SNRC DLSTX - Outgoing', + id: 'Outgoing', + url: '#Outgoing' + },{ + title: 'BH National - Default', + id: 'Default', + url: '#Default' + },{ + title: 'BH National - Priority', + id: 'Priority', + url: '#Priority' + },{ + title: 'BH National', + id: 'BHNational', + url: '#BHNational' + } + ]; + + /* $scope.$watch('activeTabId', function(newVal) { + alert(newval); + $('#'+newval).show(); + }, true); */ + + $scope.toggleEastToWest = function() { + $( "#toggle" ).toggle( 'slide'); + if ($("#leftIcon").is(":visible")) { + $( "#rightIcon" ).show(); + $( "#leftIcon" ).hide(); + } + else if ($("#rightIcon").is(":visible")) { + $( "#rightIcon" ).hide(); + $( "#leftIcon" ).show(); + } + }; + + $scope.group1 = { + open: true + }; + $scope.group2 = { + open: true + }; + $scope.group3 = { + open: true + }; + $scope.group4 = { + open: true + }; + $scope.group5 = { + open: true + }; + $scope.group6 = { + open: true + }; + $scope.group7 = { + open: true + }; + $scope.group71 = { + open: true + }; + $scope.group8 = { + open: true + }; + $scope.group9 = { + open: true + }; + $scope.group10 = { + open: true + }; + $scope.group11 = { + open: true + }; + $scope.group12 = { + open: false + }; +}); +</script> + + <!-- Select the Slider control by default --> + <script>$('input[name=viewer]:eq(1)').click();</script> diff --git a/ecomp-portal-BE-os/src/main/webapp/WEB-INF/oid-context.xml b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/oid-context.xml new file mode 100644 index 00000000..33458d6d --- /dev/null +++ b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/oid-context.xml @@ -0,0 +1,455 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + ================================================================================ + eCOMP Portal + ================================================================================ + 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. + ================================================================================ + --> + +<beans xmlns="http://www.springframework.org/schema/beans" + xmlns:mvc="http://www.springframework.org/schema/mvc" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:tx="http://www.springframework.org/schema/tx" + xmlns:context="http://www.springframework.org/schema/context" + xmlns:security="http://www.springframework.org/schema/security" + xmlns:oauth="http://www.springframework.org/schema/security/oauth2" + xmlns:util="http://www.springframework.org/schema/util" + xsi:schemaLocation="http://www.springframework.org/schema/security/oauth2 http://www.springframework.org/schema/security/spring-security-oauth2-2.0.xsd + http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.1.xsd + http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.2.xsd + http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.1.xsd + http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.1.xsd + http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.1.xsd + http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.1.xsd"> + + <!-- DispatcherServlet Context: defines this servlet's request-processing + infrastructure --> + + + <bean + class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> + <property name="location"> + <value>classpath:openid-connect.properties</value> + </property> + </bean> + + + <!-- Enables the Spring MVC @Controller programming model --> + <mvc:annotation-driven /> + + <mvc:interceptors> + <!-- Inject the UserInfo into the current context --> + <bean id="userInfoInterceptor" class="org.mitre.openid.connect.web.UserInfoInterceptor" /> + </mvc:interceptors> + + <!-- Handles HTTP GET requests for /resources/** by efficiently serving + up static resources in the ${webappRoot}/resources directory --> + <mvc:resources mapping="/resources/**" location="/resources/" /> + + <!-- Resolves views selected for rendering by @Controllers to .jsp resources + in the /WEB-INF/views directory --> + <bean + class="org.springframework.web.servlet.view.InternalResourceViewResolver"> + <property name="prefix" value="/WEB-INF/views/" /> + <property name="suffix" value=".jsp" /> + </bean> + + <context:component-scan base-package="org.openecomp.portalapp.security.openid.controllers" /> + + <security:global-method-security pre-post-annotations="enabled" proxy-target-class="true" authentication-manager-ref="authenticationManager"/> + + <security:http auto-config="false" use-expressions="true" disable-url-rewriting="true" entry-point-ref="authenticationEntryPoint" pattern="/**"> + <security:custom-filter before="PRE_AUTH_FILTER" ref="openIdConnectAuthenticationFilter" /> + <security:logout /> + </security:http> + + <bean id="authenticationEntryPoint" class="org.springframework.security.web.authentication.LoginUrlAuthenticationEntryPoint"> + <property name="loginFormUrl" value="/openid_connect_login" /> + </bean> + + <security:authentication-manager alias="authenticationManager"> + <security:authentication-provider ref="openIdConnectAuthenticationProvider" /> + </security:authentication-manager> + + <bean id="openIdConnectAuthenticationProvider" class="org.mitre.openid.connect.client.OIDCAuthenticationProvider"> + <property name="authoritiesMapper"> + <bean class="org.mitre.openid.connect.client.NamedAdminAuthoritiesMapper"> + <property name="admins" ref="namedAdmins" /> + </bean> + </property> + </bean> + + <util:set id="namedAdmins" value-type="org.mitre.openid.connect.client.SubjectIssuerGrantedAuthority"> + <!-- + This is an example of how to set up a user as an administrator: they'll be given ROLE_ADMIN in addition to ROLE_USER. + Note that having an administrator role on the IdP doesn't grant administrator access on this client. + + These are values from the demo "openid-connect-server-webapp" project of MITREid Connect. + --> + <bean class="org.mitre.openid.connect.client.SubjectIssuerGrantedAuthority"> + <constructor-arg name="subject" value="90342.ASDFJWFA" /> + <constructor-arg name="issuer" value="${authentication_server_url}" /> + </bean> + </util:set> + + + <!-- + - + - The authentication filter + - + --> + <bean id="openIdConnectAuthenticationFilter" class="org.mitre.openid.connect.client.OIDCAuthenticationFilter"> + <property name="authenticationManager" ref="authenticationManager" /> + + <property name="issuerService" ref="hybridIssuerService" /> + <property name="serverConfigurationService" ref="dynamicServerConfigurationService" /> + <property name="clientConfigurationService" ref="dynamicClientConfigurationService" /> + <property name="authRequestOptionsService" ref="staticAuthRequestOptionsService" /> + <property name="authRequestUrlBuilder" ref="plainAuthRequestUrlBuilder" /> + + </bean> + + + + <!-- + - + - Issuer Services: Determine which identity provider issuer is used. + - + --> + + + <!-- + Static issuer service, returns the same issuer for every request. + --> + <bean class="org.mitre.openid.connect.client.service.impl.StaticSingleIssuerService" id="staticIssuerService"> + <property name="issuer" value="${authentication_server_url}" /> + </bean> + + <!-- + WebFinger issuer service, does OpenID Connect Discovery on user-entered text (received from the + loginPageUrl page) to find the issuer. The login page needs to return the user-entered text + as the "identifier" parameter as a query parameter. + --> + <bean class="org.mitre.openid.connect.client.service.impl.WebfingerIssuerService" id="webfingerIssuerService"> + <property name="loginPageUrl" value="login" /> + </bean> + + <!-- + Third-party (account chooser) issuer service. Looks for the "iss" parameter on the request + and returns that as the issuer. If there is no "iss" value, redirects to the configured + account chooser URI. This URI should direct back to the login filter URL with an + "iss" value as a query parameter. + --> + <bean class="org.mitre.openid.connect.client.service.impl.ThirdPartyIssuerService"> + <property name="accountChooserUrl" value="http://localhost/account-chooser/" /> + </bean> + + <!-- + Hybrid issuer service. If an issuer is passed in directly with the "iss" parameter, it will use that. If not, it will + look for an "identifier" parameter to do Webfinger discovery on that. Failing that, it will redirect to the login + page URL. + --> + <bean class="org.mitre.openid.connect.client.service.impl.HybridIssuerService" id="hybridIssuerService"> + <property name="loginPageUrl" value="login" /> + <property name="forceHttps" value="false" /> <!-- this default property forces the webfinger issuer URL to be HTTPS, turn off for development work --> + </bean> + + <!-- + - + - Server configuration: determines the parameters and URLs of the server to talk to. + - + --> + + <!-- + Static server configuration, contains a map of server configuration objects keyed by the issuer URL. + --> + <bean class="org.mitre.openid.connect.client.service.impl.StaticServerConfigurationService"> + <property name="servers"> + <map> + <entry key="${authentication_server_url}"> + <bean class="org.mitre.openid.connect.config.ServerConfiguration"> + <property name="issuer" value="${authentication_server_url}" /> + <property name="authorizationEndpointUri" value="${authentication_server_url}authorize" /> + <property name="tokenEndpointUri" value="${authentication_server_url}token" /> + <property name="userInfoUri" value="${authentication_server_url}userinfo" /> + <property name="jwksUri" value="${authentication_server_url}jwk" /> + </bean> + </entry> + </map> + </property> + </bean> + + <!-- + Dynamic server configuration, fetches the server's information using OIDC Discovery. + --> + <bean class="org.mitre.openid.connect.client.service.impl.DynamicServerConfigurationService" id="dynamicServerConfigurationService" /> + + <!-- + Hybrid server configuration. Tries to look up a statically configured server in the map, does + dynamic OIDC Discovery if the static lookup fails. + --> + <bean class="org.mitre.openid.connect.client.service.impl.HybridServerConfigurationService"> + <property name="servers"> + <map> + <entry key="${authentication_server_url}"> + <bean class="org.mitre.openid.connect.config.ServerConfiguration"> + <property name="issuer" value="${authentication_server_url}" /> + <property name="authorizationEndpointUri" value="${authentication_server_url}authorize" /> + <property name="tokenEndpointUri" value="${authentication_server_url}token" /> + <property name="userInfoUri" value="${authentication_server_url}userinfo" /> + <property name="jwksUri" value="${authentication_server_url}jwk" /> + </bean> + </entry> + </map> + </property> + </bean> + + + <!-- + - + - Client Configuration: Determine which client identifier and credentials are used. + - + --> + + + <!-- + Dynamic Client Configuration, uses dynamic client registration. This version stores the registered + clients in an in-memory map. To override, add a bean to the registeredClientService property. + --> + + <bean class="org.mitre.openid.connect.client.service.impl.DynamicRegistrationClientConfigurationService" id="dynamicClientConfigurationService"> + <property name="template"> + <bean class="org.mitre.oauth2.model.RegisteredClient"> + <property name="clientName" value="ECOMP Portal OpenId Connect Client1" /> + + <property name="scope"> + <set value-type="java.lang.String"> + <value>openid</value> + <value>email</value> + <value>address</value> + <value>profile</value> + <value>phone</value> + </set> + </property> + <property name="tokenEndpointAuthMethod" value="SECRET_BASIC" /> + <property name="redirectUris"> + <set> + <value>${ecomp_openid_connect_client}</value> + </set> + </property> + </bean> + </property> + <!-- + Registered Client Service. Uncomment this to save dynamically registered clients out to a + file on disk (indicated by the filename property) or replace this with another implementation + of RegisteredClientService. This defaults to an in-memory implementation of RegisteredClientService + which will forget and re-register all clients on restart. + --> + <!-- + <property name="registeredClientService"> + <bean class="org.mitre.openid.connect.client.service.impl.JsonFileRegisteredClientService"> + <constructor-arg name="filename" value="/tmp/simple-web-app-clients.json" /> + </bean> + </property> + --> + </bean> + + <!-- + Static Client Configuration. Configures a client statically by storing configuration on a per-issuer basis. + --> + + <bean class="org.mitre.openid.connect.client.service.impl.StaticClientConfigurationService" id="staticClientConfigurationService"> + <property name="clients"> + <map> + <entry key="${authentication_server_url}"> + <bean class="org.mitre.oauth2.model.RegisteredClient"> + <property name="clientId" value="ecomp" /> + <property name="clientSecret" value="secret" /> + <property name="scope"> + <set value-type="java.lang.String"> + <value>openid</value> + <value>email</value> + <value>address</value> + <value>profile</value> + <value>phone</value> + </set> + </property> + <property name="tokenEndpointAuthMethod" value="SECRET_BASIC" /> + <property name="redirectUris"> + <set> + <value>${ecomp_openid_connect_client}</value> + </set> + </property> + </bean> + </entry> + </map> + </property> + </bean> + + <!-- + Hybrid Client Configuration. Tries to configure a client statically first, but if a client isn't found in the map, + it will dynamically configure one. + --> + <bean class="org.mitre.openid.connect.client.service.impl.HybridClientConfigurationService" id="hybridClientConfigurationService"> + <property name="clients"> + <map> + <entry key="${authentication_server_url}"> + <bean class="org.mitre.oauth2.model.RegisteredClient"> + <property name="clientId" value="client" /> + <property name="clientSecret" value="secret" /> + <property name="scope"> + <set value-type="java.lang.String"> + <value>openid</value> + <value>email</value> + <value>address</value> + <value>profile</value> + <value>phone</value> + </set> + </property> + <property name="tokenEndpointAuthMethod" value="SECRET_BASIC" /> + <property name="redirectUris"> + <set> + <value>${ecomp_openid_connect_client}</value> + </set> + </property> + + </bean> + </entry> + </map> + </property> + <property name="template"> + <bean class="org.mitre.oauth2.model.RegisteredClient"> + <property name="clientName" value="ECOMP Portal OpenId Connect Client2" /> + <property name="scope"> + <set value-type="java.lang.String"> + <value>openid</value> + <value>email</value> + <value>address</value> + <value>profile</value> + <value>phone</value> + </set> + </property> + <property name="tokenEndpointAuthMethod" value="SECRET_BASIC" /> + <property name="redirectUris"> + <set> + <value>${ecomp_openid_connect_client}</value> + </set> + </property> + </bean> + </property> + <!-- + Registered Client Service. Uncomment this to save dynamically registered clients out to a + file on disk (indicated by the filename property) or replace this with another implementation + of RegisteredClientService. This defaults to an in-memory implementation of RegisteredClientService + which will forget and re-register all clients on restart. + --> + <!-- + <property name="registeredClientService"> + <bean class="org.mitre.openid.connect.client.service.impl.JsonFileRegisteredClientService"> + <constructor-arg name="filename" value="/tmp/simple-web-app-clients.json" /> + </bean> + </property> + --> + </bean> + + + <!-- + - + - Auth request options service: returns the optional components of the request + - + --> + <bean class="org.mitre.openid.connect.client.service.impl.StaticAuthRequestOptionsService" id="staticAuthRequestOptionsService"> + <property name="options"> + <map> + <!-- Entries in this map are sent as key-value parameters to the auth request --> + <!-- + <entry key="display" value="page" /> + <entry key="max_age" value="30" /> + <entry key="prompt" value="none" /> + --> + </map> + </property> + </bean> + + <!-- + - + - Authorization URL Builders: create the URL to redirect the user to for authorization. + - + --> + + <!-- + Plain authorization request builder, puts all options as query parameters on the GET request + --> + <bean class="org.mitre.openid.connect.client.service.impl.PlainAuthRequestUrlBuilder" id="plainAuthRequestUrlBuilder" /> + + <!-- + Signed authorization request builder, puts all options as elements in a JWS-signed request object + --> + <bean class="org.mitre.openid.connect.client.service.impl.SignedAuthRequestUrlBuilder" id="signedAuthRequestUrlBuilder"> + <property name="signingAndValidationService" ref="defaultSignerService" /> + </bean> + + <!-- + Encrypted authorization request builder, puts all the options as elements in a JWE-encrypted request object + --> + <bean class="org.mitre.openid.connect.client.service.impl.EncryptedAuthRequestUrlBuilder" id="encryptedAuthRequestUrlBuilder"> + <property name="encrypterService" ref="validatorCache" /> + <property name="alg"> + <util:constant static-field="com.nimbusds.jose.JWEAlgorithm.RSA1_5"/> + </property> + <property name="enc"> + <util:constant static-field="com.nimbusds.jose.EncryptionMethod.A128GCM"/> + </property> + </bean> + + + + + <!-- + - + - Utility beans for the above classes + - + --> + + <!-- + This service fetches and caches JWK sets from URLs. + --> + + <bean id="validatorCache" class="org.mitre.jwt.signer.service.impl.JWKSetCacheService" /> + + <!-- + This service sets up a bunch of signers and validators based on our own keys. + Replace this keystore's contents for a production deployment. + --> + <bean id="defaultSignerService" class="org.mitre.jwt.signer.service.impl.DefaultJWTSigningAndValidationService"> + <constructor-arg name="keyStore"> + <bean id="defaultKeyStore" class="org.mitre.jose.keystore.JWKSetKeyStore"> + <property name="location" value="classpath:openid-keystore.jwks" /> + </bean> + </constructor-arg> + <property name="defaultSignerKeyId" value="rsa1" /> + <property name="defaultSigningAlgorithmName" value="RS256" /> + </bean> + + <!-- + This service publishes the client's public key on a the endpoint "jwk" off the root of this client. + --> + <bean id="clientKeyPublisher" class="org.mitre.openid.connect.client.keypublisher.ClientKeyPublisher"> + <property name="jwkPublishUrl" value="jwk" /> + <property name="signingAndValidationService" ref="defaultSignerService" /> + </bean> + +</beans> diff --git a/ecomp-portal-BE-os/src/main/webapp/WEB-INF/tags/copyright.tag b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/tags/copyright.tag new file mode 100644 index 00000000..f06786c6 --- /dev/null +++ b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/tags/copyright.tag @@ -0,0 +1 @@ +Powered by <a href="https://github.com/mitreid-connect/">MITREid Connect <span class="label">${project.version}</span></a> <span class="pull-right">© 2014 The MITRE Corporation and MIT KIT.</span> diff --git a/ecomp-portal-BE-os/src/main/webapp/WEB-INF/tags/footer.tag b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/tags/footer.tag new file mode 100644 index 00000000..8b47824a --- /dev/null +++ b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/tags/footer.tag @@ -0,0 +1,12 @@ +<%@ attribute name="js" required="false"%> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="o" tagdir="/WEB-INF/tags"%> +<!-- javascript +================================================== --> +<!-- Placed at the end of the document so the pages load faster --> +<script type="text/javascript" src="static/oid-connect/bootstrap2/js/bootstrap.js"></script> +<script type="text/javascript" src="static/oid-connect/js/lib/underscore.js"></script> +<script type="text/javascript" src="static/oid-connect/js/lib/jwt.js"></script> +</body> +</html> diff --git a/ecomp-portal-BE-os/src/main/webapp/WEB-INF/tags/header.tag b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/tags/header.tag new file mode 100644 index 00000000..6f8c5c3d --- /dev/null +++ b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/tags/header.tag @@ -0,0 +1,59 @@ +<%@attribute name="title" required="false"%> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ tag import="com.google.gson.Gson" %> +<!DOCTYPE html> +<html lang="en"> +<head> + + <base href="${config.issuer}"> + + <meta charset="utf-8"> + <title>Simple Web App - ${title}</title> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + <meta name="description" content=""> + <meta name="author" content=""> + + <!-- stylesheets --> + <link href="static/oid-connect/bootstrap2/css/bootstrap.css" rel="stylesheet"> + <link href="static/oid-connect/bootstrap2/css/bootstrap-responsive.css" rel="stylesheet"> + + <!-- HTML5 shim, for IE6-8 support of HTML5 elements --> + <!--[if lt IE 9]> + <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> + <![endif]--> + + <!-- Load jQuery up here so that we can use in-page functions --> + <script type="text/javascript" src="static/oid-connect/js/lib/jquery.js"></script> + <script type="text/javascript"> + // safely set the title of the application + function setPageTitle(title) { + document.title = "${config.topbarTitle} - " + title; + } + + // get the info of the current user, if available (null otherwise) + function getUserInfo() { + return ${userInfoJson}; + } + + // get the authorities of the current user, if available (null otherwise) + function getUserAuthorities() { + return ${userAuthorities}; + } + + // is the current user an admin? + // NOTE: this is just for + function isAdmin() { + var auth = getUserAuthorities(); + if (auth && _.contains(auth, "ROLE_ADMIN")) { + return true; + } else { + return false; + } + } + </script> +</head> + +<body> + +<!-- Start body -->
\ No newline at end of file diff --git a/ecomp-portal-BE-os/src/main/webapp/WEB-INF/tags/topbar.tag b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/tags/topbar.tag new file mode 100644 index 00000000..5109523a --- /dev/null +++ b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/tags/topbar.tag @@ -0,0 +1,96 @@ +<%@attribute name="pageName" required="false"%> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> +<%@ taglib prefix="security" uri="http://www.springframework.org/security/tags"%> +<%@ taglib prefix="o" tagdir="/WEB-INF/tags"%> +<c:choose> + <c:when test="${ not empty userInfo.preferredUsername }"> + <c:set var="shortName" value="${ userInfo.preferredUsername }" /> + </c:when> + <c:otherwise> + <c:set var="shortName" value="${ userInfo.sub }" /> + </c:otherwise> +</c:choose> +<c:choose> + <c:when test="${ not empty userInfo.name }"> + <c:set var="longName" value="${ userInfo.name }" /> + </c:when> + <c:otherwise> + <c:choose> + <c:when test="${ not empty userInfo.givenName || not empty userInfo.familyName }"> + <c:set var="longName" value="${ userInfo.givenName } {$ userInfo.familyName }" /> + </c:when> + <c:otherwise> + <c:set var="longName" value="${ shortName }" /> + </c:otherwise> + </c:choose> + </c:otherwise> +</c:choose> +<div class="navbar navbar-inverse"> + <div class="navbar-inner"> + <div class="container"> + <button class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </button> + <a class="brand" href="">MITREid Connect: Simple Web App</a> + <c:if test="${ not empty pageName }"> + <div class="nav-collapse collapse"> + <ul class="nav"> + <c:choose> + <c:when test="${pageName == 'Home'}"> + <li class="active"><a href="#">Home</a></li> + </c:when> + <c:otherwise> + <li><a href=".">Home</a></li> + </c:otherwise> + </c:choose> + <c:choose> + <c:when test="${pageName == 'User'}"> + <li class="active"><a href="#">User</a></li> + </c:when> + <c:otherwise> + <li><a href="user">User</a></li> + </c:otherwise> + </c:choose> + <c:choose> + <c:when test="${pageName == 'Admin'}"> + <li class="active"><a href="#">Admin</a></li> + </c:when> + <c:otherwise> + <li><a href="admin">Admin</a></li> + </c:otherwise> + </c:choose> + <c:choose> + <c:when test="${pageName == 'Logout'}"> + <li class="active"><a href="#">Logout</a></li> + </c:when> + <c:otherwise> + <li><a href="j_spring_security_logout">Logout</a></li> + </c:otherwise> + </c:choose> + + </ul> + <ul class="nav pull-right"> + <security:authorize access="hasRole('ROLE_USER')"> + <li class="dropdown"> + <a id="userButton" class="dropdown-toggle" data-toggle="dropdown" href=""><i class="icon-user icon-white"></i> ${ shortName } <span class="caret"></span></a> + <ul class="dropdown-menu pull-right"> + <li><a href="user" data-toggle="collapse" data-target=".nav-collapse">${ longName }</a></li> + <li class="divider"></li> + <li><a href="j_spring_security_logout" data-toggle="collapse" data-target=".nav-collapse"><i class="icon-remove"></i> Log out</a></li> + </ul> + </li> + </security:authorize> + <security:authorize access="!hasRole('ROLE_USER')"> + <li> + <a id="loginButton" href="login" data-toggle="collapse" data-target=".nav-collapse"><i class="icon-lock icon-white"></i> Log in</a> + </li> + </security:authorize> + </ul> + + </div><!--/.nav-collapse --> + </c:if> + </div> + </div> +</div> diff --git a/ecomp-portal-BE-os/src/main/webapp/WEB-INF/web.xml b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 00000000..8c920d12 --- /dev/null +++ b/ecomp-portal-BE-os/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,87 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + ================================================================================ + eCOMP Portal + ================================================================================ + 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. + ================================================================================ + --> + +<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4"> + <display-name>fusion</display-name> + + <!-- + <context-param> + <param-name>log4jConfigLocation</param-name> + <param-value>/WEB-INF/conf/log4j.properties</param-value> + </context-param> + + <listener> + <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class> + </listener> + --> + + <!-- The Portal app can function on a HA cluster --> + <distributable/> + + <context-param> + <param-name>contextConfigLocation</param-name> + <param-value>/WEB-INF/oid-context.xml</param-value> + </context-param> + + <listener> + <listener-class> + org.springframework.web.context.ContextLoaderListener + </listener-class> + </listener> + + + <listener> + <listener-class>org.openecomp.portalapp.portal.listener.UserSessionListener</listener-class> + </listener> + + <filter> + <filter-name>CorsFilter</filter-name> + <filter-class>org.apache.catalina.filters.CorsFilter</filter-class> + <init-param> + <param-name>cors.allowed.methods</param-name> + <param-value>GET,POST,HEAD,OPTIONS,PUT,DELETE</param-value> + </init-param> + <init-param> + <param-name>cors.allowed.headers</param-name> + <param-value>EPService,JSESSIONID,X-ECOMP-RequestID,X-Widgets-Type,Content-Type,X-Requested-With,accept,Origin,Access-Control-Request-Method,Access-Control-Request-Headers</param-value> + </init-param> + </filter> + + <filter-mapping> + <filter-name>CorsFilter</filter-name> + <url-pattern>/*</url-pattern> + </filter-mapping> + + <filter> + <filter-name>springSecurityFilterChain</filter-name> + <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class> + <!-- <init-param> + <param-name>contextAttribute</param-name> + <param-value>org.springframework.web.servlet.FrameworkServlet.CONTEXT.appServlet</param-value> + </init-param> --> + </filter> + + <filter-mapping> + <filter-name>springSecurityFilterChain</filter-name> + <url-pattern>/*</url-pattern> + </filter-mapping> + +</web-app> diff --git a/ecomp-portal-BE-os/src/main/webapp/images/cache/README.txt b/ecomp-portal-BE-os/src/main/webapp/images/cache/README.txt new file mode 100644 index 00000000..65bb14cc --- /dev/null +++ b/ecomp-portal-BE-os/src/main/webapp/images/cache/README.txt @@ -0,0 +1 @@ +image cache
\ No newline at end of file diff --git a/ecomp-portal-BE-os/src/main/webapp/index.jsp b/ecomp-portal-BE-os/src/main/webapp/index.jsp new file mode 100644 index 00000000..2811bb4b --- /dev/null +++ b/ecomp-portal-BE-os/src/main/webapp/index.jsp @@ -0,0 +1,41 @@ +<%--
+ ================================================================================
+ ECOMP Portal
+ ================================================================================
+ 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.
+ ================================================================================
+ --%>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
+
+<%-- Redirected because we can't set the welcome page to a virtual URL. --%>
+<%-- <c:redirect url="/login.htm"/>
+ --%>
+ <html>
+ <head>
+ <title>ecompportal-BE index.jsp</title>
+ </head>
+ <body>
+ <h2>ECOMP Portal Core</h2>
+ This is the ecompportal-BE application, page index.jsp.
+
+ <%
+
+ response.sendRedirect("welcome.htm");
+
+ %>
+
+ </body>
+ </html>
+
|