Author: jfthomps
Date: Thu Jun 2 15:29:55 2016
New Revision: 1746591
URL: http://svn.apache.org/viewvc?rev=1746591&view=rev
Log:
VCL-951 - suggested times not displayed for parent image of clusters when
making imaging reservation
requests.php:
-modified newReservationHTML: (unrelated to JIRA) added check for $id being in
$imagedata to conditional before checking for rootaccess == 1 or user being
owner of image
-modified AJupdateWaitTime: if $type == imaging, set $imaging = 1; modified
conditional checking for cluster to also check that not doing an imaging
reservation
Modified:
vcl/trunk/web/.ht-inc/requests.php
Modified: vcl/trunk/web/.ht-inc/requests.php
URL:
http://svn.apache.org/viewvc/vcl/trunk/web/.ht-inc/requests.php?rev=1746591&r1=1746590&r2=1746591&view=diff
==============================================================================
--- vcl/trunk/web/.ht-inc/requests.php (original)
+++ vcl/trunk/web/.ht-inc/requests.php Thu Jun 2 15:29:55 2016
@@ -1259,7 +1259,8 @@ function newReservationHTML() {
if(array_key_exists($id, $imagedata) &&
! $imagedata[$id]["forcheckout"])
$images[$id]['checkout'] = 0;
- if($imagingaccess && array_key_exists($id,
$imaging['image'])) {
+ if(array_key_exists($id, $imagedata) &&
+ $imagingaccess && array_key_exists($id,
$imaging['image'])) {
if($imagedata[$id]['rootaccess'] == 1 ||
$imagedata[$id]['ownerid'] == $user['id'])
$images[$id]['imaging'] = 1;
else
@@ -1816,6 +1817,8 @@ function AJupdateWaitTime() {
($type == 'imaging' && ! $imagingaccess) ||
($type == 'server' && ! $serveraccess))
return;
+ if($type == 'imaging')
+ $imaging = 1;
# process start
$start = processInputVar('start', ARG_NUMERIC);
@@ -1938,7 +1941,8 @@ function AJupdateWaitTime() {
$cdata['now'] = 1;
$cont = addContinuationsEntry('AJshowRequestSuggestedTimes',
$cdata);
if(array_key_exists('subimages', $images[$imageid]) &&
- count($images[$imageid]['subimages'])) {
+ count($images[$imageid]['subimages']) &&
+ $type != 'imaging') {
print "dojo.byId('suggestcont').value = 'cluster';";
print "dijit.byId('newResDlgBtn').set('disabled',
true);";
}