From 7b98f78db8b22e238298fdc30a509a0746cbdbe8 Mon Sep 17 00:00:00 2001 From: Sanjay Tripathi Date: Thu, 24 May 2012 15:25:15 +0530 Subject: [PATCH] CS-9919: NexusVswitch UI development modified enable disable actions and details tab Reviewed-by: Pranav --- ui/scripts/system.js | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/ui/scripts/system.js b/ui/scripts/system.js index a1a1009d5ff..3541a3170f4 100644 --- a/ui/scripts/system.js +++ b/ui/scripts/system.js @@ -6496,7 +6496,7 @@ vsmdeviceid: { label: 'label.name' }, type: { label: 'label.type' }, zonename: { label: 'label.zone' }, - state: { label: 'label.status' } + vsmdevicestate: { label: 'label.status' } }, detailView: { actions: { @@ -6516,9 +6516,14 @@ dataType: "json", async: true, success: function(json) { - var item = json.getciscovsmbyclusteridcmdresponse.cisconexusvsm; - args.context.clusters[0].state = item.allocationstate; - addExtraPropertiesToClusterObject(item); + var jid = json.enablecisconexusvsmresponse.jobid; + args.response.success( + {_custom: + {jobId: jid} + } + ); + //args.context.vSwitches[0].vsmdevicestate = item.allocationstate; + //addExtraPropertiesToClusterObject(item); args.response.success({ actionFilter: nexusActionfilter, data:item @@ -6549,9 +6554,14 @@ dataType: "json", async: true, success: function(json) { - var item = json.getciscovsmbyclusteridcmdresponse.cisconexusvsm; - args.context.clusters[0].state = item.allocationstate; - addExtraPropertiesToClusterObject(item); + var jid = json.disablecisconexusvsmresponse.jobid; + args.response.success( + {_custom: + {jobId: jid} + } + ); + //args.context.vSwitches[0].vsmdevicestate = item.allocationstate; + //addExtraPropertiesToClusterObject(item); args.response.success({ actionFilter: nexusActionfilter, data:item @@ -6596,10 +6606,12 @@ details: { title: 'label.details', fields: { - name: { label: 'label.name' }, - type: { label: 'label.type' }, - zonename: { label: 'label.zone' }, - state: { label: 'label.status' } + vsmdeviceid: { label: 'label.name' }, + ipaddress: { label: 'label.ipaddress' }, + vsmctrlvlanid: { label: 'label.vsmctrlvlanid' }, + vsmpktvlanid: { label: 'label.vsmpktvlanid' }, + vsmstoragevlanid: { label: 'label.vsmstoragevlanid' }, + vsmdevicestate: { label: 'label.state' } }, dataProvider: function(args) { @@ -6607,7 +6619,7 @@ url: createURL("listCiscoNexusVSMs&clusterid=" + args.context.clusters[0].id), dataType: "json", success: function(json) { - var item = json.listcisconexusvsmscmdresponse.cisconexusvsm; + var item = json.listcisconexusvsmscmdresponse.cisconexusvsm[0]; addExtraPropertiesToClusterObject(item); args.response.success({ actionFilter: nexusActionfilter,