commit b722cab3b8a0178fb131654415445242cf08b5c4
Author: Adam Menz <adam.menz@rackspace.com>
Date:   Thu Jul 21 14:25:16 2011 -0500

    added new load balancing features
    working now is add/remove lb, add/remove nodes
    and edit lb/nodes

diff --git a/res/layout/view_loadbalancer.xml b/res/layout/view_loadbalancer.xml
index d8437c3..96454d2 100644
--- a/res/layout/view_loadbalancer.xml
+++ b/res/layout/view_loadbalancer.xml
@@ -1,268 +1,144 @@
 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
 	android:id="@+id/view_loadbalncer_layout" android:orientation="vertical"
-	android:layout_width="fill_parent" android:layout_height="fill_parent"
-	android:background="@drawable/rack_bg_transparent">
-	<ImageView android:id="@+id/headerimage"
-		android:layout_width="wrap_content" android:layout_height="80dip"/>
+	android:layout_width="fill_parent" android:layout_height="fill_parent">
 	<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
-		android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1">
+		android:layout_width="fill_parent" android:layout_height="fill_parent"
+		android:layout_weight="1">
 		<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
 			android:id="@+id/view_layout_layout" android:orientation="vertical"
 			android:layout_width="fill_parent" android:layout_height="fill_parent">
 			<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
 				android:id="@+id/view_loadbalancer_layout" android:orientation="vertical"
-				android:layout_width="fill_parent" android:layout_height="wrap_content"
-				android:paddingLeft="5dip" android:background="@drawable/itemsbox">
-				<TextView android:layout_height="wrap_content"
-					android:layout_width="fill_parent" android:layout_marginLeft="22dip"
-					android:layout_marginRight="30dip" android:scrollHorizontally="true"
-					android:gravity="fill_horizontal" android:textSize="20.0sp"
-					android:textColor="#fff" android:layout_marginTop="30dip"
-					android:paddingBottom="10dip" android:text="LoadBalancer" />
+				android:layout_width="fill_parent" android:paddingLeft="5dip" android:layout_height="wrap_content">
 
 				<!-- ID -->
 				<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-					android:id="@+id/view_lb_id_layout" android:orientation="horizontal"
-					android:layout_width="fill_parent" android:layout_height="wrap_content">
+					android:id="@+id/view_lb_id_layout" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical" android:layout_marginTop="10dip">
 					<TextView android:layout_width="wrap_content"
 						android:layout_height="wrap_content" android:layout_marginLeft="22dip"
 						android:paddingLeft="5dip" android:text="ID: " android:singleLine="false"
-						android:textStyle="bold" android:textColor="#333"/>
+						android:textStyle="bold" android:textColor="#333" />
 					<TextView android:id="@+id/view_lb_id"
 						android:layout_height="wrap_content" android:layout_width="fill_parent"
 						android:layout_marginRight="30dip" android:scrollHorizontally="true"
-						android:gravity="fill_horizontal" android:textColor="#fff" />
+						android:gravity="fill_horizontal" android:textColor="#fff" android:layout_marginLeft="22dip" android:textSize="20.0sp" android:textStyle="bold" android:paddingLeft="5dip"/>
 				</LinearLayout>
 				<!-- Name -->
 				<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-					android:id="@+id/view_name_layout" android:orientation="horizontal"
-					android:layout_width="fill_parent" android:layout_height="wrap_content">
+					android:id="@+id/view_name_layout" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical">
 					<TextView android:layout_width="wrap_content"
 						android:layout_height="wrap_content" android:layout_marginLeft="22dip"
-						android:paddingLeft="5dip" android:text="ID: " android:singleLine="false"
-						android:textStyle="bold" android:textColor="#333"/>
+						android:paddingLeft="5dip" android:singleLine="false"
+						android:textStyle="bold" android:textColor="#333" android:text="Name: "/>
 					<TextView android:id="@+id/view_name"
 						android:layout_height="wrap_content" android:layout_width="fill_parent"
 						android:layout_marginRight="30dip" android:scrollHorizontally="true"
-						android:gravity="fill_horizontal" android:textColor="#fff" />
+						android:gravity="fill_horizontal" android:textColor="#fff" android:layout_marginLeft="22dip" android:textSize="20.0sp" android:textStyle="bold" android:paddingLeft="5dip"/>
 				</LinearLayout>
 				<!-- Protocol -->
 				<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-					android:id="@+id/view_protocol_layout" android:orientation="horizontal"
