Subversion Repositories DevTools

Rev

Rev 6544 | Rev 6546 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6544 Rev 6545
Line 36... Line 36...
36
Dim shref_base
36
Dim shref_base
37
'------------ Constants Declaration -----------
37
'------------ Constants Declaration -----------
38
'------------ Variable Init -------------------
38
'------------ Variable Init -------------------
39
parRtagId = Request("rtag_id")
39
parRtagId = Request("rtag_id")
40
objPMod.PersistInQryString("rtag_id")
40
objPMod.PersistInQryString("rtag_id")
41
 
-
 
42
'----------------------------------------------
41
'----------------------------------------------
43
%>
-
 
44
<%
-
 
45
'--------------------------------------------------------------------------------------------------------------------------
-
 
46
Sub GetFormDetails ( parRtagId, ByRef outobjDetails )
-
 
47
   Dim rsQry, query
-
 
48
   OraDatabase.Parameters.Add "RTAG_ID",   parRtagId,    ORAPARM_INPUT, ORATYPE_NUMBER
-
 
49
   query = _
-
 
50
   " SELECT * "&_
-
 
51
   "  FROM RELEASE_TAGS rt"&_
-
 
52
   " WHERE rt.RTAG_ID = :RTAG_ID"
-
 
53
 
-
 
54
   Set rsQry = OraDatabase.DbCreateDynaset( query, ORADYN_DEFAULT )
-
 
55
 
-
 
56
   OraDatabase.Parameters.Remove "RTAG_ID"
-
 
57
 
-
 
58
   If rsQry.RecordCount > 0 Then
-
 
59
      outobjDetails.Item ("rtag_id") = rsQry("rtag_id")
-
 
60
      outobjDetails.Item ("rtag_name") = rsQry("rtag_name")
-
 
61
   Else
-
 
62
      Err.Raise 8, "Sub GetFormDetails in "& ScriptName, "Empty record set returned. parRtagId="& parRtagId
-
 
63
   End If
-
 
64
 
-
 
65
   rsQry.Close
-
 
66
   Set rsQry = Nothing
-
 
67
End Sub
-
 
68
'--------------------------------------------------------------------------------------------------------------------------
-
 
69
Sub RipplePackage (flag)
42
Sub IncludePackages()
70
 
43
 
71
   On Error Resume Next
44
   On Error Resume Next
72
   objEH.ErrorRedirect = TRUE
45
   objEH.ErrorRedirect = TRUE
73
   OraDatabase.Parameters.Add "PV_ID_LIST",  Request("pv_id_list"),  ORAPARM_INPUT, ORATYPE_VARCHAR2
46
   OraDatabase.Parameters.Add "PV_ID_LIST",  Request("pv_id_list"),  ORAPARM_INPUT, ORATYPE_VARCHAR2
74
   OraDatabase.Parameters.Add "RTAG_ID",     parRtag_id,  ORAPARM_INPUT, ORATYPE_NUMBER
47
   OraDatabase.Parameters.Add "RTAG_ID",     parRtag_id,  ORAPARM_INPUT, ORATYPE_NUMBER
75
   OraDatabase.Parameters.Add "USER_ID",     objAccessControl.UserId,  ORAPARM_INPUT, ORATYPE_NUMBER
48
   OraDatabase.Parameters.Add "USER_ID",     objAccessControl.UserId,  ORAPARM_INPUT, ORATYPE_NUMBER
76
 
49
 
77
   objEH.TryORA ( OraSession )
50
   objEH.TryORA ( OraSession )
78
 
-
 
79
   If flag Then
-
 
80
      OraDatabase.ExecuteSQL _
-
 
81
      "BEGIN  Ripple_Package( :PV_ID_LIST, :RTAG_ID, :USER_ID );  END;"
51
   OraDatabase.ExecuteSQL "BEGIN  Ripple_Package( :PV_ID_LIST, :RTAG_ID, :USER_ID );  END;"
82
   Else
-
 
83
      OraDatabase.ExecuteSQL _
-
 
84
      "BEGIN  UnRipple_Package( :PV_ID_LIST, :RTAG_ID, :USER_ID );  END;"
-
 
85
   End If
-
 
86
 
-
 
87
   objEH.CatchORA ( OraSession )
52
   objEH.CatchORA ( OraSession )
88
 
53
 
89
   OraDatabase.Parameters.Remove "PV_ID_LIST"
54
   OraDatabase.Parameters.Remove "PV_ID_LIST"
90
   OraDatabase.Parameters.Remove "RTAG_ID"
