From 91d04c64771832a0b8815ffbe1f0f9920320d94d Mon Sep 17 00:00:00 2001 From: Pamela Dragosh Date: Tue, 14 Feb 2017 19:41:00 -0500 Subject: Initial OpenECOMP policy/engine commit Change-Id: I7dbff37733b661643dd4d1caefa3d7dccc361b6e Signed-off-by: Pamela Dragosh --- .../WEB-INF/fusion/raptor/wizard_columns_edit.jsp | 1127 ++++++++++++++++++++ 1 file changed, 1127 insertions(+) create mode 100644 ecomp-sdk-app/src/main/webapp/WEB-INF/fusion/raptor/wizard_columns_edit.jsp (limited to 'ecomp-sdk-app/src/main/webapp/WEB-INF/fusion/raptor/wizard_columns_edit.jsp') diff --git a/ecomp-sdk-app/src/main/webapp/WEB-INF/fusion/raptor/wizard_columns_edit.jsp b/ecomp-sdk-app/src/main/webapp/WEB-INF/fusion/raptor/wizard_columns_edit.jsp new file mode 100644 index 000000000..cc6b68b08 --- /dev/null +++ b/ecomp-sdk-app/src/main/webapp/WEB-INF/fusion/raptor/wizard_columns_edit.jsp @@ -0,0 +1,1127 @@ +<%-- + ================================================================================ + eCOMP Portal SDK + ================================================================================ + Copyright (C) 2017 AT&T Intellectual Property + ================================================================================ + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ================================================================================ + --%> +<%@page import="java.util.Map"%> +<%@page import="java.util.HashMap"%> +<%@page import="org.openecomp.portalsdk.analytics.model.ReportLoader"%> +<%@ page import="org.openecomp.portalsdk.analytics.xmlobj.DataColumnType" %> +<%@ page import="org.openecomp.portalsdk.analytics.util.AppConstants" %> +<%@ page import="org.openecomp.portalsdk.analytics.model.definition.ReportDefinition" %> +<%@ page import="org.openecomp.portalsdk.analytics.system.AppUtils" %> +<%@ page import="org.openecomp.portalsdk.analytics.controller.WizardSequence" %> +<%@ page import="java.util.Vector" %> +<%@ page import="java.util.List" %> +<%@ page import="org.openecomp.portalsdk.analytics.model.DataCache" %> +<%@ page import="java.util.Iterator" %> +<%@ page import="org.openecomp.portalsdk.analytics.xmlobj.DataSourceType" %> +<%@ page import="org.openecomp.portalsdk.analytics.model.definition.DBColumnInfo" %> +<%@ page import="org.openecomp.portalsdk.analytics.model.definition.TableSource" %> +<%@ page import="org.openecomp.portalsdk.analytics.model.base.IdNameValue" %> +<%@ page import="org.openecomp.portalsdk.analytics.xmlobj.SemaphoreType" %> +<%@ page import="org.openecomp.portalsdk.analytics.xmlobj.FormFieldType" %> +<% + ReportDefinition rdef = (ReportDefinition) request.getAttribute(AppConstants.SI_REPORT_DEFINITION); + WizardSequence ws = rdef.getWizardSequence(); + String curSubStep = ws.getCurrentSubStep(); + boolean isCrossTab = rdef.getReportType().equals(AppConstants.RT_CROSSTAB); + boolean isSQLBased = rdef.getReportDefType().equals(AppConstants.RD_SQL_BASED); + String dbInfo = null; + dbInfo = rdef.getDBInfo(); + boolean isEdit = curSubStep.equals(AppConstants.WSS_EDIT) || curSubStep.equals(AppConstants.WA_MODIFY); + DataColumnType currColumn = null; + if(isEdit) + currColumn = rdef.getColumnById(AppUtils.getRequestNvlValue(request, AppConstants.RI_DETAIL_ID)); + Vector reportTableSources = DataCache.getReportTableSources((String) session.getAttribute("remoteDB")); + + List reportCols = rdef.getAllColumns(); + + HashMap actionImgMap = ReportLoader.loadActionImgLookUp(); + + String[] numberFormats = { "9999999990", "9,999,999,990", "9999999990.99", "9,999,999,990.99", "$9,999,999,990.99", "$9,999,999,990.999" }; + String[] dateFormats = { "MM/DD/YYYY", "MM/YYYY", "DD-MON-YYYY", "Month DD, YYYY", "Month, YYYY", "MM/DD/YYYY HH24:MI:SS", "YYYY" }; + String[] charFormats = { "N/A" }; + + String dispName = ""; + String dbColType = ""; + String colType = ""; + if(isEdit) { + dbColType = currColumn.getDbColType(); + colType = currColumn.getColType(); + } + + String dependsOnFormField = currColumn.getDependsOnFormField(); + %> + + + + + + + +<% if(isSQLBased) { %> + + + + + + + +<% } // if(! isSQLBased) +%> +<% if(isCrossTab) { %> + + + + +<% } %> +<% if(! isSQLBased) { %> + + + + +<% } // if(! isSQLBased) +%> + +<% if(isSQLBased) { %> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<% } %> + + + + +<% if(! isSQLBased) { %> + + + + +<% } // if(! isSQLBased) +%> + +<% if (false) { %> + + + + + <% } %> + <% System.out.println("WidthInPxls " + currColumn.getDisplayWidthInPxls()); %> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <% if(! isCrossTab) { %> + + + + + <% if(! isSQLBased) { %> + + + + + <% } %> + <% } %> + + <% if(! isSQLBased) { %> +<% +boolean isOtherExpr = isEdit&&currColumn.isCalculated()&& + (! nvl(currColumn.getColName()).startsWith("SUM( "))&& + (! nvl(currColumn.getColName()).startsWith("MAX( "))&& + (! nvl(currColumn.getColName()).startsWith("MIN( "))&& + (! nvl(currColumn.getColName()).startsWith("COUNT(*)"))&& + (! nvl(currColumn.getColName()).startsWith("COUNT(ALL "))&& + (! nvl(currColumn.getColName()).startsWith("COUNT(DISTINCT "))&& + (! nvl(currColumn.getColName()).startsWith("AVG(ALL "))&& + (! nvl(currColumn.getColName()).startsWith("AVG(DISTINCT "))&& + (! nvl(currColumn.getColName()).startsWith("STDDEV(ALL "))&& + (! nvl(currColumn.getColName()).startsWith("STDDEV(DISTINCT "))&& + (! nvl(currColumn.getColName()).startsWith("VARIANCE(ALL "))&& + (! nvl(currColumn.getColName()).startsWith("VARIANCE(DISTINCT ")); +%> + + + + + + + + +<% } // if(! isSQLBased) +%> +<%-- if(! isCrossTab) { --%> + + + + + + <% String curSemId = ""; + if(isEdit) + curSemId = nvl(currColumn.getSemaphoreId()); %> + + + + +<%-- } --%> + +<% boolean canHaveTotal = false; + if(isSQLBased) { + //canHaveTotal = (! isCrossTab); + canHaveTotal = (!isCrossTab)||(isEdit&&nvl(currColumn.getCrossTabValue()).equals(AppConstants.CV_VALUE)); + } else { + if(isCrossTab) + canHaveTotal = (isEdit&&nvl(currColumn.getCrossTabValue()).equals(AppConstants.CV_VALUE)); + else + canHaveTotal = colType.equals(AppConstants.CT_NUMBER); + } + + String colTotalRow = ""; + String colTotal = isEdit?nvl(currColumn.getDisplayTotal()):""; + if(isCrossTab&&colTotal.indexOf('|')>=0) { + colTotalRow = colTotal.substring(colTotal.indexOf('|')+1); + colTotal = colTotal.substring(0, colTotal.indexOf('|')); + } %> + + + + +<% if(isCrossTab) { %> + + + + +<% } // if(isCrossTab) +%> +<% if(isSQLBased) { %> + + + + +<% } %> +
Step <%= ws.getCurrentStepIndex() %> of <%= ws.getStepCount() %> - Report <%= ws.getCurrentStep() %> - <%= curSubStep %>
Column ID: + <%= currColumn.getColId() %> +
Depends on formfield: + ">
Column Usage in Cross-Tab: +
Table Column: + <% if(isEdit) { %> + <%= nvl(rdef.getColumnLabel(currColumn), currColumn.getDbColName()) /*currColumn.getColName()*/ %> + <% } else { %> + + <% } %> + + +
Datatype: + + +
Group By Pos: + + +
Custom Text for Sub-Total: + + "/> + + +
Hide Repeated Values : + > + +
Multi group Column Level: + + +
Multi group Column Range : + Colspan : + + + "/> + + +
+ + + + + + <% if(!isCrossTab) { %> + + + + + <%} %> + +
Dataformat: + + +
Enhanced Pagination: + /> + +
+
+ + + + + + + + + + + + + + +
URL: + "/> + +
Anchor: + + +
+
Display Name: +
Display Format: + +
Display Width: + <% if (currColumn.getDisplayWidth()<=0) { currColumn.setDisplayWidth(10); } %> +
Display Width (In Pxls): + 0)? + (!(AppUtils.getRequestNvlValue(request, "widthInPxls").equals(currColumn.getDisplayWidthInPxls()))? + AppUtils.getRequestNvlValue(request, "widthInPxls"):currColumn.getDisplayWidthInPxls()): + currColumn.getDisplayWidthInPxls() %>"> + +
No Wrap ? +
Indent Parameter to display value + + +
Display Alignment: +
Display (Header) Alignment: +
Sortable? +
Visible? +
Group By? +
Expression: +
Expression Other: + onFocus="if(document.forma.exprFormula.options[document.forma.exprFormula.selectedIndex].value!='_exprText_') blur();"> + Define custom values mapping  + Form Fields +
Drill-down Link: + "> + "> + "> + "> + "> + + Set new parameters configuration +    + Import advanced formatting from selected report +
Advanced Display Formatting: + + + Define advanced formatting +
Total for <%= isCrossTab?"each":"the" %> column: +
Total for each row +
  + > + Do not attempt to parse values as date
+
+ + + +<%! + private String nvl(String s) { return (s==null)?"":s; } + private String nvl(String s, String sDefault) { return nvl(s).equals("")?sDefault:s; } + private String getRequestParam(String s) { + if(nvl(s).equals("")) return s; + else { + String requestParam=""; + int pos = 0; + int iCnt = 0; + while(s.indexOf("#",pos)!=-1) { + iCnt++; + if(iCnt>1) requestParam += "|"; + pos = s.indexOf("#",pos)+1; + requestParam += s.substring(s.indexOf("#")+1,s.indexOf("]",pos)); + } + return requestParam; + } + + } +%> -- cgit 1.2.3-korg