External Tools

Squore uses a menus folder in its configuration so you can add functionality that will be available in the user interface to run external tools. These external scripts are launched in Squore Server's context, and can therefore benefit from Squore's authentication and permission mechanism. They are launched from the web interface via a Tools menu visible to the users whose profile grants access to the Use External Tools feature.

Each external tool is defined within its own sub-folder in menus and appears as a link in the main Squore toolbar, as shown below:

A Tools menu containing an external tool to create a demo environment, and the associated page to configure and launch the script.

The menu in the image above was added using the following form.xml:

<SQUORE_HOME>/configuration/menus/CreateDemo/form.xml:
<?xml version="1.0" encoding="UTF-8"?>
<tags baseName="Generic" multiUsers="false" users="demo" groups="demo" image="earth.png">
	<tag type="multipleChoice" key="demo" displayType="comboBox" defaultValue="TECH_DEBT">
		<value key="ISO9126" />
		<value key="RISK_INDEX_C" />
		<value key="RISK_INDEX_JAVA" />
		<value key="TECH_DEBT" />
	</tag>		
	<tag type="booleanChoice" key="create_users" defaultValue="false"/>	
	<tag type="multipleChoice" key="useAccountCredentials" displayType="radioButton" 
			defaultValue="USE_ACCOUNT_CREDENTIALS" credentialType="USE_ACCOUNT_CREDENTIALS">
		<value key="NO_CREDENTIALS" />
		<value key="USE_ACCOUNT_CREDENTIALS" />
		<value key="PERSONAL_CREDENTIALS" />
	</tag>	
	<tag type="text" key="username" credentialType="LOGIN" />
	<tag type="password" key="password" credentialType="PASSWORD" />
</tags>
<SQUORE_HOME>/configuration/menus/CreateDemo/form_en.properties:
FORM.GENERAL.NAME=Create Demo
FORM.GENERAL.DESCR=Menu to create sample projects for demo.
FORM.GENERAL.URL=http://www.squoring.com/

TAG.demo.NAME=Demo:
OPT.ISO9126C.NAME=ISO9126 -- C
OPT.RISK_C.NAME=Risk Index -- C
OPT.RISK_JAVA.NAME=Risk Index -- Java
OPT.TD_JAVA.NAME=Technical Debt -- Java
OPT.ISO9126.NAME=ISO9126 -- C
OPT.RISK_INDEX_C.NAME=Risk Index -- C
OPT.RISK_INDEX_JAVA.NAME=Risk Index -- Java
OPT.TECH_DEBT.NAME=Technical Debt -- Java
TAG.create_users.NAME=Create Demo Users
TAG.useAccountCredentials.NAME=
OPT.NO_CREDENTIALS.NAME=No credentials
OPT.USE_ACCOUNT_CREDENTIALS.NAME=Use my Squore credentials
OPT.PERSONAL_CREDENTIALS.NAME=Define credentials
TAG.username.NAME=Username 
TAG.password.NAME=Password

The tags element accepts the following attributes:

You can then add a series of tag elements that follow the same specification as the one described in the section called “Attributes” to use as parameters on your custom page, with two extra types available:

The following variables are injected in the script execute.tcl before execution: