From: | Khushboo Vashi <khushboo(dot)vashi(at)enterprisedb(dot)com> |
---|---|
To: | Sahil Harpal <sahilharpal1234(at)gmail(dot)com> |
Cc: | pgadmin-hackers(at)postgresql(dot)org |
Subject: | Re: Pgadmin4 System Stats Extension Design |
Date: | 2023-08-17 09:09:12 |
Message-ID: | CAFOhELcedD6x6tO5_fBOfM_7YBpRPPHom1DRCz+gujJYoGHy3w@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgadmin-hackers |
On Thu, Aug 17, 2023 at 11:48 AM Sahil Harpal <sahilharpal1234(at)gmail(dot)com>
wrote:
> Hi Khushboo,
>
> On Thu, 17 Aug 2023 at 10:39, Khushboo Vashi <
> khushboo(dot)vashi(at)enterprisedb(dot)com> wrote:
>
>> Can you please fix the below JS error ? Due to this CPU and Memory tabs
>> are not working.
>> [image: Screenshot 2023-08-17 at 10.35.34 AM.png]
>>
>
> For me, it's working properly. I think in your case, the system is
> returning a null value for some of the processes. Could you please confirm
> this? If it is so, then either we can set a default value of 0 or simply a
> null string. Using console.log(), you can see what it is returning.
>
> Sample data of my system to fix this issue:
1. process331:
1. memory_bytes: null
2. memory_usage: null
3. name: "QuickLookUIServi"
4. pid: 938
5. row_number: 331
> if(data.hasOwnProperty('pmu_stats')){
> let pmu_info_list = [];
> const pmu_info_obj = data['pmu_stats'];
> console.log(pmu_info_obj); // It will print entire list in the console
> for (const key in pmu_info_obj) {
> pmu_info_list.push({ icon: '', pid: pmu_info_obj[key]['pid'], name:
> pmu_info_obj[key]['name'],
> memory_usage: formatBytes(pmu_info_obj[key]['memory_usage']), memory_bytes
> : formatBytes(pmu_info_obj[key]['memory_bytes']) });
> }
> setProcessMemoryUsageStats(pmu_info_list);
> }[image: image.gif]
>
From | Date | Subject | |
---|---|---|---|
Next Message | Sahil Harpal | 2023-08-17 09:20:00 | Re: Pgadmin4 System Stats Extension Design |
Previous Message | Yogesh Mahajan | 2023-08-17 08:31:10 | [pgadmin-org/pgadmin4] e2f32c: Fix doc build failure due to SQLAlchemy changes. #... |