Quantcast
Channel: PTC Community: Message List - Windchill
Viewing all articles
Browse latest Browse all 8876

Re: Current Active Users List

$
0
0

Jess,

You got me thinking.  Below is a screenshot of a customized <WT_HOME>/codebase/wtcore/jsp/jmx/serverStatus.jsp file.

 

 

CAUTION:

I have done this on a test site thus far.  I have not done any types of verifications.  Also, I'm just a beginner.  I appreciate any corrections to the procedure below.

 

NOTE:

When modifying /codebase files, reference the Windchill Customization Guide with respect to the wtSafeArea.

 

 

1.     Open serverStatus.jsp.

 

2.     Find

Integer  activeUsers = null;

     Below that, add a line to instantiate an array for the active users. 

String[] activeUserArray = null;

 

3.     Find

activeUsers = (Integer) mbeanServer.getAttribute( activeUsersMBeanName, "TotalActiveUserCount" );

     Below that, add a line to populate the activeUserArray variable.

activeUserArray = (String[]) mbeanServer.getAttribute( activeUsersMBeanName, "TotalActiveUsers" );

 

4.     Might need or desire to add an entry to the catch block for activeUserArray.

 

5.     Add the display of the variable anywhere in the page.  Look for the screenshot as to where I added it.  Code for my addition of the variable to the page is listed below.  I looked for

decimalFormat.format( activeUsers )

and added another <tr>below the existing one to show a list of the users.  This is probably not the best location to add it because a large list would push all of the stats down the page.  The best location to render this on the page is probably at the bottom of the page.  But this just serves as proof of concept at this point.

<tr><td colspan=3>  <%    int i=0;    for (i=0;i<activeUserArray.length;i++) {      out.print(activeUserArray[i] + "<br />");    }  %></td></tr>

 

ss.png


Viewing all articles
Browse latest Browse all 8876

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>