Modified: vcl/trunk/web/.ht-inc/serverprofiles.php
URL: 
http://svn.apache.org/viewvc/vcl/trunk/web/.ht-inc/serverprofiles.php?rev=1624325&r1=1624324&r2=1624325&view=diff
==============================================================================
--- vcl/trunk/web/.ht-inc/serverprofiles.php (original)
+++ vcl/trunk/web/.ht-inc/serverprofiles.php Thu Sep 11 16:01:48 2014
@@ -29,245 +29,30 @@
 
////////////////////////////////////////////////////////////////////////////////
 function serverProfiles() {
        global $user;
+       if(! in_array("serverProfileAdmin", $user["privileges"])) {
+               print "No access to manage server profiles.<br>\n";
+               return;
+       }
        print "<div dojoType=\"dojo.data.ItemFileWriteStore\" 
jsId=\"profilesstore\" ";
        print "data=\"profilesstoredata\"></div>\n";
-       if(in_array("serverProfileAdmin", $user["privileges"])) {
-               print "<div id=\"mainTabContainer\" 
dojoType=\"dijit.layout.TabContainer\"\n";
-               print "     style=\"width:630px;height:600px\">\n";
-       }
-       print "<div id=\"deploytab\" dojoType=\"dijit.layout.ContentPane\" 
title=\"Deploy Server\" selected=\"true\">\n";
-       $data = deployHTML();
+       print "<div id=\"mainTabContainer\" 
dojoType=\"dijit.layout.TabContainer\"\n";
+       print "     style=\"width:630px;height:600px\">\n";
+
+       print "<div id=\"manageprofiles\" dojoType=\"dijit.layout.ContentPane\" 
title=\"Manage Profiles\">\n";
+       $data = manageProfilesHTML();
        print $data['html'];
-       print "</div>\n"; # deploy tab
+       print "</div>\n"; # manageprofiles tab
 
-       if(in_array("serverProfileAdmin", $user["privileges"])) {
-               print "<div id=\"manageprofiles\" 
dojoType=\"dijit.layout.ContentPane\" title=\"Manage Profiles\">\n";
-               $data = manageProfilesHTML();
-               print $data['html'];
-               print "</div>\n"; # manageprofiles tab
-
-               print "<div id=\"grouping\" 
dojoType=\"dijit.layout.ContentPane\" title=\"Manage Grouping\">\n";
-               $data = manageGroupingHTML();
-               print $data['html'];
-               print "</div>\n"; # grouping tab
-       }
+       print "<div id=\"grouping\" dojoType=\"dijit.layout.ContentPane\" 
title=\"Manage Grouping\">\n";
+       $data = manageGroupingHTML();
+       print $data['html'];
+       print "</div>\n"; # grouping tab
 
        print "</div>\n"; # tab container
 }
 
 
////////////////////////////////////////////////////////////////////////////////
 ///
-/// \fn deployHTML()
-///
-/// \return an array with one element with a key of 'html' whose value is the
-/// html content for the deploy tab
-///
-/// \brief builds the html for the deploy tab
-///
-////////////////////////////////////////////////////////////////////////////////
-function deployHTML() {
-       global $user, $skin;
-       $profiles = getUserResources(array("serverCheckOut"), 
array("available"));
-
-       $h = '';
-       $h .= "<h2>Deploy Server</h2>\n";
-       $h .= "<span id=\"deployprofileslist\"";
-       if(! count($profiles['serverprofile']))
-               $h .= " class=\"hidden\"";
-       $h .= ">\n";
-       $h .= "Profile: ";
-       $h .= "<select dojoType=\"dijit.form.Select\" id=\"deployprofileid\" ";
-       $h .= "onChange=\"deployProfileChanged();\" 
sortByLabel=\"true\"></select><br>\n";
-       $h .= "<fieldset>\n";
-       $h .= "<legend>Description:</legend>\n";
-       $h .= "<div id=\"deploydesc\"></div>\n";
-       $h .= "</fieldset>\n";
-       $cont = addContinuationsEntry('AJserverProfileData', array('mode' => 
'checkout'));
-       $h .= "<button dojoType=\"dijit.form.Button\" 
id=\"deployFetchProfilesBtn\">\n";
-       $h .= " Apply Profile\n";
-       $h .= " <script type=\"dojo/method\" event=onClick>\n";
-       $h .= "         getServerProfileData('$cont', 'deployprofileid', 
getServerProfileDataDeployCB);\n";
-       $h .= " </script>\n";
-       $h .= "</button>";
-       $h .= "<br><hr><br>\n";
-       $h .= "<input type=\"hidden\" id=\"appliedprofileid\" value=\"0\">\n";
-       $h .= "</span>\n"; # deployprofileslist
-
-       $h .= "<div id=\"deployprofilediv\">\n";
-       $h .= "<table summary=\"\">\n";
-       $h .= "  <tr>\n";
-       $h .= "    <th align=right>Name:</th>\n";
-       $h .= "    <td><input type=\"text\" name=\"deployname\" 
id=\"deployname\" ";
-       $h .= "dojoType=\"dijit.form.TextBox\" style=\"width: 400px\"></td>\n";
-       $h .= "  </tr>\n";
-       $h .= "  <tr>\n";
-       $h .= "    <th align=right>Environment:</th>\n";
-       $h .= "    <td>\n";
-       $resources = getUserResources(array("imageAdmin", "imageCheckOut"));
-       $images = removeNoCheckout($resources["image"]);
-       $extraimages = getServerProfileImages($user['id']);
-       foreach($extraimages as $id => $image)
-               $images[$id] = $image;
-       uasort($images, 'sortKeepIndex');
-       if(USEFILTERINGSELECT && count($images) < FILTERINGSELECTTHRESHOLD) {
-               $h .= "      <select dojoType=\"dijit.form.FilteringSelect\" 
id=\"deployimage\" ";
-               $h .= "style=\"width: 400px\" queryExpr=\"*\${0}*\" 
required=\"true\" ";
-               $h .= "highlightMatch=\"all\" autoComplete=\"false\">\n";
-       }
-       else
-               $h .= "      <select dojoType=\"dijit.form.Select\" 
id=\"deployimage\">\n";
-       foreach($images as $id => $image) {
-               $image = preg_replace('/&/', '&amp;', $image);
-               $h .= "        <option value=\"$id\">$image</option>\n";
-       }
-       $h .= "      </select>\n";
-       $h .= "    </td>\n";
-       $h .= "  </tr>\n";
-       /*$h .= "  <tr>\n";
-       $h .= "    <th align=right>Fixed IP Address:</th>\n";
-       $h .= "    <td><input type=\"text\" id=\"deployfixedIP\" ";
-       $h .= "dojoType=\"dijit.form.ValidationTextBox\" ";
-       $h .= "regExp=\"([0-9]{1,3}\\.){3}([0-9]{1,3})\">(optional)</td>\n";
-       $h .= "  </tr>\n";*/
-       /*$h .= "  <tr>\n";
-       $h .= "    <th align=right>Fixed MAC Address:</th>\n";
-       $h .= "    <td><input type=\"text\" id=\"deployfixedMAC\" ";
-       $h .= "dojoType=\"dijit.form.ValidationTextBox\" ";
-       $h .= 
"regExp=\"([0-9a-fA-F]{2}:){5}([0-9a-fA-F]{2})\">(optional)</td>\n";
-       $h .= "  </tr>\n";*/
-       $h .= "  <tr>\n";
-       $h .= "    <th align=right>Admin User Group:</th>\n";
-       $h .= "    <td>\n";
-       $admingroups = getUserGroups();
-       $logingroups = $admingroups;
-       /*$admingroups = getUserEditGroups($user['id']);
-       $logingroups = $admingroups;
-       $extraadmingroups = getServerProfileGroups($user['id'], 'admin');
-       foreach($extraadmingroups as $id => $group)
-               $admingroups[$id] = $group;
-       uasort($admingroups, 'sortKeepIndex');*/
-       if(USEFILTERINGSELECT && count($admingroups) < 
FILTERINGSELECTTHRESHOLD) {
-               $h .= "      <select dojoType=\"dijit.form.FilteringSelect\" 
id=\"deployadmingroup\" ";
-               $h .= "style=\"width: 400px\" queryExpr=\"*\${0}*\" 
required=\"true\" ";
-               $h .= "highlightMatch=\"all\" autoComplete=\"false\">\n";
-       }
-       else
-               $h .= "      <select id=\"deployadmingroup\">\n";
-       $h .= "        <option value=\"0\">None</option>\n";
-       foreach($admingroups as $id => $group) {
-               if($group['name'] == 'None' || preg_match('/^None@.*$/', 
$group['name']))
-                       continue;
-               $h .= "        <option 
value=\"$id\">{$group['name']}</option>\n";
-       }
-       #foreach($admingroups as $id => $group)
-       #       $h .= "        <option value=\"$id\">$group</option>\n";
-       $h .= "      </select>\n";
-       $h .= "    </td>\n";
-       $h .= "  </tr>\n";
-       $h .= "  <tr>\n";
-       $h .= "    <th align=right>Access User Group:</th>\n";
-       $h .= "    <td>\n";
-       /*$extralogingroups = getServerProfileGroups($user['id'], 'login');
-       foreach($extralogingroups as $id => $group)
-               $logingroups[$id] = $group;
-       uasort($logingroups, 'sortKeepIndex');*/
-       if(USEFILTERINGSELECT && count($logingroups) < 
FILTERINGSELECTTHRESHOLD) {
-               $h .= "      <select dojoType=\"dijit.form.FilteringSelect\" 
id=\"deploylogingroup\" ";
-               $h .= "style=\"width: 400px\" queryExpr=\"*\${0}*\" 
required=\"true\" ";
-               $h .= "highlightMatch=\"all\" autoComplete=\"false\">\n";
-       }
-       else
-               $h .= "      <select id=\"deploylogingroup\">\n";
-       $h .= "        <option value=\"0\">None</option>\n";
-       foreach($logingroups as $id => $group) {
-               if($group['name'] == 'None' || preg_match('/^None@.*$/', 
$group['name']))
-                       continue;
-               $h .= "        <option 
value=\"$id\">{$group['name']}</option>\n";
-       }
-       #foreach($logingroups as $id => $group)
-       #       $h .= "        <option value=\"$id\">$group</option>\n";
-       $h .= "      </select>\n";
-       $h .= "    </td>\n";
-       $h .= "  </tr>\n";
-       $h .= "  <tr class=\"hidden\">\n";
-       $h .= "    <th align=right>Monitored:</th>\n";
-       $h .= "    <td><input type=\"checkbox\" ";
-       $h .= "id=\"deploymonitored\" dojoType=\"dijit.form.CheckBox\"></td>\n";
-       $h .= "  </tr>\n";
-       $h .= "</table><br><br>\n";
-       $h .= "When would you like to deploy the server?<br>\n";
-       $h .= "&nbsp;&nbsp;&nbsp;";
-       $h .= "<input type=\"radio\" id=\"startnow\" name=\"deploystart\" ";
-       $h .= "onclick=\"setStartNow();\" checked>\n";
-       $h .= "<label for=\"startnow\">Now</label><br>\n";
-       $h .= "&nbsp;&nbsp;&nbsp;";
-       $h .= "<input type=\"radio\" id=\"startlater\" name=\"deploystart\" ";
-       $h .= "onclick=\"setStartLater();\">\n";
-       $h .= "<label for=\"startlater\">Later:</label>\n";
-       $h .= "<div dojoType=\"dijit.form.DateTextBox\" ";
-       $h .= "id=\"deploystartdate\" onChange=\"setStartLater();\" ";
-       $h .= "style=\"width: 88px\"></div>\n";
-       $h .= "<div id=\"deploystarttime\" dojoType=\"dijit.form.TimeTextBox\" 
";
-       $h .= "style=\"width: 88px\" onChange=\"setStartLater();\"></div>\n";
-       $h .= "<small>(" . date('T') . ")</small><br><br>\n";
-       $h .= "Ending for server:<br>\n";
-       $h .= "&nbsp;&nbsp;&nbsp;";
-       $h .= "<input type=\"radio\" id=\"endindef\" name=\"deployend\" ";
-       $h .= "onclick=\"setEndIndef();\" checked>\n"; # TODO should this 
'checked' be hard coded?
-       $h .= "<label for=\"endindef\">Indefinite</label><br>\n";
-       $h .= "&nbsp;&nbsp;&nbsp;";
-       $h .= "<input type=\"radio\" id=\"endat\" name=\"deployend\" ";
-       $h .= "onclick=\"setEndAt();\">\n";
-       $h .= "<label for=\"endat\">At this time:</label>\n";
-       $h .= "<div type=\"text\" dojoType=\"dijit.form.DateTextBox\" ";
-       $h .= "id=\"deployenddate\" onChange=\"setEndAt();\" ";
-       $h .= "style=\"width: 88px\"></div>\n";
-       $h .= "<div type=\"text\" id=\"deployendtime\" 
dojoType=\"dijit.form.TimeTextBox\" ";
-       $h .= "style=\"width: 88px\" onChange=\"setEndAt();\"></div>\n";
-       $h .= "<small>(" . date('T') . ")</small><br><br>\n";
-       $h .= "<div class=\"rederrormsg hidden\" id=\"deployerr\"></div>\n";
-       $cont = addContinuationsEntry('AJdeployServer', array(), SECINDAY, 1, 
0);
-       $h .= "<button dojoType=\"dijit.form.Button\" id=\"deploybtn\">\n";
-       $h .= "  Deploy Server\n";
-       $h .= "  <script type=\"dojo/method\" event=onClick>\n";
-       $h .= "    submitDeploy();\n";
-       $h .= "  </script>\n";
-       $h .= "</button><br><br>\n";
-       $h .= "<input type=\"hidden\" id=\"deploycont\" value=\"$cont\">\n";
-       $h .= "</div>\n"; # deployprofilediv
-
-       $h .= "<div dojoType=dijit.Dialog\n";
-       $h .= "      id=\"suggestedTimes\"\n";
-       $h .= "      title=\"Available Times\"\n";
-       $h .= "      duration=250\n";
-       $h .= "      draggable=true>\n";
-       $h .= "   <div id=\"suggestloading\" style=\"text-align: center\">";
-       $h .= "<img src=\"themes/$skin/css/dojo/images/loading.gif\" 
style=\"vertical-align: middle;\"> Loading...</div>\n";
-       $h .= "   <div id=\"suggestContent\"></div>\n";
-       $h .= "   <input type=\"hidden\" id=\"suggestcont\">\n";
-       $h .= "   <input type=\"hidden\" id=\"selectedslot\">\n";
-       $h .= "   <div align=\"center\">\n";
-       $h .= "   <button id=\"suggestDlgBtn\" dojoType=\"dijit.form.Button\" 
disabled>\n";
-       $h .= "     Use Selected Time\n";
-       $h .= "    <script type=\"dojo/method\" event=\"onClick\">\n";
-       $h .= "       useSuggestedDeploySlot();\n";
-       $h .= "     </script>\n";
-       $h .= "   </button>\n";
-       $h .= "   <button id=\"suggestDlgCancelBtn\" 
dojoType=\"dijit.form.Button\">\n";
-       $h .= "     Cancel\n";
-       $h .= "    <script type=\"dojo/method\" event=\"onClick\">\n";
-       $h .= "       dijit.byId('suggestDlgBtn').set('disabled', true);\n";
-       $h .= "       dijit.byId('suggestedTimes').hide();\n";
-       $h .= "       dojo.byId('suggestContent').innerHTML = '';\n";
-       $h .= "     </script>\n";
-       $h .= "   </button>\n";
-       $h .= "   </div>\n";
-       $h .= "</div>\n";
-       return array('html' => $h);
-}
-
-////////////////////////////////////////////////////////////////////////////////
-///
 /// \fn manageProfilesHTML()
 ///
 /// \return an array with one element with a key of 'html' whose value is the
