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/popup_table_cols.jsp | 171 +++++++++++++++++++++ 1 file changed, 171 insertions(+) create mode 100644 ecomp-sdk-app/src/main/webapp/WEB-INF/fusion/raptor/popup_table_cols.jsp (limited to 'ecomp-sdk-app/src/main/webapp/WEB-INF/fusion/raptor/popup_table_cols.jsp') diff --git a/ecomp-sdk-app/src/main/webapp/WEB-INF/fusion/raptor/popup_table_cols.jsp b/ecomp-sdk-app/src/main/webapp/WEB-INF/fusion/raptor/popup_table_cols.jsp new file mode 100644 index 000000000..9dec6a53a --- /dev/null +++ b/ecomp-sdk-app/src/main/webapp/WEB-INF/fusion/raptor/popup_table_cols.jsp @@ -0,0 +1,171 @@ +<%-- + ================================================================================ + 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.*" %> + +<%@ page import="org.openecomp.portalsdk.analytics.xmlobj.*" %> +<%@ page import="org.openecomp.portalsdk.analytics.model.*" %> +<%@ page import="org.openecomp.portalsdk.analytics.model.base.*" %> +<%@ page import="org.openecomp.portalsdk.analytics.model.definition.*" %> +<%@ page import="org.openecomp.portalsdk.analytics.system.*" %> +<%@ page import="org.openecomp.portalsdk.analytics.util.*" %> + +<% String tableName = AppUtils.getRequestValue(request, AppConstants.RI_TABLE_NAME); + String remoteDbPrefix = (String) session.getAttribute("remoteDB"); + Vector tableSources = null; + Vector dbColumns = null; + if(tableName==null) { + tableSources = DataCache.getReportTableSources(remoteDbPrefix); + if(tableSources.size()>0) + tableName = ((TableSource) DataCache.getReportTableSources(remoteDbPrefix).get(0)).getTableName(); + } + if(tableName!=null) + dbColumns = DataCache.getReportTableDbColumns(tableName.toUpperCase(),remoteDbPrefix); + + + boolean isSingleValueChoice = AppUtils.getRequestFlag(request, "single_value"); + boolean includeTableNameInResult = AppUtils.getRequestFlag(request, "return_table_name"); + boolean includeColTypeInResult = AppUtils.getRequestFlag(request, "return_col_type"); %> + + + + Table Columns + + + + + + + + +<% if(! isSingleValueChoice) { %> + +<% } // if +%> + + +
+ + +<% if(isSingleValueChoice) { %> + +<% } %> +<% if(includeTableNameInResult) { %> + +<% } %> +<% if(includeColTypeInResult) { %> + +<% } %> + + + + + + + <% int rNum = 0; + if(dbColumns!=null) + for(rNum=0; rNum + > + + <% if(isSingleValueChoice) { %> + + <% } else { %> + + + <% } // else + %> + + <% } // for + if(rNum==0) { %> + + + + <% } else { // if + %> + + + + <% + } + %> + + + + +
  + <% if(! isSingleValueChoice) { %> +   + <% } %> + + + DB Table Columns +
<%= (rNum+1) %><%= sDisplay %> + + <%= sDisplay %>
No columns found for table [<%= tableName %>]
<%= "CLEAR VALUE" %>
  + <% if(! isSingleValueChoice) { %> +   + <% } %> +  
+ + + +
+ + + + +<%! private String nvl(String s) { return (s==null)?"":s; } + private String nvl(String s, String sDefault) { return nvl(s).equals("")?sDefault:s; } %> + -- cgit 1.2.3-korg