Compare commits

...

86 Commits

Author SHA1 Message Date
Samuele Locatelli 5d3edf46c6 Refactoring: MODELS 2020-06-19 19:06:02 +02:00
Samuele Locatelli 50c4d72464 Merge branch 'feature/add/ProdInfo' into develop 2020-06-19 18:39:06 +02:00
Samuele Locatelli 870d525c41 Code cleanup from #if false 2020-06-19 18:36:44 +02:00
= 0b0523cb28 Merge remote-tracking branch 'CMS/develop' into develop 2020-06-19 18:13:38 +02:00
= 34ab4d7adb Merge remote-tracking branch 'teamdev/develop' into develop 2020-06-19 18:08:16 +02:00
= b5d1bc37cf riscaldi inferiore 2020-06-19 18:07:34 +02:00
= fdeb79c7e2 riscaldi con selezioni a lazo :) 2020-06-19 18:00:33 +02:00
Samuele Locatelli cdc7b49387 fixed seed duplicating data for features 2020-06-19 17:22:37 +02:00
Samuele Locatelli c5cd0b1c92 Merge branch 'develop' into feature/add/ProdInfo 2020-06-19 16:38:59 +02:00
Samuele Locatelli a48ca84178 Removed duplicated task for prodInfo check 2020-06-19 16:38:36 +02:00
Samuele Locatelli fa9325c504 Fix DB persistence methods 2020-06-19 16:37:32 +02:00
Alessio 9a7c40e020 fix style programmazione preriscaldo 2020-06-19 15:52:09 +02:00
Alessio 25444bf1a3 fix dashboard 2020-06-19 15:43:10 +02:00
Samuele Locatelli 7a73cc4b08 Merge branch 'develop' into feature/add/ProdInfo 2020-06-19 15:32:38 +02:00
Samuele Locatelli dc17731a5c Completed update of errors istance name 2020-06-19 15:32:29 +02:00
Alessio 32510556d6 add usage of prodService 2020-06-19 15:20:46 +02:00
Samuele Locatelli be747c7e39 UPdate CmsError istance name 2020-06-19 15:17:21 +02:00
Samuele Locatelli 7a48f34fb9 Start vers 0.9.5 2020-06-19 15:04:15 +02:00
Samuele Locatelli 1fe26026b6 Merge branch 'develop' of https://bitbucket.org/ncarminati/cms_thermo_active into feature/add/ProdInfo 2020-06-19 14:53:25 +02:00
Alessio 65ee4154f1 fix style buttons opzioni 2020-06-19 14:53:19 +02:00
Samuele Locatelli 18bc2da627 Merge branch 'develop' into feature/add/ProdInfo 2020-06-19 14:50:43 +02:00
Samuele Locatelli 20a829b50b Fix server startup for TMP file creation 2020-06-19 14:50:29 +02:00
Samuele Locatelli b287da9b95 Fix TMP folder ThermoActive 2020-06-19 14:50:07 +02:00
Samuele Locatelli 688420c42b Reading of Warming data: thread delayed 2020-06-19 14:49:42 +02:00
Alessio 279dfb6bb0 fix opzioni 2020-06-19 14:34:35 +02:00
= e6dcbf11ac fix style 2020-06-19 14:07:49 +02:00
= 5e4fecdc6f fix 2020-06-19 14:00:40 +02:00
= c55f0eddcd Merge remote-tracking branch 'teamdev/develop' into develop 2020-06-19 13:55:06 +02:00
= 92b9cea7d8 fix opzioni 2020-06-19 13:54:18 +02:00
Alessio 86370282ed fix point 12 2020-06-19 12:53:24 +02:00
Alessio 6dcffeb72b fix dashboard 2020-06-19 12:43:22 +02:00
Alessio e17d5c25de Merge remote-tracking branch 'origin/develop' into develop 2020-06-19 12:33:30 +02:00
Alessio ad589992f3 add prodService and fix dashboard 2020-06-19 12:33:23 +02:00
= de4dfdcbb0 fix grafici 2020-06-19 12:03:19 +02:00
= 49e3242f3f Merge remote-tracking branch 'CMS/develop' into develop 2020-06-19 11:04:20 +02:00
= dafafbca13 Merge remote-tracking branch 'teamdev/develop' into develop 2020-06-19 10:47:48 +02:00
= daf9c93309 fix pirometro inferiore 2020-06-19 10:45:48 +02:00
= eedd1bee1f fix termo superiore 2020-06-19 10:41:47 +02:00
Alessio 5aa519ea72 add list of components and arch-interface to the dashboard 2020-06-19 10:26:55 +02:00
Samuele Locatelli a2efd0d3f3 Merge branch 'develop' into feature/add/ProdInfo 2020-06-18 17:14:37 +02:00
Samuele Locatelli 62b0a6d481 forced recipe param error false in debug for UI 2020-06-18 17:14:24 +02:00
= 20013ef3e4 Merge remote-tracking branch 'teamdev/develop' into develop 2020-06-18 17:10:29 +02:00
= 4a4223957d fix 2020-06-18 17:10:17 +02:00
Samuele Locatelli bbc5d131ad New risk data (actual) from Marco Carissoni, new version 2020-06-18 17:02:05 +02:00
Samuele Locatelli 2741c56a22 commented actual visible/enabled for recipe for UI 2020-06-18 17:01:26 +02:00
Alessio e12c5e6b62 fix point 8 and 6 2020-06-18 16:50:47 +02:00
= 1329b7d91f fix dashboard grid size 2020-06-18 16:47:04 +02:00
Alessio 062aa0ad27 Merge remote-tracking branch 'origin/develop' into develop 2020-06-18 16:36:24 +02:00
Alessio 997f8fdfb4 Auto stash before merge of "develop" and "origin/develop" 2020-06-18 16:36:13 +02:00
= 6134047b61 fix 2020-06-18 16:36:06 +02:00
= eb4ad92f3e fix dashboard layout 2020-06-18 16:31:16 +02:00
= f54f96a42f Merge remote-tracking branch 'teamdev/develop' into develop 2020-06-18 15:40:02 +02:00
= 8fcd50d47b disattivazione sliders and numeric 2020-06-18 15:39:27 +02:00
Alessio 23e8767604 add bottom line 2020-06-18 14:40:57 +02:00
Alessio c11f9028db fix font family 2020-06-18 14:08:46 +02:00
Alessio ad196ad788 fix dashboard 2020-06-18 12:00:04 +02:00
Alessio f906a05969 add component to dashboard 2020-06-18 10:31:17 +02:00
Samuele Locatelli 8742cbee18 ver 0.9.3 for testing, prettybin lib management 2020-06-18 08:22:52 +02:00
Samuele Locatelli 7ed56b3a68 Merge branch 'feature/add/ProdInfo' into develop 2020-06-17 18:35:56 +02:00
Samuele Locatelli 54685853bb Merge branch 'develop' of https://bitbucket.org/ncarminati/cms_thermo_active into develop 2020-06-17 18:35:49 +02:00
Samuele Locatelli fa060cb839 updated for prodInfo setup and pz target 2020-06-17 18:34:56 +02:00
= 91872776f0 Merge remote-tracking branch 'CMS/develop' into develop 2020-06-17 17:42:08 +02:00
= 77d8a6dbac Merge remote-tracking branch 'teamdev/develop' into develop 2020-06-17 17:41:19 +02:00
= d030f09709 fix clock 2020-06-17 17:41:00 +02:00
= 8858602f9c fix gauge and dashboard layout 2020-06-17 17:36:11 +02:00
Samuele Locatelli 3574dffaa6 Fix strobe/ack for new prodInfo data 2020-06-17 17:20:38 +02:00
Samuele Locatelli ed74fb9b37 Fix compilation path for client 2020-06-17 16:58:16 +02:00
Alessio c0fdf9668b fix layout processo 2020-06-17 15:31:25 +02:00
Samuele Locatelli 97c4ce8c26 Merge branch 'develop' of https://bitbucket.org/ncarminati/cms_thermo_active into develop 2020-06-17 14:52:04 +02:00
Samuele Locatelli 12dc55ef8c Completed prodInfo initial integration, beta test 2020-06-17 14:48:53 +02:00
Samuele Locatelli cc68908084 Added DB migration 2020-06-17 14:48:32 +02:00
Alessio 99279824ef fix buttons 2020-06-17 11:51:06 +02:00
Alessio 36c5ff8def fix paddle 2020-06-17 11:37:38 +02:00
= d32f00bde6 Merge remote-tracking branch 'CMS/develop' into develop 2020-06-17 09:55:05 +02:00
= 8eed4ec2eb fix chart 2020-06-17 09:53:40 +02:00
= c249d7a9be Merge remote-tracking branch 'teamdev/develop' into develop 2020-06-17 09:49:56 +02:00
= 0b8f0adb96 fix chart 2020-06-17 09:49:43 +02:00
Alessio aae6aa8c09 fix layout avvio produzione modal 2020-06-17 09:33:57 +02:00
Alessio 3d9458002b apply shrink 2020-06-17 08:59:33 +02:00
Alessio b84ca57735 Merge branch 'newfeature/paddle' into develop 2020-06-17 08:32:19 +02:00
Samuele Locatelli a6cdf864ae FIrst version of prodInfo DB persistence 2020-06-16 19:28:27 +02:00
Alessio d74f886a06 add labels to svgchart 2020-06-16 16:44:31 +02:00
Alessio 0be93533d7 fix positioning of the paddle butotn 2020-06-15 16:10:09 +02:00
Alessio 4c907a2474 fix positioning paddle 2020-06-15 13:50:08 +02:00
Alessio fe82ea006b Merge branch 'develop' into newfeature/paddle 2020-06-15 10:49:53 +02:00
Alessio cbfd2fe3c5 Merge branch 'develop' into newfeature/paddle 2020-06-11 10:48:23 +02:00
186 changed files with 5332 additions and 5641 deletions
+2 -2
View File
@@ -35,7 +35,7 @@
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<OutputPath>..\Thermo.Active\bin\Client_Debug\x64\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
@@ -44,7 +44,7 @@
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<OutputPath>..\Thermo.Active\bin\Client\x64\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
File diff suppressed because it is too large Load Diff
+2 -14
View File
@@ -281,8 +281,6 @@ namespace Thermo.Active.Config
public static void ReadServerConfig()
{
//CalculateHash(SERVER_CONFIG_PATH);
// Get server file handler
XDocument xmlConfigFile = GetXmlHandlerWithValidator(SERVER_CONFIG_SCHEMA_PATH, SERVER_CONFIG_PATH);
@@ -878,8 +876,8 @@ namespace Thermo.Active.Config
}
catch
{ }
// write template to current data...
File.WriteAllText(LIVE_RECIPE_PATH, rawData);
// salva current
SaveRecipeCurrent();
answ = true;
}
// rendo se fatto
@@ -1022,16 +1020,6 @@ namespace Thermo.Active.Config
return answ;
}
#if false
public static void ReadMainProgram()
{
if (File.Exists(MAIN_PROGRAM_CONFIG_PATH))
{
CMSMainProgramContent = File.ReadAllText(MAIN_PROGRAM_CONFIG_PATH);
}
}
#endif
public static string CalculateHash(string filename)
{
using (var sha = SHA1.Create())
+29 -165
View File
@@ -22,7 +22,10 @@ using static CMS_CORE_Library.Models.DataStructures;
using static Thermo.Active.Config.ServerConfig;
using static Thermo.Active.Model.Constants;
using static Thermo.Active.Utils.ExceptionManager;
using Thermo.Active.Model.DTOModels.Recipe;
using Thermo.Active.Model.DTOModels.ThModules;
using Thermo.Active.Model.DTOModels.ThProd;
using Thermo.Active.Model.DTOModels.ThRecipe;
using Thermo.Active.Model.DTOModels.ThWarmers;
public static class ThreadsFunctions
{
@@ -186,10 +189,10 @@ public static class ThreadsFunctions
// Check if client is connected
if (ncAdapter.numericalControl.NC_IsConnected())
{
// Manage status command
libraryError = ncAdapter.ManageProdUpdate();
if (libraryError.errorCode != 0)
ManageLibraryError(libraryError);
//// Manage status command
//libraryError = ncAdapter.ManageProdUpdate();
//if (libraryError.errorCode != 0)
// ManageLibraryError(libraryError);
}
else
RestoreConnection();
@@ -428,10 +431,13 @@ public static class ThreadsFunctions
// Send through signalR
MessageServices.Current.Publish(SEND_EXPIRED_MAINTENANCES_DATA, null, expiredMaintenances);
// 2020.06.18 commentata da indicazione di Lucio Maranta (NON dovrebbe servire ora)
#if false
//Manage Candies
libraryError = ncAdapter.ManageCandies();
if (libraryError.errorCode != 0)
ManageLibraryError(libraryError);
ManageLibraryError(libraryError);
#endif
}
else
RestoreConnection();
@@ -499,52 +505,6 @@ public static class ThreadsFunctions
}
}
#if false
public static void ReadHeadsData()
{
NcAdapter ncAdapter = new NcAdapter();
Stopwatch sw = new Stopwatch();
try
{
// Try connection
CmsError libraryError = ncAdapter.Connect();
if (libraryError.errorCode != 0)
ManageLibraryError(libraryError);
while (true)
{
sw.Restart();
if (ncAdapter.numericalControl.NC_IsConnected())
{
// Get Data from config and PLC
libraryError = ncAdapter.GetHeadsData(out List<DTOHeadModel> heads);
if (libraryError.errorCode != 0)
ManageLibraryError(libraryError);
else
// Send through signalR
MessageServices.Current.Publish(SEND_HEADS_DATA, null, heads);
}
else
RestoreConnection();
sw.Stop();
//Update thread timer
UpdateStat(MethodBase.GetCurrentMethod().Name, sw.ElapsedMilliseconds);
// Wait
Thread.Sleep(CalcSleepTime(500, (int)sw.ElapsedMilliseconds));
}
}
catch (ThreadAbortException)
{
ncAdapter.Dispose();
}
}
#endif
public static void ReadAxesNamesData()
{
NcAdapter ncAdapter = new NcAdapter();
@@ -633,102 +593,6 @@ public static class ThreadsFunctions
}
}
#if false
public static void ReadActiveProgramData()
{
NcFileAdapter ncAdapter = new NcFileAdapter();
Stopwatch sw = new Stopwatch();
try
{
// Try connection
CmsError libraryError = ncAdapter.Connect();
if (libraryError.errorCode != 0)
ManageLibraryError(libraryError);
while (true)
{
sw.Restart();
if (ncAdapter.numericalControl.NC_IsConnected())
{
// Get Data from config and PLC
libraryError = ncAdapter.GetActiveProgramInfo(out DTOActiveProgramDataModel active);
if (libraryError.IsError())
ManageLibraryError(libraryError);
else
// Send through signalR
MessageServices.Current.Publish(SEND_ACTIVE_PROGRAM_DATA, null, active);
}
else
RestoreConnection();
sw.Stop();
//Update thread timer
UpdateStat(MethodBase.GetCurrentMethod().Name, sw.ElapsedMilliseconds);
// Wait
Thread.Sleep(CalcSleepTime(400, (int)sw.ElapsedMilliseconds));
}
}
catch (ThreadAbortException)
{
ncAdapter.Dispose();
}
}
#endif
#if false
public static void ReadPartProgramQueueData()
{
NcFileAdapter ncAdapter = new NcFileAdapter();
Stopwatch sw = new Stopwatch();
try
{
// Try connection
CmsError libraryError = ncAdapter.Connect();
if (libraryError.errorCode != 0)
ManageLibraryError(libraryError);
while (true)
{
sw.Restart();
// Check if client is connected
if (ncAdapter.numericalControl.NC_IsConnected())
{
// Read data
libraryError = ncAdapter.UpdateQueue();
if (libraryError.IsError())
ManageLibraryError(libraryError);
libraryError = ncAdapter.GetSelectedProcessQueue(out List<DTOQueueModel> queue);
if (libraryError.IsError())
ManageLibraryError(libraryError);
MessageServices.Current.Publish(SEND_QUEUE_DATA, null, queue);
}
else
RestoreConnection();
sw.Stop();
//Update thread timer
UpdateStat(MethodBase.GetCurrentMethod().Name, sw.ElapsedMilliseconds);
// Wait
Thread.Sleep(CalcSleepTime(500, (int)sw.ElapsedMilliseconds));
}
}
catch (ThreadAbortException)
{
ncAdapter.Dispose();
}
}
#endif
public static void ReadScadaData()
{
NcAdapter ncAdapter = new NcAdapter();
@@ -835,7 +699,7 @@ public static class ThreadsFunctions
// Check if client is connected
if (ncAdapter.numericalControl.NC_IsConnected())
{
// Get new data from PLC
// Get new data from PLC (and log if changed...)
libraryError = ncAdapter.ReadProdInfoData(out ThermoModels.ProdInfoModel prodInfoData);
if (libraryError.IsError())
ManageLibraryError(libraryError);
@@ -980,7 +844,7 @@ public static class ThreadsFunctions
// Update thread timer
UpdateStat(MethodBase.GetCurrentMethod().Name, sw.ElapsedMilliseconds);
// Wait
Thread.Sleep(CalcSleepTime(1000, (int)sw.ElapsedMilliseconds));
Thread.Sleep(CalcSleepTime(1800, (int)sw.ElapsedMilliseconds));
}
}
catch (ThreadAbortException)
@@ -1258,9 +1122,9 @@ public static class ThreadsFunctions
ICollection<CultureInfo> cultureInfos = new List<CultureInfo>();
// Get nc available language
CmsError cmsError = ncAdapter.numericalControl.NC_GetAvailableLanguages(ref cultureInfos);
if (cmsError.IsError())
ManageLibraryError(cmsError);
CmsError libraryError = ncAdapter.numericalControl.NC_GetAvailableLanguages(ref cultureInfos);
if (libraryError.IsError())
ManageLibraryError(libraryError);
// Filter available language with
availableLanguages = availableLanguages.Where(x => cultureInfos.Any(y => y.TwoLetterISOLanguageName == x.IsoId)).ToList();
@@ -1319,15 +1183,15 @@ public static class ThreadsFunctions
ThreadsHandler.Stop();
StatReset();
NcAdapter ncAdapter = new NcAdapter();
CmsError cmsError = NO_ERROR;
CmsError libraryError = NO_ERROR;
// Run loop until NC is connected
while (!ncAdapter.numericalControl.NC_IsConnected())
{
// Try reconnection
cmsError = ncAdapter.Connect();
if (cmsError.errorCode == CMS_ERROR_CODES.SIEMENS_ENVIRONMENT_NOT_FOUND || cmsError.errorCode == CMS_ERROR_CODES.SIEMENS_HMI_NOT_RUNNING || cmsError.errorCode == CMS_ERROR_CODES.OSAI_TT_FOLDER_NOT_FOUND)
ManageLibraryError(cmsError);
else if (cmsError.errorCode != CMS_ERROR_CODES.OK)
libraryError = ncAdapter.Connect();
if (libraryError.errorCode == CMS_ERROR_CODES.SIEMENS_ENVIRONMENT_NOT_FOUND || libraryError.errorCode == CMS_ERROR_CODES.SIEMENS_HMI_NOT_RUNNING || libraryError.errorCode == CMS_ERROR_CODES.OSAI_TT_FOLDER_NOT_FOUND)
ManageLibraryError(libraryError);
else if (libraryError.errorCode != CMS_ERROR_CODES.OK)
{
ncAdapter.Dispose();
}
@@ -1338,7 +1202,7 @@ public static class ThreadsFunctions
Thread.Sleep(1000);
}
if (!cmsError.IsError())
if (!libraryError.IsError())
{
if (ServerStartupConfig.AutoOpenCmsClient)
StartCMSClient();
@@ -1370,12 +1234,12 @@ public static class ThreadsFunctions
ConnThread.Abort();
}
public static void ManageLibraryError(CmsError cmsError)
public static void ManageLibraryError(CmsError libraryError)
{
switch (cmsError.errorCode)
switch (libraryError.errorCode)
{
case CMS_ERROR_CODES.NC_PROD_ERROR:
ManageError(ERROR_LEVEL.WARNING, cmsError.localizationKey);
ManageError(ERROR_LEVEL.WARNING, libraryError.localizationKey);
break;
case CMS_ERROR_CODES.NOT_CONNECTED:
@@ -1385,7 +1249,7 @@ public static class ThreadsFunctions
case CMS_ERROR_CODES.SIEMENS_ENVIRONMENT_NOT_FOUND:
case CMS_ERROR_CODES.OSAI_TT_FOLDER_NOT_FOUND:
case CMS_ERROR_CODES.OPTION_NOT_CONSISTENT:
ManageError(ERROR_LEVEL.FATAL, cmsError.localizationKey);
ManageError(ERROR_LEVEL.FATAL, libraryError.localizationKey);
break;
case CMS_ERROR_CODES.SIEMENS_HMI_NOT_RUNNING:
@@ -1393,11 +1257,11 @@ public static class ThreadsFunctions
break;
case CMS_ERROR_CODES.SELECTED_PROCESS:
ManageError(ERROR_LEVEL.WARNING, cmsError.localizationKey);
ManageError(ERROR_LEVEL.WARNING, libraryError.localizationKey);
break;
case CMS_ERROR_CODES.INTERNAL_ERROR:
ManageException(ERROR_LEVEL.FATAL, cmsError.exception);
ManageException(ERROR_LEVEL.FATAL, libraryError.exception);
break;
}
}
-1
View File
@@ -13,7 +13,6 @@ namespace Thermo.Active.Core
ThreadsFunctions.ManageWatchdog,
ThreadsFunctions.ManageStatusCommand,
ThreadsFunctions.ManageConfRequest,
ThreadsFunctions.ManageProdUpdate,
ThreadsFunctions.ReadAlarms,
ThreadsFunctions.ReadPowerOnData,
ThreadsFunctions.StatThread,
@@ -0,0 +1,163 @@
using Thermo.Active.Model.DatabaseModels;
using System;
using System.Linq;
using static Thermo.Active.Config.ServerConfig;
using System.Collections.Generic;
using CMS_CORE_Library.Models;
namespace Thermo.Active.Database.Controllers
{
public class ProdInfoController : IDisposable
{
private DatabaseContext dbCtx;
public ProdInfoController()
{
// Initialize database context
dbCtx = new DatabaseContext();
}
public void Dispose()
{
// Clear database context
dbCtx.Dispose();
}
/// <summary>
/// Get record by NumDone
/// </summary>
/// <param name="num"></param>
/// <returns></returns>
public ProdInfoModel FindByNumDone(int num)
{
return dbCtx
.ProdInfo
.Where(x => x.NumDone == num)
.SingleOrDefault();
}
/// <summary>
/// Get historical paginated data from DB (DESC ordered
/// </summary>
/// <param name="numStart"></param>
/// <param name="numRecord"></param>
/// <returns></returns>
public List<ProdInfoModel> GetPaginated(int numStart, int numRecord)
{
// cehck numEnd
int numEnd = numStart - numRecord;
if (numEnd < 0)
numEnd = 0;
// retrieve
return dbCtx
.ProdInfo
.Where(x => x.NumDone <= numStart && x.NumDone > numEnd)
.OrderByDescending(x => x.DtEvent)
.ToList();
}
/// <summary>
/// Create new prodInfo record on DB
/// </summary>
/// <param name="NumTarget"></param>
/// <param name="NumDone"></param>
/// <param name="TimeWarm"></param>
/// <param name="TimeVent"></param>
/// <param name="TimeVacuum"></param>
/// <param name="TimeCycleGross"></param>
/// <param name="TimeCycleNet"></param>
/// <param name="MaterialTempEndWarm"></param>
/// <param name="MaterialTempEndVent"></param>
/// <param name="MoldTemp"></param>
/// <param name="VacuumReadVal"></param>
/// <param name="MouldEnergyOUT"></param>
/// <param name="MouldEnergyIN"></param>
/// <returns></returns>
public ProdInfoModel Create(short NumTarget, short NumDone, int TimeWarm, int TimeVent, int TimeVacuum, int TimeCycleGross, int TimeCycleNet, double MaterialTempEndWarm, double MaterialTempEndVent, double MoldTemp, double VacuumReadVal, double MouldEnergyOUT, double MouldEnergyIN)
{
// Create database machine model
ProdInfoModel prodData = new ProdInfoModel()
{
DtEvent = DateTime.UtcNow,
NumTarget = NumTarget,
NumDone = NumDone,
TimeWarm = TimeWarm,
TimeVent = TimeVent,
TimeVacuum = TimeVacuum,
TimeCycleGross = TimeCycleGross,
TimeCycleNet = TimeCycleNet,
MaterialTempEndWarm = MaterialTempEndWarm,
MaterialTempEndVent = MaterialTempEndVent,
MoldTemp = MoldTemp,
VacuumReadVal = VacuumReadVal,
MouldEnergyOUT = MouldEnergyOUT,
MouldEnergyIN = MouldEnergyIN
};
try
{
// Add to database
dbCtx.ProdInfo.Add(prodData);
// Commit changes
dbCtx.SaveChanges();
}
catch
{ }
return prodData;
}
/// <summary>
/// Process table and keep only maxKeep most recent ones
/// </summary>
/// <param name="maxKeep"></param>
/// <returns></returns>
public bool PurgeOldest(int maxKeep)
{
bool answ = false;
// check if purge needed
int numRec = dbCtx.ProdInfo.Count();
if (numRec > maxKeep)
{
ProdInfoModel firstToDelete = (ProdInfoModel)(from p in dbCtx.ProdInfo
orderby p.DtEvent descending
select p).Skip(maxKeep).Take(1);
// call deletion
dbCtx
.ProdInfo
.RemoveRange(
dbCtx
.ProdInfo
.Where(x => x.DtEvent <= firstToDelete.DtEvent)
);
try
{
// save!
dbCtx.SaveChanges();
answ = true;
}
catch
{ }
}
return answ;
}
/// <summary>
/// Process table and delete all record (truncate)
/// </summary>
/// <returns></returns>
public bool PurgeAll()
{
bool answ = false;
try
{
dbCtx
.Database
.ExecuteSqlCommand("TRUNCATE TABLE prodInfo");
}
catch
{ }
return answ;
}
}
}
@@ -42,6 +42,10 @@ namespace Thermo.Active.Database
public DbSet<AlarmNoteModel> AlarmsNotes { get; set; }
public DbSet<AlarmFileModel> AlarmFiles { get; set; }
// thermo!
public DbSet<ProdInfoModel> ProdInfo { get; set; }
// Create migration string
public static string CONNECTION_STRING = "Server = " + "localhost" + "; Database=" + DATABASE_NAME + ";Uid=" + DATABASE_USER + ";Pwd=" + DATABASE_PWD + ";";
@@ -0,0 +1,29 @@
// <auto-generated />
namespace Thermo.Active.Database.Migrations
{
using System.CodeDom.Compiler;
using System.Data.Entity.Migrations;
using System.Data.Entity.Migrations.Infrastructure;
using System.Resources;
[GeneratedCode("EntityFramework.Migrations", "6.2.0-61023")]
public sealed partial class AddedProdInfoModel : IMigrationMetadata
{
private readonly ResourceManager Resources = new ResourceManager(typeof(AddedProdInfoModel));
string IMigrationMetadata.Id
{
get { return "202006170558519_AddedProdInfoModel"; }
}
string IMigrationMetadata.Source
{
get { return null; }
}
string IMigrationMetadata.Target
{
get { return Resources.GetString("Target"); }
}
}
}
@@ -0,0 +1,38 @@
namespace Thermo.Active.Database.Migrations
{
using System;
using System.Data.Entity.Migrations;
public partial class AddedProdInfoModel : DbMigration
{
public override void Up()
{
CreateTable(
"dbo.ProdInfo",
c => new
{
DtEvent = c.DateTime(nullable: false, precision: 0),
NumTarget = c.Short(nullable: false),
NumDone = c.Short(nullable: false),
TimeWarm = c.Int(nullable: false),
TimeVent = c.Int(nullable: false),
TimeVacuum = c.Int(nullable: false),
TimeCycleGross = c.Int(nullable: false),
TimeCycleNet = c.Int(nullable: false),
MaterialTempEndWarm = c.Double(nullable: false),
MaterialTempEndVent = c.Double(nullable: false),
MoldTemp = c.Double(nullable: false),
VacuumReadVal = c.Double(nullable: false),
MouldEnergyOUT = c.Double(nullable: false),
MouldEnergyIN = c.Double(nullable: false),
})
.PrimaryKey(t => t.DtEvent);
}
public override void Down()
{
DropTable("dbo.ProdInfo");
}
}
}
File diff suppressed because one or more lines are too long
@@ -30,7 +30,7 @@ namespace Thermo.Active.Database.Migrations
new RoleModel() { RoleId = (int)ROLE_IDS.CUSTOMER_MAINTAINER, Level = 10, Name = "Maintainer" }
);
context.FunctionsAccess.AddOrUpdate(
context.FunctionsAccess.AddOrUpdate(x => x.Name,
// General Function, if plcId is 0 then the functionality is not connected to the NC
new FunctionAccessModel() { Name = GENERAL, Area = GENERAL_KEY, Enabled = true, WriteLevelMin = 1, ReadLevelMin = 1, PlcId = 0 },
new FunctionAccessModel() { Name = USER_FUNCTIONS, Area = GENERAL_KEY, Enabled = true, WriteLevelMin = 1, ReadLevelMin = 1, PlcId = 0 },
@@ -113,6 +113,7 @@
<ItemGroup>
<Compile Include="Controllers\AlarmsController.cs" />
<Compile Include="Controllers\FunctionsAccessController.cs" />
<Compile Include="Controllers\ProdInfoController.cs" />
<Compile Include="Controllers\MachinesController.cs" />
<Compile Include="Controllers\MaintenancesController.cs" />
<Compile Include="Controllers\QueueController.cs" />
@@ -126,6 +127,10 @@
<Compile Include="Migrations\202004241109233_Thermo-Start.Designer.cs">
<DependentUpon>202004241109233_Thermo-Start.cs</DependentUpon>
</Compile>
<Compile Include="Migrations\202006170558519_AddedProdInfoModel.cs" />
<Compile Include="Migrations\202006170558519_AddedProdInfoModel.Designer.cs">
<DependentUpon>202006170558519_AddedProdInfoModel.cs</DependentUpon>
</Compile>
<Compile Include="Migrations\Configuration.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Redis\redUtil.cs" />
@@ -165,6 +170,9 @@
<EmbeddedResource Include="Migrations\202004241109233_Thermo-Start.resx">
<DependentUpon>202004241109233_Thermo-Start.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Migrations\202006170558519_AddedProdInfoModel.resx">
<DependentUpon>202006170558519_AddedProdInfoModel.cs</DependentUpon>
</EmbeddedResource>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
+3 -2
View File
@@ -198,7 +198,8 @@ namespace Thermo.Active.Model
}
// Config File Names
public static readonly string BASE_PATH = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
public static readonly string BASE_PATH = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location);
//public static readonly string BASE_PATH = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location).Replace("\\lib", "");
#if DEBUG
public static readonly string CLIENT_PATH_64 = BASE_PATH + @"\Client_Debug\x64\" + CLIENT_EXE_NAME;
@@ -348,7 +349,7 @@ namespace Thermo.Active.Model
public const string CMS_FOLDER_PATH = @"C:\CMS\";
public const string ALARM_ATTACHMENT_PATH = @"C:\CMS\Active\attachment\alarm\";
public const string TEMP_FOLDER = @"C:\CMS\Active\TMP\";
public const string TEMP_FOLDER = @"C:\CMS\ThermoActive\TMP\";
public const string TEMP_PP_FOLDER = TEMP_FOLDER + @"pp\";
public const string JOB_TMP_DIRECTORY = TEMP_PP_FOLDER + @"job\";
public const string QUEUE_TMP_FOLDER = TEMP_PP_FOLDER + @"queue\";
@@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Thermo.Active.Model.DTOModels.Recipe
namespace Thermo.Active.Model.DTOModels.ThModules
{
public class DTOModule
{
@@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Thermo.Active.Model.DTOModels.Recipe
namespace Thermo.Active.Model.DTOModels.ThModules
{
public class DTOModuleConfigModel
{
@@ -5,7 +5,7 @@ using System.Text;
using System.Threading.Tasks;
using static Thermo.Active.Model.Constants;
namespace Thermo.Active.Model.DTOModels.Recipe
namespace Thermo.Active.Model.DTOModels.ThModules
{
public class DTOModulesBlock
{
@@ -71,53 +71,4 @@ namespace Thermo.Active.Model.DTOModels.Recipe
}
}
#if false
public struct RPRange
{
public double Min { get; set; }
public double Max { get; set; }
public override bool Equals(object obj)
{
if (!(obj is RPRange item))
return false;
if (Min != item.Min)
return false;
if (Max != item.Max)
return false;
return true;
}
public override int GetHashCode()
{
return base.GetHashCode();
}
}
public struct RPStatus
{
public bool Visible { get; set; }
public bool Enabled { get; set; }
public bool HasError { get; set; }
public override bool Equals(object obj)
{
if (!(obj is RPStatus item))
return false;
if (Visible != item.Visible)
return false;
if (Enabled != item.Enabled)
return false;
if (HasError != item.HasError)
return false;
return true;
}
public override int GetHashCode()
{
return base.GetHashCode();
}
}
#endif
}
@@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Thermo.Active.Model.DTOModels.ThermoProd
namespace Thermo.Active.Model.DTOModels.ThProd
{
public enum Status
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using Thermo.Active.Model.ConfigModels;
namespace Thermo.Active.Model.DTOModels.Recipe
namespace Thermo.Active.Model.DTOModels.ThRecipe
{
public class DTORecipeConfigModel
{
@@ -6,7 +6,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Thermo.Active.Model.DTOModels.Recipe
namespace Thermo.Active.Model.DTOModels.ThRecipe
{
[JsonConverter(typeof(StringEnumConverter))]
@@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Thermo.Active.Model.DTOModels.Recipe
namespace Thermo.Active.Model.DTOModels.ThRecipe
{
public class DTORecipeParam
{
@@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Thermo.Active.Model.DTOModels.Recipe
namespace Thermo.Active.Model.DTOModels.ThWarmers
{
public class DTOWarmers
{
@@ -0,0 +1,51 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Thermo.Active.Model.DatabaseModels
{
[Table("ProdInfo")]
public class ProdInfoModel
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.None)]
[Column("DtEvent", Order = 0)]
public DateTime DtEvent { get; set; }
[Column("NumTarget")]
public short NumTarget { get; set; }
[Column("NumDone")]
public short NumDone { get; set; }
[Column("TimeWarm")]
public int TimeWarm { get; set; }
[Column("TimeVent")]
public int TimeVent { get; set; }
[Column("TimeVacuum")]
public int TimeVacuum { get; set; }
[Column("TimeCycleGross")]
public int TimeCycleGross { get; set; }
[Column("TimeCycleNet")]
public int TimeCycleNet { get; set; }
[Column("MaterialTempEndWarm")]
public double MaterialTempEndWarm { get; set; }
[Column("MaterialTempEndVent")]
public double MaterialTempEndVent { get; set; }
[Column("MoldTemp")]
public double MoldTemp { get; set; }
[Column("VacuumReadVal")]
public double VacuumReadVal { get; set; }
[Column("MouldEnergyOUT")]
public double MouldEnergyOUT { get; set; }
[Column("MouldEnergyIN")]
public double MouldEnergyIN { get; set; }
}
}
+10 -11
View File
@@ -89,6 +89,7 @@
<Compile Include="DatabaseModels\NcOffsetModel.cs" />
<Compile Include="DatabaseModels\NcFamilyModel.cs" />
<Compile Include="DatabaseModels\PerformedMaintenanceModel.cs" />
<Compile Include="DatabaseModels\ProdInfoModel.cs" />
<Compile Include="DatabaseModels\QueueItemsModel.cs" />
<Compile Include="DatabaseModels\RoleModel.cs">
<Generator>DtsGenerator</Generator>
@@ -104,12 +105,12 @@
<Compile Include="DTOModels\DTOAxesModel.cs" />
<Compile Include="DTOModels\DTOAxisNameModel.cs" />
<Compile Include="DTOModels\DTOClientConfigurationModel.cs" />
<Compile Include="DTOModels\Recipe\DTOModule.cs" />
<Compile Include="DTOModels\Recipe\DTOModuleConfigModel.cs" />
<Compile Include="DTOModels\Recipe\DTOModulesBlock.cs" />
<Compile Include="DTOModels\Recipe\DTOWarmers.cs" />
<Compile Include="DTOModels\Recipe\DTORecipeParam.cs" />
<Compile Include="DTOModels\Recipe\DTORecipeConfigModel .cs" />
<Compile Include="DTOModels\ThModules\DTOModule.cs" />
<Compile Include="DTOModels\ThModules\DTOModuleConfigModel.cs" />
<Compile Include="DTOModels\ThModules\DTOModulesBlock.cs" />
<Compile Include="DTOModels\ThWarmers\DTOWarmers.cs" />
<Compile Include="DTOModels\ThRecipe\DTORecipeParam.cs" />
<Compile Include="DTOModels\ThRecipe\DTORecipeConfigModel .cs" />
<Compile Include="DTOModels\DTONetworkMonitor.cs" />
<Compile Include="DTOModels\DTOCmsConnectGateway.cs" />
<Compile Include="DTOModels\JobModels\DTOGenericParamModel.cs" />
@@ -119,7 +120,7 @@
<Compile Include="DTOModels\DTOQueueModel.cs" />
<Compile Include="DTOModels\JobModels\DTOMetadataFieldsModel.cs" />
<Compile Include="DTOModels\JobModels\DTOMetadataModel.cs" />
<Compile Include="DTOModels\Recipe\DTORecipeOverview.cs" />
<Compile Include="DTOModels\ThRecipe\DTORecipeOverview.cs" />
<Compile Include="DTOModels\Scada\DTOScadaModel.cs" />
<Compile Include="DTOModels\Scada\ScadaSchemaModel.cs" />
<Compile Include="DTOModels\MaintenanceModels\DTOExpiredMaintenanceModel.cs" />
@@ -142,7 +143,7 @@
<Compile Include="DTOModels\MaintenanceModels\DTOMaintenanceNoteModel.cs" />
<Compile Include="DTOModels\MaintenanceModels\DTONewMaintenanceModel.cs" />
<Compile Include="DatabaseModels\MaintenanceNoteModel.cs" />
<Compile Include="DTOModels\ThermoProd\DTOProdCycle.cs" />
<Compile Include="DTOModels\ThProd\DTOProdCycle.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="DatabaseModels\UserModel.cs">
<Generator>DtsGenerator</Generator>
@@ -168,9 +169,7 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Folder Include="DTOModels\ThermoModules\" />
<Folder Include="DTOModels\ThermoRecipe\" />
<Folder Include="DTOModels\ThermoWarmers\" />
<Folder Include="DTOModels\Recipe\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
File diff suppressed because it is too large Load Diff
+50 -51
View File
@@ -83,18 +83,17 @@ namespace Thermo.Active.NC
public CmsError GetFileInfo(string path, out InfoFile fileInfo)
{
fileInfo = new InfoFile();
// CmsError cmsError = NO_ERROR;
// if (FileExistWithNc(path))
// cmsError = LocalPartProgramFileInfo(path, out fileInfo);
// libraryError = LocalPartProgramFileInfo(path, out fileInfo);
// else
// cmsError = numericalControl.FILES_RGetFileInfo(path, ref fileInfo);
// libraryError = numericalControl.FILES_RGetFileInfo(path, ref fileInfo);
CmsError cmsError = numericalControl.FILES_RGetFileInfo(path, ref fileInfo);
CmsError libraryError = numericalControl.FILES_RGetFileInfo(path, ref fileInfo);
if (cmsError.IsError())
return cmsError;
if (libraryError.IsError())
return libraryError;
string[] names = fileInfo.Name.Split('/');
if (names.Length > 0)
@@ -128,15 +127,15 @@ namespace Thermo.Active.NC
fileInfo = new DTOActiveImageAndNameDataModel();
PROGRAM_TYPE_ENUM program = PROGRAM_TYPE_ENUM.NONE;
CmsError cmsError = numericalControl.FILES_RGetProgramType(ref program);
if (cmsError.IsError())
return cmsError;
CmsError libraryError = numericalControl.FILES_RGetProgramType(ref program);
if (libraryError.IsError())
return libraryError;
// Get selected process
ushort selectedProcess = 0;
cmsError = numericalControl.PROC_RSelectedProcess(ref selectedProcess);
if (cmsError.IsError())
return cmsError;
libraryError = numericalControl.PROC_RSelectedProcess(ref selectedProcess);
if (libraryError.IsError())
return libraryError;
// JOB CASE
if (program == PROGRAM_TYPE_ENUM.JOB)
@@ -162,9 +161,9 @@ namespace Thermo.Active.NC
else
{
string name = "";
cmsError = numericalControl.PROC_RSelectedPPName(selectedProcess, ref name);
if (cmsError.IsError())
return cmsError;
libraryError = numericalControl.PROC_RSelectedPPName(selectedProcess, ref name);
if (libraryError.IsError())
return libraryError;
fileInfo = new DTOActiveImageAndNameDataModel()
{
@@ -219,13 +218,13 @@ namespace Thermo.Active.NC
dtoData = new DTOActiveProgramDataModel();
// Get selectedProcess process id
ushort selectedProcess = 0;
CmsError cmsError = numericalControl.PROC_RSelectedProcess(ref selectedProcess);
if (cmsError.IsError())
return cmsError;
CmsError libraryError = numericalControl.PROC_RSelectedProcess(ref selectedProcess);
if (libraryError.IsError())
return libraryError;
// Read active program data
ActiveProgramDataModel data = new ActiveProgramDataModel();
cmsError = numericalControl.FILES_RActiveProgramData(selectedProcess, ref data);
libraryError = numericalControl.FILES_RActiveProgramData(selectedProcess, ref data);
dtoData = new DTOActiveProgramDataModel()
{
@@ -234,7 +233,7 @@ namespace Thermo.Active.NC
TimeLeft = data.TimeLeft
};
return cmsError; // TODO FIX OSAI
return libraryError; // TODO FIX OSAI
}
public CmsError SetActiveProgramInfo(string path, out DTOActiveProgramDataModel dtoData)
@@ -242,12 +241,12 @@ namespace Thermo.Active.NC
dtoData = new DTOActiveProgramDataModel();
// Get selectedProcess process id
ushort selectedProcess = 1;
CmsError cmsError = numericalControl.PROC_RSelectedProcess(ref selectedProcess);
//if (cmsError.IsError())
// return cmsError;
CmsError libraryError = numericalControl.PROC_RSelectedProcess(ref selectedProcess);
//if (libraryError.IsError())
// return libraryError;
ActiveProgramDataModel data = new ActiveProgramDataModel();
cmsError = numericalControl.FILES_WSetActiveProgram(selectedProcess, path, ref data);
libraryError = numericalControl.FILES_WSetActiveProgram(selectedProcess, path, ref data);
dtoData = new DTOActiveProgramDataModel()
{
@@ -256,7 +255,7 @@ namespace Thermo.Active.NC
TimeLeft = data.TimeLeft
};
return cmsError;
return libraryError;
}
public CmsError DeactivateProgram(out DTOActiveProgramDataModel dtoData)
@@ -264,12 +263,12 @@ namespace Thermo.Active.NC
dtoData = new DTOActiveProgramDataModel();
// Get selectedProcess process id
ushort selectedProcess = 0;
CmsError cmsError = numericalControl.PROC_RSelectedProcess(ref selectedProcess);
if (cmsError.IsError())
return cmsError;
CmsError libraryError = numericalControl.PROC_RSelectedProcess(ref selectedProcess);
if (libraryError.IsError())
return libraryError;
ActiveProgramDataModel data = new ActiveProgramDataModel();
cmsError = numericalControl.FILES_WDeactivateProgram(selectedProcess);
libraryError = numericalControl.FILES_WDeactivateProgram(selectedProcess);
dtoData = new DTOActiveProgramDataModel()
{
@@ -278,21 +277,21 @@ namespace Thermo.Active.NC
TimeLeft = data.TimeLeft
};
return cmsError;
return libraryError;
}
public CmsError UploadPartProgram(string localPath, string fileName, out string newFilePath)
{
// Upload to NC
newFilePath = "";
CmsError cmsError = numericalControl.FILES_UploadPartProgram(localPath, fileName, ref newFilePath);
if (cmsError.IsError())
return cmsError;
CmsError libraryError = numericalControl.FILES_UploadPartProgram(localPath, fileName, ref newFilePath);
if (libraryError.IsError())
return libraryError;
// Delete local file
File.Delete(localPath + "\\" + fileName);
return cmsError;
return libraryError;
}
public CmsError UploadPartProgramAndActivate(string localPath, string fileName, out ActiveProgramDataModel programData)
@@ -301,16 +300,16 @@ namespace Thermo.Active.NC
// Get selectedProcess id
ushort selectedProcess = 0;
CmsError cmsError = numericalControl.PROC_RSelectedProcess(ref selectedProcess);
if (cmsError.IsError())
return cmsError;
CmsError libraryError = numericalControl.PROC_RSelectedProcess(ref selectedProcess);
if (libraryError.IsError())
return libraryError;
if (!JOB_EXTENSIONS.Contains(Path.GetExtension(fileName)))
{
// Upload to NC
cmsError = UploadPartProgram(localPath, fileName, out string newFilePath);
if (cmsError.IsError())
return cmsError;
libraryError = UploadPartProgram(localPath, fileName, out string newFilePath);
if (libraryError.IsError())
return libraryError;
// Custom part program management
//if(String.IsNullOrEmpty(CMSMainProgramContent))
@@ -335,9 +334,9 @@ namespace Thermo.Active.NC
// Get selectedProcess id
ushort selectedProcess = 0;
CmsError cmsError = numericalControl.PROC_RSelectedProcess(ref selectedProcess);
if (cmsError.IsError())
return cmsError;
CmsError libraryError = numericalControl.PROC_RSelectedProcess(ref selectedProcess);
if (libraryError.IsError())
return libraryError;
queueItem = new DTOQueueModel()
{
@@ -362,7 +361,7 @@ namespace Thermo.Active.NC
queueController.UpdateQueue();
}
return cmsError;
return libraryError;
}
public CmsError UpdateQueue()
@@ -370,7 +369,7 @@ namespace Thermo.Active.NC
// Get queue data
List<QueueStatusModel> queueData = new List<QueueStatusModel>();
CmsError cmsError = numericalControl.FILES_RQueueData(ref queueData);
CmsError libraryError = numericalControl.FILES_RQueueData(ref queueData);
foreach (var item in queueData)
{
@@ -415,14 +414,14 @@ namespace Thermo.Active.NC
}
else
// Upload & activate new part program
cmsError = numericalControl
libraryError = numericalControl
.FILES_WLoadNextPartProgram(
PartProgramQueue[item.ProcessId][QueueRunningIndexes[item.ProcessId]].AbsolutePath,
QUEUE_FILE_NAME
);
if (cmsError.IsError())
return cmsError;
if (libraryError.IsError())
return libraryError;
}
}
}
@@ -451,9 +450,9 @@ namespace Thermo.Active.NC
queueList = new List<DTOQueueModel>();
// Get selected process
ushort selectedProcess = 0;
CmsError cmsError = numericalControl.PROC_RSelectedProcess(ref selectedProcess);
if (cmsError.IsError())
return cmsError;
CmsError libraryError = numericalControl.PROC_RSelectedProcess(ref selectedProcess);
if (libraryError.IsError())
return libraryError;
queueList = new List<DTOQueueModel>();
// Check if there is already a pp queue
+150 -149
View File
@@ -4,153 +4,154 @@
https://go.microsoft.com/fwlink/?LinkId=301879
-->
<configuration>
<configSections>
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" />
</startup>
<appSettings>
<add key="enableDirectoryBrowsing" value="true" />
<add key="ClientSettingsProvider.ServiceUri" value="" />
<add key="ServerServiceName" value="MariaDB" />
</appSettings>
<system.web>
<compilation debug="true" targetFramework="4.6.2" />
<httpRuntime targetFramework="4.6.2" />
<httpModules>
</httpModules>
<membership defaultProvider="ClientAuthenticationMembershipProvider">
<providers>
<add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" />
</providers>
</membership>
<roleManager defaultProvider="ClientRoleProvider" enabled="true">
<providers>
<add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" cacheTimeout="86400" />
</providers>
</roleManager>
</system.web>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed" />
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Optimization" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="1.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.10.4.0" newVersion="6.10.4.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Cors" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Windows.Interactivity" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.5.0.0" newVersion="4.5.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<connectionStrings>
<add name="mySQLDatabaseConnection" providerName="MySql.Data.MySqlClient" connectionString="Server=localhost;Database=step;Uid=root;Pwd=root;" />
</connectionStrings>
<entityFramework>
<defaultConnectionFactory type="MySql.Data.Entity.MySqlConnectionFactory, MySql.Data.Entity.EF6" />
<providers>
<provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6, Version=6.9.10.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d">
</provider>
</providers>
</entityFramework>
<system.diagnostics>
<sources>
<source name="SignalR.SqlMessageBus">
<listeners>
<add name="SignalR-Bus" />
</listeners>
</source>
<source name="SignalR.ServiceBusMessageBus">
<listeners>
<add name="SignalR-Bus" />
</listeners>
</source>
<source name="SignalR.RedisMessageBus">
<listeners>
<add name="SignalR-Bus" />
</listeners>
</source>
<source name="SignalR.ScaleoutMessageBus">
<listeners>
<add name="SignalR-Bus" />
</listeners>
</source>
<source name="SignalR.Transports.WebSocketTransport">
<listeners>
<add name="SignalR-Transports" />
</listeners>
</source>
<source name="SignalR.Transports.ServerSentEventsTransport">
<listeners>
<add name="SignalR-Transports" />
</listeners>
</source>
<source name="SignalR.Transports.ForeverFrameTransport">
<listeners>
<add name="SignalR-Transports" />
</listeners>
</source>
<source name="SignalR.Transports.LongPollingTransport">
<listeners>
<add name="SignalR-Transports" />
</listeners>
</source>
<source name="SignalR.Transports.TransportHeartBeat">
<listeners>
<add name="SignalR-Transports" />
</listeners>
</source>
<source name="SignalR.ReflectedHubDescriptorProvider">
<listeners>
<add name="SignalR-Init" />
</listeners>
</source>
</sources>
<!-- Sets the trace verbosity level -->
<switches>
<add name="SignalRSwitch" value="Verbose" />
</switches>
<!-- Specifies the trace writer for output -->
<sharedListeners>
<!-- Listener for transport events -->
<add name="SignalR-Transports" type="System.Diagnostics.TextWriterTraceListener" initializeData="logs/transports.log" />
<!-- Listener for scaleout provider events -->
<add name="SignalR-Bus" type="System.Diagnostics.TextWriterTraceListener" initializeData="logs/bus.log" />
<!-- Listener for hub discovery events -->
<add name="SignalR-Init" type="System.Diagnostics.TextWriterTraceListener" initializeData="logs/init.log" />
</sharedListeners>
<trace autoflush="true" />
</system.diagnostics>
<configSections>
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" />
</startup>
<appSettings>
<add key="enableDirectoryBrowsing" value="true" />
<add key="ClientSettingsProvider.ServiceUri" value="" />
<add key="ServerServiceName" value="MariaDB" />
</appSettings>
<system.web>
<compilation debug="true" targetFramework="4.6.2" />
<httpRuntime targetFramework="4.6.2" />
<httpModules>
</httpModules>
<membership defaultProvider="ClientAuthenticationMembershipProvider">
<providers>
<add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" />
</providers>
</membership>
<roleManager defaultProvider="ClientRoleProvider" enabled="true">
<providers>
<add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" cacheTimeout="86400" />
</providers>
</roleManager>
</system.web>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed" />
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Optimization" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="1.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.10.4.0" newVersion="6.10.4.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Cors" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Windows.Interactivity" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.5.0.0" newVersion="4.5.0.0" />
</dependentAssembly>
<probing privatePath="lib;libs" />
</assemblyBinding>
</runtime>
<connectionStrings>
<add name="mySQLDatabaseConnection" providerName="MySql.Data.MySqlClient" connectionString="Server=localhost;Database=step;Uid=root;Pwd=root;" />
</connectionStrings>
<entityFramework>
<defaultConnectionFactory type="MySql.Data.Entity.MySqlConnectionFactory, MySql.Data.Entity.EF6" />
<providers>
<provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6, Version=6.9.10.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d">
</provider>
</providers>
</entityFramework>
<system.diagnostics>
<sources>
<source name="SignalR.SqlMessageBus">
<listeners>
<add name="SignalR-Bus" />
</listeners>
</source>
<source name="SignalR.ServiceBusMessageBus">
<listeners>
<add name="SignalR-Bus" />
</listeners>
</source>
<source name="SignalR.RedisMessageBus">
<listeners>
<add name="SignalR-Bus" />
</listeners>
</source>
<source name="SignalR.ScaleoutMessageBus">
<listeners>
<add name="SignalR-Bus" />
</listeners>
</source>
<source name="SignalR.Transports.WebSocketTransport">
<listeners>
<add name="SignalR-Transports" />
</listeners>
</source>
<source name="SignalR.Transports.ServerSentEventsTransport">
<listeners>
<add name="SignalR-Transports" />
</listeners>
</source>
<source name="SignalR.Transports.ForeverFrameTransport">
<listeners>
<add name="SignalR-Transports" />
</listeners>
</source>
<source name="SignalR.Transports.LongPollingTransport">
<listeners>
<add name="SignalR-Transports" />
</listeners>
</source>
<source name="SignalR.Transports.TransportHeartBeat">
<listeners>
<add name="SignalR-Transports" />
</listeners>
</source>
<source name="SignalR.ReflectedHubDescriptorProvider">
<listeners>
<add name="SignalR-Init" />
</listeners>
</source>
</sources>
<!-- Sets the trace verbosity level -->
<switches>
<add name="SignalRSwitch" value="Verbose" />
</switches>
<!-- Specifies the trace writer for output -->
<sharedListeners>
<!-- Listener for transport events -->
<add name="SignalR-Transports" type="System.Diagnostics.TextWriterTraceListener" initializeData="logs/transports.log" />
<!-- Listener for scaleout provider events -->
<add name="SignalR-Bus" type="System.Diagnostics.TextWriterTraceListener" initializeData="logs/bus.log" />
<!-- Listener for hub discovery events -->
<add name="SignalR-Init" type="System.Diagnostics.TextWriterTraceListener" initializeData="logs/init.log" />
</sharedListeners>
<trace autoflush="true" />
</system.diagnostics>
</configuration>
+6 -6
View File
@@ -218,9 +218,9 @@ namespace Thermo.Active.Controllers.SignalR
using (NcAdapter ncAdapter = new NcAdapter())
{
ncAdapter.Connect();
CmsError cmsError = ncAdapter.WriteM155Data(process, responseVal);
if (cmsError.IsError())
throw new HubException(cmsError.localizationKey);
CmsError libraryError = ncAdapter.WriteM155Data(process, responseVal);
if (libraryError.IsError())
throw new HubException(libraryError.localizationKey);
}
}
@@ -230,9 +230,9 @@ namespace Thermo.Active.Controllers.SignalR
using (NcAdapter ncAdapter = new NcAdapter())
{
ncAdapter.Connect();
CmsError cmsError = ncAdapter.WriteScada(memIndex, memType, value);
if (cmsError.IsError())
throw new HubException(cmsError.localizationKey);
CmsError libraryError = ncAdapter.WriteScada(memIndex, memType, value);
if (libraryError.IsError())
throw new HubException(libraryError.localizationKey);
}
}
@@ -37,9 +37,9 @@ namespace Thermo.Active.Controllers.WebApi
{
ncAdapter.Connect();
// Get list of maintenances with user's permission
CmsError cmsError = ncAdapter.GetMaintenancesWithPermissions(out List<DTOMaintenanceModel> maintenances, Convert.ToInt32(userId.Value));
if (cmsError.IsError())
return BadRequest(cmsError.localizationKey);
CmsError libraryError = ncAdapter.GetMaintenancesWithPermissions(out List<DTOMaintenanceModel> maintenances, Convert.ToInt32(userId.Value));
if (libraryError.IsError())
return BadRequest(libraryError.localizationKey);
return Ok(maintenances);
}
@@ -67,11 +67,11 @@ namespace Thermo.Active.Controllers.WebApi
using (NcAdapter ncAdapter = new NcAdapter())
{
ncAdapter.Connect();
CmsError cmsError = ncAdapter.GetMaintenanceDataById(dbMaint.MaintenanceId, Convert.ToInt32(userId.Value), out DTOMaintenanceModel maintenance);
if (cmsError.IsError())
CmsError libraryError = ncAdapter.GetMaintenanceDataById(dbMaint.MaintenanceId, Convert.ToInt32(userId.Value), out DTOMaintenanceModel maintenance);
if (libraryError.IsError())
{
maintenancesController.Delete(dbMaint);
return BadRequest(cmsError.localizationKey);
return BadRequest(libraryError.localizationKey);
}
PerformedMaintenanceModel performed = maintenancesController.PerformeMaintenance(maintenance.OriginalPlcCounter / 60, dbMaint.MaintenanceId, Convert.ToInt32(userId.Value), -2);
@@ -81,9 +81,9 @@ namespace Thermo.Active.Controllers.WebApi
return NotFound();
}
cmsError = ncAdapter.GetMaintenanceDataById(dbMaint.MaintenanceId, Convert.ToInt32(userId.Value), out DTOMaintenanceModel endMaintenance);
if (cmsError.IsError())
return BadRequest(cmsError.localizationKey);
libraryError = ncAdapter.GetMaintenanceDataById(dbMaint.MaintenanceId, Convert.ToInt32(userId.Value), out DTOMaintenanceModel endMaintenance);
if (libraryError.IsError())
return BadRequest(libraryError.localizationKey);
return Ok(endMaintenance);
@@ -94,9 +94,9 @@ namespace Thermo.Active.Controllers.WebApi
using (NcAdapter ncAdapter = new NcAdapter())
{
ncAdapter.Connect();
CmsError cmsError = ncAdapter.GetMaintenanceDataById(dbMaint.MaintenanceId, Convert.ToInt32(userId.Value), out DTOMaintenanceModel maintenance);
if (cmsError.IsError())
return BadRequest(cmsError.localizationKey);
CmsError libraryError = ncAdapter.GetMaintenanceDataById(dbMaint.MaintenanceId, Convert.ToInt32(userId.Value), out DTOMaintenanceModel maintenance);
if (libraryError.IsError())
return BadRequest(libraryError.localizationKey);
return Ok(maintenance);
}
@@ -139,9 +139,9 @@ namespace Thermo.Active.Controllers.WebApi
using (NcAdapter ncAdapter = new NcAdapter())
{
ncAdapter.Connect();
CmsError cmsError = ncAdapter.GetMaintenanceDataById(dbMaint.MaintenanceId, Convert.ToInt32(userId.Value), out DTOMaintenanceModel maintenance);
if (cmsError.IsError())
return BadRequest(cmsError.localizationKey);
CmsError libraryError = ncAdapter.GetMaintenanceDataById(dbMaint.MaintenanceId, Convert.ToInt32(userId.Value), out DTOMaintenanceModel maintenance);
if (libraryError.IsError())
return BadRequest(libraryError.localizationKey);
return Ok(maintenance);
}
@@ -198,18 +198,18 @@ namespace Thermo.Active.Controllers.WebApi
using (NcAdapter ncAdapter = new NcAdapter())
{
ncAdapter.Connect();
CmsError cmsError = ncAdapter.GetMaintenanceDataById(maintenanceId, Convert.ToInt32(userId.Value), out DTOMaintenanceModel maintData);
if (cmsError.IsError())
return BadRequest(cmsError.localizationKey);
CmsError libraryError = ncAdapter.GetMaintenanceDataById(maintenanceId, Convert.ToInt32(userId.Value), out DTOMaintenanceModel maintData);
if (libraryError.IsError())
return BadRequest(libraryError.localizationKey);
if (!maintData.CanPerform)
return Unauthorized();
using (MaintenancesController maintenancesController = new MaintenancesController())
{
cmsError = ncAdapter.GetNcGenericData(out DTONcGenericDataModel data);
if (cmsError.IsError())
return BadRequest(cmsError.localizationKey);
libraryError = ncAdapter.GetNcGenericData(out DTONcGenericDataModel data);
if (libraryError.IsError())
return BadRequest(libraryError.localizationKey);
int controlWord = -1;
if (maintData.CreatedByCms)
@@ -225,9 +225,9 @@ namespace Thermo.Active.Controllers.WebApi
if (performed == null)
return NotFound();
cmsError = ncAdapter.GetMaintenanceDataById(maintenanceId, Convert.ToInt32(userId.Value), out maintData);
if (cmsError.IsError())
return BadRequest(cmsError.localizationKey);
libraryError = ncAdapter.GetMaintenanceDataById(maintenanceId, Convert.ToInt32(userId.Value), out maintData);
if (libraryError.IsError())
return BadRequest(libraryError.localizationKey);
return Ok(maintData);
}
@@ -8,7 +8,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Web.Http;
using static Thermo.Active.Config.ServerConfig;
using Thermo.Active.Model.DTOModels.Recipe;
using Thermo.Active.Model.DTOModels.ThRecipe;
namespace Thermo.Active.Controllers.WebApi
{
@@ -122,31 +122,6 @@ namespace Thermo.Active.Controllers.WebApi
return Ok(recipeConfig);
}
#if false
[Route("ThermoParams"), HttpGet]
public IHttpActionResult GetThermoParamsConfig()
{
// TODO FIXME
// passa i parametri di configurazione es min/max dei gauge...
List<DTORecipeConfigModel> recipeConfig = RecipeConfig.Select(x => new DTORecipeConfigModel()
{
Id = x.Id,
Category = x.Category.ToString(),
SubCategory_1 = x.SubCategory_1,
SubCategory_2 = x.SubCategory_2,
Name = x.Name,
Description = x.Description,
Format = x.Format,
Label = $"{x.Category}_{x.SubCategory_1}_{x.SubCategory_2}_{x.Name}".Replace("__", "_").Replace("__", "_").ToLower()
}).ToList();
return Ok(recipeConfig);
}
#endif
[Route("alarms"), HttpGet]
public IHttpActionResult GetAlarmsConfig()
{
@@ -27,9 +27,9 @@ namespace Thermo.Active.Controllers.WebApi
ICollection<CultureInfo> cultureInfos = new List<CultureInfo>();
// Get nc available language
CmsError cmsError = ncAdapter.numericalControl.NC_GetAvailableLanguages(ref cultureInfos);
if (cmsError.IsError())
return BadRequest(cmsError.localizationKey);
CmsError libraryError = ncAdapter.numericalControl.NC_GetAvailableLanguages(ref cultureInfos);
if (libraryError.IsError())
return BadRequest(libraryError.localizationKey);
// Filter available language with
availableLanguages = availableLanguages.Where(x => cultureInfos.Any(y => y.TwoLetterISOLanguageName == x.IsoId)).ToList();
}
@@ -12,7 +12,7 @@ using System.Web.Http;
using static CMS_CORE_Library.Models.DataStructures;
using static Thermo.Active.Config.ServerConfig;
using static Thermo.Active.Model.Constants;
using Thermo.Active.Model.DTOModels.Recipe;
using Thermo.Active.Model.DTOModels.ThModules;
using Thermo.Active.Utils;
namespace Thermo.Active.Controllers.WebApi
@@ -33,11 +33,11 @@ namespace Thermo.Active.Controllers.WebApi
return InternalServerError();
}
CmsError cmsError = ncAdapter.ReadModulesBlock(out Dictionary<int, DTOModulesBlock> currModules);
if (cmsError.IsError())
libraryError = ncAdapter.ReadModulesBlock(out Dictionary<int, DTOModulesBlock> currModules);
if (libraryError.IsError())
{
ThermoActiveLogger.LogError($"GetRecipeOverview error | {cmsError.exception}");
return BadRequest(cmsError.localizationKey);
ThermoActiveLogger.LogError($"GetRecipeOverview error | {libraryError.exception}");
return BadRequest(libraryError.localizationKey);
}
return Ok(currModules);
@@ -25,9 +25,9 @@ namespace Thermo.Active.Controllers.WebApi
{
ncAdapter.Connect();
CmsError cmsError = ncAdapter.GetFileList(filePath, out List<PreviewFileModel> fileList);
if (cmsError.IsError())
return BadRequest(cmsError.localizationKey);
CmsError libraryError = ncAdapter.GetFileList(filePath, out List<PreviewFileModel> fileList);
if (libraryError.IsError())
return BadRequest(libraryError.localizationKey);
return Ok(fileList);
}
@@ -40,9 +40,9 @@ namespace Thermo.Active.Controllers.WebApi
{
ncAdapter.Connect();
CmsError cmsError = ncAdapter.GetFileInfo(filePath, out InfoFile fileInfo);
if (cmsError.IsError())
return BadRequest(cmsError.localizationKey);
CmsError libraryError = ncAdapter.GetFileInfo(filePath, out InfoFile fileInfo);
if (libraryError.IsError())
return BadRequest(libraryError.localizationKey);
return Ok(fileInfo);
}
@@ -55,9 +55,9 @@ namespace Thermo.Active.Controllers.WebApi
{
ncAdapter.Connect();
CmsError cmsError = ncAdapter.GetActiveFileInfo(filePath, out DTOActiveImageAndNameDataModel fileInfo);
if (cmsError.IsError())
return BadRequest(cmsError.localizationKey);
CmsError libraryError = ncAdapter.GetActiveFileInfo(filePath, out DTOActiveImageAndNameDataModel fileInfo);
if (libraryError.IsError())
return BadRequest(libraryError.localizationKey);
return Ok(fileInfo);
}
@@ -70,9 +70,9 @@ namespace Thermo.Active.Controllers.WebApi
{
ncAdapter.Connect();
CmsError cmsError = ncAdapter.SetActiveProgramInfo(filePath, out DTOActiveProgramDataModel fileInfo);
if (cmsError.IsError())
return BadRequest(cmsError.localizationKey);
CmsError libraryError = ncAdapter.SetActiveProgramInfo(filePath, out DTOActiveProgramDataModel fileInfo);
if (libraryError.IsError())
return BadRequest(libraryError.localizationKey);
return Ok(fileInfo);
}
@@ -85,9 +85,9 @@ namespace Thermo.Active.Controllers.WebApi
{
ncAdapter.Connect();
CmsError cmsError = ncAdapter.DeactivateProgram(out DTOActiveProgramDataModel fileInfo);
if (cmsError.IsError())
return BadRequest(cmsError.localizationKey);
CmsError libraryError = ncAdapter.DeactivateProgram(out DTOActiveProgramDataModel fileInfo);
if (libraryError.IsError())
return BadRequest(libraryError.localizationKey);
return Ok(fileInfo);
}
@@ -114,9 +114,9 @@ namespace Thermo.Active.Controllers.WebApi
if (NcConfig.NcVendor == NC_VENDOR.OSAI)
{
// Clean upload folder only OSAI
CmsError cmsError = ncFileHandler.CleanUploadFolder();
if (cmsError.IsError() && cmsError.errorCode != CMS_ERROR_CODES.FILE_NOT_FOUND)
return BadRequest(cmsError.localizationKey);
CmsError libraryError = ncFileHandler.CleanUploadFolder();
if (libraryError.IsError() && libraryError.errorCode != CMS_ERROR_CODES.FILE_NOT_FOUND)
return BadRequest(libraryError.localizationKey);
}
ActiveProgramDataModel programData = new ActiveProgramDataModel();
@@ -130,9 +130,9 @@ namespace Thermo.Active.Controllers.WebApi
programs.Add(item.FileName);
// Upload main program
CmsError cmsError = ncFileHandler.UploadPartProgramAndActivate(TEMP_PP_FOLDER, item.FileName, out programData);
if (cmsError.IsError())
return BadRequest(cmsError.localizationKey);
CmsError libraryError = ncFileHandler.UploadPartProgramAndActivate(TEMP_PP_FOLDER, item.FileName, out programData);
if (libraryError.IsError())
return BadRequest(libraryError.localizationKey);
mainPPName = Path.GetFileNameWithoutExtension(programData.Path);
}
@@ -142,9 +142,9 @@ namespace Thermo.Active.Controllers.WebApi
programs.Add(item.FileName);
// Upload files
CmsError cmsError = ncFileHandler.UploadPartProgram(TEMP_PP_FOLDER, item.FileName, out string programPath);
if (cmsError.IsError())
return BadRequest(cmsError.localizationKey);
CmsError libraryError = ncFileHandler.UploadPartProgram(TEMP_PP_FOLDER, item.FileName, out string programPath);
if (libraryError.IsError())
return BadRequest(libraryError.localizationKey);
}
else if (item.ParameterName == "image")
{
@@ -348,9 +348,9 @@ namespace Thermo.Active.Controllers.WebApi
if (repsParam == null || !int.TryParse(repsParam.Value, out int reps))
return BadRequest();
// Upload
CmsError cmsError = ncAdapter.UploadPartProgramAndAddToQueue(QUEUE_TMP_FOLDER, item.FileName, reps, out queueItem);
if (cmsError.IsError())
return BadRequest(cmsError.localizationKey);
CmsError libraryError = ncAdapter.UploadPartProgramAndAddToQueue(QUEUE_TMP_FOLDER, item.FileName, reps, out queueItem);
if (libraryError.IsError())
return BadRequest(libraryError.localizationKey);
}
}
else if (item.ParameterName == "image")
@@ -370,9 +370,9 @@ namespace Thermo.Active.Controllers.WebApi
{
ncAdapter.Connect();
CmsError cmsError = ncAdapter.RemoveFromQueue(processId, itemId);
if (cmsError.IsError())
return BadRequest(cmsError.localizationKey);
CmsError libraryError = ncAdapter.RemoveFromQueue(processId, itemId);
if (libraryError.IsError())
return BadRequest(libraryError.localizationKey);
}
return Ok();
@@ -383,9 +383,9 @@ namespace Thermo.Active.Controllers.WebApi
{
using (NcFileAdapter ncAdapter = new NcFileAdapter())
{
CmsError cmsError = ncAdapter.MoveQueueItems(processId, itemsPositions.ObjectId, itemsPositions.NewPosition, out List<DTOQueueModel> queue);
if (cmsError.IsError())
return BadRequest(cmsError.localizationKey);
CmsError libraryError = ncAdapter.MoveQueueItems(processId, itemsPositions.ObjectId, itemsPositions.NewPosition, out List<DTOQueueModel> queue);
if (libraryError.IsError())
return BadRequest(libraryError.localizationKey);
return Ok(queue);
}
@@ -399,9 +399,9 @@ namespace Thermo.Active.Controllers.WebApi
if (reps.Reps < 1)
return BadRequest(INCORRECT_PARAMETERS_ERROR.localizationKey);
CmsError cmsError = ncAdapter.EditQueueItemReps(processId, itemId, reps.Reps, out DTOQueueModel queueItem);
if (cmsError.IsError())
return BadRequest(cmsError.localizationKey);
CmsError libraryError = ncAdapter.EditQueueItemReps(processId, itemId, reps.Reps, out DTOQueueModel queueItem);
if (libraryError.IsError())
return BadRequest(libraryError.localizationKey);
return Ok(queueItem);
}
@@ -412,9 +412,9 @@ namespace Thermo.Active.Controllers.WebApi
{
using (NcFileAdapter ncAdapter = new NcFileAdapter())
{
CmsError cmsError = ncAdapter.EmptyQueue(processId);
if (cmsError.IsError())
return BadRequest(cmsError.localizationKey);
CmsError libraryError = ncAdapter.EmptyQueue(processId);
if (libraryError.IsError())
return BadRequest(libraryError.localizationKey);
return Ok();
}
@@ -427,9 +427,9 @@ namespace Thermo.Active.Controllers.WebApi
{
ncAdapter.Connect();
CmsError cmsError = ncAdapter.StartWorkingQueue(processId);
if (cmsError.IsError())
return BadRequest(cmsError.localizationKey);
CmsError libraryError = ncAdapter.StartWorkingQueue(processId);
if (libraryError.IsError())
return BadRequest(libraryError.localizationKey);
return Ok();
}
@@ -442,9 +442,9 @@ namespace Thermo.Active.Controllers.WebApi
{
ncAdapter.Connect();
CmsError cmsError = ncAdapter.StopWorkingQueue(processId);
if (cmsError.IsError())
return BadRequest(cmsError.localizationKey);
CmsError libraryError = ncAdapter.StopWorkingQueue(processId);
if (libraryError.IsError())
return BadRequest(libraryError.localizationKey);
return Ok();
}
@@ -12,7 +12,7 @@ using System.Web.Http;
using static CMS_CORE_Library.Models.DataStructures;
using static Thermo.Active.Config.ServerConfig;
using static Thermo.Active.Model.Constants;
using Thermo.Active.Model.DTOModels.Recipe;
using Thermo.Active.Model.DTOModels.ThRecipe;
using Thermo.Active.Config;
using Thermo.Active.Utils;
@@ -40,11 +40,11 @@ namespace Thermo.Active.Controllers.WebApi
}
// scrivo sul PLC il comando strobe richiesta AUTO!
CmsError cmsError = ncAdapter.StrobeMode(Model.DTOModels.ThermoProd.Mode.MANUAL);
if (cmsError.IsError())
libraryError = ncAdapter.StrobeMode(Model.DTOModels.ThProd.Mode.MANUAL);
if (libraryError.IsError())
{
ThermoActiveLogger.LogError($"RequestManual error | {cmsError.exception}");
return BadRequest(cmsError.localizationKey);
ThermoActiveLogger.LogError($"RequestManual error | {libraryError.exception}");
return BadRequest(libraryError.localizationKey);
}
// ritorno solo fatto!
@@ -69,11 +69,11 @@ namespace Thermo.Active.Controllers.WebApi
}
// scrivo sul PLC il comando strobe richiesta AUTO!
CmsError cmsError = ncAdapter.StrobeMode(Model.DTOModels.ThermoProd.Mode.AUTO);
if (cmsError.IsError())
libraryError = ncAdapter.StrobeMode(Model.DTOModels.ThProd.Mode.AUTO);
if (libraryError.IsError())
{
ThermoActiveLogger.LogError($"RequestAuto error | {cmsError.exception}");
return BadRequest(cmsError.localizationKey);
ThermoActiveLogger.LogError($"RequestAuto error | {libraryError.exception}");
return BadRequest(libraryError.localizationKey);
}
// ritorno solo fatto!
@@ -98,11 +98,11 @@ namespace Thermo.Active.Controllers.WebApi
}
// scrivo sul PLC il comando strobe richiesta AUTO!
CmsError cmsError = ncAdapter.StrobeMode(Model.DTOModels.ThermoProd.Mode.SETUP);
if (cmsError.IsError())
libraryError = ncAdapter.StrobeMode(Model.DTOModels.ThProd.Mode.SETUP);
if (libraryError.IsError())
{
ThermoActiveLogger.LogError($"RequestSetup error | {cmsError.exception}");
return BadRequest(cmsError.localizationKey);
ThermoActiveLogger.LogError($"RequestSetup error | {libraryError.exception}");
return BadRequest(libraryError.localizationKey);
}
// ritorno solo fatto!
@@ -128,24 +128,24 @@ namespace Thermo.Active.Controllers.WebApi
return InternalServerError();
}
//// scrivo sul PLC il comando strobe richiesta AUTO!
//CmsError cmsError = ncAdapter.StrobeMode(Model.DTOModels.ThermoProd.Mode.SETUP);
//if (cmsError.IsError())
//{
// ThermoActiveLogger.LogError($"RequestSetup error | {cmsError.exception}");
// return BadRequest(cmsError.localizationKey);
//}
// scrivo sul PLC il comando strobe richiesta AUTO!
libraryError = ncAdapter.UpdateProdInfoData((short)requestQty, newWorkOrder);
if (libraryError.IsError())
{
ThermoActiveLogger.LogError($"StartProd error | {libraryError.exception}");
return BadRequest(libraryError.localizationKey);
}
// ritorno solo fatto!
return Ok();
}
}
/// <summary>
/// Request production data from indexStart record for numRecord items (DESCENDING)
/// Request production current data
/// </summary>
/// <returns></returns>
[Route("prod/get"), HttpPut]
public IHttpActionResult GetProd(int indexStart, int numRecord)
public IHttpActionResult GetProd()
{
using (NcAdapter ncAdapter = new NcAdapter())
{
@@ -157,16 +157,45 @@ namespace Thermo.Active.Controllers.WebApi
return InternalServerError();
}
//// scrivo sul PLC il comando strobe richiesta AUTO!
//CmsError cmsError = ncAdapter.StrobeMode(Model.DTOModels.ThermoProd.Mode.SETUP);
//if (cmsError.IsError())
//{
// ThermoActiveLogger.LogError($"RequestSetup error | {cmsError.exception}");
// return BadRequest(cmsError.localizationKey);
//}
// scrivo sul PLC il comando strobe richiesta AUTO!
libraryError = ncAdapter.ReadProdInfoData(out ThermoModels.ProdInfoModel prodInfoDat);
if (libraryError.IsError())
{
ThermoActiveLogger.LogError($"GetProd error | {libraryError.exception}");
return BadRequest(libraryError.localizationKey);
}
// ritorno solo fatto!
return Ok();
return Ok(prodInfoDat);
}
}
/// <summary>
/// Request production data from indexStart record for numRecord items (DESCENDING)
/// </summary>
/// <returns></returns>
[Route("prod/history"), HttpPut]
public IHttpActionResult GetHistory(int indexStart, int numRecord)
{
using (NcAdapter ncAdapter = new NcAdapter())
{
// Try connection
CmsError libraryError = ncAdapter.Connect();
if (libraryError.errorCode != 0)
{
ThermoActiveLogger.LogError($"NC Not connected! | StartProd | {libraryError.exception}");
return InternalServerError();
}
// scrivo sul PLC il comando strobe richiesta AUTO!
libraryError = ncAdapter.GetHistProdInfoData(out List<ThermoModels.ProdInfoModel> prodInfoDataList, indexStart, numRecord);
if (libraryError.IsError())
{
ThermoActiveLogger.LogError($"GetHistory error | {libraryError.exception}");
return BadRequest(libraryError.localizationKey);
}
// ritorno solo fatto!
return Ok(prodInfoDataList);
}
}
}
@@ -12,7 +12,8 @@ using System.Web.Http;
using static CMS_CORE_Library.Models.DataStructures;
using static Thermo.Active.Config.ServerConfig;
using static Thermo.Active.Model.Constants;
using Thermo.Active.Model.DTOModels.Recipe;
using Thermo.Active.Model.DTOModels.ThRecipe;
using Thermo.Active.Model.DTOModels.ThWarmers;
using Thermo.Active.Config;
using Thermo.Active.Utils;
@@ -34,11 +35,11 @@ namespace Thermo.Active.Controllers.WebApi
return InternalServerError();
}
CmsError cmsError = ncAdapter.GetRecipeOverview(out Dictionary<string, RecipeCatStatus> currOverview);
if (cmsError.IsError())
libraryError = ncAdapter.GetRecipeOverview(out Dictionary<string, RecipeCatStatus> currOverview);
if (libraryError.IsError())
{
ThermoActiveLogger.LogError($"GetRecipeOverview error | {cmsError.exception}");
return BadRequest(cmsError.localizationKey);
ThermoActiveLogger.LogError($"GetRecipeOverview error | {libraryError.exception}");
return BadRequest(libraryError.localizationKey);
}
return Ok(currOverview);
@@ -57,11 +58,11 @@ namespace Thermo.Active.Controllers.WebApi
return InternalServerError();
}
CmsError cmsError = ncAdapter.ReadFullRecipe(out Dictionary<string, DTORecipeParam> currRecipe);
if (cmsError.IsError())
libraryError = ncAdapter.ReadFullRecipe(out Dictionary<string, DTORecipeParam> currRecipe);
if (libraryError.IsError())
{
ThermoActiveLogger.LogError($"GetRecipeOverview error | {cmsError.exception}");
return BadRequest(cmsError.localizationKey);
ThermoActiveLogger.LogError($"GetRecipeOverview error | {libraryError.exception}");
return BadRequest(libraryError.localizationKey);
}
return Ok(currRecipe);
@@ -86,11 +87,11 @@ namespace Thermo.Active.Controllers.WebApi
}
// read recipe!
CmsError cmsError = ncAdapter.ReadFullRecipe(out Dictionary<string, DTORecipeParam> prevRecipe);
if (cmsError.IsError())
libraryError = ncAdapter.ReadFullRecipe(out Dictionary<string, DTORecipeParam> prevRecipe);
if (libraryError.IsError())
{
ThermoActiveLogger.LogError($"GetRecipeOverview error | {cmsError.exception}");
return BadRequest(cmsError.localizationKey);
ThermoActiveLogger.LogError($"GetRecipeOverview error | {libraryError.exception}");
return BadRequest(libraryError.localizationKey);
}
Dictionary<string, DTORecipeParam> updtRecipe = new Dictionary<string, DTORecipeParam>();
@@ -152,19 +153,19 @@ namespace Thermo.Active.Controllers.WebApi
}
// scrivo sul PLC il comando conferma!
CmsError cmsError = ncAdapter.ConfirmRecipeData(true);
if (cmsError.IsError())
libraryError = ncAdapter.ConfirmRecipeData(true);
if (libraryError.IsError())
{
ThermoActiveLogger.LogError($"ConfirmEdit error | {cmsError.exception}");
return BadRequest(cmsError.localizationKey);
ThermoActiveLogger.LogError($"ConfirmEdit error | {libraryError.exception}");
return BadRequest(libraryError.localizationKey);
}
// recupero i dati LIVE dei parametri HMI della ricetta...
cmsError = ncAdapter.ReadFullRecipe(out Dictionary<string, DTORecipeParam> currRecipe);
if (cmsError.IsError())
libraryError = ncAdapter.ReadFullRecipe(out Dictionary<string, DTORecipeParam> currRecipe);
if (libraryError.IsError())
{
ThermoActiveLogger.LogError($"ConfirmEdit error | {cmsError.exception}");
return BadRequest(cmsError.localizationKey);
ThermoActiveLogger.LogError($"ConfirmEdit error | {libraryError.exception}");
return BadRequest(libraryError.localizationKey);
}
// rileggo la ricetta
@@ -208,19 +209,19 @@ namespace Thermo.Active.Controllers.WebApi
}
// scrivo sul PLC il comando annula!
CmsError cmsError = ncAdapter.ConfirmRecipeData(false);
if (cmsError.IsError())
libraryError = ncAdapter.ConfirmRecipeData(false);
if (libraryError.IsError())
{
ThermoActiveLogger.LogError($"ConfirmEdit error | {cmsError.exception}");
return BadRequest(cmsError.localizationKey);
ThermoActiveLogger.LogError($"ConfirmEdit error | {libraryError.exception}");
return BadRequest(libraryError.localizationKey);
}
// recupero i dati LIVE dei parametri HMI della ricetta...
cmsError = ncAdapter.ReadFullRecipe(out Dictionary<string, DTORecipeParam> currRecipe);
if (cmsError.IsError())
libraryError = ncAdapter.ReadFullRecipe(out Dictionary<string, DTORecipeParam> currRecipe);
if (libraryError.IsError())
{
ThermoActiveLogger.LogError($"ConfirmEdit error | {cmsError.exception}");
return BadRequest(cmsError.localizationKey);
ThermoActiveLogger.LogError($"ConfirmEdit error | {libraryError.exception}");
return BadRequest(libraryError.localizationKey);
}
var currParams = new Dictionary<string, double>();
@@ -262,7 +263,6 @@ namespace Thermo.Active.Controllers.WebApi
}
// chiamo metodo di lettura...
//CmsError cmsError = ServerConfigController.LoadRecipe(newName);
bool fatto = ServerConfigController.LoadRecipe(newName);
if (!fatto)
{
@@ -270,11 +270,11 @@ namespace Thermo.Active.Controllers.WebApi
return NotFound();
}
CmsError cmsError = WriteCurrentRecipeToPlc();
if (cmsError.IsError())
libraryError = WriteCurrentRecipeToPlc();
if (libraryError.IsError())
{
ThermoActiveLogger.LogError($"ConfirmEdit error | {cmsError.exception}");
return BadRequest(cmsError.localizationKey);
ThermoActiveLogger.LogError($"ConfirmEdit error | {libraryError.exception}");
return BadRequest(libraryError.localizationKey);
}
// ritorno solo fatto!
@@ -300,11 +300,11 @@ namespace Thermo.Active.Controllers.WebApi
return NotFound();
}
CmsError cmsError = WriteCurrentRecipeToPlc();
if (cmsError.IsError())
CmsError libraryError = WriteCurrentRecipeToPlc();
if (libraryError.IsError())
{
ThermoActiveLogger.LogError($"ConfirmEdit error | {cmsError.exception}");
return BadRequest(cmsError.localizationKey);
ThermoActiveLogger.LogError($"ConfirmEdit error | {libraryError.exception}");
return BadRequest(libraryError.localizationKey);
}
}
@@ -323,9 +323,9 @@ namespace Thermo.Active.Controllers.WebApi
{
// recupero i dati LIVE dei parametri HMI della ricetta...
CmsError cmsError = ncAdapter.ReadFullRecipe(out Dictionary<string, DTORecipeParam> currRecipe);
if (cmsError.IsError())
return BadRequest(cmsError.localizationKey);
CmsError libraryError = ncAdapter.ReadFullRecipe(out Dictionary<string, DTORecipeParam> currRecipe);
if (libraryError.IsError())
return BadRequest(libraryError.localizationKey);
var currParams = new Dictionary<string, double>();
foreach (var item in currRecipe)
@@ -350,11 +350,11 @@ namespace Thermo.Active.Controllers.WebApi
using (NcFileAdapter ncAdapter = new NcFileAdapter())
{
// recupero i dati LIVE dei parametri HMI della ricetta...
CmsError cmsError = ncAdapter.ReadFullRecipe(out Dictionary<string, DTORecipeParam> currRecipe);
if (cmsError.IsError())
CmsError libraryError = ncAdapter.ReadFullRecipe(out Dictionary<string, DTORecipeParam> currRecipe);
if (libraryError.IsError())
{
ThermoActiveLogger.LogError($"SaveAs error | {cmsError.exception}");
return BadRequest(cmsError.localizationKey);
ThermoActiveLogger.LogError($"SaveAs error | {libraryError.exception}");
return BadRequest(libraryError.localizationKey);
}
var currParams = new Dictionary<string, double>();
@@ -382,20 +382,20 @@ namespace Thermo.Active.Controllers.WebApi
using (NcFileAdapter ncAdapter = new NcFileAdapter())
{
// recupero i dati LIVE dei parametri HMI della ricetta...
CmsError cmsError = ncAdapter.ReadFullRecipe(out Dictionary<string, DTORecipeParam> currRecipe);
if (cmsError.IsError())
CmsError libraryError = ncAdapter.ReadFullRecipe(out Dictionary<string, DTORecipeParam> currRecipe);
if (libraryError.IsError())
{
ThermoActiveLogger.LogError($"SaveTemplate error | {cmsError.exception}");
return BadRequest(cmsError.localizationKey);
ThermoActiveLogger.LogError($"SaveTemplate error | {libraryError.exception}");
return BadRequest(libraryError.localizationKey);
}
// recupero i dati LIVE dei carichi load dei cahnnels di riscaldo...
cmsError = ncAdapter.ReadWarmers(out Dictionary<int, DTOWarmers> currWarmers);
if (cmsError.IsError())
libraryError = ncAdapter.ReadWarmers(out Dictionary<int, DTOWarmers> currWarmers);
if (libraryError.IsError())
{
ThermoActiveLogger.LogError($"ReadWarmers error | {cmsError.exception}");
return BadRequest(cmsError.localizationKey);
ThermoActiveLogger.LogError($"ReadWarmers error | {libraryError.exception}");
return BadRequest(libraryError.localizationKey);
}
// uso i valopri HMI...
@@ -512,10 +512,10 @@ namespace Thermo.Active.Controllers.WebApi
}
// enable recipe! scrivo sul PLC il comando conferma!
CmsError cmsError = ncAdapter.ConfirmRecipeData(true);
if (cmsError.IsError())
libraryError = ncAdapter.ConfirmRecipeData(true);
if (libraryError.IsError())
{
ThermoActiveLogger.LogError($"ReadWarmers error | {cmsError.exception}");
ThermoActiveLogger.LogError($"ReadWarmers error | {libraryError.exception}");
return checkError;
}
}
@@ -41,9 +41,9 @@ namespace Thermo.Active.Controllers.WebApi
{
ncAdapter.Connect();
// Read the selected scada data
CmsError cmsError = ncAdapter.ReadScadaData(selectedScadaSchema, out DTOScadaModel values);
if (cmsError.IsError())
return BadRequest(cmsError.localizationKey);
CmsError libraryError = ncAdapter.ReadScadaData(selectedScadaSchema, out DTOScadaModel values);
if (libraryError.IsError())
return BadRequest(libraryError.localizationKey);
// Add to the subscriber list
SubscribedScada.Add(selectedScadaSchema);
@@ -77,9 +77,9 @@ namespace Thermo.Active.Controllers.WebApi
using(NcAdapter ncAdapter = new NcAdapter())
{
ncAdapter.Connect();
CmsError cmsError = ncAdapter.ReadScadasData(ProductionScadaSchema, out List<DTOScadaModel> values);
if (cmsError.IsError())
return BadRequest(cmsError.localizationKey);
CmsError libraryError = ncAdapter.ReadScadasData(ProductionScadaSchema, out List<DTOScadaModel> values);
if (libraryError.IsError())
return BadRequest(libraryError.localizationKey);
ScadaDataAndSchema data = new ScadaDataAndSchema()
@@ -150,9 +150,9 @@ namespace Thermo.Active.Controllers.WebApi
if (memIndex == "")
return BadRequest(INCORRECT_PARAMETERS_ERROR.localizationKey);
CmsError cmsError = ncAdapter.WriteScada(memIndex, memType, value);
if (cmsError.IsError())
return BadRequest(cmsError.localizationKey);
CmsError libraryError = ncAdapter.WriteScada(memIndex, memType, value);
if (libraryError.IsError())
return BadRequest(libraryError.localizationKey);
}
return Ok();
@@ -12,7 +12,7 @@ using System.Web.Http;
using static CMS_CORE_Library.Models.DataStructures;
using static Thermo.Active.Config.ServerConfig;
using static Thermo.Active.Model.Constants;
using Thermo.Active.Model.DTOModels.Recipe;
using Thermo.Active.Model.DTOModels.ThWarmers;
using Thermo.Active.Config;
using Thermo.Active.Utils;
@@ -34,11 +34,11 @@ namespace Thermo.Active.Controllers.WebApi
return InternalServerError();
}
CmsError cmsError = ncAdapter.ReadWarmers(out Dictionary<int, DTOWarmers> currWarmers);
if (cmsError.IsError())
libraryError = ncAdapter.ReadWarmers(out Dictionary<int, DTOWarmers> currWarmers);
if (libraryError.IsError())
{
ThermoActiveLogger.LogError($"GetRecipeOverview error | {cmsError.exception}");
return BadRequest(cmsError.localizationKey);
ThermoActiveLogger.LogError($"GetRecipeOverview error | {libraryError.exception}");
return BadRequest(libraryError.localizationKey);
}
return Ok(currWarmers);
@@ -57,11 +57,11 @@ namespace Thermo.Active.Controllers.WebApi
return InternalServerError();
}
CmsError cmsError = ncAdapter.GetWarmersResistances(out Dictionary<int, Model.ConfigModels.RiskResistModel> currWarmers);
if (cmsError.IsError())
libraryError = ncAdapter.GetWarmersResistances(out Dictionary<int, Model.ConfigModels.RiskResistModel> currWarmers);
if (libraryError.IsError())
{
ThermoActiveLogger.LogError($"GetCurrentWarmersResistances error | {cmsError.exception}");
return BadRequest(cmsError.localizationKey);
ThermoActiveLogger.LogError($"GetCurrentWarmersResistances error | {libraryError.exception}");
return BadRequest(libraryError.localizationKey);
}
return Ok(currWarmers);
@@ -82,11 +82,11 @@ namespace Thermo.Active.Controllers.WebApi
}
// recupera aree % X / Y
CmsError cmsError = ncAdapter.GetWarmMaterialArea(out Dictionary<string, double> currAreaPerc);
if (cmsError.IsError())
libraryError = ncAdapter.GetWarmMaterialArea(out Dictionary<string, double> currAreaPerc);
if (libraryError.IsError())
{
ThermoActiveLogger.LogError($"GetCurrentAreaPerc error | {cmsError.exception}");
return BadRequest(cmsError.localizationKey);
ThermoActiveLogger.LogError($"GetCurrentAreaPerc error | {libraryError.exception}");
return BadRequest(libraryError.localizationKey);
}
return Ok(currAreaPerc);
@@ -110,11 +110,11 @@ namespace Thermo.Active.Controllers.WebApi
return InternalServerError();
}
// scrivo sul PLC
CmsError cmsError = ncAdapter.WriteRecipeWarmChSetpHMI(channelsLoad);
if (cmsError.IsError())
libraryError = ncAdapter.WriteRecipeWarmChSetpHMI(channelsLoad);
if (libraryError.IsError())
{
ThermoActiveLogger.LogError($"WriteSetpoints error | {cmsError.exception}");
return BadRequest(cmsError.localizationKey);
ThermoActiveLogger.LogError($"WriteSetpoints error | {libraryError.exception}");
return BadRequest(libraryError.localizationKey);
}
// ritorno solo fatto!
@@ -145,19 +145,19 @@ namespace Thermo.Active.Controllers.WebApi
}
// scrivo sul PLC il comando conferma!
CmsError cmsError = ncAdapter.ConfirmRecipeData(true);
if (cmsError.IsError())
libraryError = ncAdapter.ConfirmRecipeData(true);
if (libraryError.IsError())
{
ThermoActiveLogger.LogError($"Warmers ConfirmEdit error | ConfirmRecipeData | {cmsError.exception}");
return BadRequest(cmsError.localizationKey);
ThermoActiveLogger.LogError($"Warmers ConfirmEdit error | ConfirmRecipeData | {libraryError.exception}");
return BadRequest(libraryError.localizationKey);
}
// recupero i dati LIVE dei parametri HMI dei riscaldi...
cmsError = ncAdapter.ReadWarmers(out Dictionary<int, DTOWarmers> currWarmers);
if (cmsError.IsError())
libraryError = ncAdapter.ReadWarmers(out Dictionary<int, DTOWarmers> currWarmers);
if (libraryError.IsError())
{
ThermoActiveLogger.LogError($"Warmers ConfirmEdit error | ReadWarmers | {cmsError.exception}");
return BadRequest(cmsError.localizationKey);
ThermoActiveLogger.LogError($"Warmers ConfirmEdit error | ReadWarmers | {libraryError.exception}");
return BadRequest(libraryError.localizationKey);
}
// rileggo la ricetta
@@ -192,19 +192,19 @@ namespace Thermo.Active.Controllers.WebApi
}
// scrivo sul PLC il comando annula!
CmsError cmsError = ncAdapter.ConfirmRecipeData(false);
if (cmsError.IsError())
libraryError = ncAdapter.ConfirmRecipeData(false);
if (libraryError.IsError())
{
ThermoActiveLogger.LogError($"Warmers CancelEdit error | ConfirmRecipeData | {cmsError.exception}");
return BadRequest(cmsError.localizationKey);
ThermoActiveLogger.LogError($"Warmers CancelEdit error | ConfirmRecipeData | {libraryError.exception}");
return BadRequest(libraryError.localizationKey);
}
// recupero i dati LIVE dei parametri HMI dei riscaldi...
cmsError = ncAdapter.ReadWarmers(out Dictionary<int, DTOWarmers> currWarmers);
if (cmsError.IsError())
libraryError = ncAdapter.ReadWarmers(out Dictionary<int, DTOWarmers> currWarmers);
if (libraryError.IsError())
{
ThermoActiveLogger.LogError($"Warmers ConfirmEdit error | ReadWarmers | {cmsError.exception}");
return BadRequest(cmsError.localizationKey);
ThermoActiveLogger.LogError($"Warmers ConfirmEdit error | ReadWarmers | {libraryError.exception}");
return BadRequest(libraryError.localizationKey);
}
// rileggo la ricetta
@@ -237,11 +237,11 @@ namespace Thermo.Active.Controllers.WebApi
}
// scrivo sul PLC
CmsError cmsError = ncAdapter.WriteRecipeWarmConfig();
if (cmsError.IsError())
libraryError = ncAdapter.WriteRecipeWarmConfig();
if (libraryError.IsError())
{
ThermoActiveLogger.LogError($"Warmers SetConfig error | WriteRecipeWarmConfig | {cmsError.exception}");
return BadRequest(cmsError.localizationKey);
ThermoActiveLogger.LogError($"Warmers SetConfig error | WriteRecipeWarmConfig | {libraryError.exception}");
return BadRequest(libraryError.localizationKey);
}
// ritorno solo fatto!
@@ -14,7 +14,10 @@ using System.Threading;
using static Thermo.Active.Listeners.SignalRStaticObjects;
using static Thermo.Active.Model.Constants;
using static Thermo.Active.Config.ServerConfig;
using Thermo.Active.Model.DTOModels.Recipe;
using Thermo.Active.Model.DTOModels.ThModules;
using Thermo.Active.Model.DTOModels.ThProd;
using Thermo.Active.Model.DTOModels.ThRecipe;
using Thermo.Active.Model.DTOModels.ThWarmers;
using CMS_CORE_Library.Models;
using static CMS_CORE_Library.Models.ThermoModels;
using System.Threading.Tasks;
@@ -2,7 +2,9 @@
using Thermo.Active.Model.DTOModels.AlarmModels;
using Thermo.Active.Model.DTOModels.Scada;
using System.Collections.Generic;
using Thermo.Active.Model.DTOModels.Recipe;
using Thermo.Active.Model.DTOModels.ThModules;
using Thermo.Active.Model.DTOModels.ThRecipe;
using Thermo.Active.Model.DTOModels.ThWarmers;
using CMS_CORE_Library.Models;
namespace Thermo.Active.Listeners
+1 -1
View File
@@ -31,4 +31,4 @@ using System.Runtime.InteropServices;
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("0.8.1")]
[assembly: AssemblyVersion("0.9.5")]
+6
View File
@@ -16474,4 +16474,10 @@
</Target>
<Target Name="AfterBuild">
</Target> -->
<Target Name="AfterBuild">
<ItemGroup>
<MoveToLibFolder Include="$(OutputPath)*.dll ; $(OutputPath)*.pdb ; $(OutputPath)*.xml" />
</ItemGroup>
<Move SourceFiles="@(MoveToLibFolder)" DestinationFolder="$(OutputPath)lib" OverwriteReadOnlyFiles="true" />
</Target>
</Project>
+1
View File
@@ -33,6 +33,7 @@
<package id="microsoft-web-helpers" version="2.1.20710.2" targetFramework="net462" />
<package id="Newtonsoft.Json" version="12.0.1" targetFramework="net462" />
<package id="Owin" version="1.0" targetFramework="net462" />
<package id="PrettyBin" version="1.1.0" targetFramework="net462" />
<package id="Swashbuckle" version="5.6.0" targetFramework="net462" />
<package id="Swashbuckle.Core" version="5.6.0" targetFramework="net462" />
<package id="System.Security.Claims" version="4.0.1" targetFramework="net462" />
Binary file not shown.
Binary file not shown.
@@ -1,92 +0,0 @@
// out: false, sourceMap: false, main: ../style.less
@import "grid-system.less";
@import "colors.less";
@import "fonts.less";
.circle-gantt{
height: 70px;
.specific{
div{
&:first-of-type{
display: flex;
flex-direction: column;
justify-content: flex-end;
height: 70px;
object-fit: contain;
border-radius: 2px;
background-color: #57636b;
label{
margin-left: 37%;
}
}
&:last-of-type{
display: flex;
flex-direction: column;
justify-content: center;
margin-top: -66px;
height: 40px;
object-fit: contain;
border-radius: 2px;
background-color: #c0c7cc;
label{
margin-left: 25%;
}
}
}
&:first-of-type{
div{
&:first-of-type{
display: flex;
flex-direction: column;
justify-content: flex-end;
width: 34px;
height: 70px;
object-fit: contain;
border-radius: 2px;
background-color: #57636b;
label{
margin-left: 25%;
}
}
&:last-of-type{
display: flex;
flex-direction: column;
justify-content: flex-end;
margin-top: -66px;
width: 34px;
height: 40px;
object-fit: contain;
border-radius: 2px;
background-color: #c0c7cc;
img{
margin-left: 25%;
flex-shrink: 0;
width: 20px;
height: 20px;
}
}
}
}
}
}
@@ -0,0 +1,70 @@
// out: false, sourceMap: false, main: ../style.less
@import "colors.less";
@gauge-h: 610px;
@gauge-w: 610px;
@smallgauge-h: @gauge-h - 30px;
@smallgauge-w: @gauge-w - 30px;
.gauge-container {
// grid-column: 3;
// grid-row: 2;
display: grid;
grid-template-rows: 1fr auto 1fr;
hr {
grid-row: 2;
grid-column: 1;
margin: auto;
height: 5px;
width: calc(@gauge-w/2);
background-color: gray;
z-index: 1;
border: none;
}
width: @gauge-w;
height: @gauge-h;
.gauge1,
.gauge2 {
grid-column: 1;
grid-row-start: 1;
grid-row-end: 3;
.gauge {
.dial {
fill: rgba(153, 207, 255, 0.6);
stroke: #003366;
stroke-width: 2.5;
}
.value {
stroke: #90C03D;
stroke-width: 2.5;
}
.value-text {
fill: black;
font-size: 20px;
}
}
}
.gauge2 {
.gauge {
.dial {
stroke: rgba(0, 0, 0, .5);
stroke-width: 1;
}
.value {
stroke: #4caaff;
stroke-width: 1;
}
}
}
}
@@ -5,483 +5,318 @@
.dashboard {
height : 100%;
width : 100%;
background-image: url("../../assets/icons/png/bg.png");
position : fixed;
z-index : 1001;
display : flex;
flex-direction : column;
justify-content : flex-start;
font-family : "Work Sans";
height : calc(~'100% - 60px');
width : 100%;
background-image : url("../../assets/icons/png/bg.png");
position : fixed;
z-index : 1001;
display : grid;
grid-template-rows : 144px 1fr;
grid-template-columns: 152px 1fr 610px 1fr 152px;
grid-row-gap : 40px;
padding-top : 20px;
padding-bottom : 40px;
color : #4b4b4b;
.header {
width : 100%;
display: flex;
header {
grid-row : 1;
grid-column-start: 1;
grid-column-end : -1;
width : 100% !important;
justify-content : space-between;
height : 144px !important;
position : relative !important;
.ribbon-container {
height : 80px;
z-index: 900;
}
.arch{
justify-content: center;
.box-date {
display : flex;
width : 70%;
margin-left: 100px;
.box-gauge{
width: 126px;
div {
flex-shrink: 0;
font-size : 47px;
text-align : right;
font-weight: 500;
}
div {
time {
flex-shrink: 0;
transition : color 200ms ease-in-out;
margin-left: 28px;
display : flex;
font-size : 120px;
}
}
.arch {
width: 100%;
.box-gauge {
height: 150px;
width : 150px;
.gauge-container,
.three {
width : 126px;
height: 92px;
.gauge {
.value {
stroke: #1791ff;
}
.value-text {
fill: #4b4b4b;
}
}
}
div {
&:last-of-type {
margin-top: -10px;
label {
&:first-of-type {
font-size : 18px;
font-weight : 300;
font-stretch : normal;
font-style : normal;
line-height : normal;
letter-spacing: normal;
text-align : center;
color : #4b4b4b;
}
&:last-of-type {
font-size : 26px;
font-weight : 500;
font-stretch : normal;
font-style : normal;
line-height : 1.96;
letter-spacing: normal;
text-align : center;
color : #4b4b4b;
}
}
}
}
}
}
.header-buttons {
display: inline-block;
.box-close-dashboard {
height : 70px;
text-align: right;
button.modal-close {
background-color: #4B4B4B;
margin : 23px;
}
}
.user-info {
margin-top : 10px;
display : flex;
font-size : 25px;
color : @color-input-light;
flex-grow : 1;
justify-content: flex-end;
margin-right : 21px;
button.profile {
width : 48px;
height : 48px;
background-image: url("../profile.png");
color : #000;
background-size : cover;
border : none;
background-color: transparent;
&.colorWhite {
color: #FFF;
}
}
div {
align-self : center;
margin-right: 10px;
font-size : 18px;
}
}
}
}
section {
margin-top : -400px;
height : 722px;
display : flex;
justify-content: flex-end;
padding-right : 15px;
padding-bottom : 50px;
.specific {
display : flex;
flex-direction : column;
justify-content: flex-end;
div {
display: flex;
}
//inizio sezione style del primo specific
&:first-of-type {
margin-right: 15%;
div {
&:first-of-type {
img {
flex-shrink: 0;
width : 41px;
height : 41px;
object-fit : contain;
}
label {
flex-shrink : 0;
font-size : 54px;
font-weight : normal;
font-stretch : normal;
font-style : normal;
line-height : normal;
letter-spacing: normal;
text-align : right;
color : #4b4b4b;
}
}
&:last-of-type {
margin: unset;
button {
flex-shrink : 0;
width : 65px;
height : 65px;
box-shadow : 0 2px 10px 0 rgba(0, 0, 0, 0.5);
border : solid 3px #4b4b4b;
background-color: rgba(255, 255, 255, 0.2);
border-radius : 50%;
color : #4b4b4b;
font-size : 50px;
text-align : center;
}
label {
flex-shrink: 0;
&:first-of-type {
font-size : 12px;
font-weight : 500;
font-stretch : normal;
font-style : normal;
line-height : 1;
letter-spacing: normal;
text-align : center;
color : #4b4b4b;
}
&:last-of-type {
font-size : 25px;
font-weight : 500;
font-stretch : normal;
font-style : normal;
line-height : 1;
letter-spacing: normal;
text-align : center;
color : #4b4b4b;
}
}
}
}
}
//inizio sezione style del secondo specific
&:last-of-type {
label {
flex-shrink: 0;
color: #4b4b4b;
&:first-of-type {
font-size : 26px;
font-weight : 500;
font-stretch : normal;
font-style : normal;
line-height : 1.96;
letter-spacing: normal;
text-align : center;
color : #4b4b4b;
}
&:last-of-type {
font-size : 120px;
font-weight : 300;
font-stretch : normal;
font-style : normal;
line-height : normal;
letter-spacing: normal;
text-align : center;
color : #4b4b4b;
}
&:first-of-type{
font-size: 18px;
}
&:last-of-type{
font-size: 26px;
}
}
//inizio sezione style del terzo specific
&:last-of-type {
margin-left: 15%;
}
}
div {
flex-shrink : 0;
width : 542px;
height : 71px;
background-color: rgba(0, 0, 0, 0.5);
}
.gauge-container{
width: 126px;
height: 126px;
}
.gauge-container>.gauge>.value {
stroke: #1791ff;
}
.actual {
background-color: unset;
width : unset;
height : unset;
.gauge-container.three>.gauge>.value-text {
fill: #4b4b4b;
}
.specific {
background-color: unset;
width : unset;
height : unset;
margin : unset;
}
label {
flex-shrink: 0;
}
&:first-of-type {
font-size : 26px;
font-weight : 500;
font-stretch : normal;
font-style : normal;
line-height : 1.96;
letter-spacing: normal;
text-align : center;
color : #4b4b4b;
}
.ribbon-container,
.app-ribbon {
height : 144px;
width : 152px;
border-top-right-radius : 72px;
border-bottom-right-radius: 72px;
&:last-of-type {
font-size : 120px;
font-weight : 300;
font-stretch : normal;
font-style : normal;
line-height : normal;
letter-spacing: normal;
text-align : center;
color : #4b4b4b;
}
.status-icon {
width : 114px;
height : 114px;
border-radius: 57px;
}
* {
font-size: 48px;
}
}
}
}
}
.header-buttons {
padding-right : 21px;
display : flex;
flex-flow : column;
align-items : flex-end;
justify-content: space-between;
height : 100%;
aside {
margin-top: 5px;
width : 641px;
height : 100%;
overflow-x: hidden;
.user-info {
font-size: 14px;
.component {
width : 621px;
height: 77px;
}
.name {
text-align: right;
}
}
}
button.modal-close {
box-shadow : none;
background-color: @color-darkish-blue;
color : white;
}
}
}
.component-info {
width : unset;
height : unset;
background-color: unset;
display : flex;
flex-direction : column;
.first_col {
grid-row : 2;
grid-column: 2;
height : 100%;
display : flex;
flex-flow : column;
section {
margin : unset;
padding : unset;
height : unset;
width : unset;
display : flex;
justify-content: flex-end;
.timing-area {
display : grid;
grid-template-rows: 1fr 1fr 1fr;
height : 610px;
section {
margin : unset;
padding : unset;
height : unset;
width : unset;
display : flex;
flex-direction: column;
.start,
.current,
.end {
display : flex;
flex-flow : column;
align-items : center;
justify-content : center;
background-color : rgba(153, 207, 255, 0.6);
border-top-left-radius : 100px;
border-bottom-left-radius: 100px;
.component {
width : 478px;
height : 60px;
background-color: #e8e8e8;
small {
font-size : 26px;
text-transform: uppercase;
}
div {
flex-shrink: unset;
time {
font-size : 120px;
font-weight: 300;
}
}
button {
border-color : black;
width : 50PX;
height : 50px;
border-radius : 50%;
background-color: unset;
}
.current {
background-color: transparent;
}
time {
font-size : 54px;
font-weight: 500;
}
}
}
}
.setpoint {
margin : auto;
display : grid;
grid-template-rows : 1fr 1fr;
grid-template-columns: 65px 125px 65px;
grid-row-gap : 1rem;
}
img {
grid-row : 1;
grid-column: 1;
margin : auto;
height : 41px;
width : 41px;
}
}
label {
margin : auto;
grid-row : 1;
grid-column-start: 2;
grid-column-end : -1;
.component {
width : 641px;
height : 84px;
background-color: #e8e8e8;
display : flex;
flex-direction : column;
justify-content : flex-end;
font-size : 54px;
text-align: right;
}
div {
flex-shrink : 0;
margin : auto;
padding : 0px 15px;
width : unset;
height : unset;
background-color: unset;
div {
display : flex;
flex-flow: column;
font-weight: 500;
align-items: center;
label {
flex-shrink : 0;
font-size : 54px;
font-weight : 500;
font-stretch : normal;
font-style : normal;
line-height : normal;
letter-spacing: normal;
text-align : right;
color : #4b4b4b;
}
small {
font-size : 12px;
line-height : 25px;
text-transform: uppercase;
}
.specific {
height : unset;
width : unset;
background-color: unset;
margin : unset;
span {
line-height: 25px;
font-size : 25px;
}
}
label {
flex-shrink: 0;
button {
border : 2px solid #4b4b4b;
border-radius : 50%;
width : 65px;
height : 65px;
font-size : 36px;
box-shadow : 0 2px 10px 0 rgba(0, 0, 0, 0.5);
font-size : 28px;
justify-content: center;
align-items : center;
display : flex;
color : #4b4b4b;
}
&:first-of-type {
font-size : 12px;
font-weight : 500;
font-stretch : normal;
font-style : normal;
line-height : 1;
letter-spacing: normal;
text-align : center;
color : #4b4b4b;
}
}
&:last-of-type {
font-size : 25px;
font-weight : 500;
font-stretch : normal;
font-style : normal;
line-height : 1;
letter-spacing: normal;
text-align : center;
color : #4b4b4b;
}
}
}
.second_col {
grid-row : 2;
grid-column: 3;
height : 100%;
display : flex;
flex-flow : column;
}
.remaining_time {
margin : auto;
display : flex;
flex-flow: column;
button {
height : 20px;
width : 20px;
background-color: black;
}
align-items: center;
}
small {
font-size : 26px;
font-weight : 500;
text-transform: uppercase;
}
span {
flex-shrink : 0;
width : 100%;
height : 1px;
background-color: #676767;
}
time {
font-size : 120px;
font-weight: 300;
}
}
}
}
.third_col {
grid-row : 2;
grid-column-start: 4;
grid-column-end : -1;
height : 100%;
display : flex;
flex-flow : column;
}
.piece_time{
display: grid;
grid-template-rows : repeat(2,auto);
grid-template-columns: repeat(2,auto);
}
.piece_hours{
grid-row: 1;
grid-column: 1;
}
.time_cycle{
grid-row: 1;
grid-column: 2;
}
div{
display: flex;
flex-flow: column;
span{
font-family: "Work Sans";
font-weight: 500;
text-align: center;
color:#4b4b4b;
&:first-of-type{
font-size: 26px;
text-transform: uppercase;
}
&:last-of-type{
font-size: 120px;
}
}
}
}
.pieces {
height: 400px;
aside {
margin-top: 10px;
height : 100%;
.piece_info{
height: 77px;
}
.sub_menu{
.piece_info{
height: 60px;
}
}
}
}
}
}
@@ -1,44 +1,58 @@
// out: false, sourceMap: false, main: ../style.less
@font-face {
font-family: 'Work Sans';
font-style: normal;
font-weight: 400;
src: local('Work Sans'), local('WorkSans-Regular'), url(../fonts/WorkSans-Regular.ttf) format('ttf');
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
font-family: 'Work Sans';
font-style: normal;
font-weight: 200;
src: local('Work Sans Thin'), local('WorkSans-Thin'), url(/assets/fonts/WorkSans-Thin.ttf) format('truetype');
}
@font-face {
font-family: 'Work Sans';
font-style: normal;
font-weight: 300;
src: local('Work Sans Light'), local('WorkSans-Light'), url(/assets/fonts/WorkSans-Light.ttf) format('truetype');
}
@font-face {
font-family: 'Work Sans';
font-style: normal;
font-weight: 400;
src: local('Work Sans Regular'), local('WorkSans-Regular'), url(/assets/fonts/WorkSans-Regular.ttf) format('truetype');
}
/* latin-ext */
@font-face {
font-family: 'Work Sans';
font-style: normal;
font-weight: 500;
src: local('Work Sans Medium'), local('WorkSans-Medium'), url(../fonts/WorkSans-Medium.ttf) format('ttf');
font-family: 'Work Sans';
font-style: normal;
font-weight: 500;
src: local('Work Sans Medium'), local('WorkSans-Medium'), url(/assets/fonts/WorkSans-Medium.ttf) format('truetype');
}
/* latin-ext */
@font-face {
font-family: 'Work Sans';
font-style: normal;
font-weight: 600;
src: local('Work Sans SemiBold'), local('WorkSans-SemiBold'), url(../fonts/WorkSans-SemiBold.ttf) format('ttf');
font-family: 'Work Sans';
font-style: normal;
font-weight: 600;
src: local('Work Sans SemiBold'), local('WorkSans-SemiBold'), url(/assets/fonts/WorkSans-SemiBold.ttf) format('truetype');
}
/* latin-ext */
@font-face {
font-family: 'Work Sans';
font-style: normal;
font-weight: 700;
src: local('Work Sans Bold'), local('WorkSans-Bold'), url(../fonts/WorkSans-Bold.ttf) format('ttf');
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
font-family: 'Work Sans';
font-style: normal;
font-weight: 700;
src: local('Work Sans Bold'), local('WorkSans-Bold'), url(/assets/fonts/WorkSans-Bold.ttf) format('truetype');
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}
.text-22{
.text-22 {
font-size: 22px !important;
}
}
@@ -1,193 +0,0 @@
// out: false, sourceMap: false, main: ../style.less
@import "colors.less";
@gauge-h: 800px;
@gauge-w: 800px;
@smallgauge-h: @gauge-h - 30px;
@smallgauge-w: @gauge-w - 30px;
.box-graph-dashboard {
height : 610px;
display : flex;
align-items : center;
justify-content: flex-end;
.svg-dashboard {
background-repeat: no-repeat;
display : flex;
flex-direction : column;
justify-content : center;
&.dashboard3 {
margin-left: -150px;
margin-bottom : 250px;
height : 100px;
width : 900px;
background-size : 900px;
background-image: url(/assets/icons/svg/svg-dashboard3.svg);
label {
margin : unset;
font-size : 35px;
font-weight : 500;
font-stretch : normal;
font-style : normal;
line-height : normal;
letter-spacing: normal;
text-align : center;
color : #4b4b4b;
}
}
}
.time-box {
display : flex;
flex-direction : column;
justify-content: center;
height : 100%;
margin-top: 200px;
margin-right: -150px;
.svg-dashboard {
label {
margin-top : 8px;
font-size : 26px;
font-weight : 500;
font-stretch : normal;
font-style : normal;
line-height : 1.96;
letter-spacing: normal;
text-align : center;
color : #4b4b4b;
}
time {
font-size : 120px;
font-weight : 300;
font-stretch : normal;
font-style : normal;
line-height : normal;
letter-spacing: normal;
text-align : center;
color : #4b4b4b;
}
&.dashboard {
background-image: url(/assets/icons/svg/svg-dashboard.svg);
height : 178px;
width : 545px;
background-size : 545px;
position : relative;
}
&.dashboard2 {
height : 178px;
background-size : 545px;
width : 545px;
background-image: url(/assets/icons/svg/svg-dashboard2.svg);
}
}
.box-time-passed {
height : 117px;
margin : 40px 0px;
text-align : center;
display : flex;
justify-content: center;
flex-direction : column;
label {
&:first-of-type {
font-size: 26px;
}
&:last-of-type {
font-size: 54px;
}
}
}
}
.box-circle-piece {
margin-top: 200px;
display : flex;
align-items: center;
position : relative;
height : @gauge-h;
width : @gauge-w;
hr {
margin : auto;
height : 5px;
width : calc(@gauge-w/2);
background-color: gray;
z-index : 1;
border : none;
}
.gauge-container-dashboard {
width : @gauge-w;
height : @gauge-h;
border-radius: 5px;
position : absolute;
top : calc(~"50%" - (@gauge-h/2));
left: calc(~"50%" - (@gauge-w/2));
&.gauge1 {
width : @smallgauge-w;
height: @smallgauge-h;
top : calc(~"50%" - (@smallgauge-h/2));
left : calc(~"50%" - (@smallgauge-w/2));
.gauge {
.dial {
fill : #99CFFF;
stroke: #91A2B1;
}
.value {
stroke: #4DAAFF;
}
.value-text {
fill : black;
alignment-baseline: before-edge;
font-size : 20px;
}
}
}
&.gauge2 {
.gauge {
.value-text {
fill : black;
alignment-baseline: after-edge;
font-size : 20px;
}
.dial {
stroke: #003264;
}
.value {
stroke : #90C03D;
stroke-width: 2;
}
}
}
}
}
}
@@ -3,7 +3,8 @@
@header-height: 80px;
@header-button-size: 44px;
#app>header {
#app>header,
.dashboard>header {
display: flex;
flex-flow: row nowrap;
align-items: center;
@@ -145,7 +145,7 @@ select:focus {
display: flex;
flex-flow: row;
align-items: center;
justify-content: space-between;
justify-content: center;
&.grid {
display: grid;
@@ -222,7 +222,7 @@ select:focus {
color: #002680;
font-size: 24px;
font-weight: 500;
flex: 1;
flex: 0.7;
}
.numeric {
@@ -242,13 +242,25 @@ select:focus {
align-items: center;
justify-content: stretch;
&.disabled {
background-color: rgba(0, 0, 0, 0.15);
}
&.error {
outline: 2px solid red;
}
&.focused {
outline: 2px #1791ff auto;
}
input {
border: none;
font-size: 16px;
text-align: right;
height: 100%;
width: 100%;
outline: none !important;
// outline: none !important;
background-color: transparent;
&[type=number]::-webkit-inner-spin-button,
@@ -256,6 +268,7 @@ select:focus {
-webkit-appearance: none;
margin: 0;
}
}
span {
@@ -1,104 +1,119 @@
// out: false, sourceMap: false, main: ../style.less
@import "colors.less";
.keypad {
width: 320px;
height: 416px;
border-radius: 2px;
background-color: @color-silver;
box-shadow: 2px 10px 15px 0 @color-black-40;
position: relative;
header {
height: 64px;
width: 320px;
height: 416px;
border-radius: 2px;
background-color: @color-silver;
box-shadow: 2px 10px 15px 0 @color-black-40;
position: relative;
header {
height: 64px;
width: 100%;
background-color: #fff;
box-shadow: 0 1px 2px 0 @color-black-40;
display: flex;
align-items: center;
justify-content: space-between;
&>i {
width: 20px;
font-size: 32px;
margin: 0 5px;
color: @color-blue;
text-align: center;
}
span {
text-align: left;
flex-grow: 2;
text-transform: capitalize;
color: @color-greyish-brown;
font-weight: 600;
}
button {
background: none;
border: none;
margin-right: 8px;
i {
font-size: 32px;
color: @color-blue;
text-align: center;
}
}
}
.body {
display: flex;
flex-flow: column;
align-items: center;
height: calc(~"100% - 64px");
.display {
display: flex;
align-items: center;
justify-content: center;
margin-top: 23px;
margin-bottom: 25px;
height: 48px;
button {
width: 48px;
height: 48px;
margin: 0 !important;
border: none;
padding: 0 !important;
font-size: 18px !important;
font-weight: normal !important;
line-height: 48px;
}
input {
width: calc(~"144px - 40px");
height: 48px;
border-radius: 2px;
background-color: @color-whitetwo;
box-shadow: inset 0 1px 3px 0 @color-black-50;
border: solid 1px @color-white3;
padding: 0 20px;
text-align: right;
font-size: 18px;
color: @color-greyish-brown;
}
}
.buttons {
height: calc(~"100% - 96px");
width: 256px;
border-spacing: 8px;
margin: -8px;
td {
width: 25%;
}
button {
padding: 0;
width: 100%;
background-color: #fff;
box-shadow: 0 1px 2px 0 @color-black-40;
display: flex;
align-items: center;
justify-content: space-between;
&>i {
width: 20px;
font-size: 32px;
margin: 0 5px;
color: @color-blue;
text-align: center;
height: 100%;
border: none;
margin: 0 !important;
font-size: 18px !important;
font-weight: normal !important;
&.blue {
background-image: linear-gradient(to bottom, @color-nice-blue, @color-darkish-blue);
color: #ffffff;
}
span {
text-align: left;
flex-grow: 2;
text-transform: capitalize;
color: @color-greyish-brown;
font-weight: 600;
}
button {
background: none;
border: none;
margin-right: 8px;
i {
font-size: 32px;
color: @color-blue;
text-align: center;
}
&.rotate-90 i {
transform: rotate(90deg);
}
}
}
.body {
display: flex;
flex-flow: column;
align-items: center;
height: calc(~"100% - 64px");
.display {
display: flex;
align-items: center;
justify-content: center;
margin-top: 23px;
margin-bottom: 25px;
height: 48px;
button {
width: 48px;
height: 48px;
margin: 0 !important;
border: none;
padding: 0 !important;
font-size: 18px !important;
font-weight: normal !important;
line-height: 48px;
}
input {
width: calc(~"144px - 40px");
height: 48px;
border-radius: 2px;
background-color: @color-whitetwo;
box-shadow: inset 0 1px 3px 0 @color-black-50;
border: solid 1px @color-white3;
padding: 0 20px;
text-align: right;
font-size: 18px;
color: @color-greyish-brown;
}
}
.buttons {
height: calc(~"100% - 96px");
width: 256px;
border-spacing: 8px;
margin: -8px;
td {
width: 25%;
}
button {
padding: 0;
width: 100%;
height: 100%;
border: none;
margin: 0 !important;
font-size: 18px !important;
font-weight: normal !important;
&.blue {
background-image: linear-gradient(to bottom, @color-nice-blue, @color-darkish-blue);
color: #ffffff;
}
&.rotate-90 i {
transform: rotate(90deg);
}
}
}
}
}
}
}
@@ -2,23 +2,23 @@
@import "setup.less";
@import "colors.less";
@import "modals.less";
@import "graph-dashboard.less";
@import "dashboard-gauge.less";
@import "piece.less";
@import "dashboard.less";
@import "riscaldi.less";
@import "slider.less";
@import "tastierino.less";
@import "preriscaldo-dashboard.less";
@import "circlegantt.less";
@import "paddle.less";
@import "arch-interface.less";
@import "avvio-prod.less";
@import "processo.less";
@import "progrprerisc.less";
@import "opzioni.less";
@import "imbutitura.less";
@import "popups.less";
@import "grid-system.less";
@import "input.less";
@import "opzioni.less";
@import "buttons.less";
@import "fonts.less";
@import "header.less";
@@ -1,91 +1,53 @@
// out: false, sourceMap: false, main: ../style.less
@import "grid-system.less";
@import "colors.less";
@import "fonts.less";
.modal.opzioni-info {
hr {
width: 2px;
height: 830px;
background-color: #979797;
margin: 0;
}
section.body {
section {
padding: 0px;
.specific {
&:last-of-type {
margin-left: 100px;
width: 471px;
.modal.opzioni-info{
section{
aside{
button{
box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.5);
width: 547px;
height: 72px;
background-color: #bbbcbc;
border:none;
text-align: left;
color: @color-darkish-blue;
font-size: 20px;
&.active{
background-color: white;
}
&:first-of-type {
.box-color {
background-color: #ffffff;
}
button {
background-color: #dddddd;
display: block;
color: #000000;
padding: 22px 16px;
width: 550px;
height: 64px;
border: none;
text-align: left;
cursor: pointer;
font-size: 17px;
}
.active {
background-color: rgba(23, 145, 255, 0.75);
color: #ffffff;
}
label {
font-size: 14px;
width: 60px;
margin-left: 5px;
margin-right: 30px;
}
}
}
aside {
button {
display: block;
background-color: #bbbcbc;
color: #002680;
padding: 22px 16px;
margin: 2px 0;
width: 547px;
height: 70px;
border: none;
text-align: left;
cursor: pointer;
font-size: 17px;
}
.active {
background-color: #fff;
font-weight: bold;
border-top: 2px solid #002680;
}
}
}
}
}
.opzionilavorazione {
display: grid;
grid-template-columns: 1fr 1fr;
align-items: flex-start;
width: 100%;
height: 100%;
.list {
border-right: 2px solid #979797;
height: 100%;
}
.option-row {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
align-items: center;
justify-content: space-around;
height: 64px;
cursor: pointer;
}
.option-row:nth-child(odd) {
background-color: #ddd;
}
.option-row.active {
background-color: rgba(23, 145, 255, 0.75);
color: #fff;
}
}
@@ -3,76 +3,59 @@
@import "colors.less";
@import "fonts.less";
html {
height: 100%;
overflow: hidden;
}
body {
border: 0;
margin: 0;
padding: 0;
height: 100%;
}
.hidden {
visibility: hidden;
}
.main-nav {
position: absolute;
top: 50%;
right: 0;
z-index: 1000;
}
.container {
#app {
nav {
position: absolute;
top: 50%;
right: 0;
position : absolute;
right : 0;
height : 100%;
display : flex;
flex-direction : column;
justify-content: center;
.active button {
transform: translate(-761px, 0px);
}
.active_second_card button {
transform: translate(-1522px, 0px);
}
div {
button {
position: relative;
height: 30px;
width: 32px;
display: block;
z-index: 1000;
border: 0;
border-radius: 0;
pointer-events: all;
background: #dddddd;
position : relative;
height : 30px;
width : 32px;
display : block;
z-index : 1000;
border : 0;
border-radius : 0;
pointer-events : all;
background : #dddddd;
border-bottom-left-radius: 90px;
border-top-left-radius: 90px;
height: 90px;
width: 45px;
box-shadow: -3px 0 3px rgba(0, 0, 0, .2);
border-top-left-radius : 90px;
height : 90px;
width : 45px;
box-shadow : -3px 0 3px rgba(0, 0, 0, .2);
div {
display: grid;
display : grid;
grid-template-columns: repeat(2, 1fr);
grid-template-rows: 1fr 1fr;
align-items: center;
justify-items: center;
padding: 5px;
grid-template-rows : 1fr 1fr;
align-items : center;
justify-items : center;
padding : 5px;
div {
width: 2px;
height: 2px;
width : 2px;
height : 2px;
border-radius: 10px;
margin: 2px;
background: #002680;
margin : 2px;
background : #002680;
}
@@ -83,95 +66,106 @@ body {
}
}
.sidebar {
width : 100vw;
height : 100vh;
display : flex;
flex-direction : column;
justify-content: center;
.sidebar-backdrop {
width: 100vw;
height: 100vh;
position: fixed;
top: 0;
left: 0;
cursor: pointer;
.active {
transform: translate(-761px, 0px);
}
.sidebar-panel {
overflow-y: auto;
// overflow-y : auto;
background-color: #130f40;
position: fixed;
right: 0;
top: 141px;
height: 100vh;
z-index: 900;
padding: 3rem 20px 2rem 20px;
width: 721px;
height: 920px;
border-radius: 4px;
box-shadow: 2px 10px 15px 0 rgba(0, 0, 0, 0.5);
position : fixed;
right : 0;
z-index : 900;
padding : 3rem 20px 2rem 20px;
width : 721px;
height : 920px;
border-radius : 4px;
box-shadow : 2px 10px 15px 0 rgba(0, 0, 0, 0.5);
background-color: #dddddd;
.text-head-sidebar {
margin: 10px auto;
font-size: 24px;
font-weight: 500;
font-stretch: normal;
font-style: normal;
line-height: normal;
letter-spacing: normal;
text-align: center;
color: #002680;
.head-sidebar {
margin: 10px 0px;
display: flex;
align-items: center;
justify-content: space-evenly;
button{
width: 100px;
height: 30px;
font-size: 20px;
background-color: unset;
border: none;
&.selected{
color:#002680;
border-bottom: 2px solid #002680;
}
}
label {
font-size : 24px;
font-weight : 500;
font-stretch : normal;
font-style : normal;
line-height : normal;
letter-spacing: normal;
text-align : center;
color : #002680;
}
}
.box-sidebar-panel {
display: grid;
aside {
height: 95%;
}
section {
display : grid;
grid-template-columns: repeat(2, 1fr);
align-items: center;
justify-items: center;
align-items : center;
justify-items : center;
.sidebar-panel-nav {
width: 286px;
height: 100px;
border-radius: 2px;
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.5);
width : 286px;
height : 100px;
border-radius : 2px;
box-shadow : 0 2px 4px 0 rgba(0, 0, 0, 0.5);
background-color: #808e96;
margin: 10px 30px;
margin : 10px 30px;
.text-box-paddle {
display: flex;
width: 268px;
height: 78px;
font-family: WorkSans;
font-size: 18px;
font-weight: 500;
font-stretch: normal;
font-style: normal;
line-height: normal;
div {
display : flex;
width : 268px;
height : 78px;
font-size : 18px;
font-weight : 500;
font-stretch : normal;
font-style : normal;
line-height : normal;
letter-spacing: normal;
color: #ffffff;
margin: 10px;
color : #ffffff;
margin : 10px;
i {
text-align: end;
width: 50px;
color: #bbbcbc;
width : 50px;
color : #bbbcbc;
}
label {
width: 117px;
width : 100%;
margin: 10px;
}
}
.text-box-paddle.text-soft {
label {
width: 100%;
align-self: center;
}
}
}
}
@@ -179,8 +173,6 @@ body {
}
}
}
@@ -0,0 +1,134 @@
// out: false, sourceMap: false, main: ../style.less
.menu_grid {
display : grid;
grid-template-rows : repeat(2, auto);
grid-template-columns: repeat(5, 20%);
.piece_info {
grid-row : 1;
grid-column-start: 1;
grid-column-end : -1;
display : flex;
align-items : center;
justify-content : space-evenly;
height : 84px;
border-bottom : 2px solid black;
label {
font-size : 54px;
font-weight: 500;
text-align : right;
color : #4b4b4b;
}
div {
height : 53px;
display : flex;
flex-flow : column;
justify-content: space-evenly;
span {
font-family : "Work Sans";
font-weight : 500;
line-height : 1;
letter-spacing: normal;
text-align : center;
color : #4b4b4b;
&:first-of-type {
font-size : 12px;
text-transform: uppercase;
}
&:last-of-type {
font-size: 25px;
}
}
}
i {
height: 30px;
width : 30px;
cursor: pointer;
}
}
.sub_menu {
grid-row : 2;
grid-column-start : 2;
grid-column-end : -1;
display : grid;
grid-template-rows : repeat(3, 60px);
.piece_info {
height: 60px;
display : grid;
grid-template-columns: repeat(4, 25%);
button {
margin: auto;
background-color: white;
border-color : black;
border-radius : 50%;
width : 50px;
height : 50px;
}
}
.row_1 {
grid-row: 1;
button {
grid-column: 1;
}
div {
grid-column: 2;
&:last-of-type {
grid-column: 3;
}
}
}
.row_2 {
grid-row: 2;
div {
grid-column: 2;
&:first-of-type{
grid-column: 1;
}
&:last-of-type {
grid-column: 3;
}
}
}
.row_3 {
grid-row: 3;
div {
grid-column: 2;
&:first-of-type{
grid-column: 1;
}
&:last-of-type {
grid-column: 3;
}
}
}
}
}
@@ -5,49 +5,48 @@
.modal.processo-info {
width : 1808px;
height : 976px;
margin : 120px auto;
box-shadow: none;
position : relative;
header {
font-size: 22px;
color: #4b4b4b;
font-size : 22px;
color : #4b4b4b;
display : flex;
flex-flow : row nowrap;
justify-content: space-evenly;
align-items : center;
.tab-header {
padding: 10px 0px;
width : 70%;
display : flex;
align-items : center;
justify-content: space-evenly;
button {
padding: 0;
display: flex;
justify-content: flex-start;
margin-right: 10px;
width: 149px;
height: 48px;
border-radius: 2px;
box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.5);
background-image: linear-gradient(to bottom, #f1f1f1 0%, #bbbcbc 98%);
font-size: 14px;
font-weight: 500;
font-stretch: normal;
font-style: normal;
line-height: 1.15;
letter-spacing: normal;
color: #4b4b4b;
border : none;
border-radius : 2px;
background-image : linear-gradient(to bottom, #f1f1f1 0%, #bbbcbc 98%);
display : grid;
grid-template-columns: 48px 101px;
grid-template-rows : 48px;
img {
margin-right: 20px;
span {
margin : auto;
font-size: 13px;
color : #4b4b4b;
}
img {
margin: auto;
}
}
label {
width: 106px;
height: 32px;
label{
font-size: 32px;
font-weight: 600;
font-stretch: normal;
font-style: normal;
line-height: 1;
letter-spacing: normal;
text-align: right;
color: #545454;
}
}
@@ -6,6 +6,8 @@
@heightmeridian: 300px;
.modal.progr-preriscaldo-info {
margin-top: 200px;
height: 565px;
header {
padding-left: 31px;
@@ -23,7 +23,7 @@
background-color: #f40000;
margin: 2px;
border-radius: 4px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
@@ -12,6 +12,30 @@
width: 100vw;
height: 100vh;
.tab-header {
display: flex;
flex-flow: row;
align-items: stretch;
justify-content: flex-start;
margin-left: -23px;
button {
background: none;
border: 1px solid #bbbcbc;
padding: 0 38px;
border-bottom: none;
font-size: 20px;
background-color: #bbbcbc;
color: #002680;
&.active {
background-color: #fff;
font-weight: bold;
border-top: 2px solid #002680;
}
}
}
hr {
flex-shrink: 0;
background-color: #979797;
@@ -237,37 +261,11 @@
padding-left: 31px;
display: flex;
align-items: center;
font-size: 20px;
font-weight: bold;
color: darkblue;
}
}
.tab-header {
display: flex;
flex-flow: row;
align-items: stretch;
justify-content: flex-start;
button {
background: none;
border: 1px solid #bbbcbc;
padding: 0 38px;
border-bottom: none;
font-size: 20px;
background-color: #bbbcbc;
color: #002680;
&.active {
background-color: #fff;
font-weight: bold;
border-top: 2px solid #002680;
}
}
}
.modal.setup-info {
@@ -419,11 +417,11 @@ article {
width: 500px;
}
&.color_2{
&.color_2 {
background-color: #e5f3ff;
}
&.color_3{
&.color_3 {
background-color: #b3dbff;
}
File diff suppressed because it is too large Load Diff
@@ -25,9 +25,9 @@
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="2.08"
inkscape:cx="844.36256"
inkscape:cy="95.563833"
inkscape:zoom="0.52"
inkscape:cx="73.621074"
inkscape:cy="221.78177"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="false"
@@ -44,7 +44,7 @@
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
@@ -1500,67 +1500,5 @@
height="24.186996"
x="25.179001"
y="139.914" />
<rect
style="opacity:1;fill:#979797;fill-opacity:1;stroke:#b3b3b3;stroke-width:0;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect865"
width="86"
height="25"
x="1159.0815"
y="-206.39528" />
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:17.33333333px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr;text-anchor:start;fill:#ffffff;fill-opacity:0.97397766;stroke:none;stroke-width:0.99999994;"
x="1167.4969"
y="-187.75352"
id="text869"><tspan
sodipodi:role="line"
id="tspan4167">610 mm</tspan></text>
<rect
style="opacity:1;fill:#979797;fill-opacity:1;stroke:#b3b3b3;stroke-width:0;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect865-7"
width="86"
height="25"
x="1157.7295"
y="17.975136" />
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:17.33333333px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr;text-anchor:start;fill:#ffffff;fill-opacity:0.97397766;stroke:none;stroke-width:0.99999994;"
x="1166.1448"
y="36.61689"
id="text869-1"><tspan
sodipodi:role="line"
id="tspan4169">610 mm</tspan></text>
<rect
style="opacity:1;fill:#979797;fill-opacity:1;stroke:#b3b3b3;stroke-width:0;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect865-4"
width="97.53846"
height="25"
x="997.9389"
y="267.72534" />
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:17.33333397px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:0.97397766;stroke:none;stroke-width:0.99999994"
x="1006.3546"
y="286.36713"
id="text869-8"><tspan
sodipodi:role="line"
id="tspan4171"
x="1006.3546"
y="286.36713">1360 mm</tspan></text>
<rect
style="opacity:1;fill:#979797;fill-opacity:1;stroke:#b3b3b3;stroke-width:0;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect865-1"
width="134.07692"
height="25"
x="782.41119"
y="206.99022" />
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:17.33333333px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr;text-anchor:start;fill:#ffffff;fill-opacity:0.97397766;stroke:none;stroke-width:0.99999994;"
x="790.82654"
y="225.63197"
id="text869-5"><tspan
sodipodi:role="line"
id="tspan4173">&lt;= 1030 mm</tspan></text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 86 KiB

After

Width:  |  Height:  |  Size: 83 KiB

@@ -25,9 +25,9 @@
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.5"
inkscape:cx="-79.558604"
inkscape:cy="84.479602"
inkscape:zoom="1.4142136"
inkscape:cx="601.47538"
inkscape:cy="617.52047"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="false"
@@ -236,39 +236,5 @@
inkscape:transform-center-x="0.0055839671"
inkscape:transform-center-y="3.1811632"
transform="matrix(0.94139126,0.3373166,0.3373166,-0.94139126,390.09685,-690.78395)" />
<rect
style="opacity:1;fill:#979797;fill-opacity:1;stroke:#b3b3b3;stroke-width:0;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect865"
width="79.260559"
height="22.521017"
x="560.28442"
y="-492.82922" />
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:15.16533258px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr;text-anchor:start;fill:#ffffff;fill-opacity:0.97397766;stroke:none;stroke-width:0.87494218;"
x="580.72296"
y="-462.35043"
id="text869"
transform="scale(0.97125081,1.0296002)"><tspan
sodipodi:role="line"
id="tspan3048">1410 mm</tspan></text>
<rect
style="opacity:1;fill:#979797;fill-opacity:1;stroke:#b3b3b3;stroke-width:0;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect865-8"
width="79.260559"
height="22.521017"
x="575.86975"
y="260.2395" />
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:15.16533279px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:0.97397766;stroke:none;stroke-width:0.87494218"
x="611.16852"
y="269.06815"
id="text869-9"
transform="scale(0.97125079,1.0296002)"><tspan
sodipodi:role="line"
id="tspan3071"
x="611.16852"
y="269.06815">0 mm</tspan></text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 11 KiB

@@ -20,9 +20,9 @@
inkscape:window-maximized="1"
inkscape:window-y="-9"
inkscape:window-x="-9"
inkscape:cy="161.66741"
inkscape:cx="130.79682"
inkscape:zoom="8.2723087"
inkscape:cy="51.482576"
inkscape:cx="187.49592"
inkscape:zoom="2.9247028"
showgrid="false"
id="namedview907"
inkscape:window-height="1001"
@@ -323,11 +323,6 @@
id="path963"
d="M 156.931,209.46621 156.11454,0.72523508"
style="fill:#979797;fill-opacity:1;stroke:#979797;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
id="path965"
d="M 138.7719,177.76207 Z"
style="fill:none;stroke:#000000;stroke-width:0.26458299px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
inkscape:connector-curvature="0" />
<path
inkscape:connector-curvature="0"
id="path967"
@@ -546,41 +541,5 @@
id="path32784-3-24"
d="m 31.481836,185.27239 -1.99023,-3.6186 h 3.98046 z"
style="fill:#bbbcbc;fill-opacity:1;stroke:none;stroke-width:0.278897px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<rect
style="opacity:1;fill:#979797;fill-opacity:1;stroke:#b3b3b3;stroke-width:0;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect865"
width="23.260561"
height="6.021019"
x="122.85455"
y="14.358868" />
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.24800014px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:0.97397766;stroke:none;stroke-width:0.24507663"
x="121.8107"
y="19.180067"
id="text869"
transform="scale(1.0175879,0.98271609)"><tspan
sodipodi:role="line"
id="tspan2434"
x="121.8107"
y="19.180067">1059 mm</tspan></text>
<rect
style="opacity:1;fill:#979797;fill-opacity:1;stroke:#b3b3b3;stroke-width:0;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect865-8"
width="21.447283"
height="6.021019"
x="120.07418"
y="178.33969" />
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.24800014px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:0.97397766;stroke:none;stroke-width:0.24507663"
x="122.61649"
y="186.04497"
id="text869-2"
transform="scale(1.0175879,0.98271609)"><tspan
sodipodi:role="line"
id="tspan2432"
x="122.61649"
y="186.04497">0 mm</tspan></text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 21 KiB

@@ -26,8 +26,8 @@
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="2.13"
inkscape:cx="472.77738"
inkscape:cy="49.172206"
inkscape:cx="379.58489"
inkscape:cy="837.9046"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="false"
@@ -244,40 +244,5 @@
inkscape:transform-center-y="-0.48678734"
transform="matrix(0.92838376,0,0,-1.0738472,15.707629,417.51225)"
inkscape:transform-center-x="-2.0583999e-06" />
<rect
style="opacity:1;fill:#979797;fill-opacity:1;stroke:#b3b3b3;stroke-width:0;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect865"
width="22.754166"
height="6.6145835"
x="126.58702"
y="93.443863" />
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.58611107px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:0.97397768;stroke:none;stroke-width:0.26458332;"
x="128.81358"
y="98.37616"
id="text869"><tspan
sodipodi:role="line"
id="tspan867"
x="128.81358"
y="98.37616"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.58611107px;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;stroke-width:0.26458332;fill:#ffffff;fill-opacity:0.97397768;">810 mm</tspan></text>
<rect
style="opacity:1;fill:#979797;fill-opacity:1;stroke:#b3b3b3;stroke-width:0;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="rect865-3"
width="22.754168"
height="6.6145835"
x="129.36137"
y="286.06741" />
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.58611107px;line-height:1.25;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:0.97397766;stroke:none;stroke-width:0.26458332"
x="133.70467"
y="290.99969"
id="text869-8"><tspan
sodipodi:role="line"
id="tspan892"
x="133.70467"
y="290.99969">0 mm</tspan></text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 11 KiB

+19
View File
@@ -0,0 +1,19 @@
declare module Prod{
interface IProd{
numTarget: number;
numDone: number;
timeWarm: number;
timeVent: number;
timeVacuum: number;
timeCycleGross: number;
timeCycleNet: number;
materialTempEndWarm: number;
materialTempEndVent: number;
moldTemp: number;
vacuumReadVal: number;
mouldEnergyOUT: number;
mouldEnergyIN: number;
}
}
+5
View File
@@ -21,6 +21,7 @@ import moment from "moment";
import Component from "vue-class-component";
import { Watch } from "vue-property-decorator";
import { UsersService } from "./services/usersService";
import { KeyboardHelper } from "./app_modules_thermo/components/KeyboardHelper";
declare var cmsClient;
@@ -170,6 +171,10 @@ export default class app extends Vue {
return this.$store.state.isShowPreDashboard;
}
onmousedown() {
KeyboardHelper.hideKeyboard();
}
@Watch("isMainViewLiftedUp")
isMainViewLiftedUpChanged() {
if (this.state.isMainViewLiftedUp) {
+1 -1
View File
@@ -1,5 +1,5 @@
<template>
<div class="container">
<div class="container" @mousedown="onmousedown">
<div id="app">
<app-header :class="{'blur':applyBlur}"></app-header>
<dashboard v-if="statusDashboard"></dashboard>
@@ -1,5 +1,10 @@
<template>
<div class="keyboard" v-if="visible" :style="{top: `${positionY}px`, left: `${positionX}px`}">
<div
class="keyboard"
v-if="visible"
:style="{top: `${positionY}px`, left: `${positionX}px`}"
@mousedown.prevent.stop
>
<div class="mask">
<button class="b7" @click="add('7')">
<label class="lab">7</label>
@@ -27,7 +27,10 @@ export default class Numeric extends Vue {
@Prop({ default: 'right' })
keyboardPosition: string;
focused: boolean = false;
onFocus() {
if (this.value && this.value.status && !this.value.status.enabled) return;
let rect = this.$el.getBoundingClientRect();
const keyboardsize = 262;
@@ -43,10 +46,17 @@ export default class Numeric extends Vue {
}
KeyboardHelper.showKeyboard(x, y, this.value);
let textBox = (this.$refs.input as any);
textBox.SelectionStart = textBox.Text.Length;
textBox.SelectionLength = 0;
this.$nextTick(() => { this.focused = true; })
}
onBlur() {
// KeyboardHelper.hideKeyboard();
this.$nextTick(() => { this.focused = false; })
}
}
@@ -1,6 +1,17 @@
<template>
<div class="numeric">
<input type="number" v-model.number="value.setpointHMI" @focus="onFocus" @blur="onBlur" :id="id" />
<div
class="numeric"
:class="{'disabled': value.status && !value.status.enabled, 'focused': focused, 'error': value.status && value.status.hasError}"
>
<input
type="number"
ref="input"
v-model.number="value.setpointHMI"
@focus="onFocus"
@blur="onBlur"
:id="id"
:disabled="value.status && !value.status.enabled"
/>
<span v-if="value.unitMeasure">{{unitMeasure}}</span>
</div>
</template>
@@ -5,14 +5,22 @@ import { paddleActions } from '@/store/paddle.store';
@Component({ name: 'sidebar' })
export default class Sidebar extends Vue {
azione1: boolean = false;
azione2: boolean = false;
show:string="tutti";
isPanelOpen() {
return this.$store.state.paddle.isNavOpen;
}
closeSidebarPanel() {
paddleActions.Toggle(this.$store);
get action1() {
return this.$store.state.paddle.action1;
}
get action2() {
return this.$store.state.paddle.action2;
}
ConfigPressed(action: string) {
paddleActions.ToggleAction(this.$store,action);
}
}
@@ -1,80 +1,124 @@
<template>
<div class="sidebar">
<div class="sidebar-backdrop" @click="closeSidebarPanel()" v-if="isPanelOpen()"></div>
<!-- <transition name="slide"> -->
<transition>
<div v-if="isPanelOpen()" class="sidebar-panel">
<div class="sidebar">
<!-- <transition> -->
<div v-if="isPanelOpen()" class="sidebar-panel" :class="{ 'active' : action1||action2 }">
<div class="head-sidebar">
<label>Pulsanti personalizzati</label>
</div>
<div class="text-head-sidebar">
<label>Pulsanti personalizzati</label>
</div>
<section @click="ConfigPressed('action1')">
<div class="sidebar-panel-nav">
<div>
<img src="assets/icons/svg/paddle-riscaldo.svg" />
<label>Estensione riscaldo 20 secondi</label>
<i class="fa fa-cog"></i>
</div>
</div>
<div class="sidebar-panel-nav" @click="ConfigPressed('action2')">
<div>
<img src="assets/icons/svg/paddle-altra-funzione.svg" />
<label>Altra funzione tasto fisico della tastiera</label>
<i class="fa fa-cog"></i>
</div>
</div>
</section>
<div class="box-sidebar-panel">
<div class="sidebar-panel-nav">
<div class="text-box-paddle">
<img src="assets/icons/svg/paddle-riscaldo.svg" />
<label>Estensione riscaldo 20 secondi</label>
<i class="fa fa-cog gear-box-paddle"></i>
</div>
</div>
<div class="sidebar-panel-nav">
<div class="text-box-paddle">
<img src="assets/icons/svg/paddle-altra-funzione.svg" />
<label>Altra funzione tasto fisico della tastiera</label>
<i class="fa fa-cog gear-box-paddle"></i>
</div>
</div>
</div>
<div class="head-sidebar">
<label>Soft keys</label>
</div>
<div class="text-head-sidebar">
<label>Soft keys</label>
</div>
<div class="box-sidebar-panel">
<div class="sidebar-panel-nav">
<div class="text-box-paddle text-soft">
<label>Nome azione soft key</label>
</div>
</div>
<div class="sidebar-panel-nav">
<div class="text-box-paddle text-soft">
<label>Nome azione soft key</label>
</div>
</div>
<div class="sidebar-panel-nav">
<div class="text-box-paddle text-soft">
<label>Nome azione soft key</label>
</div>
</div>
<div class="sidebar-panel-nav">
<div class="text-box-paddle text-soft">
<label>Estensione riscaldo 20 secondi</label>
</div>
</div>
<div class="sidebar-panel-nav">
<div class="text-box-paddle text-soft">
<toggle-button v-model="azione1"></toggle-button>
<label>Nome azione soft key</label>
</div>
</div>
<div class="sidebar-panel-nav">
<div class="text-box-paddle text-soft">
<toggle-button v-model="azione2"></toggle-button>
<label>Nome azione soft key</label>
</div>
</div>
<div class="sidebar-panel-nav">
<div class="text-box-paddle text-soft">
<label>Nome azione soft key</label>
</div>
</div>
</div>
<!-- <i class="fa fa-cog gear-sidebar-paddle"></i> -->
</div>
</transition>
<section>
<div class="sidebar-panel-nav">
<div>
<label>Nome azione soft key</label>
</div>
</div>
<div class="sidebar-panel-nav">
<div>
<label>Nome azione soft key</label>
</div>
</div>
<div class="sidebar-panel-nav">
<div>
<label>Nome azione soft key</label>
</div>
</div>
<div class="sidebar-panel-nav">
<div>
<label>Estensione riscaldo 20 secondi</label>
</div>
</div>
<div class="sidebar-panel-nav">
<div>
<toggle-button></toggle-button>
<label>Nome azione soft key</label>
</div>
</div>
<div class="sidebar-panel-nav">
<div>
<toggle-button></toggle-button>
<label>Nome azione soft key</label>
</div>
</div>
<div class="sidebar-panel-nav">
<div>
<label>Nome azione soft key</label>
</div>
</div>
</section>
</div>
<div v-if="(action1||action2) && isPanelOpen()" class="sidebar-panel">
<div class="head-sidebar">
<button :class="{'selected':show=='tutti'}" @click="show='tutti'">Tutti</button>
<button :class="{'selected':show=='one'}" @click="show='one'">Gruppo 1</button>
<button :class="{'selected':show=='two'}" @click="show='two'">Gruppo 2</button>
<button :class="{'selected':show=='three'}" @click="show='three'">Gruppo 3</button>
</div>
<aside class="scrollable auto">
<section>
<div class="sidebar-panel-nav">
<div>
<label>Nome azione soft key</label>
</div>
</div>
<div class="sidebar-panel-nav">
<div>
<label>Nome azione soft key</label>
</div>
</div>
<div class="sidebar-panel-nav">
<div>
<label>Nome azione soft key</label>
</div>
</div>
<div class="sidebar-panel-nav">
<div>
<label>Estensione riscaldo 20 secondi</label>
</div>
</div>
<div class="sidebar-panel-nav">
<div>
<toggle-button></toggle-button>
<label>Nome azione soft key</label>
</div>
</div>
<div class="sidebar-panel-nav">
<div>
<toggle-button></toggle-button>
<label>Nome azione soft key</label>
</div>
</div>
<div class="sidebar-panel-nav">
<div>
<label>Nome azione soft key</label>
</div>
</div>
</section>
</aside>
</div>
<!-- </transition> -->
</div>
</template>
<script lang="ts" src="./sidebar.ts" />
@@ -9,6 +9,14 @@ export default class SwitchButton extends Vue{
return this.$store.state.paddle.isNavOpen;
}
get action1(){
return this.$store.state.paddle.action1;
}
get action2(){
return this.$store.state.paddle.action2;
}
togglePaddle() {
paddleActions.Toggle(this.$store);
}
@@ -1,5 +1,5 @@
<template>
<div :class="{ 'active' : isSwitchActive() }" @click="togglePaddle()">
<div :class="{ 'active' : isSwitchActive() , 'active_second_card' : action1 || action2}" @click="togglePaddle()">
<slot>
<button title="Menu">
<div>
@@ -1,18 +1,22 @@
<template>
<div class="box scheda">
<div class="body">
<div class="input-area">
<label>Portata</label>
<numeric v-model="portata" />
</div>
<slider v-model="portata"></slider>
<div class="input-area">
<label>Durata</label>
<numeric v-model="durata" />
</div>
<slider v-model="durata"></slider>
</div>
</div>
<div class="box scheda">
<div class="body">
<template v-if="portata.status.visible">
<div class="input-area">
<label>Portata</label>
<numeric v-model="portata" />
</div>
<slider v-model="portata"></slider>
</template>
<template v-if="durata.status.visible">
<div class="input-area">
<label>Durata</label>
<numeric v-model="durata" />
</div>
<slider v-model="durata"></slider>
</template>
</div>
</div>
</template>
<script lang="ts" src="./scheda.ts"></script>
@@ -32,6 +32,8 @@ export default class Slider extends Vue {
};
increment() {
if (!this.value.status.enabled) return;
var v = this.value.setpointHMI;
if (v < this.value.range.max) {
v -= (-this.step);
@@ -43,6 +45,8 @@ export default class Slider extends Vue {
};
decrement() {
if (!this.value.status.enabled) return;
var v = this.value.setpointHMI;
if (v > this.value.range.min) {
v -= this.step;
@@ -5,6 +5,7 @@
</button>
<div class="control">
<input
:disabled="!this.value.status.enabled"
:min="this.value.range.min"
:max="this.value.range.max"
v-model.number="actualvalue"
@@ -12,26 +12,38 @@ export default class SVGChart extends Vue {
@Prop({ default: [] })
bars: svg.BarChartInfo[];
@Prop()
unitx: string;
@Prop()
unity: string;
@Prop({ default: null })
maxX: number;
@Prop({ default: null })
maxY: number;
step: number = 50;
startXOf(barindex: number) {
return this.bars.slice(0, barindex).reduce((p, c) => c.width + p, 0);
}
get maxX() {
return Math.max(this.bars.reduce((p, c) => c.width + p, 0), 1);
get MaxX() {
return this.maxX || Math.max(this.bars.reduce((p, c) => c.width + p, 0), 1);
}
get maxY() {
return Math.max(...this.bars.map(i => i.height), 1);
get MaxY() {
return this.maxY || Math.max(...this.bars.map(i => i.height), 1);
}
scaleX(value: number) {
return value * 1000 / this.maxX;
return value * 1000 / this.MaxX;
}
scaleY(value: number) {
return value * 1000 / this.maxY;
return value * 1000 / this.MaxY;
}
}
@@ -1,20 +1,81 @@
<template>
<div class="chart">
<svg :viewBox="`-1 -1 ${scaleX(maxX) * 1.2} ${scaleY(maxY) * 1.2}`">
<svg :viewBox="`${-2*step} ${-step} ${scaleX(MaxX) *1.2 + step} ${scaleY(MaxY) * 1.2}`">
<!-- posizione degli assi a 0,0 -->
<foreignObject x="-30" :y="scaleY(MaxY)*1.06" width="30" height="30">
<label>0</label>
</foreignObject>
<!-- asse delle ascisse -->
<g>
<line
v-for="idx in 10"
:key="`x-${idx}`"
:y1="scaleY(MaxY) * 1.1 - step"
:y2="scaleY(MaxY) * 1.1 - step/2"
:x1="scaleX(MaxX / 10 *idx)"
:x2="scaleX(MaxX / 10 *idx)"
:stroke="lineBarColor"
/>
<foreignObject
v-for="idx in 10"
:key="`lx-${idx}`"
:y="scaleY(MaxY) + step + 20"
:x="scaleX(MaxX / 10 *idx) - step/2"
:width="step"
:height="step"
>
<label class="x">{{MaxX / 10 *idx | round(2)}}</label>
</foreignObject>
<foreignObject
:x="scaleX(MaxX) + step"
:y="scaleY(MaxY) + step + 20"
:width="step"
:height="step"
>
<label class="x">{{unitx}}</label>
</foreignObject>
</g>
<!-- asse delle ordinate -->
<g>
<line
v-for="idx in 10"
:key="`y-${idx}`"
:y1="scaleY(MaxY/ 10 * idx) - step"
:y2="scaleY(MaxY/ 10 * idx) - step"
:x1="0"
:x2="- step"
:stroke="lineBarColor"
/>
<foreignObject
v-for="idx in 10"
:key="`ly-${idx}`"
:y="scaleY(MaxY/ 10 * (idx-1))"
:x="- step*1.2"
:width="step"
:height="step"
>
<label class="y">{{MaxY - MaxY/ 10 * (idx-1) | round(2)}}</label>
</foreignObject>
<foreignObject :x="- step*1.2" :y="-step/2" width="50" height="30">
<label class="y">{{unity}}</label>
</foreignObject>
</g>
<g>
<line
:x1="-step"
:y1="scaleY(maxY) * 1.1 - step"
:y2="scaleY(maxY) * 1.1 - step"
:x2="scaleX(maxX) * 1.1"
:y1="scaleY(MaxY) + step"
:y2="scaleY(MaxY) + step"
:x2="scaleX(MaxX) * 1.1"
:stroke="lineBarColor"
/>
<line x1="0" :y1="-step" x2="0" :y2="scaleY(maxY) * 1.1" :stroke="lineBarColor" />
<line x1="0" :y1="-step" x2="0" :y2="scaleY(MaxY) * 1.1" :stroke="lineBarColor" />
</g>
<rect
v-for="(b, idx) in bars"
:key="idx"
:y="scaleY(maxY) * 1.1 - step - scaleY(b.height)"
:y="scaleY(MaxY) + step - scaleY(b.height)"
:x="scaleX(startXOf(idx))"
:width="scaleX(b.width)"
:height="scaleY(b.height)"
@@ -33,5 +94,19 @@
width: 100%;
height: 100%;
}
.chart label {
font-size: 18px;
text-align: center;
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.chart label.y {
justify-content: flex-end;
}
</style>
<script src="./svgChart.ts" lang="ts"></script>
@@ -0,0 +1,15 @@
import Vue from "vue";
import Component from "vue-class-component";
@Component({})
export default class Clock extends Vue {
today: Date = new Date();
mounted() {
let $this = this;
setInterval(() => {
$this.today = new Date();
}, 1000)
}
}
@@ -0,0 +1,43 @@
<template>
<div class="clock">
<div class="day">
<span>{{today | date('dddd DD')}}</span>
<span>{{today | date('MMMM')}}</span>
</div>
<time>{{today | date('HH:mm:ss')}}</time>
</div>
</template>
<style scoped>
.clock {
display: grid;
/* grid-template-columns: 1fr 1fr; */
grid-template-columns: 500px 500px;
grid-column-gap: 1rem;
width: fit-content;
}
.day {
display: flex;
flex-flow: column;
align-items: flex-end;
justify-content: center;
height: 100%;
font-family: "Work Sans";
font-size: 47px;
font-weight: 500;
line-height: 1.01;
padding-right: 1rem;
}
time {
padding-left: 1rem;
display: flex;
flex-flow: column;
font-family: "Work Sans";
align-items: flex-start;
justify-content: center;
font-size: 120px;
font-weight: 300;
}
</style>
<script src="./clock.ts"></script>
@@ -1,10 +0,0 @@
import Vue from 'vue';
import Component from 'vue-class-component';
import {Prop} from 'vue-property-decorator';
@Component({})
export default class Componente extends Vue{
submenù:boolean=false;
}
@@ -1,79 +0,0 @@
<template>
<div class="component-info">
<div class="component">
<div>
<label>(num)</label>
<div class="specific">
<label>TEMPO RISCALDO</label>
<label>1'12''</label>
</div>
<div class="specific">
<label>VUOTO</label>
<label>-0.88 bar</label>
</div>
<div class="specific">
<label>TEMPO CICLO NETTO</label>
<label>2'51''</label>
</div>
<button @click="submenù=!submenù"></button>
</div>
<span></span>
</div>
<section v-if="submenù">
<section>
<div class="component">
<div>
<button>
<img src="assets/icons/png/bt.png" />
</button>
<div class="specific">
<label>TEMPO VENTILAZIONE</label>
<label>1'12''</label>
</div>
<div class="specific">
<label>TEMPO CICLO LORDO</label>
<label>2'51''</label>
</div>
</div>
<span></span>
</div>
<div class="component">
<div>
<div class="specific">
<label>TEMPERATURA STAMPO</label>
<label>270°C</label>
</div>
<div class="specific">
<label>T. MATERIALE FINE RISCALDO</label>
<label>295°C</label>
</div>
<div class="specific">
<label>T. MATERIALE FINE VENTILAZIONE</label>
<label>48°C</label>
</div>
</div>
<span></span>
</div>
<div class="component">
<div>
<div class="specific">
<label>TEMPO VUOTO</label>
<label>16''</label>
</div>
<div class="specific">
<label>ENERGIA UTILIZZATA IN</label>
<label>2,3kW</label>
</div>
<div class="specific">
<label>ENERGIA UTILIZZATA OUT</label>
<label>2,1kW</label>
</div>
</div>
<span></span>
</div>
</section>
</section>
</div>
</template>
<script lang="ts" src="./componente.ts"></script>
@@ -0,0 +1,36 @@
import Vue from "vue";
import Component from "vue-class-component";
import Gauge from "svg-gauge";
@Component({})
export default class MainGauge extends Vue {
gauge1: any = null;
gauge2: any = null;
mounted() {
this.gauge1 = Gauge(
this.$refs.gauge1, {
max: 100,
dialStartAngle: -90,
dialEndAngle: -90.001,
value: 30,
showValue: false,
viewBox: [8, 8, 84, 84]
}
);
this.gauge2 = Gauge(
this.$refs.gauge2, {
max: 100,
dialStartAngle: -90,
dialEndAngle: -90.001,
value: 70,
showValue: false,
viewBox: [6, 6, 88, 88]
}
);
}
}

Some files were not shown because too many files have changed in this diff Show More