-					android:layout_width="fill_parent" android:layout_height="wrap_content">
+					android:id="@+id/view_protocol_layout" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical">
 					<TextView android:layout_width="wrap_content"
 						android:layout_height="wrap_content" android:layout_marginLeft="22dip"
 						android:paddingLeft="5dip" android:text="Protocol: "
-						android:singleLine="false" android:textStyle="bold" android:textColor="#333"/>
+						android:singleLine="false" android:textStyle="bold"
+						android:textColor="#333" />
 					<TextView android:id="@+id/view_protocol"
 						android:layout_height="wrap_content" android:layout_width="fill_parent"
 						android:layout_marginRight="30dip" android:scrollHorizontally="true"
-						android:gravity="fill_horizontal" android:textColor="#fff" />
+						android:gravity="fill_horizontal" android:textColor="#fff" android:layout_marginLeft="22dip" android:textSize="20.0sp" android:textStyle="bold" android:paddingLeft="5dip"/>
 				</LinearLayout>
 				<!-- Port -->
 				<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-					android:id="@+id/view_port_layout" android:orientation="horizontal"
-					android:layout_width="fill_parent" android:layout_height="wrap_content">
+					android:id="@+id/view_port_layout" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical">
 					<TextView android:layout_width="wrap_content"
 						android:layout_height="wrap_content" android:layout_marginLeft="22dip"
 						android:paddingLeft="5dip" android:text="Port: "
-						android:singleLine="false" android:textStyle="bold" android:textColor="#333"/>
+						android:singleLine="false" android:textStyle="bold"
+						android:textColor="#333" />
 					<TextView android:id="@+id/view_port"
 						android:layout_height="wrap_content" android:layout_width="fill_parent"
 						android:layout_marginRight="30dip" android:scrollHorizontally="true"
-						android:gravity="fill_horizontal" android:textColor="#fff" />
+						android:gravity="fill_horizontal" android:textColor="#fff" android:layout_marginLeft="22dip" android:textSize="20.0sp" android:textStyle="bold" android:paddingLeft="5dip"/>
 				</LinearLayout>
 				<!-- Algorithm -->
 				<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-					android:id="@+id/view_algorithm_layout" android:orientation="horizontal"
-					android:layout_width="fill_parent" android:layout_height="wrap_content">
+					android:id="@+id/view_algorithm_layout" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical">
 					<TextView android:layout_width="wrap_content"
 						android:layout_height="wrap_content" android:layout_marginLeft="22dip"
 						android:paddingLeft="5dip" android:text="Algorithm: "
-						android:singleLine="false" android:textStyle="bold" android:textColor="#333"/>
+						android:singleLine="false" android:textStyle="bold"
+						android:textColor="#333" />
 					<TextView android:id="@+id/view_algorithm"
 						android:layout_height="wrap_content" android:layout_width="fill_parent"
 						android:layout_marginRight="30dip" android:scrollHorizontally="true"
-						android:gravity="fill_horizontal" android:textColor="#fff" />
+						android:gravity="fill_horizontal" android:textColor="#fff" android:layout_marginLeft="22dip" android:textSize="20.0sp" android:textStyle="bold" android:paddingLeft="5dip"/>
 				</LinearLayout>
 				<!-- Status -->
 				<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-					android:id="@+id/view_status_layout" android:orientation="horizontal"
-					android:layout_width="fill_parent" android:layout_height="wrap_content">
+					android:id="@+id/view_status_layout" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical">
 					<TextView android:layout_width="wrap_content"
 						android:layout_height="wrap_content" android:layout_marginLeft="22dip"
 						android:paddingLeft="5dip" android:text="Status: "
-						android:singleLine="false" android:textStyle="bold" android:textColor="#333"/>
+						android:singleLine="false" android:textStyle="bold"
+						android:textColor="#333" />
 					<TextView android:id="@+id/view_status"
 						android:layout_height="wrap_content" android:layout_width="fill_parent"
 						android:layout_marginRight="30dip" android:scrollHorizontally="true"
-						android:gravity="fill_horizontal" android:textColor="#fff" />
+						android:gravity="fill_horizontal" android:textColor="#fff" android:layout_marginLeft="22dip" android:textSize="20.0sp" android:textStyle="bold" android:paddingLeft="5dip"/>
 				</LinearLayout>
 				<!-- ConnectionLogging -->
 				<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-					android:id="@+id/view_islogging_layout" android:orientation="horizontal"
