Bug #1487

UI fails on initial load if one of the machines uses an Image without the 'size' metadata key set

Added by Vangelis Koukis almost 10 years ago. Updated over 9 years ago.

Status:Closed Start date:10/12/2011
Priority:Medium Due date:11/11/2011
Assignee:Kostas Papadimitriou % Done:

50%

Category:Cyclades UI Spent time: -
Target version:v0.8.0

Description

Steps to reproduce:

  • Have an Image set without the 'size' metadata key
  • create a machine using this Image, e.g., using kamaki or the API directly
  • Attempt to access the UI: it fails on the initial load
Error report
-------------------
Code: -1
Type: JS Exception
Message: this.sel("image_size").text(image.get("metadata").values.size).attr is not a function
Module: UI
Details: this.sel("image_size").text(image.get("metadata").values.size).attr is not a function<br /><br />cre<br /><br />ateException()@http://dev67.dev.grnet.gr:8000/static/snf-0.7/js/lib/stacktrace.js:42<br /><br />run(null)@http://dev67.dev.grnet.gr:8000/static/snf-0.7/js/lib/stacktrace.js:27<br /><br />printStackTrace()@http://dev67.dev.grnet.gr:8000/static/snf-0.7/js/lib/stacktrace.js:18<br /><br />stacktrace()@http://dev67.dev.grnet.gr:8000/static/snf-0.7/js/utils.js:268<br /><br />handle_ui_error([object Object])@http://dev67.dev.grnet.gr:8000/static/snf-0.7/js/ui/web/ui_main_view.js:428<br /><br />(?)("error",[object Object])@http://dev67.dev.grnet.gr:8000/static/snf-0.7/js/lib/backbone.js:117<br /><br />trigger_error("CRITICAL","this.sel(\"image_size\").text(image.get(\"metadata\").values.size).attr is not a function",[object Object],[object Object])@http://dev67.dev.grnet.gr:8000/static/snf-0.7/js/ui/web/ui_vms_base_view.js:584<br /><br />onerror("this.sel(\"image_size\").text(image.get(\"metadata\").values.size).attr is not a function","http://dev67.dev.grnet.gr:8000/static/snf-0.7/js/ui/web/ui_icon_view.js",557)@http://dev67.dev.grnet.gr:8000/static/snf-0.7/js/ui/web/ui_main_view.js:856

Please describe the actions that triggered the error:

This is a pretty far-fetched, but to improve robustness please make sure that the UI can handle lack of any missing metadata keys gracefully.

This is for v0.8.

Associated revisions

Revision 5a434360
Added by Kostas Papadimitriou almost 10 years ago

Consistent image size display in UI, Refs #1487

History

#1 Updated by Kostas Papadimitriou almost 10 years ago

  • Status changed from Assigned to Feedback
  • % Done changed from 0 to 50

Image size metadata bug fixed in 5a43436.

#2 Updated by Vangelis Koukis almost 10 years ago

  • Due date set to 11/11/2011

#3 Updated by Vangelis Koukis over 9 years ago

  • Status changed from Feedback to Closed

Merged in master, closing ticket.

Also available in: Atom PDF