VMware {code} Community
pwyzorski-wyzgu
Enthusiast
Enthusiast

objects with dynamic icons in inventory view

I'm trying to signify objects with different statuses in the Orchestrator Inventory using different icons, but these are all objects of the same class. How can I change what icon a class object is associated with dynamically based upon some kind of internal status?

regards,

~Patrick

Don't forget if the answers help, award points

Don't forget if the answers help, award points
Reply
0 Kudos
10 Replies
admin
Immortal
Immortal

Hi,

This is not possible at all.

Sorry.

A way that could work is to use two classes (maybe with the same base class) and use the NotificationHandler to notify server and clients the parent's children have changed.

Reply
0 Kudos
pwyzorski-wyzgu
Enthusiast
Enthusiast

Doing a brute force delete/new into a new child class object that has a different icon associated will work naturally. Can you say more about the NotificationHandler and if I can use that to compell a refresh of the Inventory view.

Don't forget if the answers help, award points

Don't forget if the answers help, award points
Reply
0 Kudos
admin
Immortal
Immortal

Sure,

your receive the notification handler for the plugin in IPluginAdaptor.createPluginFactory; its type is IPluginNotificationHandler. Its purposes is to say when vCO need to refresh elements in the inventory tree.

Mainly, you will use :

- notifyElementUpdated (when your object has changed)

- notifyElementDeleted (when your element was deleted)

- notifyElementInvalidate (when your element's children / relations changed and need to be reloaded to trees).

A notificationHandler is linked to a session.

Reply
0 Kudos
pwyzorski-wyzgu
Enthusiast
Enthusiast

Ok, those are the notification handlers, but what is the call to refresh the actual inventory tree - if you could save me the time in looking it up.

~Patrick

Don't forget if the answers help, award points

Don't forget if the answers help, award points
Reply
0 Kudos
admin
Immortal
Immortal

the plugin notify the element / children changed, the orchestrator refresh any trees automatically by asking the new element / relation to the plugin

Reply
0 Kudos
pwyzorski-wyzgu
Enthusiast
Enthusiast

I have no idea what you are trying to say here. I do know that I have an plugin that makes significant modifications to the inventory view and it never seems to refresh and I have to keep manually doing it.

Don't forget if the answers help, award points

Don't forget if the answers help, award points
Reply
0 Kudos
admin
Immortal
Immortal

I don't know how to say it..

So, when you update your "data objects / data relations" in your plug-in, you'll have to notify the clients that something has changed in the plug-in. So, the plugin call the method I explained previously to refresh the trees that shows the element.

Remember that an object is linked to a session; you maybe want to notify all the sessions.

The notifiy[http://...|http://...] methods can be seen as a "raise event" that is catched by the smart clients.

I'll check if we have a sample of this in the SolarSystem plug-in

Reply
0 Kudos
admin
Immortal
Immortal

Moving post to the appropriate forum.

Please use the Orchestrator API forum for discussion on plugin development and using the web service API.

Thanks,

Sia

Reply
0 Kudos
pwyzorski-wyzgu
Enthusiast
Enthusiast

This got moved, but no answer. Is there an example in the sample? I tested out splitting and destorying a planet neither of which update the Orchestrator console.

Don't forget if the answers help, award points

Don't forget if the answers help, award points
Reply
0 Kudos
admin
Immortal
Immortal

For now, the Solar System sample plug-in do not demonstrate the IPluginNotificationHandler uses.

Reply
0 Kudos