The Convenience Plugin

JavaScript

GateOne.Convenience

Provides numerous syntax highlighting functions and conveniences to provide quick and useful information to the user.

GateOne.Convenience.IPInfo(elem)

Calls GateOne.SSH.execRemoteCmd(term, 'host ' + elem.innerHTML).

GateOne.Convenience.addPrefs()

Adds a number of configurable elements to Gate One's preferences panel.

GateOne.Convenience.displayGroupInfo(output)

Displays a message conaining all of the group's information using GateOne.Convenience.groupTemp and by parsing the output of the getent passwd | grep ... command.

GateOne.Convenience.displayIPInfo(output)

Displays the result of host.

GateOne.Convenience.displayUserInfo(output)

Parses the output of the 'getent passwd <user>' command and displays it in an easy-to-read format.

GateOne.Convenience.groupInfo(elem)

Calls 'getent group ' + elem.innerHTML on the server using GateOne.SSH.execRemoteCmd(). The result will be handled by GateOne.Convenience.displayGroupInfo()

GateOne.Convenience.groupInfo2(output)

Parses the output of the getent group command, saves the details as HTML in GateOne.Convenience.groupTemp, then calls getent passwd looking for all the users that have the given group as their primary GID. The final output will be displayed via GateOne.Convenience.displayGroupInfo().

GateOne.Convenience.groupInfoError(result)

Displays a message indicating there was an error getting info on the group.

GateOne.Convenience.init()

Sets up all our conveniences.

GateOne.Convenience.permissionsBitmask(elemOrString)

Returns the bitmask (i.e. chmod <bitmask>) to a file/directory's permissions. For example:

>>> someElement.innerHTML = 'drwxrwxr-x';
>>> GateOne.Convenience.permissionsBitmask(someElement);
'0775'
GateOne.Convenience.permissionsInfo(elem)

Displays information about the 'ls -l' permissions contained within elem. elem.innerHTMl must be something like 'drwxrwxr-x'.

GateOne.Convenience.registerIPConvenience()

Registers a text transform that makes IPv4 addresses into spans that will execute host when clicked.

Note

This feeature will disable itself if the SSH plugin is disabled/missing.

GateOne.Convenience.registerIPConvenience()

Removes all the text transforms that apply to IP addresses.

GateOne.Convenience.registerLSConvenience()

Registers a number of text transforms to add conveniences to the output of 'ls -l'.

GateOne.Convenience.registerPSConvenience()

Registers a text transform that adds syntax highlighting to the output of 'ps'.

GateOne.Convenience.registerSyslogConvenience()

Registers a text transform that makes standard syslog output easier on the eyes.

GateOne.Convenience.savePrefsCallback()

Called when the user clicks the "Save" button in the prefs panel.

GateOne.Convenience.toggleBackground(result)

Toggles a background color on and off for the given elem by adding or removing the 'selectedrow' class.

GateOne.Convenience.unregisterLSConvenience()

Removes all of the text transforms that apply to the output of 'ls -l'

GateOne.Convenience.unregisterPSConvenience()

Removes all the text transforms associated with ps output.

GateOne.Convenience.unregisterSyslogConvenience()

Removes all the text transforms associated with syslog output.

GateOne.Convenience.userInfo(elem)

Calls 'getent passwd ' + elem.innerHTML on the server using GateOne.SSH.execRemoteCmd(). The result will be handled by GateOne.Convenience.displayUserInfo()

GateOne.Convenience.userInfoError(result)

Displays a message indicating there was an error getting info on the user.