On Sat, Mar 10, 2018 at 1:30 AM, Joachim Lindenberg <joac...@lindenberg.one>

> Hello once more,
> I´d like to show the status of a VM on the list shown to a user after
> authentication – of course via my own extension enumerating the
> connections. Not knowing another way I tried to include the status into the
> connection name, but that confuses the recent connections display.
> Is there a way to add a column with status information, without changing
> the overall webapp?

Yes. Connections and similar objects within the extension API provide a Map
of arbitrary name/value attributes which your extension can expose:


These attributes are exposed on the JavaScript side in the connection
objects received from the corresponding REST service:


You can see this leveraged in practice within the JDBC auth extension,
which needs to add its own "Shared by [name]" tag next to connections
shared by a particular user via a share link. An additional
"jdbc-shared-by" attribute is exposed through implementing getAttributes()
on the applicable Connection subclass:


The additional template content which renders this information is then
added with a template patch (in an area of the Guacamole interface where a
connection object from the REST service is already available),
conditionally shown only if the attribute is actually set:


- Mike

Reply via email to