-					android:layout_width="fill_parent" android:layout_height="wrap_content">
+					android:id="@+id/view_islogging_layout" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical">
 					<TextView android:layout_width="wrap_content"
 						android:layout_height="wrap_content" android:layout_marginLeft="22dip"
 						android:paddingLeft="5dip" android:text="Connection Logging: "
-						android:singleLine="false" android:textStyle="bold" android:textColor="#333"/>
+						android:singleLine="false" android:textStyle="bold"
+						android:textColor="#333" android:id="@+id/connection_logging"/>
 					<TextView android:id="@+id/view_islogging"
 						android:layout_height="wrap_content" android:layout_width="fill_parent"
-						android:layout_marginRight="30dip" android:paddingBottom="30dip"
-						android:scrollHorizontally="true" android:gravity="fill_horizontal"
-						android:textColor="#fff" />
+						android:layout_marginRight="30dip" android:scrollHorizontally="true" android:gravity="fill_horizontal"
+						android:textColor="#fff" android:layout_marginLeft="22dip" android:textSize="20.0sp" android:textStyle="bold" android:paddingLeft="5dip"/>
 				</LinearLayout>
 			</LinearLayout>
 			<!-- VirtualIps -->
-			<LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:gravity="center" android:id="@+id/load_balancer_buttons">
-				<Button android:layout_height="wrap_content" android:layout_gravity="center" android:layout_width="wrap_content" android:text="Delete Load Balancer" android:id="@+id/delete_loadbalancer_button"></Button>
-				<Button android:id="@+id/edit_loadbalancer_button" android:layout_height="wrap_content" android:text="Edit Load Balancer" android:layout_gravity="center" android:layout_width="wrap_content"></Button>
-			</LinearLayout>
 			<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
 				android:id="@+id/view_loadbalancer_layout" android:orientation="vertical"
 				android:layout_width="fill_parent" android:layout_height="wrap_content"
-				android:paddingLeft="5dip" android:background="@drawable/itemsbox">
-				<TextView android:layout_height="wrap_content"
-					android:layout_width="fill_parent" android:layout_marginLeft="22dip"
-					android:layout_marginRight="30dip" android:scrollHorizontally="true"
-					android:gravity="fill_horizontal" android:textSize="20.0sp"
-					android:textColor="#fff" android:layout_marginTop="30dip"
-					android:paddingBottom="10dip" android:text="VirtualIps" />
+				android:paddingLeft="5dip">
+				<TextView android:singleLine="false" android:textColor="#333" android:paddingLeft="5dip" android:id="@+id/TextView01" android:layout_width="wrap_content" android:layout_marginLeft="22dip" android:layout_height="wrap_content" android:textStyle="bold" android:text="Virtual IPs"></TextView>
 				<!-- ID -->
-				<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-					android:id="@+id/view_vip_id_layout" android:orientation="horizontal"
-					android:layout_width="fill_parent" android:layout_height="wrap_content">
-					<TextView android:layout_width="wrap_content"
-						android:layout_height="wrap_content" android:layout_marginLeft="22dip"
-						android:paddingLeft="5dip" android:text="ID: " android:singleLine="false"
-						android:textStyle="bold" android:textColor="#333"/>
-					<TextView android:id="@+id/view_vip_id"
-						android:layout_height="wrap_content" android:layout_width="fill_parent"
-						android:layout_marginRight="30dip" android:scrollHorizontally="true"
-						android:gravity="fill_horizontal" android:textColor="#fff" />
-				</LinearLayout>
 				<!-- Ip Address -->
-				<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-					android:id="@+id/view_vip_address_layout" android:orientation="horizontal"
-					android:layout_width="fill_parent" android:layout_height="wrap_content">
-					<TextView android:layout_width="wrap_content"
-						android:layout_height="wrap_content" android:layout_marginLeft="22dip"
-						android:paddingLeft="5dip" android:text="IpAddress: "
-						android:singleLine="false" android:textStyle="bold" android:textColor="#333"/>
-					<TextView android:id="@+id/view_vip_address"
-						android:layout_height="wrap_content" android:layout_width="fill_parent"
-						android:layout_marginRight="30dip" android:scrollHorizontally="true"
-						android:gravity="fill_horizontal" android:textColor="#fff" />
-				</LinearLayout>
 				<!-- IpVersion -->
