Subversion Repositories DevTools

Rev

Blame | Last modification | View Log | RSS feed

<%@LANGUAGE="VBSCRIPT"%>
<%
'=====================================================
'|                                                   |
'|                                wNodeSpec                                              |
'|                                                   |
'=====================================================
%>
<%
Option explicit
Response.Expires = 0
%>
<!--#include file="common/globals.asp"-->
<!--#include file="common/config.asp"-->
<!--#include file="common/common_subs.asp"-->
<!--#include file="common/_popup_window_common.asp"-->
<!--#include file="class/classTabControl.asp"-->
<!--#include file="class/classTemplateManager.asp"-->
<%
'------------ ACCESS CONTROL ------------------
%>
<!--#include file="_access_control_general.asp"-->
<%
'------------ VARIABLE DEFINITION -------------
Dim objTabControl
Dim objTemplateManager
Dim rsQry
Dim OsTab
'------------ CONSTANTS DECLARATION -----------
'------------ VARIABLE INIT -------------------

Call GetMainDBParameters ( dbPARproj_id, dbPARbranch_id, dbPARbom_id, dbPARnode_id, dbPARos_id, dbPARprod_id )
parNode_id = dbPARnode_id
parOs_id = dbPARos_id
'------------ CONDITIONS ----------------------
'----------------------------------------------
%>
<%
'--------------------------------------------------------------------------------------------------------------------------
Function GenerateOsSpec ( nOsId )
        Dim rsQry, query, returnString
        Dim PkgName, PkgVersion, Ext, Description
        
        OraDatabase.Parameters.Add "OS_ID", nOsId,      ORAPARM_INPUT, ORATYPE_NUMBER 
        
        Set rsQry = OraDatabase.DbCreateDynaset( GetQuery ("ExportOsProductList.sql"), ORADYN_DEFAULT )
        
        returnString = NULL
        
        While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
                PkgName = rsQry("pkg_name")
                PkgVersion = rsQry("pkg_version")
                Ext = rsQry("v_ext")
                Description = rsQry("pv_description")
                
                ' Format Description
                If NOT IsNull(Description) Then
                        Description = Replace ( Description, VBNewLine, "" )
                        Description = Replace ( Description, """", "" )
                End if
                
                ' Format Extension
                If NOT IsNull(Ext) Then
                        ' Remove first dot from extension
                        If InStr( 1, Ext, "." ) = 1 Then
                                Ext = Right( Ext, Len(Ext) - 1 )
                        End If
                        
                End If
                
                
                
                returnString = returnString &_
                        "'"& PkgName &"' => {"& VBNewLine &_
            "          ERGPkgFlag        => ""T"","& VBNewLine &_
            "          CheckVersionFlag  => ""T"","& VBNewLine 
                        
                If IsNull(Ext) Then
                        returnString = returnString &_
                    "          PkgVersion        => """& PkgVersion &""","&  VBNewLine 
                Else
                        returnString = returnString &_
            "          PkgVersion        => """& Left(PkgVersion, Len(PkgVersion) - Len(Ext) - 1 ) &""","&  VBNewLine &_
            "          PkgProjAcronym    => """& Ext &""","&  VBNewLine 
                End If
                
                returnString = returnString &_
            "          PkgDesc           => """& Description &""" "& VBNewLine &_
            "      },"& VBNewLine
                
                
                
                rsQry.MoveNext()
        WEnd
        
        OraDatabase.Parameters.Remove "OS_ID"
        
        rsQry.Close
        Set rsQry = Nothing
        
        
        ' Format final output
        If NOT IsNull(returnString) Then
                returnString = Left ( returnString, InStrRev( returnString, "," ) - 1 )
        End If
        
        
        ' Return string 
        GenerateOsSpec = returnString
        
End Function
'--------------------------------------------------------------------------------------------------------------------------
%>
<%
'------------ RUN BEFORE PAGE RENDER ----------


'----------------------------------------------
%>
<html>
<head>
<title>Deployment Manager</title>
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="scripts/deployment_manager.css" rel="stylesheet" type="text/css">
<script language="JavaScript" src="scripts/common.js"></script>
</head>

<body background="images/bg_bage_0.gif" leftmargin="0" topmargin="0" onLoad="self.focus();FormName.os_name.focus();">
<table width="100%"  border="0" cellspacing="0" cellpadding="10">
  <tr>
    <td bgcolor="#FFFFFF" class="body_txt"><span class="body_h1"><img src="icons/i_linkarrow_black.gif" width="11" height="11" align="absmiddle">&nbsp;Node Spec Export </span> <br>
    Click on the text to select.</td>
  </tr>
</table>
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="1" background="images/bg_blue.gif"><img src="images/spacer.gif" width="10" height="35"></td>
    <td width="100%" background="images/bg_blue.gif" valign="bottom">
        <!-- TAB CONTROLS ++++++++++++++++++++++ -->
                <%
                '[1] Tab Name
                '[2] Tab Link
                '[3] JavaScript Event e.g. "onClick='...'"
                '[4] Tab Image Selected
                '[5] Tab Image Diselected
                '[6] Tab Image Disabled
                '[7] Tab Hint
                '[8] Force Disable. Values: Y, N(default)
                
                
                OraDatabase.Parameters.Add "NODE_ID", parNode_id, ORAPARM_INPUT, ORATYPE_NUMBER 
                
                Set rsQry = OraDatabase.DbCreateDynaset( GetQuery ("OsList.sql"), ORADYN_DEFAULT )
                
                OraDatabase.Parameters.Remove "NODE_ID"
                
                
                Set objTabControl = New TabControl
                objTabControl.TemplateDoc = ReadFile( Server.MapPath("controls/ERGTabStyleWinXP/tab_style.html") ) ' Supply tab style definition
                objTabControl.TabStyle = "StyleWinXP"
                
                If Request("ostab") <> "" Then
                        OsTab = CDbl( Request("ostab") )
                Else
                        OsTab = 0
                End If
                
                
                While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
                        
                        objTabControl.Add ( Array( rsQry("os_name"), SCRIPT_NAME &"?ostab="& rsQry("os_id") &"&"& objPMod.ComposeURL() , "", "", "", "", "", "" ) )
                        
                        If OsTab = 0 Then
                                OsTab = CDbl( rsQry("os_id"))
                                objTabControl.SelectByName rsQry("os_name")
                                
                        ElseIf OsTab = CDbl(rsQry("os_id")) Then
                                OsTab = rsQry("os_id")
                                objTabControl.SelectByName rsQry("os_name")
                                
                        End If
                        
                        
                        rsQry.MoveNext()
                WEnd
                
                rsQry.Close()
                Set rsQry = nothing
                
                
                objTabControl.Render ()
                %>
                <!-- END OF TAB CONTROLS +++++++++++++++ -->
        </td>
    <td width="1" background="images/bg_blue.gif"></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td><br><textarea name="textfield" cols="70" rows="20" wrap="OFF" class="body_cmd" onFocus="this.select()"><%=GenerateOsSpec( OsTab )%></textarea></td>
    <td>&nbsp;</td>
  </tr>
</table>
</body>
</html>
<%
'------------ RUN AFTER PAGE RENDER -----------
'----------------------------------------------
%><!--#include file="common/globals_destructor.asp"-->