Jump to content

Recommended Posts

Posted

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

  • Administrators
Posted

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.

Posted

@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.

Posted

Hi Marius & Paul,

Thanks for your good ideas and fast replies :)

So now I can continue with the plug-in since I now know what the best practice would be..

Thanks again.

Best Regards

//CptRico (Johnni)

  • Administrators
Posted (edited)

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...