-				<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-					android:id="@+id/view_ipversion_layout" android:orientation="horizontal"
-					android:layout_width="fill_parent" android:layout_height="wrap_content">
-					<TextView android:layout_width="wrap_content"
-						android:layout_height="wrap_content" android:layout_marginLeft="22dip"
-						android:paddingLeft="5dip" android:text="IpVersion: "
-						android:singleLine="false" android:textStyle="bold" android:textColor="#333"/>
-					<TextView android:id="@+id/view_ipversion"
-						android:layout_height="wrap_content" android:layout_width="fill_parent"
-						android:layout_marginRight="30dip" android:scrollHorizontally="true"
-						android:gravity="fill_horizontal" android:textColor="#fff" />
-				</LinearLayout>
 				<!-- Type -->
-				<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-					android:id="@+id/view_vip_type_layout" android:orientation="horizontal"
-					android:layout_width="fill_parent" android:layout_height="wrap_content">
-					<TextView android:layout_width="wrap_content"
-						android:layout_height="wrap_content" android:layout_marginLeft="22dip"
-						android:paddingLeft="5dip" android:text="Type: "
-						android:singleLine="false" android:textStyle="bold" android:textColor="#333"/>
-					<TextView android:id="@+id/view_vip_type"
-						android:layout_height="wrap_content" android:layout_width="fill_parent"
-						android:layout_marginRight="30dip" android:scrollHorizontally="true"
-						android:gravity="fill_horizontal" android:textColor="#fff" />
+				<LinearLayout android:orientation="vertical" android:layout_height="wrap_content" android:layout_width="fill_parent" android:id="@+id/view_vip_layout" android:paddingLeft="5dip">
+					<LinearLayout android:orientation="vertical" android:layout_height="wrap_content" android:layout_width="fill_parent" android:id="@+id/vip_addresses"></LinearLayout>
 				</LinearLayout>
 			</LinearLayout>
 			<!-- Nodes -->
 			<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
 				android:id="@+id/view_loadbalancer_layout" android:orientation="vertical"
 				android:layout_width="fill_parent" android:layout_height="wrap_content"
-				android:paddingLeft="5dip" android:background="@drawable/itemsbox">
-				<TextView android:layout_height="wrap_content"
-					android:layout_width="fill_parent" android:layout_marginLeft="22dip"
-					android:layout_marginRight="30dip" android:scrollHorizontally="true"
-					android:gravity="fill_horizontal" android:textSize="20.0sp"
-					android:textColor="#fff" android:layout_marginTop="30dip"
-					android:paddingBottom="10dip" android:text="Nodes"/>
+				android:paddingLeft="5dip">
+				<TextView android:singleLine="false" android:textColor="#333" android:paddingLeft="5dip" android:layout_width="wrap_content" android:layout_marginLeft="22dip" android:layout_height="wrap_content" android:textStyle="bold" android:text="Node IPs" android:id="@+id/TextView02"></TextView>
 				<!-- ID -->
-				<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-					android:id="@+id/view_node_id_layout" android:orientation="horizontal"
-					android:layout_width="fill_parent" android:layout_height="wrap_content">
-					<TextView android:layout_width="wrap_content"
-						android:layout_height="wrap_content" android:layout_marginLeft="22dip"
-						android:paddingLeft="5dip" android:text="ID: " android:singleLine="false"
-						android:textStyle="bold" android:textColor="#333" />
-					<TextView android:id="@+id/view_node_id"
-						android:layout_height="wrap_content" android:layout_width="fill_parent"
-						android:layout_marginRight="30dip" android:scrollHorizontally="true"
-						android:gravity="fill_horizontal" android:textColor="#fff" />
-				</LinearLayout>
 				<!-- Address -->
 				<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-					android:id="@+id/view_node_address_layout" android:orientation="horizontal"
-					android:layout_width="fill_parent" android:layout_height="wrap_content">
-					<TextView android:layout_width="wrap_content"
-						android:layout_height="wrap_content" android:layout_marginLeft="22dip"
-						android:paddingLeft="5dip" android:text="Address: "
-						android:singleLine="false" android:textStyle="bold" android:textColor="#333"/>
-					<TextView android:id="@+id/view_node_address"
-						android:layout_height="wrap_content" android:layout_width="fill_parent"
-						android:layout_marginRight="30dip" android:scrollHorizontally="true"
-						android:gravity="fill_horizontal" android:textColor="#fff" />
+					android:id="@+id/view_node_address_layout" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical" android:paddingLeft="5dip">
+					<LinearLayout android:orientation="vertical" android:layout_height="wrap_content" android:layout_width="fill_parent" android:id="@+id/node_addresses"></LinearLayout>
 				</LinearLayout>
 				<!-- Port -->
