feat: frontend add virtual matrix key
This commit is contained in:
@@ -26,7 +26,7 @@ public class BoundaryScanRegs
|
||||
/// </summary>
|
||||
[JsonProperty("cell_name")]
|
||||
[JsonRequired]
|
||||
public string CellName { get; set; }
|
||||
public string CellName { get; set; } = "UnknownCellName";
|
||||
|
||||
/// <summary>
|
||||
/// [TODO:description]
|
||||
@@ -146,7 +146,8 @@ public class Parser
|
||||
/// <returns>[TODO:return]</returns>
|
||||
public Optional<List<BoundaryScanRegs.CellEntry>> GetBoundaryLogicalPorts()
|
||||
{
|
||||
var registers = this.BoundaryRegsDesp["registers"]?.ToList().Where((item)=>{
|
||||
var registers = this.BoundaryRegsDesp["registers"]?.ToList().Where((item) =>
|
||||
{
|
||||
return item["port_id"] is not null;
|
||||
});
|
||||
if (registers is null) return new();
|
||||
|
@@ -21,7 +21,7 @@ public class MatrixKeyController : ControllerBase
|
||||
/// <returns>返回操作结果的状态码</returns>
|
||||
[HttpPost("EnabelMatrixKey")]
|
||||
[EnableCors("Users")]
|
||||
[ProducesResponseType(typeof(uint), StatusCodes.Status200OK)]
|
||||
[ProducesResponseType(typeof(bool), StatusCodes.Status200OK)]
|
||||
[ProducesResponseType(typeof(Exception), StatusCodes.Status500InternalServerError)]
|
||||
public async ValueTask<IResult> EnabelMatrixKey(string address, int port)
|
||||
{
|
||||
@@ -48,7 +48,7 @@ public class MatrixKeyController : ControllerBase
|
||||
/// <returns>返回操作结果的状态码</returns>
|
||||
[HttpPost("DisableMatrixKey")]
|
||||
[EnableCors("Users")]
|
||||
[ProducesResponseType(typeof(uint), StatusCodes.Status200OK)]
|
||||
[ProducesResponseType(typeof(bool), StatusCodes.Status200OK)]
|
||||
[ProducesResponseType(typeof(Exception), StatusCodes.Status500InternalServerError)]
|
||||
public async ValueTask<IResult> DisableMatrixKey(string address, int port)
|
||||
{
|
||||
@@ -76,7 +76,7 @@ public class MatrixKeyController : ControllerBase
|
||||
/// <returns>返回操作结果的状态码</returns>
|
||||
[HttpPost("SetMatrixKeyStatus")]
|
||||
[EnableCors("Users")]
|
||||
[ProducesResponseType(typeof(uint), StatusCodes.Status200OK)]
|
||||
[ProducesResponseType(typeof(bool), StatusCodes.Status200OK)]
|
||||
[ProducesResponseType(typeof(Exception), StatusCodes.Status500InternalServerError)]
|
||||
public async ValueTask<IResult> SetMatrixKeyStatus(string address, int port, [FromBody] bool[] keyStates)
|
||||
{
|
||||
|
Reference in New Issue
Block a user