| 7395 |
dpurdie |
1 |
<%@LANGUAGE="VBSCRIPT"%>
|
|
|
2 |
<%
|
|
|
3 |
'=====================================================
|
|
|
4 |
' View S3 SYNC State Information
|
| 7468 |
dpurdie |
5 |
' form_view_s3Manifest_state.asp
|
| 7395 |
dpurdie |
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_optional.asp"-->
|
|
|
26 |
<!--#include file="_access_control_general.asp"-->
|
|
|
27 |
<%
|
|
|
28 |
'------------ Variable Definition -------------
|
|
|
29 |
Dim parRtagId
|
|
|
30 |
Dim modifyState
|
|
|
31 |
Dim bReleaseSyncEnabled
|
|
|
32 |
|
|
|
33 |
'------------ Constants Declaration -----------
|
|
|
34 |
'------------ Variable Init -------------------
|
|
|
35 |
parRtagId = Request("rtag_id")
|
|
|
36 |
objPMod.PersistInQryString("rtag_id")
|
|
|
37 |
ReleaseMode = GetReleaseMode( Request("rtag_id") )
|
|
|
38 |
modifyState = "disabled"
|
| 7468 |
dpurdie |
39 |
bReleaseSyncEnabled = (releaseInfoHash("S3MANIFEST") = "Y")
|
| 7395 |
dpurdie |
40 |
|
|
|
41 |
If releaseIsWritable(ReleaseMode) Then
|
| 7568 |
dpurdie |
42 |
If canActionControlInProject("ConfigureRelease") OR canActionControlInProject("EditNonCriticalInfoForLockedPackage") OR canActionControlInProject("EditInManifest") Then modifyState = ""
|
| 7395 |
dpurdie |
43 |
End If
|
|
|
44 |
'----------------------------------------------
|
|
|
45 |
Sub ShowSidePanel
|
|
|
46 |
End Sub
|
|
|
47 |
'----------------------------------------------
|
|
|
48 |
Sub ShowMainPanel
|
|
|
49 |
%>
|
|
|
50 |
<table class="embedded_table" style="margin-bottom:10px; width:70%">
|
|
|
51 |
<tr>
|
|
|
52 |
<td>
|
| 7468 |
dpurdie |
53 |
<span nowrap class="form_ttl">View Manifest tags</span>
|
| 7395 |
dpurdie |
54 |
<!-- Section Top Border ---->
|
|
|
55 |
<div class="rounded_box" style="background: white;">
|
|
|
56 |
<!-- Section Body Header ---->
|
|
|
57 |
<!-- Main Pane -->
|
| 7468 |
dpurdie |
58 |
<table id="inManifestTable" width="100%" class="stripe">
|
| 7395 |
dpurdie |
59 |
<thead class="body_col">
|
|
|
60 |
<tr>
|
| 7468 |
dpurdie |
61 |
<th class=tleft>PV_ID
|
|
|
62 |
<th class=tleft>Package Name
|
|
|
63 |
<th class=tleft>Package Version
|
|
|
64 |
<th class=tleft>Package Extension
|
|
|
65 |
<th class=tleft>Short Description
|
|
|
66 |
<th class=tleft>In Manifest<%=Quick_Help("f_s3Manifest")%>
|
| 7395 |
dpurdie |
67 |
</tr>
|
|
|
68 |
</thead>
|
|
|
69 |
<tbody>
|
|
|
70 |
</tbody>
|
|
|
71 |
</table>
|
|
|
72 |
<!-- Info / Ajax Progress bar -->
|
|
|
73 |
<div class='bg_dialog body_txt' style='position:relative;min-height:19px;' >
|
|
|
74 |
<div style='position: absolute;'><span id='ds_info'></span>
|
|
|
75 |
<%If not bReleaseSyncEnabled Then%>
|
| 7468 |
dpurdie |
76 |
<span class='err_alert'>This Release does not have S3 Manifest Generation Enabled</span>
|
| 7395 |
dpurdie |
77 |
<%End If%>
|
| 7468 |
dpurdie |
78 |
</div>
|
| 7395 |
dpurdie |
79 |
|
|
|
80 |
<div>
|
|
|
81 |
<button id='ds_refresh' class='rmbutton' style="display:inline; float:right;">Refresh</button>
|
|
|
82 |
<button id='ds_show' class='rmbutton' style="display:inline; float:right;">Show Sync Enabled</button>
|
|
|
83 |
<button id='ds_clearAll' class='rmbutton' style="display:inline; float:right;" <%=modifyState%>>Clear All</button>
|
|
|
84 |
</div>
|
|
|
85 |
</div>
|
|
|
86 |
</div>
|
|
|
87 |
</td>
|
|
|
88 |
</tr>
|
|
|
89 |
</table>
|
|
|
90 |
<%
|
|
|
91 |
End Sub
|
|
|
92 |
'----------------------------------------------
|
|
|
93 |
%>
|
|
|
94 |
<html>
|
|
|
95 |
<head>
|
|
|
96 |
<title>Release Manager</title>
|
|
|
97 |
<link rel="shortcut icon" href="<%=FavIcon%>"/>
|
|
|
98 |
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
|
|
|
99 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
|
100 |
<link rel="stylesheet" href="images/release_manager_style.css?ver=<%=VixVerNum%>" type="text/css">
|
|
|
101 |
<link rel="stylesheet" href="images/navigation.css?ver=<%=VixVerNum%>" type="text/css">
|
|
|
102 |
<script language="JavaScript" src="images/common.js?ver=<%=VixVerNum%>"></script>
|
|
|
103 |
<%bJqueryDataTables = TRUE%>
|
|
|
104 |
<!--#include file="_jquery_includes.asp"-->
|
|
|
105 |
<!-- TIPS -->
|
|
|
106 |
<script language="JavaScript" src="images/tipster.js?ver=<%=VixVerNum%>"></script>
|
|
|
107 |
<script language="JavaScript" src="images/_help_tips.js?ver=<%=VixVerNum%>"></script>
|
|
|
108 |
<script language="JavaScript" type="text/javascript">
|
| 7468 |
dpurdie |
109 |
formTips.tips.f_s3Manifest = stdTip(300, 'In Manifest', 'Show packages that are marked to be synced to an S3 bucket' +
|
| 7395 |
dpurdie |
110 |
'<p>These packages may be processed by CI/CD tools' );
|
|
|
111 |
</script>
|
|
|
112 |
<script type="text/javascript" charset="utf-8">
|
|
|
113 |
var table;
|
|
|
114 |
var showHide = false;
|
| 7468 |
dpurdie |
115 |
$(document).ready(function() {
|
|
|
116 |
/* Init DataTables */
|
|
|
117 |
table = $("#inManifestTable").DataTable({
|
| 7395 |
dpurdie |
118 |
processing: true,
|
|
|
119 |
deferRender: true,
|
|
|
120 |
dom: "frtiS",
|
|
|
121 |
sScrollY: $( document ).height() - 45 - 200 - 15,
|
|
|
122 |
scrollCollapse: true,
|
|
|
123 |
retrieve:true,
|
|
|
124 |
serverSide: true,
|
|
|
125 |
ajax : {
|
| 7468 |
dpurdie |
126 |
url : "inManifest_state_json.asp",
|
| 7395 |
dpurdie |
127 |
data : function (o){
|
|
|
128 |
o.rtag_id = <%=parRtagId%>;
|
|
|
129 |
o.show = showHide;
|
|
|
130 |
},
|
|
|
131 |
dataSrc : function (json){
|
|
|
132 |
// Process the raw Ajax data
|
|
|
133 |
// Create a checkbox for the state
|
|
|
134 |
// Add a data item to the entry - to allow traceback when saving
|
|
|
135 |
$.each(json.data, function(idx,row){
|
|
|
136 |
var checked = row[5] == "Y" ? 'checked' : '';
|
|
|
137 |
row[5] = '<div><input type="checkbox" class=clickable <%=modifyState%> '+ checked + ' data-pvid='+ row[0] +'></div>'
|
|
|
138 |
});
|
|
|
139 |
return json.data;
|
|
|
140 |
}
|
|
|
141 |
},
|
|
|
142 |
ordering: true,
|
|
|
143 |
order: [[ 1, "asc" ]],
|
|
|
144 |
lengthChange : false,
|
|
|
145 |
|
|
|
146 |
scroller : {
|
| 7468 |
dpurdie |
147 |
loadingIndicator : true,
|
| 7395 |
dpurdie |
148 |
displayBuffer: 9,
|
| 7468 |
dpurdie |
149 |
},
|
| 7395 |
dpurdie |
150 |
columns: [
|
|
|
151 |
{ visible : false },
|
|
|
152 |
{ width: "10%", className: "dt-nowrap" },
|
|
|
153 |
{ width: "10%", className: "dt-nowrap" },
|
|
|
154 |
{ width: "1%", className: "dt-nowrap" },
|
| 7468 |
dpurdie |
155 |
{ width: "70%",orderable: false },
|
| 7395 |
dpurdie |
156 |
{ width: "10%",className: "dt-nowrap" },
|
|
|
157 |
]
|
|
|
158 |
});
|
|
|
159 |
|
|
|
160 |
// Wire Up buttons
|
|
|
161 |
$('#ds_refresh').on("click", function(){
|
|
|
162 |
table.ajax.reload(null, false);
|
|
|
163 |
});
|
|
|
164 |
|
|
|
165 |
$('#ds_show').on("click", function(){
|
|
|
166 |
$(this).text( showHide ? 'Show Sync Enabled' : 'Show All');
|
|
|
167 |
showHide = !showHide;
|
|
|
168 |
table.ajax.reload();
|
|
|
169 |
});
|
|
|
170 |
|
|
|
171 |
$('#ds_clearAll').on("click", function(){
|
|
|
172 |
var msg = 'Are you sure you want to reset the "S3 Sync" flag on all packages in this Release?' +
|
|
|
173 |
'<p>The flag is a function of the release (unlike the Deployable flag).' +
|
|
|
174 |
'<p>Resetting all the flags will not affect other Releases and Projects.';
|
|
|
175 |
|
|
|
176 |
vixConfirm (msg,{
|
|
|
177 |
title:'Reset All S3 Sync Flags',
|
|
|
178 |
button: 'Reset All Flags',
|
|
|
179 |
ok : function(){
|
|
|
180 |
getAjaxData (
|
|
|
181 |
"_json_UpdateVersion.asp",
|
| 7468 |
dpurdie |
182 |
{ opr : 'clearAllInManifest',
|
| 7395 |
dpurdie |
183 |
rtag_id : <%=parRtagId%>
|
|
|
184 |
},
|
|
|
185 |
null,
|
|
|
186 |
function() {table.ajax.reload();}
|
|
|
187 |
);
|
|
|
188 |
}});
|
|
|
189 |
});
|
|
|
190 |
|
|
|
191 |
|
|
|
192 |
// Process click on checkboxes within the datatable
|
|
|
193 |
// this - a DOM node
|
|
|
194 |
// $(this) - The jquery wrapped node
|
|
|
195 |
//
|
| 7468 |
dpurdie |
196 |
$('#inManifestTable').on( 'click', 'tbody td :checkbox', function () {
|
| 7395 |
dpurdie |
197 |
getAjaxData (
|
|
|
198 |
"_json_UpdateVersion.asp",
|
| 7468 |
dpurdie |
199 |
{ opr : 'setInManifest',
|
| 7395 |
dpurdie |
200 |
rtag_id : <%=parRtagId%> ,
|
|
|
201 |
pv_id : $(this).data('pvid'),
|
| 7468 |
dpurdie |
202 |
mfState : this.checked ? 'Y' : '-'
|
| 7395 |
dpurdie |
203 |
});
|
| 7468 |
dpurdie |
204 |
});
|
|
|
205 |
});
|
| 7395 |
dpurdie |
206 |
|
|
|
207 |
// getAjaxData - with error processing
|
|
|
208 |
// url - url to fetch
|
|
|
209 |
// data - additional data to pass to ajax request
|
|
|
210 |
// success - function to call on success
|
|
|
211 |
// always - function to call at completion
|
|
|
212 |
function getAjaxData( url, data, success, always )
|
|
|
213 |
{
|
|
|
214 |
clearInfo();
|
|
|
215 |
$("#progressSpinner").css('visibility', 'visible');
|
|
|
216 |
$(document.body).css({ 'cursor': 'progress' })
|
|
|
217 |
$.ajax(
|
|
|
218 |
{
|
|
|
219 |
url : url,
|
|
|
220 |
type: "POST",
|
|
|
221 |
data : data,
|
|
|
222 |
dataType : "json",
|
|
|
223 |
cache: false,
|
|
|
224 |
success:function(data, textStatus, jqXHR) {
|
|
|
225 |
//data: return data from server
|
|
|
226 |
//console.log ("UpdateData", data);
|
|
|
227 |
if (data.result != 0) {
|
|
|
228 |
setInfo("Error:" + ((data.error != 0) ? data.emsgSummary : "Reason not given"));
|
|
|
229 |
return;
|
|
|
230 |
}
|
|
|
231 |
// call user success function
|
|
|
232 |
if (jQuery.isFunction(success)) {
|
|
|
233 |
success(data);
|
|
|
234 |
}
|
|
|
235 |
},
|
|
|
236 |
error: function(jqXHR, textStatus, errorThrown) {
|
|
|
237 |
setInfo("Error:" + errorThrown);
|
|
|
238 |
//if fails
|
|
|
239 |
},
|
|
|
240 |
complete : function() {
|
|
|
241 |
$("#progressSpinner").css('visibility', 'hidden');
|
|
|
242 |
$(document.body).css({ 'cursor': 'auto' });
|
|
|
243 |
// call user always function
|
|
|
244 |
if (jQuery.isFunction(always)) {
|
|
|
245 |
always();
|
|
|
246 |
}
|
|
|
247 |
}
|
|
|
248 |
});
|
|
|
249 |
|
|
|
250 |
function setInfo(txt) {
|
|
|
251 |
$("#ds_info").text( txt);
|
|
|
252 |
}
|
|
|
253 |
|
|
|
254 |
function clearInfo(txt) {
|
|
|
255 |
$("#ds_info").text(" ");
|
|
|
256 |
}
|
|
|
257 |
|
|
|
258 |
}
|
|
|
259 |
</script>
|
|
|
260 |
|
|
|
261 |
<!-- DROPDOWN MENUS -->
|
|
|
262 |
<!--#include file="_menu_def.asp"-->
|
|
|
263 |
<script language="JavaScript1.2" src="images/popup_menu.js?ver=<%=VixVerNum%>"></script>
|
|
|
264 |
</head>
|
|
|
265 |
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0">
|
|
|
266 |
<!-- HEADER -->
|
|
|
267 |
<!--#include file="_header.asp"-->
|
|
|
268 |
<!-- BODY ---->
|
|
|
269 |
<table class="full_table">
|
|
|
270 |
<tr>
|
|
|
271 |
<td class="bg_panel" valign="top" style="min-width:146px">
|
|
|
272 |
<%Call ShowSidePanel%>
|
|
|
273 |
</td>
|
|
|
274 |
<td width="100%" rowspan="2" align="center" valign="top" bgcolor="#EEEFEF">
|
|
|
275 |
<%Call ShowMainPanel%>
|
|
|
276 |
</td>
|
|
|
277 |
</tr>
|
|
|
278 |
<tr>
|
|
|
279 |
<td class="bg_panel_btm" height="350"></td>
|
|
|
280 |
</tr>
|
|
|
281 |
</table>
|
|
|
282 |
<!-- FOOTER -->
|
|
|
283 |
<!--#include file="_footer.asp"-->
|
|
|
284 |
</body>
|
|
|
285 |
</html>
|