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 be5a7b4
Date Tue, 29 Oct 2013 21:18:03 GMT
Updated Branches:
  refs/heads/master f0a8aa7f5 -> be5a7b45f


CLOUDSTACK-4908: UI for report CPU sockets

-Adds socket info for hypervisors on infrastructure chart

-Displays # of sockets, and # of hosts

-Currently only dummy data set to 0 for all info


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

Branch: refs/heads/master
Commit: bed42deb8835760e98a39902a698c38dbd17b414
Parents: f0a8aa7
Author: Brian Federle <brian.federle@citrix.com>
Authored: Tue Oct 29 14:16:25 2013 -0700
Committer: Brian Federle <brian.federle@citrix.com>
Committed: Tue Oct 29 14:16:25 2013 -0700

----------------------------------------------------------------------
 .../classes/resources/messages.properties       |  1 +
 ui/dictionary.jsp                               |  1 +
 ui/index.jsp                                    |  5 ++++
 ui/scripts/system.js                            | 31 ++++++++++++++++++--
 ui/scripts/ui-custom/physicalResources.js       | 23 +++++++++++++++
 5 files changed, 59 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bed42deb/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 e5b06ec..3210aca 100644
--- a/client/WEB-INF/classes/resources/messages.properties
+++ b/client/WEB-INF/classes/resources/messages.properties
@@ -14,6 +14,7 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
+label.sockets=Sockets
 label.root.disk.size=Root disk size
 label.s3.nfs.server=S3 NFS Server
 label.s3.nfs.path=S3 NFS Path

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bed42deb/ui/dictionary.jsp
----------------------------------------------------------------------
diff --git a/ui/dictionary.jsp b/ui/dictionary.jsp
index f9fe088..35cba22 100644
--- a/ui/dictionary.jsp
+++ b/ui/dictionary.jsp
@@ -25,6 +25,7 @@ under the License.
 <% long now = System.currentTimeMillis(); %>
 <script language="javascript">
 dictionary = {
+'label.sockets': '<fmt:message key="label.sockets" />',
 'label.root.disk.size': '<fmt:message key="label.root.disk.size" />',
 'label.s3.nfs.path': '<fmt:message key="label.s3.nfs.path" />',
 'label.s3.nfs.server': '<fmt:message key="label.s3.nfs.server" />',

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bed42deb/ui/index.jsp
----------------------------------------------------------------------
diff --git a/ui/index.jsp b/ui/index.jsp
index eb8ad95..db4d468 100644
--- a/ui/index.jsp
+++ b/ui/index.jsp
@@ -1126,6 +1126,11 @@
                                   view-all-target="virtualRouters"><fmt:message key="label.view.all"/></span>
                         </li>
                     </ul>
+                    
+                    <div class="socket-info">
+                        <div class="title">Socket info</div>
+                        <ul></ul>
+                    </div>
                 </div>
             </div>
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bed42deb/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index 8d8c02c..479883c 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -364,7 +364,7 @@
                                         return total;
                                     };
 
-                                    complete($.extend(data, {
+                                    dataFns.socketInfo($.extend(data, {
                                         cpuCapacityTotal: capacityTotal(1, cloudStack.converters.convertHz),
                                         memCapacityTotal: capacityTotal(0, cloudStack.converters.convertBytes),
                                         storageCapacityTotal: capacityTotal(2, cloudStack.converters.convertBytes)
@@ -372,12 +372,39 @@
                                 }
                             });
                         } else {
-                            complete($.extend(data, {
+                            dataFns.socketInfo($.extend(data, {
                                 cpuCapacityTotal: cloudStack.converters.convertHz(0),
                                 memCapacityTotal: cloudStack.converters.convertBytes(0),
                                 storageCapacityTotal: cloudStack.converters.convertBytes(0)
                             }));
                         }
+                    },
+
+                    socketInfo: function(args) {
+                        complete($.extend(args.data, {
+                            socketInfo: [
+                                {
+                                    name: 'XenServer',
+                                    hosts: 0,
+                                    sockets: 0
+                                },
+                                {
+                                    name: 'VMware',
+                                    hosts: 0,
+                                    sockets: 0
+                                },
+                                {
+                                    name: 'KVM',
+                                    hosts: 0,
+                                    sockets: 0
+                                },
+                                {
+                                    name: 'Hyper-V',
+                                    hosts: 0,
+                                    sockets: 0
+                                }
+                            ]
+                        }));
                     }
                 };
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bed42deb/ui/scripts/ui-custom/physicalResources.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui-custom/physicalResources.js b/ui/scripts/ui-custom/physicalResources.js
index f1492eb..b41400a 100644
--- a/ui/scripts/ui-custom/physicalResources.js
+++ b/ui/scripts/ui-custom/physicalResources.js
@@ -38,6 +38,29 @@
                             var $elem = $dashboard.find('[data-item=' + key + ']');
                             $elem.hide().html(value).fadeIn();
                         });
+
+                        // Socket info
+                        var $socketInfo = $dashboard.find('.socket-info ul');  
+                        $(args.data.socketInfo).each(function() {
+                            var item = this;
+                            var name = item.name;
+                            var hosts = item.hosts;
+                            var sockets = item.sockets;
+
+                            var $li = $('<li>').append(
+                                $('<div>').addClass('name').html(name),
+                                $('<div>').addClass('hosts').append(
+                                    $('<div>').addClass('title').html(_l('label.hosts')),
+                                    $('<div>').addClass('value').html(hosts)
+                                ),
+                                $('<div>').addClass('sockets').append(
+                                    $('<div>').addClass('title').html(_l('label.sockets')),
+                                    $('<div>').addClass('value').html(sockets)
+                                )
+                            );
+
+                            $li.appendTo($socketInfo);
+                        });                        
                     }
                 }
             });


Mime
View raw message