Fix cms client primary screen
Removed shanks from Siemens library Fix "isInUse" param etc
This commit is contained in:
@@ -1,20 +1,17 @@
|
||||
using Step.Model.DTOModels;
|
||||
using CMS_CORE_Library.Models;
|
||||
using Step.Model.DTOModels;
|
||||
using Step.NC;
|
||||
using Step.Utils;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using static Step.Model.Constants;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web.Http;
|
||||
using System.Linq;
|
||||
using static Step.Config.ServerConfig;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using CMS_CORE_Library.Models;
|
||||
using static CMS_CORE_Library.Models.DataStructures;
|
||||
using static Step.Config.ServerConfig;
|
||||
using static Step.Model.Constants;
|
||||
|
||||
namespace Step.Controllers.WebApi
|
||||
{
|
||||
@@ -28,7 +25,7 @@ namespace Step.Controllers.WebApi
|
||||
{
|
||||
ncHandler.Connect();
|
||||
|
||||
CmsError cmsError = ncHandler.GetFileList(filePath, out List<PreviewFileModel> fileList);
|
||||
CmsError cmsError = ncHandler.GetFileList(filePath, out List<PreviewFileModel> fileList);
|
||||
if (cmsError.IsError())
|
||||
return BadRequest(cmsError.localizationKey);
|
||||
|
||||
@@ -37,7 +34,7 @@ namespace Step.Controllers.WebApi
|
||||
}
|
||||
|
||||
[Route("file/info"), HttpGet]
|
||||
public IHttpActionResult GetFileInfo([FromUri]string filePath)
|
||||
public IHttpActionResult GetFileInfo([FromUri]string filePath)
|
||||
{
|
||||
using (NcHandler ncHandler = new NcHandler())
|
||||
{
|
||||
@@ -93,7 +90,7 @@ namespace Step.Controllers.WebApi
|
||||
return BadRequest(cmsError.localizationKey);
|
||||
|
||||
return Ok(fileInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Route("upload"), HttpPost]
|
||||
@@ -110,7 +107,7 @@ namespace Step.Controllers.WebApi
|
||||
{
|
||||
if (item.IsAFile)
|
||||
{
|
||||
if(item.ParameterName == "file")
|
||||
if (item.ParameterName == "file")
|
||||
{
|
||||
using (NcHandler ncHandler = new NcHandler())
|
||||
{
|
||||
@@ -123,7 +120,7 @@ namespace Step.Controllers.WebApi
|
||||
return BadRequest(cmsError.localizationKey);
|
||||
}
|
||||
}
|
||||
else if(item.ParameterName == "image")
|
||||
else if (item.ParameterName == "image")
|
||||
{
|
||||
File.WriteAllBytes(PART_PRG_IMAGES + item.FileName, item.Data);
|
||||
}
|
||||
@@ -133,8 +130,7 @@ namespace Step.Controllers.WebApi
|
||||
return Ok();
|
||||
}
|
||||
|
||||
|
||||
[Route("shared_files"), HttpGet]
|
||||
[Route("shared_files"), HttpGet]
|
||||
public IHttpActionResult GetSharedFolderFileList(string sharedPath)
|
||||
{
|
||||
List<object> filelist = new List<object>();
|
||||
@@ -172,7 +168,6 @@ namespace Step.Controllers.WebApi
|
||||
return Ok(filelist);
|
||||
}
|
||||
|
||||
|
||||
#region Queue Manager
|
||||
|
||||
[Route("queue/add"), HttpPost]
|
||||
@@ -242,7 +237,7 @@ namespace Step.Controllers.WebApi
|
||||
CmsError cmsError = ncHandler.MoveQueueItems(processId, itemsPositions.ObjectId, itemsPositions.NewPosition, out List<DTOQueueModel> queue);
|
||||
if (cmsError.IsError())
|
||||
return BadRequest(cmsError.localizationKey);
|
||||
|
||||
|
||||
return Ok(queue);
|
||||
}
|
||||
}
|
||||
@@ -258,7 +253,7 @@ namespace Step.Controllers.WebApi
|
||||
CmsError cmsError = ncHandler.EditQueueItemReps(processId, itemId, reps.Reps, out DTOQueueModel queueItem);
|
||||
if (cmsError.IsError())
|
||||
return BadRequest(cmsError.localizationKey);
|
||||
|
||||
|
||||
return Ok(queueItem);
|
||||
}
|
||||
}
|
||||
@@ -282,10 +277,10 @@ namespace Step.Controllers.WebApi
|
||||
using (NcHandler ncHandler = new NcHandler())
|
||||
{
|
||||
ncHandler.Connect();
|
||||
|
||||
|
||||
CmsError cmsError = ncHandler.StartWorkingQueue(processId);
|
||||
if (cmsError.IsError())
|
||||
return BadRequest(cmsError.localizationKey);
|
||||
return BadRequest(cmsError.localizationKey);
|
||||
|
||||
return Ok();
|
||||
}
|
||||
@@ -324,6 +319,6 @@ namespace Step.Controllers.WebApi
|
||||
public int Reps;
|
||||
}
|
||||
|
||||
#endregion
|
||||
#endregion Queue Manager
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user