55
   OraDatabase.Parameters.Remove "RTAG_ID"
91
   OraDatabase.Parameters.Remove "USER_ID"
56
   OraDatabase.Parameters.Remove "USER_ID"
Line 93... Line 58...
93
End Sub
58
End Sub
94
'--------------------------------------------------------------------------------------------------------------------------
59
'--------------------------------------------------------------------------------------------------------------------------
95
'------------ RUN BEFORE PAGE RENDER ----------
60
'------------ RUN BEFORE PAGE RENDER ----------
96
shref_base = "http://" & archive_server & "/devl/abtlog/"
61
shref_base = "http://" & archive_server & "/devl/abtlog/"
97
 
62
 
98
' --- Get Form details from DB ---
-
 
99
Call GetFormDetails ( Request("rtag_id"), objFormCollector )
-
 
100
 
-
 
101
' --- Enter Form Validation Rule Changes here... ----
-
 
102
'----------------------------------------------------
63
'----------------------------------------------------
103
 
-
 
104
' --- RUN onPostBack ---
64
' --- RUN onPostBack ---
105
If Request("action") <> "" AND objAccessControl.UserLogedIn Then
65
If Request("action") <> "" AND objAccessControl.UserLogedIn Then
106
 
66
 
107
  If objEH.Finally Then
67
  If objEH.Finally Then
108
    If Request("action") = "include" Then
68
    If Request("action") = "include" Then
109
      Call RipplePackage (True)
69
      Call IncludePackages (True)
110
      ' Redirect to the current page so that a refesh will not
70
      ' Redirect to the current page so that a refesh will not
111
      ' cause a form re-submit.
71
      ' cause a form re-submit.
112
      Call Destroy_All_Objects
72
      Call Destroy_All_Objects
113
      Response.Redirect(ScriptName & "?rtag_id=" & parRtagId)
73
      Response.Redirect(ScriptName & "?rtag_id=" & parRtagId)
114
    Else
74
    Else
Line 118... Line 78...
118
 
78
 
119
End If
79
End If
120
 
80
 
121
'----------------------------------------------
81
'----------------------------------------------
122
%>
82
%>
123
<script language="JavaScript" type="text/JavaScript">
-
 
124
 
-
 
125
window.addEventListener ?
-
 
126
window.addEventListener("load",InitShow,false) :
-
 
127
window.attachEvent && window.attachEvent("onload",InitShow);
-
 
128
 
-
 
129
function InitShow(e)
-
 
130
{
-
 
131
    toggleDispClass('rootCause',0);
-
 
132
    toggleDispClass('rootNoEnv',0);
-
 
133
    toggleDispClass('rootFile',0);
-
 
134
    toggleDispClass('rootIndirect',0);
-
 
135
    toggleDispClass('manualCause',0);
-
 
136
}
-
 
137
 
-
 
138
function toggleDispClass(cname,flip)
-
 
139
{
-
 
140
    var cookieName = 'RELMGR_BUILDSTATUS';
-
 
141
    var cv = JSON.parse(getCookie(cookieName));
-
 
142
    if (!cv)
-
 
143
        cv = new Object;
-
 
144
    if (!cv.BuildStatus)
-
 
145
        cv.BuildStatus = new Object;
-
 
146
 
-
 
147
    var state = cv.BuildStatus[cname];
-
 
148
    if (state === undefined)
-
 
149
        state = true;
-
 
150
 
-
 
151
    if (flip>0)
-
 
152
        state = !state;
-
 
153
 
-
 
154
    cv.BuildStatus[cname] = state;
-
 
155
 
-
 
156
    // Reflect the current state in the checkbox
-
 
157
    var de = document.getElementById(cname);
-
 
158
    if (de)
-
 
159
        de.checked = state;
-
 
160
 
-
 
161
    var elements = new Array();
-
 
162
    elements = getElementsByClassName(cname);
-
 
163
    for(i in elements ){
-
 
164
        if (state) {
-
 
165
            elements[i].style.display = "";
-
 
166
        }
-
 
167
        else {
-
 
168
            elements[i].style.display = "none";
-
 
169
        }
-
 
170
    }
-
 
171
    setCookie(cookieName, JSON.stringify(cv), 365 );
-
 
172
}
-
 
173
 
-
 
174
</script>
-
 
175
 
-
 
176
<html>
83
<html>
177
   <head>
84
   <head>
178
      <title>Release Manager</title>
85
      <title>Release Manager</title>
179
      <link rel="shortcut icon" href="<%=FavIcon%>"/>
86
      <link rel="shortcut icon" href="<%=FavIcon%>"/>
