[hg] galaxy 3055: Changed cloud page to more consistent UI.
details: http://www.bx.psu.edu/hg/galaxy/rev/c28dd8c0a231 changeset: 3055:c28dd8c0a231 user: Enis Afgan <afgane@gmail.com> date: Wed Aug 26 17:34:58 2009 -0400 description: Changed cloud page to more consistent UI. diffstat: lib/galaxy/web/controllers/cloud.py | 7 ++- templates/cloud/configure_cloud.mako | 51 ++++++++++++++----------- templates/cloud/viewInstance.mako | 20 ++++++++-- 3 files changed, 48 insertions(+), 30 deletions(-) diffs (186 lines): diff -r 33c00350d29a -r c28dd8c0a231 lib/galaxy/web/controllers/cloud.py --- a/lib/galaxy/web/controllers/cloud.py Wed Aug 26 12:29:54 2009 -0400 +++ b/lib/galaxy/web/controllers/cloud.py Wed Aug 26 17:34:58 2009 -0400 @@ -208,11 +208,11 @@ @web.expose @web.require_login( "delete Galaxy cloud instance" ) - def edit( self, trans, id ): + def addStorage( self, trans, id ): instance = get_instance( trans, id ) - error( "Editing instance '%s' is not supported yet." % instance.name ) + error( "Adding storage to instance '%s' is not supported yet." % instance.name ) return self.list( trans ) @@ -262,7 +262,8 @@ return trans.show_form( web.FormBuilder( web.url_for(), "Configure new instance", submit_text="Add" ) .add_text( "instanceName", "Instance name", value="Unnamed instance", error=inst_error ) - .add_text( "volSize", "Permanent storage size (1GB - 1000GB)", value='', error=vol_error ) ) + .add_text( "volSize", "Permanent storage size (1GB - 1000GB)" + "<br />Note: you will be able to add more storage later", value='', error=vol_error ) ) @web.expose @web.require_login( "add a cloud image" ) diff -r 33c00350d29a -r c28dd8c0a231 templates/cloud/configure_cloud.mako --- a/templates/cloud/configure_cloud.mako Wed Aug 26 12:29:54 2009 -0400 +++ b/templates/cloud/configure_cloud.mako Wed Aug 26 17:34:58 2009 -0400 @@ -79,12 +79,16 @@ </ul> <table class="mange-table colored" border="0" cellspacing="0" cellpadding="0" width="100%"> - <tr class="header"> + <colgroup width="40%"></colgroup> + <colgroup width="15%"></colgroup> + <colgroup width="10%"></colgroup> + <colgroup width="35%"></colgroup> + <tr class="header"> <th>Live instances</th> + <th>Volume size (GB)</th> <th>State</th> <th>Alive since</th> - <th>Action</th> - <th></th> + <th></th> </tr> %if liveInstances: %for i, liveInstance in enumerate( liveInstances ): @@ -93,7 +97,8 @@ ${liveInstance.name} <a id="li-${i}-popup" class="popup-arrow" style="display: none;">▼</a> </td> - <td>${str(liveInstance.state)}</td> + <td>${str(liveInstance.name)}</td> <!--TODO:Replace with vol size once available--> + <td>${str(liveInstance.state)}</td> <td> ${str(liveInstance.launch_time)[:16]} <% @@ -115,13 +120,10 @@ %>) </td> <td> - <a class="action-button" href="${h.url_for( action='stop', id=trans.security.encode_id(liveInstance.id) )}">Stop</a> - </td> - <td> <div popupmenu="li-${i}-popup"> + <a class="action-button" confirm="Are you sure you want to stop instance '${liveInstance.name}'?" href="${h.url_for( action='stop', id=trans.security.encode_id(liveInstance.id) )}">Stop</a> + <a class="action-button" href="${h.url_for( action='renameInstance', id=trans.security.encode_id(liveInstance.id) )}">Rename</a> <a class="action-button" href="${h.url_for( action='viewInstance', id=trans.security.encode_id(liveInstance.id) )}">View details</a> - <a class="action-button" href="${h.url_for( action='renameInstance', id=trans.security.encode_id(liveInstance.id) )}">Rename</a> - <a class="action-button" confirm="Are you sure you want to stop instance '${liveInstance.name}'?" href="${h.url_for( action='stop', id=trans.security.encode_id(liveInstance.id) )}">Stop</a> </div> </td> </tr> @@ -135,13 +137,20 @@ ## ***************************************************** ## Manage previously configured instances - <p /> <p /> <table class="mange-table colored" border="0" cellspacing="0" cellpadding="0" width="100%"> - <tr class="header"> + <colgroup width="40%"></colgroup> + <colgroup width="15%"></colgroup> + <colgroup width="10%"></colgroup> + <colgroup width="35%"></colgroup> + <tr class="header"> <th>Previously configured instances</th> - <th>Volume size</th> - <th>Action</th> - <th></th> + ##<th>Volume size (GB)</th> + ##<th>State</th> + ##<th>Alive since</th> + <th></th> + <th></th> + <th></th> + <th></th> </tr> %if prevInstances: @@ -152,18 +161,14 @@ <a id="pi-${i}-popup" class="popup-arrow" style="display: none;">▼</a> </td> ## Comment <td>${len(workflow.latest_workflow.steps)}</td> - ## Chnage to show vol size once available - <td>${str(prevInstance.name)}</td> + <td>${str(prevInstance.name)}</td> <!-- TODO: Change to show vol size once available--> + <td>${str(prevInstance.state)}</td> <td> - <a class="action-button" href="${h.url_for( action='start', id=trans.security.encode_id(prevInstance.id) )}">Start</a> - </td> - - <td> <div popupmenu="pi-${i}-popup"> - ##<a class="action-button" href="${h.url_for( action='viewInstance', id=trans.security.encode_id(prevInstance.id) )}">View details</a> + <a class="action-button" href="${h.url_for( action='start', id=trans.security.encode_id(prevInstance.id) )}">Start</a> <a class="action-button" href="${h.url_for( action='renameInstance', id=trans.security.encode_id(prevInstance.id) )}">Rename</a> - <a class="action-button" href="${h.url_for( action='edit', id=trans.security.encode_id(prevInstance.id) )}" target="_parent">Edit</a> - <a class="action-button" confirm="Are you sure you want to delete instance '${prevInstance.name}'?" href="${h.url_for( action='deleteInstance', id=trans.security.encode_id(prevInstance.id) )}">Delete</a> + <a class="action-button" href="${h.url_for( action='addStorage', id=trans.security.encode_id(prevInstance.id) )}" target="_parent">Add storage</a> + <a class="action-button" confirm="Are you sure you want to delete instance '${prevInstance.name}'? This will delete all of your data assocaiated with this instance!" href="${h.url_for( action='deleteInstance', id=trans.security.encode_id(prevInstance.id) )}">Delete</a> </div> </td> </tr> diff -r 33c00350d29a -r c28dd8c0a231 templates/cloud/viewInstance.mako --- a/templates/cloud/viewInstance.mako Wed Aug 26 12:29:54 2009 -0400 +++ b/templates/cloud/viewInstance.mako Wed Aug 26 17:34:58 2009 -0400 @@ -46,14 +46,18 @@ %> ago) </td> </tr> + %if liveInstance.instance_id != None: + <tr> + <td> Instance ID: </td> + <td> ${liveInstance.instance_id} </td> + </tr> + %endif + %if liveInstance.reservation_id != None: <tr> - <td> Instance ID: </td> - <td> ${liveInstance.instance_id} </td> - </tr> - <tr> <td> Reservation ID: </td> <td> ${liveInstance.reservation_id} </td> </tr> + %endif <tr> <td> AMI: </td> <td> ${liveInstance.ami} </td> @@ -66,18 +70,25 @@ <td> Public DNS:</td> <td> ${liveInstance.public_dns} </td> </tr> + %if liveInstance.private_dns != None: <tr> <td> Private DNS:</td> <td> ${liveInstance.private_dns} </td> </tr> + %endif + %if liveInstance.availability_zone != None: <tr> <td> Availabilty zone:</td> <td> ${liveInstance.availability_zone} </td> </tr> + %endif + %if liveInstance.keypair_fingerprint != None: <tr> <td> Keypair fingerprint:</td> <td> ${liveInstance.keypair_fingerprint} </td> </tr> + %endif + %if liveInstance.keypair_material != None: <tr> <td> Keypair private key:</td> <td> @@ -98,6 +109,7 @@ </div> </td> </tr> + %endif </table> %else: There is no live instance under that name.
participants (1)
-
Greg Von Kuster