diff --git a/test/test_actions.sh b/test/test_actions.sh index 1e4396bd..c57df4fb 100755 --- a/test/test_actions.sh +++ b/test/test_actions.sh @@ -6,14 +6,14 @@ V_BIN="$VESTA/bin" V_TEST="$VESTA/test" # Define functions -tmp_user() { +random() { MATRIX='0123456789' - LENGTH=4 + LENGTH=$1 while [ ${n:=1} -le $LENGTH ]; do rand="$rand${MATRIX:$(($RANDOM%${#MATRIX})):1}" let n+=1 done - echo "tmp_$rand" + echo "$rand" } echo_result() { @@ -25,8 +25,8 @@ echo_result() { echo -n 'FAILED' echo -n ']' echo -ne '\r\n' - echo "$4" - echo "RETURN VALUE $2" + echo ">>> $4" + echo ">>> RETURN VALUE $2" cat $3 else echo -n ' OK ' @@ -36,54 +36,63 @@ echo_result() { } # Create random username -user=$(tmp_user) +user="tmp_$(random 4)" while [ ! -z "$(grep "^$user:" /etc/passwd)" ]; do - user=$(tmp_user) + user="tmp_$(random 4)" done # Create random tmpfile tmpfile=$(mktemp -p /tmp ) + # Add new user cmd="v_add_user $user $user $user@vestacp.com default Super Test" $cmd > $tmpfile 2>> $tmpfile echo_result "Adding new user $user" "$?" "$tmpfile" "$cmd" + # Change system shell cmd="v_change_user_shell $user bash" $cmd > $tmpfile 2>> $tmpfile echo_result "Changing system shell to /bin/bash" "$?" "$tmpfile" "$cmd" + # Change name servers cmd="v_change_user_ns $user ns0.com ns1.com ns2.com ns3.com" $cmd > $tmpfile 2>> $tmpfile echo_result "Changing nameservers" "$?" "$tmpfile" "$cmd" + # Add cron job cmd="v_add_cron_job $user 1 1 1 1 1 echo" $cmd > $tmpfile 2>> $tmpfile echo_result "Adding cron job" "$?" "$tmpfile" "$cmd" + # Suspend cron job cmd="v_suspend_cron_job $user 1" $cmd > $tmpfile 2>> $tmpfile echo_result "Suspending cron job" "$?" "$tmpfile" "$cmd" + # Unsuspend cron job cmd="v_unsuspend_cron_job $user 1" $cmd > $tmpfile 2>> $tmpfile echo_result "Unsuspending cron job" "$?" "$tmpfile" "$cmd" + # Delete cron job cmd="v_delete_cron_job $user 1" $cmd > $tmpfile 2>> $tmpfile echo_result "Deleting cron job" "$?" "$tmpfile" "$cmd" + # Add cron job cmd="v_add_cron_job $user 1 1 1 1 1 echo 1" $cmd > $tmpfile 2>> $tmpfile echo_result "Adding cron job" "$?" "$tmpfile" "$cmd" + # Add cron job cmd="v_add_cron_job $user 1 1 1 1 1 echo 1" $cmd > $tmpfile 2>> $tmpfile @@ -94,9 +103,28 @@ else fi echo_result "Dublicate cron job check" "$retval" "$tmpfile" "$cmd" -# Check ip -#cat /proc/net/dev|cut -f 1 -d :|tail -n1 -#v_add_sys_ip 192.168.11.11 255.255.255.255 venet0 ekho + +# List network interfaces +cmd="v_list_sys_interfaces plain" +interface=$($cmd 2> $tmpfile | head -n 1) +if [ -z "$interface" ]; then + echo_result "Listing network interfaces" "1" "$tmpfile" "$cmd" +else + echo_result "Listing network interfaces" "0" "$tmpfile" "$cmd" +fi + + +# Add new ip address +cmd="v_add_sys_ip 198.18.0.123 255.255.255.255 $interface $user" +$cmd > $tmpfile 2>> $tmpfile +echo_result "Adding ip 198.18.0.123" "$?" "$tmpfile" "$cmd" + + +# Delete ip address +cmd="v_delete_sys_ip 198.18.0.123" +$cmd > $tmpfile 2>> $tmpfile +echo_result "Deleting ip 198.18.0.123" "$?" "$tmpfile" "$cmd" + # Delete new user cmd="v_delete_user $user" diff --git a/web/css/main.css b/web/css/main.css index 6f4f5943..1d209ea4 100644 --- a/web/css/main.css +++ b/web/css/main.css @@ -1584,10 +1584,14 @@ input::-moz-focus-inner{ background-color:#FFFFCB; } .b-new-entry select.styled{ - top:10px; + top:0; } .b-new-entry option{ - font:14px arial,sans-serif; + padding:5px 5px 5px 8px; + font-family:Arial, Helvetica, sans-serif; + font-size:14px; + font-weight:bold; + color:#555; } .b-new-entry .form-options-group{} diff --git a/web/images/checkbox-selector.png b/web/images/checkbox-selector.png index f2005fbf..698ac83b 100644 Binary files a/web/images/checkbox-selector.png and b/web/images/checkbox-selector.png differ diff --git a/web/images/checkboxes.png b/web/images/checkboxes.png new file mode 100644 index 00000000..b3704072 Binary files /dev/null and b/web/images/checkboxes.png differ diff --git a/web/images/chekbox-selector.png b/web/images/chekbox-selector.png index 23f9ef1d..f2005fbf 100644 Binary files a/web/images/chekbox-selector.png and b/web/images/chekbox-selector.png differ diff --git a/web/images/fav.ico b/web/images/fav.ico index 7c26ae9d..a1ef0199 100644 Binary files a/web/images/fav.ico and b/web/images/fav.ico differ diff --git a/web/images/form-checkboxes.png b/web/images/form-checkboxes.png new file mode 100644 index 00000000..fadce3ea Binary files /dev/null and b/web/images/form-checkboxes.png differ diff --git a/web/images/section-status-sprite-7.png b/web/images/section-status-sprite-7.png new file mode 100644 index 00000000..f17efb73 Binary files /dev/null and b/web/images/section-status-sprite-7.png differ diff --git a/web/index.html b/web/index.html index febb7127..92b4a2f3 100644 --- a/web/index.html +++ b/web/index.html @@ -82,7 +82,6 @@
For questions please contact ~!:EMAIL~!
\ + © ~!:YEAR~! Vesta Control Panel\ +For questions please contact ~!:EMAIL~!
\ + © ~!:YEAR~! Vesta Control Panel\ +For questions please contact ~!:EMAIL~!
\ + © ~!:YEAR~! Vesta Control Panel\ +For questions please contact ~!:EMAIL~!
\ + © ~!:YEAR~! Vesta Control Panel\ +