4.5 Infrastructure Changes
This section documents the technical modifications and code changes made to the RACE SWB platform to enable the Australian Dataspace Testbed Platform.
Auto-fill Configurations
The workspace configuration step has been enhanced to automatically populate most fields, enabling rapid testbed provisioning without requiring users to manually enter redundant information.
Connection Methods
New connection methods have been implemented to streamline workspace access. These include direct browser access to port 8000 (code-server IDE) and port 443 (HTTPS) of the dataspace instance. This approach eliminates the need for DCV connections or SSH configuration for each new testbed, significantly reducing setup time.
Connection Rows
A streamlined connection interface has replaced the standard RACE platform DCV/RDP/SSH connection rows. The new dataspace-specific connection row provides a consolidated set of controls for testbed instances, offering simplified access to dataspace environments.
Connection Logic
The following JavaScript implementation handles connection establishment to dataspace testbed instances. This code executes when users select a connection option from the ‘Testbed Connections’ interface.
/**
* @param {string} id - connection ID, either DCV's id or ADS's id
* @param {Object} options
* @param {boolean} options.isDcvClient - whether to use dcv client
* @param {string} options.path - path to connect to
* @param {string} options.port - port to connect to
* @param {string} options.connName - connection identifier for UI update
*/
handleConnect = async (id, { isDcvClient = false, path = '', port = '', connName = '' } = {}) => {
const store = this.connectionStore;
const connections = this.environment.connections;
const connectInfo = _.find(connections, ['id', id]) || {};
let url = connectInfo.url;
runInAction(() => {
this.processingId = id;
this.processingName = connName;
});
try {
if (!url) {
const urlObj = await store.createConnectionUrl(id);
url = urlObj.url;
}
if (url) {
if (isDcvClient) {
url = url.replace('https://', 'dcv://');
}
if (port) {
url = `${url}:${port}`;
}
if (path) {
url = `${url}/${path}`;
}
const loadUrlA = document.createElement('a');
loadUrlA.href = url;
loadUrlA.target = '_blank';
loadUrlA.rel = 'noopener noreferrer';
loadUrlA.click();
}
} catch (error) {
displayError(error);
} finally {
runInAction(() => {
this.processingId = '';
this.processingName = '';
});
}
};
