674da96a59
This connects Xterm.js to a Nomad exec websocket so people can interact on clients via live sessions. There are buttons on job, allocation, task group, and task detail pages that open a popup that lets them edit their shell command and start a session. More is to come, as recorded in issues.
5 lines
194 B
JavaScript
5 lines
194 B
JavaScript
export default function escapeTaskName(taskName) {
|
|
// Regular expression is taken from here: https://stackoverflow.com/a/20053121
|
|
return taskName.replace(/[^a-zA-Z0-9,._+@%/-]/g, '\\$&');
|
|
}
|