-				<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-					android:id="@+id/view_node_port_layout" android:orientation="horizontal"
-					android:layout_width="fill_parent" android:layout_height="wrap_content">
-					<TextView android:layout_width="wrap_content"
-						android:layout_height="wrap_content" android:layout_marginLeft="22dip"
-						android:paddingLeft="5dip" android:text="Port: "
-						android:singleLine="false" android:textStyle="bold" android:textColor="#333"/>
-					<TextView android:id="@+id/view_node_port"
-						android:layout_height="wrap_content" android:layout_width="fill_parent"
-						android:layout_marginRight="30dip" android:scrollHorizontally="true"
-						android:gravity="fill_horizontal" android:textColor="#fff" />
-				</LinearLayout>
 				<!-- Condition -->
-				<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-					android:id="@+id/view_node_condition_layout" android:orientation="horizontal"
-					android:layout_width="fill_parent" android:layout_height="wrap_content">
-					<TextView android:layout_width="wrap_content"
-						android:layout_height="wrap_content" android:layout_marginLeft="22dip"
-						android:paddingLeft="5dip" android:text="Condition: "
-						android:singleLine="false" android:textStyle="bold" android:textColor="#333"/>
-					<TextView android:id="@+id/view_node_condition"
-						android:layout_height="wrap_content" android:layout_width="fill_parent"
-						android:layout_marginRight="30dip" android:scrollHorizontally="true"
-						android:gravity="fill_horizontal" android:textColor="#fff" />
-				</LinearLayout>
 				<!-- Status -->
-				<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-					android:id="@+id/view_node_status_layout" android:orientation="horizontal"
-					android:layout_width="fill_parent" android:layout_height="wrap_content">
-					<TextView android:layout_width="wrap_content"
-						android:layout_height="wrap_content" android:layout_marginLeft="22dip"
-						android:paddingLeft="5dip" android:text="Status: "
-						android:singleLine="false" android:textStyle="bold" android:textColor="#333"/>
-					<TextView android:id="@+id/view_node_status"
-						android:layout_height="wrap_content" android:layout_width="fill_parent"
-						android:layout_marginRight="30dip" android:scrollHorizontally="true"
-						android:gravity="fill_horizontal" android:textColor="#fff" />
-				</LinearLayout>
 			</LinearLayout>
-			<LinearLayout android:layout_height="wrap_content" android:layout_width="fill_parent" android:gravity="center" android:id="@+id/node_buttons">
-				<Button android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_gravity="center" android:text="Edit Nodes" android:id="@+id/edit_nodes_button"></Button>
+			<LinearLayout android:id="@+id/load_balancer_buttons" android:layout_width="fill_parent" android:layout_marginTop="10dip" android:layout_height="wrap_content">
+				<Button android:text="Delete Load Balancer" android:id="@+id/delete_loadbalancer_button" android:layout_height="wrap_content" android:layout_gravity="left" android:layout_marginLeft="20dip" android:layout_marginTop="10dip" android:layout_width="130dip"></Button>
+				<Button android:text="Edit Load Balancer" android:id="@+id/edit_loadbalancer_button" android:layout_height="wrap_content" android:layout_marginLeft="10dip" android:layout_marginTop="10dip" android:layout_width="130dip" android:layout_gravity="left"></Button>
+			</LinearLayout>
+			<LinearLayout android:id="@+id/LinearLayout01" android:layout_height="fill_parent" android:layout_width="fill_parent">
+				<Button android:layout_gravity="left" android:layout_width="130dip" android:layout_marginLeft="20dip" android:layout_height="wrap_content" android:id="@+id/edit_nodes_button" android:text="Edit Nodes" android:layout_marginTop="10dip"></Button>
 			</LinearLayout>
 		</LinearLayout>
 	</ScrollView>
-	<ImageView android:id="@+id/footerimage" android:layout_width="wrap_content" android:layout_height="25dip"/>
 </LinearLayout>
