SpaceTree Dynamic

73 views
Skip to first unread message

Raamesh Keerthi

unread,
Feb 17, 2012, 4:36:05 AM2/17/12
to JavaScript InfoVis Toolkit
Hi,


I have constructed this JSON object on page load and drawn


{"assetId01":
[{"id":"ESXI-1.csez.zohocorpin.com","fromId":"assetID01","name":"ESXI-1","data":
{"ciType":"Host:","relId":"ESXI-1.csez.zohocorpin.com1","imageIcon":"images/
server.gif","relation":"VM-Hosts","ciAttribute":{"service
type":"Server"},"relTypeId":"01","cicritical":"images/server.gif"}},
{"id":"esx-1.csez.zohocorpin.com","fromId":"assetID01","name":"esx-13.csez.zohocorpin.com","data":
{"ciType":"Host:","relId":"esx-1.csez.zohocorpin.com1","imageIcon":"images/
server.gif","relation":"VM-Hosts","ciAttribute":{"service
type":"Server"},"relTypeId":"01","cicritical":"images/server.gif"}},
{"id":"esx-2.csez.zohocorpin.com","fromId":"assetID01","name":"ESX-2.","data":
{"ciType":"Host:","relId":"esx-2.csez.zohocorpin.com1","imageIcon":"images/
server.gif","relation":"VM-Hosts","ciAttribute":{"service
type":"Server"},"relTypeId":"01","cicritical":"images/server.gif"}}],

"root":[{"id":"assetId01","fromId":"root","name":"VM's Server","data":
{"ciType":"VMware ESX Server List","relId":"0","imageIcon":"images/
icon_network_connect.gif","relation":"parent","relTypeId":"0"}}]}

and set this JSON to JsonProxy variable...


once a root node is clicked means by using AJAX request again I formed
JSON object


{"assetId01":
[{"id":"ESXI-1.csez.zohocorpin.com","fromId":"assetID01","name":"ESXI-1","data":
{"ciType":"Host:","relId":"ESXI-1.csez.zohocorpin.com1","imageIcon":"images/
server.gif","relation":"VM-Hosts","ciAttribute":{"service
type":"Server"},"relTypeId":"01","cicritical":"images/server.gif"}},
{"id":"esx-1.csez.zohocorpin.com","fromId":"assetID01","name":"esx-13.csez.zohocorpin.com","data":
{"ciType":"Host:","relId":"esx-1.csez.zohocorpin.com1","imageIcon":"images/
server.gif","relation":"VM-Hosts","ciAttribute":{"service
type":"Server"},"relTypeId":"01","cicritical":"images/server.gif"}},
{"id":"esx-2.csez.zohocorpin.com","fromId":"assetID01","name":"ESX-2.","data":
{"ciType":"Host:","relId":"esx-2.csez.zohocorpin.com1","imageIcon":"images/
server.gif","relation":"VM-Hosts","ciAttribute":{"service
type":"Server"},"relTypeId":"01","cicritical":"images/server.gif"}}],

"root":[{"id":"assetId01","fromId":"root","name":"VM's Server","data":
{"ciType":"VMware ESX Server List","relId":"0","imageIcon":"images/
icon_network_connect.gif","relation":"parent","relTypeId":"0"}}]


,"esx-2.csez.zohocorpin.com":
[{"id":"vm_id_2","fromId":"esx-2.csez.zohocorpin.com","name":"red","data":
{"ciType":"Virtual Machine:","relId":"2_red1","imageIcon":"images/
vm.gif","relation":"VMs","ciAttribute":{"service
type":"VM's"},"relTypeId":"02","cicritical":"images/vm.gif"}},
{"id":"vm_id_30","fromId":"esx-2.csez.zohocorpin.com","name":"GitHub","data":
{"ciType":"Virtual Machine:","relId":"30_GitHub1","imageIcon":"images/
vm.gif","relation":"VMs","ciAttribute":{"service
type":"VM's"},"relTypeId":"02","cicritical":"images/vm.gif"}},
{"id":"vm_id_7","fromId":"esx-2.csez.zohocorpin.com","name":"opman-
ubuntu10-6","data":{"ciType":"Virtual Machine:","relId":"7_opman-
ubuntu10-61","imageIcon":"images/
vm.gif","relation":"VMs","ciAttribute":{"service
type":"VM's"},"relTypeId":"02","cicritical":"images/vm.gif"}},
{"id":"vm_id_6","fromId":"esx-2.csez.zohocorpin.com","name":"opman-
ubuntu10-7","data":{"ciType":"Virtual Machine:","relId":"6_opman-
ubuntu10-71","imageIcon":"images/
vm.gif","relation":"VMs","ciAttribute":{"service
type":"VM's"},"relTypeId":"02","cicritical":"images/vm.gif"}},
{"id":"vm_id_5","fromId":"esx-2.csez.zohocorpin.com","name":"opman-
ubuntu10-1","data":{"ciType":"Virtual Machine:","relId":"5_opman-
ubuntu10-11","imageIcon":"images/
vm.gif","relation":"VMs","ciAttribute":{"service
type":"VM's"},"relTypeId":"02","cicritical":"images/vm.gif"}},
{"id":"vm_id_4","fromId":"esx-2.csez.zohocorpin.com","name":"opman-
ubuntu10-2","data":{"ciType":"Virtual Machine:","relId":"4_opman-
ubuntu10-21","imageIcon":"images/
vm.gif","relation":"VMs","ciAttribute":{"service
type":"VM's"},"relTypeId":"02","cicritical":"images/vm.gif"}},
{"id":"vm_id_18","fromId":"esx-2.csez.zohocorpin.com","name":"DevLinux1","data":
{"ciType":"Virtual
Machine:","relId":"18_DevLinux11","imageIcon":"images/
vm.gif","relation":"VMs","ciAttribute":{"service
type":"VM's"},"relTypeId":"02","cicritical":"images/vm.gif"}},
{"id":"vm_id_9","fromId":"esx-2.csez.zohocorpin.com","name":"tsenthil
(1)","data":{"ciType":"Virtual Machine:","relId":"9_tsenthil
(1)1","imageIcon":"images/vm.gif","relation":"VMs","ciAttribute":
{"service type":"VM's"},"relTypeId":"02","cicritical":"images/
vm.gif"}},
{"id":"vm_id_8","fromId":"esx-2.csez.zohocorpin.com","name":"GitHubEnterprise","data":
{"ciType":"Virtual
Machine:","relId":"8_GitHubEnterprise1","imageIcon":"images/
vm.gif","relation":"VMs","ciAttribute":{"service
type":"VM's"},"relTypeId":"02","cicritical":"images/vm.gif"}},
{"id":"ds_id_3","fromId":"esx-2.csez.zohocorpin.com","name":"datastore","data":
{"ciType":"Datastore:","relId":"3_datastore1","imageIcon":"images/
vm_datastore.png","relation":"Ds","ciAttribute":{"service
type":"Datastores"},"relTypeId":"03","cicritical":"images/
vm_datastore.png"}},
{"id":"ds_id_2","fromId":"esx-2.csez.zohocorpin.com","name":"R1","data":
{"ciType":"Datastore:","relId":"2_R11","imageIcon":"images/
vm_datastore.png","relation":"Ds","ciAttribute":{"service
type":"Datastores"},"relTypeId":"03","cicritical":"images/
vm_datastore.png"}},
{"id":"ds_id_1","fromId":"esx-2.csez.zohocorpin.com","name":"datastore2","data":
{"ciType":"Datastore:","relId":"1_datastore21","imageIcon":"images/
vm_datastore.png","relation":"Ds","ciAttribute":{"service
type":"Datastores"},"relTypeId":"03","cicritical":"images/
vm_datastore.png"}},
{"id":"ds_id_7","fromId":"esx-2.csez.zohocorpin.com","name":"opm_lab_temp","data":
{"ciType":"Datastore:","relId":"7_opm_lab_temp1","imageIcon":"images/
vm_datastore.png","relation":"Ds","ciAttribute":{"service
type":"Datastores"},"relTypeId":"03","cicritical":"images/
vm_datastore.png"}},
{"id":"ds_id_6","fromId":"esx-2.csez.zohocorpin.com","name":"datastore1
(1)","data":{"ciType":"Datastore:","relId":"6_datastore1
(1)1","imageIcon":"images/
vm_datastore.png","relation":"Ds","ciAttribute":{"service
type":"Datastores"},"relTypeId":"03","cicritical":"images/
vm_datastore.png"}},
{"id":"ds_id_5","fromId":"esx-2.csez.zohocorpin.com","name":"opm_lab_ds_12","data":
{"ciType":"Datastore:","relId":"5_opm_lab_ds_121","imageIcon":"images/
vm_datastore.png","relation":"Ds","ciAttribute":{"service
type":"Datastores"},"relTypeId":"03","cicritical":"images/
vm_datastore.png"}},

{"id":"ds_id_4","fromId":"esx-2.csez.zohocorpin.com","name":"opm_lab_ds_11","data":
{"ciType":"Datastore:","relId":"4_opm_lab_ds_111","imageIcon":"images/
vm_datastore.png","relation":"Ds","ciAttribute":{"service
type":"Datastores"},"relTypeId":"03","cicritical":"images/
vm_datastore.png"}}]





}



and after constructing this JSON again I set this JSONObject to
JsonProxy variable...

and called PROCESS_RELATION method....


but its doesnt draw the new one... Why?



Thanks in advance

Raamesh Keerthi N.J

jai kishan

unread,
Feb 17, 2012, 4:55:01 AM2/17/12
to javascript-information...@googlegroups.com
hi


i guess the problem might be that the space tree has not been refreshed after ajax call is done.






Raamesh Keerthi N.J

--
You received this message because you are subscribed to the Google Groups "JavaScript InfoVis Toolkit" group.
To post to this group, send email to javascript-information...@googlegroups.com.
To unsubscribe from this group, send email to javascript-information-visua...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/javascript-information-visualization-toolkit?hl=en.


Raamesh Keerthi

unread,
Feb 17, 2012, 6:01:38 AM2/17/12
to JavaScript InfoVis Toolkit
st.refresh();

I used but its not working...

On Feb 17, 2:55 pm, jai kishan <meetingkis...@gmail.com> wrote:
> hi
>
> i guess the problem might be that the space tree has not been refreshed
> after ajax call is done.
>
> >http://groups.google.com/group/javascript-information-visualization-t...
> > .

jai kishan

unread,
Feb 17, 2012, 6:05:19 AM2/17/12
to javascript-information...@googlegroups.com
oh okay,

i have hardly worked on spacetree so im unable to understand where exactly the problem is.

do post your problem in the google groups someone might help you...














Raamesh Keerthi

unread,
Feb 17, 2012, 6:52:41 AM2/17/12
to JavaScript InfoVis Toolkit
okay...
Thanks...

On Feb 17, 4:05 pm, jai kishan <meetingkis...@gmail.com> wrote:
> oh okay,
>
> i have hardly worked on spacetree so im unable to understand where exactly
> the problem is.
>
> do post your problem in the google groups someone might help you...
>
> >http://groups.google.com/group/javascript-information-visualization-t...
> > .
Reply all
Reply to author
Forward
0 new messages