180
      <meta http-equiv="Pragma" content="no-cache">
87
      <meta http-equiv="Pragma" content="no-cache">
Line 195... Line 102...
195
                                                                  'the last 24 hours. Longer times will be shown as a date.' 
102
                                                                  'the last 24 hours. Longer times will be shown as a date.' 
196
                                                                  );
103
                                                                  );
197
      </script>
104
      </script>
198
    <script language="JavaScript" type="text/JavaScript">
105
    <script language="JavaScript" type="text/JavaScript">
199
    $(document).ready(function() {
106
    $(document).ready(function() {
-
 
107
        //
-
 
108
        //  Init the check boxes
-
 
109
        InitShow();
-
 
110
 
200
        // Attach function to toggle checkbox
111
        // Attach function to toggle checkbox
201
        // toggle all visible checkboxes
112
        // toggle all visible checkboxes
202
         $('#toggleDirect').click(function(){
113
         $('#toggleDirect').click(function(){
203
            var state = this.checked;
114
            var state = this.checked;
204
            var list = $('.directInclude:visible');
115
            var list = $('.directInclude:visible:enabled');
205
            list.prop('checked', state);
116
            list.prop('checked', state);
206
            isChecked('pv_id_list','IncludeSubmit');
117
            isChecked('pv_id_list','IncludeSubmit');
207
         });
118
         });
-
 
119
 
-
 
120
         $('.directInclude').click(function(){
-
 
121
             isChecked('pv_id_list','IncludeSubmit');
-
 
122
         });
-
 
123
 
208
    });
124
    });
-
 
125
 
-
 
126
    function InitShow(e)
-
 
127
    {
-
 
128
        toggleDispClass('rootCause',0);
-
 
129
        toggleDispClass('rootNoEnv',0);
-
 
130
        toggleDispClass('rootFile',0);
-
 
131
        toggleDispClass('rootIndirect',0);
-
 
132
        toggleDispClass('manualCause',0);
-
 
133
    }
-
 
134
 
-
 
135
    function toggleDispClass(cname,flip)
-
 
136
    {
-
 
137
        var cookieName = 'RELMGR_BUILDSTATUS';
-
 
138
        var cv = JSON.parse(getCookie(cookieName));
-
 
139
        if (!cv)
-
 
140
            cv = new Object;
-
 
141
        if (!cv.BuildStatus)
-
 
142
            cv.BuildStatus = new Object;
-
 
143
 
-
 
144
        var state = cv.BuildStatus[cname];
-
 
145
        if (state === undefined)
-
 
146
            state = true;
-
 
147
 
-
 
148
        if (flip>0)
-
 
149
            state = !state;
-
 
150
 
-
 
151
        cv.BuildStatus[cname] = state;
-
 
152
 
-
 
153
        // Reflect the current state in the checkbox
-
 
154
        var de = document.getElementById(cname);
-
 
155
        if (de)
-
 
156
            de.checked = state;
-
 
157
 
-
 
158
        var elements = new Array();
-
 
159
        elements = getElementsByClassName(cname);
-
 
160
        for(i in elements ){
-
 
161
            if (state) {
-
 
162
                elements[i].style.display = "";
-
 
163
            }
-
 
164
            else {
-
 
165
                elements[i].style.display = "none";
-
 
166
            }
-
 
167
        }
-
 
168
        setCookie(cookieName, JSON.stringify(cv), 365 );
-
 
169
    }
-
 
170
 
209
    </script>
171
    </script>
210
      <!-- DROPDOWN MENUS -->
172
      <!-- DROPDOWN MENUS -->
211
      <!--#include file="_menu_def.asp"-->
173
      <!--#include file="_menu_def.asp"-->
212
      <script language="JavaScript1.2" src="images/popup_menu.js"></script>
174
      <script language="JavaScript1.2" src="images/popup_menu.js"></script>
213
   </head>
175
   </head>
Line 261... Line 223...
261
                        <tr><td colspan=4 class='err_alert'>
223
                        <tr><td colspan=4 class='err_alert'>
262
                              <font size='2'><b>Packages Excluded From Build</b></font>
224
                              <font size='2'><b>Packages Excluded From Build</b></font>
263
                           </td>
225
                           </td>
264
                           </tr>
226
                           </tr>
265
                           <td><input id="toggleDirect" type="checkbox" title="Toggle all visible directly excluded packages"></td>
227
                           <td><input id="toggleDirect" type="checkbox" title="Toggle all visible directly excluded packages"></td>
266
                           <td colspan=3 class="body_row">