@@ -343,12 +128,6 @@ function manageProfilesHTML() {
        $h .= "    </td>\n";
        $h .= "  </tr>\n";
        /*$h .= "  <tr>\n";
-       $h .= "    <th align=right>Fixed IP Address:</th>\n";
-       $h .= "    <td><input type=\"text\" name=\"profilefixedIP\" 
id=\"profilefixedIP\" ";
-       $h .= "dojoType=\"dijit.form.ValidationTextBox\" ";
-       $h .= "regExp=\"([0-9]{1,3}\\.){3}([0-9]{1,3})\">(optional)</td>\n";
-       $h .= "  </tr>\n";*/
-       /*$h .= "  <tr>\n";
        $h .= "    <th align=right>Fixed MAC Address:</th>\n";
        $h .= "    <td><input type=\"text\" name=\"profilefixedMAC\" 
id=\"profilefixedMAC\" ";
        $h .= "dojoType=\"dijit.form.ValidationTextBox\" ";
@@ -357,7 +136,10 @@ function manageProfilesHTML() {
        $h .= "  <tr>\n";
        $h .= "    <th align=right>Admin User Group:</th>\n";
        $h .= "    <td>\n";
-       $admingroups = getUserGroups();
+       if($user['showallgroups'])
+               $admingroups = getUserGroups();
+       else
+               $admingroups = getUserGroups(0, $user['affiliationid']);
        $logingroups = $admingroups;
        /*$admingroups = getUserEditGroups($user['id']);
        $logingroups = $admingroups;
@@ -413,6 +195,36 @@ function manageProfilesHTML() {
        $h .= "    <td><input type=\"checkbox\" name=\"profilemonitored\" ";
        $h .= "id=\"profilemonitored\" 
dojoType=\"dijit.form.CheckBox\"></td>\n";
        $h .= "  </tr>\n";
+       $h .= "  <tbody class=\"boxedtablerows\">\n";
+       $regip1 = "(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)";
+       $regip4 = "$regip1\\.$regip1\\.$regip1\\.$regip1";
+       $h .= "  <tr>\n";
+       $h .= "    <th align=right>Fixed IP Address:</th>\n";
+       $h .= "    <td><input type=\"text\" name=\"profilefixedIP\" 
id=\"profilefixedIP\" ";
+       $h .= "dojoType=\"dijit.form.ValidationTextBox\" ";
+       $h .= "regExp=\"$regip4\" 
onKeyUp=\"checkFixedSet('profile');\">(optional)</td>\n";
+       $h .= "  </tr>\n";
+       $h .= "  <tr>\n";
+       $h .= "    <th align=right>Netmask:</th>\n";
+       $h .= "    <td><input type=\"text\" id=\"profilenetmask\" ";
+       $h .= "dojoType=\"dijit.form.ValidationTextBox\" ";
+       $h .= "regExp=\"$regip4\" validator=\"validateNetmask\" ";
+       $h .= "onKeyUp=\"fetchRouterDNS('profile');\" disabled>";
+       $h .= "</td>\n";
+       $h .= "  </tr>\n";
+       $h .= "  <tr>\n";
+       $h .= "    <th align=right>Router:</th>\n";
+       $h .= "    <td><input type=\"text\" id=\"profilerouter\" ";
+       $h .= "dojoType=\"dijit.form.ValidationTextBox\" ";
+       $h .= "regExp=\"$regip4\" disabled></td>\n";
+       $h .= "  </tr>\n";
+       $h .= "  <tr>\n";
+       $h .= "    <th align=right>DNS Server(s):</th>\n";
+       $h .= "    <td><input type=\"text\" id=\"profiledns\" ";
+       $h .= "dojoType=\"dijit.form.ValidationTextBox\" ";
+       $h .= "regExp=\"($regip4)(,$regip4){0,2}\" disabled></td>\n";
+       $h .= "  </tr>\n";
+       $h .= "  </tbody>\n";
        $h .= "</table>\n";
        $cont = addContinuationsEntry('AJsaveServerProfile');
        $h .= "<br><br>\n";
@@ -639,8 +451,12 @@ function AJserverProfileData() {
        unset($data['owner']);
        unset($data['admingroup']);
        unset($data['logingroup']);
-       if($data['fixedIP'] == 'NULL')
+       if($data['fixedIP'] == 'NULL') {
                $data['fixedIP'] = '';
+               $data['netmask'] = '';
+               $data['router'] = '';
+               $data['dns'] = '';
+       }
        if($data['fixedMAC'] == 'NULL')
                $data['fixedMAC'] = '';
        if(is_null($data['admingroupid']))
@@ -682,296 +498,6 @@ function AJserverProfileStoreData() {
 
 
////////////////////////////////////////////////////////////////////////////////
 ///
-/// \fn AJdeployServer()
-///
-/// \brief processes request information and creates reservation if everything
-/// ok
-///
-////////////////////////////////////////////////////////////////////////////////
-function AJdeployServer() {
-       global $user, $remoteIP;
-       $profilename = processInputVar('name', ARG_STRING);
-       $profileid = processInputVar('profileid', ARG_NUMERIC);
-       $imageid = processInputVar('imageid', ARG_NUMERIC);
-       $resources = getUserResources(array("imageAdmin", "imageCheckOut"));
-       $images = removeNoCheckout($resources["image"]);
-       $extraimages = getServerProfileImages($user['id']);
-       if(! array_key_exists($imageid, $images) &&
-          ! array_key_exists($imageid, $extraimages)) {
-               $cont = addContinuationsEntry('AJdeployServer', array(), 
SECINDAY, 1, 0);
-               $data = array('error' => 1,
-                             'cont' => $cont,
-                             'msg' => 'You do not have access to use this 
environment.');
-               sendJSON($data);
-               return;
-       }
-       if(! preg_match('/^([-a-zA-Z0-9_\. ]){0,255}$/', $profilename)) {
-               $cont = addContinuationsEntry('AJdeployServer', array(), 
SECINDAY, 1, 0);
-               $data = array('error' => 1,
-                             'cont' => $cont,
-                             'msg' => "The name can only contain letters, 
numbers, spaces, dashes(-), "
-                                   . "underscores(_), and periods(.) and can 
be up to 255 characters long");
-               sendJSON($data);
-               return;
-       }
-       $ipaddr = processInputVar('ipaddr', ARG_STRING);
-       $ipaddrArr = explode('.', $ipaddr);
-       if($ipaddr != '' && (! 
preg_match('/^(([0-9]){1,3}\.){3}([0-9]){1,3}$/', $ipaddr) ||
-               $ipaddrArr[0] < 1 || $ipaddrArr[0] > 255 ||
-               $ipaddrArr[1] < 0 || $ipaddrArr[1] > 255 ||
-               $ipaddrArr[2] < 0 || $ipaddrArr[2] > 255 ||
-               $ipaddrArr[3] < 0 || $ipaddrArr[3] > 255)) {
-               $cont = addContinuationsEntry('AJdeployServer', array(), 
SECINDAY, 1, 0);
-               $data = array('error' => 1,
-                             'cont' => $cont,
-                             'msg' => "Invalid IP address. Must be w.x.y.z 
with each of "
-                                   . "w, x, y, and z being between 1 and 255 
(inclusive)");
-               sendJSON($data);
-               return;
-       }
-       $macaddr = processInputVar('macaddr', ARG_STRING);
-       if($macaddr != '' && ! 
preg_match('/^(([A-Fa-f0-9]){2}:){5}([A-Fa-f0-9]){2}$/', $macaddr)) {
-               $cont = addContinuationsEntry('AJdeployServer', array(), 
SECINDAY, 1, 0);
-               $data = array('error' => 1,
-                             'cont' => $cont,
-                             'msg' => "Invalid MAC address.  Must be 
XX:XX:XX:XX:XX:XX "
-                                   . "with each pair of XX being from 00 to FF 
(inclusive)");
-               sendJSON($data);
-               return;
-       }
-       $admingroupid = processInputVar('admingroupid', ARG_NUMERIC);
-       $usergroups = getUserGroups();
-       /*$usergroups = getUserEditGroups($user['id']);
-       $extraadmingroups = getServerProfileGroups($user['id'], 'admin');*/
-       if($admingroupid != 0 && ! array_key_exists($admingroupid, $usergroups) 
/*&&
-               ! array_key_exists($admingroupid, $extraadmingroups)*/) {
-               $cont = addContinuationsEntry('AJdeployServer', array(), 
SECINDAY, 1, 0);
-               $data = array('error' => 1,
-                             'cont' => $cont,
-                             'msg' => "You do not have access to use the 
specified admin user group.");
-               sendJSON($data);
-               return;
-       }
-       $logingroupid = processInputVar('logingroupid', ARG_NUMERIC);
-       #$extralogingroups = getServerProfileGroups($user['id'], 'login');
-       if($logingroupid != 0 && ! array_key_exists($logingroupid, $usergroups) 
/*&&
-               ! array_key_exists($logingroupid, $extralogingroups)*/) {
-               $cont = addContinuationsEntry('AJdeployServer', array(), 
SECINDAY, 1, 0);
-               $data = array('error' => 1,
-                             'cont' => $cont,
-                             'msg' => "You do not have access to use the 
specified access user group.");
-               sendJSON($data);
-               return;
-       }
-       $monitored = processInputVar('monitored', ARG_NUMERIC);
-       if($monitored != 0 && $monitored != 1)
-               $monitored = 0;
-       $startmode = processInputVar('startmode', ARG_NUMERIC);
-       if($startmode != 0 && $startmode != 1) {
-               $cont = addContinuationsEntry('AJdeployServer', array(), 
SECINDAY, 1, 0);
-               $data = array('error' => 1,
-                             'cont' => $cont,
-                             'msg' => "Invalid start information submitted");
-               sendJSON($data);
-               return;
-       }
-       $endmode = processInputVar('endmode', ARG_NUMERIC);
-       if($endmode != 0 && $endmode != 1) {
-               $cont = addContinuationsEntry('AJdeployServer', array(), 
SECINDAY, 1, 0);
-               $data = array('error' => 1,
-                             'cont' => $cont,
-                             'msg' => "Invalid end information submitted");
-               sendJSON($data);
-               return;
-       }
-       if($startmode == 1) {
-               $tmp = processInputVar('start', ARG_NUMERIC);
-               if(! preg_match('/^(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})$/', 
$tmp, $matches)) {
-                       $cont = addContinuationsEntry('AJdeployServer', 
array(), SECINDAY, 1, 0);
-                       $data = array('error' => 1,
-                                     'cont' => $cont,
-                                     'msg' => "Invalid start date/time 
submitted");
-                       sendJSON($data);
-                       return;
-               }
-               $startts = 
datetimeToUnix("{$matches[1]}-{$matches[2]}-{$matches[3]} 
{$matches[4]}:{$matches[5]}:00");
-       }
-       else {
-               $tmp = time();
-               $startts = unixFloor15();
-       }
-       if($endmode == 1) {
-               $tmp = processInputVar('end', ARG_NUMERIC);
-               if(! preg_match('/^(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})$/', 
$tmp, $matches)) {
-                       $cont = addContinuationsEntry('AJdeployServer', 
array(), SECINDAY, 1, 0);
-                       $data = array('error' => 1,
-                                     'cont' => $cont,
-                                     'msg' => "Invalid end date/time 
submitted");
-                       sendJSON($data);
-                       return;
-               }
-               $endts = 
datetimeToUnix("{$matches[1]}-{$matches[2]}-{$matches[3]} 
{$matches[4]}:{$matches[5]}:00");
-       }
-       else {
-               $tmp = time();
-               $endts = datetimeToUnix("2038-01-01 00:00:00");
-       }
-
-       $resources = getUserResources(array("serverCheckOut", 
"serverProfileAdmin"),
-                                     array("available","administer"));
-       if(! array_key_exists($profileid, $resources['serverprofile']))
-               $profileid = 0;
-       elseif($profileid != 0) {
-               $tmp = getServerProfiles($profileid);
-               $tmp = $tmp[$profileid];
-               if($tmp['imageid'] != $imageid &&
-                  (($tmp['fixedIP'] != $ipaddr && $tmp['fixedMAC'] != 
$macaddr) ||
-                  ($tmp['fixedIP'] == $ipaddr && $ipaddr == '' && 
$tmp['fixedMAC'] == $macaddr && $macaddr == '')))
-                       $profileid = 0;
-       }
-
-       // TODO handle selection of multiple revisions
-
-       // get semaphore lock
-       if(! semLock())
-               abort(3);
-
-       $revisionid = getProductionRevisionid($imageid);
-       $images = getImages(0, $imageid);
-       $availablerc = isAvailable($images, $imageid, $revisionid, $startts, 
$endts,
-                                  0, 0, 0, 0, $ipaddr, $macaddr);
-       if($availablerc < 1) {
-               $cdata = array('start' => $startts, 
-                              'end' => $endts,
-                              'imageid' => $imageid,
-                              'server' => 1,
-                              'ip' => $ipaddr,
-                              'mac' => $macaddr);
-               if($startmode == 0)
-                       $cdata['now'] = 1;
-               else 
-                       $cdata['now'] = 0;
-               $sugcont = addContinuationsEntry('AJshowRequestSuggestedTimes', 
$cdata);
-       }
-       if($availablerc == -3) {
-               $cont = addContinuationsEntry('AJdeployServer', array(), 
SECINDAY, 1, 0);
-               $msg = "The IP or MAC address you specified overlaps with 
another "
-                    . "reservation using the same IP or MAC address you 
specified. "
-                    . "Please use a different IP or MAC or select a different 
time "
-                    . "to deploy the server.";
-               $data = array('error' => 2,
-                             'cont' => $cont,
-                             'sugcont' => $sugcont,
-                             'msg' => $msg);
-               sendJSON($data);
-               return;
-       }
-       $max = getMaxOverlap($user['id']);
-       if($availablerc > 0 && checkOverlap($startts, $endts, $max)) {
-               $cont = addContinuationsEntry('AJdeployServer', array(), 
SECINDAY, 1, 0);
-               if($max == 0)
-                       $msg = "The time you specified overlaps with another 
reservation you "
-                            . "currently have. You are only allowed to have a 
single "
-                            . "reservation at a time. You either need to end 
your existing "
-                            . "reservation or specify a time for this one that 
does not "
-                            . "overlap with your other reservation.";
-               else
-                       $msg = "The time you specified overlaps with other 
reservations you "
-                            . "currently have. You are allowed to have $max 
overlapping "
-                            . "reservations at a time. You either need to end 
an existing "
-                            . "reservation or specify a time for this one that 
does not "
-                            . "overlap with your other reservations.";
-               $data = array('error' => 1,
-                             'cont' => $cont,
-                             'msg' => $msg);
-               sendJSON($data);
-               return;
-       }
-       if($availablerc == -1) {
-               $cont = addContinuationsEntry('AJdeployServer', array(), 
SECINDAY, 1, 0);
-               $msg = "You have requested an environment that is limited in 
the number "
-                    . "of concurrent reservations that can be made. No further 
"
-                    . "reservations for the environment can be made for the 
time you "
-                    . "have selected. Please select another time to use the "
-                    . "environment.";
-               $data = array('error' => 2,
-                             'cont' => $cont,
-                             'sugcont' => $sugcont,
-                             'msg' => $msg);
-               sendJSON($data);
-               return;
-       }
-       if($availablerc == -2) {
-               $cont = addContinuationsEntry('AJdeployServer', array(), 
SECINDAY, 1, 0);
-               $msg = "The time period you selected is not available due to 
scheduled "
-                    . "system downtime for maintenance. Please select another 
time to use "
-                    . "the environment.";
-               $data = array('error' => 2,
-                             'cont' => $cont,
-                             'sugcont' => $sugcont,
-                             'msg' => $msg);
-               sendJSON($data);
-               return;
-       }
-       if($availablerc == 0) {
-               $cont = addContinuationsEntry('AJdeployServer', array(), 
SECINDAY, 1, 0);
-               $msg = "The requested time period is not available. Please 
select a "
-                    . "different time.";
-               $data = array('error' => 2,
-                             'cont' => $cont,
-                             'sugcont' => $sugcont,
-                             'msg' => $msg);
-               sendJSON($data);
-               return;
-       }
-       $requestid = addRequest();
-       $query = "UPDATE reservation "
-              . "SET remoteIP = '$remoteIP' "
-              . "WHERE requestid = $requestid";
-       doQuery($query);
-       $fields = array('requestid', 'serverprofileid');
-       $values = array($requestid, $profileid);
-       if($profilename == '') {
-               $fields[] = 'name';
-               $profilename = $images[$imageid]['prettyname'];
-               $values[] = "'$profilename'";
-       }
-       else {
-               $fields[] = 'name';
-               $profilename = mysql_real_escape_string($profilename);
-               $values[] = "'$profilename'";
-       }
-       if($ipaddr != '') {
-               $fields[] = 'fixedIP';
-               $values[] = "'$ipaddr'";
-       }
-       if($macaddr != '') {
-               $fields[] = 'fixedMAC';
-               $values[] = "'$macaddr'";
-       }
-       if($admingroupid != 0) {
-               $fields[] = 'admingroupid';
-               $values[] = $admingroupid;
-       }
-       if($logingroupid != 0) {
-               $fields[] = 'logingroupid';
-               $values[] = $logingroupid;
-       }
-       if($monitored != 0) {
-               $fields[] = 'monitored';
-               $values[] = 1;
-       }
-       $allfields = implode(',', $fields);
-       $allvalues = implode(',', $values);
-       $query = "INSERT INTO serverrequest ($allfields) VALUES ($allvalues)";
-       doQuery($query, 101);
-       $ret['success'] = 1;
-       $ret['redirecturl'] = BASEURL . SCRIPT . "?mode=viewRequests";
-       sendJSON($ret);
-}
-
-////////////////////////////////////////////////////////////////////////////////
-///
 /// \fn AJsaveServerProfile
 ///
 /// \brief updates server profile information
@@ -1023,14 +549,20 @@ function AJsaveServerProfile() {
                $ret['name'] = $data['name'];
                $ret['id'] = $id;
                $ret['newprofile'] = 1;
+               if($fixedIP != '') {
+                       $vdata = array('netmask' => $data['netmask'],
+                                      'router' => $data['router'],
+                                      'dns' => $data['dnsArr']);
+                       setVariable("fixedIPsp$id", $vdata, 'yaml');
+               }
        }
        else {
                $query = "UPDATE serverprofile SET "
                       .        "name = '$name', "
                       .        "description = '$desc', "
                       .        "imageid = {$data['imageid']}, "
-                      .        "fixedIP = '{$data['fixedIP']}', "
-                      .        "fixedMAC = '{$data['fixedMAC']}', "
+                      .        "fixedIP = '$fixedIP', "
+                      .        "fixedMAC = '$fixedMAC', "
                       .        "admingroupid = {$data['admingroupid']}, "
                       .        "logingroupid = {$data['logingroupid']}, "
                       .        "monitored = {$data['monitored']} "
@@ -1041,6 +573,21 @@ function AJsaveServerProfile() {
                $ret['id'] = $data['profileid'];
                $ret['newprofile'] = 0;
        }
+       if($data['fixedIP'] != '') {
+               $vdata = array('netmask' => $data['netmask'],
+                              'router' => $data['router'],
+                              'dns' => $data['dnsArr']);
+               setVariable("fixedIPsp{$ret['id']}", $vdata, 'yaml');
+               $ret['netmask'] = $data['netmask'];
+               $ret['router'] = $data['router'];
+               $ret['dns'] = $data['dns'];
+               $allnets = getVariable('fixedIPavailnetworks', array());
+               $network = ip2long($data['fixedIP']) & 
ip2long($data['netmask']);
+               $key = long2ip($network) . "/{$data['netmask']}";
+               $allnets[$key] = array('router' => $data['router'],
+                                      'dns' => $data['dnsArr']);
+               setVariable('fixedIPavailnetworks', $allnets, 'yaml');
+       }
        $ret['access'] = 'admin';
        $ret['desc'] = preg_replace("/\n/", "<br>", $data['desc']);
        $_SESSION['usersessiondata'] = array();
@@ -1105,11 +652,15 @@ function processProfileInput() {
        $ret['name'] = processInputVar('name', ARG_STRING);
        $ret['desc'] = processInputVar('desc', ARG_STRING);
        $ret['imageid'] = processInputVar('imageid', ARG_NUMERIC);
-       $ret['fixedIP'] = processInputVar('fixedIP', ARG_STRING);
        $ret['fixedMAC'] = processInputVar('fixedMAC', ARG_STRING);
        $ret['admingroupid'] = processInputVar('admingroupid', ARG_NUMERIC);
        $ret['logingroupid'] = processInputVar('logingroupid', ARG_NUMERIC);
        $monitored = processInputVar('monitored', ARG_STRING);
+       $ret['fixedIP'] = processInputVar('fixedIP', ARG_STRING);
+       $ret['netmask'] = processInputVar('netmask', ARG_STRING);
+       $ret['router'] = processInputVar('router', ARG_STRING);
+       $ret['dns'] = processInputVar('dns', ARG_STRING);
+       $ret['dnsArr'] = array();
 
        $err = array();
 
@@ -1150,17 +701,56 @@ function processProfileInput() {
        $addrArr = explode('.', $ret['fixedIP']);
        if($ret['fixedIP'] == '')
                $ret['fixedIP'] = 'NULL';
-       elseif(! preg_match('/^(([0-9]){1,3}\.){3}([0-9]){1,3}$/', 
$ret['fixedIP']) ||
-               $addrArr[0] < 1 || $addrArr[0] > 255 ||
-               $addrArr[1] < 0 || $addrArr[1] > 255 ||
-               $addrArr[2] < 0 || $addrArr[2] > 255 ||
-               $addrArr[3] < 1 || $addrArr[3] > 255) {
-          $err['msg'] = "Invalid value for Fixed IP Address. Must be w.x.y.z 
with each of "
-                       . "w, x, y, and z being between 1 and 255 (inclusive)";
+       elseif(! validateIPv4addr($ret['fixedIP'])) {
+               $err['msg'] = "Invalid value for Fixed IP Address. Must be 
w.x.y.z with each of "
+                           . "w, x, y, and z being between 1 and 255 
(inclusive)";
                $err['field'] = 'fixedIP';
                $err['error'] = 1;
                return $err;
        }
+       elseif(! preg_match('/^[1]+0[^1]+$/', sprintf('%032b', 
ip2long($ret['netmask'])))) {
+               $err['msg'] = "Invalid netmask specified";
+               $err['field'] = 'netmask';
+               $err['error'] = 1;
+               return $err;
+       }
+       elseif(! validateIPv4addr($ret['router'])) {
+               $err['msg'] = "Invalid value for Router. Must be w.x.y.z with 
each of "
+                           . "w, x, y, and z being between 1 and 255 
(inclusive)";
+               $err['field'] = 'router';
+               $err['error'] = 1;
+               return $err;
+       }
+       elseif((ip2long($ret['fixedIP']) & ip2long($ret['netmask'])) !=
+              (ip2long($ret['router']) & ip2long($ret['netmask']))) {
+               $err['msg'] = "IP address and router are not on the same subnet 
"
+                           . "based on the specified netmask.";
+               $err['field'] = 'router';
+               $err['error'] = 1;
+               return $err;
+       }
+       if($ret['fixedIP'] != '') {
+               $tmp = explode(',', $ret['dns']);
+               $cnt = 0;
+               foreach($tmp as $dnsaddr) {
+                       if($cnt && $dnsaddr == '')
+                               continue;
+                       if($cnt == 3) {
+                               $err['msg'] = "Too many DNS servers specified - 
up to 3 are allowed.";
+                               $err['field'] = 'dns';
+                               $err['error'] = 1;
+                               return $err;
+                       }
+                       if(! validateIPv4addr($dnsaddr)) {
+                               $err['msg'] = "Invalid DNS server specified";
+                               $err['field'] = 'dns';
+                               $err['error'] = 1;
+                               return $err;
+                       }
+                       $ret['dnsArr'][] = $dnsaddr;
+                       $cnt++;
+               }
+       }
 
        if($ret['fixedMAC'] == '')
                $ret['fixedMAC'] = 'NULL';
@@ -1210,111 +800,6 @@ function processProfileInput() {
 
 
////////////////////////////////////////////////////////////////////////////////
 ///
-/// \fn getServerProfiles($id)
-///
-/// \param $id - (optional) if specified, only return data for specified 
profile
-///
-/// \return an array where each key is a profile id whose value is an array 
with
-/// these values:\n
-/// \b name - profile name\n
-/// \b description - profile description\n
-/// \b imageid - id of image associated with profile\n
-/// \b image - pretty name of image associated with profile\n
-/// \b ownerid - user id of owner of profile\n
-/// \b owner - unityid of owner of profile\n
-/// \b fixedIP - IP address to be used with deployed profile\n
-/// \b fixedMAC - MAC address to be used with deployed profile\n
-/// \b admingroupid - id of admin user group associated with profile\n
-/// \b admingroup - name of admin user group associated with profile\n
-/// \b logingroupid - id of login user group associated with profile\n
-/// \b logingroup - name of login user group associated with profile\n
-/// \b monitored - whether or not deployed profile should be monitored\n
-/// \b resourceid - resource id of profile
-///
-/// \brief gets information about server profiles
-///
-////////////////////////////////////////////////////////////////////////////////
-function getServerProfiles($id=0) {
-       $key = getKey(array('getServerProfiles', $id));
-       if(array_key_exists($key, $_SESSION['usersessiondata']))
-               return $_SESSION['usersessiondata'][$key];
-       $query = "SELECT s.id, "
-              .        "s.name, "
-              .        "s.description, "
-              .        "s.imageid, "
-              .        "i.prettyname AS image, "
-              .        "s.ownerid, "
-              .        "CONCAT(u.unityid, '@', a.name) AS owner, "
-              .        "s.fixedIP, "
-              .        "s.fixedMAC, "
-              .        "s.admingroupid, "
-              .        "CONCAT(ga.name, '@', aa.name) AS admingroup, "
-              .        "s.logingroupid, "
-              .        "CONCAT(gl.name, '@', al.name) AS logingroup, "
-              .        "s.monitored, "
-              .        "r.id AS resourceid "
-              . "FROM serverprofile s "
-              . "LEFT JOIN image i ON (i.id = s.imageid) "
-              . "LEFT JOIN user u ON (u.id = s.ownerid) "
-              . "LEFT JOIN affiliation a ON (a.id = u.affiliationid) "
-              . "LEFT JOIN usergroup ga ON (ga.id = s.admingroupid) "
-              . "LEFT JOIN affiliation aa ON (aa.id = ga.affiliationid) "
-              . "LEFT JOIN usergroup gl ON (gl.id = s.logingroupid) "
-              . "LEFT JOIN affiliation al ON (al.id = gl.affiliationid) "
-              . "LEFT JOIN resource r ON (r.subid = s.id) "
-              . "WHERE r.resourcetypeid = 17 ";
-       if($id != 0)
-               $query .= "AND s.id = $id";
-       else
-               $query .= "ORDER BY name";
-       $qh = doQuery($query, 101);
-       $profiles = array();
-       while($row = mysql_fetch_assoc($qh))
-               $profiles[$row['id']] = $row;
-       $_SESSION['usersessiondata'][$key] = $profiles;
-       return $profiles;
-}
-
-////////////////////////////////////////////////////////////////////////////////
-///
-/// \fn getServerProfileImages($userid)
-///
-/// \param $userid - id from user table
-///
-/// \return array where the key is the id of the image and the value is the
-/// prettyname of the image
-///
-/// \brief builds an array of images that user has access to via server 
profiles
-///
-////////////////////////////////////////////////////////////////////////////////
-function getServerProfileImages($userid) {
-       $key = getKey(array('getServerProfileImages', $userid));
-       if(array_key_exists($key, $_SESSION['usersessiondata']))
-               return $_SESSION['usersessiondata'][$key];
-       $resources = getUserResources(array('serverCheckOut', 
'serverProfileAdmin'),
-                                     array('available', 'administer'));
-       $ids = array_keys($resources['serverprofile']);
-       $inids = implode(',', $ids);
-       if(empty($inids)) {
-               $_SESSION['usersessiondata'][$key] = array();
-               return array();
-       }
-       $query = "SELECT i.id, "
-              .        "i.prettyname AS image "
-              . "FROM serverprofile s, "
-              .      "image i "
-              . "WHERE s.imageid = i.id AND "
-              .       "s.id IN ($inids)";
-       $qh = doQuery($query, 101);
-       $profiles = array();
-       while($row = mysql_fetch_assoc($qh))
-               $profiles[$row['id']] = $row['image'];
-       $_SESSION['usersessiondata'][$key] = $profiles;
-       return $profiles;
-}
-
-////////////////////////////////////////////////////////////////////////////////
-///
 /// \fn getServerProfileGroups($userid, $type)
 ///
 /// \param $userid - id from user table
@@ -1639,4 +1124,44 @@ function AJremProfileFromGroup() {
        }
        sendJSON($arr);
 }
+
+////////////////////////////////////////////////////////////////////////////////
+///
+/// \fn AJfetchRouterDNS()
+///
+/// \brief get router and dns information for a given IP address
+///
+////////////////////////////////////////////////////////////////////////////////
+function AJfetchRouterDNS() {
+       $data = array('status' => 'none');
+       $page = processInputVar('page', ARG_STRING);
+       if($page != 'deploy' && $page != 'profile') {
+               sendJSON($data);
+               return;
+       }
+       $ipaddr = processInputVar('ipaddr', ARG_STRING);
+       # validate fixed IP address
+       if(! validateIPv4addr($ipaddr)) {
+               sendJSON($data);
+               return;
+       }
+       # validate netmask
+       $netmask = processInputVar('netmask', ARG_STRING);
+       $bnetmask = ip2long($netmask);
+       if(! preg_match('/^[1]+0[^1]+$/', sprintf('%032b', $bnetmask))) {
+               sendJSON($data);
+               return;
+       }
+       $network = ip2long($ipaddr) & $bnetmask;
+       $availnets = getVariable('fixedIPavailnetworks', array());
+       $key = long2ip($network) . "/$netmask";
+       if(array_key_exists($key, $availnets)) {
+               $data = array('status' => 'success',
+                             'page' => $page,
+                             'router' => $availnets[$key]['router'],
+                             'dns' => implode(',', $availnets[$key]['dns']));
+       }
+       sendJSON($data);
+}
+
 ?>

Added: vcl/trunk/web/.ht-inc/siteconfig.php
URL: 
http://svn.apache.org/viewvc/vcl/trunk/web/.ht-inc/siteconfig.php?rev=1624325&view=auto
==============================================================================
--- vcl/trunk/web/.ht-inc/siteconfig.php (added)
+++ vcl/trunk/web/.ht-inc/siteconfig.php Thu Sep 11 16:01:48 2014
@@ -0,0 +1,222 @@
+<?php
+/*
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+*/
+
+////////////////////////////////////////////////////////////////////////////////
+///
+/// \fn siteconfig()
+///
+/// \brief prints a page of site configuration options
+///
+////////////////////////////////////////////////////////////////////////////////
+function siteconfig() {
+       $h = '';
+       $h .= "<h2>Site Configuration</h2>\n";
+
+       $globalopts = 0;
+       if(checkUserHasPerm('Site Configuration (global)'))
+               $globalopts = 1;
+
+       $h .= "<div id=\"mainTabContainer\" 
dojoType=\"dijit.layout.TabContainer\"\n";
+       $h .= "     doLayout=\"false\">\n";
+
+       $h .= generalOptions($globalopts);
+
+       $h .= "</div>\n"; # mainTabContainer
+
+       print $h;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+///
+/// \fn generalOptions()
+///
+/// \brief prints a page of site configuration options
+///
+////////////////////////////////////////////////////////////////////////////////
+function generalOptions($globalopts) {
+       $h = '';
+       $h .= "<div id=\"globalopts\" dojoType=\"dijit.layout.ContentPane\" 
title=\"Global Options\">\n";
+       $h .= timeSourceHTML($globalopts);
+       $h .= connectedUserCheckHTML($globalopts);
+       $h .= "</div>\n";
+       return $h;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+///
+/// \fn 
+///
+/// \brief 
+///
+////////////////////////////////////////////////////////////////////////////////
+function timeSourceHTML($globalopts) {
+       $h  = "<div class=\"configwidget\">\n";
+       $h .= "<h3>Time Source</h3>\n";
+       $h .= "<span class=\"siteconfigdesc\">\n";
+       $h .= "Set the default list of time servers to be used on installed 
nodes. These can be overridden for each management node under the settings for 
a given management node. Separate hostnames using a comma (,).<br><br>\n";
+       $h .= "</span>\n";
+       $val = getVariable('timesource|global', '', 1);
+       # TODO start here 2 - decide on text or textarea; if text, fix regexp; 
if textarea, remove regexp
+       $h .= labeledFormItem('timesource', 'Time Servers', 'text', 
$val['regexp'], '', $val['value']);
+       $h .= "<div id=\"timesourcemsg\"></div>\n";
+       $h .= dijitButton('timesourcebtn', 'Submit Changes', 
"saveTimeSource();", 1);
+       $cont = addContinuationsEntry('AJupdateTimeSource', array('origval' => 
$val));
+       $h .= "<input type=hidden id=timesourcecont value=\"$cont\">\n";
+       $h .= "</div>\n";
+       return $h;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+///
+/// \fn 
+///
+/// \brief 
+///
+////////////////////////////////////////////////////////////////////////////////
+function AJupdateTimeSource() {
+       if(! checkUserHasPerm('Site Configuration (global)')) {
+               $arr = array('status' => 'noaccess',
+                            'msg' => _('You do not have access to set the 
global Time Server setting.'));
+               sendJSON($arr);
+               return;
+       }
+       $origval = getContinuationVar('origval');
+       $val = processInputVar('timesource', ARG_STRING);
+       $val = preg_replace('/\s+/', '', $val);
+       if($origval != $val) {
+               $servers = explode(',', $val);
+               foreach($servers as $key => $server) {
+                       if($server == '') {
+                               unset($servers[$key]);
+                               continue;
+                       }
+                       if(! 
preg_match('/^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])$/',
 $server)) {
+                               $arr = array('status' => 'failed',
+                                            'msgid' => 'timesourcemsg',
+                                            'btn' => 'timesourcebtn',
+                                            'errmsg' => _('Invalid server(s) 
specified.'));
+                               sendJSON($arr);
+                               return;
+                       }
+               }
+               $newval = implode(',', $servers);
+               setVariable('timesource|global', $newval);
+       }
+       $arr = array('status' => 'success',
+                    'msgid' => 'timesourcemsg',
+                    'btn' => 'timesourcebtn',
+                    'msg' => _('Time Server successfully updated'));
+       sendJSON($arr);
+}
+
+////////////////////////////////////////////////////////////////////////////////
+///
+/// \fn 
+///
+/// \brief Image
+///
+////////////////////////////////////////////////////////////////////////////////
+function connectedUserCheckHTML($globalopts) {
+       $data = getVariablesRegex('^ignore_connections_gte.*');
+       $h  = "<div class=\"configwidget\" style=\"width: 48%;\">\n";
+       $h .= "<h3>Connected User Check</h3>\n";
+       $h .= "<span class=\"siteconfigdesc\">\n";
+       $h .= "Perform checks to time out reservations if a reservation 
duration is less than the specified value (minutes).<br><br>\n";
+       $h .= "</span>\n";
+       $origvals = array();
+       if(empty($data)) {
+               $val = 1440;
+               $h .= labeledFormItem('ignore_connections_gte', 'global', 
'text', '', 1, $val);
+               $origvals['ignore_connections_gte'] = array('id' => 
'ignore_connections_gte', 'val' => $val);
+       }
+       else {
+               $extra = array('smallDelta' => 60, 'largeDelta' => 240);
+               foreach($data as $prekey => $val) {
+                       $key = str_replace('|', '_', $prekey);
+                       $tmp = explode('|', $prekey);
+                       if(count($tmp) > 1)
+                               $label = $tmp[1];
+                       else
+                               $label = 'global';
+                       $h .= labeledFormItem($key, $label, 'spinner', '{min:0, 
max:10080}', 1, $val, '', '', $extra, '', '', 0);
+                       # TODO start here, make delete button work, add a way 
to add exception for other affiliations
+                       if($key != 'ignore_connections_gte')
+                               $h .= dijitButton("{$key}delbtn", "Delete", 
"deleteConnectedUserCheck('$key');") . "<br>\n";
+                       else
+                               $h .= "<br>\n";
+                       $origvals[$prekey] = array('id' => $key, 'val' => $val);
+               }
+       }
+       $h .= dijitButton('connectedusercheckbtn', 'Submit Changes', 
"saveConnectedUserCheck();", 1);
+       $cont = addContinuationsEntry('AJupdateConnectedUserCheck', 
array('origvals' => $origvals));
+       $h .= "<input type=hidden id=connectedusercheckcont value=\"$cont\">\n";
+       $h .= "</div>\n";
+       return $h;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+///
+/// \fn 
+///
+/// \brief 
+///
+////////////////////////////////////////////////////////////////////////////////
+function AJupdateConnectedUserCheck() {
+       if(! checkUserHasPerm('Site Configuration (global)') &&
+          ! checkUserHasPerm('Site Configuration (affiliaton only)')) {
+               $arr = array('status' => 'noaccess',
+                            'msg' => _('You do not have access to modify the 
Connected User Check settings.'));
+               sendJSON($arr);
+               return;
+       }
+
+
+
+
+
+       # TODO copied from AJupdateTimeSource
+       /*$origvals = getContinuationVar('origvals');
+       $val = processInputVar('timesource', ARG_STRING);
+       $val = preg_replace('/\s+/', '', $val);
+       if($origval != $val) {
+               $servers = explode(',', $val);
+               foreach($servers as $key => $server) {
+                       if($server == '') {
+                               unset($servers[$key]);
+                               continue;
+                       }
+                       if(! 
preg_match('/^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])$/',
 $server)) {
+                               $arr = array('status' => 'failed',
+                                            'msgid' => 'timesourcemsg',
+                                            'btn' => 'timesourcebtn',
+                                            'errmsg' => _('Invalid server(s) 
specified.'));
+                               sendJSON($arr);
+                               return;
+                       }
+               }
+               $newval = implode(',', $servers);
+               setVariable('timesource|global', $newval);
+       }
+       $arr = array('status' => 'success',
+                    'msgid' => 'timesourcemsg',
+                    'btn' => 'timesourcebtn',
+                    'msg' => _('Time Server successfully updated'));
+       sendJSON($arr);*/
+}
+
+?>

Modified: vcl/trunk/web/.ht-inc/sitemaintenance.php
URL: 
http://svn.apache.org/viewvc/vcl/trunk/web/.ht-inc/sitemaintenance.php?rev=1624325&r1=1624324&r2=1624325&view=diff
==============================================================================
--- vcl/trunk/web/.ht-inc/sitemaintenance.php (original)
+++ vcl/trunk/web/.ht-inc/sitemaintenance.php Thu Sep 11 16:01:48 2014
@@ -94,8 +94,8 @@ function siteMaintenance() {
                                $reason = substr($item['reason'], 0, 30) . 
'...';
                                $rt .= "  <span 
id=\"morereason\">$reason</span>\n";
                                $rt .= "  <div dojoType=\"dijit.Tooltip\" 
connectId=\"morereason\">\n";
-                               $reason = preg_replace('/(.{1,50}[ \n])/', 
'\1<br>', $item['reason']);
-                               $reason = preg_replace('/\n<br>\n/', 
"<br><br>\n", $reason);
+                               $reason = preg_replace("/(.{1,50}([ \n]|$))/", 
'\1<br>', $item['reason']);
+                               $reason = preg_replace("/\n<br>\n/", 
"<br><br>\n", $reason);
                                $rt .= "$reason</div>\n";
                                $rt .= "</td>\n";
                        }
@@ -106,7 +106,7 @@ function siteMaintenance() {
                                $msg = substr($item['usermessage'], 0, 30) . 
'...';
                                $rt .= "  <span 
id=\"moreusermsg\">$msg</span>\n";
                                $rt .= "  <div dojoType=\"dijit.Tooltip\" 
connectId=\"moreusermsg\">\n";
-                               $msg = preg_replace('/(.{1,50}[ \n])/', 
'\1<br>', $item['usermessage']);
+                               $msg = preg_replace("/(.{1,50}([ \n]|$))/", 
"\1<br>", $item['usermessage']);
                                $msg = preg_replace('/\n<br>\n/', "<br><br>\n", 
$msg);
                                $rt .=  "$msg</div>\n";
                                $rt .= "</td>\n";
@@ -366,9 +366,9 @@ function AJgetDelSiteMaintenanceData() {
                $allowres = 'Yes';
        else
                $allowres = 'No';
-       $reason = preg_replace('/(.{1,50}[ \n])/', '\1<br>', $data['reason']);
+       $reason = preg_replace("/(.{1,50}([ \n]|$))/", '\1<br>', 
$data['reason']);
        $reason = preg_replace('/\n<br>\n/', "<br><br>\n", $reason);
-       $usermsg = preg_replace('/(.{1,50}[ \n])/', '\1<br>', 
$data['usermessage']);
+       $usermsg = preg_replace("/(.{1,50}([ \n]|$))/", '\1<br>', 
$data['usermessage']);
        $usermsg = preg_replace('/\n<br>\n/', "<br><br>\n", $usermsg);
        $arr = array('start' => $start,
                     'end' => $end,

Modified: vcl/trunk/web/.ht-inc/states.php
URL: 
http://svn.apache.org/viewvc/vcl/trunk/web/.ht-inc/states.php?rev=1624325&r1=1624324&r2=1624325&view=diff
==============================================================================
--- vcl/trunk/web/.ht-inc/states.php (original)
+++ vcl/trunk/web/.ht-inc/states.php Thu Sep 11 16:01:48 2014
@@ -26,15 +26,10 @@ $actions["pages"] = array();
 $actions["nextmodes"] = array();
 
 $actions["entry"] = array('main',
-                          'newRequest',
                           'viewRequests',
                           'blockAllocations',
                           'userpreferences',
                           'viewGroups',
-                          'selectImageOption',
-                          'viewSchedules',
-                          'selectComputers',
-                          'selectMgmtnodeOption',
                           'serverProfiles',
                           'pickTimeTable',
                           'viewNodes',
@@ -49,13 +44,22 @@ $actions["entry"] = array('main',
                           'selectauth',
                           'xmlrpcaffiliations',
                           'submitLogin',
-                          'imageClickThrough',
                           'clearCache',
                           'errorrpt',
                           'auth',
                           'continuationsError',
                           'requestBlockAllocation',
                           'dashboard',
+                          'resource',
+                          'config',
+                          'image',
+                          'computer',
+                          'managementnode',
+                          'schedule',
+                          'RESTresourceBasic',
+                          'RESTresourceDetail',
+                          #'testDojoREST',
+                          'siteconfig',
 );
 
 $noHTMLwrappers = array('sendRDPfile',
@@ -73,35 +77,11 @@ $noHTMLwrappers = array('sendRDPfile',
                         'AJsubmitRenameNode',
                         'AJupdateWaitTime',
                         'AJviewRequests',
-                        'submitRequest',
-                        'submitTestProd',
+                        'AJnewRequest',
                         'selectauth',
                         'submitLogin',
                         'submitgeneralprefs',
-                        'AJupdateImage',
-                        'jsonImageGroupingImages',
-                        'jsonImageGroupingGroups',
-                        'jsonImageMapCompGroups',
-                        'jsonImageMapImgGroups',
-                        'AJaddImageToGroup',
-                        'AJremImageFromGroup',
-                        'AJaddGroupToImage',
-                        'AJremGroupFromImage',
-                        'imageGroupingGrid',
-                        'AJaddCompGrpToImgGrp',
-                        'AJremCompGrpFromImgGrp',
-                        'AJaddImgGrpToCompGrp',
-                        'AJremImgGrpFromCompGrp',
-                        'imageMappingGrid',
                         'jsonGetGroupInfo',
-                        'jsonCompGroupingComps',
-                        'jsonCompGroupingGroups',
-                        'compGroupingGrid',
-                        'AJaddCompToGroup',
-                        'AJremCompFromGroup',
-                        'AJaddGroupToComp',
-                        'AJremGroupFromComp',
-                        'generateDHCP',
                         'errorrpt',
                         'vmhostdata',
                         'updateVMlimit',
@@ -117,6 +97,7 @@ $noHTMLwrappers = array('sendRDPfile',
                         'AJupdateRevisionProduction',
                         'AJupdateRevisionComments',
                         'AJdeleteRevisions',
+                        'AJfilterCompGroups',
                         'AJupdateBlockStatus',
                         'JSONprivnodelist',
                         'jsonGetUserGroupMembers',
@@ -144,8 +125,6 @@ $noHTMLwrappers = array('sendRDPfile',
                         'AJgetDelSiteMaintenanceData',
                         'AJeditSiteMaintenance',
                         'AJdeleteSiteMaintenance',
-                        'AJgetScheduleTimesData',
-                        'AJsaveScheduleTimes',
                         'AJvalidateUserid',
                         'AJupdateDashboard',
                         'AJgetStatData',
@@ -163,7 +142,7 @@ $noHTMLwrappers = array('sendRDPfile',
                         'AJaddProfileToGroup',
                         'AJremProfileFromGroup',
                         'AJserverProfileStoreData',
-                        'AJdeployServer',
+                        'AJfetchRouterDNS',
                         'AJconfirmDeleteRequest',
                         'AJsubmitDeleteRequest',
                         'AJconfirmRemoveRequest',
@@ -177,35 +156,68 @@ $noHTMLwrappers = array('sendRDPfile',
                         'AJshowReinstallRequest',
                         'AJreinstallRequest',
                         'AJshowRequestSuggestedTimes',
-                        'AJgenerateUtilData',
                         'AJcanceltovmhostinuse',
                         'jsonUserGroupStore',
                         'jsonResourceGroupStore',
                         'changeLocale',
-                        'submitEditImage',
+                        'AJviewBlockAllocationUsage',
+                        'AJrestartImageCapture',
+                        'jsonResourceStore',
+                        'AJpromptToggleDeleteResource',
+                        'AJsubmitToggleDeleteResource',
+                        'AJsaveResource',
+                        'AJeditResource',
+                        'jsonResourceGroupingGroups',
+                        'AJaddRemGroupResource',
+                        'AJaddRemResourceGroup',
+                        'jsonResourceGroupingResources',
+                        'jsonResourceMappingMapToGroups',
+                        'AJaddRemMapToGroup',
+                        'jsonResourceMappingGroups',
+                        'AJaddRemGroupMapTo',
+                        'jsonConfigMapStore',
+                        'AJeditConfigMapping',
+                        'AJsaveConfigMapping',
+                        'AJdeleteConfigMapping',
+                        'AJsubmitDeleteConfigMapping',
+                        'AJconfigSystem',
+                        'RESTresourceBasic',
+                        'RESTresourceDetail',
+                        'AJstartImage',
+                        'AJupdateImage',
+                        'AJupdateTimeSource',
+                        'AJreloadComputers',
+                        'AJsubmitReloadComputers',
+                        'AJdeleteComputers',
+                        'AJsubmitDeleteComputers',
+                        'AJcompScheduleChange',
+                        'AJsubmitCompScheduleChange',
+                        'AJgenerateDHCPdata',
+                        'AJhostsData',
+                        'AJcompStateChange',
+                        'AJcompProvisioningChange',
+                        'AJsubmitCompProvisioningChange',
+                        'AJsubmitCompStateChange',
+                        'AJsubmitComputerStateLater',
+                        'AJconnectRequest',
 );
 
 # main
 $actions['mode']['main'] = "main"; # entry
 $actions['pages']['main'] = "main";
 
-# new reservations
-$actions['mode']['newRequest'] = "newReservation"; # entry
-$actions['mode']['submitRequest'] = "submitRequest";
+# reservations
+$actions['mode']['AJnewRequest'] = "AJnewRequest";
 $actions['mode']['AJupdateWaitTime'] = "AJupdateWaitTime";
-$actions['mode']['submitTestProd'] = "submitRequest";
+$actions['mode']['AJconfigSystem'] = "AJconfigSystem";
 $actions['mode']['selectTimeTable'] = "showTimeTable";
-$actions['mode']['AJshowRequestSuggestedTimes'] = 
"AJshowRequestSuggestedTimes";
 $actions['args']['selectTimeTable'] = 1;
-$actions['pages']['newRequest'] = "newReservations";
-$actions['pages']['submitRequest'] = "newReservations";
-$actions['pages']['AJupdateWaitTime'] = "newReservations";
-$actions['pages']['submitTestProd'] = "newReservations";
-$actions['pages']['selectTimeTable'] = "newReservations";
-$actions['pages']['AJshowRequestSuggestedTimes'] = "newReservations";
-$actions['nextmodes']['newRequest'] = array();
-
-# current reservations
+$actions['mode']['AJshowRequestSuggestedTimes'] = 
"AJshowRequestSuggestedTimes";
+$actions['mode']['AJrebootRequest'] = "AJrebootRequest";
+$actions['mode']['AJreinstallRequest'] = "AJreinstallRequest";
+$actions['mode']['AJsetImageProduction'] = "AJsetImageProduction";
+$actions['mode']['AJsubmitSetImageProduction'] = "AJsubmitSetImageProduction";
+$actions['mode']['AJshowReinstallRequest'] = "AJshowReinstallRequest";
 $actions['mode']['viewRequests'] = "viewRequests"; # entry
 $actions['mode']['AJviewRequests'] = "viewRequests"; # entry
 $actions['mode']['AJeditRequest'] = "AJeditRequest";
@@ -214,22 +226,31 @@ $actions['mode']['AJconfirmDeleteRequest
 $actions['mode']['AJsubmitDeleteRequest'] = "AJsubmitDeleteRequest";
 $actions['mode']['AJconfirmRemoveRequest'] = "AJconfirmRemoveRequest";
 $actions['mode']['AJsubmitRemoveRequest'] = "AJsubmitRemoveRequest";
-$actions['mode']['connectRequest'] = "connectRequest";
+$actions['mode']['AJconnectRequest'] = "AJconnectRequest";
 $actions['mode']['sendRDPfile'] = "sendRDPfile";
 $actions['mode']['AJcheckConnectTimeout'] = "AJcheckConnectTimeout";
 #$actions['mode']['connectMindterm'] = "connectMindterm";
 #$actions['mode']['connectRDPapplet'] = "connectRDPapplet";
-$actions['pages']['viewRequests'] = "currentReservations";
-$actions['pages']['AJviewRequests'] = "currentReservations";
-$actions['pages']['AJeditRequest'] = "currentReservations";
-$actions['pages']['AJsubmitEditRequest'] = "currentReservations";
-$actions['pages']['AJconfirmDeleteRequest'] = "currentReservations";
-$actions['pages']['AJsubmitDeleteRequest'] = "currentReservations";
-$actions['pages']['AJconfirmRemoveRequest'] = "currentReservations";
-$actions['pages']['AJsubmitRemoveRequest'] = "currentReservations";
-$actions['pages']['connectRequest'] = "currentReservations";
-$actions['pages']['sendRDPfile'] = "currentReservations";
-$actions['pages']['AJcheckConnectTimeout'] = "currentReservations";
+$actions['pages']['AJnewRequest'] = "reservations";
+$actions['pages']['AJupdateWaitTime'] = "reservations";
+$actions['pages']['AJconfigSystem'] = "reservations";
+$actions['pages']['selectTimeTable'] = "reservations";
+$actions['pages']['AJshowRequestSuggestedTimes'] = "reservations";
+$actions['pages']['AJrebootRequest'] = "reservations";
+$actions['pages']['AJreinstallRequest'] = "reservations";
+$actions['pages']['AJsubmitSetImageProduction'] = "reservations";
+$actions['pages']['AJshowReinstallRequest'] = "reservations";
+$actions['pages']['viewRequests'] = "reservations";
+$actions['pages']['AJviewRequests'] = "reservations";
+$actions['pages']['AJeditRequest'] = "reservations";
+$actions['pages']['AJsubmitEditRequest'] = "reservations";
+$actions['pages']['AJconfirmDeleteRequest'] = "reservations";
+$actions['pages']['AJsubmitDeleteRequest'] = "reservations";
+$actions['pages']['AJconfirmRemoveRequest'] = "reservations";
+$actions['pages']['AJsubmitRemoveRequest'] = "reservations";
+$actions['pages']['AJconnectRequest'] = "reservations";
+$actions['pages']['sendRDPfile'] = "reservations";
+$actions['pages']['AJcheckConnectTimeout'] = "reservations";
 #$actions['pages']['connectMindterm'] = "currentReservations";
 #$actions['pages']['connectRDPapplet'] = "currentReservations";
 
@@ -253,6 +274,7 @@ $actions['mode']['AJviewBlockAllocationT
 $actions['mode']['AJtoggleBlockTime'] = "AJtoggleBlockTime";
 $actions['mode']['viewBlockAllocatedMachines'] = "viewBlockAllocatedMachines";
 $actions['mode']['AJgetBlockAllocatedMachineData'] = 
"AJgetBlockAllocatedMachineData";
+$actions['mode']['AJviewBlockAllocationUsage'] = "AJviewBlockAllocationUsage";
 $actions['pages']['blockAllocations'] = "blockAllocations";
 $actions['pages']['newBlockAllocation'] = "blockAllocations";
 $actions['pages']['editBlockAllocation'] = "blockAllocations";
@@ -272,6 +294,7 @@ $actions['pages']['AJtoggleBlockTime'] =
 $actions['pages']['AJviewBlockAllocation'] = "blockAllocations";
 $actions['pages']['viewBlockAllocatedMachines'] = "blockAllocations";
 $actions['pages']['AJgetBlockAllocatedMachineData'] = "blockAllocations";
+$actions['pages']['AJviewBlockAllocationUsage'] = "blockAllocations";
 
 # user preferences
 $actions['mode']['userpreferences'] = "userpreferences"; # entry
@@ -321,249 +344,6 @@ $actions['pages']['jsonGetGroupInfo'] = 
 $actions['pages']['jsonUserGroupStore'] = "manageGroups";
 $actions['pages']['jsonResourceGroupStore'] = "manageGroups";
 
-# manage images
-$actions['mode']['selectImageOption'] = "selectImageOption"; # entry
-$actions['mode']['viewImages'] = "viewImages";
-$actions['mode']['viewImageGrouping'] = "viewImageGrouping";
-$actions['mode']['viewImageMapping'] = "viewImageMapping";
-$actions['mode']['newImage'] = "editOrAddImage";
-$actions['args']['newImage'] = "1";
-$actions['mode']['startImage'] = "startImage";
-$actions['mode']['startCheckpoint'] = "startCheckpoint";
-$actions['mode']['submitCheckpoint'] = "submitCheckpoint";
-$actions['mode']['updateExistingImageComments'] = 
"updateExistingImageComments";
-$actions['mode']['updateExistingImage'] = "updateExistingImage";
-$actions['mode']['setImageProduction'] = "setImageProduction";
-$actions['mode']['AJsetImageProduction'] = "AJsetImageProduction";
-$actions['mode']['submitSetImageProduction'] = "submitSetImageProduction";
-$actions['mode']['AJsubmitSetImageProduction'] = "AJsubmitSetImageProduction";
-$actions['mode']['submitImageButton'] = "submitImageButton";
-$actions['mode']['submitEditImage'] = "submitEditImage";
-$actions['mode']['AJupdateImage'] = "AJupdateImage";
-$actions['mode']['submitEditImageButtons'] = "submitEditImageButtons";
-$actions['mode']['imageClickThroughAgreement'] = "imageClickThroughAgreement";
-$actions['mode']['submitAddImage'] = "submitAddImage";
-$actions['mode']['submitImageGroups'] = "submitImageGroups";
-$actions['mode']['submitImageMapping'] = "submitImageMapping";
-$actions['mode']['submitDeleteImage'] = "submitDeleteImage";
-$actions['mode']['imageClickThrough'] = "imageClickThrough";
-$actions['mode']['jsonImageGroupingImages'] = "jsonImageGroupingImages";
-$actions['mode']['jsonImageGroupingGroups'] = "jsonImageGroupingGroups";
-$actions['mode']['AJaddImageToGroup'] = "AJaddImageToGroup";
-$actions['mode']['AJremImageFromGroup'] = "AJremImageFromGroup";
-$actions['mode']['AJaddGroupToImage'] = "AJaddGroupToImage";
-$actions['mode']['AJremGroupFromImage'] = "AJremGroupFromImage";
-$actions['mode']['imageGroupingGrid'] = "imageGroupingGrid";
-$actions['mode']['jsonImageMapCompGroups'] = "jsonImageMapCompGroups";
-$actions['mode']['AJaddCompGrpToImgGrp'] = "AJaddCompGrpToImgGrp";
-$actions['mode']['AJremCompGrpFromImgGrp'] = "AJremCompGrpFromImgGrp";
-$actions['mode']['jsonImageMapImgGroups'] = "jsonImageMapImgGroups";
-$actions['mode']['AJaddImgGrpToCompGrp'] = "AJaddImgGrpToCompGrp";
-$actions['mode']['AJremImgGrpFromCompGrp'] = "AJremImgGrpFromCompGrp";
-$actions['mode']['imageMappingGrid'] = "imageMappingGrid";
-$actions['mode']['AJupdateRevisionProduction'] = "AJupdateRevisionProduction";
-$actions['mode']['AJupdateRevisionComments'] = "AJupdateRevisionComments";
-$actions['mode']['AJdeleteRevisions'] = "AJdeleteRevisions";
-$actions['mode']['connectmethodDialogContent'] = "connectmethodDialogContent";
-$actions['mode']['jsonImageConnectMethods'] = "jsonImageConnectMethods";
-$actions['mode']['AJaddImageConnectMethod'] = "AJaddImageConnectMethod";
-$actions['mode']['AJremImageConnectMethod'] = "AJremImageConnectMethod";
-$actions['mode']['subimageDialogContent'] = "subimageDialogContent";
-$actions['mode']['AJaddSubimage'] = "AJaddSubimage";
-$actions['mode']['AJremSubimage'] = "AJremSubimage";
-$actions['mode']['AJrebootRequest'] = "AJrebootRequest";
-$actions['mode']['AJshowReinstallRequest'] = "AJshowReinstallRequest";
-$actions['mode']['AJreinstallRequest'] = "AJreinstallRequest";
-$actions['pages']['selectImageOption'] = "manageImages";
-$actions['pages']['viewImages'] = "manageImages";
-$actions['pages']['viewImageGrouping'] = "manageImages";
-$actions['pages']['viewImageMapping'] = "manageImages";
-$actions['pages']['newImage'] = "manageImages";
-$actions['pages']['startImage'] = "manageImages";
-$actions['pages']['startCheckpoint'] = "manageImages";
-$actions['pages']['submitCheckpoint'] = "manageImages";
-$actions['pages']['updateExistingImageComments'] = "manageImages";
-$actions['pages']['updateExistingImage'] = "manageImages";
-$actions['pages']['setImageProduction'] = "manageImages";
-$actions['pages']['AJsetImageProduction'] = "manageImages";
-$actions['pages']['submitSetImageProduction'] = "manageImages";
-$actions['pages']['AJsubmitSetImageProduction'] = "manageImages";
-$actions['pages']['submitImageButton'] = "manageImages";
-$actions['pages']['submitEditImage'] = "manageImages";
-$actions['pages']['submitEditImageButtons'] = "manageImages";
-$actions['pages']['imageClickThroughAgreement'] = "manageImages";
-$actions['pages']['submitAddImage'] = "manageImages";
-$actions['pages']['submitImageGroups'] = "manageImages";
-$actions['pages']['submitImageMapping'] = "manageImages";
-$actions['pages']['submitDeleteImage'] = "manageImages";
-$actions['pages']['imageClickThrough'] = "manageImages";
-$actions['pages']['AJupdateImage'] = "manageImages";
-$actions['pages']['jsonImageGroupingImages'] = "manageImages";
-$actions['pages']['jsonImageGroupingGroups'] = "manageImages";
-$actions['pages']['AJaddImageToGroup'] = "manageImages";
-$actions['pages']['AJremImageFromGroup'] = "manageImages";
-$actions['pages']['AJaddGroupToImage'] = "manageImages";
-$actions['pages']['AJremGroupFromImage'] = "manageImages";
-$actions['pages']['imageGroupingGrid'] = "manageImages";
-$actions['pages']['jsonImageMapCompGroups'] = "manageImages";
-$actions['pages']['AJaddCompGrpToImgGrp'] = "manageImages";
-$actions['pages']['AJremCompGrpFromImgGrp'] = "manageImages";
-$actions['pages']['jsonImageMapImgGroups'] = "manageImages";
-$actions['pages']['AJaddImgGrpToCompGrp'] = "manageImages";
-$actions['pages']['AJremImgGrpFromCompGrp'] = "manageImages";
-$actions['pages']['imageMappingGrid'] = "manageImages";
-$actions['pages']['AJupdateRevisionProduction'] = "manageImages";
-$actions['pages']['AJupdateRevisionComments'] = "manageImages";
-$actions['pages']['AJdeleteRevisions'] = "manageImages";
-$actions['pages']['connectmethodDialogContent'] = "manageImages";
-$actions['pages']['jsonImageConnectMethods'] = "manageImages";
-$actions['pages']['AJaddImageConnectMethod'] = "manageImages";
-$actions['pages']['AJremImageConnectMethod'] = "manageImages";
-$actions['pages']['subimageDialogContent'] = "manageImages";
-$actions['pages']['AJaddSubimage'] = "manageImages";
-$actions['pages']['AJremSubimage'] = "manageImages";
-$actions['pages']['AJrebootRequest'] = "manageImages";
-$actions['pages']['AJshowReinstallRequest'] = "manageImages";
-$actions['pages']['AJreinstallRequest'] = "manageImages";
-
-# manage schedules
-$actions['mode']['viewSchedules'] = "viewSchedules"; # entry
-$actions['mode']['editSchedule'] = "editOrAddSchedule";
-$actions['args']['editSchedule'] = 0;
-$actions['mode']['confirmEditSchedule'] = "confirmEditOrAddSchedule";
-$actions['args']['confirmEditSchedule'] = 0;
-$actions['mode']['submitEditSchedule'] = "submitEditSchedule";
-$actions['mode']['confirmAddSchedule'] = "confirmEditOrAddSchedule";
-$actions['args']['confirmAddSchedule'] = 1;
-$actions['mode']['submitAddSchedule'] = "submitAddSchedule";
-$actions['mode']['confirmDeleteSchedule'] = "confirmDeleteSchedule";
-$actions['mode']['submitDeleteSchedule'] = "submitDeleteSchedule";
-$actions['mode']['submitScheduleGroups'] = "submitScheduleGroups";
-$actions['mode']['AJgetScheduleTimesData'] = "AJgetScheduleTimesData";
-$actions['mode']['AJsaveScheduleTimes'] = "AJsaveScheduleTimes";
-$actions['pages']['viewSchedules'] = "manageSchedules";
-$actions['pages']['editSchedule'] = "manageSchedules";
-$actions['pages']['confirmEditSchedule'] = "manageSchedules";
-$actions['pages']['submitEditSchedule'] = "manageSchedules";
-$actions['pages']['confirmAddSchedule'] = "manageSchedules";
-$actions['pages']['submitAddSchedule'] = "manageSchedules";
-$actions['pages']['confirmDeleteSchedule'] = "manageSchedules";
-$actions['pages']['submitDeleteSchedule'] = "manageSchedules";
-$actions['pages']['submitScheduleGroups'] = "manageSchedules";
-$actions['pages']['AJgetScheduleTimesData'] = "manageSchedules";
-$actions['pages']['AJsaveScheduleTimes'] = "manageSchedules";
-
-# manage computers
-$actions['mode']['selectComputers'] = "selectComputers"; # entry
-$actions['mode']['viewComputers'] = "viewComputers";
-$actions['mode']['viewComputerGroups'] = "viewComputerGroups";
-$actions['mode']['computerUtilities'] = "computerUtilities";
-$actions['mode']['reloadComputers'] = "reloadComputers";
-$actions['mode']['submitReloadComputers'] = "submitReloadComputers";
-$actions['mode']['compStateChange'] = "compStateChange";
-$actions['mode']['submitCompStateChange'] = "submitCompStateChange";
-$actions['mode']['compScheduleChange'] = "compScheduleChange";
-$actions['mode']['submitCompScheduleChange'] = "submitCompScheduleChange";
-$actions['mode']['AJgenerateUtilData'] = "AJgenerateUtilData";
-$actions['mode']['editComputer'] = "editOrAddComputer";
-$actions['args']['editComputer'] = 0;
-$actions['mode']['addComputer'] = "editOrAddComputer";
-$actions['args']['addComputer'] = 1;
-$actions['mode']['confirmEditComputer'] = "confirmEditOrAddComputer";
-$actions['args']['confirmEditComputer'] = 0;
-$actions['mode']['confirmAddComputer'] = "confirmEditOrAddComputer";
-$actions['args']['confirmAddComputer'] = 1;
-$actions['mode']['submitEditComputer'] = "submitEditComputer";
-$actions['mode']['computerAddMaintenanceNote'] = "computerAddMaintenanceNote";
-$actions['mode']['AJcanceltovmhostinuse'] = "AJcanceltovmhostinuse";
-$actions['mode']['addComputerSetVMHostProfile'] = 
"addComputerSetVMHostProfile";
-$actions['mode']['submitAddComputer'] = "submitAddComputer";
-$actions['mode']['submitComputerVMHostLater'] = "submitComputerVMHostLater";
-$actions['mode']['submitComputerGroups'] = "submitComputerGroups";
-$actions['mode']['confirmDeleteComputer'] = "confirmDeleteComputer";
-$actions['mode']['submitDeleteComputer'] = "submitDeleteComputer";
-$actions['mode']['bulkAddComputer'] = "bulkAddComputer";
-$actions['mode']['confirmAddBulkComputers'] = "confirmAddBulkComputers";
-$actions['mode']['submitAddBulkComputers'] = "submitAddBulkComputers";
-$actions['mode']['jsonCompGroupingComps'] = "jsonCompGroupingComps";
-$actions['mode']['jsonCompGroupingGroups'] = "jsonCompGroupingGroups";
-$actions['mode']['compGroupingGrid'] = "compGroupingGrid";
-$actions['mode']['AJaddCompToGroup'] = "AJaddCompToGroup";
-$actions['mode']['AJremCompFromGroup'] = "AJremCompFromGroup";
-$actions['mode']['AJaddGroupToComp'] = "AJaddGroupToComp";
-$actions['mode']['AJremGroupFromComp'] = "AJremGroupFromComp";
-$actions['mode']['generateDHCP'] = "generateDHCP";
-$actions['pages']['selectComputers'] = "manageComputers";
-$actions['pages']['viewComputers'] = "manageComputers";
-$actions['pages']['viewComputerGroups'] = "manageComputers";
-$actions['pages']['computerUtilities'] = "manageComputers";
-$actions['pages']['reloadComputers'] = "manageComputers";
-$actions['pages']['submitReloadComputers'] = "manageComputers";
-$actions['pages']['compStateChange'] = "manageComputers";
-$actions['pages']['submitCompStateChange'] = "manageComputers";
-$actions['pages']['compScheduleChange'] = "manageComputers";
-$actions['pages']['submitCompScheduleChange'] = "manageComputers";
-$actions['pages']['AJgenerateUtilData'] = "manageComputers";
-$actions['pages']['editComputer'] = "manageComputers";
-$actions['pages']['addComputer'] = "manageComputers";
-$actions['pages']['confirmEditComputer'] = "manageComputers";
-$actions['pages']['confirmAddComputer'] = "manageComputers";
-$actions['pages']['submitEditComputer'] = "manageComputers";
-$actions['pages']['computerAddMaintenanceNote'] = "manageComputers";
-$actions['pages']['AJcanceltovmhostinuse'] = "manageComputers";
-$actions['pages']['computerAddedMaintenceNote'] = "manageComputers";
-$actions['pages']['addComputerSetVMHostProfile'] = "manageComputers";
-$actions['pages']['submitAddComputer'] = "manageComputers";
-$actions['pages']['submitComputerVMHostLater'] = "manageComputers";
-$actions['pages']['submitComputerGroups'] = "manageComputers";
-$actions['pages']['confirmDeleteComputer'] = "manageComputers";
-$actions['pages']['submitDeleteComputer'] = "manageComputers";
-$actions['pages']['bulkAddComputer'] = "manageComputers";
-$actions['pages']['confirmAddBulkComputers'] = "manageComputers";
-$actions['pages']['submitAddBulkComputers'] = "manageComputers";
-$actions['pages']['jsonCompGroupingComps'] = "manageComputers";
-$actions['pages']['jsonCompGroupingGroups'] = "manageComputers";
-$actions['pages']['compGroupingGrid'] = "manageComputers";
-$actions['pages']['AJaddCompToGroup'] = "manageComputers";
-$actions['pages']['AJremCompFromGroup'] = "manageComputers";
-$actions['pages']['AJaddGroupToComp'] = "manageComputers";
-$actions['pages']['AJremGroupFromComp'] = "manageComputers";
-$actions['pages']['generateDHCP'] = "manageComputers";
-
-# management nodes
-$actions['mode']['selectMgmtnodeOption'] = "selectMgmtnodeOption"; # entry
-$actions['mode']['viewMgmtnodes'] = "viewMgmtnodes";
-$actions['mode']['editMgmtNode'] = "editOrAddMgmtnode";
-$actions['args']['editMgmtNode'] = "0";
-$actions['mode']['addMgmtNode'] = "editOrAddMgmtnode";
-$actions['args']['addMgmtNode'] = "1";
-$actions['mode']['confirmEditMgmtnode'] = "confirmEditOrAddMgmtnode";
-$actions['args']['confirmEditMgmtnode'] = "0";
-$actions['mode']['confirmAddMgmtnode'] = "confirmEditOrAddMgmtnode";
-$actions['args']['confirmAddMgmtnode'] = "1";
-$actions['mode']['submitEditMgmtnode'] = "submitEditMgmtnode";
-$actions['mode']['submitAddMgmtnode'] = "submitAddMgmtnode";
-$actions['mode']['confirmDeleteMgmtnode'] = "confirmDeleteMgmtnode";
-$actions['mode']['submitDeleteMgmtnode'] = "submitDeleteMgmtnode";
-$actions['mode']['viewMgmtnodeGrouping'] = "viewMgmtnodeGrouping";
-$actions['mode']['submitMgmtnodeGroups'] = "submitMgmtnodeGroups";
-$actions['mode']['viewMgmtnodeMapping'] = "viewMgmtnodeMapping";
-$actions['mode']['submitMgmtnodeMapping'] = "submitMgmtnodeMapping";
-$actions['pages']['selectMgmtnodeOption'] = "managementNodes";
-$actions['pages']['viewMgmtnodes'] = "managementNodes";
-$actions['pages']['editMgmtNode'] = "managementNodes";
-$actions['pages']['addMgmtNode'] = "managementNodes";
-$actions['pages']['confirmEditMgmtnode'] = "managementNodes";
-$actions['pages']['confirmAddMgmtnode'] = "managementNodes";
-$actions['pages']['submitEditMgmtnode'] = "managementNodes";
-$actions['pages']['submitAddMgmtnode'] = "managementNodes";
-$actions['pages']['confirmDeleteMgmtnode'] = "managementNodes";
-$actions['pages']['submitDeleteMgmtnode'] = "managementNodes";
-$actions['pages']['viewMgmtnodeGrouping'] = "managementNodes";
-$actions['pages']['submitMgmtnodeGroups'] = "managementNodes";
-$actions['pages']['viewMgmtnodeMapping'] = "managementNodes";
-$actions['pages']['submitMgmtnodeMapping'] = "managementNodes";
-
 # server profiles
 $actions['mode']['serverProfiles'] = "serverProfiles"; # entry
 $actions['mode']['AJsaveServerProfile'] = "AJsaveServerProfile";
@@ -576,7 +356,7 @@ $actions['mode']['AJremGroupFromProfile'
 $actions['mode']['AJaddProfileToGroup'] = "AJaddProfileToGroup";
 $actions['mode']['AJremProfileFromGroup'] = "AJremProfileFromGroup";
 $actions['mode']['AJserverProfileStoreData'] = "AJserverProfileStoreData";
-$actions['mode']['AJdeployServer'] = "AJdeployServer";
+$actions['mode']['AJfetchRouterDNS'] = "AJfetchRouterDNS";
 $actions['pages']['serverProfiles'] = "serverProfiles";
 $actions['pages']['AJsaveServerProfile'] = "serverProfiles";
 $actions['pages']['AJserverProfileData'] = "serverProfiles";
@@ -588,7 +368,7 @@ $actions['pages']['AJremGroupFromProfile
 $actions['pages']['AJaddProfileToGroup'] = "serverProfiles";
 $actions['pages']['AJremProfileFromGroup'] = "serverProfiles";
 $actions['pages']['AJserverProfileStoreData'] = "serverProfiles";
-$actions['pages']['AJdeployServer'] = "serverProfiles";
+$actions['pages']['AJfetchRouterDNS'] = "serverProfiles";
 
 # time table
 # TODO a few of these belong to new reservation
@@ -749,8 +529,139 @@ $actions['pages']['AJdeleteSiteMaintenan
 # dashboard
 $actions['mode']['dashboard'] = "dashboard";
 $actions['mode']['AJupdateDashboard'] = "AJupdateDashboard";
+$actions['mode']['AJrestartImageCapture'] = "AJrestartImageCapture";
 $actions['pages']['dashboard'] = "dashboard";
 $actions['pages']['AJupdateDashboard'] = "dashboard";
+$actions['pages']['AJrestartImageCapture'] = "dashboard";
+
+# site configuration
+$actions['mode']['siteconfig'] = "siteconfig";
+$actions['mode']['AJupdateTimeSource'] = "AJupdateTimeSource";
+$actions['pages']['siteconfig'] = "siteconfig";
+$actions['pages']['AJupdateTimeSource'] = "siteconfig";
+
+# resource
+$actions['mode']['resource'] = "resource";
+$actions['mode']['config'] = "resource";
+$actions['args']['config'] = 'config';
+$actions['mode']['image'] = "resource";
+$actions['args']['image'] = 'image';
+$actions['mode']['computer'] = "resource";
+$actions['args']['computer'] = 'computer';
+$actions['mode']['managementnode'] = "resource";
+$actions['args']['managementnode'] = 'managementnode';
+$actions['mode']['schedule'] = "resource";
+$actions['args']['schedule'] = 'schedule';
+$actions['mode']['viewResources'] = "viewResources";
+$actions['mode']['jsonResourceStore'] = "jsonResourceStore";
+$actions['mode']['AJpromptToggleDeleteResource'] = 
"AJpromptToggleDeleteResource";
+$actions['mode']['AJsubmitToggleDeleteResource'] = 
"AJsubmitToggleDeleteResource";
+$actions['mode']['AJsaveResource'] = "AJsaveResource";
+$actions['mode']['AJeditResource'] = "AJeditResource";
+$actions['mode']['groupMapHTML'] = "groupMapHTML";
+$actions['mode']['editConfigMap'] = "editConfigMap";
+$actions['mode']['jsonResourceGroupingGroups'] = "jsonResourceGroupingGroups";
+$actions['mode']['AJaddRemGroupResource'] = "AJaddRemGroupResource";
+$actions['mode']['AJaddRemResourceGroup'] = "AJaddRemResourceGroup";
+$actions['mode']['jsonResourceGroupingResources'] = 
"jsonResourceGroupingResources";
+$actions['mode']['jsonResourceMappingMapToGroups'] = 
"jsonResourceMappingMapToGroups";
+$actions['mode']['AJaddRemMapToGroup'] = "AJaddRemMapToGroup";
+$actions['mode']['jsonResourceMappingGroups'] = "jsonResourceMappingGroups";
+$actions['mode']['AJaddRemGroupMapTo'] = "AJaddRemGroupMapTo";
+$actions['mode']['jsonConfigMapStore'] = "jsonConfigMapStore";
+$actions['mode']['AJeditConfigMapping'] = "AJeditConfigMapping";
+$actions['mode']['AJsaveConfigMapping'] = "AJsaveConfigMapping";
+$actions['mode']['AJdeleteConfigMapping'] = "AJdeleteConfigMapping";
+$actions['mode']['AJsubmitDeleteConfigMapping'] = 
"AJsubmitDeleteConfigMapping";
+$actions['mode']['connectmethodDialogContent'] = "connectmethodDialogContent";
+$actions['mode']['subimageDialogContent'] = "subimageDialogContent";
+$actions['mode']['AJaddSubimage'] = "AJaddSubimage";
+$actions['mode']['AJremSubimage'] = "AJremSubimage";
+$actions['mode']['AJupdateImage'] = "AJupdateImage";
+$actions['mode']['AJcanceltovmhostinuse'] = "AJcanceltovmhostinuse";
+$actions['mode']['AJreloadComputers'] = "AJreloadComputers";
+$actions['mode']['AJsubmitReloadComputers'] = "AJsubmitReloadComputers";
+$actions['mode']['AJdeleteComputers'] = "AJdeleteComputers";
+$actions['mode']['AJsubmitDeleteComputers'] = "AJsubmitDeleteComputers";
+$actions['mode']['AJcompScheduleChange'] = "AJcompScheduleChange";
+$actions['mode']['AJsubmitCompScheduleChange'] = "AJsubmitCompScheduleChange";
+$actions['mode']['AJgenerateDHCPdata'] = "AJgenerateDHCPdata";
+$actions['mode']['AJhostsData'] = "AJhostsData";
+$actions['mode']['AJcompStateChange'] = "AJcompStateChange";
+$actions['mode']['AJcompProvisioningChange'] = "AJcompProvisioningChange";
+$actions['mode']['AJsubmitCompProvisioningChange'] = 
"AJsubmitCompProvisioningChange";
+$actions['mode']['AJsubmitCompStateChange'] = "AJsubmitCompStateChange";
+$actions['mode']['AJsubmitComputerStateLater'] = "AJsubmitComputerStateLater";
+$actions['mode']['jsonImageConnectMethods'] = "jsonImageConnectMethods";
+$actions['mode']['AJaddImageConnectMethod'] = "AJaddImageConnectMethod";
+$actions['mode']['AJremImageConnectMethod'] = "AJremImageConnectMethod";
+$actions['mode']['AJstartImage'] = "AJstartImage";
+$actions['mode']['AJupdateRevisionComments'] = "AJupdateRevisionComments";
+$actions['mode']['AJdeleteRevisions'] = "AJdeleteRevisions";
+$actions['mode']['AJupdateRevisionProduction'] = "AJupdateRevisionProduction";
+$actions['mode']['AJfilterCompGroups'] = "AJfilterCompGroups";
+$actions['pages']['resource'] = "resource";
+$actions['pages']['config'] = "config";
+$actions['pages']['image'] = "image";
+$actions['pages']['computer'] = "computer";
+$actions['pages']['managementnode'] = "managementnode";
+$actions['pages']['schedule'] = "schedule";
+$actions['pages']['viewResources'] = "resource";
+$actions['pages']['jsonResourceStore'] = "resource";
+$actions['pages']['AJpromptToggleDeleteResource'] = "resource";
+$actions['pages']['AJsubmitToggleDeleteResource'] = "resource";
+$actions['pages']['AJsaveResource'] = "resource";
+$actions['pages']['AJeditResource'] = "resource";
+$actions['pages']['groupMapHTML'] = "resource";
+$actions['pages']['editConfigMap'] = "resource";
+$actions['pages']['jsonResourceGroupingGroups'] = "resource";
+$actions['pages']['AJaddRemGroupResource'] = "resource";
+$actions['pages']['AJaddRemResourceGroup'] = "resource";
+$actions['pages']['jsonResourceGroupingResources'] = "resource";
+$actions['pages']['jsonResourceMappingMapToGroups'] = "resource";
+$actions['pages']['AJaddRemMapToGroup'] = "resource";
+$actions['pages']['jsonResourceMappingGroups'] = "resource";
+$actions['pages']['AJaddRemGroupMapTo'] = "resource";
+$actions['pages']['jsonConfigMapStore'] = "resource";
+$actions['pages']['AJeditConfigMapping'] = "resource";
+$actions['pages']['AJsaveConfigMapping'] = "resource";
+$actions['pages']['AJdeleteConfigMapping'] = "resource";
+$actions['pages']['AJsubmitDeleteConfigMapping'] = "resource";
+$actions['pages']['connectmethodDialogContent'] = "resource";
+$actions['pages']['subimageDialogContent'] = "resource";
+$actions['pages']['AJaddSubimage'] = "resource";
+$actions['pages']['AJremSubimage'] = "resource";
+$actions['pages']['AJupdateImage'] = "resource";
+$actions['pages']['AJcanceltovmhostinuse'] = "resource";
+$actions['pages']['AJreloadComputers'] = "resource";
+$actions['pages']['AJsubmitReloadComputers'] = "resource";
+$actions['pages']['AJdeleteComputers'] = "resource";
+$actions['pages']['AJsubmitDeleteComputers'] = "resource";
+$actions['pages']['AJcompScheduleChange'] = "resource";
+$actions['pages']['AJsubmitCompScheduleChange'] = "resource";
+$actions['pages']['AJgenerateDHCPdata'] = "resource";
+$actions['pages']['AJhostsData'] = "resource";
+$actions['pages']['AJcompStateChange'] = "resource";
+$actions['pages']['AJcompProvisioningChange'] = "resource";
+$actions['pages']['AJsubmitCompProvisioningChange'] = "resource";
+$actions['pages']['AJsubmitCompStateChange'] = "resource";
+$actions['pages']['AJsubmitComputerStateLater'] = "resource";
+$actions['pages']['jsonImageConnectMethods'] = "resource";
+$actions['pages']['AJaddImageConnectMethod'] = "resource";
+$actions['pages']['AJremImageConnectMethod'] = "resource";
+$actions['pages']['AJstartImage'] = "resource";
+$actions['pages']['AJupdateRevisionComments'] = "resource";
+$actions['pages']['AJupdateRevisionProduction'] = "resource";
+$actions['pages']['AJdeleteRevisions'] = "resource";
+$actions['pages']['AJfilterCompGroups'] = "resource";
+
+# storebackend
+$actions['mode']['RESTresourceBasic'] = "RESTresourceBasic";
+$actions['mode']['RESTresourceDetail'] = "RESTresourceDetail";
+#$actions['mode']['testDojoREST'] = "testDojoREST";
+$actions['pages']['RESTresourceBasic'] = "storebackend";
+$actions['pages']['RESTresourceDetail'] = "storebackend";
+#$actions['pages']['testDojoREST'] = "storebackend";
 
 # RPC
 $actions['mode']['xmlrpccall'] = "xmlrpccall";


Reply via email to