Subversion Repositories DevTools

Rev

Rev 5044 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5044 Rev 5102
Line 89... Line 89...
89
        "pv.PV_DESCRIPTION", _
89
        "pv.PV_DESCRIPTION", _
90
        "pv.COMMENTS", _
90
        "pv.COMMENTS", _
91
        "NVL(pv.V_EXT, '') as V_EXT", _
91
        "NVL(pv.V_EXT, '') as V_EXT", _
92
        "TO_CHAR(bi.TIMESTAMP, 'Dy DD-Mon-YYYY HH24:MI:SS') as TIMESTAMPTXT", _
92
        "TO_CHAR(bi.TIMESTAMP, 'Dy DD-Mon-YYYY HH24:MI:SS') as TIMESTAMPTXT", _
93
        "DECODE(bi.reason, 'N', 'New Version', 'R', 'Ripple', 'T', 'Test', 'P', 'Restored', 'Unknown') as REASON" ,_
93
        "DECODE(bi.reason, 'N', 'New Version', 'R', 'Ripple', 'T', 'Test', 'P', 'Restored', 'Unknown') as REASON" ,_
94
        "DECODE(bi.state, 'B', 'Buiding', 'C', 'Complete', 'E', 'Error', 'S', 'SysErr', 'Unknown') as STATE" ,_
94
        "DECODE(bi.state, 'B', 'Buiding', 'C', 'Complete', 'E', 'Error', 'S', 'SysErr', 'Unknown') as STATE",_
95
        "(SELECT COUNT(*) from TEST_RUN tr WHERE tr.build_id = bi.build_id) AS test_count" )
95
        "bi.build_id" )
96
 
96
 
97
'   Define array of colums to sort by
97
'   Define array of colums to sort by
98
'       Must match user sort column request
98
'       Must match user sort column request
99
Dim sortCols: sortCols = Array ( _
99
Dim sortCols: sortCols = Array ( _
100
        "UPPER(pj.PROJ_NAME)",_
100
        "UPPER(pj.PROJ_NAME)",_
Line 102... Line 102...
102
        "UPPER(p.PKG_NAME)",_
102
        "UPPER(p.PKG_NAME)",_
103
        "UPPER(pv.PKG_VERSION)",_
103
        "UPPER(pv.PKG_VERSION)",_
104
        "bi.BUILD_ID",_
104
        "bi.BUILD_ID",_
105
        "UPPER(bi.reason)",_
105
        "UPPER(bi.reason)",_
106
        "UPPER(bi.state)",_
106
        "UPPER(bi.state)",_
107
        "test_count" )
107
        "build_id" )
108
 
108
 
109
' Dim determine sorting options
109
' Dim determine sorting options
110
'On Error goto 0
110
'On Error goto 0
111
'Response.Write "<pre>"
111
'Response.Write "<pre>"
112
Dim sortString
112
Dim sortString
Line 146... Line 146...
146
            "  and rt.proj_id = pj.proj_id" &_
146
            "  and rt.proj_id = pj.proj_id" &_
147
            whereString &_
147
            whereString &_
148
            searchString &_
148
            searchString &_
149
            sortString
149
            sortString
150
 
150
 
151
SqlQry = "select * from ( "&_
151
SqlQry = "Select z.*, (SELECT COUNT(*) FROM TEST_RUN tr WHERE tr.build_id = z.build_id ) AS test_count from (select * from ( "&_
152
            "select a.*, ROWNUM rnum from (" & BasicSql &_
152
            "select /*+ FIRST_ROWS(n) */ a.*, ROWNUM rnum from (" & BasicSql &_
153
                ") a where ROWNUM <= " & lastRow &_
153
                ") a where ROWNUM <= " & lastRow &_
154
            ") where rnum >= " & firstRow
154
            ") where rnum >= " & firstRow & ") z"
155
 
155
 
156
' Assist in debug
156
' Assist in debug
157
oJSON.data("BasicSql") = BasicSql
157
oJSON.data("BasicSql") = BasicSql
158
'oJSON.data("SqlQry") = SqlQry
158
oJSON.data("SqlQry") = SqlQry
159
 
159
 
160
' Perform the database query
160
' Perform the database query
161
Set oJSON.data("aaData") = oJSON.Collection()
161
Set oJSON.data("aaData") = oJSON.Collection()
162
On Error Resume Next
162
On Error Resume Next
163
objEH.ErrorRedirect = FALSE
163
objEH.ErrorRedirect = FALSE
Line 186... Line 186...
186
       Dim comments     : comments = Server.HTMLEncode(fields(9))
186
       Dim comments     : comments = Server.HTMLEncode(fields(9))
187
       Dim pkg_version  : pkg_version = fields(7)
187
       Dim pkg_version  : pkg_version = fields(7)
188
       Dim timestamp    : timestamp = fields(11)
188
       Dim timestamp    : timestamp = fields(11)
189
       Dim reason       : reason = fields(12)
189
       Dim reason       : reason = fields(12)
190
       Dim state        : state = fields(13)
190
       Dim state        : state = fields(13)
191
       Dim tcount       : tcount = fields(14)
191
       Dim tcount       : tcount = fields(16)
192
 
192
 
193
       Set fields = nothing
193
       Set fields = nothing
194
 
194
 
195
        newitem(0) = "<a href='rtree.asp?proj_id=" & proj_id & "'>" & proj_name & "</a>"
195
        newitem(0) = "<a href='rtree.asp?proj_id=" & proj_id & "'>" & proj_name & "</a>"
196
        newitem(1) = rtag_name
196
        newitem(1) = rtag_name