228
                           <td  colspan=3 class="body_row">
267
                           <fieldset class="fset" align="right" style=" border: 1px groove;">
229
                           <fieldset class="fset" align="right" style=" border: 1px groove;">
268
                                Show
230
                                Show
269
                                <input type="checkbox" checked value=0 name="showManual"   id="manualCause"   onClick="toggleDispClass('manualCause',1);">Manual Exclusions
231
                                <input type="checkbox" checked value=0 name="showManual"   id="manualCause"   onClick="toggleDispClass('manualCause',1);">Manual Exclusions
270
                                <input type="checkbox" checked value=0 name="showCause"    id="rootCause"     onClick="toggleDispClass('rootCause',1);">Config Errors
232
                                <input type="checkbox" checked value=0 name="showCause"    id="rootCause"     onClick="toggleDispClass('rootCause',1);">Config Errors
271
                                <input type="checkbox" checked value=0 name="showNoEnv"    id="rootNoEnv"     onClick="toggleDispClass('rootNoEnv',1);">Env Errors
233
                                <input type="checkbox" checked value=0 name="showNoEnv"    id="rootNoEnv"     onClick="toggleDispClass('rootNoEnv',1);">Env Errors
Line 319... Line 281...
319
                                          " Log file may have expired."" " &_
281
                                          " Log file may have expired."" " &_
320
                                          "href=""" & shref_base & rsQry("root_file") & """>" &_
282
                                          "href=""" & shref_base & rsQry("root_file") & """>" &_
321
                                          "Build Failure Log File</a>"
283
                                          "Build Failure Log File</a>"
322
                            End If
284
                            End If
323
 
285
 
324
                            Dim checkBoxData
286
                            Dim checkBoxData, checkBoxClass
325
                            If NiceInt(rsQry("root_pv_id"), -1) = -1   Then
287
                            If NiceInt(rsQry("root_pv_id"), -1) = -1   Then
-
 
288
                                checkBoxData = ""
326
                                checkBoxData = "onClick=""isChecked('pv_id_list','IncludeSubmit');"""
289
                                checkBoxClass = "directInclude"
327
                            Else
290
                            Else
328
                                checkBoxData = "disabled"    
291
                                checkBoxData = "disabled"
-
 
292
                                checkBoxClass = ""    
329
                            End If
293
                            End If
330
 
294
 
331
                           %>
295
                           %>
332
                              <tr class="<%=rowClass%>">
296
                              <tr class="<%=rowClass%>">
333
                                 <td colspan="5" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
297
                                 <td colspan="5" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
334
                              </tr>
298
                              </tr>
335
                              <tr class="<%=rowClass%>">
299
                              <tr class="<%=rowClass%>">
336
                                 <td nowrap width="1%">
300
                                 <td nowrap width="1%">
337
                                    <!-- The use of the isChecked() javascript function below, enables the submit button if any checkboxes are checked, -->
-
 
338
                                    <!-- else it will disable the submit button. The function is badly named, but nevertheless, that is what it does.   -->
-
 
339
                                    <a name="PkgName_<%=rsQry("pkg_name")%>">
301
                                    <a name="PkgName_<%=rsQry("pkg_name")%>">
340
                                    <input class="directInclude" type="checkbox" value="<%=rsQry("pv_id")%>" name="pv_id_list" id="pv_id_list" <%=checkBoxData%>>
302
                                    <input class="<%=checkBoxClass%>" type="checkbox" value="<%=rsQry("pv_id")%>" name="pv_id_list" <%=checkBoxData%>>
341
                                    </a>
303
                                    </a>
342
                                 </td>
304
                                 </td>
343
                                 <td nowrap class="body_rowg"><a class="txt_linked" href="dependencies.asp?pv_id=<%=rsQry("pv_id")%>&rtag_id=<%=rsQry("rtag_id")%>" title="<%=rsQry("pv_description")%>"><%=rsQry("pkg_name")%></a></td>
305
                                 <td nowrap class="body_rowg"><a class="txt_linked" href="dependencies.asp?pv_id=<%=rsQry("pv_id")%>&rtag_id=<%=rsQry("rtag_id")%>" title="<%=rsQry("pv_description")%>"><%=rsQry("pkg_name")%></a></td>
344
                                 <td nowrap class="body_rowg"><%=rsQry("pkg_version")%></td>
306
                                 <td nowrap class="body_rowg"><%=rsQry("pkg_version")%></td>
345
                                 <td nowrap class="body_rowg"><%=rowData%></td>
307
                                 <td nowrap class="body_rowg"><%=rowData%></td>