cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bfede...@apache.org
Subject [1/2] git commit: updated refs/heads/master to 47dd482
Date Tue, 30 Apr 2013 20:41:14 GMT
Updated Branches:
  refs/heads/master c7143be7c -> 47dd4828d


VM wizard: Show message if no affinity groups are available.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/1a4a319d
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/1a4a319d
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/1a4a319d

Branch: refs/heads/master
Commit: 1a4a319d32ce507df95c7cdce65a915a672f311e
Parents: c7143be
Author: Brian Federle <brian.federle@citrix.com>
Authored: Tue Apr 30 13:14:31 2013 -0700
Committer: Brian Federle <brian.federle@citrix.com>
Committed: Tue Apr 30 13:30:40 2013 -0700

----------------------------------------------------------------------
 .../WEB-INF/classes/resources/messages.properties  |    2 +
 ui/css/cloudstack3.css                             |    6 +++
 ui/dictionary.jsp                                  |    2 +
 ui/scripts/ui-custom/instanceWizard.js             |   31 +++++++++-----
 4 files changed, 30 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1a4a319d/client/WEB-INF/classes/resources/messages.properties
----------------------------------------------------------------------
diff --git a/client/WEB-INF/classes/resources/messages.properties b/client/WEB-INF/classes/resources/messages.properties
index 2145e7f..1638be1 100644
--- a/client/WEB-INF/classes/resources/messages.properties
+++ b/client/WEB-INF/classes/resources/messages.properties
@@ -14,6 +14,8 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
+message.select.affinity.groups=Please select any affinity groups you want this VM to belong
to:
+message.no.affinity.groups=You do not have any affinity groups. Please continue to the next
step.
 label.action.delete.nic=Remove NIC
 message.action.delete.nic=Please confirm that want to remove this NIC, which will also remove
the associated network from the VM. 
 changed.item.properties=Changed item properties

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1a4a319d/ui/css/cloudstack3.css
----------------------------------------------------------------------
diff --git a/ui/css/cloudstack3.css b/ui/css/cloudstack3.css
index eac0b20..cb59216 100644
--- a/ui/css/cloudstack3.css
+++ b/ui/css/cloudstack3.css
@@ -5716,6 +5716,12 @@ label.error {
   margin: 10px 10px 0px;
 }
 
+.multi-wizard .select-container p {
+  padding: 11px;
+  color: #424242;
+  background: #DFDFDF;
+}
+
 .multi-wizard .select-container .select {
   font-size: 13px;
   margin: -1px 0 0;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1a4a319d/ui/dictionary.jsp
----------------------------------------------------------------------
diff --git a/ui/dictionary.jsp b/ui/dictionary.jsp
index dd76c14..ded9ea0 100644
--- a/ui/dictionary.jsp
+++ b/ui/dictionary.jsp
@@ -25,6 +25,8 @@ under the License.
 <% long now = System.currentTimeMillis(); %>
 <script language="javascript">
 dictionary = {
+'message.select.affinity.groups': '<fmt:message key="message.select.affinity.groups" />',
+'message.no.affinity.groups': '<fmt:message key="message.no.affinity.groups" />',
 'label.action.delete.nic': '<fmt:message key="label.action.delete.nic" />',
 'message.action.delete.nic': '<fmt:message key="message.action.delete.nic" />',
 'changed.item.properties': '<fmt:message key="changed.item.properties" />',

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1a4a319d/ui/scripts/ui-custom/instanceWizard.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui-custom/instanceWizard.js b/ui/scripts/ui-custom/instanceWizard.js
index 2cb352a..bdc05c1 100644
--- a/ui/scripts/ui-custom/instanceWizard.js
+++ b/ui/scripts/ui-custom/instanceWizard.js
@@ -485,17 +485,26 @@
           'affinity': function($step, formData) {
             return {
               response: {
-                success: function(args) {
-                  $step.find('.select-container').append(
-                    makeSelects('affinity-groups', args.data.affinityGroups, {
-                      name: 'name',
-                      desc: 'description',
-                      id: 'id'
-                    }, {
-                      type: 'checkbox',
-                      'wizard-field': 'affinity-groups'
-                    })
-                  );
+                success: function(args) {                  
+                  if (args.data.affinityGroups && args.data.affinityGroups.length)
{
+                    $step.prepend(
+                      $('<div>').addClass('main-desc').append(
+                        $('<p>').html(_l('message.select.affinity.groups'))
+                      )
+                    );
+                    $step.find('.select-container').append(
+                      makeSelects('affinity-groups', args.data.affinityGroups, {
+                        name: 'name',
+                        desc: 'description',
+                        id: 'id'
+                      }, {
+                        type: 'checkbox',
+                        'wizard-field': 'affinity-groups'
+                      })
+                    ); 
+                  } else {
+                    $step.find('.select-container').append($('<p>').html(_l('message.no.affinity.groups')));
+                  }
                 }
               }
             };


Mime
View raw message