Hi Kasun,

I also found an article at [1] on the internal structure of the appmgt
jaggery app. Based on my understanding I haven't called the getPods method
in the correct jag file which should be the
modules/application/application.jag file. Apart from modifying the jaggery
files to add my requirement I will debug the getPods method and post the
updates in this mail thread.

[1]
http://wso2.com/library/tutorials/2012/09/customizing-api-store-publisher-part1/

Thanks and Regards.
Sabra.


On Wed, Apr 20, 2016 at 8:46 PM, Kasun De Silva <[email protected]> wrote:

> Hi Sabra,
>
> First check the related pod list coming to the Kubernetes Provisioning
> Component.
>
> At this point I would debug getPods() method
> in KubernetesProvisioningUtils.java and check whether that the correct
> selector label map and the pod list are available there.
>
> Thanks,
> Kasun
>
>
> On Wed, Apr 20, 2016 at 4:21 AM, Sabra Ossen <[email protected]> wrote:
>
>> Hi All,
>>
>> I deployed an app in my app cloud local set up and I have modified the
>> code in "/site/themes/default/templates/home/template.jag" such that once
>> the application home page is loaded (after the application has been clicked
>> from the list of created apps) the list of pods for that particular
>> application should be displayed.
>>
>> The code is as follows.
>>
>> var KubernetesProvisioningUtils =  
>> Packages.org.wso2.appcloud.provisioning.runtime.Utils.KubernetesProvisioningUtils;
>> var Util = Packages.org.wso2.appcloud.core.Util;
>>
>> var modManager = jagg.module("manager");
>> var tenantId = modManager.getTenantId();
>> var versionHashId = Util.getVersionHashId(applicationName, selectedRevision, 
>> tenantId);
>>
>> var applicationCtx = KubernetesProvisioningUtils.getApplicationContext(
>>         applicationName, selectedRevision, null , modManager.getTenantId(), 
>> modManager.getTenantDomain(), versionHashId);
>>
>> var podList = KubernetesProvisioningUtils.getPods(applicationCtx);
>>
>> %>
>>     <script>
>>         var podList = "<%=podList%>";
>>         alert(podList);
>>     </script>
>> <%
>>
>>
>> Using js I printed the podList but it returns "{}".
>>
>> I checked the kubernetes cluster and details of the pod which contains
>> the app can be seen as well. But I cannot obtain it from the jaggery app.
>> Any help on this issue is appreciated.
>>
>> Thanks and Regards.
>>
>> --
>> *Sabra Ossen*
>> *Software Engineer*
>> Email: [email protected]
>> Mobile: +94 767 837356
>>
>> _______________________________________________
>> Dev mailing list
>> [email protected]
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> *Kasun de Silva*
> Software Engineer | *WSO2 Inc.*; http://wso2.com
> lean.enterprise.middleware
>
> email   : [email protected]
> mobile : +94 77 794 4260
>
>


-- 
*Sabra Ossen*
*Software Engineer*
Email: [email protected]
Mobile: +94 767 837356
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to