Jump to content

Plugin support in PC Monitor 2.8


Recommended Posts

  • Administrators

PC Monitor 2.8 adds support for plugins and you will be able to:

- display additional custom information in computer details page

- run additional custom commands

- send notifications

The support for plugins is fully implemented in PC Monitor Agent 2.8 and a plugin example is also available for download here: http://www.mobilepcm...oad/netplugins.zip

post-1-0-00060800-1325183611_thumb.png

Link to post
Share on other sites

Hi There :)

Is there a list of supported API commands?(have I missed it :) ). The plugin examples shows that running GetAdditionalComputerDetails() you can show some more information or add buttons to run additional custom commands. Just one question do you have to create the commandItem And SimpleItem first at plugin start-up or can you create/update groups/values dynamiclly. Thinking about creating a plugin the would have a button to retrive som client information, but I will not be sure if it will include 1 result or 5 for that matter and for that it could be great to create SimpelItem dynamiclly for each result returned. If this is not possible, can i just declare all the expected SimpelItem properties and then update the values dynamiclly everytime I run another function by presseing the commandItem. I noticed in the example of the computerDetails that you can update the revocation count automaticlly, by I want it only when i press the button created it for it. Hope my question is clear enough :)

Best Regards

//CptRico

Link to post
Share on other sites
  • Administrators

Hello,

Here is how I would do it. Create a bool variable to represent the current state. Inside the GetComputerDetails have an If statement to separate the two states (false for only one button, true for no button but simpleItems containing your data). Now when the plugin receives the command you only change the state to true and when GetComputerDetails gets called again you will see your computed fields.

You can create all items dynamically inside the GetComputerDetails method that gets called every 5 seconds if a client requests it. This means that you can always provide fresh data and you can add / remove items at will based on your code logic.

For a list of supported API features just add the client dll in your visual studio project. Extend any class with ClientPlugin interface, fix your usings in order to recognize the interface and right click ClientPlugin and click 'Go To Declaration' or click the text and press F12. You will see a list of all fields and methods you can call / implement.

Paul.

Link to post
Share on other sites
  • Administrators

@CptRico - You can use both - keep an array of SimpleItems and update their Title/Subtitle or recreate them every time GetAdditionalComputerDetails() is called. If it takes some time to gather the information you want to display in these items I would create a separate thread for data collection in the plugin that updates the array. Then when the GetAdditionalComputerDetails() is called you simply return the items in the array.

GetAdditionalComputerDetails is called when the computer details page is opened on a mobile device for that computer - and it's called every 5 seconds.

Another method, PluginDataCheck is called every 15 seconds even if no one is looking at the computer details - you can use this method to collect data for your items and even send notifications when a certain condition is met.

Link to post
Share on other sites

Interesting. So I have no idea how to write plugins for this. What type of programmer would I look for to build plugins for me?

My interest is in the Backup solution I use for my customers called Vembu. I would love a plugin that alerted me when Customers backups failed...

http://www.vembu.com/ Product is Storegrid.

API fro my product is:

http://www.storegrid.net/docs/storegrid/StoreGrid-WebServices-DG.pdf

Link to post
Share on other sites
  • Administrators

Hello,

For building plugins you will require a .NET Based compiler (You can download a free one here).

As for the custom plugin I think I can help you with an example (but I don't promise you anything) if you can provide more details, do you want to receive a notification if there is any backup that failed?

I will take a look over it and let you know. Also please post questions like this on the forum not on this thread, it makes it look like a Mega Support Thread.

Paul.

Edited by Paul
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...