Subversion Repositories DevTools

Rev

Rev 6123 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
6122 dpurdie 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
'=====================================================
4
'   View Deplayable State Information
5
'       form_view_deployable_state.asp
6
'=====================================================
7
%>
8
<%
9
Option explicit
10
' Good idea to set when using redirect
11
Response.Expires = 0   ' always load the page, dont store
12
%>
13
<!--#include file="common/conf.asp"-->
14
<!--#include file="common/globals.asp"-->
15
<!--#include file="common/formating.asp"-->
16
<!--#include file="common/qstr.asp"-->
17
<!--#include file="common/common_subs.asp"-->
18
<!--#include file="common/_form_window_common.asp"-->
19
<!--#include file="_action_buttons.asp"-->
20
 
21
<!--#include file="class/classActionButtonControl.asp"-->
22
<%
23
'------------ ACCESS CONTROL ------------------
24
%>
25
<!--#include file="_access_control_login.asp"-->
26
<!--#include file="_access_control_general.asp"-->
27
<%
28
'------------ Variable Definition -------------
29
Dim parRtagId
30
dim modifyState
31
'------------ Constants Declaration -----------
32
'------------ Variable Init -------------------
33
parRtagId = Request("rtag_id")
34
objPMod.PersistInQryString("rtag_id")
35
modifyState = "disabled"
36
If canActionControlInProject("ConfigureRelease") OR canActionControlInProject("EditNonCriticalInfoForLockedPackage") Then modifyState = ""
37
'----------------------------------------------
38
%>
39
<html>
40
   <head>
41
        <title>Release Manager</title>
42
        <link rel="shortcut icon" href="<%=FavIcon%>"/>
43
        <meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
44
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
45
        <link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
46
        <link rel="stylesheet" href="images/navigation.css" type="text/css">
47
        <script language="JavaScript" src="images/common.js"></script>
48
        <%bJqueryDataTables = TRUE%>
49
        <!--#include file="_jquery_includes.asp"-->
50
        <!-- TIPS -->
51
        <script language="JavaScript" src="images/tipster.js"></script>
52
        <script language="JavaScript" src="images/_help_tips.js"></script>
53
        <script language="JavaScript" type="text/javascript">
54
        formTips.tips.h_deployable       = stdTip(300, 'Deployable', 'Show packages that are marked as Deployable' +
55
                                                                  '<p>These packages may be processed by deployment tools and the package contents ' + 
56
                                                                  'may be processed into a deployment BOM' 
57
                                                                  );
58
        </script>
59
        <script type="text/javascript" charset="utf-8">
60
        var table;
61
        var showHide = false;
62
	$(document).ready(function() {
63
		/* Init DataTables */
64
        table = $("#deploymentstatetable").DataTable({
65
            processing: true,
66
            deferRender: true,
67
            dom: "frtiS",
68
            sScrollY: $( document ).height() - 45 - 200,
69
            scrollCollapse: true,
70
            retrieve:true,
71
            serverSide: true,
72
            ajax : {
73
                url : "deployable_state_json.asp",
74
                data : function (o){
75
                    o.rtag_id = <%=parRtagId%>;
76
                    o.show = showHide;
77
                },
78
                dataSrc : function (json){
79
                    //  Process the raw Ajax data
80
                    //      Create a checkbox for the state
81
                    //      Add a data item to the entry - to allow traceback when saving
82
                    $.each(json.data, function(idx,row){
83
                            var checked = row[5] == "Y" ? 'checked' : '';
84
                        row[5] = '<div><input type="checkbox" class=clickable <%=modifyState%> '+ checked + ' data-pvid='+ row[0] +'></div>' 
85
                    });
86
                    return json.data;
87
                }
88
            },
89
            ordering: true,
90
            order: [[ 1, "asc" ]],
91
            lengthChange : false,
92
 
93
            Scroller : {
94
			    loadingIndicator : true,
95
                displayBuffer: 3,
96
		    },
97
            columns: [
98
               { visible : false },
99
               { width: "20%", className: "dt-nowrap"  },
100
               { width: "20%", className: "dt-nowrap"  },
101
               { width: "1%", className: "dt-nowrap"  },
102
               { orderable: false },
103
               { className: "dt-nowrap" }
104
           ]
105
        });
106
 
107
    // Wire Up buttons
108
    $('#ds_refresh').on("click", function(){
109
        table.ajax.reload(null, false);        
110
    });
111
 
112
    $('#ds_show').on("click", function(){
113
        $(this).text( showHide ? 'Show Deployable' : 'Show All');
114
        showHide = !showHide;
115
        table.ajax.reload();        
116
    });
117
 
118
    // Process click on checkboxes within the datatable
119
    //      this - a DOM node
120
    //      $(this) - The jquery wrapped node
121
    //
122
    $('#deploymentstatetable').on( 'click', 'tbody td :checkbox', function () {
123
        getAjaxData (
124
            "_json_UpdateVersion.asp",
125
            { opr : 'setDeployable', 
126
              pv_id : $(this).data('pvid'), 
127
              deployment_state : this.checked ? 'Y' : '-' 
128
            });
129
        });
130
 
131
 
132
	} );
