diff --git a/build/build-cloud.xml b/build/build-cloud.xml
index 4d52d08bb01..ebdefbb90b0 100755
--- a/build/build-cloud.xml
+++ b/build/build-cloud.xml
@@ -393,10 +393,6 @@
-
-
-
-
diff --git a/client/WEB-INF/classes/resources/resource.properties b/client/WEB-INF/classes/resources/resource.properties
index b7a3baead51..0310e1c3f06 100644
--- a/client/WEB-INF/classes/resources/resource.properties
+++ b/client/WEB-INF/classes/resources/resource.properties
@@ -1,5 +1 @@
-computer = computer
-disk = disk
-computer_disk_hahaha = computer disk hahaha
-monitor = monitor
-keyboard = keyboard
+Details = Details
diff --git a/client/WEB-INF/classes/resources/resource_zh.properties b/client/WEB-INF/classes/resources/resource_zh.properties
index 948c8e13203..307334f028f 100644
--- a/client/WEB-INF/classes/resources/resource_zh.properties
+++ b/client/WEB-INF/classes/resources/resource_zh.properties
@@ -1,5 +1,14 @@
-computer = 電腦
-disk = 硬碟
-computer_disk_hahaha = 電腦 硬碟 哈哈哈 !!!
-monitor = 瑩幕
-keyboard = 鍵盤
+Details = 詳述
+Volume = 容積
+Statistics = 統計
+Zone = 區域
+Template = 模板
+Service = 服務
+HA = 高的可用性
+Created = 產生日期
+Account = 帳戶
+Domain = 領土
+Host = 主機
+ISO = 空白模板
+
+
diff --git a/core/src/com/cloud/server/ManagementServer.java b/core/src/com/cloud/server/ManagementServer.java
index d3d781b2716..ab380004dfe 100644
--- a/core/src/com/cloud/server/ManagementServer.java
+++ b/core/src/com/cloud/server/ManagementServer.java
@@ -2188,4 +2188,5 @@ public interface ManagementServer {
boolean checkIfMaintenable(long hostId);
Map listCapabilities();
+ GuestOSCategoryVO getGuestOsCategory(Long guestOsId);
}
diff --git a/patches/xenserver/etc/init.d/seteth1 b/patches/xenserver/etc/init.d/seteth1
index 7c5e8d79c08..01ae5724950 100755
--- a/patches/xenserver/etc/init.d/seteth1
+++ b/patches/xenserver/etc/init.d/seteth1
@@ -49,7 +49,13 @@ setup_common() {
if [ "$BOOTPROTO" == "static" ]
then
- replace_in_file /etc/sysconfig/network GATEWAY $GW
+ replace_in_file /etc/sysconfig/network GATEWAY $GW
+ if [ -n "$ETH2_IP" -a "$ETH2_IP" != "0.0.0.0" ]
+ then
+ replace_in_file /etc/sysconfig/network GATEWAYDEV "eth2"
+ else
+ sed -i /GATEWAYDEV/d /etc/sysconfig/network
+ fi
else
sed -i /GATEWAY/d /etc/sysconfig/network
fi
diff --git a/patches/xenserver/root/patchsystemvm.sh b/patches/xenserver/root/patchsystemvm.sh
index f878ea11aa8..8a25ebf894c 100755
--- a/patches/xenserver/root/patchsystemvm.sh
+++ b/patches/xenserver/root/patchsystemvm.sh
@@ -40,6 +40,7 @@ secstorage_svcs() {
chkconfig sshd on
chkconfig httpd off
cp /etc/sysconfig/iptables-secstorage /etc/sysconfig/iptables
+ scp 169.254.0.1:/usr/sbin/vhd-util /usr/sbin
mkdir -p /var/log/cloud
}
@@ -73,7 +74,7 @@ for i in $CMDLINE
esac
done
-if [ "$TYPE" == "consoleproxy" ] || [ "$TYPE" == "secstorage" ] && [ -f /media/cdrom/systemvm.zip ]
+if [ "$TYPE" = "consoleproxy" ] || [ "$TYPE" = "secstorage" ] && [ -f /media/cdrom/systemvm.zip ]
then
patch_console_proxy /media/cdrom/systemvm.zip
if [ $? -gt 0 ]
@@ -87,33 +88,27 @@ fi
#empty known hosts
echo "" > /root/.ssh/known_hosts
-if [ "$TYPE" == "router" ]
-then
- routing_svcs
- if [ $? -gt 0 ]
- then
- printf "Failed to execute routing_svcs\n" >$logfile
- exit 6
- fi
-fi
-
-
-if [ "$TYPE" == "consoleproxy" ]
+if [ "$TYPE" = "consoleproxy" ]
then
consoleproxy_svcs
if [ $? -gt 0 ]
then
printf "Failed to execute consoleproxy_svcs\n" >$logfile
- exit 7
+ exit 6
fi
-fi
-
-if [ "$TYPE" == "secstorage" ]
+elif [ "$TYPE" = "secstorage" ]
then
secstorage_svcs
if [ $? -gt 0 ]
then
printf "Failed to execute secstorage_svcs\n" >$logfile
+ exit 7
+ fi
+else
+ routing_svcs
+ if [ $? -gt 0 ]
+ then
+ printf "Failed to execute routing_svcs\n" >$logfile
exit 8
fi
fi
diff --git a/scripts/storage/secondary/createtmplt.sh b/scripts/storage/secondary/createtmplt.sh
index c686b8b7640..9dfd5be5cd1 100755
--- a/scripts/storage/secondary/createtmplt.sh
+++ b/scripts/storage/secondary/createtmplt.sh
@@ -47,8 +47,7 @@ untar() {
uncompress() {
local ft=$(file $1| awk -F" " '{print $2}')
- local imgfile=${1%.*} #strip out trailing file suffix
- local tmpfile=${imgfile}.tmp
+ local tmpfile=${1}.tmp
case $ft in
gzip) gunzip -q -c $1 > $tmpfile
@@ -68,8 +67,8 @@ uncompress() {
return 1
fi
- mv $tmpfile $imgfile
- printf "$imgfile"
+ rm $1
+ printf $tmpfile
return 0
}
@@ -143,37 +142,29 @@ then
exit 2
fi
+mkdir -p $tmpltfs
+
+if [ ! -f $tmpltimg ]
+then
+ printf "root disk file $tmpltimg doesn't exist\n"
+ exit 3
+fi
+
if [ -n "$cksum" ]
then
verify_cksum $cksum $tmpltimg
fi
-#if [ ! -d /$tmpltfs ]
-#then
-# mkdir /$tmpltfs
-# if [ $? -gt 0 ]
-# then
-# printf "Failed to create user fs $tmpltfs\n" >&2
-# exit 1
-# fi
-#fi
-
tmpltimg2=$(uncompress $tmpltimg)
-if [ $? -ne 0 ]
-then
- rollback_if_needed $tmpltfs 2 "failed to uncompress $tmpltimg\n"
-fi
+rollback_if_needed $tmpltfs $? "failed to uncompress $tmpltimg\n"
-tmpltimg2=$(untar $tmpltimg2 /$tmpltfs vmi-root)
-if [ $? -ne 0 ]
-then
- rollback_if_needed $tmpltfs 2 "tar archives not supported\n"
-fi
+tmpltimg2=$(untar $tmpltimg2)
+rollback_if_needed $tmpltfs $? "tar archives not supported\n"
-if [ ! -f $tmpltimg2 ]
+if [ ${tmpltname%.vhd} = ${tmpltname} ]
then
- rollback_if_needed $tmpltfs 2 "root disk file $tmpltimg doesn't exist\n"
- exit 3
+ vhd-util check -n ${tmpltimg2} > /dev/null
+ rollback_if_needed $tmpltfs $? "vhd tool check $tmpltimg2 failed\n"
fi
# need the 'G' suffix on volume size
@@ -196,11 +187,8 @@ then
fi
fi
-tgtfile=${tmpltfs}/vmi-root-${tmpltname}
-
create_from_file $tmpltfs $tmpltimg2 $tmpltname $volsize $cleanup
-tgtfilename=$(echo $tmpltimg2 | awk -F"/" '{print $NF}')
touch /$tmpltfs/template.properties
rollback_if_needed $tmpltfs $? "Failed to create template.properties file"
echo -n "" > /$tmpltfs/template.properties
diff --git a/server/src/com/cloud/api/commands/ListVMsCmd.java b/server/src/com/cloud/api/commands/ListVMsCmd.java
index e8d3bc2eee5..0a61217a95c 100644
--- a/server/src/com/cloud/api/commands/ListVMsCmd.java
+++ b/server/src/com/cloud/api/commands/ListVMsCmd.java
@@ -33,6 +33,8 @@ import com.cloud.domain.DomainVO;
import com.cloud.host.HostVO;
import com.cloud.server.Criteria;
import com.cloud.service.ServiceOfferingVO;
+import com.cloud.storage.GuestOSCategoryVO;
+import com.cloud.storage.GuestOSVO;
import com.cloud.storage.VMTemplateVO;
import com.cloud.user.Account;
import com.cloud.uservm.UserVm;
@@ -178,6 +180,7 @@ public class ListVMsCmd extends BaseCmd {
vmData.add(new Pair(BaseCmd.Properties.NAME.getName(), vmInstance.getName()));
vmData.add(new Pair(BaseCmd.Properties.CREATED.getName(), getDateString(vmInstance.getCreated())));
vmData.add(new Pair(BaseCmd.Properties.IP_ADDRESS.getName(), vmInstance.getPrivateIpAddress()));
+
if (vmInstance.getState() != null) {
vmData.add(new Pair(BaseCmd.Properties.STATE.getName(), vmInstance.getState().toString()));
}
@@ -258,7 +261,9 @@ public class ListVMsCmd extends BaseCmd {
vmData.add(new Pair(BaseCmd.Properties.NETWORK_KB_WRITE.getName(), networkKbWrite));
}
- vmData.add(new Pair(BaseCmd.Properties.OS_TYPE_ID.getName(),vmInstance.getGuestOSId()));
+ GuestOSCategoryVO guestOsCategory = getManagementServer().getGuestOsCategory(vmInstance.getGuestOSId());
+ if(guestOsCategory!=null)
+ vmData.add(new Pair(BaseCmd.Properties.OS_TYPE_ID.getName(),guestOsCategory.getId()));
//network groups
vmData.add(new Pair(BaseCmd.Properties.NETWORK_GROUP_LIST.getName(), getManagementServer().getNetworkGroupsNamesForVm(vmInstance.getId())));
diff --git a/server/src/com/cloud/server/ManagementServerImpl.java b/server/src/com/cloud/server/ManagementServerImpl.java
index 65761af9c6f..3c65b3033e3 100644
--- a/server/src/com/cloud/server/ManagementServerImpl.java
+++ b/server/src/com/cloud/server/ManagementServerImpl.java
@@ -8632,6 +8632,10 @@ public class ManagementServerImpl implements ManagementServer {
return capabilities;
}
-
+ @Override
+ public GuestOSCategoryVO getGuestOsCategory(Long guestOsId)
+ {
+ return _guestOSCategoryDao.findById(guestOsId);
+ }
}
diff --git a/server/src/com/cloud/storage/StorageManagerImpl.java b/server/src/com/cloud/storage/StorageManagerImpl.java
index 53395a5a130..6ea715d25ed 100644
--- a/server/src/com/cloud/storage/StorageManagerImpl.java
+++ b/server/src/com/cloud/storage/StorageManagerImpl.java
@@ -901,8 +901,9 @@ public class StorageManagerImpl implements StorageManager {
return vols;
} catch (Exception e) {
- s_logger.error("Unexpected exception ", e);
-
+ if (s_logger.isDebugEnabled()) {
+ s_logger.debug(e.getMessage());
+ }
if (rootCreated != null) {
destroyVolume(rootCreated);
}
@@ -915,6 +916,9 @@ public class StorageManagerImpl implements StorageManager {
public long createUserVM(Account account, VMInstanceVO vm, VMTemplateVO template, DataCenterVO dc, HostPodVO pod, ServiceOfferingVO offering, DiskOfferingVO diskOffering,
List avoids, long size) {
List volumes = create(account, vm, template, dc, pod, offering, diskOffering, avoids, size);
+ if( volumes == null || volumes.size() == 0) {
+ throw new CloudRuntimeException("Unable to create volume for " + vm.getName());
+ }
for (VolumeVO v : volumes) {
long volumeId = v.getId();
diff --git a/setup/db/migration/data-21to22.sql b/setup/db/migration/data-21to22.sql
new file mode 100644
index 00000000000..0af83cc2afd
--- /dev/null
+++ b/setup/db/migration/data-21to22.sql
@@ -0,0 +1,8 @@
+--data upgrade from 21 to 22
+use cloud;
+
+START TRANSACTION;
+
+DELETE FROM configuration where name='upgrade.url';
+
+COMMIT;
diff --git a/ui/images/help_actionicon.png b/ui/images/help_actionicon.png
new file mode 100644
index 00000000000..77f87eff354
Binary files /dev/null and b/ui/images/help_actionicon.png differ
diff --git a/ui/images/search_closeicon.gif b/ui/images/search_closeicon.gif
new file mode 100644
index 00000000000..c6148ab69d0
Binary files /dev/null and b/ui/images/search_closeicon.gif differ
diff --git a/ui/images/search_closeicon_hover.gif b/ui/images/search_closeicon_hover.gif
new file mode 100644
index 00000000000..f011186d669
Binary files /dev/null and b/ui/images/search_closeicon_hover.gif differ
diff --git a/ui/new/css/jquery-ui-1.8.2.custom.css b/ui/new/css/jquery-ui-1.8.2.custom.css
new file mode 100755
index 00000000000..00ea6f1a02c
--- /dev/null
+++ b/ui/new/css/jquery-ui-1.8.2.custom.css
@@ -0,0 +1,567 @@
+/*
+* jQuery UI CSS Framework
+* Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
+* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
+*/
+
+/* Layout helpers
+----------------------------------*/
+.ui-helper-hidden { display: none; }
+.ui-helper-hidden-accessible { position: absolute; left: -99999999px; }
+.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
+.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
+.ui-helper-clearfix { display: inline-block; }
+/* required comment for clearfix to work in Opera \*/
+* html .ui-helper-clearfix { height:1%; }
+.ui-helper-clearfix { display:block; }
+/* end clearfix */
+.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
+
+
+/* Interaction Cues
+----------------------------------*/
+.ui-state-disabled { cursor: default !important; }
+
+
+/* Icons
+----------------------------------*/
+
+/* states and images */
+.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
+
+
+/* Misc visuals
+----------------------------------*/
+
+/* Overlays */
+.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
+
+
+/*
+* jQuery UI CSS Framework
+* Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
+* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
+* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS,%20Tahoma,%20Verdana,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=f6a828&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=35&borderColorHeader=e78f08&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=eeeeee&bgTextureContent=03_highlight_soft.png&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=333333&iconColorContent=222222&bgColorDefault=f6f6f6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=100&borderColorDefault=cccccc&fcDefault=1c94c4&iconColorDefault=ef8c08&bgColorHover=fdf5ce&bgTextureHover=02_glass.png&bgImgOpacityHover=100&borderColorHover=fbcb09&fcHover=c77405&iconColorHover=ef8c08&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=fbd850&fcActive=eb8f00&iconColorActive=ef8c08&bgColorHighlight=ffe45c&bgTextureHighlight=03_highlight_soft.png&bgImgOpacityHighlight=75&borderColorHighlight=fed22f&fcHighlight=363636&iconColorHighlight=228ef1&bgColorError=b81900&bgTextureError=08_diagonals_thick.png&bgImgOpacityError=18&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffd27a&bgColorOverlay=666666&bgTextureOverlay=08_diagonals_thick.png&bgImgOpacityOverlay=20&opacityOverlay=50&bgColorShadow=000000&bgTextureShadow=01_flat.png&bgImgOpacityShadow=10&opacityShadow=20&thicknessShadow=5px&offsetTopShadow=-5px&offsetLeftShadow=-5px&cornerRadiusShadow=5px
+*/
+
+
+/* Component containers
+----------------------------------*/
+.ui-widget { font-family: Arial, Helvetica, sans-serif; font-size: 11px; }
+.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Arial, Helvetica, sans-serif; font-size: 1em; }
+.ui-widget-content { border: 1px solid #aaaaaa; background: #ffffff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x; color: #525252; }
+.ui-widget-errorcontent { border: 1px solid #aaaaaa; background: #ffebeb 50% 50% repeat-x; color: #7f0000; }
+.ui-widget-content a { color: #2c8bbc; }
+.ui-widget-header { border: 1px solid #c0bfbf; background: #393939 url(images/ui-bg_glass_30_393939_1x400.png) 50% 50% repeat-x; color: #FFF; font-weight: bold; }
+.ui-widget-errorheader { border: 1px solid #c0bfbf; background: #393939 url(images/ui-bg_errorglass_30_ffffff_1x400.png) 50% 50% repeat-x; color: #FFF; font-weight: bold; }
+.ui-widget-header a { color: #ffffff; }
+
+/* Interaction states
+----------------------------------*/
+.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #cccccc; background: #f6f6f6 url(images/ui-bg_glass_100_f6f6f6_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #1c94c4; }
+.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #1c94c4; text-decoration: none; }
+.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { height:auto; border: 1px solid #fbcb09; background: #c7f9ff repeat-x; font-weight: bold; color: #c77405; }
+.ui-state-hover a, .ui-state-hover a:hover { color: #333; text-decoration: none; }
+.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #fbd850; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #eb8f00; }
+.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #eb8f00; text-decoration: none; }
+.ui-widget :active { outline: none; }
+
+/* Interaction Cues
+----------------------------------*/
+.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fed22f; background: #ffe45c url(images/ui-bg_highlight-soft_75_ffe45c_1x100.png) 50% top repeat-x; color: #363636; }
+.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
+.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #b81900 url(images/ui-bg_diagonals-thick_18_b81900_40x40.png) 50% 50% repeat; color: #ffffff; }
+.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #ffffff; }
+.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #ffffff; }
+.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
+.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
+.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
+
+/* Icons
+----------------------------------*/
+
+/* states and images */
+/* When mouse is over a resizable element, a small black triangle show => which we don't want. So, comment out the following line.*/
+/*
+.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); }
+*/
+.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
+.ui-widget-header .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); }
+.ui-state-default .ui-icon { background-image: url(images/ui-icons_ef8c08_256x240.png); }
+.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); }
+.ui-state-active .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); }
+.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_228ef1_256x240.png); }
+.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_ffd27a_256x240.png); }
+
+/* positioning */
+.ui-icon-carat-1-n { background-position: 0 0; }
+.ui-icon-carat-1-ne { background-position: -16px 0; }
+.ui-icon-carat-1-e { background-position: -32px 0; }
+.ui-icon-carat-1-se { background-position: -48px 0; }
+.ui-icon-carat-1-s { background-position: -64px 0; }
+.ui-icon-carat-1-sw { background-position: -80px 0; }
+.ui-icon-carat-1-w { background-position: -96px 0; }
+.ui-icon-carat-1-nw { background-position: -112px 0; }
+.ui-icon-carat-2-n-s { background-position: -128px 0; }
+.ui-icon-carat-2-e-w { background-position: -144px 0; }
+.ui-icon-triangle-1-n { background-position: 0 -16px; }
+.ui-icon-triangle-1-ne { background-position: -16px -16px; }
+.ui-icon-triangle-1-e { background-position: -32px -16px; }
+.ui-icon-triangle-1-se { background-position: -48px -16px; }
+.ui-icon-triangle-1-s { background-position: -64px -16px; }
+.ui-icon-triangle-1-sw { background-position: -80px -16px; }
+.ui-icon-triangle-1-w { background-position: -96px -16px; }
+.ui-icon-triangle-1-nw { background-position: -112px -16px; }
+.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
+.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
+.ui-icon-arrow-1-n { background-position: 0 -32px; }
+.ui-icon-arrow-1-ne { background-position: -16px -32px; }
+.ui-icon-arrow-1-e { background-position: -32px -32px; }
+.ui-icon-arrow-1-se { background-position: -48px -32px; }
+.ui-icon-arrow-1-s { background-position: -64px -32px; }
+.ui-icon-arrow-1-sw { background-position: -80px -32px; }
+.ui-icon-arrow-1-w { background-position: -96px -32px; }
+.ui-icon-arrow-1-nw { background-position: -112px -32px; }
+.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
+.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
+.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
+.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
+.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
+.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
+.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
+.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
+.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
+.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
+.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
+.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
+.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
+.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
+.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
+.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
+.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
+.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
+.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
+.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
+.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
+.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
+.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
+.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
+.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
+.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
+.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
+.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
+.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
+.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
+.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
+.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
+.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
+.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
+.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
+.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
+.ui-icon-arrow-4 { background-position: 0 -80px; }
+.ui-icon-arrow-4-diag { background-position: -16px -80px; }
+.ui-icon-extlink { background-position: -32px -80px; }
+.ui-icon-newwin { background-position: -48px -80px; }
+.ui-icon-refresh { background-position: -64px -80px; }
+.ui-icon-shuffle { background-position: -80px -80px; }
+.ui-icon-transfer-e-w { background-position: -96px -80px; }
+.ui-icon-transferthick-e-w { background-position: -112px -80px; }
+.ui-icon-folder-collapsed { background-position: 0 -96px; }
+.ui-icon-folder-open { background-position: -16px -96px; }
+.ui-icon-document { background-position: -32px -96px; }
+.ui-icon-document-b { background-position: -48px -96px; }
+.ui-icon-note { background-position: -64px -96px; }
+.ui-icon-mail-closed { background-position: -80px -96px; }
+.ui-icon-mail-open { background-position: -96px -96px; }
+.ui-icon-suitcase { background-position: -112px -96px; }
+.ui-icon-comment { background-position: -128px -96px; }
+.ui-icon-person { background-position: -144px -96px; }
+.ui-icon-print { background-position: -160px -96px; }
+.ui-icon-trash { background-position: -176px -96px; }
+.ui-icon-locked { background-position: -192px -96px; }
+.ui-icon-unlocked { background-position: -208px -96px; }
+.ui-icon-bookmark { background-position: -224px -96px; }
+.ui-icon-tag { background-position: -240px -96px; }
+.ui-icon-home { background-position: 0 -112px; }
+.ui-icon-flag { background-position: -16px -112px; }
+.ui-icon-calendar { background-position: -32px -112px; }
+.ui-icon-cart { background-position: -48px -112px; }
+.ui-icon-pencil { background-position: -64px -112px; }
+.ui-icon-clock { background-position: -80px -112px; }
+.ui-icon-disk { background-position: -96px -112px; }
+.ui-icon-calculator { background-position: -112px -112px; }
+.ui-icon-zoomin { background-position: -128px -112px; }
+.ui-icon-zoomout { background-position: -144px -112px; }
+.ui-icon-search { background-position: -160px -112px; }
+.ui-icon-wrench { background-position: -176px -112px; }
+.ui-icon-gear { background-position: -192px -112px; }
+.ui-icon-heart { background-position: -208px -112px; }
+.ui-icon-star { background-position: -224px -112px; }
+.ui-icon-link { background-position: -240px -112px; }
+.ui-icon-cancel { background-position: 0 -128px; }
+.ui-icon-plus { background-position: -16px -128px; }
+.ui-icon-plusthick { background-position: -32px -128px; }
+.ui-icon-minus { background-position: -48px -128px; }
+.ui-icon-minusthick { background-position: -64px -128px; }
+.ui-icon-close { background-position: -80px -128px; }
+.ui-icon-closethick { background-position: -96px -128px; }
+.ui-icon-key { background-position: -112px -128px; }
+.ui-icon-lightbulb { background-position: -128px -128px; }
+.ui-icon-scissors { background-position: -144px -128px; }
+.ui-icon-clipboard { background-position: -160px -128px; }
+.ui-icon-copy { background-position: -176px -128px; }
+.ui-icon-contact { background-position: -192px -128px; }
+.ui-icon-image { background-position: -208px -128px; }
+.ui-icon-video { background-position: -224px -128px; }
+.ui-icon-script { background-position: -240px -128px; }
+.ui-icon-alert { background-position: 0 -144px; }
+.ui-icon-info { background-position: -16px -144px; }
+.ui-icon-notice { background-position: -32px -144px; }
+.ui-icon-help { background-position: -48px -144px; }
+.ui-icon-check { background-position: -64px -144px; }
+.ui-icon-bullet { background-position: -80px -144px; }
+.ui-icon-radio-off { background-position: -96px -144px; }
+.ui-icon-radio-on { background-position: -112px -144px; }
+.ui-icon-pin-w { background-position: -128px -144px; }
+.ui-icon-pin-s { background-position: -144px -144px; }
+.ui-icon-play { background-position: 0 -160px; }
+.ui-icon-pause { background-position: -16px -160px; }
+.ui-icon-seek-next { background-position: -32px -160px; }
+.ui-icon-seek-prev { background-position: -48px -160px; }
+.ui-icon-seek-end { background-position: -64px -160px; }
+.ui-icon-seek-start { background-position: -80px -160px; }
+/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
+.ui-icon-seek-first { background-position: -80px -160px; }
+.ui-icon-stop { background-position: -96px -160px; }
+.ui-icon-eject { background-position: -112px -160px; }
+.ui-icon-volume-off { background-position: -128px -160px; }
+.ui-icon-volume-on { background-position: -144px -160px; }
+.ui-icon-power { background-position: 0 -176px; }
+.ui-icon-signal-diag { background-position: -16px -176px; }
+.ui-icon-signal { background-position: -32px -176px; }
+.ui-icon-battery-0 { background-position: -48px -176px; }
+.ui-icon-battery-1 { background-position: -64px -176px; }
+.ui-icon-battery-2 { background-position: -80px -176px; }
+.ui-icon-battery-3 { background-position: -96px -176px; }
+.ui-icon-circle-plus { background-position: 0 -192px; }
+.ui-icon-circle-minus { background-position: -16px -192px; }
+.ui-icon-circle-close { background-position: -32px -192px; }
+.ui-icon-circle-triangle-e { background-position: -48px -192px; }
+.ui-icon-circle-triangle-s { background-position: -64px -192px; }
+.ui-icon-circle-triangle-w { background-position: -80px -192px; }
+.ui-icon-circle-triangle-n { background-position: -96px -192px; }
+.ui-icon-circle-arrow-e { background-position: -112px -192px; }
+.ui-icon-circle-arrow-s { background-position: -128px -192px; }
+.ui-icon-circle-arrow-w { background-position: -144px -192px; }
+.ui-icon-circle-arrow-n { background-position: -160px -192px; }
+.ui-icon-circle-zoomin { background-position: -176px -192px; }
+.ui-icon-circle-zoomout { background-position: -192px -192px; }
+.ui-icon-circle-check { background-position: -208px -192px; }
+.ui-icon-circlesmall-plus { background-position: 0 -208px; }
+.ui-icon-circlesmall-minus { background-position: -16px -208px; }
+.ui-icon-circlesmall-close { background-position: -32px -208px; }
+.ui-icon-squaresmall-plus { background-position: -48px -208px; }
+.ui-icon-squaresmall-minus { background-position: -64px -208px; }
+.ui-icon-squaresmall-close { background-position: -80px -208px; }
+.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
+.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
+.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
+.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
+.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
+.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
+
+
+/* Misc visuals
+----------------------------------*/
+
+/* Corner radius */
+.ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; }
+.ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; }
+.ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
+.ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
+.ui-corner-top { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; }
+.ui-corner-bottom { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
+.ui-corner-right { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; }
+.ui-corner-left { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; }
+.ui-corner-all { -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; }
+
+/* Overlays */
+.ui-widget-overlay { background: #666666 url(images/ui-bg_diagonals-thick_20_666666_40x40.png) 50% 50% repeat; opacity: .50;filter:Alpha(Opacity=50); }
+.ui-widget-shadow { margin: -5px 0 0 -5px; padding: 5px; background: #000000 url(images/ui-bg_flat_10_000000_40x100.png) 50% 50% repeat-x; opacity: .20;filter:Alpha(Opacity=20); -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; }/* Resizable
+----------------------------------*/
+.ui-resizable { position: relative;}
+.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;}
+.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
+.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; }
+.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; }
+.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; }
+.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; }
+.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
+.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
+.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
+.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/* Selectable
+----------------------------------*/
+.ui-selectable-helper { border:1px dotted black }
+/* Accordion
+----------------------------------*/
+.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin:0; padding:0; zoom: 0; background:none; border-bottom:1px dashed #92a7b7; border-top:none; border-left:none; border-right:none;}
+
+.ui-accordion .ui-accordion-li-fix { display: inline; border:none; padding:0; }
+.ui-accordion .ui-accordion-header-active { border-bottom: none !important;}
+.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; border:none; }
+/* IE7-/Win - Fix extra vertical space in lists */
+.ui-accordion a { zoom: 0; border:none;}
+.ui-accordion-icons .ui-accordion-header a { padding: 0 0 0 0; border:none; }
+.ui-accordion .ui-accordion-header .ui-icon { position: absolute; border:none;}
+.ui-accordion .ui-accordion-content { /*padding: 1em 2.2em;*/ border-top: 0; margin: 0px; position: relative; top: 0; overflow: auto; display: none; zoom:0; background:none; border:none; padding:0;}
+.ui-accordion .ui-accordion-content-active { display: block; border:none; padding:0; }/* Autocomplete
+----------------------------------*/
+.ui-autocomplete { position: absolute; cursor: default; }
+.ui-autocomplete-loading { background: white url('images/ui-anim_basic_16x16.gif') right center no-repeat; }
+
+/* workarounds */
+* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
+
+/* Menu
+----------------------------------*/
+.ui-menu {
+ list-style:none;
+ padding: 2px;
+ margin: 0;
+ display:block;
+}
+.ui-menu .ui-menu {
+ margin-top: -3px;
+}
+.ui-menu .ui-menu-item {
+ margin:0;
+ padding: 0;
+ zoom: 1;
+ float: left;
+ clear: left;
+ width: 100%;
+}
+.ui-menu .ui-menu-item a {
+ text-decoration:none;
+ display:block;
+ padding:.2em .4em;
+ line-height:1.5;
+ zoom:1;
+}
+.ui-menu .ui-menu-item a.ui-state-hover,
+.ui-menu .ui-menu-item a.ui-state-active {
+ font-weight: normal;
+ margin: -1px;
+ background:#c7f9ff repeat top left;
+ color:#004351;
+ border:0;
+ height:18px;
+}
+/* Button
+----------------------------------*/
+
+.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */
+.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
+button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */
+.ui-button-icons-only { width: 3.4em; }
+button.ui-button-icons-only { width: 3.7em; }
+
+/*button text element */
+.ui-button .ui-button-text { display: block; line-height: 1.4; }
+.ui-button-text-only .ui-button-text { padding: .4em 1em; }
+.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; }
+.ui-button-text-icon .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; }
+.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; }
+/* no icon support for input elements, provide padding by default */
+input.ui-button { padding: .4em 1em; }
+
+/*button icon element(s) */
+.ui-button-icon-only .ui-icon, .ui-button-text-icon .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; }
+.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; }
+.ui-button-text-icon .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; }
+.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
+
+/*button sets*/
+.ui-buttonset { margin-right: 7px; }
+.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; }
+
+/* workarounds */
+button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
+
+
+
+
+
+/* Dialog
+----------------------------------*/
+.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; }
+.ui-dialog .ui-dialog-titlebar { padding: .2em .3em .2em 1em; position: relative; font-size:11px; font-weight:normal; }
+.ui-dialog .ui-dialog-title { float: left; margin: .1em 0 .2em; font-size:11px;}
+.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
+.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
+.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; height:18px; color:#FFF; }
+.ui-dialog .ui-dialog-content { border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
+.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: -0.2em 1em .5em .4em; }
+.ui-dialog .ui-dialog-buttonpane button { float: right; margin: .5em .4em .5em 0; cursor: pointer; padding: -0.2em .6em .3em .6em; line-height: 1.4em; width:auto; overflow:visible; }
+.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
+.ui-dialog .ui-dialog-title { float: left; margin: .1em 0 .2em; font-size:11px;}
+/* Slider
+----------------------------------*/
+.ui-slider { position: relative; text-align: left; }
+.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
+.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
+
+.ui-slider-horizontal { height: .8em; }
+.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
+.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
+.ui-slider-horizontal .ui-slider-range-min { left: 0; }
+.ui-slider-horizontal .ui-slider-range-max { right: 0; }
+
+.ui-slider-vertical { width: .8em; height: 100px; }
+.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
+.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
+.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
+.ui-slider-vertical .ui-slider-range-max { top: 0; }/* Tabs
+----------------------------------*/
+.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
+.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
+.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
+.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; }
+.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; }
+.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
+.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
+.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; }
+.ui-tabs .ui-tabs-hide { display: none !important; }
+/* Datepicker
+----------------------------------*/
+.ui-datepicker { width: 17em; padding: .2em .2em 0; }
+.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
+.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
+.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
+.ui-datepicker .ui-datepicker-prev { left:2px; }
+.ui-datepicker .ui-datepicker-next { right:2px; }
+.ui-datepicker .ui-datepicker-prev-hover { left:1px; }
+.ui-datepicker .ui-datepicker-next-hover { right:1px; }
+.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
+.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
+.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
+.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
+.ui-datepicker select.ui-datepicker-month,
+.ui-datepicker select.ui-datepicker-year { width: 49%;}
+.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
+.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
+.ui-datepicker td { border: 0; padding: 1px; }
+.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
+.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
+.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
+.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
+
+/* with multiple calendars */
+.ui-datepicker.ui-datepicker-multi { width:auto; }
+.ui-datepicker-multi .ui-datepicker-group { float:left; }
+.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
+.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
+.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
+.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
+.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
+.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
+.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
+.ui-datepicker-row-break { clear:both; width:100%; }
+
+/* RTL support */
+.ui-datepicker-rtl { direction: rtl; }
+.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
+.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
+.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
+.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
+.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
+.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
+.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
+.ui-datepicker-rtl .ui-datepicker-group { float:right; }
+.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
+.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
+
+/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
+.ui-datepicker-cover {
+ display: none; /*sorry for IE5*/
+ display/**/: block; /*sorry for IE5*/
+ position: absolute; /*must have*/
+ z-index: -1; /*must have*/
+ filter: mask(); /*must have*/
+ top: -4px; /*must have*/
+ left: -4px; /*must have*/
+ width: 200px; /*must have*/
+ height: 200px; /*must have*/
+}/* Progressbar
+----------------------------------*/
+.ui-progressbar { height:2em; text-align: left; }
+.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }
+
+/* Form in dialog
+----------------------------------*/
+.dialog_formcontent{ width:auto; height:auto; float:left; margin-top:10px; padding:0; color:#FFF; font-size:11px; margin-left:0; display:inline;}
+.dialog_formcontent ol { width:auto; height:auto; color:#333; float:left; font-family:Arial, Helvetica, sans-serif; font-size:11px; list-style:none; margin:0; padding:0;}
+.dialog_formcontent li { width:auto; height:auto; float:left; padding-bottom: 2px; color:#FFF; font-size:12px; font-weight:normal; text-align:left; margin:0 0 0 0;}
+.dialog_formcontent label { width:100px; float:left; text-align:left; font-weight:bold; margin:0px 5px 5px 5px; color:#333; font-size:11px; font-weight:normal;}
+.dialog_formcontent p{ width:auto; float:left; text-align:left; font-weight:bold; margin:0; color:#333; font-size:11px; font-weight:normal;}
+.dialog_formcontent .radio { width:15px; height:15px; float:left; margin:0 10px 0 0; padding:0;}
+.dialog_formcontent .checkbox { width:12px; height:12px; float:left; margin:0 10px 0 0; padding:0;}
+.dialog_formcontent .text { background-color: #f4f2f2; font: normal 11px Arial, Helvetica, sans-serif; float:left; border: 1px solid #999; height: 16px; width: 150px; margin:0 5px 3px 0; padding:0; color:#666;}
+.dialog_formcontent .text2 { background-color: #f4f2f2; font: normal 11px Arial, Helvetica, sans-serif; float:left; border: 1px solid #999; height: 14px; width: auto; margin:0 0 0 0; padding:0; color:#666;}
+.dialog_formcontent .smalltext { background-color: #f4f2f2; font: normal 11px Arial, Helvetica, sans-serif; float:left; border: 1px solid #999; height: 14px; width: 67px; margin:0 5px 3px 0 padding:0; color:#666;}
+.dialog_formcontent .error_smalltext { background-color: #fbabb3; font: normal 11px Arial, Helvetica, sans-serif; float:left; border: 1px solid #999; height: 14px; width: 67px; margin:0 5px 3px 0; padding:0; color:#666;}
+.dialog_formcontent_errormsg {font: normal 10px Arial, Helvetica, sans-serif; float:left; height: auto; width: 160px; margin:0 10px 2px 110px; padding:0; color:#F00; display:inline;}
+.dialog_formcontent_errormsg_long {font: normal 10px Arial, Helvetica, sans-serif; float:left; height: auto; width: 250px; margin:2px 10px 2px 0; padding:0; color:#F00; display:inline;}
+.dialog_formcontent .select { background-color: #f4f2f2; font: normal 11px Arial, Helvetica, sans-serif; float:left; border: 1px solid #999; height: auto; min-width: 153px; padding:0; color:#666; margin:0 10px 3px 0;}
+.dialog_formcontent .snapselect { background-color: #f4f2f2; font: normal 11px Arial, Helvetica, sans-serif; float:left; border: 1px solid #999; height: auto; width: 70px; padding:0; color:#666; margin:0 0 0 0;}
+.dialog_formcontent .error_text { background-color: #fbabb3; font: normal 11px Arial, Helvetica, sans-serif; float:left; border: 1px solid #999; height: 14px; width: 150px; margin:0 10px 0 0; padding:0; color:#666;}
+.dialog_formcontent .error_text2 { background-color: #fbabb3; font: normal 11px Arial, Helvetica, sans-serif; float:left; border: 1px solid #999; height: 14px; width: auto; margin:0 0 0 0; padding:0; color:#666;}
+.dialog_formcontent .error_icon { width:15px; height:12px; float:left; background:url(images/alert_icon.png) no-repeat top left; margin:2px 0 0 3px; padding:0;}
+.dialog_formcontent span {font-family:Arial, Helvetica, sans-serif; font-size:11px; text-align:left; color:#333; font-weight:normal; float:left; margin:0 5px 0 0; padding:0;}
+.dialog_formcontent a { color:#2c8bbc; font-size:11px; font-weight:normal; text-align:left; text-decoration:underline; float:left; margin:0; padding:0;}
+.dialog_formcontent a:link .dialog_formcontent a:visited { text-decoration:underline;}
+dialog_formcontent a:hover { text-decoration:none;}
+
+/* Snapshots in dialog
+----------------------------------*/
+.dialog_snapshotbox {width:auto; height:auto; float:left; display:block; margin:0; padding:0;}
+.dialog_snapshotcontainer {width:auto height:auto; display:block; float:left; margin:0; padding:0;}
+.dialog_snapshotleft {width:500px; height:135px; float:left;display:block; margin:0; padding:0;}
+.dialog_snapshotleft_list {width:705px; height:auto; float:left; margin:0 0 10px 0; padding:0; color:#333; font-size:11px;}
+.dialog_snapshotleft_info {width:470px; height:auto; float:left; margin:0 0 10px 0; padding:0; color:#333; font-size:11px;}
+.dialog_snapshotleft_info p {width:auto; height:auto; float:left; color:#333; font-size:11px; font-weight:normal; margin:0; padding:0;}
+.dialog_snapshotleft_info span {width:auto; height:auto; float:left; color:#333; font-size:11px; font-weight:bold; margin:0 2px 0 2px; padding:0;}
+.dialog_snapshotleft_label {width:60px; height:auto; float:left; color:#457700; font-size:11px; font-weight:bold; margin:0; padding:0;}
+.dialog_snapshotleft_max {width:75px; height:auto; float:left; margin:0 5px 0 0; padding:0; color:#333; font-size:11px;}
+.dialog_snapshotleft_max p {width:auto; height:auto; float:left; margin:0 5px 0 0; padding:0; color:#666; font-weight:bold; font-size:11px;}
+.dialog_snapshotleft_max span {width:auto; height:auto; float:left; color:#333; font-size:11px; font-weight:bold; margin:0; padding:0;}
+.dialog_snapshotleft_actions {width:80px; height:auto; float:left; margin:0 5px 0 0; padding:0; color:#333; font-size:11px;}
+.dialog_snapshotleft_actions a:link {width:auto; height:auto; margin:0 5px 0 0; padding:0; color:#2c8bbc; text-decoration:none; font-size:11px;}
+.dialog_snapshotleft_actions a:visited {width:auto; height:auto; margin:0 5px 0 0; padding:0; color:#2c8bbc; text-decoration:none; font-size:11px;}
+.dialog_snapshotleft_actions a:hover {width:auto; height:auto; margin:0 5px 0 0; padding:0; color:#2c8bbc; text-decoration:underline; font-size:11px;}
+.dialog_snapshotright {width:705px; height:0px; float:left; display:none; margin:0; padding:15px 0 0 0; border-top:1px solid #666;}
+.dialog_snapshotright_infotext{width:360px; height:160px; float:left; display:none; margin:0; padding:0; font-size:15px; font-family:Arial, Helvetica, sans-serif; font-size:normal; text-align:left; margin:10px; color:#333;}
+.dialog_snapshots_editcontent {width:350px; height:auto; float:left; margin:0; padding:0;}
+.dialog_snapshots_editcontent_title {width:280px; height:auto; float:left; margin:0; padding:0;}
+.dialog_snapshots_editcontent_title p {width:auto; height:auto; float:left; margin:0; padding:0; font-size:14px; font-weight:normal;}
+.dialog_snapshots_editcontent_title span{width:auto; height:auto; float:left; margin:0 0 0 5px; display:inline; padding:0; font-size:14px; font-weight:bold;}
+
+
+/* Snapshots
+----------------------------------*/
+.dialog_snapshotformcontent{ width:370px; height:auto; float:left; margin-top:10px; padding:0; color:#FFF; font-size:11px; margin-left:0; display:inline;}
+.dialog_snapshotformcontent h2{ width:auto; height:auto; float:left; margin-left:10px; padding:0; font-size:15px; color:#77c4df; font-weight:normal;}
+.dialog_snapshotformcontent ol { width:auto; height:auto; color:#333; float:left; font-family:Arial, Helvetica, sans-serif; font-size:11px; list-style:none; margin:0; padding:0;}
+.dialog_snapshotformcontent li { width:auto; float:left; padding-bottom: 5px; color:#FFF; font-size:12px; font-weight:normal; text-align:left; margin-top:5px;}
+.dialog_snapshotformcontent label { width:auto; float:left; text-align:left; font-weight:bold; margin:0 5px 0 5px; color:#333; font-size:11px; font-weight:normal;}
+.dialog_snapshotformcontent span { width:auto; float:left; text-align:left; font-weight:normal; margin: 0 0 0 5px; color:#333; font-size:11px; font-weight:normal;}
+.dialog_snapshotformcontent .radio { width:15px; height:15px; float:left; margin:0; padding:0;}
+.dialog_snapshotformcontent .checkbox { width:15px; height:15px; float:left; margin:0; padding:0;}
+.dialog_snapshotformcontent .text { background-color: #f4f2f2; font: normal 11px Arial, Helvetica, sans-serif; float:left; border: 1px solid #999; height: 14px; width: 200px; margin:0; padding:0; color:#666;}
+.dialog_snapshotformcontent .error_text { background-color: #fbabb3; font: normal 11px Arial, Helvetica, sans-serif; float:left; border: 1px solid #999; height: 14px; width: 200px; margin:0; padding:0; color:#666;}
+.dialog_snapshotformcontent a[title] { background-color: #FFF; font: normal 11px Arial, Helvetica, sans-serif; float:left; border: 1px solid #999; height: 14px; width: 200px; margin:0; padding:0; color:#666;}
+.dialog_snapshotformcontent .select { background-color: #f4f2f2; font: normal 11px Arial, Helvetica, sans-serif; float:left; border: 1px solid #999; height: auto; min-width: 150px; margin-left:5px; padding:0; color:#666;}
+.frequency_left {width:150px; height:30px; float:left; margin:0; padding:0;}
+.frequency_left h2 {width:auto; height:auto; float:left; margin-left:3px; padding:0; font-size:15px; color:#77c4df; font-weight:normal; }
+.retention_right {width:200px; height:30px; float:left; margin:0; padding:0;}
+.retention_right h2 {width:auto; height:auto; float:left; margin-left:3px; padding:0; font-size:15px; color:#77c4df; font-weight:normal; }
diff --git a/ui/new/css/logger.css b/ui/new/css/logger.css
new file mode 100755
index 00000000000..43c73ef4295
--- /dev/null
+++ b/ui/new/css/logger.css
@@ -0,0 +1,119 @@
+@charset "UTF-8";
+.logwin {
+ position: absolute;
+
+ z-index:2147483648;
+ width: 800px;
+ border: 1px solid gray;
+ background: white;
+}
+
+.logwin_title{
+ width:auto;
+ height: 23px;
+ background:url(images/grid_headerbg.gif) repeat-x top left;
+ border: 1px sold #737373;
+}
+
+.logwin_title_actionbox{
+ width:175px;
+ height:16px;
+ float:left;
+ margin:4px 0 0 7px;
+ display:inline;
+}
+
+
+.logwin_title_actionbox .select {
+ background: #424242;
+ font: normal 10px Arial, Helvetica, sans-serif;
+ float:left;
+ border: 1px solid #6e6e6e;
+ height: 16px;
+ width: 100px;
+ margin-left:3px;
+ padding:0 0 0 3px;
+ color:#CCC;
+}
+
+.logwin_title_rgtactionbox{
+ width:49px;
+ height:15px;
+ float:right;
+ margin:4px 0 0 7px;
+ display:inline;
+}
+
+
+a.logwin_playbutton {
+ width:18px;
+ height:15px;
+ float:left;
+ background:url(images/play_button.gif) no-repeat top left;
+ margin-right:2px;
+ padding:0;
+}
+
+a:hover.logwin_playbutton {
+ background:url(images/play_button_hover.gif) no-repeat top left;
+}
+
+a.logwin_stopbutton {
+ width:18px;
+ height:15px;
+ float:left;
+ background:url(images/stop_button.gif) no-repeat top left;
+ margin-right:2px;
+ padding:0;
+}
+
+a:hover.logwin_stopbutton {
+ background:url(images/stop_button_hover.gif) no-repeat top left;
+}
+
+a.logwin_clrbutton {
+ width:28px;
+ height:15px;
+ float:left;
+ background:url(images/clr_button.gif) no-repeat top left;
+ margin:0;
+ padding:0;
+}
+
+a:hover.logwin_clrbutton {
+ background:url(images/clr_button_hover.gif) no-repeat top left;
+}
+
+a.logwin_shrinkbutton {
+ width:18px;
+ height:15px;
+ float:right;
+ background:url(images/shrink_button.gif) no-repeat top left;
+ margin-right:7px;
+ margin-top:4px;
+ padding:0;
+}
+
+a:hover.logwin_shrinkbutton {
+ background:url(images/shrink_button_hover.gif) no-repeat top left;
+}
+
+a.logwin_minimizebutton {
+ width:18px;
+ height:15px;
+ float:left;
+ background:url(images/minimize_button.gif) no-repeat top left;
+ margin-right:2px;
+ padding:0;
+}
+
+a:hover.logwin_minimizebutton {
+ background:url(images/minimize_button_hover.gif) no-repeat top left;
+}
+
+.logwin_content {
+ overflow:scroll;
+ height: 477px;
+ background: white;
+}
+
diff --git a/ui/new/css/main.css b/ui/new/css/main.css
new file mode 100644
index 00000000000..a4f239d1334
--- /dev/null
+++ b/ui/new/css/main.css
@@ -0,0 +1,2004 @@
+@charset "UTF-8";
+/* CSS Document */
+
+*{
+ margin:0;
+ padding:0;
+}
+
+html,body{
+ font-family:Arial, Helvetica, sans-serif;
+ font-size:11px;
+ color:#717171;
+ height:auto;
+ font-weight:normal;
+ background:#00374e url(../images/login_bg.gif) repeat-x top left;
+ margin:0;
+ padding:0;
+ overflow-x:hidden;
+ overflow-y:auto;
+}
+
+
+
+a {
+ color:#2c8bbc;
+ font-size:11px;
+ font-weight:normal;
+ text-align:left;
+ margin:0;
+ padding:0;
+ text-decoration:none;
+}
+
+a:link, a:visited {
+ text-decoration:none;
+}
+
+a:visited {
+ text-decoration:underline;
+}
+
+
+#login_wrapper {
+ width:660px;
+ height:auto;
+ margin:0 auto;
+ padding:0;
+}
+
+.login_main{
+ width:660px;
+ height:auto;
+ float:left;
+ margin:100px 0 0 0;
+ padding:0;
+}
+
+.login_logopanel {
+ width:660px;
+ height:66px;
+ float:left;
+ margin:0 0 0 0;
+ padding:0;
+}
+
+.login_logobox {
+ width:181px;
+ height:66px;
+ float:left;
+ background:url(../images/login_logo.gif) no-repeat top left;
+ margin:0 0 0 75px;
+ display:inline;
+ padding:0;
+}
+
+.main_loginbox {
+ width:660px;
+ height:auto;
+ float:left;
+ margin:0;
+ padding:0;
+}
+
+.main_loginbox_top {
+ width:660px;
+ height:18px;
+ float:left;
+ background:url(../images/loginbox_top.png) no-repeat top left;
+ margin:0;
+ padding:0;
+ overflow:hidden;
+}
+
+.main_loginbox_mid {
+ width:660px;
+ height:auto;
+ float:left;
+ background:url(../images/loginbox_mid.png) repeat-y top left;
+ margin:0;
+ padding:0;
+}
+
+.main_loginbox_bot {
+ width:660px;
+ height:109px;
+ float:left;
+ background:url(../images/loginbox_bot.gif) no-repeat top left;
+ margin:0;
+ padding:0;
+}
+
+.login_contentbox {
+ width:420px;
+ height:auto;
+ float:left;
+ margin:5px 0 0 110px;
+ display:inline;
+ padding:0;
+}
+
+.login_contentbox_title {
+ width:100%;
+ height:auto;
+ float:left;
+ margin:0;
+ padding:0;
+}
+
+.login_contentbox_title h1 {
+ width:auto;
+ height:auto;
+ float:left;
+ color:#023b53;
+ text-align:left;
+ font-weight:bold;
+ font-size:16px;
+ margin:0;
+ padding:0;
+}
+
+.login_formbox {
+ width:400px;
+ height:auto;
+ float:left;
+ list-style:none;
+ margin:10px 0 0 0;
+ padding:0;
+}
+
+.login_formbox li {
+ width:400px;
+ height:auto;
+ float:left;
+ list-style:none;
+ margin:12px 0 0 0;
+ padding:0;
+}
+
+.login_formbox label {
+ width:90px;
+ height:auto;
+ float:left;
+ color:#343434;
+ text-align:left;
+ font-size:14px;
+ font-weight:normal;
+ margin:4px 0 0 0;
+ padding:0;
+}
+
+.login_formbox_textbg {
+ width:226px;
+ height:24px;
+ float:left;
+ background:url(../images/login_textbg.gif) no-repeat top left;
+ margin:0 0 0 5px;
+ display:inline;
+ padding:0;
+}
+
+.login_formbox .text {
+ width:212px;
+ height:18px;
+ float:left;
+ background:#FFF repeat top left;
+ border:none;
+ margin:3px 0 0 6px;
+ display:inline;
+ color:#333;
+ font-size:12px;
+ font-weight:normal;
+ text-align:left;
+ padding:0;
+}
+
+.loginbutton_box {
+ width:400px;
+ height:auto;
+ float:left;
+ margin:17px 0 0 0;
+ padding:0;
+}
+
+.login_button {
+ width:94px;
+ height:30px;
+ float:left;
+ background:url(../images/login_button.gif) no-repeat top left;
+ color:#FFF;
+ text-align:center;
+ font-size:16px;
+ font-weight:normal;
+ cursor:pointer;
+ cursor:hand;
+ margin:0;
+ padding:7px 0 0 0;
+}
+
+
+.login_button:hover {
+ background:url(../images/login_button_hover.gif) no-repeat top left;
+
+}
+
+.error_box {
+ width:420px;
+ height:auto;
+ float:left;
+ background:#ffe5e5 repeat top left;
+ border:1px solid #CCC;
+ margin:7px 0 0 0;
+ padding:0 0 5px 0;
+}
+
+.error_box p{
+ width:400px;
+ height:auto;
+ float:left;
+ color:#ae0000;
+ font-size:11px;
+ font-weight:normal;
+ text-align:left;
+ margin:5px 0 0 10px;
+ padding:0;
+}
+
+
+
+#main {
+ min-width:960px;
+ width:100%;
+ min-height:1000px;
+ height:auto;
+ background:#FFF;
+ margin:0;
+ padding:0;
+
+}
+
+#overlay_black{
+ display: block;
+ position: absolute;
+ top: 0%;
+ left: 0%;
+ width: 100%;
+ min-height: 1070px;
+ height: 100%;
+ background-color: black;
+ z-index:1001;
+ -moz-opacity: 0.8;
+ opacity:.60;
+ filter: alpha(opacity=60);
+ overflow:hidden;
+}
+
+.vmpopup_container {
+ width:737px;
+ height:505px;
+ float:left;
+ position:absolute;
+ top:200px;
+ left:22%;
+ z-index:1005;
+ margin:0;
+ padding:0;
+}
+
+
+.vmpopup_container_closebutton {
+ width:13px;
+ height:13px;
+ float:right;
+ background:url(../images/vm_closebutton.gif) no-repeat top left;
+ margin:8px 10px 0 0;
+ padding:0;
+ cursor:pointer;
+ cursor:hand;
+}
+
+.vmpopup_container_closebutton:hover {
+ background:url(../images/vm_closebutton_hover.gif) no-repeat top left;
+}
+
+
+.vmpopup_container_top {
+ width:737px;
+ height:30px;
+ float:left;
+ background:url(../images/vmpopup_top.png) no-repeat top left;
+ margin:0;
+ padding:0;
+ overflow:hidden;
+}
+
+.vmpopup_steps {
+ width:71px;
+ height:21px;
+ float:left;
+ color:#333;
+ font-size:12px;
+ font-weight:normal;
+ text-align:left;
+ margin:0;
+ padding:9px 0 0 25px;
+}
+
+.vmpopup_maincontentarea {
+ width:700px;
+ height:435px;
+ float:left;
+ margin:20px 0 0 19px;
+ display:inline;
+ padding:0;
+}
+
+.vmpopup_titlebox {
+ width:700px;
+ height:auto;
+ float:left;
+ margin:0;
+ padding:0;
+}
+
+.vmpopup_titlebox h2 {
+ width:650px;
+ height:auto;
+ color:#003a53;
+ font-size:16px;
+ font-weight:normal;
+ text-align:left;
+ float:left;
+ margin:0;
+ padding:0;
+}
+
+.vmpopup_titlebox p {
+ width:650px;
+ height:auto;
+ color:#999;
+ font-size:11px;
+ font-weight:normal;
+ text-align:left;
+ float:left;
+ margin:7px 0 0 0;
+ padding:0;
+}
+
+.vmpopup_contentpanel {
+ width:700px;
+ height:320px;
+ float:left;
+ margin:15px 0 0 0;
+ padding:0;
+}
+
+.vmpopup_contentpanel h3 {
+ width:700px;
+ height:auto;
+ color:#003a52;
+ font-size:12px;
+ font-weight:bold;
+ float:left;
+ margin:0 0 0 0;
+}
+
+.vmpopup_offeringpanel {
+ width:700px;
+ height:290px;
+ float:left;
+ margin:0 0 0 0;
+ padding:0;
+ overflow-y:scroll;
+ overflow-y:auto;
+ overflow-x:hidden;
+}
+
+.vmpopup_offeringbox {
+ width:695px;
+ height:auto;
+ float:left;
+ border:1px solid #c0c0c0;
+ background:#efefef url(../images/offeringbox_bg.gif) repeat-x top left;
+ margin:7px 0 0 0;
+ padding:0 0 5px 0;
+}
+
+.vmpopup_reviewbox_odd {
+ width:695px;
+ height:auto;
+ float:left;
+ border:1px solid #c0c0c0;
+ background:#efefef url(../images/offeringbox_bg.gif) repeat-x top left;
+ margin:0 0 0 0;
+ padding:0 0 5px 0;
+}
+
+.vmpopup_reviewbox_even {
+ width:695px;
+ height:auto;
+ float:left;
+ border:1px solid #d2d2d2;
+ background:#d0d0d0 url(../images/reviewboxeven_bg.gif) repeat-x top left;
+ margin:0 0 0 0;
+ padding:0 0 5px 0;
+}
+
+.vmopopup_reviewtextbox {
+ width:670px;
+ height:auto;
+ float:left;
+ margin:5px 0 0 10px;
+ padding:0;
+}
+
+.vmopopup_reviewtextbox span {
+ width:auto;
+ height:auto;
+ float:left;
+ font-size:12px;
+ font-weight:normal;
+ color:#333;
+ text-align:left;
+ margin:4px 0 0 0;
+ padding:0;
+}
+
+.vmopopup_review_label {
+ width:200px;
+ height:auto;
+ float:left;
+ font-size:12px;
+ font-weight:bold;
+ text-align:left;
+ color:#333;
+ margin:3px 0 0 10px;
+ display:inline
+ padding:0;
+}
+
+
+.vmpopup_reviewtick {
+ width:18px;
+ height:20px;
+ float:left;
+ background:url(../images/tick_review.png) no-repeat top left;
+ margin:0;
+ padding:0;
+}
+
+
+.vmpopup_offeringbox .radio {
+ width:13px;
+ height:13px;
+ float:left;
+ margin:5px 0 0 10px;
+ display:inline;
+ padding:0;
+
+}
+
+.vmpopup_offeringbox .text {
+ width:80px;
+ height:15px;
+ float:left;
+ color:#333;
+ font-size:11px;
+ font-weight:normal;
+ background:#FFF;
+ border:1px solid #999;
+ margin:4px 0 0 8px;
+ display:inline;
+ padding:0;
+}
+
+.vmpopup_offeringbox .label {
+ width:auto;
+ height:13px;
+ float:left;
+ color:#333;
+ font-size:12px;
+ font-weight:bold;
+ margin:5px 0 0 10px;
+ display:inline;
+ padding:0;
+}
+
+.vmpopup_offeringbox .label1 {
+ width:auto;
+ height:auto;
+ float:left;
+ color:#333;
+ font-size:11px;
+ font-weight:normal;
+ margin:8px 0 0 10px;
+ display:inline;
+ padding:0;
+}
+
+.vmpopup_offeringbox span {
+ width:auto;
+ height:auto;
+ float:left;
+ color:#666;
+ font-size:10px;
+ font-weight:normal;
+ margin:7px 0 0 3px;
+ display:inline;
+ padding:0;
+}
+
+.vmpopup_offdescriptionbox {
+ width:645px;
+ height:auto;
+ float:left;
+ margin:2px 0 0 35px;
+ padding:0;
+}
+
+.vmpopup_offdescriptionbox_top {
+ width:645px;
+ height:5px;
+ float:left;
+ background:url(../images/offeringbox_destop.gif) no-repeat top left;
+ margin:0 0 0 0;
+ padding:0;
+}
+
+
+.vmpopup_offdescriptionbox_bot {
+ width:645px;
+ height:auto;
+ float:left;
+ background:#FFF repeat top left;
+ border-left:1px solid #d7d7d7;
+ border-right:1px solid #d7d7d7;
+ border-bottom:1px solid #d7d7d7;
+ margin:0;
+ padding:0 0 3px 0;
+}
+
+.vmpopup_offdescriptionbox_bot p {
+ width:630px;
+ height:auto;
+ float:left;
+ color:#666;
+ text-align:left;
+ font-size:11px;
+ font-weight:normal;
+ margin:5px 0 0 10px;
+ display:inline;
+ padding:0;
+}
+
+.vmpopup_navigationpanel {
+ width:700px;
+ height:29px;
+ float:left;
+ margin:15px 0 0 0;
+ padding:0;
+}
+
+.vmpop_nextbutton {
+ width:98px;
+ height:19px;
+ float:right;
+ background:url(../images/vmpopup_nextbut.gif) no-repeat top left;
+ color:#FFF;
+ font-size:12px;
+ font-weight:normal;
+ text-align:center;
+ margin:0;
+ padding:7px 0 0 0;
+ cursor:pointer;
+ cursor:hand;
+}
+
+.vmpop_nextbutton:hover {
+ background:url(../images/vmpopup_prevbut.gif) no-repeat top left;
+}
+
+.vmpop_prevbutton {
+ width:98px;
+ height:19px;
+ float:left;
+ background:url(../images/vmpopup_prevbut.gif) no-repeat top left;
+ color:#FFF;
+ font-size:12px;
+ font-weight:normal;
+ text-align:center;
+ margin:0;
+ padding:7px 0 0 0;
+ cursor:pointer;
+ cursor:hand;
+}
+
+.vmpop_prevbutton:hover {
+ background:url(../images/vmpopup_nextbut.gif) no-repeat top left;
+}
+
+
+.rev_tempsearchpanel {
+ width:690px;
+ height:21px;
+ float:left;
+ margin:0 0 10px 0;
+ padding:0;
+}
+
+.rev_tempsearchpanel .select {
+ width:160px;
+ height:18px;
+ background:#eaeaea repeat top left;
+ border:1px solid #999;
+ font-size:12px;
+ color:#333;
+ margin:0 0 0 5px;
+ display:inline;
+ padding:0;
+}
+
+.rev_tempsearchbox {
+ width:215px;
+ height:21px;
+ float:right;
+ margin:0;
+ padding:0;
+}
+
+.rev_tempsearchbox ol {
+ width:168px;
+ height:21px;
+ float:left;
+ margin:0;
+ padding:0;
+ list-style:none;
+}
+
+.rev_tempsearchbox li {
+ width:168px;
+ height:21px;
+ float:left;
+ margin:0;
+ padding:0;
+}
+
+.rev_tempsearchbox .text {
+ width:160px;
+ height:18px;
+ float:left;
+ background:#eaeaea repeat top left;
+ border:1px solid #999;
+ font-size:12px;
+ color:#333;
+ margin:0;
+ padding:0;
+}
+
+.rev_searchbutton {
+ width:auto;
+ padding:auto;
+ float:left;
+ text-decoration:none;
+ font-size:11px;
+ color:#0074bb;
+ text-align:left;
+ margin:5px 0 0 5px;
+ padding:0;
+ cursor:pointer;
+ cursor:hand;
+}
+
+.rev_searchbutton:hover {
+
+ text-decoration:underline;
+ }
+
+.rev_wizformarea {
+ width:700px;
+ height:auto;
+ float:left;
+ margin:0;
+ padding:0;
+}
+
+
+.rev_wizformarea ol {
+ width:605px;
+ height:auto;
+ color:#333;
+ float:left;
+ font-family:Arial, Helvetica, sans-serif;
+ font-size:12px;
+ list-style:none;
+}
+
+.rev_wizformarea li {
+ width:600px;
+ float:left;
+ padding-bottom: 10px;
+ color:#FFF;
+ font-size:12px;
+ font-weight:normal;
+ text-align:left;
+ margin-top:5px;
+}
+
+.rev_wizformarea label {
+ width:150px;
+ float:left;
+ text-align:left;
+ font-weight:bold;
+ margin-top:2px;
+ color:#333;
+ font-size:13px;
+}
+
+.rev_wizformarea .radio {
+ width:15px;
+ height:15px;
+ float:left;
+ margin:0 5px 0 0;
+ padding:0;
+}
+
+.rev_wizformarea .checkbox {
+ width:15px;
+ height:15px;
+ float:left;
+ margin:0;
+ padding:0;
+}
+
+.revwiz_loadingbox {
+ width:180px;
+ height:50px;
+ position:absolute;
+ background:#FFF repeat top left;
+ border:1px solid #999;
+ z-index:1100;
+ top:47%;
+ left:45%;
+}
+
+.revwiz_loadingbox p{
+ width:auto;
+ height:auto;
+ float:left;
+ text-align:left;
+ color:#666;
+ font-weight:normal;
+ font-size:25px;
+ margin:10px 0 0 20px;
+ display:inline;
+}
+
+
+.rev_wizmid_tempbox {
+ width:690px;
+ height:284px;
+ float:left;
+ margin:0;
+ padding:0;
+ border:1px solid #999;
+}
+
+.rev_wizmid_tempbox_left {
+ width:182px;
+ height:284px;
+ float:left;
+ margin:0;
+ padding:0;
+}
+
+.rev_wizmid_tempbox_right {
+ width:508px;
+ height:284px;
+ float:left;
+ margin:0;
+ padding:0;
+}
+
+.rev_wiztemplistpanel {
+ width:508px;
+ height:254px;
+ float:left;
+ margin:0;
+ padding:0;
+ background:#FFF repeat top left;
+ cursor:pointer;
+ cursor:hand;
+}
+
+.rev_wiztemplistactions {
+ width:508px;
+ height:28px;
+ float:left;
+ margin:0;
+ padding:0;
+ background:#f2f2f2 repeat top left;
+}
+
+.rev_wiztemplist_actionsbox {
+ width:auto;
+ height:auto;
+ float:right;
+ margin:8px 10px 0 0;
+ padding:0;
+}
+
+.rev_wiztemplist_actionsbox a:link {
+ width:auto;
+ height:auto;
+ float:left;
+ color:#2c8bbc;
+ font-size:12px;
+ text-align:left;
+ font-weight:normal;
+ text-decoration:none;
+ margin:0 15px 0 0;
+ padding:0;
+}
+
+.rev_wiztemplist_actionsbox a:visted {
+ width:auto;
+ height:auto;
+ float:left;
+ color:#2c8bbc;
+ font-size:12px;
+ text-align:left;
+ font-weight:normal;
+ text-decoration:none;
+ margin:0 15px 0 0;
+ padding:0;
+}
+
+.rev_wiztemplist_actionsbox a:hover {
+ width:auto;
+ height:auto;
+ float:left;
+ color:#2c8bbc;
+ font-size:12px;
+ text-align:left;
+ font-weight:normal;
+ text-decoration:underline;
+ margin:0 15px 0 0;
+ padding:0;
+}
+
+
+.rev_wiztemplistbox {
+ width:508px;
+ height:auto;
+ float:left;
+ border-bottom:1px solid #999;
+ margin:0;
+ padding:0;
+ background:#FFF repeat top left;
+ cursor:pointer;
+ cursor:hand;
+}
+
+.rev_wiztemplistbox:hover {
+ background:#eeeeee repeat top left;
+}
+
+.rev_wiztemplistbox_selected {
+ width:508px;
+ height:auto;
+ float:left;
+ border-bottom:1px solid #999;
+ margin:0;
+ padding:0;
+ background:#8fe0f4 repeat top left;
+ cursor:pointer;
+ cursor:hand;
+}
+
+
+
+.rev_wiztemo_centosicons {
+ width:17px;
+ height:16px;
+ float:left;
+ margin:2px 10px 0 5px;
+ background:url(../images/temp_centosicon.gif) no-repeat top left;
+ padding:0;
+}
+
+.rev_wiztemo_windowsicons {
+ width:17px;
+ height:16px;
+ float:left;
+ margin:2px 10px 0 5px;
+ background:url(../images/temp_windowsicon.gif) no-repeat top left;
+ padding:0;
+}
+
+.rev_wiztemo_linuxicons {
+ width:17px;
+ height:16px;
+ float:left;
+ margin:2px 10px 0 5px;
+ background:url(../images/temp_linuxicon.gif) no-repeat top left;
+ padding:0;
+}
+
+.rev_wiztemp_listtext {
+ width:380px;
+ height:auto;
+ float:left;
+ color:#021a28;
+ font-size:11px;
+ font-weight:normal;
+ text-align:left;
+ margin:5px 0 5px 0;
+ padding:0;
+}
+
+.rev_wiztemp_ownertext {
+ width:80px;
+ height:auto;
+ float:left;
+ color:#021a28;
+ font-size:11px;
+ font-weight:bold;
+ text-align:left;
+ margin:5px 0 5px 0;
+ padding:0;
+}
+
+.rev_wizmid_selectedtempbut {
+ width:167px;
+ height:43px;
+ float:left;
+ margin:0;
+ background:url(../images/revwiz_selcted_tempbut.gif) no-repeat top left;
+ color:#FFF;
+ text-align:left;
+ font-size:14px;
+ font-weight:normal;
+ padding:28px 0 0 15px;
+}
+
+.rev_wizmid_nonselectedtempbut {
+ width:167px;
+ height:43px;
+ float:left;
+ margin:0;
+ background:url(../images/revwiz_nonselcted_tempbut.gif) no-repeat top left;
+ color:#333;
+ text-align:left;
+ font-size:14px;
+ font-weight:normal;
+ padding:28px 0 0 15px;
+ cursor:pointer;
+ cursor:hand;
+}
+
+.rev_wizmid_nonselectedtempbut:hover {
+ background:url(../images/revwiz_nonselcted_tempbut_hover.gif) no-repeat top left;
+ color:#FFF;
+}
+
+.revwiz_formcontent_title {
+ width:800px;
+ height:auto;
+ float:left;
+ color:#04263a;
+ font-size:12px;
+ font-weight:bold;
+ margin-top:0;
+ padding:0;
+}
+
+.rev_wizformarea .text {
+ background-color: #e9f6ff;
+ font: normal 12px Arial, Helvetica, sans-serif;
+ font-weight:normal;
+ float:left;
+ border: 1px solid #61869b;
+ padding:2px 2px 0 2px;
+ height: 16px;
+ width: 196px;
+ margin:0;
+ padding:0;
+ color:#333;
+}
+
+.rev_wizformarea .multiple {
+ background-color: #e9f6ff;
+ font: normal 12px Arial, Helvetica, sans-serif;
+ font-weight:normal;
+ float:left;
+ border: 1px solid #61869b;
+ padding:2px 2px 0 2px;
+ height: 80px;
+ width: 300px;
+ margin:0;
+ padding:0;
+ color:#333;
+}
+
+.rev_wizformarea .select {
+ background-color: #e9f6ff;
+ font: normal 12px Arial, Helvetica, sans-serif;
+ font-weight:normal;
+ float:left;
+ border: 1px solid #61869b;
+ padding:2px 2px 0 2px;
+ height: 16px;
+ width: 196px;
+ margin:0;
+ padding:0;
+ color:#333;
+}
+
+
+.vmpopup_container_mid {
+ width:737px;
+ height:463px;
+ float:left;
+ background:url(../images/vmpopup_mid.gif) repeat-y top left;
+ margin:0;
+ padding:0;
+}
+
+.vmpopup_container_bot {
+ width:737px;
+ height:12px;
+ float:left;
+ background:url(../images/vmpopup_bot.png) no-repeat top left;
+ margin:0;
+ padding:0;
+}
+
+
+
+#header {
+ min-width:960px;
+ width:100%;
+ height:44px;
+ float:left;
+ background:url(../images/header_bg.gif) repeat-x top left;
+ margin:0;
+ padding:0;
+}
+
+.header_left {
+ width:272px;
+ height:44px;
+ float:left;
+ margin:0;
+ padding:0;
+}
+
+.logo {
+ width:106px;
+ height:37px;
+ float:left;
+ background:url(../images/logo.gif) no-repeat top left;
+ margin:0 0 0 8px;
+ display:inline;
+ padding:0;
+}
+
+
+
+.mgmtconsole_logo {
+ width:157px;
+ height:21px;
+ float:left;
+ background:url(../images/mgmtconsole_logo.gif) no-repeat top left;
+ margin:16px 0 0 0;
+ display:inline;
+ padding:0;
+}
+
+.header_right {
+ width:auto;
+ height:44px;
+ float:right;
+ margin:0;
+ padding:0;
+}
+
+.userlinks {
+ width:auto;
+ height:auto;
+ float:left;
+ margin:15px 15px 0 0;
+ padding:0;
+}
+
+.userlinks p {
+ width:auto;
+ height:auto;
+ float:left;
+ text-align:left;
+ font-size:11px;
+ font-weight:normal;
+ color:#FFF;
+}
+
+.userlinks span {
+ font-weight:bold;
+ text-align:left;
+ font-size:11px;
+}
+
+.userlinks a {
+ width:auto;
+ height:auto;
+ color:#a0f0ff;
+ text-decoration:none;
+ font-size:11px;
+ font-weight:normal;
+}
+
+.userlinks a:link, userlinks a:visited {
+ text-decoration:none;
+}
+
+.userlinks a:hover {
+ text-decoration:underline;
+}
+
+#main_contentpanel {
+ min-width:960px;
+ width:100%;
+ min-height:1000px;
+ height:auto;
+ float:left;
+ background:#FFF;
+ margin:0;
+ padding:0;
+}
+
+.leftmenu_panel {
+ width:221px;
+ height:auto;
+ min-height:1000px;
+ height:auto;
+ float:left;
+ background:#d6dfe5 repeat top left;
+ border-right:1px solid #aeb9c5;
+ border-top:1px solid #FFF;
+ margin:0 0 0 -100%;
+ padding:0;
+}
+
+.leftmenu_box {
+ width:220px;
+ height:auto;
+ float:left;
+ margin:3px 0 0 0;
+ list-style:none;
+ padding:0;
+}
+
+.leftmenu_list{
+ width:220px;
+ height:auto;
+ float:left;
+ margin:0;
+ padding:0;
+ border-bottom:1px dashed #92a7b7;
+
+}
+
+.leftmenu_content{
+ width:220px;
+ height:auto;
+ float:left;
+ color:#333;
+ text-align:left;
+ font-weight:normal;
+ font-size:11px;
+ cursor:pointer;
+ cursor:hand;
+ margin:0;
+ padding:0 0 3px 0;
+}
+
+.leftmenu_content.selected{
+ color:#FFF;
+ background:#626262 url(../images/leftmenu_hover.gif) repeat-x top left;
+}
+
+/*
+.leftmenu_content:hover{
+ background:#626262 url(../images/leftmenu_hover.gif) repeat-x top left;
+ color:#FFF;
+}
+*/
+
+.white_openedarrow {
+ width:5px;
+ height:10px;
+ float:right;
+ margin:5px 10px 0 0;
+ padding:0;
+}
+
+.leftmenu_firstindent{
+ width:200px;
+ height:auto;
+ float:left;
+ margin:7px 0 0 10px;
+ display:inline;
+ padding:0;
+}
+
+.leftmenu_secondindent{
+ width:180px;
+ height:auto;
+ float:left;
+ margin:7px 0 0 25px;
+ display:inline;
+ padding:0;
+}
+
+.leftmenu_thirdindent{
+ width:150px;
+ height:auto;
+ float:left;
+ margin:7px 0 0 65px;
+ display:inline;
+ padding:0;
+}
+
+
+
+.leftmenu_titles {
+ width:auto;
+ height:auto;
+ float:left;
+ color:#333;
+ text-align:left;
+ font-size:11px;
+ font-weight:normal;
+ margin:0;
+ padding:0;
+}
+
+.leftmenu_list_icons {
+ width:20px;
+ height:20px;
+ float:left;
+ margin:-4px 5px 0 0;
+ padding:0;
+}
+
+
+
+.leftmenu_arrows {
+ width:10px;
+ height:11px;
+ float:left;
+ margin:2px 6px 0 0;
+ padding:0;
+}
+
+.leftmenu_arrows.close {
+ background:url(../images/leftmenu_closedarrow.png) no-repeat top left;
+}
+
+.leftmenu_arrows.open {
+ background:url(../images/leftmenu_openarrow.png) no-repeat top left;
+}
+
+.right_panel {
+ width:auto;
+ height:auto;
+ min-height:1000px;
+ height:auto;
+ margin:0 0 0 222px;
+ padding:0;
+
+}
+
+.actionpanel {
+ width:100%;
+ height:27px;
+ float:left;
+ background:url(../images/actionpanel_bg.gif) repeat-x top left;
+ margin:0;
+ padding:0;
+}
+
+.searchpanel {
+ width:223px;
+ height:27px;
+ float:left;
+ margin:0;
+ padding:0;
+ background:url(../images/actionpanel_border.gif) no-repeat top right;
+ list-style:none
+}
+
+.searchpanel a{
+ width:40px;
+ color:#FFF;
+ font-size:10px;
+ font-weight:normal;
+ text-decoration:none;
+ float:left;
+ margin:7px 0 0 0;
+ padding:0;
+}
+
+.searchpanel a:link, searchpanel a:visited {
+ text-decoration:none;
+}
+
+.searchpanel a:hover {
+ text-decoration:underline;
+}
+
+
+.searchpanel li{
+ width:160px;
+ height:auto;
+ float:left;
+ margin:5px 0 0 8px;
+ display:inline;
+ padding:0;
+}
+
+.searchpanel .text{
+ width:116px;
+ height:14px;
+ float:left;
+ background:#FFF repeat top left;
+ border:0;
+ color:#333;
+ text-align:left;
+ font-weight:normal;
+ margin:1px 0 0 20px;
+ display:inline;
+ padding:0;
+}
+
+.search_closebutton {
+ width:12px;
+ height:12px;
+ background:url(../images/search_closeicon.gif) no-repeat top left;
+ float:left;
+ margin:2px 0 0 2px;
+ display:inline;
+ padding:0;
+ cursor:pointer;
+ cursor:hand;
+}
+
+.search_closebutton:hover {
+ background:url(../images/search_closeicon_hover.gif) no-repeat top left;
+}
+
+.search_textbg {
+ width:154px;
+ height:16px;
+ float:left;
+ background:url(../images/serach_textbox.gif) no-repeat top left;
+ margin:0;
+ padding:0;
+}
+
+.actionpanel_button_wrapper{
+ width:auto;
+ height:27px;
+ float:left;
+ margin:0;
+ padding:0;
+ background:url(../images/actionpanel_border.gif) no-repeat top left;
+
+}
+
+.actionpanel_button{
+ width:auto;
+ height:27px;
+ float:left;
+ margin:0;
+ padding:0;
+ cursor:pointer;
+ cursor:hand;
+}
+
+
+.actionpanel_button:hover{
+ background:url(../images/actionpanel_hover.gif) repeat-x top right;
+
+}
+
+.action_ddarrow {
+ width:8px;
+ height:4px;
+ float:left;
+ background:url(../images/action_ddarow.png) no-repeat top left;
+ margin:10px 10px 0 -5px;
+ padding:0;
+}
+
+
+.actionpanel_button_links{
+ width:auto;
+ height:auto;
+ color:#FFF;
+ font-size:11px;
+ font-weight:normal;
+ text-decoration:none;
+ float:left;
+ margin:7px 15px 0 7px;
+ padding:0;
+}
+
+
+.actionpanel_button_icons {
+ width:30px;
+ height:20px;
+ float:left;
+ margin:3px 0 0 8px;
+ padding:0;
+}
+
+.actionsdropdown_box {
+ width:109px;
+ height:auto;
+ float:left;
+ position:absolute;
+ background:#FFF repeat top left;
+ border:1px solid #777679;
+ top:24px;
+ left:0;
+ margin:0;
+ padding:0
+}
+
+.actionsdropdown_boxlist {
+ width:96px;
+ height:auto;
+ float:left;
+ margin:0 0 5px 10px;
+ padding:0;
+ list-style:none;
+}
+
+.actionsdropdown_boxlist li{
+ width:96px;
+ height:auto;
+ float:left;
+ text-align:left;
+ color:#CCC;
+ font-size:11px;
+ font-weight:normal;
+ margin:6px 0 0 0;
+ padding:0;
+ list-style:none;
+}
+
+.actionsdropdown_boxlist a{
+ text-decoration:none;
+ color:#2c8bbc;
+}
+
+
+.actionsdropdown_boxlist a:link, actionsdropdown_boxlist a:visited {
+ text-decoration:none;
+ color:#2c8bbc;
+}
+
+.actionsdropdown_boxlist a:hover{
+ text-decoration:underline;
+ color:#2c8bbc;
+}
+
+#contentwrapper{
+ height:100%;
+ float: left;
+ width: 100%;
+ margin:0;
+ padding:0;
+}
+
+.midmenu_panel {
+ width:221px;
+ min-height:1000px;
+ height:auto;
+ float:left;
+ background:#f0f0f0 repeat top left;
+ border-right:1px solid #aeb9c5;
+ margin:27px 0 0 -100%;
+ display:inline;
+ padding:0;
+}
+
+.midmenu_box {
+ width:220px;
+ height:800px;
+ float:left;
+ margin:0 0 0 0;
+ list-style:none;
+ padding:0;
+ overflow-y:scoll;
+ overflow-y:auto;
+ overflow-x:hidden;
+ padding:0;
+}
+
+.midmenu_navigationbox {
+ width:220px;
+ height:22px;
+ float:left;
+ position:relative;
+ top:-22px;
+ bottom:0;
+ background:url(../images/midmenu_navbg.gif) repeat-x bottom left;
+ margin:0;
+ padding:0;
+}
+
+.midmenu_prevbutton {
+ width:15px;
+ height:13px;
+ float:left;
+ background:url(../images/prev_midnav.gif) no-repeat top left;
+ margin:5px 0 0 10px;
+ display:inline;
+ padding:0;
+ cursor:pointer;
+ cursor:hand;
+}
+
+.midmenu_prevbutton:hover {
+ background:url(../images/prev_midnav_hover.gif) no-repeat top left;
+}
+
+.midmenu_nextbutton {
+ width:15px;
+ height:13px;
+ float:right;
+ background:url(../images/next_midnav.gif) no-repeat top left;
+ margin:5px 10px 0 0;
+ display:inline;
+ padding:0;
+ cursor:pointer;
+ cursor:hand;
+}
+
+.midmenu_nextbutton:hover {
+ background:url(../images/next_midnav_hover.gif) no-repeat top left;
+}
+
+
+.midmenu_list{
+ width:220px;
+ height:auto;
+ float:left;
+ background:url(../images/midmenu_dashedborder.gif) repeat-x bottom left;
+ margin:0;
+ padding:0;
+}
+
+.midmenu_content{
+ width:220px;
+ height:auto;
+ float:left;
+ color:#333;
+ text-align:left;
+ font-weight:normal;
+ font-size:11px;
+ cursor:pointer;
+ cursor:hand;
+ margin:0;
+ padding:0 0 4px 0;
+}
+
+.midmenu_content.selected{
+ background:#626262 url(../images/leftmenu_hover.gif) repeat-x top left;7497ae url(../images/mid_addingbg.gif) repeat-x top left;
+ color:#FFF;
+}
+
+.midmenu_content.inaction{
+ background:#7497ae url(../images/mid_addingbg.gif) repeat-x top left;
+ color:#FFF;
+}
+/*
+.midmenu_content:hover{
+ background:#626262 url(../images/leftmenu_hover.gif) repeat-x top left;
+ color:#FFF;
+}
+*/
+
+
+
+
+.midmenu_icons {
+ width:8px;
+ height:8px;
+ float:left;
+ margin:4px 0 0 10px;
+ display:inline;
+ padding:0;
+}
+
+.midmenu_textbox {
+ width:165px;
+ height:auto;
+ float:left;
+ margin:0 0 0 10px;
+ display:inline;
+ padding:0;
+}
+
+.midmenu_textbox p {
+ width:165px;
+ height:auto;
+ float:left;
+ text-align:left;
+ font-weight:normal;
+ font-size:11px;
+ margin:3px 0 0 0;
+ padding:0;
+}
+
+
+.main_contentarea {
+ width:auto;
+ min-height:1000px;
+ height:auto;
+ margin:0 0 0 221px;
+ padding:0;
+}
+
+
+.main_title {
+ width:100%;
+ height:auto;
+ float:left;
+ margin:10px 0 0 10px;
+ padding:0;
+}
+
+.main_titleicon {
+ float:left;
+ height:30px;
+ margin:0 0 0 0;
+ padding:0;
+ width:34px;
+}
+
+.main_title h1 {
+ width:auto;
+ height:auto;
+ float:left;
+ text-align:left;
+ color:#0d4861;
+ font-size:14px;
+ font-weight:normal;
+ margin:8px 0 0 10px;
+ display:inline;
+ padding:0;
+}
+
+.contentbox {
+ width:98%;
+ height:auto;
+ float:left;
+ margin:20px 0 0 10px;
+ display:inline;
+ padding:0;
+}
+
+.tabbox {
+ width:100%;
+ height:auto;
+ float:left;
+ border-bottom:1px solid #CCC;
+ margin:0;
+ padding:0;
+}
+
+.content_tabs {
+ width:78px;
+ height:13px;
+ float:left;
+ font-size:11px;
+ margin:0 0 0 2px;
+ text-align:center;
+ padding:4px 0 0 0;
+ display:inline;
+}
+
+.content_tabs.on {
+ background:url(../images/contenttab_selected.gif) no-repeat top left;
+ color:#0d4861;
+}
+
+.content_tabs.off {
+ background:url(../images/contenttab_unselected.gif) no-repeat top left;
+ color:#FFF;
+ cursor:pointer;
+ cursor:hand;
+}
+
+.content_tabs.off:hover {
+ background:url(../images/contenttab_unselected_hover.gif) no-repeat top left;
+ color:#FFF;
+ cursor:pointer;
+ cursor:hand;
+}
+
+.grid_container {
+ width:100%;
+ height:auto;
+ float:left;
+ border:1px solid #CCC;
+ margin:10px 0 0 0;
+ padding:0;
+}
+
+.grid_rows {
+ width:100%;
+ height:auto;
+ float:left;
+ margin:0;
+ padding:5px 0 5px 0;
+ border-bottom:1px solid #e2e2e2;
+}
+
+.grid_rows.even {
+ background:#FFF repeat top left;
+}
+
+.grid_rows.odd {
+ background:#f3f3f3 repeat top left;
+}
+
+.grid_row_cell {
+ height:auto;
+ float:left;
+ margin:0;
+ padding:0;
+}
+
+.row_celltitles {
+ width:auto;
+ height:auto;
+ float:left;
+ color:#333;
+ text-align:left;
+ font-size:11px;
+ font-weight:normal;
+ margin:0 0 0 10px;
+ display:inline;
+ padding:0;
+}
+
+.row_celltitles a{
+ width:auto;
+ height:auto;
+ color:#2c8bbc;
+ text-decoration:none;
+ margin:0;
+ padding:0;
+}
+
+.row_celltitles a:link, row_celltitles a:visited {
+ text-decoration:none;
+}
+
+.row_celltitles a:hover {
+ text-decoration:underline;
+}
+
+.tick_icon {
+ width:14px;
+ height:14px;
+ float:left;
+ background:url(../images/tick_icon.gif) no-repeat top left;
+ margin:0;
+ padding:0;
+}
+
+.cross_icon {
+ width:14px;
+ height:14px;
+ float:left;
+ background:url(../images/cross_icon.gif) no-repeat top left;
+ margin:0;
+ padding:0;
+}
+
+.vm_statusbox {
+ width:auto;
+ height:auto;
+ float:left;
+ margin:0 0 0 10px;
+ padding:0;
+}
+
+.vm_consolebox {
+ width: 154px;
+ height:121px;
+ float:left;
+ background:url(../images/consoletb_box.gif) no-repeat top left;
+ margin:0;
+ padding:0;
+}
+
+.vm_liveconsole {
+ width: 144px;
+ height:110px;
+ float:left;
+ margin:5px 0 0 5px;
+ display:inline;
+ padding:0;
+}
+
+
+.vm_status_textbox {
+ width:auto;
+ height:auto;
+ float:left;
+ margin:0 0 0 15px;
+ display:inline;
+ padding:0;
+}
+
+.vm_status_textline {
+ width:auto;
+ height:auto;
+ float:left;
+ font-size:11px;
+ font-weight:bold;
+ text-align:left;
+ margin:0;
+ padding:0;
+}
+
+.vm_status_textline.green {
+ color:#538002;
+}
+
+.vm_status_textline.red {
+ color:#ab0202;
+}
+
+.vm_status_textline.gray {
+ color:#666;
+}
+
+.vm_status_textbox p {
+ width:auto;
+ height:auto;
+ float:left;
+ font-size:11px;
+ font-weight:normal;
+ color:#333;
+ text-align:left;
+ margin:5px 0 0 0;
+ padding:0;
+}
+
+
+
+
+#footer{
+ clear:both;
+ width:100%;
+ height:27px;
+ position:fixed;
+ background:url(../images/footer_bg.gif) repeat-x top left;
+ margin:-27px 0 0 0;
+ bottom:0;
+ padding:0;
+}
+
+#footer p{
+ width:auto;
+ height:auto;
+ float:left;
+ text-align:left;
+ font-size:11px;
+ font-weight:normal;
+ color:#c2c2c2;
+ margin:9px 0 0 10px;
+ display:inline;
+ padding:0;
+}
+
+#footer span{
+ font-weight:bold;
+ color:#CCC;
+}
+
+.poweredby_box {
+ width:132px;
+ height:22px;
+ float:right;
+ background:url(../images/poweredby.gif) no-repeat top left;
+ margin:2px 10px 0 0;
+ padding:0;
+ display:inline;
+
+}
+
+.midmenu_selectedloader {
+ width:16px;
+ height:16px;
+ float:left;
+ background:url(../images/selected_loader.gif) no-repeat top left;
+ margin:5px 0 0 0;
+ padding:0;
+}
+
+.midmenu_inactionloader {
+ width:16px;
+ height:16px;
+ float:left;
+ background:url(../images/adding_loader.gif) no-repeat top left;
+ margin:5px 0 0 0;
+ display:inline;
+ padding:0;
+}
+
+.midmenu_defaultloader {
+ width:16px;
+ height:16px;
+ float:left;
+ background:url(../images/mid_default.gif) no-repeat top left;
+ margin:5px 0 0 0;
+ padding:0;
+}
+
+.midmenu_infoicon {
+ width:16px;
+ height:16px;
+ float:left;
+ background:url(../images/info_icon.png) no-repeat top left;
+ margin:5px 0 0 0;
+ padding:0;
+}
+
+.midmenu_infoicon.error {
+ background:url(../images/infoerror_icon.png) no-repeat top left;
+}
+
+.info_detailbox {
+ width:100%;
+ height:auto;
+ float:left;
+ background:#fffbe6 repeat top left;
+ border:1px dashed #CCC;
+ color:#333;
+ margin:0 0 0 0;
+ padding:0;
+}
+
+.info_detailbox p{
+ width:auto;
+ height:auto;
+ float:left;
+ text-align:left;
+ font-size:11px;
+ margin:10px;
+ padding:0;
+}
+
+.info_detailbox.errorbox {
+ background:#ffe5e5 repeat top left;
+ color:#a90000;
+}
+
+.thanks box {
+
+}
+
diff --git a/ui/new/images/accounts_leftmenuicon.png b/ui/new/images/accounts_leftmenuicon.png
new file mode 100755
index 00000000000..b17147537b6
Binary files /dev/null and b/ui/new/images/accounts_leftmenuicon.png differ
diff --git a/ui/new/images/accountstitle_icons.gif b/ui/new/images/accountstitle_icons.gif
new file mode 100755
index 00000000000..dc91765d046
Binary files /dev/null and b/ui/new/images/accountstitle_icons.gif differ
diff --git a/ui/new/images/action_ddarow.png b/ui/new/images/action_ddarow.png
new file mode 100755
index 00000000000..bf1697d4ffd
Binary files /dev/null and b/ui/new/images/action_ddarow.png differ
diff --git a/ui/new/images/actionpanel_bg.gif b/ui/new/images/actionpanel_bg.gif
new file mode 100755
index 00000000000..d21833e0281
Binary files /dev/null and b/ui/new/images/actionpanel_bg.gif differ
diff --git a/ui/new/images/actionpanel_border.gif b/ui/new/images/actionpanel_border.gif
new file mode 100755
index 00000000000..3c9ef213f1c
Binary files /dev/null and b/ui/new/images/actionpanel_border.gif differ
diff --git a/ui/new/images/actionpanel_hover.gif b/ui/new/images/actionpanel_hover.gif
new file mode 100755
index 00000000000..d462af3ea04
Binary files /dev/null and b/ui/new/images/actionpanel_hover.gif differ
diff --git a/ui/new/images/actions_actionicon.gif b/ui/new/images/actions_actionicon.gif
new file mode 100755
index 00000000000..37b864209ad
Binary files /dev/null and b/ui/new/images/actions_actionicon.gif differ
diff --git a/ui/new/images/actions_actionicon.png b/ui/new/images/actions_actionicon.png
new file mode 100755
index 00000000000..52c0c4de046
Binary files /dev/null and b/ui/new/images/actions_actionicon.png differ
diff --git a/ui/new/images/adding_loader.gif b/ui/new/images/adding_loader.gif
new file mode 100644
index 00000000000..a901653b59c
Binary files /dev/null and b/ui/new/images/adding_loader.gif differ
diff --git a/ui/new/images/addvm_actionicon.gif b/ui/new/images/addvm_actionicon.gif
new file mode 100755
index 00000000000..1310e570fb0
Binary files /dev/null and b/ui/new/images/addvm_actionicon.gif differ
diff --git a/ui/new/images/addvm_actionicon.png b/ui/new/images/addvm_actionicon.png
new file mode 100755
index 00000000000..4f49893dcb6
Binary files /dev/null and b/ui/new/images/addvm_actionicon.png differ
diff --git a/ui/new/images/alert_icon.png b/ui/new/images/alert_icon.png
new file mode 100755
index 00000000000..9e5b604712a
Binary files /dev/null and b/ui/new/images/alert_icon.png differ
diff --git a/ui/new/images/alerttitle_icons.gif b/ui/new/images/alerttitle_icons.gif
new file mode 100755
index 00000000000..6b1f7368d65
Binary files /dev/null and b/ui/new/images/alerttitle_icons.gif differ
diff --git a/ui/new/images/configuration_leftmenuicon.png b/ui/new/images/configuration_leftmenuicon.png
new file mode 100755
index 00000000000..ce8a8add0d9
Binary files /dev/null and b/ui/new/images/configuration_leftmenuicon.png differ
diff --git a/ui/new/images/consoletb_box.gif b/ui/new/images/consoletb_box.gif
new file mode 100755
index 00000000000..970035a7504
Binary files /dev/null and b/ui/new/images/consoletb_box.gif differ
diff --git a/ui/new/images/contenttab_selected.gif b/ui/new/images/contenttab_selected.gif
new file mode 100755
index 00000000000..ae6d7e3dc0f
Binary files /dev/null and b/ui/new/images/contenttab_selected.gif differ
diff --git a/ui/new/images/contenttab_unselected.gif b/ui/new/images/contenttab_unselected.gif
new file mode 100755
index 00000000000..3e20c0b2911
Binary files /dev/null and b/ui/new/images/contenttab_unselected.gif differ
diff --git a/ui/new/images/contenttab_unselected_hover.gif b/ui/new/images/contenttab_unselected_hover.gif
new file mode 100755
index 00000000000..5ed57b77c43
Binary files /dev/null and b/ui/new/images/contenttab_unselected_hover.gif differ
diff --git a/ui/new/images/cproxytitle_icons.gif b/ui/new/images/cproxytitle_icons.gif
new file mode 100755
index 00000000000..6fb269f6c55
Binary files /dev/null and b/ui/new/images/cproxytitle_icons.gif differ
diff --git a/ui/new/images/cpu_icon.gif b/ui/new/images/cpu_icon.gif
new file mode 100755
index 00000000000..4ff03b35e00
Binary files /dev/null and b/ui/new/images/cpu_icon.gif differ
diff --git a/ui/new/images/cross_icon.gif b/ui/new/images/cross_icon.gif
new file mode 100755
index 00000000000..55bbac0f9f5
Binary files /dev/null and b/ui/new/images/cross_icon.gif differ
diff --git a/ui/new/images/dashboardtitle_icons.gif b/ui/new/images/dashboardtitle_icons.gif
new file mode 100755
index 00000000000..1fb5e3b3484
Binary files /dev/null and b/ui/new/images/dashboardtitle_icons.gif differ
diff --git a/ui/new/images/db_leftmenuicon.png b/ui/new/images/db_leftmenuicon.png
new file mode 100755
index 00000000000..688d53970c2
Binary files /dev/null and b/ui/new/images/db_leftmenuicon.png differ
diff --git a/ui/new/images/domain_leftmenuicon.png b/ui/new/images/domain_leftmenuicon.png
new file mode 100755
index 00000000000..c28e421aeda
Binary files /dev/null and b/ui/new/images/domain_leftmenuicon.png differ
diff --git a/ui/new/images/domaintitle_icons.gif b/ui/new/images/domaintitle_icons.gif
new file mode 100755
index 00000000000..55473065b26
Binary files /dev/null and b/ui/new/images/domaintitle_icons.gif differ
diff --git a/ui/new/images/events_leftmenuicon.png b/ui/new/images/events_leftmenuicon.png
new file mode 100755
index 00000000000..b7d81faa8a1
Binary files /dev/null and b/ui/new/images/events_leftmenuicon.png differ
diff --git a/ui/new/images/eventstitle_icons.gif b/ui/new/images/eventstitle_icons.gif
new file mode 100755
index 00000000000..0a91b5200dc
Binary files /dev/null and b/ui/new/images/eventstitle_icons.gif differ
diff --git a/ui/new/images/footer_bg.gif b/ui/new/images/footer_bg.gif
new file mode 100755
index 00000000000..4117fafc59d
Binary files /dev/null and b/ui/new/images/footer_bg.gif differ
diff --git a/ui/new/images/group_icon.gif b/ui/new/images/group_icon.gif
new file mode 100755
index 00000000000..416fd92a4e2
Binary files /dev/null and b/ui/new/images/group_icon.gif differ
diff --git a/ui/new/images/header_bg.gif b/ui/new/images/header_bg.gif
new file mode 100755
index 00000000000..ff7d8b13197
Binary files /dev/null and b/ui/new/images/header_bg.gif differ
diff --git a/ui/new/images/help_actionicon.png b/ui/new/images/help_actionicon.png
new file mode 100644
index 00000000000..77f87eff354
Binary files /dev/null and b/ui/new/images/help_actionicon.png differ
diff --git a/ui/new/images/hostnetwork_icon.gif b/ui/new/images/hostnetwork_icon.gif
new file mode 100755
index 00000000000..771f21b8adf
Binary files /dev/null and b/ui/new/images/hostnetwork_icon.gif differ
diff --git a/ui/new/images/hosts_leftmenuicon.png b/ui/new/images/hosts_leftmenuicon.png
new file mode 100755
index 00000000000..c7956c53eb3
Binary files /dev/null and b/ui/new/images/hosts_leftmenuicon.png differ
diff --git a/ui/new/images/hosttitle_icons.gif b/ui/new/images/hosttitle_icons.gif
new file mode 100755
index 00000000000..bffcfafa3d0
Binary files /dev/null and b/ui/new/images/hosttitle_icons.gif differ
diff --git a/ui/new/images/info_icon.gif b/ui/new/images/info_icon.gif
new file mode 100755
index 00000000000..77a49ba0bef
Binary files /dev/null and b/ui/new/images/info_icon.gif differ
diff --git a/ui/new/images/info_icon.png b/ui/new/images/info_icon.png
new file mode 100644
index 00000000000..95ee8182b21
Binary files /dev/null and b/ui/new/images/info_icon.png differ
diff --git a/ui/new/images/infoerror_icon.gif b/ui/new/images/infoerror_icon.gif
new file mode 100755
index 00000000000..4d849e9ba3b
Binary files /dev/null and b/ui/new/images/infoerror_icon.gif differ
diff --git a/ui/new/images/infoerror_icon.png b/ui/new/images/infoerror_icon.png
new file mode 100644
index 00000000000..16cbbe49745
Binary files /dev/null and b/ui/new/images/infoerror_icon.png differ
diff --git a/ui/new/images/instance_leftmenuicon.png b/ui/new/images/instance_leftmenuicon.png
new file mode 100755
index 00000000000..53ff7b1ba1a
Binary files /dev/null and b/ui/new/images/instance_leftmenuicon.png differ
diff --git a/ui/new/images/instancetitle_icons.gif b/ui/new/images/instancetitle_icons.gif
new file mode 100755
index 00000000000..2e44ffca52b
Binary files /dev/null and b/ui/new/images/instancetitle_icons.gif differ
diff --git a/ui/new/images/iptitle_icons.gif b/ui/new/images/iptitle_icons.gif
new file mode 100755
index 00000000000..224c2d8dbe8
Binary files /dev/null and b/ui/new/images/iptitle_icons.gif differ
diff --git a/ui/new/images/laststep_bg.gif b/ui/new/images/laststep_bg.gif
new file mode 100755
index 00000000000..cae40474243
Binary files /dev/null and b/ui/new/images/laststep_bg.gif differ
diff --git a/ui/new/images/laststep_slectedbg.gif b/ui/new/images/laststep_slectedbg.gif
new file mode 100755
index 00000000000..da090ed0e45
Binary files /dev/null and b/ui/new/images/laststep_slectedbg.gif differ
diff --git a/ui/new/images/leftmenu_closedarrow.gif b/ui/new/images/leftmenu_closedarrow.gif
new file mode 100755
index 00000000000..f168fe409e3
Binary files /dev/null and b/ui/new/images/leftmenu_closedarrow.gif differ
diff --git a/ui/new/images/leftmenu_closedarrow.png b/ui/new/images/leftmenu_closedarrow.png
new file mode 100755
index 00000000000..1d3e81c9c2b
Binary files /dev/null and b/ui/new/images/leftmenu_closedarrow.png differ
diff --git a/ui/new/images/leftmenu_dashedborder.gif b/ui/new/images/leftmenu_dashedborder.gif
new file mode 100755
index 00000000000..e7f2a12a9a6
Binary files /dev/null and b/ui/new/images/leftmenu_dashedborder.gif differ
diff --git a/ui/new/images/leftmenu_hover.gif b/ui/new/images/leftmenu_hover.gif
new file mode 100755
index 00000000000..977be34eed8
Binary files /dev/null and b/ui/new/images/leftmenu_hover.gif differ
diff --git a/ui/new/images/leftmenu_openarrow.gif b/ui/new/images/leftmenu_openarrow.gif
new file mode 100755
index 00000000000..3cc13f414e2
Binary files /dev/null and b/ui/new/images/leftmenu_openarrow.gif differ
diff --git a/ui/new/images/leftmenu_openarrow.png b/ui/new/images/leftmenu_openarrow.png
new file mode 100755
index 00000000000..0725bf4368b
Binary files /dev/null and b/ui/new/images/leftmenu_openarrow.png differ
diff --git a/ui/new/images/loadnetwork_titleicon.gif b/ui/new/images/loadnetwork_titleicon.gif
new file mode 100755
index 00000000000..2862191c3f4
Binary files /dev/null and b/ui/new/images/loadnetwork_titleicon.gif differ
diff --git a/ui/new/images/loadtitle_icons.gif b/ui/new/images/loadtitle_icons.gif
new file mode 100755
index 00000000000..f0744f2709d
Binary files /dev/null and b/ui/new/images/loadtitle_icons.gif differ
diff --git a/ui/new/images/login_bg.gif b/ui/new/images/login_bg.gif
new file mode 100755
index 00000000000..264b0d17d4b
Binary files /dev/null and b/ui/new/images/login_bg.gif differ
diff --git a/ui/new/images/login_button.gif b/ui/new/images/login_button.gif
new file mode 100755
index 00000000000..2b3fa13fdd7
Binary files /dev/null and b/ui/new/images/login_button.gif differ
diff --git a/ui/new/images/login_button_hover.gif b/ui/new/images/login_button_hover.gif
new file mode 100755
index 00000000000..7f4df451094
Binary files /dev/null and b/ui/new/images/login_button_hover.gif differ
diff --git a/ui/new/images/login_logo.gif b/ui/new/images/login_logo.gif
new file mode 100755
index 00000000000..64d55a7c538
Binary files /dev/null and b/ui/new/images/login_logo.gif differ
diff --git a/ui/new/images/login_textbg.gif b/ui/new/images/login_textbg.gif
new file mode 100755
index 00000000000..fc8756155d3
Binary files /dev/null and b/ui/new/images/login_textbg.gif differ
diff --git a/ui/new/images/loginbox_bot.gif b/ui/new/images/loginbox_bot.gif
new file mode 100755
index 00000000000..567d10895bc
Binary files /dev/null and b/ui/new/images/loginbox_bot.gif differ
diff --git a/ui/new/images/loginbox_mid.gif b/ui/new/images/loginbox_mid.gif
new file mode 100755
index 00000000000..f2d6848aeac
Binary files /dev/null and b/ui/new/images/loginbox_mid.gif differ
diff --git a/ui/new/images/loginbox_mid.png b/ui/new/images/loginbox_mid.png
new file mode 100755
index 00000000000..f38fed76e7f
Binary files /dev/null and b/ui/new/images/loginbox_mid.png differ
diff --git a/ui/new/images/loginbox_top.gif b/ui/new/images/loginbox_top.gif
new file mode 100755
index 00000000000..bb62bed5db5
Binary files /dev/null and b/ui/new/images/loginbox_top.gif differ
diff --git a/ui/new/images/loginbox_top.png b/ui/new/images/loginbox_top.png
new file mode 100755
index 00000000000..35c895a7647
Binary files /dev/null and b/ui/new/images/loginbox_top.png differ
diff --git a/ui/new/images/logo.gif b/ui/new/images/logo.gif
new file mode 100755
index 00000000000..b399c7fa31a
Binary files /dev/null and b/ui/new/images/logo.gif differ
diff --git a/ui/new/images/memory_icon.gif b/ui/new/images/memory_icon.gif
new file mode 100755
index 00000000000..1d026174768
Binary files /dev/null and b/ui/new/images/memory_icon.gif differ
diff --git a/ui/new/images/mgmtconsole_logo.gif b/ui/new/images/mgmtconsole_logo.gif
new file mode 100755
index 00000000000..9b321b12c38
Binary files /dev/null and b/ui/new/images/mgmtconsole_logo.gif differ
diff --git a/ui/new/images/mid_addingbg.gif b/ui/new/images/mid_addingbg.gif
new file mode 100644
index 00000000000..e401c3c8cdc
Binary files /dev/null and b/ui/new/images/mid_addingbg.gif differ
diff --git a/ui/new/images/mid_default.gif b/ui/new/images/mid_default.gif
new file mode 100644
index 00000000000..5c3bc3b3226
Binary files /dev/null and b/ui/new/images/mid_default.gif differ
diff --git a/ui/new/images/midmenu_dashedborder.gif b/ui/new/images/midmenu_dashedborder.gif
new file mode 100755
index 00000000000..667bc8830a0
Binary files /dev/null and b/ui/new/images/midmenu_dashedborder.gif differ
diff --git a/ui/new/images/midmenu_hover.gif b/ui/new/images/midmenu_hover.gif
new file mode 100755
index 00000000000..5918c704823
Binary files /dev/null and b/ui/new/images/midmenu_hover.gif differ
diff --git a/ui/new/images/midmenu_navbg.gif b/ui/new/images/midmenu_navbg.gif
new file mode 100755
index 00000000000..955da13ca5a
Binary files /dev/null and b/ui/new/images/midmenu_navbg.gif differ
diff --git a/ui/new/images/network_leftmenuicon.png b/ui/new/images/network_leftmenuicon.png
new file mode 100755
index 00000000000..dae83294ded
Binary files /dev/null and b/ui/new/images/network_leftmenuicon.png differ
diff --git a/ui/new/images/next_midnav.gif b/ui/new/images/next_midnav.gif
new file mode 100755
index 00000000000..f79c0e966a1
Binary files /dev/null and b/ui/new/images/next_midnav.gif differ
diff --git a/ui/new/images/next_midnav_hover.gif b/ui/new/images/next_midnav_hover.gif
new file mode 100755
index 00000000000..be0cb9da59b
Binary files /dev/null and b/ui/new/images/next_midnav_hover.gif differ
diff --git a/ui/new/images/offeringbox_bg.gif b/ui/new/images/offeringbox_bg.gif
new file mode 100755
index 00000000000..07995c0a298
Binary files /dev/null and b/ui/new/images/offeringbox_bg.gif differ
diff --git a/ui/new/images/offeringbox_destop.gif b/ui/new/images/offeringbox_destop.gif
new file mode 100755
index 00000000000..26a916c646f
Binary files /dev/null and b/ui/new/images/offeringbox_destop.gif differ
diff --git a/ui/new/images/othersteps_bg.gif b/ui/new/images/othersteps_bg.gif
new file mode 100755
index 00000000000..435a78d5cd1
Binary files /dev/null and b/ui/new/images/othersteps_bg.gif differ
diff --git a/ui/new/images/poweredby.gif b/ui/new/images/poweredby.gif
new file mode 100755
index 00000000000..0da126fdcea
Binary files /dev/null and b/ui/new/images/poweredby.gif differ
diff --git a/ui/new/images/prev_midnav.gif b/ui/new/images/prev_midnav.gif
new file mode 100755
index 00000000000..ffcdcfc4dfc
Binary files /dev/null and b/ui/new/images/prev_midnav.gif differ
diff --git a/ui/new/images/prev_midnav_hover.gif b/ui/new/images/prev_midnav_hover.gif
new file mode 100755
index 00000000000..53e927b6f16
Binary files /dev/null and b/ui/new/images/prev_midnav_hover.gif differ
diff --git a/ui/new/images/primestoragetitle_icons.gif b/ui/new/images/primestoragetitle_icons.gif
new file mode 100755
index 00000000000..342771d672b
Binary files /dev/null and b/ui/new/images/primestoragetitle_icons.gif differ
diff --git a/ui/new/images/refresh_actionicon.png b/ui/new/images/refresh_actionicon.png
new file mode 100755
index 00000000000..679ac4508ab
Binary files /dev/null and b/ui/new/images/refresh_actionicon.png differ
diff --git a/ui/new/images/reviewboxeven_bg.gif b/ui/new/images/reviewboxeven_bg.gif
new file mode 100755
index 00000000000..421fa4771bc
Binary files /dev/null and b/ui/new/images/reviewboxeven_bg.gif differ
diff --git a/ui/new/images/revwiz_nonselcted_tempbut.gif b/ui/new/images/revwiz_nonselcted_tempbut.gif
new file mode 100755
index 00000000000..7ee254cee97
Binary files /dev/null and b/ui/new/images/revwiz_nonselcted_tempbut.gif differ
diff --git a/ui/new/images/revwiz_nonselcted_tempbut_hover.gif b/ui/new/images/revwiz_nonselcted_tempbut_hover.gif
new file mode 100755
index 00000000000..a7947295453
Binary files /dev/null and b/ui/new/images/revwiz_nonselcted_tempbut_hover.gif differ
diff --git a/ui/new/images/revwiz_nonselectednumber.gif b/ui/new/images/revwiz_nonselectednumber.gif
new file mode 100755
index 00000000000..623a8f102e7
Binary files /dev/null and b/ui/new/images/revwiz_nonselectednumber.gif differ
diff --git a/ui/new/images/revwiz_selcted_tempbut.gif b/ui/new/images/revwiz_selcted_tempbut.gif
new file mode 100755
index 00000000000..a44ab580220
Binary files /dev/null and b/ui/new/images/revwiz_selcted_tempbut.gif differ
diff --git a/ui/new/images/routers_leftmenuicon.png b/ui/new/images/routers_leftmenuicon.png
new file mode 100755
index 00000000000..8850ab11568
Binary files /dev/null and b/ui/new/images/routers_leftmenuicon.png differ
diff --git a/ui/new/images/routerstitle_icons.gif b/ui/new/images/routerstitle_icons.gif
new file mode 100755
index 00000000000..77bf1b4de36
Binary files /dev/null and b/ui/new/images/routerstitle_icons.gif differ
diff --git a/ui/new/images/search_closeicon.gif b/ui/new/images/search_closeicon.gif
new file mode 100644
index 00000000000..c6148ab69d0
Binary files /dev/null and b/ui/new/images/search_closeicon.gif differ
diff --git a/ui/new/images/search_closeicon_hover.gif b/ui/new/images/search_closeicon_hover.gif
new file mode 100644
index 00000000000..f011186d669
Binary files /dev/null and b/ui/new/images/search_closeicon_hover.gif differ
diff --git a/ui/new/images/secondstoragetitle_icons.gif b/ui/new/images/secondstoragetitle_icons.gif
new file mode 100755
index 00000000000..a81097d3859
Binary files /dev/null and b/ui/new/images/secondstoragetitle_icons.gif differ
diff --git a/ui/new/images/selected_loader.gif b/ui/new/images/selected_loader.gif
new file mode 100755
index 00000000000..ea513fdc0a3
Binary files /dev/null and b/ui/new/images/selected_loader.gif differ
diff --git a/ui/new/images/serach_textbox.gif b/ui/new/images/serach_textbox.gif
new file mode 100755
index 00000000000..b495cc5b2cb
Binary files /dev/null and b/ui/new/images/serach_textbox.gif differ
diff --git a/ui/new/images/serviceofftitle_icons.gif b/ui/new/images/serviceofftitle_icons.gif
new file mode 100755
index 00000000000..7c4d2ca8a8a
Binary files /dev/null and b/ui/new/images/serviceofftitle_icons.gif differ
diff --git a/ui/new/images/sgtitle_icons.gif b/ui/new/images/sgtitle_icons.gif
new file mode 100755
index 00000000000..a3e9d9e6b0f
Binary files /dev/null and b/ui/new/images/sgtitle_icons.gif differ
diff --git a/ui/new/images/sprite_leftmenu.gif b/ui/new/images/sprite_leftmenu.gif
new file mode 100755
index 00000000000..cb2b2c93221
Binary files /dev/null and b/ui/new/images/sprite_leftmenu.gif differ
diff --git a/ui/new/images/status_gray.png b/ui/new/images/status_gray.png
new file mode 100755
index 00000000000..9b205625fd3
Binary files /dev/null and b/ui/new/images/status_gray.png differ
diff --git a/ui/new/images/status_green.png b/ui/new/images/status_green.png
new file mode 100755
index 00000000000..572a83275ca
Binary files /dev/null and b/ui/new/images/status_green.png differ
diff --git a/ui/new/images/status_red.png b/ui/new/images/status_red.png
new file mode 100755
index 00000000000..663f9333de7
Binary files /dev/null and b/ui/new/images/status_red.png differ
diff --git a/ui/new/images/step1_bg.png b/ui/new/images/step1_bg.png
new file mode 100755
index 00000000000..1a961cf96b3
Binary files /dev/null and b/ui/new/images/step1_bg.png differ
diff --git a/ui/new/images/step1_bg_unselected.png b/ui/new/images/step1_bg_unselected.png
new file mode 100755
index 00000000000..87633ad8a9e
Binary files /dev/null and b/ui/new/images/step1_bg_unselected.png differ
diff --git a/ui/new/images/step2_bg.gif b/ui/new/images/step2_bg.gif
new file mode 100755
index 00000000000..33941513e76
Binary files /dev/null and b/ui/new/images/step2_bg.gif differ
diff --git a/ui/new/images/step2_selected.gif b/ui/new/images/step2_selected.gif
new file mode 100755
index 00000000000..2e1c2d14825
Binary files /dev/null and b/ui/new/images/step2_selected.gif differ
diff --git a/ui/new/images/storage_leftmenuicon.png b/ui/new/images/storage_leftmenuicon.png
new file mode 100755
index 00000000000..0179ff2dade
Binary files /dev/null and b/ui/new/images/storage_leftmenuicon.png differ
diff --git a/ui/new/images/systems_leftmenuicon.png b/ui/new/images/systems_leftmenuicon.png
new file mode 100755
index 00000000000..a8d92b74408
Binary files /dev/null and b/ui/new/images/systems_leftmenuicon.png differ
diff --git a/ui/new/images/temp_centosicon.gif b/ui/new/images/temp_centosicon.gif
new file mode 100755
index 00000000000..48805d3e4d8
Binary files /dev/null and b/ui/new/images/temp_centosicon.gif differ
diff --git a/ui/new/images/temp_linuxicon.gif b/ui/new/images/temp_linuxicon.gif
new file mode 100755
index 00000000000..6308da3f8a0
Binary files /dev/null and b/ui/new/images/temp_linuxicon.gif differ
diff --git a/ui/new/images/temp_windowsicon.gif b/ui/new/images/temp_windowsicon.gif
new file mode 100755
index 00000000000..a5e29ee3510
Binary files /dev/null and b/ui/new/images/temp_windowsicon.gif differ
diff --git a/ui/new/images/templates_leftmenuicon.png b/ui/new/images/templates_leftmenuicon.png
new file mode 100755
index 00000000000..cb5dffe9280
Binary files /dev/null and b/ui/new/images/templates_leftmenuicon.png differ
diff --git a/ui/new/images/templatestitle_icons.gif b/ui/new/images/templatestitle_icons.gif
new file mode 100755
index 00000000000..db8b1239683
Binary files /dev/null and b/ui/new/images/templatestitle_icons.gif differ
diff --git a/ui/new/images/tick_icon.gif b/ui/new/images/tick_icon.gif
new file mode 100755
index 00000000000..aa72ea0d582
Binary files /dev/null and b/ui/new/images/tick_icon.gif differ
diff --git a/ui/new/images/tick_review.png b/ui/new/images/tick_review.png
new file mode 100755
index 00000000000..aaf6b17d1a4
Binary files /dev/null and b/ui/new/images/tick_review.png differ
diff --git a/ui/new/images/vm_closebutton.gif b/ui/new/images/vm_closebutton.gif
new file mode 100644
index 00000000000..bbe4fa1bbc2
Binary files /dev/null and b/ui/new/images/vm_closebutton.gif differ
diff --git a/ui/new/images/vm_closebutton_hover.gif b/ui/new/images/vm_closebutton_hover.gif
new file mode 100644
index 00000000000..e66fc84b5d8
Binary files /dev/null and b/ui/new/images/vm_closebutton_hover.gif differ
diff --git a/ui/new/images/vm_console.gif b/ui/new/images/vm_console.gif
new file mode 100755
index 00000000000..f8726330949
Binary files /dev/null and b/ui/new/images/vm_console.gif differ
diff --git a/ui/new/images/vmpopup_bot.gif b/ui/new/images/vmpopup_bot.gif
new file mode 100755
index 00000000000..c3173bad732
Binary files /dev/null and b/ui/new/images/vmpopup_bot.gif differ
diff --git a/ui/new/images/vmpopup_bot.png b/ui/new/images/vmpopup_bot.png
new file mode 100755
index 00000000000..29445b7177e
Binary files /dev/null and b/ui/new/images/vmpopup_bot.png differ
diff --git a/ui/new/images/vmpopup_mid.gif b/ui/new/images/vmpopup_mid.gif
new file mode 100755
index 00000000000..63a444dd8dd
Binary files /dev/null and b/ui/new/images/vmpopup_mid.gif differ
diff --git a/ui/new/images/vmpopup_nextbut.gif b/ui/new/images/vmpopup_nextbut.gif
new file mode 100755
index 00000000000..9d94b9c4e2c
Binary files /dev/null and b/ui/new/images/vmpopup_nextbut.gif differ
diff --git a/ui/new/images/vmpopup_prevbut.gif b/ui/new/images/vmpopup_prevbut.gif
new file mode 100755
index 00000000000..93f9bd7ee0d
Binary files /dev/null and b/ui/new/images/vmpopup_prevbut.gif differ
diff --git a/ui/new/images/vmpopup_top.png b/ui/new/images/vmpopup_top.png
new file mode 100755
index 00000000000..ad575f5687a
Binary files /dev/null and b/ui/new/images/vmpopup_top.png differ
diff --git a/ui/new/images/whiteopened_arrow.png b/ui/new/images/whiteopened_arrow.png
new file mode 100755
index 00000000000..3fb8d263eb3
Binary files /dev/null and b/ui/new/images/whiteopened_arrow.png differ
diff --git a/ui/new/images/zone_ipicon.png b/ui/new/images/zone_ipicon.png
new file mode 100755
index 00000000000..cb54d2e05ff
Binary files /dev/null and b/ui/new/images/zone_ipicon.png differ
diff --git a/ui/new/images/zone_zoneicon.png b/ui/new/images/zone_zoneicon.png
new file mode 100755
index 00000000000..176dbe73217
Binary files /dev/null and b/ui/new/images/zone_zoneicon.png differ
diff --git a/ui/new/index.jsp b/ui/new/index.jsp
new file mode 100644
index 00000000000..35b3e71c526
--- /dev/null
+++ b/ui/new/index.jsp
@@ -0,0 +1,638 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Cloud.com CloudStack
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Your session has expired. Please click 'OK' to return to the login screen.
+
+
+
+
+
+
+
+
+ Stop
+
+
+
diff --git a/ui/new/jsp/tab_instance.jsp b/ui/new/jsp/tab_instance.jsp
new file mode 100644
index 00000000000..632afb18eb6
--- /dev/null
+++ b/ui/new/jsp/tab_instance.jsp
@@ -0,0 +1,658 @@
+
+
+<%@ page import="java.util.*" %>
+<%@ page import="com.cloud.utils.*" %>
+
+<%
+
+ Locale browserLocale = request.getLocale();
+ CloudResourceBundle t = CloudResourceBundle.getBundle("resources/resource", browserLocale);
+%>
+
+
+
+
+
+
+
+
+
+
+
+
+ <%=t.t("Details")%>
+
+ <%=t.t("Volume")%>
+
+ <%=t.t("Statistics")%>
+
+
+
+
+
+
+
+ <%=t.t("Template")%>:
+
+
+
+
+
+
+ <%=t.t("Service")%>:
+
+
+
+
+
+
+
+ <%=t.t("Created")%>:
+
+
+
+
+
+
+ <%=t.t("Account")%>:
+
+
+
+
+
+
+ <%=t.t("Domain")%>:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Please specify the ISO you wish to attach to virtual instance.
+
+
+
+
+
+
+
+ Please specify the new name you want to change for virtual instance.
+
+
+
+
+
+
+
+ After changing service offering, you must restart virtual instance for the new service offering to take effect.
+
+
+
\ No newline at end of file
diff --git a/ui/new/login.html b/ui/new/login.html
new file mode 100755
index 00000000000..3592ecc8679
--- /dev/null
+++ b/ui/new/login.html
@@ -0,0 +1,63 @@
+
+
+
+
+Untitled Document
+
+
+
+
+
+
+
+
+
+
+
+
+
Welcome to Management Console …
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ui/new/scripts/cloud.core.init.js b/ui/new/scripts/cloud.core.init.js
new file mode 100755
index 00000000000..b25fcd2c601
--- /dev/null
+++ b/ui/new/scripts/cloud.core.init.js
@@ -0,0 +1,905 @@
+var selectedItemIds = {};
+
+$(document).ready(function() {
+ $("#accordion_menu").accordion({
+ autoHeight: false,
+ collapsible: true,
+ active: false,
+ change: function(event, ui) {
+ if(ui.newContent.length==0) //collapse
+ ui.oldHeader.find("#arrow_icon").removeClass("open").addClass("close");
+ else //expand
+ ui.newHeader.find("#arrow_icon").removeClass("close").addClass("open");
+ }
+ });
+ $("#accordion_menu").show();
+
+ $("#midmenu_container").selectable({
+ selecting: function(event, ui) {
+ if(ui.selecting.id.indexOf("midmenuItem") != -1) {
+ var $t = $("#"+ui.selecting.id);
+ if($t.find("#content").hasClass("inaction") == false) { //only items not in action are allowed to be selected
+ var id =$t.data("id");
+ selectedItemIds[id] = $t;
+ $t.find("#content").addClass("selected");
+ }
+ var toRightPanelFn = $t.data("toRightPanelFn");
+ toRightPanelFn($t);
+ }
+ },
+ unselecting: function(event, ui) {
+ if(ui.unselecting.id.indexOf("midmenuItem") != -1) {
+ var $t = $("#"+ui.unselecting.id);
+ var id = $t.data("id");
+ if(id in selectedItemIds) {
+ delete selectedItemIds[id];
+ $t.find("#content").removeClass("selected");
+ }
+ }
+ }
+ });
+
+ var $rightPanel = $("#right_panel");
+ var $addLink = $("#add_link");
+ var $actionLink = $("#action_link");
+ var $actionMenu = $("#action_menu");
+ var $actionList = $actionMenu.find("#action_list");
+ var $midmenuContainer = $("#midmenu_container");
+ var $midmenuItemVm = $("#midmenu_item_vm");
+ var $actionListItem = $("#action_list_item");
+
+ $("#leftmenu_instance_group_header").bind("click", function(event) {
+ var $arrowIcon = $(this).find("#arrow_icon");
+ clickInstanceGroupHeader($arrowIcon);
+ return false;
+ });
+
+ var $midmenuItem = $("#midmenu_item");
+ function listMidMenuItems(leftmenuId, apiName, jsonResponse1, jsonResponse2, descriptionProperty) {
+ $("#"+leftmenuId).bind("click", function(event) {
+ $.ajax({
+ cache: false,
+ data: createURL("command="+apiName+"&response=json"),
+ dataType: "json",
+ success: function(json) {
+ $midmenuContainer.empty();
+ var items = json[jsonResponse1][jsonResponse2];
+ for(var i=0; i= 5.7 @*/;
+
+ // Disable IE6 browsers as UI does not support it
+ if (IE6 == true) {
+ alert("Only IE7, IE8, FireFox 3.x, Chrome, and Safari browsers are supported at this time.");
+ return;
+ }
+
+ /*
+ initializeTestTool();
+ */
+
+ // We will be dropping all the main tab content into this container
+ mainContainer = $("#maincontentarea");
+
+ // Tab Links, dashboard is the initial active tab
+ mainContainer.load("content/tab_dashboard.html");
+
+ // Default AJAX Setup
+ $.ajaxSetup({
+ url: "/client/api",
+ dataType: "json",
+ cache: false,
+ error: function(XMLHttpResponse) {
+ handleError(XMLHttpResponse);
+ },
+ beforeSend: function(XMLHttpRequest) {
+ if (g_mySession == $.cookie("JSESSIONID")) {
+ return true;
+ } else {
+ $("#dialog_session_expired").dialog("open");
+ return false;
+ }
+ }
+ });
+
+ // LOGIN/LOGOUT
+ // 'Enter' Key in any login form element = Submit click
+ $("#logoutpage #loginForm").keypress(function(event) {
+ var formId = $(event.target).attr("id");
+ if(event.keyCode == keycode_Enter && formId != "loginbutton") {
+ login();
+ }
+ });
+
+ $("#logoutpage .loginbutton").bind("click", function(event) {
+ login();
+ return false;
+ });
+
+ $("#logoutaccount_link").bind("click", function(event) {
+ $.ajax({
+ data: createURL("command=logout&response=json"),
+ dataType: "json",
+ success: function(json) {
+ logout(true);
+ },
+ error: function() {
+ logout(true);
+ },
+ beforeSend : function(XMLHTTP) {
+ return true;
+ }
+ });
+ });
+
+ // FUNCTION: logs the user out
+ var activeTab = null;
+ function logout(refresh) {
+ g_mySession = null;
+ g_sessionKey = null;
+ g_username = null;
+ g_account = null;
+ g_domainid = null;
+ g_timezoneoffset = null;
+ g_timezone = null;
+
+ $.cookie('JSESSIONID', null);
+ $.cookie('sessionKey', null);
+ $.cookie('username', null);
+ $.cookie('account', null);
+ $.cookie('domainid', null);
+ $.cookie('role', null);
+ $.cookie('networktype', null);
+ $.cookie('timezoneoffset', null);
+ $.cookie('timezone', null);
+
+ $("body").stopTime();
+
+ // default is to redisplay the login page
+ if (onLogoutCallback()) {
+ if (refresh) {
+ location.replace('/client');
+ return false;
+ }
+ $("#account_password").val("");
+ $(".loginbutton_box p").hide();
+ $("#logoutpage").show();
+ $("body").css("background", "#4e4e4e url(images/logout_bg.gif) repeat-x top left");
+ mainContainer.empty();
+ $("#mainmaster").hide();
+ $("#overlay_black").hide();
+
+ var menuOnClass = "menutab_on";
+ var menuOffClass = "menutab_off";
+ var tab = null;
+ if (isAdmin()) {
+ tab = $("#menutab_dashboard_root");
+ menuOnClass = "admin_menutab_on";
+ menuOffClass = "admin_menutab_off";
+ } else if (isDomainAdmin()) {
+ tab = $("#menutab_dashboard_domain");
+ menuOnClass = "admin_menutab_on";
+ menuOffClass = "admin_menutab_off";
+ } else if (isUser()) {
+ tab = $("#menutab_dashboard_user");
+ menuOnClass = "menutab_on";
+ menuOffClass = "menutab_off";
+ }
+ if (activeTab != null) {
+ activeTab.removeClass(menuOnClass).addClass(menuOffClass);
+ activeTab = null;
+ }
+ if (tab != null) {
+ tab.removeClass(menuOffClass).addClass(menuOnClass);
+ }
+ g_role = null;
+ $("#account_username").focus();
+ }
+ }
+
+ // FUNCTION: logs the user in
+ function login() {
+ var array1 = [];
+ var username = encodeURIComponent($("#account_username").val());
+ array1.push("&username="+username);
+
+ var password = $.md5(encodeURIComponent($("#account_password").val()));
+ array1.push("&password="+password);
+
+ var domain = encodeURIComponent($("#account_domain").val());
+ if(domain != null && domain.length > 0)
+ array1.push("&domain="+domain);
+
+ $.ajax({
+ type: "POST",
+ data: createURL("command=login&response=json" + array1.join("")),
+ dataType: "json",
+ async: false,
+ success: function(json) {
+ g_mySession = $.cookie('JSESSIONID');
+ g_sessionKey = encodeURIComponent(json.loginresponse.sessionkey);
+ g_role = json.loginresponse.type;
+ g_username = json.loginresponse.username;
+ g_account = json.loginresponse.account;
+ g_domainid = json.loginresponse.domainid;
+ g_timezone = json.loginresponse.timezone;
+ g_timezoneoffset = json.loginresponse.timezoneoffset;
+ if (json.loginresponse.networktype != null)
+ g_networkType = json.loginresponse.networktype;
+ if (json.loginresponse.hypervisortype != null)
+ g_hypervisorType = json.loginresponse.hypervisortype;
+ if (json.loginresponse.directattachnetworkgroupsenabled != null)
+ g_directAttachNetworkGroupsEnabled = json.loginresponse.directattachnetworkgroupsenabled;
+ if (json.loginresponse.directattacheduntaggedenabled != null)
+ g_directAttachedUntaggedEnabled = json.loginresponse.directattacheduntaggedenabled;
+ if (json.loginresponse.systemvmuselocalstorage != null)
+ g_systemVmUseLocalStorage = json.loginresponse.systemvmuselocalstorage;
+
+ $.cookie('sessionKey', g_sessionKey, { expires: 1});
+ $.cookie('networktype', g_networkType, { expires: 1});
+ $.cookie('hypervisortype', g_hypervisorType, { expires: 1});
+ $.cookie('username', g_username, { expires: 1});
+ $.cookie('account', g_account, { expires: 1});
+ $.cookie('domainid', g_domainid, { expires: 1});
+ $.cookie('role', g_role, { expires: 1});
+ $.cookie('timezoneoffset', g_timezoneoffset, { expires: 1});
+ $.cookie('timezone', g_timezone, { expires: 1});
+ $.cookie('directattachnetworkgroupsenabled', g_directAttachNetworkGroupsEnabled, { expires: 1});
+ $.cookie('directattacheduntaggedenabled', g_directAttachedUntaggedEnabled, { expires: 1});
+ $.cookie('systemvmuselocalstorage', g_systemVmUseLocalStorage, { expires: 1});
+
+ // Set Role
+ if (isUser()) {
+ $(".loginbutton_box p").text("").hide();
+ $("#menutab_role_user #menutab_dashboard_user").click();
+ } else if (isAdmin()) {
+ $(".loginbutton_box p").text("").hide();
+ $("#menutab_role_root #menutab_dashboard_root").click();
+ } else if (isDomainAdmin()) {
+ $(".loginbutton_box p").text("").hide();
+ $("#menutab_role_domain #menutab_dashboard_domain").click();
+ } else {
+ $(".loginbutton_box p").text("Account type of '" + username + "' is neither user nor admin.").show();
+ return;
+ }
+
+ $("#logoutpage").hide();
+ $("body").css("background", "#FFF repeat top left");
+ $("#mainmaster").show();
+ },
+ error: function() {
+ $("#account_password").val("");
+ $("#logoutpage").show();
+ $(".loginbutton_box p").text("Your username/password does not match our records.").show();
+ $("#account_username").focus();
+ },
+ beforeSend: function(XMLHttpRequest) {
+ return true;
+ }
+ });
+ }
+
+ // Dialogs
+ $("#dialog_confirmation").dialog({
+ autoOpen: false,
+ modal: true,
+ zIndex: 2000
+ });
+
+ $("#dialog_info").dialog({
+ autoOpen: false,
+ modal: true,
+ zIndex: 2000,
+ buttons: { "OK": function() { $(this).dialog("close"); } }
+ });
+
+ $("#dialog_alert").dialog({
+ autoOpen: false,
+ modal: true,
+ zIndex: 2000,
+ buttons: { "OK": function() { $(this).dialog("close"); } }
+ });
+ $("#dialog_alert").siblings(".ui-widget-header").css("background", "url('/client/css/images/ui-bg_errorglass_30_ffffff_1x400.png') repeat-x scroll 50% 50% #393939");
+ $("#dialog_alert").siblings(".ui-dialog-buttonpane").find(".ui-state-default").css("background", "url('/client/css/images/ui-bg_errorglass_30_ffffff_1x400.png') repeat-x scroll 50% 50% #393939");
+
+ $("#dialog_error").dialog({
+ autoOpen: false,
+ modal: true,
+ zIndex: 2000,
+ buttons: { "Close": function() { $(this).dialog("close"); } }
+ });
+ $("#dialog_error").siblings(".ui-widget-header").css("background", "url('/client/css/images/ui-bg_errorglass_30_ffffff_1x400.png') repeat-x scroll 50% 50% #393939");
+ $("#dialog_error").siblings(".ui-dialog-buttonpane").find(".ui-state-default").css("background", "url('/client/css/images/ui-bg_errorglass_30_ffffff_1x400.png') repeat-x scroll 50% 50% #393939");
+
+ $("#dialog_session_expired").dialog({
+ autoOpen: false,
+ modal: true,
+ zIndex: 2000,
+ buttons: { "OK": function() { logout(true); $(this).dialog("close"); } }
+ });
+ $("#dialog_session_expired").siblings(".ui-widget-header").css("background", "url('/client/css/images/ui-bg_errorglass_30_ffffff_1x400.png') repeat-x scroll 50% 50% #393939");
+ $("#dialog_session_expired").siblings(".ui-dialog-buttonpane").find(".ui-state-default").css("background", "url('/client/css/images/ui-bg_errorglass_30_ffffff_1x400.png') repeat-x scroll 50% 50% #393939");
+
+ $("#dialog_server_error").dialog({
+ autoOpen: false,
+ modal: true,
+ zIndex: 2000,
+ buttons: { "OK": function() { $(this).dialog("close"); } }
+ });
+ $("#dialog_server_error").siblings(".ui-widget-header").css("background", "url('/client/css/images/ui-bg_errorglass_30_ffffff_1x400.png') repeat-x scroll 50% 50% #393939");
+ $("#dialog_server_error").siblings(".ui-dialog-buttonpane").find(".ui-state-default").css("background", "url('/client/css/images/ui-bg_errorglass_30_ffffff_1x400.png') repeat-x scroll 50% 50% #393939");
+
+ // Menu Tabs
+ $("#global_nav").bind("click", function(event) {
+ var tab = $(event.target);
+ var tabId = tab.attr("id");
+ var menuOnClass = "menutab_on";
+ var menuOffClass = "menutab_off";
+ if (tabId == "menutab_dashboard_user" || tabId == "menutab_dashboard_root" || tabId == "menutab_dashboard_domain") {
+ showDashboardTab();
+ } else if (tabId == "menutab_vm") {
+ mainContainer.load("content/tab_instances.html", function() {
+ showInstancesTab(tab.data("domainId"), tab.data("account"));
+ });
+ } else if (tabId == "menutab_networking") {
+ mainContainer.load("content/tab_networking.html", function() {
+ showNetworkingTab(tab.data("domainId"), tab.data("account"));
+ });
+ } else if (tabId == "menutab_templates") {
+ mainContainer.load("content/tab_templates.html", function() {
+ showTemplatesTab();
+ });
+ } else if (tabId == "menutab_events") {
+ mainContainer.load("content/tab_events.html", function() {
+ showEventsTab(tab.data("showEvents"));
+ });
+ } else if (tabId == "menutab_hosts") {
+ mainContainer.load("content/tab_hosts.html", function() {
+ showHostsTab();
+ });
+ } else if (tabId == "menutab_storage") {
+ mainContainer.load("content/tab_storage.html", function() {
+ showStorageTab(tab.data("domainId"), tab.data("targetTab"));
+ });
+ } else if (tabId == "menutab_accounts") {
+ mainContainer.load("content/tab_accounts.html", function() {
+ showAccountsTab(tab.data("domainId"));
+ });
+ } else if (tabId == "menutab_domain") {
+ mainContainer.load("jsp/tab_domains.jsp", function() {
+ showDomainsTab();
+ });
+ } else if (tabId == "menutab_configuration") {
+ mainContainer.load("content/tab_configuration.html", function() {
+ showConfigurationTab();
+ });
+ } else {
+ return false;
+ }
+
+ if (isAdmin() || isDomainAdmin()) {
+ menuOnClass = "admin_menutab_on";
+ menuOffClass = "admin_menutab_off";
+ } else if (isUser()) {
+ menuOnClass = "menutab_on";
+ menuOffClass = "menutab_off";
+ }
+ if (activeTab != null) {
+ activeTab.removeClass(menuOnClass).addClass(menuOffClass);
+ }
+ tab.removeClass(menuOffClass).addClass(menuOnClass);
+ activeTab = tab;
+ removeDialogs();
+ return false;
+ });
+
+ // Dashboard Tab
+ function showDashboardTab() {
+ mainContainer.load("content/tab_dashboard.html", function() {
+ $(".header_topright #header_username").text($.cookie("username"));
+
+ if (isAdmin()) {
+ var sessionExpired = false;
+ var zones = null;
+ var noZones = false;
+ var noPods = true;
+ $("#menutab_dashboard_root, #menutab_vm, #menutab_networking_old, #menutab_networking, #menutab_templates, #menutab_events, #menutab_hosts, #menutab_storage, #menutab_accounts, #menutab_domain").hide();
+ $.ajax({
+ data: createURL("command=listZones&available=true&response=json"+maxPageSize),
+ dataType: "json",
+ async: false,
+ success: function(json) {
+ zones = json.listzonesresponse.zone;
+ var zoneSelect = $("#capacity_zone_select").empty();
+ if (zones != null && zones.length > 0) {
+ for (var i = 0; i < zones.length; i++) {
+ zoneSelect.append("" + sanitizeXSS(zones[i].name) + " ");
+ if(noPods) {
+ $.ajax({
+ data: createURL("command=listPods&zoneId="+zones[i].id+"&response=json"),
+ dataType: "json",
+ async: false,
+ success: function(json) {
+ var pods = json.listpodsresponse.pod;
+ if (pods != null && pods.length > 0) {
+ noPods = false;
+ $("#menutab_dashboard_root, #menutab_vm, #menutab_networking_old, #menutab_networking, #menutab_templates, #menutab_events, #menutab_hosts, #menutab_storage, #menutab_accounts, #menutab_domain").show();
+ }
+ }
+ });
+ }
+ }
+ } else {
+ noZones = true;
+ }
+ },
+ beforeSend: function(XMLHttpRequest) {
+ return true;
+ }
+ });
+ if (sessionExpired) return false;
+ if (noZones || noPods) {
+ $("#tab_dashboard_user").hide();
+ $("#menutab_role_user").hide();
+ $("#menutab_role_root").show();
+ $("#menutab_configuration").click();
+ return false;
+ }
+
+ var capacities = null;
+ $.ajax({
+ cache: false,
+ async: false,
+ data: createURL("command=listCapacity&response=json"),
+ dataType: "json",
+ success: function(json) {
+ capacities = json.listcapacityresponse.capacity;
+ }
+ });
+
+ $("#capacity_pod_select").bind("change", function(event) {
+ // Reset to Defaults
+ $("#public_ip_total, #storage_total, #storage_alloc_total, #sec_storage_total, #memory_total, #cpu_total, #private_ip_total").text("N/A");
+ $("#public_ip_used, #storage_used, #storage_alloc, #sec_storage_used, #memory_used, #cpu_used, #private_ip_used,").attr("style", "width:50%").text("N/A");
+ $(".db_bargraph_barbox_safezone").attr("style", "width:0%");
+ $(".db_bargraph_barbox_unsafezone").attr("style", "width:0%");
+
+ var selectedZone = $("#capacity_zone_select option:selected").text();
+ var selectedPod = $("#capacity_pod_select").val();
+
+ if (capacities != null && capacities.length > 0) {
+ for (var i = 0; i < capacities.length; i++) {
+ var capacity = capacities[i];
+ if (capacity.zonename == selectedZone) {
+ // Public IPs
+ if (capacity.type == "4") {
+ $("#public_ip_used").attr("style", "width: " + ((parseFloat(capacity.percentused) < 50) ? "50%" : capacity.percentused + "%")).text("Used: " + capacity.capacityused + " / " + capacity.percentused + "%");
+ $("#public_ip_total").text("Total: " + capacity.capacitytotal);
+ var usedPercentage = parseInt(capacity.percentused);
+ if (usedPercentage > 70) {
+ $("#capacity_public_ip .db_bargraph_barbox_safezone").attr("style", "width:70%");
+ if(usedPercentage <= 100)
+ $("#capacity_public_ip .db_bargraph_barbox_unsafezone").attr("style", "width:"+(usedPercentage - 70)+"%");
+ else
+ $("#capacity_public_ip .db_bargraph_barbox_unsafezone").attr("style", "width:30%");
+ } else {
+ $("#capacity_public_ip .db_bargraph_barbox_safezone").attr("style", "width:"+usedPercentage+"%");
+ $("#capacity_public_ip .db_bargraph_barbox_unsafezone").attr("style", "width:0%");
+ }
+ // Secondary Storage
+ } else if (capacity.type == "6") {
+ $("#sec_storage_used").attr("style", "width: " + ((parseFloat(capacity.percentused) < 50) ? "50%" : capacity.percentused + "%")).text("Used: " + convertBytes(parseInt(capacity.capacityused)) + " / " + capacity.percentused + "%");
+ $("#sec_storage_total").text("Total: " + convertBytes(parseInt(capacity.capacitytotal)));
+ var usedPercentage = parseInt(capacity.percentused);
+ if (usedPercentage > 70) {
+ $("#capacity_sec_storage .db_bargraph_barbox_safezone").attr("style", "width:70%");
+ if(usedPercentage <= 100)
+ $("#capacity_sec_storage .db_bargraph_barbox_unsafezone").attr("style", "width:"+(usedPercentage - 70)+"%");
+ else
+ $("#capacity_sec_storage .db_bargraph_barbox_unsafezone").attr("style", "width:30%");
+ } else {
+ $("#capacity_sec_storage .db_bargraph_barbox_safezone").attr("style", "width:"+usedPercentage+"%");
+ $("#capacity_sec_storage .db_bargraph_barbox_unsafezone").attr("style", "width:0%");
+ }
+ } else {
+ if (capacity.podname == selectedPod) {
+ // Memory
+ if (capacity.type == "0") {
+ $("#memory_used").attr("style", "width: " + ((parseFloat(capacity.percentused) < 50) ? "50%" : capacity.percentused + "%")).text("Used: " + convertBytes(parseInt(capacity.capacityused)) + " / " + capacity.percentused + "%");
+ $("#memory_total").text("Total: " + convertBytes(parseInt(capacity.capacitytotal)));
+ var usedPercentage = parseInt(capacity.percentused);
+ if (usedPercentage > 70) {
+ $("#capacity_memory .db_bargraph_barbox_safezone").attr("style", "width:70%");
+ if(usedPercentage <= 100)
+ $("#capacity_memory .db_bargraph_barbox_unsafezone").attr("style", "width:"+(usedPercentage - 70)+"%");
+ else
+ $("#capacity_memory .db_bargraph_barbox_unsafezone").attr("style", "width:30%");
+ } else {
+ $("#capacity_memory .db_bargraph_barbox_safezone").attr("style", "width:"+usedPercentage+"%");
+ $("#capacity_memory .db_bargraph_barbox_unsafezone").attr("style", "width:0%");
+ }
+ // CPU
+ } else if (capacity.type == "1") {
+ $("#cpu_used").attr("style", "width: " + ((parseFloat(capacity.percentused) < 50) ? "50%" : capacity.percentused + "%")).text("Used: " + convertHz(parseInt(capacity.capacityused)) + " / " + capacity.percentused + "%");
+ $("#cpu_total").text("Total: " + convertHz(parseInt(capacity.capacitytotal)));
+ var usedPercentage = parseInt(capacity.percentused);
+ if (usedPercentage > 70) {
+ $("#capacity_cpu .db_bargraph_barbox_safezone").attr("style", "width:70%");
+ if(usedPercentage <= 100)
+ $("#capacity_cpu .db_bargraph_barbox_unsafezone").attr("style", "width:"+(usedPercentage - 70)+"%");
+ else
+ $("#capacity_cpu .db_bargraph_barbox_unsafezone").attr("style", "width:30%");
+ } else {
+ $("#capacity_cpu .db_bargraph_barbox_safezone").attr("style", "width:"+usedPercentage+"%");
+ $("#capacity_cpu .db_bargraph_barbox_unsafezone").attr("style", "width:0%");
+ }
+ // Storage Used
+ } else if (capacity.type == "2") {
+ $("#storage_used").attr("style", "width: " + ((parseFloat(capacity.percentused) < 50) ? "50%" : capacity.percentused + "%")).text("Used: " + convertBytes(parseInt(capacity.capacityused)) + " / " + capacity.percentused + "%");
+ $("#storage_total").text("Total: " + convertBytes(parseInt(capacity.capacitytotal)));
+ var usedPercentage = parseInt(capacity.percentused);
+ if (usedPercentage > 70) {
+ $("#capacity_storage .db_bargraph_barbox_safezone").attr("style", "width:70%");
+ if(usedPercentage <= 100)
+ $("#capacity_storage .db_bargraph_barbox_unsafezone").attr("style", "width:"+(usedPercentage - 70)+"%");
+ else
+ $("#capacity_storage .db_bargraph_barbox_unsafezone").attr("style", "width:30%");
+ } else {
+ $("#capacity_storage .db_bargraph_barbox_safezone").attr("style", "width:"+usedPercentage+"%");
+ $("#capacity_storage .db_bargraph_barbox_unsafezone").attr("style", "width:0%");
+ }
+ // Storage Allocated
+ } else if (capacity.type == "3") {
+ $("#storage_alloc").attr("style", "width: " + ((parseFloat(capacity.percentused) < 50) ? "50%" : capacity.percentused + "%")).text("Used: " + convertBytes(parseInt(capacity.capacityused)) + " / " + capacity.percentused + "%");
+ $("#storage_alloc_total").text("Total: " + convertBytes(parseInt(capacity.capacitytotal)));
+ var usedPercentage = parseInt(capacity.percentused);
+ if (usedPercentage > 70) {
+ $("#capacity_storage_alloc .db_bargraph_barbox_safezone").attr("style", "width:70%");
+ if(usedPercentage <= 100)
+ $("#capacity_storage_alloc .db_bargraph_barbox_unsafezone").attr("style", "width:"+(usedPercentage - 70)+"%");
+ else
+ $("#capacity_storage_alloc .db_bargraph_barbox_unsafezone").attr("style", "width:30%");
+ } else {
+ $("#capacity_storage_alloc .db_bargraph_barbox_safezone").attr("style", "width:"+usedPercentage+"%");
+ $("#capacity_storage_alloc .db_bargraph_barbox_unsafezone").attr("style", "width:0%");
+ }
+ // Private IPs
+ } else if (capacity.type == "5") {
+ $("#private_ip_used").attr("style", "width: " + ((parseFloat(capacity.percentused) < 50) ? "50%" : capacity.percentused + "%")).text("Used: " + capacity.capacityused + " / " + capacity.percentused + "%");
+ $("#private_ip_total").text("Total: " + capacity.capacitytotal);
+ var usedPercentage = parseInt(capacity.percentused);
+ if (usedPercentage > 70) {
+ $("#capacity_private_ip .db_bargraph_barbox_safezone").attr("style", "width:70%");
+ if(usedPercentage <= 100)
+ $("#capacity_private_ip .db_bargraph_barbox_unsafezone").attr("style", "width:"+(usedPercentage - 70)+"%");
+ else
+ $("#capacity_private_ip .db_bargraph_barbox_unsafezone").attr("style", "width:30%");
+ } else {
+ $("#capacity_private_ip .db_bargraph_barbox_safezone").attr("style", "width:"+usedPercentage+"%");
+ $("#capacity_private_ip .db_bargraph_barbox_unsafezone").attr("style", "width:0%");
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ });
+
+ $("#capacity_zone_select").bind("change", function(event) {
+ var zoneId = $(this).val();
+ $.ajax({
+ data: createURL("command=listPods&zoneId="+zoneId+"&response=json"+maxPageSize),
+ dataType: "json",
+ async: false,
+ success: function(json) {
+ var pods = json.listpodsresponse.pod;
+ var podSelect = $("#capacity_pod_select").empty();
+ if (pods != null && pods.length > 0) {
+ podSelect.append("All ");
+ for (var i = 0; i < pods.length; i++) {
+ podSelect.append("" + sanitizeXSS(pods[i].name) + " ");
+ }
+ }
+ $("#capacity_pod_select").change();
+ }
+ });
+ });
+ $("#capacity_zone_select").change();
+
+ // Show Recent Alerts
+ $.ajax({
+ data: createURL("command=listAlerts&response=json"),
+ dataType: "json",
+ success: function(json) {
+ var alerts = json.listalertsresponse.alert;
+ if (alerts != null && alerts.length > 0) {
+ var alertGrid = $("#alert_grid_content").empty();
+ var length = (alerts.length>=5) ? 5 : alerts.length;
+ for (var i = 0; i < length; i++) {
+ var errorTemplate = $("#recent_error_template").clone(true);
+ errorTemplate.find("#db_error_type").text(toAlertType(alerts[i].type));
+ errorTemplate.find("#db_error_msg").append(sanitizeXSS(alerts[i].description));
+ setDateField(alerts[i].sent, errorTemplate.find("#db_error_date"));
+ alertGrid.append(errorTemplate.show());
+ }
+ }
+ }
+ });
+
+ // Show Host Alerts
+ $.ajax({
+ data: createURL("command=listHosts&state=Alert&response=json"),
+ dataType: "json",
+ success: function(json) {
+ var alerts = json.listhostsresponse.host;
+ if (alerts != null && alerts.length > 0) {
+ var alertGrid = $("#host_alert_grid_content").empty();
+ var length = (alerts.length>=4) ? 4 : alerts.length;
+ for (var i = 0; i < length; i++) {
+ var errorTemplate = $("#recent_error_template").clone(true);
+ errorTemplate.find("#db_error_type").text("Host - Alert State");
+ errorTemplate.find("#db_error_msg").append("Host - " + sanitizeXSS(alerts[i].name) + " has been detected in Alert state.");
+ setDateField(alerts[i].disconnected, errorTemplate.find("#db_error_date"));
+ alertGrid.append(errorTemplate.show());
+ }
+ }
+ }
+ });
+
+ $("#alert_more").bind("click", function(event) {
+ event.preventDefault();
+
+ $("#menutab_role_root #menutab_events").data("showEvents", false).click();
+ });
+ $("#host_alert_more").bind("click", function(event) {
+ event.preventDefault();
+ $("#menutab_hosts").click();
+ });
+
+ $("#tab_dashboard_user, #tab_dashboard_domain, #loading_gridtable").hide();
+ $("#tab_dashboard_root").show();
+ $("#menutab_role_user").hide();
+ $("#menutab_role_root").show();
+ $("#menutab_role_domain").hide();
+ $("#launch_test").show();
+ } else if (isDomainAdmin()) {
+ var thisTab = $("#tab_dashboard_domain");
+ $("#tab_dashboard_user, #tab_dashboard_root, #loading_gridtable").hide();
+ thisTab.show();
+ $("#menutab_role_user").hide();
+ $("#menutab_role_root").hide();
+ $("#menutab_role_domain").show();
+ $("#launch_test").hide();
+
+ // Need to use/create better API for this as there is a limit of pageSize
+ // to list count.
+ $.ajax({
+ data: createURL("command=listVirtualMachines&response=json"+maxPageSize),
+ dataType: "json",
+ success: function(json) {
+ if (json.listvirtualmachinesresponse.virtualmachine != undefined)
+ thisTab.find("#dashboard_instances").text(json.listvirtualmachinesresponse.virtualmachine.length);
+ }
+ });
+ $.ajax({
+ data: createURL("command=listVolumes&response=json"+maxPageSize),
+ dataType: "json",
+ success: function(json) {
+ if (json.listvolumesresponse.volume)
+ thisTab.find("#dashboard_volumes").text(json.listvolumesresponse.volume.length);
+ }
+ });
+ $.ajax({
+ data: createURL("command=listSnapshots&response=json"+maxPageSize),
+ dataType: "json",
+ success: function(json) {
+ if (json.listsnapshotsresponse.snapshot)
+ thisTab.find("#dashboard_snapshots").text(json.listsnapshotsresponse.snapshot.length);
+ }
+ });
+ $.ajax({
+ data: createURL("command=listAccounts&response=json"+maxPageSize),
+ dataType: "json",
+ success: function(json) {
+ if (json.listaccountsresponse.account)
+ thisTab.find("#dashboard_accounts").text(json.listaccountsresponse.account.length);
+ }
+ });
+ $.ajax({
+ data: createURL("command=listEvents&level=ERROR&response=json"),
+ dataType: "json",
+ success: function(json) {
+ var events = json.listeventsresponse.event;
+ if (events != null && events.length > 0) {
+ var errorGrid = thisTab.find("#error_grid_content").empty();
+ var length = (events.length>=3) ? 3 : events.length;
+ for (var i = 0; i < length; i++) {
+ var errorTemplate = $("#recent_error_template").clone(true);
+ errorTemplate.find("#db_error_type").text(events[i].type);
+ errorTemplate.find("#db_error_msg").text(sanitizeXSS(events[i].description));
+ setDateField(events[i].created, errorTemplate.find("#db_error_date"));
+ errorGrid.append(errorTemplate.show());
+ }
+ }
+ }
+ });
+ } else if(isUser()) {
+ $("#launch_test").hide();
+ $.ajax({
+ cache: false,
+ data: createURL("command=listAccounts&response=json"),
+ dataType: "json",
+ success: function(json) {
+ var accounts = json.listaccountsresponse.account;
+ if (accounts != null && accounts.length > 0) {
+ var statJSON = accounts[0];
+ var sent = parseInt(statJSON.sentbytes);
+ var rec = parseInt(statJSON.receivedbytes);
+
+ if(sent==0 && rec==0)
+ $("#network_bandwidth_panel").hide();
+ else
+ $("#network_bandwidth_panel").show();
+
+ $("#menutab_role_user").show();
+ $("#menutab_role_root").hide();
+ $("#menutab_role_domain").hide();
+ $("#tab_dashboard_user").show();
+ $("#tab_dashboard_root, #tab_dashboard_domain, #loading_gridtable").hide();
+
+ // This is in bytes, so let's change to KB
+ sent = Math.round(sent / 1024);
+ rec = Math.round(rec / 1024);
+ $("#db_sent").text(sent + "KB");
+ $("#db_received").text(rec + "KB");
+ $("#db_available_public_ips").text(statJSON.ipavailable);
+ $("#db_owned_public_ips").text(statJSON.iptotal);
+ $("#db_running_vms").text(statJSON.vmrunning + " VM(s)");
+ $("#db_stopped_vms").text(statJSON.vmstopped + " VM(s)");
+ $("#db_total_vms").text(statJSON.vmtotal + " VM(s)");
+ $("#db_avail_vms").text(statJSON.vmavailable + " VM(s)");
+ $("#db_account_id").text(statJSON.id);
+ $("#db_account").text(statJSON.name);
+ $("#db_type").text(toRole(statJSON.accounttype));
+ $("#db_domain").text(statJSON.domain);
+ }
+
+ // Events
+ $.ajax({
+ data: createURL("command=listEvents&level=ERROR&response=json"),
+ dataType: "json",
+ success: function(json) {
+ var events = json.listeventsresponse.event;
+ if (events != null && events.length > 0) {
+ var errorGrid = $("#error_grid_content").empty();
+ var length = (events.length>=3) ? 3 : events.length;
+ for (var i = 0; i < length; i++) {
+ var errorTemplate = $("#recent_error_template").clone(true);
+ errorTemplate.find("#db_error_type").text(events[i].type);
+ errorTemplate.find("#db_error_msg").text(sanitizeXSS(events[i].description));
+ setDateField(events[i].created, errorTemplate.find("#db_error_date"));
+ errorGrid.append(errorTemplate.show());
+ }
+ }
+ }
+ });
+ },
+ beforeSend: function(XMLHttpRequest) {
+ return true;
+ }
+ });
+ } else { //no role
+ logout(false);
+ return;
+ }
+ });
+ }
+
+ // Check whether the session is valid.
+ g_mySession = $.cookie("JSESSIONID");
+ g_sessionKey = $.cookie("sessionKey");
+ g_role = $.cookie("role");
+ g_username = $.cookie("username");
+ g_account = $.cookie("account");
+ g_domainid = $.cookie("domainid");
+ g_networkType = $.cookie("networktype");
+ g_hypervisorType = $.cookie("hypervisortype");
+ g_timezone = $.cookie("timezone");
+ g_directAttachNetworkGroupsEnabled = $.cookie("directattachnetworkgroupsenabled");
+ g_directAttachedUntaggedEnabled = $.cookie("directattacheduntaggedenabled");
+ g_systemVmUseLocalStorage = $.cookie("systemvmuselocalstorage");
+
+ if($.cookie("timezoneoffset") != null)
+ g_timezoneoffset = isNaN($.cookie("timezoneoffset"))?null: parseFloat($.cookie("timezoneoffset"));
+ else
+ g_timezoneoffset = null;
+
+ if (!g_networkType || g_networkType.length == 0)
+ g_networkType = "vnet";
+
+ if (!g_hypervisorType || g_hypervisorType.length == 0)
+ g_hypervisorType = "kvm";
+
+ if (!g_directAttachNetworkGroupsEnabled || g_directAttachNetworkGroupsEnabled.length == 0)
+ g_directAttachNetworkGroupsEnabled = "false";
+
+ if (!g_directAttachedUntaggedEnabled || g_directAttachedUntaggedEnabled.length == 0)
+ g_directAttachedUntaggedEnabled = "false";
+
+ if (!g_systemVmUseLocalStorage || g_systemVmUseLocalStorage.length == 0)
+ g_systemVmUseLocalStorage = "false";
+
+ $.ajax({
+ data: createURL("command=listZones&available=true&response=json"),
+ dataType: "json",
+ async: false,
+ success: function(json) {
+ // session is valid, continue
+ if (isUser()) {
+ $("#menutab_role_user #menutab_dashboard_user").click();
+ } else if (isAdmin()) {
+ $("#menutab_role_root #menutab_dashboard_root").click();
+ } else if (isDomainAdmin()) {
+ $("#menutab_role_domain #menutab_dashboard_domain").click();
+ } else {
+ logout(false);
+ }
+ },
+ error: function(xmlHTTP) {
+ logout(false);
+ },
+ beforeSend: function(xmlHTTP) {
+ return true;
+ }
+ });
+});
+
diff --git a/ui/new/scripts/cloud.core.instance.js b/ui/new/scripts/cloud.core.instance.js
new file mode 100755
index 00000000000..e5d41b4e533
--- /dev/null
+++ b/ui/new/scripts/cloud.core.instance.js
@@ -0,0 +1,1100 @@
+function clickInstanceGroupHeader($arrowIcon) {
+ //***** VM Detail (begin) ******************************************************************************
+ var $vmPopup
+ var $rightPanelHeader;
+ var $rightPanelContent;
+ var $instanceGroupContainer = $("#leftmenu_instance_group_container");
+ var $instanceGroupTemplate = $("#leftmenu_instance_group_template");
+
+ var $actionLink = $("#action_link");
+ var $actionMenu = $("#action_menu");
+ var $actionList = $actionMenu.find("#action_list");
+ var $midmenuContainer = $("#midmenu_container");
+ var $midmenuItemVm = $("#midmenu_item_vm");
+ var $actionListItem = $("#action_list_item");
+
+ var noGroupName = "(no group name)";
+
+ var listAPIMap = {
+ listAPI: "listVirtualMachines",
+ listAPIResponse: "listvirtualmachinesresponse",
+ listAPIResponseObj: "virtualmachine"
+ };
+
+ var actionMap = {
+ "Stop Instance": {
+ api: "stopVirtualMachine",
+ isAsyncJob: true,
+ asyncJobResponse: "stopvirtualmachineresponse",
+ afterActionSeccessFn: setMidmenuItemVm
+ },
+ "Start Instance": {
+ api: "startVirtualMachine",
+ isAsyncJob: true,
+ asyncJobResponse: "startvirtualmachineresponse",
+ afterActionSeccessFn: setMidmenuItemVm
+ },
+ "Reboot Instance": {
+ api: "rebootVirtualMachine",
+ isAsyncJob: true,
+ asyncJobResponse: "rebootvirtualmachineresponse",
+ afterActionSeccessFn: setMidmenuItemVm
+ },
+ "Destroy Instance": {
+ api: "destroyVirtualMachine",
+ isAsyncJob: true,
+ asyncJobResponse: "destroyvirtualmachineresponse",
+ afterActionSeccessFn: setMidmenuItemVm
+ },
+ "Restore Instance": {
+ api: "recoverVirtualMachine",
+ isAsyncJob: false,
+ afterActionSeccessFn: setMidmenuItemVm
+ },
+ "Attach ISO": {
+ isAsyncJob: true,
+ asyncJobResponse: "attachisoresponse",
+ dialogBeforeActionFn : doAttachISO,
+ afterActionSeccessFn: setMidmenuItemVm
+ },
+ "Detach ISO": {
+ isAsyncJob: true,
+ asyncJobResponse: "detachisoresponse",
+ dialogBeforeActionFn : doDetachISO,
+ afterActionSeccessFn: setMidmenuItemVm
+ },
+ "Reset Password": {
+ isAsyncJob: true,
+ asyncJobResponse: "resetpasswordforvirtualmachineresponse",
+ dialogBeforeActionFn : doResetPassword,
+ afterActionSeccessFn: function(){}
+ },
+ "Change Name": {
+ isAsyncJob: false,
+ dialogBeforeActionFn : doChangeName,
+ afterActionSeccessFn: setMidmenuItemVm
+ },
+ "Change Service": {
+ isAsyncJob: true,
+ asyncJobResponse: "changeserviceforvirtualmachineresponse",
+ dialogBeforeActionFn : doChangeService,
+ afterActionSeccessFn: setMidmenuItemVm
+ }
+ }
+
+ function doAttachISO($t, selectedItemIds, listAPIMap) {
+ $.ajax({
+ data: createURL("command=listIsos&isReady=true"),
+ dataType: "json",
+ async: false,
+ success: function(json) {
+ var isos = json.listisosresponse.iso;
+ var isoSelect = $("#dialog_attach_iso #attach_iso_select");
+ if (isos != null && isos.length > 0) {
+ isoSelect.empty();
+ for (var i = 0; i < isos.length; i++) {
+ isoSelect.append(""+sanitizeXSS(isos[i].displaytext)+" ");;
+ }
+ }
+ }
+ });
+
+ $("#dialog_attach_iso")
+ .dialog('option', 'buttons', {
+ "Confirm": function() {
+ $(this).dialog("close");
+ var isoId = $("#dialog_attach_iso #attach_iso_select").val();
+ if (isoId == "none") {
+ $("#dialog_alert").html("There is no ISO file to attach to the virtual machine.
");
+ $("#dialog_alert").dialog("open");
+ return false;
+ }
+ for(var id in selectedItemIds) {
+ var apiCommand = "command=attachIso&virtualmachineid="+id+"&id="+isoId;
+ doAction(id, $t, apiCommand, listAPIMap);
+ }
+ },
+ "Cancel": function() {
+ $(this).dialog("close");
+ }
+ }).dialog("open");
+ }
+
+ function doDetachISO($t, selectedItemIds, listAPIMap) {
+ $("#dialog_confirmation")
+ .html("Please confirm you want to detach an ISO from the virtual machine(s)
")
+ .dialog('option', 'buttons', {
+ "Confirm": function() {
+ $(this).dialog("close");
+ for(var id in selectedItemIds) {
+ var apiCommand = "command=detachIso&virtualmachineid="+id;
+ doAction(id, $t, apiCommand, listAPIMap);
+ }
+ },
+ "Cancel": function() {
+ $(this).dialog("close");
+ }
+ }).dialog("open");
+ }
+
+ function doResetPassword($t, selectedItemIds, listAPIMap) {
+ $("#dialog_confirmation")
+ .html("Please confirm you want to change the ROOT password for your virtual machine(s)
")
+ .dialog('option', 'buttons', {
+ "Confirm": function() {
+ $(this).dialog("close");
+ for(var id in selectedItemIds) {
+ var $midMenuItem = selectedItemIds[id];
+ var jsonObj = $midMenuItem.data("jsonObj");
+ if(jsonObj.state != "Stopped") {
+ $midMenuItem.find("#info_icon").addClass("error").show();
+ $midMenuItem.data("afterActionInfo", ($t.data("label") + " action failed. Reason: This instance needs to be stopped before you can reset password"));
+ continue;
+ }
+ if(jsonObj.passwordEnabled != "true") {
+ $midMenuItem.find("#info_icon").addClass("error").show();
+ $midMenuItem.data("afterActionInfo", ($t.data("label") + " action failed. Reason: This instance is not using a template that has the password reset feature enabled. If you have forgotten your root password, please contact support."));
+ continue;
+ }
+ var apiCommand = "command=resetPasswordForVirtualMachine&id="+id;
+ doAction(id, $t, apiCommand, listAPIMap);
+ }
+ },
+ "Cancel": function() {
+ $(this).dialog("close");
+ }
+ }).dialog("open");
+ }
+
+ function doChangeName($t, selectedItemIds, listAPIMap) {
+ $("#dialog_change_name")
+ .dialog('option', 'buttons', {
+ "Confirm": function() {
+ var thisDialog = $(this);
+ thisDialog.dialog("close");
+
+ // validate values
+ var isValid = true;
+ isValid &= validateString("Name", thisDialog.find("#change_instance_name"), thisDialog.find("#change_instance_name_errormsg"));
+ if (!isValid) return;
+
+ var name = trim(thisDialog.find("#change_instance_name").val());
+
+ for(var id in selectedItemIds) {
+ var apiCommand = "command=updateVirtualMachine&id="+id+"&displayName="+encodeURIComponent(escape(name));
+ doAction(id, $t, apiCommand, listAPIMap);
+ }
+ },
+ "Cancel": function() {
+ $(this).dialog("close");
+ }
+ }).dialog("open");
+ }
+
+ function doChangeService($t, selectedItemIds, listAPIMap) {
+ $.ajax({
+ //data: createURL("command=listServiceOfferings&VirtualMachineId="+vmId), //can not specifiy VirtualMachineId since we allow multiple-item-selection.
+ data: createURL("command=listServiceOfferings"), //can not specifiy VirtualMachineId since we support multiple-item-selection.
+ dataType: "json",
+ success: function(json) {
+ var offerings = json.listserviceofferingsresponse.serviceoffering;
+ var offeringSelect = $("#dialog_change_service_offering #change_service_offerings").empty();
+
+ if (offerings != null && offerings.length > 0) {
+ for (var i = 0; i < offerings.length; i++) {
+ var option = $("" + sanitizeXSS(unescape(offerings[i].displaytext)) + " ").data("name", sanitizeXSS(unescape(offerings[i].name)));
+ offeringSelect.append(option);
+ }
+ }
+ }
+ });
+
+ $("#dialog_change_service_offering")
+ .dialog('option', 'buttons', {
+ "Change": function() {
+ var thisDialog = $(this);
+ thisDialog.dialog("close");
+
+ for(var id in selectedItemIds) {
+ var $midMenuItem = selectedItemIds[id];
+ var jsonObj = $midMenuItem.data("jsonObj");
+ if(jsonObj.state != "Stopped") {
+ $midMenuItem.find("#info_icon").addClass("error").show();
+ $midMenuItem.data("afterActionInfo", ($t.data("label") + " action failed. Reason: virtual instance needs to be stopped before you can change its service."));
+ continue;
+ }
+ var apiCommand = "command=changeServiceForVirtualMachine&id="+id+"&serviceOfferingId="+thisDialog.find("#change_service_offerings").val();
+ doAction(id, $t, apiCommand, listAPIMap);
+ }
+ },
+ "Cancel": function() {
+ $(this).dialog("close");
+ }
+ }).dialog("open");
+ }
+
+
+ function updateVirtualMachineStateInRightPanel(state) {
+ if(state == "Running")
+ $rightPanelContent.find("#state").text(state).removeClass("red gray").addClass("green");
+ else if(state == "Stopped")
+ $rightPanelContent.find("#state").text(state).removeClass("green gray").addClass("red");
+ else //Destroyed, Creating, ~
+ $rightPanelContent.find("#state").text(state).removeClass("green red").addClass("gray");
+ }
+
+ function updateVirtualMachineStateInMidMenu(jsonObj, midmenuItem) {
+ if(jsonObj.state == "Running")
+ midmenuItem.find("#status_icon").attr("src", "images/status_green.png");
+ else if(jsonObj.state == "Stopped")
+ midmenuItem.find("#status_icon").attr("src", "images/status_red.png");
+ else //Destroyed, Creating, ~
+ midmenuItem.find("#status_icon").attr("src", "images/status_gray.png");
+ }
+
+ function setMidmenuItemVm(instance, $midmenuItemVm1) {
+ $midmenuItemVm1.data("jsonObj", instance);
+ $midmenuItemVm1.data("toRightPanelFn", vmMidmenuItemToRightPanel);
+ $midmenuItemVm1.attr("id", ("midmenuItemVm_"+instance.id));
+ $midmenuItemVm1.data("id", instance.id);
+ var vmName = getVmName(instance.name, instance.displayname);
+ $midmenuItemVm1.find("#vm_name").text(vmName);
+ $midmenuItemVm1.find("#ip_address").text(instance.ipaddress);
+ updateVirtualMachineStateInMidMenu(instance, $midmenuItemVm1);
+ $midmenuItemVm1.bind("click", function(event) {
+ var $t = $(this);
+ vmMidmenuItemToRightPanel($t);
+ return false;
+ });
+ }
+
+ function vmClearRightPanel(jsonObj) {
+ $rightPanelHeader.find("#vm_name").text("");
+ updateVirtualMachineStateInRightPanel("");
+ $rightPanelContent.find("#ipAddress").text("");
+ $rightPanelContent.find("#zoneName").text("");
+ $rightPanelContent.find("#templateName").text("");
+ $rightPanelContent.find("#serviceOfferingName").text("");
+ $rightPanelContent.find("#ha").hide();
+ $rightPanelContent.find("#created").text("");
+ $rightPanelContent.find("#account").text("");
+ $rightPanelContent.find("#domain").text("");
+ $rightPanelContent.find("#hostName").text("");
+ $rightPanelContent.find("#group").text("");
+ $rightPanelContent.find("#iso").hide();
+ }
+
+ function vmMidmenuItemToRightPanel($t) {
+ if($t.find("#info_icon").css("display") != "none") {
+ $rightPanelContent.find("#after_action_info").text($t.data("afterActionInfo"));
+ if($t.find("#info_icon").hasClass("error"))
+ $rightPanelContent.find("#after_action_info_container").addClass("errorbox");
+ else
+ $rightPanelContent.find("#after_action_info_container").removeClass("errorbox");
+ $rightPanelContent.find("#after_action_info_container").show();
+ }
+ else {
+ $rightPanelContent.find("#after_action_info").text("");
+ $rightPanelContent.find("#after_action_info_container").hide();
+ }
+
+ var jsonObj = $t.data("jsonObj");
+ var vmName = getVmName(jsonObj.name, jsonObj.displayname);
+ $rightPanelHeader.find("#vm_name").text(vmName);
+ updateVirtualMachineStateInRightPanel(jsonObj.state);
+ $rightPanelContent.find("#ipAddress").text(jsonObj.ipaddress);
+ $rightPanelContent.find("#zoneName").text(jsonObj.zonename);
+ $rightPanelContent.find("#templateName").text(jsonObj.templatename);
+ $rightPanelContent.find("#serviceOfferingName").text(jsonObj.serviceofferingname);
+ if(jsonObj.haenable == "true")
+ $rightPanelContent.find("#ha").removeClass("cross_icon").addClass("tick_icon").show();
+ else
+ $rightPanelContent.find("#ha").removeClass("tick_icon").addClass("cross_icon").show();
+ $rightPanelContent.find("#created").text(jsonObj.created);
+ $rightPanelContent.find("#account").text(jsonObj.account);
+ $rightPanelContent.find("#domain").text(jsonObj.domain);
+ $rightPanelContent.find("#hostName").text(jsonObj.hostname);
+ $rightPanelContent.find("#group").text(jsonObj.group);
+ if(jsonObj.isoid != null && jsonObj.isoid.length > 0)
+ $rightPanelContent.find("#iso").removeClass("cross_icon").addClass("tick_icon").show();
+ else
+ $rightPanelContent.find("#iso").removeClass("tick_icon").addClass("cross_icon").show();
+ }
+
+
+
+ $("#add_link").show();
+ if($arrowIcon.hasClass("close") == true) {
+ $arrowIcon.removeClass("close").addClass("open");
+ $.ajax({
+ cache: false,
+ data: createURL("command=listVirtualMachines"),
+ dataType: "json",
+ success: function(json) {
+ var instanceGroupMap = {};
+ var instanceGroupArray = [];
+ var instances = json.listvirtualmachinesresponse.virtualmachine;
+ if (instances != null && instances.length > 0) {
+ for (var i = 0; i < instances.length; i++) {
+ var group1 = instances[i].group;
+ if(group1 == null || group1.length == 0)
+ group1 = noGroupName;
+ if(group1 in instanceGroupMap) {
+ instanceGroupMap[group1].push(instances[i]);
+ }
+ else {
+ instanceGroupMap[group1] = [instances[i]];
+ instanceGroupArray.push(group1);
+ }
+ }
+ }
+ for(var i=0; i < instanceGroupArray.length; i++) {
+ if(instanceGroupArray[i]!=null && instanceGroupArray[i].length>0) {
+ var $groupTemplate = $instanceGroupTemplate.clone().show();
+ $groupTemplate.find("#group_name").text(instanceGroupArray[i]);
+
+ $groupTemplate.bind("click", function(event) {
+ //$(this).removeClass("leftmenu_content").addClass("leftmenu_content_selected");
+ $("#midmenu_container").empty();
+ var groupName = $(this).find("#group_name").text();
+
+ $.ajax({
+ cache: false,
+ data: createURL("command=listVirtualMachines"),
+ dataType: "json",
+ success: function(json) {
+ var instances = json.listvirtualmachinesresponse.virtualmachine;
+ for(var i=0; i 0) {
+ for (var i = 0; i < zones.length; i++) {
+ $zoneSelect.append("" + sanitizeXSS(zones[i].name) + " ");
+ }
+ }
+ listTemplatesInVmPopup();
+ }
+ });
+
+ $.ajax({
+ data: createURL("command=listServiceOfferings"),
+ dataType: "json",
+ async: false,
+ success: function(json) {
+ var offerings = json.listserviceofferingsresponse.serviceoffering;
+ var $container = $("#service_offering_container");
+ $container.empty();
+
+ //var checked = "checked";
+ if (offerings != null && offerings.length > 0) {
+ for (var i = 0; i < offerings.length; i++) {
+ //if (i != 0)
+ // checked = "";
+
+ var $t = $serviceOfferingTemplate.clone();
+ $t.find("input:radio[name=service_offering_radio]").val(offerings[i].id);
+ $t.find("#name").text(sanitizeXSS(unescape(offerings[i].name)));
+ $t.find("#description").text(sanitizeXSS(unescape(offerings[i].displaytext)));
+
+ if (i > 0)
+ $t.find("input:radio[name=service_offering_radio]").removeAttr("checked");
+
+ //if(i == 0)
+ // $t.find("input:radio[name=service_offering_radio]").attr("checked", true);
+ //var listItem = $(""+sanitizeXSS(unescape(offerings[i].displaytext))+" ");
+ $container.append($t.show());
+ }
+ //Safari and Chrome are not smart enough to make checkbox checked if html markup is appended by JQuery.append(). So, the following 2 lines are added.
+ var html_all = $container.html();
+ $container.html(html_all);
+ }
+ }
+ });
+
+
+ $.ajax({
+ data: createURL("command=listDiskOfferings&domainid=1"),
+ dataType: "json",
+ async: false,
+ success: function(json) {
+ var offerings = json.listdiskofferingsresponse.diskoffering;
+ var $dataDiskOfferingContainer = $("#data_disk_offering_container").empty();
+ var $rootDiskOfferingContainer = $("#root_disk_offering_container").empty();
+
+ //***** data disk offering: "no, thanks", "custom", existing disk offerings in database (begin) ****************************************************
+ //"no, thanks" radio button (default radio button in data disk offering)
+ var $t = $noDiskOfferingTemplate.clone();
+ $t.find("input:radio").attr("name","data_disk_offering_radio").val("no");
+ $t.find("#name").text("no, thanks");
+ $dataDiskOfferingContainer.append($t.show());
+
+ //"custom" radio button
+ var $t = $customDiskOfferingTemplate.clone();
+ $t.find("input:radio").attr("name","data_disk_offering_radio").val("custom").removeAttr("checked");
+ $t.find("#name").text("custom:");
+ $dataDiskOfferingContainer.append($t.show());
+
+ //existing disk offerings in database
+ if (offerings != null && offerings.length > 0) {
+ for (var i = 0; i < offerings.length; i++) {
+ var $t = $existingDiskOfferingTemplate.clone();
+ $t.find("input:radio").attr("name","data_disk_offering_radio").val(offerings[i].id).removeAttr("checked");
+ $t.find("#name").text(sanitizeXSS(unescape(noNull(offerings[i].name))));
+ $t.find("#description").text(sanitizeXSS(noNull(unescape(offerings[i].displaytext))));
+ $dataDiskOfferingContainer.append($t.show());
+ }
+ }
+
+ //Safari and Chrome are not smart enough to make checkbox checked if html markup is appended by JQuery.append(). So, the following 2 lines are added.
+ var html_all = $dataDiskOfferingContainer.html();
+ $dataDiskOfferingContainer.html(html_all);
+ //***** data disk offering: "no, thanks", "custom", existing disk offerings in database (end) *******************************************************
+
+ //***** root disk offering: "custom", existing disk offerings in database (begin) *******************************************************************
+ //"custom" radio button
+ var $t = $customDiskOfferingTemplate.clone();
+ $t.find("input:radio").attr("name","root_disk_offering_radio").val("custom");
+ if (offerings != null && offerings.length > 0) //default is the 1st existing disk offering. If there is no existing disk offering, default to "custom" radio button
+ $t.find("input:radio").removeAttr("checked");
+ $t.find("#name").text("custom:");
+ $rootDiskOfferingContainer.append($t.show());
+
+ //existing disk offerings in database
+ if (offerings != null && offerings.length > 0) {
+ for (var i = 0; i < offerings.length; i++) {
+ var $t = $existingDiskOfferingTemplate.clone();
+ $t.find("input:radio").attr("name","root_disk_offering_radio").val(offerings[i].id);
+ if(i > 0) //default is the 1st existing disk offering. If there is no existing disk offering, default to "custom" radio button
+ $t.find("input:radio").removeAttr("checked");
+ $t.find("#name").text(sanitizeXSS(unescape(noNull(offerings[i].name))));
+ $t.find("#description").text(sanitizeXSS(noNull(unescape(offerings[i].displaytext))));
+ $rootDiskOfferingContainer.append($t.show());
+ }
+ }
+
+ //Safari and Chrome are not smart enough to make checkbox checked if html markup is appended by JQuery.append(). So, the following 2 lines are added.
+ var html_all = $rootDiskOfferingContainer.html();
+ $rootDiskOfferingContainer.html(html_all);
+ //***** root disk offering: "custom", existing disk offerings in database (end) *********************************************************************
+
+
+
+
+ /*
+ $("#wizard_root_disk_offering, #wizard_data_disk_offering").empty();
+
+ var html =
+ ""
+ +" "
+ +"No disk offering "
+ +" ";
+ $("#wizard_data_disk_offering").append(html);
+
+ if (offerings != null && offerings.length > 0) {
+ for (var i = 0; i < offerings.length; i++) {
+ var html =
+ ""
+ +" "
+ +""+sanitizeXSS(unescape(offerings[i].displaytext))+" "
+ +" ";
+ $("#wizard_root_disk_offering").append(html);
+
+ var html2 =
+ ""
+ +" "
+ +""+sanitizeXSS(unescape(offerings[i].displaytext))+" "
+ +" ";
+ $("#wizard_data_disk_offering").append(html2);
+ }
+ //Safari and Chrome are not smart enough to make checkbox checked if html markup is appended by JQuery.append(). So, the following 2 lines are added.
+ var html_all = $("#wizard_root_disk_offering").html();
+ $("#wizard_root_disk_offering").html(html_all);
+
+ var html_all2 = $("#wizard_data_disk_offering").html();
+ $("#wizard_data_disk_offering").html(html_all2);
+ }
+ */
+
+
+ }
+ });
+
+
+ $vmPopup.find("#wizard_service_offering").click();
+ return false;
+ });
+
+
+ function vmWizardCleanup() {
+ currentStepInVmPopup = 1;
+ $vmPopup.find("#step1").show().nextAll().hide();
+ //$vmPopup.find("#prev_step").hide();
+ //$vmPopup.find("#next_step").show();
+ $vmPopup.find("#wizard_message").hide();
+ selectedTemplateTypeInVmPopup = "featured";
+ $("#wiz_featured").removeClass().addClass("rev_wizmid_selectedtempbut");
+ $("#wiz_my, #wiz_community, #wiz_blank").removeClass().addClass("rev_wizmid_nonselectedtempbut");
+ currentPageInTemplateGridInVmPopup = 1;
+ }
+
+ function vmWizardOpen() {
+ $("#overlay_black").show();
+ $vmPopup.show();
+ vmWizardCleanup();
+ }
+
+ function vmWizardClose() {
+ $vmPopup.hide();
+ $("#overlay_black").hide();
+ }
+
+
+ $vmPopup.find("#vm_wizard_close").bind("click", function(event) {
+ vmWizardClose();
+ return false;
+ });
+
+ $vmPopup.find("#step1 #wiz_message_continue").bind("click", function(event) {
+ $vmPopup.find("#step1 #wiz_message").hide();
+ return false;
+ });
+
+ $vmPopup.find("#step2 #wiz_message_continue").bind("click", function(event) {
+ $vmPopup.find("#step2 #wiz_message").hide();
+ return false;
+ });
+
+ function getIconForOS(osType) {
+ if (osType == null || osType.length == 0) {
+ return "";
+ } else {
+ if (osType.match("^CentOS") != null) {
+ return "rev_wiztemo_centosicons";
+ } else if (osType.match("^Windows") != null) {
+ return "rev_wiztemo_windowsicons";
+ } else {
+ return "rev_wiztemo_linuxicons";
+ }
+ }
+ }
+
+ //vm wizard search and pagination
+ $vmPopup.find("#search_button").bind("click", function(event) {
+ currentPageInTemplateGridInVmPopup = 1;
+ listTemplatesInVmPopup();
+ return false; //event.preventDefault() + event.stopPropagation()
+ });
+
+ $vmPopup.find("#search_input").bind("keypress", function(event) {
+ if(event.keyCode == keycode_Enter) {
+ $vmPopup.find("#search_button").click();
+ return false; //event.preventDefault() + event.stopPropagation()
+ }
+ });
+
+ $vmPopup.find("#nextPage").bind("click", function(event){
+ currentPageInTemplateGridInVmPopup++;
+ listTemplatesInVmPopup();
+ return false; //event.preventDefault() + event.stopPropagation()
+ });
+
+ $vmPopup.find("#prevPage").bind("click", function(event){
+ currentPageInTemplateGridInVmPopup--;
+ listTemplatesInVmPopup();
+ return false; //event.preventDefault() + event.stopPropagation()
+ });
+
+ var vmPopupStep2PageSize = 11; //max number of templates each page in step2 of New VM wizard is 11
+ function listTemplatesInVmPopup() {
+ var zoneId = $vmPopup.find("#wizard_zone").val();
+ if(zoneId == null || zoneId.length == 0)
+ return;
+
+ var container = $vmPopup.find("#template_container");
+
+ var commandString;
+ var searchInput = $vmPopup.find("#search_input").val();
+ if (selectedTemplateTypeInVmPopup != "blank") {
+ if (searchInput != null && searchInput.length > 0)
+ commandString = "command=listTemplates&templatefilter="+selectedTemplateTypeInVmPopup+"&zoneid="+zoneId+"&keyword="+searchInput+"&page="+currentPageInTemplateGridInVmPopup;
+ else
+ commandString = "command=listTemplates&templatefilter="+selectedTemplateTypeInVmPopup+"&zoneid="+zoneId+"&page="+currentPageInTemplateGridInVmPopup;
+ } else {
+ if (searchInput != null && searchInput.length > 0)
+ commandString = "command=listIsos&isReady=true&bootable=true&zoneid="+zoneId+"&keyword="+searchInput+"&page="+currentPageInTemplateGridInVmPopup;
+ else
+ commandString = "command=listIsos&isReady=true&bootable=true&zoneid="+zoneId+"&page="+currentPageInTemplateGridInVmPopup;
+ }
+
+ var loading = $vmPopup.find("#wiz_template_loading").show();
+ if(currentPageInTemplateGridInVmPopup==1)
+ $vmPopup.find("#prevPage").hide();
+ else
+ $vmPopup.find("#prevPage").show();
+
+ $.ajax({
+ data: createURL(commandString),
+ dataType: "json",
+ async: false,
+ success: function(json) {
+ var items;
+ if (selectedTemplateTypeInVmPopup != "blank")
+ items = json.listtemplatesresponse.template;
+ else
+ items = json.listisosresponse.iso;
+ loading.hide();
+ container.empty();
+ if (items != null && items.length > 0) {
+ var first = true;
+ for (var i = 0; i < items.length; i++) {
+ var divClass = "rev_wiztemplistbox";
+ if (first) {
+ divClass = "rev_wiztemplistbox_selected";
+ first = false;
+ }
+
+ var html = ''
+ +'
'
+ +'
'+sanitizeXSS(items[i].displaytext)+'
'
+ +'
'+sanitizeXSS(items[i].account)+'
'
+ +'
';
+ container.append(html);
+ }
+ if(items.length < vmPopupStep2PageSize)
+ $vmPopup.find("#nextPage").hide();
+ else
+ $vmPopup.find("#nextPage").show();
+
+ } else {
+ var msg;
+ if (selectedTemplateTypeInVmPopup != "blank")
+ msg = "No templates available";
+ else
+ msg = "No ISOs available";
+ var html = ''
+ +'
'
+ +'
'+msg+'
'
+ +'
';
+ container.append(html);
+ $vmPopup.find("#nextPage").hide();
+ }
+ }
+ });
+ }
+
+ $vmPopup.find("#template_container").bind("click", function(event) {
+ var container = $(this);
+ var target = $(event.target);
+ var parent = target.parent();
+ if (parent.hasClass("rev_wiztemplistbox_selected") || parent.hasClass("rev_wiztemplistbox")) {
+ target = parent;
+ }
+ if (target.attr("id") != "-2") {
+ if (target.hasClass("rev_wiztemplistbox")) {
+ container.find(".rev_wiztemplistbox_selected").removeClass().addClass("rev_wiztemplistbox");
+ target.removeClass().addClass("rev_wiztemplistbox_selected");
+ } else if (target.hasClass("rev_wiztemplistbox_selected")) {
+ target.removeClass().addClass("rev_wiztemplistbox");
+ }
+ }
+ });
+
+ $vmPopup.find("#wizard_zone").bind("change", function(event) {
+ var selectedZone = $(this).val();
+ if(selectedZone != null && selectedZone.length > 0)
+ listTemplatesInVmPopup();
+ return false;
+ });
+
+
+ function displayDiskOffering(type) {
+ if(type=="data") {
+ $vmPopup.find("#wizard_data_disk_offering_title").show();
+ $vmPopup.find("#wizard_data_disk_offering").show();
+ $vmPopup.find("#wizard_root_disk_offering_title").hide();
+ $vmPopup.find("#wizard_root_disk_offering").hide();
+ }
+ else if(type=="root") {
+ $vmPopup.find("#wizard_root_disk_offering_title").show();
+ $vmPopup.find("#wizard_root_disk_offering").show();
+ $vmPopup.find("#wizard_data_disk_offering_title").hide();
+ $vmPopup.find("#wizard_data_disk_offering").hide();
+ }
+ }
+ displayDiskOffering("data"); //because default value of "#wiz_template_filter" is "wiz_featured"
+
+
+ // Setup the left template filters
+ $vmPopup.find("#wiz_template_filter").unbind("click").bind("click", function(event) {
+ var $container = $(this);
+ var target = $(event.target);
+ var targetId = target.attr("id");
+ selectedTemplateTypeInVmPopup = "featured";
+ switch (targetId) {
+ case "wiz_featured":
+ $vmPopup.find("#search_input").val("");
+ currentPageInTemplateGridInVmPopup = 1;
+ selectedTemplateTypeInVmPopup = "featured";
+ $container.find("#wiz_featured").removeClass().addClass("rev_wizmid_selectedtempbut");
+ $container.find("#wiz_my, #wiz_community, #wiz_blank").removeClass().addClass("rev_wizmid_nonselectedtempbut");
+ displayDiskOffering("data");
+ break;
+ case "wiz_my":
+ $vmPopup.find("#search_input").val("");
+ currentPageInTemplateGridInVmPopup = 1;
+ $container.find("#wiz_my").removeClass().addClass("rev_wizmid_selectedtempbut");
+ $container.find("#wiz_featured, #wiz_community, #wiz_blank").removeClass().addClass("rev_wizmid_nonselectedtempbut");
+ selectedTemplateTypeInVmPopup = "selfexecutable";
+ displayDiskOffering("data");
+ break;
+ case "wiz_community":
+ $vmPopup.find("#search_input").val("");
+ currentPageInTemplateGridInVmPopup = 1;
+ $container.find("#wiz_community").removeClass().addClass("rev_wizmid_selectedtempbut");
+ $container.find("#wiz_my, #wiz_featured, #wiz_blank").removeClass().addClass("rev_wizmid_nonselectedtempbut");
+ selectedTemplateTypeInVmPopup = "community";
+ displayDiskOffering("data");
+ break;
+ case "wiz_blank":
+ $vmPopup.find("#search_input").val("");
+ currentPageInTemplateGridInVmPopup = 1;
+ $container.find("#wiz_blank").removeClass().addClass("rev_wizmid_selectedtempbut");
+ $container.find("#wiz_my, #wiz_community, #wiz_featured").removeClass().addClass("rev_wizmid_nonselectedtempbut");
+ selectedTemplateTypeInVmPopup = "blank";
+ displayDiskOffering("root");
+ break;
+ }
+ listTemplatesInVmPopup();
+ return false;
+ });
+
+ $vmPopup.find("#next_step").bind("click", function(event) {
+ event.preventDefault();
+ event.stopPropagation();
+ var $thisPopup = $vmPopup;
+ if (currentStepInVmPopup == 1) { //select a template
+ // prevent a person from moving on if no templates are selected
+// if($thisPopup.find("#step1 #template_container .rev_wiztemplistbox_selected").length == 0) {
+// $thisPopup.find("#step1 #wiz_message").show();
+// return false;
+// }
+
+ if ($thisPopup.find("#wiz_blank").hasClass("rev_wizmid_selectedtempbut")) { //ISO
+ $thisPopup.find("#step3_label").text("Root Disk Offering");
+ $thisPopup.find("#root_disk_offering_container").show();
+ $thisPopup.find("#data_disk_offering_container").hide();
+ } else { //template
+ $thisPopup.find("#step3_label").text("Data Disk Offering");
+ $thisPopup.find("#data_disk_offering_container").show();
+ $thisPopup.find("#root_disk_offering_container").hide();
+ }
+
+ $thisPopup.find("#wizard_review_zone").text($thisPopup.find("#wizard_zone option:selected").text());
+ $thisPopup.find("#wizard_review_template").text($thisPopup.find("#step1 .rev_wiztemplistbox_selected .rev_wiztemp_listtext").text());
+
+// $thisPopup.find("#wizard_review_service_offering").text($thisPopup.find("#wizard_service_offering input[name=service]:checked").next().text());
+// $thisPopup.find("#wizard_review_zone").text($thisPopup.find("#wizard_zone option:selected").text());
+// $thisPopup.find("#wizard_review_name").text($thisPopup.find("#wizard_vm_name").val());
+// $thisPopup.find("#wizard_review_group").text($thisPopup.find("#wizard_vm_group").val());
+//
+// if($thisPopup.find("#wizard_network_groups_container").css("display") != "none" && $thisPopup.find("#wizard_network_groups").val() != null) {
+// var networkGroupList = $thisPopup.find("#wizard_network_groups").val().join(",");
+// $thisPopup.find("#wizard_review_network_groups_p").show();
+// $thisPopup.find("#wizard_review_network_groups").text(networkGroupList);
+// } else {
+// $thisPopup.find("#wizard_review_network_groups_p").hide();
+// $thisPopup.find("#wizard_review_network_groups").text("");
+// }
+
+
+ }
+
+ if (currentStepInVmPopup == 2) { //service offering
+ // prevent a person from moving on if no service offering is selected
+// if($thisPopup.find("input:radio[name=service_offering_radio]:checked").length == 0) {
+// $thisPopup.find("#step2 #wiz_message #wiz_message_text").text("Please select a service offering to continue");
+// $thisPopup.find("#step2 #wiz_message").show();
+// return false;
+// }
+
+ $thisPopup.find("#wizard_review_service_offering").text($thisPopup.find("input:radio[name=service_offering_radio]:checked").next().text());
+
+ }
+
+ if(currentStepInVmPopup ==3) { //disk offering
+ /*
+ // validate values
+ var isValid = true;
+ isValid &= validateString("Name", $thisPopup.find("#wizard_vm_name"), $thisPopup.find("#wizard_vm_name_errormsg"), true);
+ isValid &= validateString("Group", $thisPopup.find("#wizard_vm_group"), $thisPopup.find("#wizard_vm_group_errormsg"), true);
+ if (!isValid) return;
+ */
+
+ /*
+ // prevent a person from moving on if no radio button is selected
+ if($thisPopup.find("input:radio[name=disk_offering_radio]:checked").length == 0) {
+ $thisPopup.find("#step2 #wiz_message #wiz_message_text").text("Please select a disk offering to continue");
+ $thisPopup.find("#step2 #wiz_message").show();
+ return false;
+ }
+ */
+
+ if($thisPopup.find("#wiz_blank").hasClass("rev_wizmid_selectedtempbut")) { //ISO
+ $thisPopup.find("#wizard_review_disk_offering_label").text("Root Disk Offering:");
+ $thisPopup.find("#wizard_review_disk_offering").text($thisPopup.find("#root_disk_offering_container input[name=root_disk_offering_radio]:checked").next().text());
+ }
+ else { //template
+ $thisPopup.find("#wizard_review_disk_offering_label").text("Data Disk Offering:");
+ $thisPopup.find("#wizard_review_disk_offering").text($thisPopup.find("#data_disk_offering_container input[name=data_disk_offering_radio]:checked").next().text());
+ }
+ }
+
+ if (currentStepInVmPopup == 4) { //network
+
+ }
+
+ if (currentStepInVmPopup == 5) { //last step
+ // Create a new VM!!!!
+ var moreCriteria = [];
+ moreCriteria.push("&zoneId="+$thisPopup.find("#wizard_zone").val());
+
+ var name = trim($thisPopup.find("#wizard_vm_name").val());
+ if (name != null && name.length > 0)
+ moreCriteria.push("&displayname="+encodeURIComponent(name));
+
+ var group = trim($thisPopup.find("#wizard_vm_group").val());
+ if (group != null && group.length > 0)
+ moreCriteria.push("&group="+encodeURIComponent(group));
+
+ /*
+ if($thisPopup.find("#wizard_network_groups_container").css("display") != "none" && $thisPopup.find("#wizard_network_groups").val() != null) {
+ var networkGroupList = $thisPopup.find("#wizard_network_groups").val().join(",");
+ moreCriteria.push("&networkgrouplist="+encodeURIComponent(networkGroupList));
+ }
+ */
+ moreCriteria.push("&templateId="+$thisPopup.find("#step1 .rev_wiztemplistbox_selected").attr("id"));
+
+ moreCriteria.push("&serviceOfferingId="+$thisPopup.find("input:radio[name=service_offering_radio]:checked").val());
+
+ var diskOfferingId;
+ if ($thisPopup.find("#wiz_blank").hasClass("rev_wizmid_selectedtempbut")) //ISO
+ diskOfferingId = $thisPopup.find("#root_disk_offering_container input[name=root_disk_offering_radio]:checked").val();
+ else //template
+ diskOfferingId = $thisPopup.find("#data_disk_offering_container input[name=data_disk_offering_radio]:checked").val();
+
+ if(diskOfferingId != null && diskOfferingId != "" && diskOfferingId != "none" && diskOfferingId != "custom")
+ moreCriteria.push("&diskOfferingId="+diskOfferingId);
+
+ vmWizardClose();
+
+ var $t = $("#midmenu_item_vm").clone();
+ $t.find("#vm_name").text("Adding....");
+ $t.find("#ip_address_container #label").hide();
+ $t.find("#content").addClass("inaction");
+ $t.find("#spinning_wheel").show();
+ $("#midmenu_container").append($t.show());
+
+ $.ajax({
+ data: createURL("command=deployVirtualMachine"+moreCriteria.join("")),
+ dataType: "json",
+ success: function(json) {
+ var jobId = json.deployvirtualmachineresponse.jobid;
+ $t.attr("id","vmNew"+jobId).data("jobId", jobId);
+ var timerKey = "vmNew"+jobId;
+
+ // Process the async job
+ $("body").everyTime(
+ 10000,
+ timerKey,
+ function() {
+ $.ajax({
+ data: createURL("command=queryAsyncJobResult&jobId="+jobId),
+ dataType: "json",
+ success: function(json) {
+ var result = json.queryasyncjobresultresponse;
+ if (result.jobstatus == 0) {
+ return; //Job has not completed
+ } else {
+ $("body").stopTime(timerKey);
+ $t.find("#content").removeClass("inaction");
+ $t.find("#spinning_wheel").hide();
+ if (result.jobstatus == 1) {
+ // Succeeded
+ $t.find("#info_icon").removeClass("error").show();
+ $t.data("afterActionInfo", ("Adding succeeded."));
+ if("virtualmachine" in result)
+ setMidmenuItemVm(result.virtualmachine[0], $t);
+ /*
+ vmJSONToTemplate(result.virtualmachine[0], vmInstance);
+ if (result.virtualmachine[0].passwordenabled == 'true') {
+ vmInstance.find(".loadingmessage_container .loadingmessage_top p").html("Your instance has been successfully created. Your new password is : " + result.virtualmachine[0].password + " . Please change it as soon as you log into your new instance");
+ } else {
+ vmInstance.find(".loadingmessage_container .loadingmessage_top p").html("Your instance has been successfully created.");
+ }
+ vmInstance.find(".loadingmessage_container").fadeIn("slow");
+ vmInstance.attr("id", "vm" + result.virtualmachine[0].id);
+ vmInstance.find("#vm_state_bar").removeClass("admin_vmred_arrow admin_vmgrey_arrow").addClass("admin_vmgreen_arrow");
+ vmInstance.find("#vm_state").text("Running").removeClass("grid_stoppedtitles grid_celltitles").addClass("grid_runningtitles");
+ changeGridRowsTotal($("#grid_rows_total"), 1);
+ */
+
+ } else if (result.jobstatus == 2) {
+ // Failed
+ $t.find("#vm_name").text("Adding failed");
+ $t.find("#info_icon").addClass("error").show();
+ $t.data("afterActionInfo", ("Adding failed. Reason: " + sanitizeXSS(result.jobresult)));
+ $t.bind("click", function(event) {
+ $rightPanelContent.find("#after_action_info").text($(this).data("afterActionInfo"));
+ $rightPanelContent.find("#after_action_info_container").addClass("errorbox");
+ $rightPanelContent.find("#after_action_info_container").show();
+ vmClearRightPanel();
+ return false;
+ });
+
+ /*
+ vmInstance.find(".loadingmessage_container .loadingmessage_top p").text("Unable to create your new instance due to the error: " + result.jobresult);
+ vmInstance.find(".loadingmessage_container").fadeIn("slow");
+ vmInstance.find(".continue_button").data("jobId", result.jobid).unbind("click").bind("click", function(event) {
+ event.preventDefault();
+ var deadVM = $("#vmNew"+$(this).data("jobId"));
+ deadVM.slideUp("slow", function() {
+ $(this).remove();
+ });
+ });
+ */
+ }
+ }
+ },
+ error: function(XMLHttpResponse) {
+ $("body").stopTime(timerKey);
+ $t.find("#info_icon").addClass("error").show();
+ $t.find("#vm_name").text("Adding failed");
+ handleError(XMLHttpResponse);
+ }
+ });
+ },
+ 0
+ );
+ },
+ error: function(XMLHttpResponse) {
+ $t.find("#info_icon").addClass("error").show();
+ $t.find("#vm_name").text("Adding failed");
+ handleError(XMLHttpResponse);
+ }
+ });
+ }
+
+ //since no error, move to next step
+
+ $vmPopup.find("#step" + currentStepInVmPopup).hide().next().show(); //hide current step, show next step
+ currentStepInVmPopup++;
+ });
+
+ $vmPopup.find("#prev_step").bind("click", function(event) {
+ var $prevStep = $vmPopup.find("#step" + currentStepInVmPopup).hide().prev().show(); //hide current step, show previous step
+ currentStepInVmPopup--;
+// if (currentStepInVmPopup == 1) {
+// $vmPopup.find("#prev_step").hide();
+// }
+ return false; //event.preventDefault() + event.stopPropagation()
+ });
+ //***** VM Wizard (end) ********************************************************************************
+ });
+}
+
+
+
\ No newline at end of file
diff --git a/ui/new/scripts/cloud.core.js b/ui/new/scripts/cloud.core.js
new file mode 100755
index 00000000000..d65d01b054a
--- /dev/null
+++ b/ui/new/scripts/cloud.core.js
@@ -0,0 +1,1014 @@
+ /**
+ * Copyright (C) 2010 Cloud.com, Inc. All rights reserved.
+ *
+ * This software is licensed under the GNU General Public License v3 or later.
+ *
+ * It is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+
+
+
+// Version: @VERSION@
+
+//var jobIdMap;
+function doAction(id, $t, apiCommand, listAPIMap) {
+ var label = $t.data("label");
+ var isAsyncJob = $t.data("isAsyncJob");
+ var asyncJobResponse = $t.data("asyncJobResponse");
+ var afterActionSeccessFn = $t.data("afterActionSeccessFn");
+ var listAPI = listAPIMap["listAPI"];
+ var listAPIResponse = listAPIMap["listAPIResponse"];
+ var listAPIResponseObj = listAPIMap["listAPIResponseObj"];
+
+ var $midmenuItem = $("#midmenuItemVm_"+id);
+ $midmenuItem.find("#content").removeClass("selected").addClass("inaction");
+ $midmenuItem.find("#spinning_wheel").addClass("midmenu_addingloader").show();
+ $midmenuItem.find("#info_icon").hide();
+
+ //Async job (begin) *****
+ if(isAsyncJob == true) {
+ $.ajax({
+ data: createURL(apiCommand),
+ dataType: "json",
+ success: function(json) {
+ var jobId = json[asyncJobResponse].jobid;
+ var timerKey = "asyncJob_" + jobId;
+ $("body").everyTime(
+ 10000,
+ timerKey,
+ function() {
+ $.ajax({
+ data: createURL("command=queryAsyncJobResult&jobId="+jobId),
+ dataType: "json",
+ success: function(json) {
+ var result = json.queryasyncjobresultresponse;
+ if (result.jobstatus == 0) {
+ return; //Job has not completed
+ } else {
+ $("body").stopTime(timerKey);
+ $midmenuItem.find("#content").removeClass("inaction");
+ $midmenuItem.find("#spinning_wheel").hide();
+ if (result.jobstatus == 1) { // Succeeded
+ $midmenuItem.find("#info_icon").removeClass("error").show();
+ $midmenuItem.data("afterActionInfo", (label + " action succeeded."));
+
+ //DestroyVirtualMachine API doesn't return an embedded object on success (Bug 6041)
+ //Before Bug 6041 get fixed, use the temporary solution below.
+ $.ajax({
+ cache: false,
+ data: createURL("command="+listAPI+"&id="+id),
+ dataType: "json",
+ success: function(json) {
+ afterActionSeccessFn(json[listAPIResponse][listAPIResponseObj][0], $midmenuItem);
+ }
+ });
+ //After Bug 6037 is fixed, remove temporary solution above and uncomment the line below
+ //afterActionSeccessFn(json[listAPIResponse][listAPIResponseObj][0], $midmenuItem);
+
+ } else if (result.jobstatus == 2) { // Failed
+ $midmenuItem.find("#info_icon").addClass("error").show();
+ $midmenuItem.data("afterActionInfo", (label + " action failed. Reason: " + sanitizeXSS(result.jobresult)));
+ }
+ }
+ },
+ error: function(XMLHttpResponse) {
+ $("body").stopTime(timerKey);
+ $midmenuItem.find("#content").removeClass("inaction");
+ $midmenuItem.find("#spinning_wheel").hide();
+ $midmenuItem.find("#info_icon").addClass("error").show();
+
+ var errorMsg = "";
+ if(XMLHttpResponse.responseText != null & XMLHttpResponse.responseText.length > 0) {
+ var start = XMLHttpResponse.responseText.indexOf("h1") + 3;
+ var end = XMLHttpResponse.responseText.indexOf(" 0)
+ $midmenuItem.data("afterActionInfo", ((label + " action failed. Reason: " + sanitizeXSS(unescape(errorMsg)))));
+ else
+ $midmenuItem.data("afterActionInfo", (label + " action failed."));
+ //handleError(XMLHttpResponse);
+ }
+ });
+ },
+ 0
+ );
+ },
+ error: function(XMLHttpResponse) {
+ $midmenuItem.find("#content").removeClass("inaction");
+ $midmenuItem.find("#spinning_wheel").hide();
+ $midmenuItem.find("#info_icon").addClass("error").show();
+ $midmenuItem.data("afterActionInfo", (label + " action failed."));
+
+ var errorMsg = "";
+ if(XMLHttpResponse.responseText != null & XMLHttpResponse.responseText.length > 0) {
+ var start = XMLHttpResponse.responseText.indexOf("h1") + 3;
+ var end = XMLHttpResponse.responseText.indexOf(" 0)
+ $midmenuItem.data("afterActionInfo", ((label + " action failed. Reason: " + sanitizeXSS(unescape(errorMsg)))));
+ else
+ $midmenuItem.data("afterActionInfo", (label + " action failed."));
+ //handleError(XMLHttpResponse);
+ }
+ });
+ }
+ //Async job (end) *****
+
+ //Sync job (begin) *****
+ else {
+ $.ajax({
+ data: createURL(apiCommand),
+ dataType: "json",
+ async: false,
+ success: function(json) {
+ $midmenuItem.find("#content").removeClass("inaction");
+ $midmenuItem.find("#spinning_wheel").hide();
+
+ //RecoverVirtualMachine API doesn't return an embedded object on success (Bug 6037)
+ //Before Bug 6037 get fixed, use the temporary solution below.
+ $.ajax({
+ cache: false,
+ data: createURL("command="+listAPI+"&id="+id),
+ dataType: "json",
+ async: false,
+ success: function(json) {
+ $midmenuItem.find("#info_icon").removeClass("error").show();
+ $midmenuItem.data("afterActionInfo", (label + " action succeeded."));
+ afterActionSeccessFn(json[listAPIResponse][listAPIResponseObj][0], $midmenuItem);
+ },
+ error: function(XMLHttpResponse) {
+ $midmenuItem.find("#info_icon").addClass("error").show();
+ $midmenuItem.data("afterActionInfo", (label + " action failed. Reason: " + sanitizeXSS(result.jobresult)));
+ }
+ });
+ //After Bug 6037 is fixed, remove temporary solution above and uncomment the line below
+ //afterActionSeccessFn(json[listAPIResponse][listAPIResponseObj][0], $midmenuItem);
+ }
+ });
+ }
+ //Sync job (end) *****
+}
+
+function createURL(url) {
+ return url +"&response=json&sessionkey=" + g_sessionKey;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+var g_mySession = null;
+var g_sessionKey = null;
+var g_role = null; // roles - root, domain-admin, ro-admin, user
+var g_username = null;
+var g_account = null;
+var g_domainid = null;
+var g_enableLogging = false;
+var g_timezoneoffset = null;
+var g_timezone = null;
+
+// capabilities
+var g_networkType = "vnet"; // vnet, vlan, direct
+function getNetworkType() { return g_networkType; }
+
+var g_hypervisorType = "kvm";
+function getHypervisorType() { return g_hypervisorType; }
+
+var g_directAttachNetworkGroupsEnabled = "false";
+function getDirectAttachNetworkGroupsEnabled() { return g_directAttachNetworkGroupsEnabled; }
+
+var g_directAttachedUntaggedEnabled = "false"
+function getDirectAttachUntaggedEnabled() { return g_directAttachedUntaggedEnabled; }
+
+var g_systemVmUseLocalStorage = "false"
+function getSystemVmUseLocalStorage() { return g_systemVmUseLocalStorage; }
+
+//keyboard keycode
+var keycode_Enter = 13;
+
+//dropdown field size
+var maxPageSize = "&pagesize=500";
+
+//XMLHttpResponse.status
+var ERROR_ACCESS_DENIED_DUE_TO_UNAUTHORIZED = 401;
+var ERROR_INTERNET_NAME_NOT_RESOLVED = 12007;
+var ERROR_INTERNET_CANNOT_CONNECT = 12029;
+var ERROR_VMOPS_ACCOUNT_ERROR = 531;
+
+var g_logger = new Logger();
+$(function() {
+ if(g_enableLogging)
+ g_logger.open();
+});
+
+// Test Tool. Please comment this out or remove this when going production.
+// This is intended to provide a simple test tool to create user accounts and
+// domains.
+function initializeTestTool() {
+ $("#launch_test").click(function(event) {
+ testWindow = window.open('/client/test');
+ testWindow.g_sessionKey=g_sessionKey;
+ return false;
+ });
+}
+
+// Role Functions
+function isAdmin() {
+ return (g_role == 1);
+}
+
+function isUser() {
+ return (g_role == 0);
+}
+
+function isDomainAdmin() {
+ return (g_role == 2);
+}
+
+function setDateField(dateValue, dateField, htmlMarkup) {
+ if (dateValue != null && dateValue.length > 0) {
+ var disconnected = new Date();
+ disconnected.setISO8601(dateValue);
+ var showDate;
+ if(g_timezoneoffset != null)
+ showDate = disconnected.getTimePlusTimezoneOffset(g_timezoneoffset);
+ else
+ showDate = disconnected.format("m/d/Y H:i:s");
+ if(htmlMarkup == null)
+ dateField.text(showDate);
+ else
+ dateField.html(htmlMarkup + showDate);
+ }
+}
+
+function initResizable(resizeElement, alsoResizeElement) {
+ var alsoResizeUi_originalHeight;
+ $("#"+resizeElement).resizable({
+ handles: 'e, w',
+ autoHide: true,
+ //containment: ".grid_header" ,
+ alsoResize: "."+alsoResizeElement
+ });
+}
+
+var sortBy = "";
+var parseFunction = function() {}
+var sortingOrder = "asc";
+
+function sortArrayAlphabetically(a, b) {
+ if(a[sortBy] == null || b[sortBy] == null)
+ return 0;
+
+ var A = a[sortBy].toLowerCase();
+ var B = b[sortBy].toLowerCase();
+
+ if(sortingOrder == "asc") {
+ if (A < B)
+ return -1;
+ if (A > B)
+ return 1;
+ } else {
+ if (A < B)
+ return 1;
+ if (A > B)
+ return -1;
+ }
+ return 0;
+}
+
+function sortArrayAlphabeticallyParse(a, b) {
+ if(a[sortBy] == null || b[sortBy] == null)
+ return 0;
+
+ var A = parseFunction(a[sortBy]).toLowerCase();
+ var B = parseFunction(b[sortBy]).toLowerCase();
+
+ if(sortingOrder == "asc") {
+ if (A < B)
+ return -1;
+ if (A > B)
+ return 1;
+ } else {
+ if (A < B)
+ return 1;
+ if (A > B)
+ return -1;
+ }
+ return 0;
+}
+
+function sortArrayNumerically(a, b) {
+ if(a[sortBy] == null || b[sortBy] == null)
+ return 0;
+
+ var A = parseInt(a[sortBy]);
+ var B = parseInt(b[sortBy]);
+
+ if(sortingOrder == "asc") {
+ if (A < B)
+ return -1;
+ if (A > B)
+ return 1;
+ } else {
+ if (A < B)
+ return 1;
+ if (A > B)
+ return -1;
+ }
+ return 0;
+}
+
+function sortArrayNumericallyParse(a, b) {
+ if(a[sortBy] == null || b[sortBy] == null)
+ return 0;
+
+ var A = parseFunction(parseInt(a[sortBy]));
+ var B = parseFunction(parseInt(b[sortBy]));
+
+ if(sortingOrder == "asc") {
+ if (A < B)
+ return -1;
+ if (A > B)
+ return 1;
+ } else {
+ if (A < B)
+ return 1;
+ if (A > B)
+ return -1;
+ }
+ return 0;
+}
+
+function sortArrayByDate(a, b) {
+ if(a[sortBy] == null || b[sortBy] == null)
+ return 0;
+
+ var A = convertMilliseconds(a[sortBy]);
+ var B = convertMilliseconds(b[sortBy]);
+
+ if(sortingOrder == "asc") {
+ if (A < B)
+ return -1;
+ if (A > B)
+ return 1;
+ } else {
+ if (A < B)
+ return 1;
+ if (A > B)
+ return -1;
+ }
+ return 0;
+}
+
+function convertMilliseconds(string) {
+ if (string != null && string.length > 0) {
+ var date1 = new Date();
+ date1.setISO8601(string);
+ return date1.getTime();
+ } else {
+ return null;
+ }
+}
+
+function drawGrid(items, submenuContent, template, fnJSONToTemplate) {
+ var grid = submenuContent.find("#grid_content").empty();
+ if (items != null && items.length > 0) {
+ for (var i = 0; i < items.length; i++) {
+ var newTemplate = template.clone(true);
+ fnJSONToTemplate(items[i], newTemplate);
+ grid.append(newTemplate.show());
+ }
+ setGridRowsTotal(submenuContent.find("#grid_rows_total"), items.length);
+ if(items.length < pageSize)
+ submenuContent.find("#nextPage_div").hide();
+ else
+ submenuContent.find("#nextPage_div").show();
+ } else {
+ setGridRowsTotal(submenuContent.find("#grid_rows_total"), null);
+ submenuContent.find("#nextPage_div").hide();
+ }
+}
+
+//listItems() function takes care of loading image, pagination
+var items = [];
+function listItems(submenuContent, commandString, jsonResponse1, jsonResponse2, template, fnJSONToTemplate ) {
+ if(currentPage==1)
+ submenuContent.find("#prevPage_div").hide();
+ else
+ submenuContent.find("#prevPage_div").show();
+
+ submenuContent.find("#loading_gridtable").show();
+ submenuContent.find("#pagination_panel").hide();
+
+ index = 0;
+ $.ajax({
+ data: createURL(commandString),
+ dataType: "json",
+ async: false,
+ success: function(json) {
+ //IF jsonResponse1=="listaccountsresponse", jsonResponse2=="account", THEN json[jsonResponse1][jsonResponse2] == json.listaccountsresponse.account
+ items = json[jsonResponse1][jsonResponse2];
+ drawGrid(items, submenuContent, template, fnJSONToTemplate);
+ submenuContent.find("#loading_gridtable").hide();
+ submenuContent.find("#pagination_panel").show();
+ },
+ error: function(XMLHttpResponse) {
+ submenuContent.find("#loading_gridtable").hide();
+ handleError(XMLHttpResponse, function() {
+ if(XMLHttpResponse.status == ERROR_VMOPS_ACCOUNT_ERROR) {
+ submenuContent.find("#grid_content").empty();
+ setGridRowsTotal(submenuContent.find("#grid_rows_total"), null);
+ submenuContent.find("#nextPage_div").hide();
+ }
+ submenuContent.find("#loading_gridtable").hide();
+ submenuContent.find("#pagination_panel").show();
+ });
+ }
+ });
+}
+
+
+//event binder
+var currentPage = 1;
+var pageSize = 50; //consistent with server-side
+function submenuContentEventBinder(submenuContent, listFunction) {
+ submenuContent.find("#nextPage").bind("click", function(event){
+ event.preventDefault();
+ currentPage++;
+ listFunction();
+ });
+
+ submenuContent.find("#prevPage").bind("click", function(event){
+ event.preventDefault();
+ currentPage--;
+ listFunction();
+ });
+
+ submenuContent.find("#refresh").bind("click", function(event){
+ event.preventDefault();
+ currentPage=1;
+ listFunction();
+ });
+
+ submenuContent.find("#search_button").bind("click", function(event) {
+ event.preventDefault();
+ currentPage = 1;
+ listFunction();
+ });
+
+ submenuContent.find("#adv_search_button").bind("click", function(event) {
+ event.preventDefault();
+ currentPage = 1;
+ listFunction();
+ submenuContent.find("#search_button").data("advanced", false);
+ submenuContent.find("#advanced_search").hide();
+ });
+
+ submenuContent.find("#search_input").bind("keypress", function(event) {
+ if(event.keyCode == keycode_Enter) {
+ event.preventDefault();
+ submenuContent.find("#search_button").click();
+ }
+ });
+
+ submenuContent.find("#advanced_search").bind("keypress", function(event) {
+ if(event.keyCode == keycode_Enter) {
+ event.preventDefault();
+ submenuContent.find("#adv_search_button").click();
+ }
+ });
+
+ submenuContent.find("#advanced_search_close").bind("click", function(event) {
+ event.preventDefault();
+ submenuContent.find("#search_button").data("advanced", false);
+ submenuContent.find("#advanced_search").hide();
+ });
+
+ submenuContent.find("#advanced_search_link").bind("click", function(event) {
+ event.preventDefault();
+ submenuContent.find("#search_button").data("advanced", true);
+ submenuContent.find("#advanced_search").show();
+ });
+
+ var zoneSelect = submenuContent.find("#advanced_search #adv_search_zone");
+ if(zoneSelect.length>0) { //if zone dropdown is found on Advanced Search dialog
+ $.ajax({
+ data: createURL("command=listZones&available=true&response=json"+maxPageSize),
+ dataType: "json",
+ success: function(json) {
+ var zones = json.listzonesresponse.zone;
+ zoneSelect.empty();
+ zoneSelect.append(" ");
+ if (zones != null && zones.length > 0) {
+ for (var i = 0; i < zones.length; i++) {
+ zoneSelect.append("" + sanitizeXSS(zones[i].name) + " ");
+ }
+ }
+ }
+ });
+
+ var podSelect = submenuContent.find("#advanced_search #adv_search_pod").empty();
+ var podLabel = submenuContent.find("#advanced_search #adv_search_pod_label");
+ if(podSelect.length>0 && isAdmin()) { //if pod dropdown is found on Advanced Search dialog and if its role is admin
+ zoneSelect.bind("change", function(event) {
+ var zoneId = $(this).val();
+ if (zoneId == null || zoneId.length == 0) {
+ podLabel.css("color", "gray");
+ podSelect.attr("disabled", "disabled");
+ podSelect.empty();
+ } else {
+ podLabel.css("color", "black");
+ podSelect.removeAttr("disabled");
+ $.ajax({
+ data: createURL("command=listPods&zoneId="+zoneId+"&response=json"+maxPageSize),
+ dataType: "json",
+ async: false,
+ success: function(json) {
+ var pods = json.listpodsresponse.pod;
+ podSelect.empty();
+ if (pods != null && pods.length > 0) {
+ for (var i = 0; i < pods.length; i++) {
+ podSelect.append("" + sanitizeXSS(pods[i].name) + " ");
+ }
+ }
+ }
+ });
+ }
+ return false;
+ });
+
+ zoneSelect.change();
+ }
+ }
+
+ var domainSelect = submenuContent.find("#advanced_search #adv_search_domain");
+ if(domainSelect.length>0 && isAdmin()) {
+ var domainSelect = domainSelect.empty();
+ $.ajax({
+ data: createURL("command=listDomains&available=true&response=json"+maxPageSize),
+ dataType: "json",
+ success: function(json) {
+ var domains = json.listdomainsresponse.domain;
+ if (domains != null && domains.length > 0) {
+ for (var i = 0; i < domains.length; i++) {
+ domainSelect.append("" + sanitizeXSS(domains[i].name) + " ");
+ }
+ }
+ }
+ });
+ }
+
+ var vmSelect = submenuContent.find("#advanced_search").find("#adv_search_vm");
+ if(vmSelect.length>0) {
+ vmSelect.empty();
+ vmSelect.append(" ");
+ $.ajax({
+ data: createURL("command=listVirtualMachines&response=json"+maxPageSize),
+ dataType: "json",
+ success: function(json) {
+ var items = json.listvirtualmachinesresponse.virtualmachine;
+ if (items != null && items.length > 0) {
+ for (var i = 0; i < items.length; i++) {
+ vmSelect.append("" + sanitizeXSS(items[i].name) + " ");
+ }
+ }
+ }
+ });
+ }
+}
+
+// Validation functions
+function showError(isValid, field, errMsgField, errMsg) {
+ if(isValid) {
+ errMsgField.text("").hide();
+ field.addClass("text").removeClass("error_text");
+ }
+ else {
+ errMsgField.text(errMsg).show();
+ field.removeClass("text").addClass("error_text");
+ }
+}
+
+function showError2(isValid, field, errMsgField, errMsg, appendErrMsg) {
+ if(isValid) {
+ errMsgField.text("").hide();
+ field.addClass("text2").removeClass("error_text2");
+ }
+ else {
+ if(appendErrMsg) //append text
+ errMsgField.text(errMsgField.text()+errMsg).show();
+ else //reset text
+ errMsgField.text(errMsg).show();
+ field.removeClass("text2").addClass("error_text2");
+ }
+}
+
+function validateDropDownBox(label, field, errMsgField, appendErrMsg) {
+ var isValid = true;
+ var errMsg = "";
+ var value = field.val();
+ if (value == null || value.length == 0) {
+ errMsg = label + " is a required value. ";
+ isValid = false;
+ }
+ showError2(isValid, field, errMsgField, errMsg, appendErrMsg);
+ return isValid;
+}
+
+function validateNumber(label, field, errMsgField, min, max, isOptional) {
+ var isValid = true;
+ var errMsg = "";
+ var value = field.val();
+ if (value != null && value.length != 0) {
+ if(isNaN(value)) {
+ errMsg = label + " must be a number";
+ isValid = false;
+ } else {
+ if (min != null && value < min) {
+ errMsg = label + " must be a value greater than or equal to " + min;
+ isValid = false;
+ }
+ if (max != null && value > max) {
+ errMsg = label + " must be a value less than or equal to " + max;
+ isValid = false;
+ }
+ }
+ } else if(isOptional!=true){ //required field
+ errMsg = label + " is a required value. ";
+ isValid = false;
+ }
+ showError(isValid, field, errMsgField, errMsg);
+ return isValid;
+}
+
+function validateString(label, field, errMsgField, isOptional) {
+ var isValid = true;
+ var errMsg = "";
+ var value = field.val();
+ if (isOptional!=true && (value == null || value.length == 0)) { //required field
+ errMsg = label + " is a required value. ";
+ isValid = false;
+ }
+ else if (value!=null && value.length >= 255) {
+ errMsg = label + " must be less than 255 characters";
+ isValid = false;
+ }
+ else if(value!=null && value.indexOf('"')!=-1) {
+ errMsg = "Double quotes are not allowed.";
+ isValid = false;
+ }
+ showError(isValid, field, errMsgField, errMsg);
+ return isValid;
+}
+
+function validateIp(label, field, errMsgField, isOptional) {
+ if(validateString(label, field, errMsgField, isOptional) == false)
+ return;
+ var isValid = true;
+ var errMsg = "";
+ var value = field.val();
+ if(value!=null && value.length>0) {
+ myregexp = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/;
+ var isMatch = myregexp.test(value);
+ if(!isMatch) {
+ errMsg = label + " should be like 75.52.126.11";
+ isValid = false;
+ }
+ }
+ showError(isValid, field, errMsgField, errMsg);
+ return isValid;
+}
+
+function validateCIDR(label, field, errMsgField, isOptional) {
+ if(validateString(label, field, errMsgField, isOptional) == false)
+ return;
+ var isValid = true;
+ var errMsg = "";
+ var value = field.val();
+ if(value!=null && value.length>0) {
+ myregexp = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\/\d{1,2}$/;
+ var isMatch = myregexp.test(value);
+ if(!isMatch) {
+ errMsg = label + " should be like 10.1.1.0/24";
+ isValid = false;
+ }
+ }
+ showError(isValid, field, errMsgField, errMsg);
+ return isValid;
+}
+
+function validatePath(label, field, errMsgField, isOptional) {
+ if(validateString(label, field, errMsgField, isOptional) == false)
+ return;
+ var isValid = true;
+ var errMsg = "";
+ var value = field.val();
+ if(value!=null && value.length>0) {
+ myregexp = /^\//;
+ var isMatch = myregexp.test(value);
+ if(!isMatch) {
+ errMsg = label + " should be like /aaa/bbb/ccc";
+ isValid = false;
+ }
+ }
+ showError(isValid, field, errMsgField, errMsg);
+ return isValid;
+}
+
+function cleanErrMsg(field, errMsgField) {
+ showError(true, field, errMsgField);
+}
+
+// setter
+function setGridRowsTotal(field, gridRowsTotal) {
+ if(gridRowsTotal==null) {
+ field.text("");
+ return;
+ }
+
+ if(gridRowsTotal==1)
+ field.text(gridRowsTotal + " item");
+ else
+ field.text(gridRowsTotal + " items");
+}
+
+function changeGridRowsTotal(field, difference) {
+ var t = field.text();
+ var oldTotal = 0;
+ if(t.length>0 && t.indexOf(" item")!=-1) {
+ var s = t.substring(0, t.indexOf(" item"));
+ if(!isNaN(s))
+ oldTotal = parseInt(s);
+ }
+ var newTotal = oldTotal + difference;
+ setGridRowsTotal(field, newTotal);
+}
+
+
+// others
+function trim(val) {
+ if(val == null)
+ return null;
+ return val.replace(/^\s*/, "").replace(/\s*$/, "");
+}
+
+function noNull(val) {
+ if(val == null)
+ return "";
+ else
+ return val;
+}
+
+// Prevent cross-site-script(XSS) attack.
+// used right before adding user input to the DOM tree. e.g. DOM_element.html(sanitizeXSS(user_input));
+function sanitizeXSS(val) {
+ if(val == null)
+ return val;
+ val = val.replace(//g, ">"); //replace > whose unicode is \u003e
+ return val;
+}
+
+function getVmName(p_vmName, p_vmDisplayname) {
+ if(p_vmDisplayname == null)
+ return sanitizeXSS(p_vmName);
+ var vmName = null;
+ if (isAdmin()) {
+ if (p_vmDisplayname != p_vmName) {
+ vmName = p_vmName + "(" + sanitizeXSS(p_vmDisplayname) + ")";
+ } else {
+ vmName = p_vmName;
+ }
+ } else {
+ vmName = sanitizeXSS(p_vmDisplayname);
+ }
+ return vmName;
+}
+
+// FUNCTION: Handles AJAX error callbacks. You can pass in an optional function to
+// handle errors that are not already handled by this method.
+function handleError(xmlHttp, handleErrorCallback) {
+ // User Not authenticated
+ if (xmlHttp.status == ERROR_ACCESS_DENIED_DUE_TO_UNAUTHORIZED) {
+ $("#dialog_session_expired").dialog("open");
+ }
+ else if (xmlHttp.status == ERROR_INTERNET_NAME_NOT_RESOLVED) {
+ $("#dialog_error").text("Internet name can not be resolved").dialog("open");
+ }
+ else if (xmlHttp.status == ERROR_INTERNET_CANNOT_CONNECT) {
+ $("#dialog_error").text("Management server is not accessible").dialog("open");
+ }
+ else if (xmlHttp.status == ERROR_VMOPS_ACCOUNT_ERROR && handleErrorCallback != undefined) {
+ handleErrorCallback();
+ }
+ else if (handleErrorCallback != undefined) {
+ handleErrorCallback();
+ }
+ else {
+ var start = xmlHttp.responseText.indexOf("h1") + 3;
+ var end = xmlHttp.responseText.indexOf("Encountered an error:
"+sanitizeXSS(errorMsg)+"
").dialog("open");
+ }
+}
+
+// FUNCTION: Adds a Dialog to the list of active Dialogs so that
+// when you shift from one tab to another, we clean out the dialogs
+var activeDialogs = new Array();
+function activateDialog(dialog) {
+ activeDialogs[activeDialogs.length] = dialog;
+
+ //bind Enter-Key-pressing event handler to the dialog
+ dialog.keypress(function(event) {
+ if(event.keyCode == keycode_Enter) {
+ $('[aria-labelledby$='+dialog.attr("id")+']').find(":button:first").click();
+ return false; //event.preventDefault() + event.stopPropagation()
+ }
+ });
+}
+function removeDialogs() {
+ for (var i = 0; i < activeDialogs.length; i++) {
+ activeDialogs[i].remove();
+ }
+ activeDialogs = new Array();
+}
+
+function convertBytes(bytes) {
+ if (bytes < 1024 * 1024) {
+ return (bytes / 1024).toFixed(2) + " KB";
+ } else if (bytes < 1024 * 1024 * 1024) {
+ return (bytes / 1024 / 1024).toFixed(2) + " MB";
+ } else if (bytes < 1024 * 1024 * 1024 * 1024) {
+ return (bytes / 1024 / 1024 / 1024).toFixed(2) + " GB";
+ } else {
+ return (bytes / 1024 / 1024 / 1024 / 1024).toFixed(2) + " TB";
+ }
+}
+
+function convertHz(hz) {
+ if (hz < 1000) {
+ return hz + " MHZ";
+ } else {
+ return (hz / 1000).toFixed(2) + " GHZ";
+ }
+}
+
+function toDayOfMonthDesp(dayOfMonth) {
+ return "Day "+dayOfMonth +" of Month";
+}
+
+function toDayOfWeekDesp(dayOfWeek) {
+ if (dayOfWeek == "1")
+ return "Sunday";
+ else if (dayOfWeek == "2")
+ return "Monday";
+ else if (dayOfWeek == "3")
+ return "Tuesday";
+ else if (dayOfWeek == "4")
+ return "Wednesday";
+ else if (dayOfWeek == "5")
+ return "Thursday"
+ else if (dayOfWeek == "6")
+ return "Friday";
+ else if (dayOfWeek == "7")
+ return "Saturday";
+}
+
+function toBooleanText(booleanValue) {
+ if(booleanValue == "true")
+ return "Yes";
+ else if(booleanValue == "false")
+ return "No";
+}
+
+function toBooleanValue(booleanText) {
+ if(booleanText == "Yes")
+ return "true";
+ else if(booleanText == "No")
+ return "false";
+}
+
+function toNetworkType(usevirtualnetwork) {
+ if(usevirtualnetwork == "true")
+ return "Public";
+ else
+ return "Direct";
+}
+
+var roleTypeUser = "0";
+var roleTypeAdmin = "1";
+var roleTypeDomainAdmin = "2";
+function toRole(type) {
+ if (type == roleTypeUser) {
+ return "User";
+ } else if (type == roleTypeAdmin) {
+ return "Admin";
+ } else if (type == roleTypeDomainAdmin) {
+ return "Domain-Admin";
+ }
+}
+
+function toAlertType(alertCode) {
+ switch (alertCode) {
+ case "0" : return "Capacity Threshold - Memory";
+ case "1" : return "Capacity Threshold - CPU";
+ case "2" : return "Capacity Threshold - Storage Used";
+ case "3" : return "Capacity Threshold - Storage Allocated";
+ case "4" : return "Capacity Threshold - Public IP";
+ case "5" : return "Capacity Threshold - Private IP";
+ case "6" : return "Monitoring - Host";
+ case "7" : return "Monitoring - VM";
+ case "8" : return "Monitoring - Domain Router";
+ case "9" : return "Monitoring - Console Proxy";
+ case "10" : return "Monitoring - Routing Host";
+ case "11" : return "Monitoring - Storage";
+ case "12" : return "Monitoring - Usage Server";
+ case "13" : return "Monitoring - Management Server";
+ case "14" : return "Migration - Domain Router";
+ case "15" : return "Migration - Console Proxy";
+ case "16" : return "Migration - User VM";
+ case "17" : return "VLAN";
+ case "18" : return "Monitoring - Secondary Storage VM";
+ }
+}
+
+// Timezones
+var timezones = new Object();
+timezones['Etc/GMT+12']='[UTC-12:00] GMT-12:00';
+timezones['Etc/GMT+11']='[UTC-11:00] GMT-11:00';
+timezones['Pacific/Samoa']='[UTC-11:00] Samoa Standard Time';
+timezones['Pacific/Honolulu']='[UTC-10:00] Hawaii Standard Time';
+timezones['US/Alaska']='[UTC-09:00] Alaska Standard Time';
+timezones['America/Los_Angeles']='[UTC-08:00] Pacific Standard Time';
+timezones['Mexico/BajaNorte']='[UTC-08:00] Baja California';
+timezones['US/Arizona']='[UTC-07:00] Arizona';
+timezones['US/Mountain']='[UTC-07:00] Mountain Standard Time';
+timezones['America/Chihuahua']='[UTC-07:00] Chihuahua, La Paz';
+timezones['America/Chicago']='[UTC-06:00] Central Standard Time';
+timezones['America/Costa_Rica']='[UTC-06:00] Central America';
+timezones['America/Mexico_City']='[UTC-06:00] Mexico City, Monterrey';
+timezones['Canada/Saskatchewan']='[UTC-06:00] Saskatchewan';
+timezones['America/Bogota']='[UTC-05:00] Bogota, Lima';
+timezones['America/New_York']='[UTC-05:00] Eastern Standard Time';
+timezones['America/Caracas']='[UTC-04:00] Venezuela Time';
+timezones['America/Asuncion']='[UTC-04:00] Paraguay Time';
+timezones['America/Cuiaba']='[UTC-04:00] Amazon Time';
+timezones['America/Halifax']='[UTC-04:00] Atlantic Standard Time';
+timezones['America/La_Paz']='[UTC-04:00] Bolivia Time';
+timezones['America/Santiago']='[UTC-04:00] Chile Time';
+timezones['America/St_Johns']='[UTC-03:30] Newfoundland Standard Time';
+timezones['America/Araguaina']='[UTC-03:00] Brasilia Time';
+timezones['America/Argentina/Buenos_Aires']='[UTC-03:00] Argentine Time';
+timezones['America/Cayenne']='[UTC-03:00] French Guiana Time';
+timezones['America/Godthab']='[UTC-03:00] Greenland Time';
+timezones['America/Montevideo']='[UTC-03:00] Uruguay Time]';
+timezones['Etc/GMT+2']='[UTC-02:00] GMT-02:00';
+timezones['Atlantic/Azores']='[UTC-01:00] Azores Time';
+timezones['Atlantic/Cape_Verde']='[UTC-01:00] Cape Verde Time';
+timezones['Africa/Casablanca']='[UTC] Casablanca';
+timezones['Etc/UTC']='[UTC] Coordinated Universal Time';
+timezones['Atlantic/Reykjavik']='[UTC] Reykjavik';
+timezones['Europe/London']='[UTC] Western European Time';
+timezones['CET']='[UTC+01:00] Central European Time';
+timezones['Europe/Bucharest']='[UTC+02:00] Eastern European Time';
+timezones['Africa/Johannesburg']='[UTC+02:00] South Africa Standard Time';
+timezones['Asia/Beirut']='[UTC+02:00] Beirut';
+timezones['Africa/Cairo']='[UTC+02:00] Cairo';
+timezones['Asia/Jerusalem']='[UTC+02:00] Israel Standard Time';
+timezones['Europe/Minsk']='[UTC+02:00] Minsk';
+timezones['Europe/Moscow']='[UTC+03:00] Moscow Standard Time';
+timezones['Africa/Nairobi']='[UTC+03:00] Eastern African Time';
+timezones['Asia/Karachi']='[UTC+05:00] Pakistan Time';
+timezones['Asia/Kolkata']='[UTC+05:30] India Standard Time';
+timezones['Asia/Bangkok']='[UTC+05:30] Indochina Time';
+timezones['Asia/Shanghai']='[UTC+08:00] China Standard Time';
+timezones['Asia/Kuala_Lumpur']='[UTC+08:00] Malaysia Time';
+timezones['Australia/Perth']='[UTC+08:00] Western Standard Time (Australia)';
+timezones['Asia/Taipei']='[UTC+08:00] Taiwan';
+timezones['Asia/Tokyo']='[UTC+09:00] Japan Standard Time';
+timezones['Asia/Seoul']='[UTC+09:00] Korea Standard Time';
+timezones['Australia/Adelaide']='[UTC+09:30] Central Standard Time (South Australia)';
+timezones['Australia/Darwin']='[UTC+09:30] Central Standard Time (Northern Territory)';
+timezones['Australia/Brisbane']='[UTC+10:00] Eastern Standard Time (Queensland)';
+timezones['Australia/Canberra']='[UTC+10:00] Eastern Standard Time (New South Wales)';
+timezones['Pacific/Guam']='[UTC+10:00] Chamorro Standard Time';
+timezones['Pacific/Auckland']='[UTC+12:00] New Zealand Standard Time';
diff --git a/ui/new/scripts/cloud.logger.js b/ui/new/scripts/cloud.logger.js
new file mode 100755
index 00000000000..895e421ce91
--- /dev/null
+++ b/ui/new/scripts/cloud.logger.js
@@ -0,0 +1,288 @@
+ /**
+ * Copyright (C) 2010 Cloud.com, Inc. All rights reserved.
+ *
+ * This software is licensed under the GNU General Public License v3 or later.
+ *
+ * It is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+
+// Version: 1.9.1.152
+
+//
+// Javascript logger utility
+// Author
+// Kelven Yang
+// 2/25/2010
+//
+
+function Logger() {
+ this.bDockEnabled = true;
+
+ this.logWin = null;
+ this.logger = null;
+ this.header = null;
+
+ this.bEnabled = true;
+ this.level = 0;
+
+ this.bMoving = false;
+ this.offsetStart = {left: 0, top: 0};
+ this.ptStart = {x: 0, y: 0};
+}
+
+Logger.DEFAULT_WIN_HEIGHT = 500;
+Logger.LEVEL_TRACE = 0;
+Logger.LEVEL_DEBUG = 1;
+Logger.LEVEL_INFO = 2;
+Logger.LEVEL_WARN = 3;
+Logger.LEVEL_ERROR = 4;
+Logger.LEVEL_FATAL = 5;
+Logger.LEVEL_SYS = 100;
+
+Logger.prototype = {
+
+ open: function() {
+ var logger = this;
+ var logWinMarkup = [
+ '',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
',
+ '
'
+ ].join('');
+
+ this.logWin = $(logWinMarkup).appendTo(document.body);
+ this.header = $('.logwin_title:first', this.logWin);
+ this.logger = $('.logwin_content:first', this.logWin);
+
+ $(".logwin_title", this.logWin).mousedown(function(e) {
+ if($(e.target).attr('cmd'))
+ return true;
+
+ if(!logger.bMoving) {
+ logger.bMoving = true;
+ logger.offsetStart = logger.logWin.offset();
+ logger.ptStart = {x: e.pageX, y: e.pageY};
+
+ $(document).bind("mousemove", function(e) {
+ if(logger.bMoving) {
+ logger.enableDocking(false);
+
+ var logWinNewLeft = logger.offsetStart.left + e.pageX - logger.ptStart.x;
+ var logWinNewTop = logger.offsetStart.top + e.pageY - logger.ptStart.y;
+
+ logger.logWin.css("left", logWinNewLeft + "px").css("top", logWinNewTop + "px");
+ }
+ return false;
+ });
+
+ $(document).bind("mouseup", function(e) {
+ if(logger.bMoving) {
+ logger.bMoving = false;
+ $(document).unbind("mousemove", arguments.callee.name);
+ $(document).unbind("mouseup", arguments.callee.name);
+
+ return false;
+ }
+ return true;
+ });
+ }
+
+ // prevent default handling
+ return false;
+ }).dblclick(function(e) {
+ logger.expand(!logger.isExpanded());
+ });
+
+ this.logWin.click(function(e) {
+ if($(e.target).attr('cmd')) {
+ switch($(e.target).attr('cmd')) {
+ case '1' :
+ logger.enable(true);
+ break;
+
+ case '2' :
+ logger.enable(false);
+ break;
+
+ case '3' :
+ logger.clear();
+ break;
+
+ case '4' :
+ logger.enableDocking(true);
+ logger.dockIn();
+ break;
+
+ case '5' :
+ logger.expand(!logger.isExpanded());
+ break;
+
+ default :
+ break;
+ }
+ }
+ });
+
+ $("#template_type", this.logWin).change(function(e) {
+ logger.setLevel(parseInt($(this).val()));
+ });
+
+ this.logWin.css("left", (($(document.body).width() - this.logWin.width()) / 2) + "px");
+ this.dockIn();
+
+ this.log(Logger.LEVEL_SYS, "Logger started");
+ },
+
+ dockIn: function() {
+ var logger = this;
+ var offset = this.logWin.offset();
+ var bottom = offset.top + this.logWin.height();
+ var delta = bottom - 2;
+
+ this.logWin.animate({top: (offset.top - delta) + "px"}, 200,
+ function() {
+ logger.logWin.unbind("mouseleave");
+ logger.logWin.bind("mouseenter", function(e) {
+ if(logger.bDockEnabled)
+ logger.dockOut();
+ });
+ }
+ );
+ },
+
+ dockOut: function() {
+ var logger = this;
+ this.logWin.animate({top: "0px"}, 200,
+ function() {
+ logger.logWin.unbind("mouseenter");
+ logger.logWin.bind("mouseleave", function(e) {
+ if(logger.bDockEnabled) {
+ var xPosInLogWin = e.pageX - logger.logWin.offset().left;
+ var yPosInLogWin = e.pageY - logger.logWin.offset().top;
+
+ if(xPosInLogWin < 0 || yPosInLogWin < 0 ||
+ xPosInLogWin > logger.logWin.width() || yPosInLogWin > logger.logWin.height()) {
+ logger.dockIn();
+ }
+ }
+ });
+ }
+ );
+ },
+
+ enableDocking: function(bEnable) {
+ this.bDockEnabled = bEnable;
+ },
+
+ log: function(level, message) {
+ // Note : LEVEL_SYS message will always be logged
+ if(this.logger && (level == Logger.LEVEL_SYS || this.bEnabled && level >= this.level)) {
+ var curTime = new Date();
+ var curTimeString = [
+ '', curTime.getMonth(),
+ '/', curTime.getDate(),
+ '/', curTime.getYear(),
+ ' ',
+ curTime.getHours(),
+ ':', curTime.getMinutes(),
+ ":", curTime.getSeconds(),
+ ".", curTime.getMilliseconds()].join('');
+
+ this.logger.append(this.getLevelDisplayString(level) + " - " + curTimeString + " - " + message + ' ');
+ }
+ },
+
+ clear: function() {
+ if(this.logger) {
+ this.logger.empty();
+ this.log(Logger.LEVEL_SYS, "Logger is cleared");
+ }
+ },
+
+ setLevel: function(level) {
+ this.level = level;
+
+ this.log(Logger.LEVEL_SYS, "Set logger trace level to " + this.getLevelDisplayString(level));
+ },
+
+ enable: function(bEnabled) {
+ this.bEnabled = bEnabled;
+
+ if(bEnabled)
+ this.log(Logger.LEVEL_SYS, "Logger is enabled");
+ else
+ this.log(Logger.LEVEL_SYS, "Logger is disabled");
+ },
+
+ expand: function(bExpand) {
+ if(bExpand) {
+ this.logWin.height(Logger.DEFAULT_WIN_HEIGHT);
+ this.logger.height(Logger.DEFAULT_WIN_HEIGHT - this.header.height());
+ } else {
+ this.logWin.height(this.header.height());
+ this.logger.height(0);
+ }
+ },
+
+ isExpanded: function() {
+ return this.logWin.height() > this.header.height();
+ },
+
+ getLevelDisplayString: function(level) {
+ switch(level) {
+ case Logger.LEVEL_TRACE :
+ return "TRACE";
+
+ case Logger.LEVEL_DEBUG :
+ return "DEBUG";
+
+ case Logger.LEVEL_INFO :
+ return "INFO";
+
+ case Logger.LEVEL_WARN :
+ return "WARN";
+
+ case Logger.LEVEL_ERROR :
+ return "ERROR";
+
+ case Logger.LEVEL_FATAL :
+ return "FATAL";
+
+ case Logger.LEVEL_SYS :
+ return "SYSINFO";
+ }
+
+ return "LEVEL " + level;
+ }
+};
+
diff --git a/ui/new/scripts/date.js b/ui/new/scripts/date.js
new file mode 100755
index 00000000000..769a4474846
--- /dev/null
+++ b/ui/new/scripts/date.js
@@ -0,0 +1,127 @@
+ /**
+ * Copyright (C) 2010 Cloud.com, Inc. All rights reserved.
+ *
+ * This software is licensed under the GNU General Public License v3 or later.
+ *
+ * It is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+
+Date.prototype.setISO8601 = function(dString){
+
+ var regexp = /(\d\d\d\d)(-)?(\d\d)(-)?(\d\d)(T)?(\d\d)(:)?(\d\d)(:)?(\d\d)(\.\d+)?(Z|([+-])(\d\d)(:)?(\d\d))/;
+
+ if (dString.toString().match(new RegExp(regexp))) {
+ var d = dString.match(new RegExp(regexp));
+ var offset = 0;
+
+ this.setUTCDate(1);
+ this.setUTCFullYear(parseInt(d[1],10));
+ this.setUTCMonth(parseInt(d[3],10) - 1);
+ this.setUTCDate(parseInt(d[5],10));
+ this.setUTCHours(parseInt(d[7],10));
+ this.setUTCMinutes(parseInt(d[9],10));
+ this.setUTCSeconds(parseInt(d[11],10));
+ if (d[12])
+ this.setUTCMilliseconds(parseFloat(d[12]) * 1000);
+ else
+ this.setUTCMilliseconds(0);
+ if (d[13] != 'Z') {
+ offset = (d[15] * 60) + parseInt(d[17],10);
+ offset *= ((d[14] == '-') ? -1 : 1);
+ this.setTime(this.getTime() - offset * 60 * 1000);
+ }
+ }
+ else {
+ this.setTime(Date.parse(dString));
+ }
+ return this;
+};
+
+//***** vmops (begin) ***************************************************************
+
+/*
+This is a hack/temporary solution that lacks calculation of Daylight Saving Time.
+We'll fix the problem by getting datetime in a specified timezone (including Daylight Saving Time) from server-side in next release.
+*/
+Date.prototype.getTimePlusTimezoneOffset = function(timezoneOffset) {
+ var milliseconds = this.getTime();
+ var s1 = new Date(milliseconds + (timezoneOffset * 60 * 60 * 1000)).toUTCString(); //e.g. "Tue, 08 Jun 2010 19:13:49 GMT", "Tue, 25 May 2010 12:07:01 UTC"
+ var s2 = s1.substring(s1.indexOf(", ")+2); //e.g. "08 Jun 2010 19:13:49 GMT", "25 May 2010 12:07:01 UTC"
+ var s3 = s2.substring(0,s2.length-4); //e.g. "08 Jun 2010 19:13:49", "25 May 2010 12:10:16"
+ return s3;
+}
+
+//***** vmops (end) *****************************************************************
+
+Date.prototype.format = function(format) {
+ var returnStr = '';
+ var replace = Date.replaceChars;
+ for (var i = 0; i < format.length; i++) {
+ var curChar = format.charAt(i);
+ if (replace[curChar]) {
+ returnStr += replace[curChar].call(this);
+ } else {
+ returnStr += curChar;
+ }
+ }
+ return returnStr;
+};
+Date.replaceChars = {
+ shortMonths: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
+ longMonths: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
+ shortDays: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
+ longDays: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
+
+ // Day
+ d: function() { return (this.getDate() < 10 ? '0' : '') + this.getDate(); },
+ D: function() { return Date.replaceChars.shortDays[this.getDay()]; },
+ j: function() { return this.getDate(); },
+ l: function() { return Date.replaceChars.longDays[this.getDay()]; },
+ N: function() { return this.getDay() + 1; },
+ S: function() { return (this.getDate() % 10 == 1 && this.getDate() != 11 ? 'st' : (this.getDate() % 10 == 2 && this.getDate() != 12 ? 'nd' : (this.getDate() % 10 == 3 && this.getDate() != 13 ? 'rd' : 'th'))); },
+ w: function() { return this.getDay(); },
+ z: function() { return "Not Yet Supported"; },
+ // Week
+ W: function() { return "Not Yet Supported"; },
+ // Month
+ F: function() { return Date.replaceChars.longMonths[this.getMonth()]; },
+ m: function() { return (this.getMonth() < 9 ? '0' : '') + (this.getMonth() + 1); },
+ M: function() { return Date.replaceChars.shortMonths[this.getMonth()]; },
+ n: function() { return this.getMonth() + 1; },
+ t: function() { return "Not Yet Supported"; },
+ // Year
+ L: function() { return "Not Yet Supported"; },
+ o: function() { return "Not Supported"; },
+ Y: function() { return this.getFullYear(); },
+ y: function() { return ('' + this.getFullYear()).substr(2); },
+ // Time
+ a: function() { return this.getHours() < 12 ? 'am' : 'pm'; },
+ A: function() { return this.getHours() < 12 ? 'AM' : 'PM'; },
+ B: function() { return "Not Yet Supported"; },
+ g: function() { return this.getHours() % 12 || 12; },
+ G: function() { return this.getHours(); },
+ h: function() { return ((this.getHours() % 12 || 12) < 10 ? '0' : '') + (this.getHours() % 12 || 12); },
+ H: function() { return (this.getHours() < 10 ? '0' : '') + this.getHours(); },
+ i: function() { return (this.getMinutes() < 10 ? '0' : '') + this.getMinutes(); },
+ s: function() { return (this.getSeconds() < 10 ? '0' : '') + this.getSeconds(); },
+ // Timezone
+ e: function() { return "Not Yet Supported"; },
+ I: function() { return "Not Supported"; },
+ O: function() { return (-this.getTimezoneOffset() < 0 ? '-' : '+') + (Math.abs(this.getTimezoneOffset() / 60) < 10 ? '0' : '') + (Math.abs(this.getTimezoneOffset() / 60)) + '00'; },
+ T: function() { var m = this.getMonth(); this.setMonth(0); var result = this.toTimeString().replace(/^.+ \(?([^\)]+)\)?$/, '$1'); this.setMonth(m); return result;},
+ Z: function() { return -this.getTimezoneOffset() * 60; },
+ // Full Date/Time
+ c: function() { return "Not Yet Supported"; },
+ r: function() { return this.toString(); },
+ U: function() { return this.getTime() / 1000; }
+};
\ No newline at end of file
diff --git a/ui/new/scripts/jquery-1.4.2.min.js b/ui/new/scripts/jquery-1.4.2.min.js
new file mode 100755
index 00000000000..7c243080233
--- /dev/null
+++ b/ui/new/scripts/jquery-1.4.2.min.js
@@ -0,0 +1,154 @@
+/*!
+ * jQuery JavaScript Library v1.4.2
+ * http://jquery.com/
+ *
+ * Copyright 2010, John Resig
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ * Copyright 2010, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ *
+ * Date: Sat Feb 13 22:33:48 2010 -0500
+ */
+(function(A,w){function ma(){if(!c.isReady){try{s.documentElement.doScroll("left")}catch(a){setTimeout(ma,1);return}c.ready()}}function Qa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function X(a,b,d,f,e,j){var i=a.length;if(typeof b==="object"){for(var o in b)X(a,o,b[o],f,e,d);return a}if(d!==w){f=!j&&f&&c.isFunction(d);for(o=0;o)[^>]*$|^#([\w-]+)$/,Ua=/^.[^:#\[\.,]*$/,Va=/\S/,
+Wa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Xa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.userAgent,xa=false,Q=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,R=Array.prototype.slice,ya=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(a==="body"&&!b){this.context=s;this[0]=s.body;this.selector="body";this.length=1;return this}if(typeof a==="string")if((d=Ta.exec(a))&&
+(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Xa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=sa([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}return c.merge(this,a)}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return T.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a);return c.merge(this,
+a)}else return!b||b.jquery?(b||T).find(a):c(b).find(a);else if(c.isFunction(a))return T.ready(a);if(a.selector!==w){this.selector=a.selector;this.context=a.context}return c.makeArray(a,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){var f=c();c.isArray(a)?ba.apply(f,a):c.merge(f,a);f.prevObject=this;f.context=this.context;if(b===
+"find")f.selector=this.selector+(this.selector?" ":"")+d;else if(b)f.selector=this.selector+"."+b+"("+d+")";return f},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this,
+function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,j,i,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;ba ";
+var e=d.getElementsByTagName("*"),j=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!j)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(j.getAttribute("style")),hrefNormalized:j.getAttribute("href")==="/a",opacity:/^0.55$/.test(j.style.opacity),cssFloat:!!j.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:s.createElement("select").appendChild(s.createElement("option")).selected,
+parentNode:d.removeChild(d.appendChild(s.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(s.createTextNode("window."+f+"=1;"))}catch(i){}a.insertBefore(b,a.firstChild);if(A[f]){c.support.scriptEval=true;delete A[f]}try{delete b.test}catch(o){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function k(){c.support.noCloneEvent=
+false;d.detachEvent("onclick",k)});d.cloneNode(true).fireEvent("onclick")}d=s.createElement("div");d.innerHTML=" ";a=s.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var k=s.createElement("div");k.style.width=k.style.paddingLeft="1px";s.body.appendChild(k);c.boxModel=c.support.boxModel=k.offsetWidth===2;s.body.removeChild(k).style.display="none"});a=function(k){var n=
+s.createElement("div");k="on"+k;var r=k in n;if(!r){n.setAttribute(k,"return;");r=typeof n[k]==="function"}return r};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=j=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ya=0,za={};c.extend({cache:{},expando:G,noData:{embed:true,object:true,
+applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var f=a[G],e=c.cache;if(!f&&typeof b==="string"&&d===w)return null;f||(f=++Ya);if(typeof b==="object"){a[G]=f;e[f]=c.extend(true,{},b)}else if(!e[f]){a[G]=f;e[f]={}}a=e[f];if(d!==w)a[b]=d;return typeof b==="string"?a[b]:a}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{if(c.support.deleteExpando)delete a[c.expando];
+else a.removeAttribute&&a.removeAttribute(c.expando);delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===w&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this,
+a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===
+w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var Aa=/[\n\t]/g,ca=/\s+/,Za=/\r/g,$a=/href|src|style/,ab=/(button|input)/i,bb=/(button|input|object|select|textarea)/i,
+cb=/^(a|area)$/i,Ba=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(n){var r=c(this);r.addClass(a.call(this,n,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var j=b?d:0;for(d=b?d+1:e.length;j=0;else if(c.nodeName(this,"select")){var u=c.makeArray(r);c("option",this).each(function(){this.selected=
+c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");
+a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:bb.test(a.nodeName)||cb.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&j?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var O=/\.(.*)$/,db=function(a){return a.replace(/[^\w\s\.\|`]/g,
+function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;var e,j;if(d.handler){e=d;d=e.handler}if(!d.guid)d.guid=c.guid++;if(j=c.data(a)){var i=j.events=j.events||{},o=j.handle;if(!o)j.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,arguments):w};o.elem=a;b=b.split(" ");for(var k,n=0,r;k=b[n++];){j=e?c.extend({},e):{handler:d,data:f};if(k.indexOf(".")>-1){r=k.split(".");
+k=r.shift();j.namespace=r.slice(0).sort().join(".")}else{r=[];j.namespace=""}j.type=k;j.guid=d.guid;var u=i[k],z=c.event.special[k]||{};if(!u){u=i[k]=[];if(!z.setup||z.setup.call(a,f,r,o)===false)if(a.addEventListener)a.addEventListener(k,o,false);else a.attachEvent&&a.attachEvent("on"+k,o)}if(z.add){z.add.call(a,j);if(!j.handler.guid)j.handler.guid=d.guid}u.push(j);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){var e,j=0,i,o,k,n,r,u,z=c.data(a),
+C=z&&z.events;if(z&&C){if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(e in C)c.event.remove(a,e+b)}else{for(b=b.split(" ");e=b[j++];){n=e;i=e.indexOf(".")<0;o=[];if(!i){o=e.split(".");e=o.shift();k=new RegExp("(^|\\.)"+c.map(o.slice(0).sort(),db).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(r=C[e])if(d){n=c.event.special[e]||{};for(B=f||0;B=0){a.type=
+e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return w;a.result=w;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d,b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+e]&&d["on"+e].apply(d,b)===false)a.result=false}catch(j){}if(!a.isPropagationStopped()&&
+f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){f=a.target;var i,o=c.nodeName(f,"a")&&e==="click",k=c.event.special[e]||{};if((!k._default||k._default.call(d,a)===false)&&!o&&!(f&&f.nodeName&&c.noData[f.nodeName.toLowerCase()])){try{if(f[e]){if(i=f["on"+e])f["on"+e]=null;c.event.triggered=true;f[e]()}}catch(n){}if(i)f["on"+e]=i;c.event.triggered=false}}},handle:function(a){var b,d,f,e;a=arguments[0]=c.event.fix(a||A.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive;
+if(!b){d=a.type.split(".");a.type=d.shift();f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)")}e=c.data(this,"events");d=e[a.type];if(e&&d){d=d.slice(0);e=0;for(var j=d.length;e-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},fa=function(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Fa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",
+e);if(!(f===w||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:fa,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return fa.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return fa.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a,
+"_change_data",Fa(a))}},setup:function(){if(this.type==="file")return false;for(var a in ea)c.event.add(this,a+".specialChange",ea[a]);return da.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return da.test(this.nodeName)}};ea=c.event.special.change.filters}s.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,f)}c.event.special[b]={setup:function(){this.addEventListener(a,
+d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var j in d)this[b](j,f,d[j],e);return this}if(c.isFunction(f)){e=f;f=w}var i=b==="one"?c.proxy(e,function(k){c(this).unbind(k,i);return e.apply(this,arguments)}):e;if(d==="unload"&&b!=="one")this.one(d,f,e);else{j=0;for(var o=this.length;j0){y=t;break}}t=t[g]}m[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
+e=0,j=Object.prototype.toString,i=false,o=true;[0,0].sort(function(){o=false;return 0});var k=function(g,h,l,m){l=l||[];var q=h=h||s;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g||typeof g!=="string")return l;for(var p=[],v,t,y,S,H=true,M=x(h),I=g;(f.exec(""),v=f.exec(I))!==null;){I=v[3];p.push(v[1]);if(v[2]){S=v[3];break}}if(p.length>1&&r.exec(g))if(p.length===2&&n.relative[p[0]])t=ga(p[0]+p[1],h);else for(t=n.relative[p[0]]?[h]:k(p.shift(),h);p.length;){g=p.shift();if(n.relative[g])g+=p.shift();
+t=ga(g,t)}else{if(!m&&p.length>1&&h.nodeType===9&&!M&&n.match.ID.test(p[0])&&!n.match.ID.test(p[p.length-1])){v=k.find(p.shift(),h,M);h=v.expr?k.filter(v.expr,v.set)[0]:v.set[0]}if(h){v=m?{expr:p.pop(),set:z(m)}:k.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=v.expr?k.filter(v.expr,v.set):v.set;if(p.length>0)y=z(t);else H=false;for(;p.length;){var D=p.pop();v=D;if(n.relative[D])v=p.pop();else D="";if(v==null)v=h;n.relative[D](y,v,M)}}else y=[]}y||(y=t);y||k.error(D||
+g);if(j.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))l.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&l.push(t[g]);else l.push.apply(l,y);else z(y,l);if(S){k(S,q,l,m);k.uniqueSort(l)}return l};k.uniqueSort=function(g){if(B){i=o;g.sort(B);if(i)for(var h=1;h":function(g,h){var l=typeof h==="string";if(l&&!/\W/.test(h)){h=h.toLowerCase();for(var m=0,q=g.length;m=0))l||m.push(v);else if(l)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},
+CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,l,m,q,p){h=g[1].replace(/\\/g,"");if(!p&&n.attrMap[h])g[1]=n.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,l,m,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,h);else{g=k.filter(g[3],h,l,true^q);l||m.push.apply(m,
+g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,l){return!!k(l[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},
+text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},
+setFilters:{first:function(g,h){return h===0},last:function(g,h,l,m){return h===m.length-1},even:function(g,h){return h%2===0},odd:function(g,h){return h%2===1},lt:function(g,h,l){return hl[3]-0},nth:function(g,h,l){return l[3]-0===h},eq:function(g,h,l){return l[3]-0===h}},filter:{PSEUDO:function(g,h,l,m){var q=h[1],p=n.filters[q];if(p)return p(g,l,h,m);else if(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(q==="not"){h=
+h[3];l=0;for(m=h.length;l=0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var l=h[1];g=n.attrHandle[l]?n.attrHandle[l](g):g[l]!=null?g[l]:g.getAttribute(l);l=g+"";var m=h[2];h=h[4];return g==null?m==="!=":m===
+"="?l===h:m==="*="?l.indexOf(h)>=0:m==="~="?(" "+l+" ").indexOf(h)>=0:!h?l&&g!==false:m==="!="?l!==h:m==="^="?l.indexOf(h)===0:m==="$="?l.substr(l.length-h.length)===h:m==="|="?l===h||l.substr(0,h.length+1)===h+"-":false},POS:function(g,h,l,m){var q=n.setFilters[h[2]];if(q)return q(g,l,h,m)}}},r=n.match.POS;for(var u in n.match){n.match[u]=new RegExp(n.match[u].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[u]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[u].source.replace(/\\(\d+)/g,function(g,
+h){return"\\"+(h-0+1)}))}var z=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};try{Array.prototype.slice.call(s.documentElement.childNodes,0)}catch(C){z=function(g,h){h=h||[];if(j.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var l=0,m=g.length;l ";var l=s.documentElement;l.insertBefore(g,l.firstChild);if(s.getElementById(h)){n.find.ID=function(m,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(m[1]))?q.id===m[1]||typeof q.getAttributeNode!=="undefined"&&
+q.getAttributeNode("id").nodeValue===m[1]?[q]:w:[]};n.filter.ID=function(m,q){var p=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&p&&p.nodeValue===q}}l.removeChild(g);l=g=null})();(function(){var g=s.createElement("div");g.appendChild(s.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(h,l){l=l.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var m=0;l[m];m++)l[m].nodeType===1&&h.push(l[m]);l=h}return l};g.innerHTML=" ";
+if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(h){return h.getAttribute("href",2)};g=null})();s.querySelectorAll&&function(){var g=k,h=s.createElement("div");h.innerHTML="
";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){k=function(m,q,p,v){q=q||s;if(!v&&q.nodeType===9&&!x(q))try{return z(q.querySelectorAll(m),p)}catch(t){}return g(m,q,p,v)};for(var l in g)k[l]=g[l];h=null}}();
+(function(){var g=s.createElement("div");g.innerHTML="
";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,l,m){if(typeof l.getElementsByClassName!=="undefined"&&!m)return l.getElementsByClassName(h[1])};g=null}}})();var E=s.compareDocumentPosition?function(g,h){return!!(g.compareDocumentPosition(h)&16)}:
+function(g,h){return g!==h&&(g.contains?g.contains(h):true)},x=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},ga=function(g,h){var l=[],m="",q;for(h=h.nodeType?[h]:h;q=n.match.PSEUDO.exec(g);){m+=q[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;q=0;for(var p=h.length;q=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f0)for(var j=d;j0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,j=
+{},i;if(f&&a.length){e=0;for(var o=a.length;e-1:c(f).is(e)){d.push({selector:i,elem:f});delete j[i]}}f=f.parentNode}}return d}var k=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(n,r){for(;r&&r.ownerDocument&&r!==b;){if(k?k.index(r)>-1:c(r).is(a))return r;r=r.parentNode}return null})},index:function(a){if(!a||typeof a===
+"string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(qa(a[0])||qa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",
+d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?
+a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);eb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):e;if((this.length>1||gb.test(f))&&fb.test(a))e=e.reverse();return this.pushStack(e,a,R.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===w||a.nodeType!==1||!c(a).is(d));){a.nodeType===
+1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var Ja=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ka=/(<([\w:]+)[^>]*?)\/>/g,hb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,La=/<([\w:]+)/,ib=/"+d+">"},F={option:[1,""," "],legend:[1,""," "],thead:[1,""],tr:[2,""],td:[3,""],col:[2,""],area:[1,""," "],_default:[0,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,"div","
"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=
+c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==w)return this.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this},
+wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},
+prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,
+this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,f;(f=this[d])!=null;d++)if(!a||c.filter(a,[f]).length){if(!b&&f.nodeType===1){c.cleanData(f.getElementsByTagName("*"));c.cleanData([f])}f.parentNode&&f.parentNode.removeChild(f)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild);
+return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Ja,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ra(this,b);ra(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Ja,
+""):null;else if(typeof a==="string"&&!ta.test(a)&&(c.support.leadingWhitespace||!V.test(a))&&!F[(La.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ka,Ma);try{for(var b=0,d=this.length;b0||e.cacheable||this.length>1?k.cloneNode(true):k)}o.length&&c.each(o,Qa)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var f=[];d=c(d);var e=this.length===1&&this[0].parentNode;if(e&&e.nodeType===11&&e.childNodes.length===1&&d.length===1){d[b](this[0]);
+return this}else{e=0;for(var j=d.length;e0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),i);f=f.concat(i)}return this.pushStack(f,a,d.selector)}}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;for(var e=[],j=0,i;(i=a[j])!=null;j++){if(typeof i==="number")i+="";if(i){if(typeof i==="string"&&!jb.test(i))i=b.createTextNode(i);else if(typeof i==="string"){i=i.replace(Ka,Ma);var o=(La.exec(i)||["",
+""])[1].toLowerCase(),k=F[o]||F._default,n=k[0],r=b.createElement("div");for(r.innerHTML=k[1]+i+k[2];n--;)r=r.lastChild;if(!c.support.tbody){n=ib.test(i);o=o==="table"&&!n?r.firstChild&&r.firstChild.childNodes:k[1]===""&&!n?r.childNodes:[];for(k=o.length-1;k>=0;--k)c.nodeName(o[k],"tbody")&&!o[k].childNodes.length&&o[k].parentNode.removeChild(o[k])}!c.support.leadingWhitespace&&V.test(i)&&r.insertBefore(b.createTextNode(V.exec(i)[0]),r.firstChild);i=r.childNodes}if(i.nodeType)e.push(i);else e=
+c.merge(e,i)}}if(d)for(j=0;e[j];j++)if(f&&c.nodeName(e[j],"script")&&(!e[j].type||e[j].type.toLowerCase()==="text/javascript"))f.push(e[j].parentNode?e[j].parentNode.removeChild(e[j]):e[j]);else{e[j].nodeType===1&&e.splice.apply(e,[j+1,0].concat(c.makeArray(e[j].getElementsByTagName("script"))));d.appendChild(e[j])}return e},cleanData:function(a){for(var b,d,f=c.cache,e=c.event.special,j=c.support.deleteExpando,i=0,o;(o=a[i])!=null;i++)if(d=o[c.expando]){b=f[d];if(b.events)for(var k in b.events)e[k]?
+c.event.remove(o,k):Ca(o,k,b.handle);if(j)delete o[c.expando];else o.removeAttribute&&o.removeAttribute(c.expando);delete f[d]}}});var kb=/z-?index|font-?weight|opacity|zoom|line-?height/i,Na=/alpha\([^)]*\)/,Oa=/opacity=([^)]*)/,ha=/float/i,ia=/-([a-z])/ig,lb=/([A-Z])/g,mb=/^-?\d+(?:px)?$/i,nb=/^-?\d/,ob={position:"absolute",visibility:"hidden",display:"block"},pb=["Left","Right"],qb=["Top","Bottom"],rb=s.defaultView&&s.defaultView.getComputedStyle,Pa=c.support.cssFloat?"cssFloat":"styleFloat",ja=
+function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return X(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!kb.test(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return w;if((b==="width"||b==="height")&&parseFloat(d)<0)d=w;var f=a.style||a,e=d!==w;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""==="NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter=
+Na.test(a)?a.replace(Na,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Oa.exec(f.filter)[1])/100+"":""}if(ha.test(b))b=Pa;b=b.replace(ia,ja);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){var e,j=b==="width"?pb:qb;function i(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(j,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+=parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a,
+"border"+this+"Width",true))||0})}a.offsetWidth!==0?i():c.swap(a,ob,i);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){f=Oa.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ha.test(b))b=Pa;if(!d&&e&&e[b])f=e[b];else if(rb){if(ha.test(b))b="float";b=b.replace(lb,"-$1").toLowerCase();e=a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f=
+a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ia,ja);f=a.currentStyle[b]||a.currentStyle[d];if(!mb.test(f)&&nb.test(f)){b=e.left;var j=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=j}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]=f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=
+a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var sb=J(),tb=/