• 1 reply
  • Latest Post - ‏2013-04-26T09:29:51Z by 932H_Dominik_Jall
3 Posts

Pinned topic Resources Sliders

‏2012-10-02T18:56:36Z |
How can you modifiy the values on the Resources Sliders in SimpleSRM?
  • 932H_Dominik_Jall
    1 Post

    Re: Resources Sliders




    the APi for the resource sliders is described in the TSAM infocenter here:


    here is an example. you can also find it in the "sample" folder of custom_web in the file "Offering_simplify_SML_sample.js" shipped with TSAM


            var sd = this.tsamGetPage("Page ServerDetails");
            sd.tsamGetField("Virtual CPU Slider").tsamCall("setValue", vcpu);
            sd.tsamGetField("Physical CPU Slider").tsamCall("setValue", pcpu);
            sd.tsamGetField("Memory Slider").tsamCall("setValue", mem);
            sd.tsamGetField("Disk Slider").tsamCall("setValue", disk);



    The code assumes the variables defined:

    vcpu (virtual cpus - integer),

    pcpu (physical cpu shares - float like 0.1, 0.2 etc.),

    mem (memory - integer in MB)

    disk (disk size - integer in GB)


    Please note that this will only try to set the slider values and might still result in different values being set depending on the available resources in the selected resource pool. You can't set 16 vcpus if your pool has only 8 for example.