Next.js+React web interface for controlling HAProxy clusters (groups of servers), in conjunction with with https://gitgud.io/fatchan/haproxy-protection.
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
673 B
27 lines
673 B
import Link from 'next/link';
|
|
|
|
export default function MapRow({ name, row, csrf, showValues, mapValueNames, onDeleteSubmit }) {
|
|
|
|
const [id, key, value] = row.split(' ');
|
|
|
|
return (
|
|
<tr className="align-middle">
|
|
<td className="col-1 text-center">
|
|
<form onSubmit={onDeleteSubmit} action={`/forms/map/${name}/delete`} method="post">
|
|
<input type="hidden" name="_csrf" value={csrf} />
|
|
<input type="hidden" name="key" value={key} />
|
|
<input className="btn btn-danger" type="submit" value="×" />
|
|
</form>
|
|
</td>
|
|
<td>
|
|
{key}
|
|
</td>
|
|
{showValues === true && (
|
|
<td>
|
|
{mapValueNames[value] || value}
|
|
</td>
|
|
)}
|
|
</tr>
|
|
);
|
|
|
|
}
|
|
|