diff --git a/ui/css/cloudstack3.css b/ui/css/cloudstack3.css index b96dbd97388..c3303cc1f2c 100644 --- a/ui/css/cloudstack3.css +++ b/ui/css/cloudstack3.css @@ -563,11 +563,27 @@ div.panel div.list-view { border-bottom: 1px solid #E7E7E7; } +.detail-view div.list-view { + width: 730px; + border: 1px solid #DAD4D4; + margin: 41px auto auto !important; + height: 536px !important; + background: #F7F7F7; +} + div.panel div.list-view div.data-table table { width: 755px; margin-top: 44px; } +.detail-view div.list-view div.data-table table { + width: 703px !important; +} + +.detail-view div.list-view div.data-table table td { + border-left: 1px solid #CACACA; +} + div.panel div.list-view div.fixed-header { position: absolute; top: 28px; @@ -580,6 +596,17 @@ div.panel div.list-view div.fixed-header { z-index: 1; } +.detail-view div.list-view div.fixed-header { + width: 703px !important; + top: 49px !important; + left: 32px !important; + background: #FFFFFF; +} + +.detail-view div.list-view div.fixed-header table { + width: 100% !important; +} + .project-view div.panel div.list-view div.fixed-header { background: #6D747D; } @@ -645,10 +672,10 @@ div.list-view td.state.off { overflow: hidden; display: inline-block; z-index: 2; - /*+placement:shift 0px 1px;*/ + /*+placement:shift 0px 2px;*/ position: relative; left: 0px; - top: 1px; + top: 2px; } .project-view .ui-tabs ul { @@ -1450,6 +1477,10 @@ div.detail-group.actions td { position: absolute; } +.detail-view .ui-tabs-panel div.toolbar { + width: 768px; +} + .project-view div.toolbar { background: #808080 url(../images/bg-nav-item-active-project-view.png) 0px -210px; } diff --git a/ui/scripts-test/system.js b/ui/scripts-test/system.js index 887eb43c32d..4769eb5dbb8 100644 --- a/ui/scripts-test/system.js +++ b/ui/scripts-test/system.js @@ -114,6 +114,7 @@ }, 'management': { detailView: { + viewAll: { path: '_zone.pods', label: 'Pods' }, tabs: { details: { title: 'Details', @@ -143,119 +144,60 @@ args.response.success({ data: testData.data.networks[0] }); } }, - cidr: { - title: 'CIDR', - custom: function(args) { - return $('
').multiEdit({ - noSelect: true, - fields: { - 'cidr': { edit: true, label: 'CIDR' }, - 'add-rule': { - label: 'Add', - addButton: true - } - }, + network: { + title: 'Network', + listView: { + section: 'networks', + id: 'networks', + fields: { + name: { label: 'Name' }, + startip: { label: 'Start IP' }, + endip: { label: 'End IP' }, + vlan: { label: 'VLAN' } + }, + actions: { add: { - label: 'Add', - action: function(args) { - setTimeout(function() { - args.response.success({ - notification: { - label: 'Added VLAN range', - poll: testData.notifications.testPoll - } - }); - }, 500); - } - }, - actions: { - destroy: { - label: 'Remove Rule', - action: function(args) { - setTimeout(function() { - args.response.success({ - notification: { - label: 'Removed VLAN range', - poll: testData.notifications.testPoll - } - }); - }, 500); + label: 'Add network', + createForm: { + title: 'Add network', + desc: 'Please fill in the following to add a guest network', + fields: { + vlan: { + label: 'VLAN ID', + validation: { required: true } + }, + gateway: { + label: 'Gateway', + validation: { required: true } + }, + netmask: { + label: 'Netmask', + validation: { required: true } + }, + startip: { + label: 'Start IP', + validation: { required: true } + }, + endip: { + label: 'Start IP', + validation: { required: true } + } } - } - }, - dataProvider: function(args) { - setTimeout(function() { - args.response.success({ - data: [ - { - cidr: '0.0.0.0/0', - startvlanrange: '1480', endvlanrange: '1559' - } - ] - }); - }, 100); - } - }); - } - }, - vlanRanges: { - title: 'VLAN Ranges', - custom: function(args) { - return $('
').multiEdit({ - noSelect: true, - fields: { - 'startvlanrange': { - edit: true, label: 'Start VLAN' }, - 'endvlanrange': { - edit: true, label: 'End VLAN' - }, - 'add-rule': { - label: 'Add', - addButton: true - } - }, - add: { - label: 'Add', + action: function(args) { - setTimeout(function() { - args.response.success({ - notification: { - label: 'Added VLAN range', - poll: testData.notifications.testPoll - } - }); - }, 500); - } - }, - actions: { - destroy: { - label: 'Remove Rule', - action: function(args) { - setTimeout(function() { - args.response.success({ - notification: { - label: 'Removed VLAN range', - poll: testData.notifications.testPoll - } - }); - }, 500); + args.response.success(); + }, + + messages: { + notification: function(args) { + return 'Added guest network'; } - } - }, - dataProvider: function(args) { - setTimeout(function() { - args.response.success({ - data: [ - { - cidr: '0.0.0.0/0', - startvlanrange: '1480', endvlanrange: '1559' - } - ] - }); - }, 100); + }, + notification: { poll: testData.notifications.testPoll } } - }); + }, + dataProvider: testData.dataProvider.listView('networks') } } } diff --git a/ui/scripts-test/test-data.js b/ui/scripts-test/test-data.js index 57cbbde6ab3..040a9dc720d 100644 --- a/ui/scripts-test/test-data.js +++ b/ui/scripts-test/test-data.js @@ -4997,6 +4997,376 @@ ], networks: [ + { + "id": 269, + "name": "vlan100", + "displaytext": "sumi-network-vlan-100", + "broadcastdomaintype": "Vlan", + "traffictype": "Guest", + "gateway": "182.172.161.1", + "netmask": "255.255.255.0", + "startip": "182.172.161.10", + "endip": "182.172.161.100", + "zoneid": 1, + "networkofferingid": 7, + "networkofferingname": "DefaultDirectNetworkOffering", + "networkofferingdisplaytext": "Direct", + "networkofferingavailability": "Optional", + "isshared": true, + "issystem": false, + "state": "Setup", + "related": 269, + "broadcasturi": "vlan://100", + "dns1": "8.8.8.8", + "type": "Direct", + "vlan": "100", + "isdefault": false, + "service": [ + { + "name": "Dns" + }, + { + "name": "UserData" + }, + { + "name": "Dhcp" + } + ], + "securitygroupenabled": false + }, + { + "id": 263, + "name": "CustomerNet", + "displaytext": "Dedicated Customer Network", + "broadcastdomaintype": "Vlan", + "traffictype": "Guest", + "gateway": "192.168.129.1", + "netmask": "255.255.255.0", + "startip": "192.168.129.10", + "endip": "192.168.129.50", + "zoneid": 1, + "networkofferingid": 7, + "networkofferingname": "DefaultDirectNetworkOffering", + "networkofferingdisplaytext": "Direct", + "networkofferingavailability": "Optional", + "isshared": true, + "issystem": false, + "state": "Setup", + "related": 263, + "broadcasturi": "vlan://129", + "dns1": "8.8.8.8", + "type": "Direct", + "vlan": "129", + "isdefault": true, + "service": [ + { + "name": "Dns" + }, + { + "name": "UserData" + }, + { + "name": "Dhcp" + } + ], + "securitygroupenabled": false + }, + { + "id": 269, + "name": "vlan100", + "displaytext": "sumi-network-vlan-100", + "broadcastdomaintype": "Vlan", + "traffictype": "Guest", + "gateway": "182.172.161.1", + "netmask": "255.255.255.0", + "startip": "182.172.161.10", + "endip": "182.172.161.100", + "zoneid": 1, + "networkofferingid": 7, + "networkofferingname": "DefaultDirectNetworkOffering", + "networkofferingdisplaytext": "Direct", + "networkofferingavailability": "Optional", + "isshared": true, + "issystem": false, + "state": "Setup", + "related": 269, + "broadcasturi": "vlan://100", + "dns1": "8.8.8.8", + "type": "Direct", + "vlan": "100", + "isdefault": false, + "service": [ + { + "name": "Dns" + }, + { + "name": "UserData" + }, + { + "name": "Dhcp" + } + ], + "securitygroupenabled": false + }, + { + "id": 263, + "name": "CustomerNet", + "displaytext": "Dedicated Customer Network", + "broadcastdomaintype": "Vlan", + "traffictype": "Guest", + "gateway": "192.168.129.1", + "netmask": "255.255.255.0", + "startip": "192.168.129.10", + "endip": "192.168.129.50", + "zoneid": 1, + "networkofferingid": 7, + "networkofferingname": "DefaultDirectNetworkOffering", + "networkofferingdisplaytext": "Direct", + "networkofferingavailability": "Optional", + "isshared": true, + "issystem": false, + "state": "Setup", + "related": 263, + "broadcasturi": "vlan://129", + "dns1": "8.8.8.8", + "type": "Direct", + "vlan": "129", + "isdefault": true, + "service": [ + { + "name": "Dns" + }, + { + "name": "UserData" + }, + { + "name": "Dhcp" + } + ], + "securitygroupenabled": false + }, + { + "id": 269, + "name": "vlan100", + "displaytext": "sumi-network-vlan-100", + "broadcastdomaintype": "Vlan", + "traffictype": "Guest", + "gateway": "182.172.161.1", + "netmask": "255.255.255.0", + "startip": "182.172.161.10", + "endip": "182.172.161.100", + "zoneid": 1, + "networkofferingid": 7, + "networkofferingname": "DefaultDirectNetworkOffering", + "networkofferingdisplaytext": "Direct", + "networkofferingavailability": "Optional", + "isshared": true, + "issystem": false, + "state": "Setup", + "related": 269, + "broadcasturi": "vlan://100", + "dns1": "8.8.8.8", + "type": "Direct", + "vlan": "100", + "isdefault": false, + "service": [ + { + "name": "Dns" + }, + { + "name": "UserData" + }, + { + "name": "Dhcp" + } + ], + "securitygroupenabled": false + }, + { + "id": 263, + "name": "CustomerNet", + "displaytext": "Dedicated Customer Network", + "broadcastdomaintype": "Vlan", + "traffictype": "Guest", + "gateway": "192.168.129.1", + "netmask": "255.255.255.0", + "startip": "192.168.129.10", + "endip": "192.168.129.50", + "zoneid": 1, + "networkofferingid": 7, + "networkofferingname": "DefaultDirectNetworkOffering", + "networkofferingdisplaytext": "Direct", + "networkofferingavailability": "Optional", + "isshared": true, + "issystem": false, + "state": "Setup", + "related": 263, + "broadcasturi": "vlan://129", + "dns1": "8.8.8.8", + "type": "Direct", + "vlan": "129", + "isdefault": true, + "service": [ + { + "name": "Dns" + }, + { + "name": "UserData" + }, + { + "name": "Dhcp" + } + ], + "securitygroupenabled": false + }, + { + "id": 269, + "name": "vlan100", + "displaytext": "sumi-network-vlan-100", + "broadcastdomaintype": "Vlan", + "traffictype": "Guest", + "gateway": "182.172.161.1", + "netmask": "255.255.255.0", + "startip": "182.172.161.10", + "endip": "182.172.161.100", + "zoneid": 1, + "networkofferingid": 7, + "networkofferingname": "DefaultDirectNetworkOffering", + "networkofferingdisplaytext": "Direct", + "networkofferingavailability": "Optional", + "isshared": true, + "issystem": false, + "state": "Setup", + "related": 269, + "broadcasturi": "vlan://100", + "dns1": "8.8.8.8", + "type": "Direct", + "vlan": "100", + "isdefault": false, + "service": [ + { + "name": "Dns" + }, + { + "name": "UserData" + }, + { + "name": "Dhcp" + } + ], + "securitygroupenabled": false + }, + { + "id": 263, + "name": "CustomerNet", + "displaytext": "Dedicated Customer Network", + "broadcastdomaintype": "Vlan", + "traffictype": "Guest", + "gateway": "192.168.129.1", + "netmask": "255.255.255.0", + "startip": "192.168.129.10", + "endip": "192.168.129.50", + "zoneid": 1, + "networkofferingid": 7, + "networkofferingname": "DefaultDirectNetworkOffering", + "networkofferingdisplaytext": "Direct", + "networkofferingavailability": "Optional", + "isshared": true, + "issystem": false, + "state": "Setup", + "related": 263, + "broadcasturi": "vlan://129", + "dns1": "8.8.8.8", + "type": "Direct", + "vlan": "129", + "isdefault": true, + "service": [ + { + "name": "Dns" + }, + { + "name": "UserData" + }, + { + "name": "Dhcp" + } + ], + "securitygroupenabled": false + }, + { + "id": 269, + "name": "vlan100", + "displaytext": "sumi-network-vlan-100", + "broadcastdomaintype": "Vlan", + "traffictype": "Guest", + "gateway": "182.172.161.1", + "netmask": "255.255.255.0", + "startip": "182.172.161.10", + "endip": "182.172.161.100", + "zoneid": 1, + "networkofferingid": 7, + "networkofferingname": "DefaultDirectNetworkOffering", + "networkofferingdisplaytext": "Direct", + "networkofferingavailability": "Optional", + "isshared": true, + "issystem": false, + "state": "Setup", + "related": 269, + "broadcasturi": "vlan://100", + "dns1": "8.8.8.8", + "type": "Direct", + "vlan": "100", + "isdefault": false, + "service": [ + { + "name": "Dns" + }, + { + "name": "UserData" + }, + { + "name": "Dhcp" + } + ], + "securitygroupenabled": false + }, + { + "id": 263, + "name": "CustomerNet", + "displaytext": "Dedicated Customer Network", + "broadcastdomaintype": "Vlan", + "traffictype": "Guest", + "gateway": "192.168.129.1", + "netmask": "255.255.255.0", + "startip": "192.168.129.10", + "endip": "192.168.129.50", + "zoneid": 1, + "networkofferingid": 7, + "networkofferingname": "DefaultDirectNetworkOffering", + "networkofferingdisplaytext": "Direct", + "networkofferingavailability": "Optional", + "isshared": true, + "issystem": false, + "state": "Setup", + "related": 263, + "broadcasturi": "vlan://129", + "dns1": "8.8.8.8", + "type": "Direct", + "vlan": "129", + "isdefault": true, + "service": [ + { + "name": "Dns" + }, + { + "name": "UserData" + }, + { + "name": "Dhcp" + } + ], + "securitygroupenabled": false + }, { "id": 269, "name": "vlan100", diff --git a/ui/scripts/ui/widgets/detailView.js b/ui/scripts/ui/widgets/detailView.js index 164758407d7..c7737858ee8 100644 --- a/ui/scripts/ui/widgets/detailView.js +++ b/ui/scripts/ui/widgets/detailView.js @@ -604,6 +604,12 @@ }).appendTo($tabContent); } + if (tabs.listView) { + return $('
').listView({ + listView: tabs.listView + }).appendTo($tabContent); + } + $.extend( $detailView.data('view-args'), { activeTab: targetTabID }