From b4093f2cb83e61d50167ffbaba52a2826b71d966 Mon Sep 17 00:00:00 2001 From: Daniel Molina Date: Wed, 7 Nov 2012 15:53:44 +0100 Subject: [PATCH] bug #1587: Fix progress bar size in Sunstone when the percentage is over 100% --- src/cli/onetemplate | 2 +- src/sunstone/public/js/sunstone-util.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/cli/onetemplate b/src/cli/onetemplate index 462613b616..a69bece307 100755 --- a/src/cli/onetemplate +++ b/src/cli/onetemplate @@ -93,7 +93,7 @@ cmd=CommandParser::CmdParser.new(ARGV) do - using two disks: - onevm create --name "test vm" --memory 128 --cpu 1 --disk arch,data + onetempate create --name "test vm" --memory 128 --cpu 1 --disk arch,data EOT diff --git a/src/sunstone/public/js/sunstone-util.js b/src/sunstone/public/js/sunstone-util.js index 3cef9dcb2c..c2bc9fb84b 100644 --- a/src/sunstone/public/js/sunstone-util.js +++ b/src/sunstone/public/js/sunstone-util.js @@ -1216,6 +1216,8 @@ function quotaListItem(quota_json){ Options: object with width, height, label and fontSize as keys */ function progressBar(value, opts){ + if (value > 100) value = 100; + if (!opts) opts = {}; if (!opts.width) opts.width = 'auto';