133
 
134
//  getAjaxData - with error processing
135
//      url - url to fetch
136
//      data    - additional data to pass to ajax request
137
//      success - function to call on success
138
function getAjaxData( url, data, success )
139
{
140
    clearInfo();
141
    $("#ds_progressBar").css('visibility', 'visible');
142
    $(document.body).css({ 'cursor': 'progress' })
143
    $.ajax(
144
    {
145
        url : url,
146
        type: "POST",
147
        data : data,
148
        dataType : "json",
149
        cache: false,
150
        success:function(data, textStatus, jqXHR)
151
        {
152
            //data: return data from server
153
            //console.log ("UpdateData", data);
154
            if (data.result != 0)
155
            {
156
                setInfo("Error:" + ((data.error != 0) ? data.emsgSummary : "Reason not given"));
157
                return;
158
            }
159
            //  call user success function
160
            if (jQuery.isFunction(success))
161
            {
162
                success(data);
163
            }
164
        },
165
        error: function(jqXHR, textStatus, errorThrown)
166
        {
167
            setInfo("Error:" + errorThrown);
168
            //if fails
169
        },
170
        complete : function()
171
        {
172
            $("#ds_progressBar").css('visibility', 'hidden');
173
            $(document.body).css({ 'cursor': 'auto' })
174
        }
175
    });
176
 
177
function setInfo(txt) {
178
    $("#ds_info").text( txt);
179
}
180
 
181
function clearInfo(txt) {
182
    $("#ds_info").text(" ");
183
}
184
 
185
}
186
</script>
187
 
188
      <!-- DROPDOWN MENUS -->
189
      <!--#include file="_menu_def.asp"-->
190
      <script language="JavaScript1.2" src="images/popup_menu.js"></script>
191
   </head>
192
   <body>
193
      <!-- HEADER -->
194
      <!--#include file="_header.asp"-->
195
      <!-- BODY ---->
196
        <table width="100%" border="0" cellspacing="0" cellpadding="0" style="table-layout: fixed;">
197
            <tr>
198
                <td width="146px" class="panel_bg" valign="top">&nbsp;</td>
199
                <td width="100%" valign="top" align="center"  bgcolor="#EEEFEF">
200
                    <table width="50%" border="0" cellspacing="0" cellpadding="0">
201
                        <tr>
202
                            <td width="1%"></td>
203
                            <td width="100%">
204
                                <span nowrap class="form_ttl">VIEW DEPLOYMENT STATE</span>
205
                                <!-- Section Top Border ---->
206
                                <div class="rounded_box" style="background: white;">
207
                                    <!-- Section Body Header ---->
208
                                    <!-- Main Pane -->
209
                                    <table id="deploymentstatetable" width=100% class="stripe">
210
                                        <thead class="body_col">
211
                                            <tr>
212
                                              <th>PV_ID
213
                                              <th>Package Name
214
                                              <th>Package Version
215
                                              <th>Package Extension
216
                                              <th>Short Description
217
                                              <th><%=Quick_Help("h_deployable")%>Deployable
218
                                            </tr>
219
                                        </thead>
220
                                        <tbody>
221
                                        </tbody>
222
                                    </table>
223
                                    <!-- Info / Ajax Progress bar -->
224
                                    <div class='bg_dialog body_txt' style='position:relative;min-height:21px;' >
225
                                        <img id='ds_progressBar' style='visibility:hidden;position: absolute;display: block' src='icons/i_processing.gif' width='79' height='14'>
226
                                        <div id='ds_info'  style='position: absolute;'></div>
227
                                        <div>
228
                                              <button id='ds_refresh' style="display:inline; float:right;">Refresh</button>
229
                                              <button id='ds_show' style="display:inline; float:right;">Show Deployable</button>
230
                                        </div>
231
                                    </div>
232
                                </div>
233
                            </td>
234
                        </tr>
235
                    </table>
236
                </td>
237
            </tr>
238
        </table>
239
        <!-- FOOTER -->
240
        <!--#include file="_footer.asp"-->
241
    </body>
242
</html>