File tree Expand file tree Collapse file tree
client/WEB-INF/classes/resources Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414# KIND, either express or implied. See the License for the
1515# specific language governing permissions and limitations
1616# under the License.
17+ label.sockets =Sockets
1718label.root.disk.size =Root disk size
1819label.s3.nfs.server =S3 NFS Server
1920label.s3.nfs.path =S3 NFS Path
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ under the License.
2525<% long now = System . currentTimeMillis(); % >
2626<script language =" javascript" >
2727dictionary = {
28+ ' label.sockets' : ' <fmt:message key="label.sockets" />' ,
2829' label.root.disk.size' : ' <fmt:message key="label.root.disk.size" />' ,
2930' label.s3.nfs.path' : ' <fmt:message key="label.s3.nfs.path" />' ,
3031' label.s3.nfs.server' : ' <fmt:message key="label.s3.nfs.server" />' ,
Original file line number Diff line number Diff line change 11261126 view-all-target =" virtualRouters" ><fmt:message key =" label.view.all" /></span >
11271127 </li >
11281128 </ul >
1129+
1130+ <div class =" socket-info" >
1131+ <div class =" title" >Socket info</div >
1132+ <ul ></ul >
1133+ </div >
11291134 </div >
11301135 </div >
11311136
Original file line number Diff line number Diff line change 364364 return total;
365365 };
366366
367- complete ($.extend(data, {
367+ dataFns.socketInfo ($.extend(data, {
368368 cpuCapacityTotal: capacityTotal(1, cloudStack.converters.convertHz),
369369 memCapacityTotal: capacityTotal(0, cloudStack.converters.convertBytes),
370370 storageCapacityTotal: capacityTotal(2, cloudStack.converters.convertBytes)
371371 }));
372372 }
373373 });
374374 } else {
375- complete ($.extend(data, {
375+ dataFns.socketInfo ($.extend(data, {
376376 cpuCapacityTotal: cloudStack.converters.convertHz(0),
377377 memCapacityTotal: cloudStack.converters.convertBytes(0),
378378 storageCapacityTotal: cloudStack.converters.convertBytes(0)
379379 }));
380380 }
381+ },
382+
383+ socketInfo: function(args) {
384+ complete($.extend(args.data, {
385+ socketInfo: [
386+ {
387+ name: 'XenServer',
388+ hosts: 0,
389+ sockets: 0
390+ },
391+ {
392+ name: 'VMware',
393+ hosts: 0,
394+ sockets: 0
395+ },
396+ {
397+ name: 'KVM',
398+ hosts: 0,
399+ sockets: 0
400+ },
401+ {
402+ name: 'Hyper-V',
403+ hosts: 0,
404+ sockets: 0
405+ }
406+ ]
407+ }));
381408 }
382409 };
383410
Original file line number Diff line number Diff line change 3838 var $elem = $dashboard . find ( '[data-item=' + key + ']' ) ;
3939 $elem . hide ( ) . html ( value ) . fadeIn ( ) ;
4040 } ) ;
41+
42+ // Socket info
43+ var $socketInfo = $dashboard . find ( '.socket-info ul' ) ;
44+ $ ( args . data . socketInfo ) . each ( function ( ) {
45+ var item = this ;
46+ var name = item . name ;
47+ var hosts = item . hosts ;
48+ var sockets = item . sockets ;
49+
50+ var $li = $ ( '<li>' ) . append (
51+ $ ( '<div>' ) . addClass ( 'name' ) . html ( name ) ,
52+ $ ( '<div>' ) . addClass ( 'hosts' ) . append (
53+ $ ( '<div>' ) . addClass ( 'title' ) . html ( _l ( 'label.hosts' ) ) ,
54+ $ ( '<div>' ) . addClass ( 'value' ) . html ( hosts )
55+ ) ,
56+ $ ( '<div>' ) . addClass ( 'sockets' ) . append (
57+ $ ( '<div>' ) . addClass ( 'title' ) . html ( _l ( 'label.sockets' ) ) ,
58+ $ ( '<div>' ) . addClass ( 'value' ) . html ( sockets )
59+ )
60+ ) ;
61+
62+ $li . appendTo ( $socketInfo ) ;
63+ } ) ;
4164 }
4265 }
4366 } ) ;
You can’t perform that action at this time.
0 commit comments