diff --git a/Client/Program.cs b/Client/Program.cs index 16bb15bc..e45eb79b 100644 --- a/Client/Program.cs +++ b/Client/Program.cs @@ -209,7 +209,7 @@ namespace CMS_Client #region ALARM_METHODS //Method Used to Show an alarm and close the application - private static void ShowAlarmAndClose(string Message) + public static void ShowAlarmAndClose(string Message) { MessageBox.Show(Message, Application.ProductName, diff --git a/Client/View/MainForm.cs b/Client/View/MainForm.cs index b928d794..a5b1ae48 100644 --- a/Client/View/MainForm.cs +++ b/Client/View/MainForm.cs @@ -119,7 +119,7 @@ namespace CMS_Client.View } else { - if (Config.VendorHmiConfig.Enabled) + if (Config.VendorHmiConfig.Enabled && NcFrm != null) NcFrm.Show(); if (NcWindow.State == NcState.SHOW) @@ -434,6 +434,14 @@ namespace CMS_Client.View private void ShowWindow() { + if(Config.ClientConfig.DeveloperMode && Width < 1920 && Height < 1080) + { + double ratio = (((double)Width) / 1920.0) * 100.0; + //Funzione sperimentale presa da Forum CEF + double delta = 5.46149645 * Math.Log(ratio) - 25.12; + Browser.BrowserHost.ZoomLevel = delta; + } + //Invoke method if is needed or call the method in STD mode if (!IsDisposed) { @@ -583,7 +591,7 @@ namespace CMS_Client.View //Hide NC Method public void HideNCWindow() { - if (!Config.VendorHmiConfig.Enabled) + if (!Config.VendorHmiConfig.Enabled || NcFrm==null) return; //Invoke method if is needed or call the method in STD mode @@ -617,13 +625,55 @@ namespace CMS_Client.View private void CalcWindowPosition() { //Position of the Window + Screen ps = Screen.AllScreens.FirstOrDefault(S => S.Primary == true); + if (Screen.AllScreens.Length > 1 && Config.ClientConfig.RunningOnSecondaryScreen) { - Screen ps = Screen.AllScreens.FirstOrDefault(S => S.Primary == true); Screen ss = Screen.AllScreens.FirstOrDefault(S => S.Primary == false); X = ps.Bounds.Width; if (ss.Bounds.Top != 0) Y = ss.Bounds.Top; + + //Set the Secondary screen Size + if (Config.ClientConfig.DeveloperMode) + { + if (ss.Bounds.Width < 1920 && ss.Bounds.Height < 1080) + { + this.Width = ss.Bounds.Width; + this.Height = ss.Bounds.Height; + } + } + else + { + if (ss.Bounds.Width != 1920 && ss.Bounds.Height != 1080) + { + HideLoadingWindow(); + NcWindow.CloseNcWindow(false); + Program.ShowAlarmAndClose("Screen resolution " + ss.Bounds.Width + "x" + ss.Bounds.Height + " is not supported"); + } + } + } + else + { + if (Config.ClientConfig.DeveloperMode) + { + //Set the Prymary screen Size + if (ps.Bounds.Width < 1920 && ps.Bounds.Height < 1080) + { + this.Width = ps.Bounds.Width; + this.Height = ps.Bounds.Height; + } + + } + else + { + if (ps.Bounds.Width != 1920 && ps.Bounds.Height != 1080) + { + HideLoadingWindow(); + NcWindow.CloseNcWindow(false); + Program.ShowAlarmAndClose("Screen resolution " + ps.Bounds.Width + "x" + ps.Bounds.Height + " is not supported"); + } + } } } @@ -659,7 +709,6 @@ namespace CMS_Client.View } } - #endregion } } diff --git a/Step.Config/Config/serverConfig.xml b/Step.Config/Config/serverConfig.xml index cd704e2a..4bbb0610 100644 --- a/Step.Config/Config/serverConfig.xml +++ b/Step.Config/Config/serverConfig.xml @@ -12,6 +12,7 @@ 9000 * + 1 en true localhost diff --git a/Step.Config/Config/serverConfigValidator.xsd b/Step.Config/Config/serverConfigValidator.xsd index fd012ffa..6987c1e6 100644 --- a/Step.Config/Config/serverConfigValidator.xsd +++ b/Step.Config/Config/serverConfigValidator.xsd @@ -9,7 +9,7 @@ - + @@ -22,6 +22,7 @@ + diff --git a/Step.Config/ServerConfigController.cs b/Step.Config/ServerConfigController.cs index 651f5480..f1ffb3e8 100644 --- a/Step.Config/ServerConfigController.cs +++ b/Step.Config/ServerConfigController.cs @@ -200,6 +200,7 @@ namespace Step.Config Language = CultureInfo.CreateSpecificCulture(x.Element("language").Value), ServerAddress = x.Element("serverAddress").Value, ServerPort = Convert.ToInt32(x.Element("serverPort").Value), + NetworkCardId = Convert.ToInt32(x.Element("networkCardId").Value), EnableDirectoryBrowsing = Convert.ToBoolean(x.Element("enableDirectoryBrowsing").Value), DatabaseAddress = x.Element("databaseAddress").Value, AutoOpenCmsClient = Convert.ToBoolean(x.Element("autoOpenCmsClient").Value) diff --git a/Step.Core/ThreadsFunctions.cs b/Step.Core/ThreadsFunctions.cs index 21c7ac43..b7788957 100644 --- a/Step.Core/ThreadsFunctions.cs +++ b/Step.Core/ThreadsFunctions.cs @@ -1,9 +1,12 @@ using CMS_CORE_Library.Models; +using Step.Config; using Step.Core; using Step.Model.DTOModels; using Step.Model.DTOModels.AlarmModels; using Step.Model.DTOModels.ToolModels; using Step.NC; +using Step.Utils; +using System; using System.Collections.Generic; using System.Diagnostics; using System.Threading; @@ -715,6 +718,58 @@ public static class ThreadsFunctions } } + public static void MonitorPanelPCResources() + { + float SumRec, SumSen; + Stopwatch sw = new Stopwatch(); + DTONetworkMonitor Monitor = new DTONetworkMonitor(); + int CardId = ServerConfig.ServerStartupConfig.NetworkCardId - 1; + + PerformanceCounterCategory performanceCounterCategory = new PerformanceCounterCategory("Network Interface"); + + if(CardId<0 || CardId > performanceCounterCategory.GetInstanceNames().Length ) + { + Monitor.Name = "No card to monitor"; + MessageServices.Current.Publish(NETWORK_USAGE, null, Monitor); + return; + } + + Monitor.Name = performanceCounterCategory.GetInstanceNames()[0]; + + + PerformanceCounter PC_Bandwith = new PerformanceCounter("Network Interface", "Current Bandwidth", Monitor.Name); + PerformanceCounter PC_RecievedBytes = new PerformanceCounter("Network Interface", "Bytes Received/sec", Monitor.Name); + PerformanceCounter PC_SentBytes = new PerformanceCounter("Network Interface", "Bytes Sent/sec", Monitor.Name); + + Monitor.Bandwidth = PC_Bandwith.NextValue(); + + try + { + while (true) + { + sw.Restart(); + + SumRec = 0; + SumSen = 0; + for (int index = 0; index < 50; index++) + { + SumRec += PC_RecievedBytes.NextValue(); + SumSen += PC_SentBytes.NextValue(); + } + Monitor.Value = Math.Round(((8 * (SumSen + SumRec)) / (Monitor.Bandwidth * 50) * 100), 2) ; + MessageServices.Current.Publish(NETWORK_USAGE, null, Monitor); + sw.Stop(); + + // Wait + Thread.Sleep(CalcSleepTime(2000, (int)sw.ElapsedMilliseconds)); + } + } + catch (ThreadAbortException) + { + ExceptionManager.Manage(ERROR_LEVEL.FATAL, "Fatal error in Network Performance monitor Thread"); + } + } + #endregion Functions #region SupportFunctions diff --git a/Step.Core/ThreadsHandler.cs b/Step.Core/ThreadsHandler.cs index 37c160b6..eac72e27 100644 --- a/Step.Core/ThreadsHandler.cs +++ b/Step.Core/ThreadsHandler.cs @@ -34,6 +34,11 @@ namespace Step.Core public static void Start() { ThreadsFunctions.RestoreConnection(); + + //Start THread Network monitor + Action Monitor = new Action(ThreadsFunctions.MonitorPanelPCResources); + Thread t = new Thread(() => Monitor()); + t.Start(); } public static void StartWorkers() diff --git a/Step.Model/ConfigModels/ServerConfigModel.cs b/Step.Model/ConfigModels/ServerConfigModel.cs index e73db1d6..d4d29253 100644 --- a/Step.Model/ConfigModels/ServerConfigModel.cs +++ b/Step.Model/ConfigModels/ServerConfigModel.cs @@ -12,6 +12,7 @@ namespace Step.Model.ConfigModels public CultureInfo Language { get; set; } public int ServerPort { get; set; } public string ServerAddress { get; set; } + public int NetworkCardId { get; set; } public bool EnableDirectoryBrowsing { get; set; } public string DatabaseAddress { get; set; } public bool AutoOpenCmsClient { get; set; } diff --git a/Step.Model/Constants.cs b/Step.Model/Constants.cs index 94d630dd..24c31268 100644 --- a/Step.Model/Constants.cs +++ b/Step.Model/Constants.cs @@ -186,6 +186,7 @@ namespace Step.Model public const string NC_MAGAZINE_IS_ACTIVE = "UPDATE_NC_MAGAZINE_STATUS"; public const string SEND_QUEUE_DATA = "SEND_QUEUE_DATA"; public const string SEND_M155_DATA = "SEND_M155_DATA"; + public const string NETWORK_USAGE = "NETWORK_USAGE"; public const string BROADCAST_DATA = "BROADCAST_DATA"; diff --git a/Step.Model/DTOModels/DTONetworkMonitor.cs b/Step.Model/DTOModels/DTONetworkMonitor.cs new file mode 100644 index 00000000..75cab397 --- /dev/null +++ b/Step.Model/DTOModels/DTONetworkMonitor.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Step.Model.DTOModels +{ + public class DTONetworkMonitor + { + public String Name; + public Double Bandwidth; + public Double Value; + } +} diff --git a/Step.Model/DTOModels/MaintenanceModels/DTOMaintenanceModel.cs b/Step.Model/DTOModels/MaintenanceModels/DTOMaintenanceModel.cs index a3df2284..d7a47c8a 100644 --- a/Step.Model/DTOModels/MaintenanceModels/DTOMaintenanceModel.cs +++ b/Step.Model/DTOModels/MaintenanceModels/DTOMaintenanceModel.cs @@ -38,6 +38,6 @@ namespace Step.Model.DTOModels.MaintenanceModels public bool CanPerform { get; set; } - public DTOMessageUserModel User { get; set; } + public DTOMessageUserModel Maintainer { get; set; } } } \ No newline at end of file diff --git a/Step.Model/Step.Model.csproj b/Step.Model/Step.Model.csproj index ebe40577..0c398be5 100644 --- a/Step.Model/Step.Model.csproj +++ b/Step.Model/Step.Model.csproj @@ -1,167 +1,168 @@ - - - - - Debug - AnyCPU - {631375DD-06D3-49BB-8130-D9DDB34C429D} - Library - Properties - Step.Model - Step.Model - v4.6.2 - 512 - Latest - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - false - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - ..\Libs\CMS_CORE_Library.dll - - - ..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll - - - ..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll - - - ..\packages\Microsoft.AspNet.Identity.Core.2.2.1\lib\net45\Microsoft.AspNet.Identity.Core.dll - - - ..\packages\Microsoft.AspNet.Identity.EntityFramework.2.2.1\lib\net45\Microsoft.AspNet.Identity.EntityFramework.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - DtsGenerator - RoleModel.cs.d.ts - - - - - - - - - - - - - - - - - - - - - - - DtsGenerator - DTOLanguageModel.cs.d.ts - - - - - - - - - - - - - - - - - - - - - - - - - - - - DtsGenerator - UserModel.cs.d.ts - - - - - - True - True - DTOLanguageModel.cs - - - - - - - - - - - + + + + + Debug + AnyCPU + {631375DD-06D3-49BB-8130-D9DDB34C429D} + Library + Properties + Step.Model + Step.Model + v4.6.2 + 512 + Latest + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + false + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\Libs\CMS_CORE_Library.dll + + + ..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll + + + ..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll + + + ..\packages\Microsoft.AspNet.Identity.Core.2.2.1\lib\net45\Microsoft.AspNet.Identity.Core.dll + + + ..\packages\Microsoft.AspNet.Identity.EntityFramework.2.2.1\lib\net45\Microsoft.AspNet.Identity.EntityFramework.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + DtsGenerator + RoleModel.cs.d.ts + + + + + + + + + + + + + + + + + + + + + + + + DtsGenerator + DTOLanguageModel.cs.d.ts + + + + + + + + + + + + + + + + + + + + + + + + + + + + DtsGenerator + UserModel.cs.d.ts + + + + + + True + True + DTOLanguageModel.cs + + + + + + + + + + + \ No newline at end of file diff --git a/Step.NC/NcHandler.cs b/Step.NC/NcHandler.cs index 534bf903..443d6c61 100644 --- a/Step.NC/NcHandler.cs +++ b/Step.NC/NcHandler.cs @@ -99,7 +99,7 @@ namespace Step.NC { if (NcConfig.NcVendor != NC_VENDOR.SIEMENS) { - // TODO Manare + // TODO Fix in the future return File.Exists(path); } else @@ -1063,7 +1063,7 @@ namespace Step.NC CreatedByCms = currMaintenance.UserId == null, CanEdit = canEdit, CanPerform = canPerform, - User = performed?.Maintainer == null ? null : (DTOMessageUserModel)performed.Maintainer + Maintainer = performed?.Maintainer == null ? null : (DTOMessageUserModel)performed.Maintainer }); } } @@ -1463,7 +1463,7 @@ namespace Step.NC if (cmsError.IsError()) return cmsError; - if (NcConfig.NcVendor != NC_VENDOR.SIEMENS) + if (NcConfig.NcVendor != NC_VENDOR.SIEMENS && NcConfig.NcVendor != NC_VENDOR.DEMO) { config.FamilyOptionActive = true; config.MultitoolOptionActive = true; diff --git a/Step.UI/ServerControlWindow.Designer.cs b/Step.UI/ServerControlWindow.Designer.cs index 682e4bc7..d53df862 100644 --- a/Step.UI/ServerControlWindow.Designer.cs +++ b/Step.UI/ServerControlWindow.Designer.cs @@ -46,9 +46,17 @@ namespace Step.UI this.TXTType = new System.Windows.Forms.Label(); this.CHNcConnected = new MetroFramework.Controls.MetroCheckBox(); this.label1 = new System.Windows.Forms.Label(); + this.labelNetworkName = new System.Windows.Forms.Label(); + this.metroPanel1 = new MetroFramework.Controls.MetroPanel(); + this.label3 = new System.Windows.Forms.Label(); + this.labelNetworkSpeed = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.labelNetworkBand = new System.Windows.Forms.Label(); this.NotifyIconMenu.SuspendLayout(); this.metroTabControl1.SuspendLayout(); this.ThreadsInfo.SuspendLayout(); + this.metroPanel1.SuspendLayout(); this.SuspendLayout(); // // StepNotifyIcon @@ -78,7 +86,7 @@ namespace Step.UI // openUiButton // this.openUiButton.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.openUiButton.Location = new System.Drawing.Point(8, 371); + this.openUiButton.Location = new System.Drawing.Point(11, 477); this.openUiButton.Name = "openUiButton"; this.openUiButton.Size = new System.Drawing.Size(151, 42); this.openUiButton.TabIndex = 1; @@ -130,7 +138,7 @@ namespace Step.UI this.LISTThreadStatus.OwnerDraw = true; this.LISTThreadStatus.Scrollable = false; this.LISTThreadStatus.ShowGroups = false; - this.LISTThreadStatus.Size = new System.Drawing.Size(328, 275); + this.LISTThreadStatus.Size = new System.Drawing.Size(331, 275); this.LISTThreadStatus.TabIndex = 2; this.LISTThreadStatus.UseCompatibleStateImageBehavior = false; this.LISTThreadStatus.UseSelectable = true; @@ -151,7 +159,7 @@ namespace Step.UI // stopServerButton // this.stopServerButton.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.stopServerButton.Location = new System.Drawing.Point(185, 371); + this.stopServerButton.Location = new System.Drawing.Point(188, 477); this.stopServerButton.Name = "stopServerButton"; this.stopServerButton.Size = new System.Drawing.Size(151, 42); this.stopServerButton.TabIndex = 3; @@ -179,7 +187,7 @@ namespace Step.UI this.TXTstatus.Enabled = false; this.TXTstatus.Lines = new string[] { "..."}; - this.TXTstatus.Location = new System.Drawing.Point(-1, 427); + this.TXTstatus.Location = new System.Drawing.Point(-1, 535); this.TXTstatus.MaxLength = 32767; this.TXTstatus.Name = "TXTstatus"; this.TXTstatus.PasswordChar = '\0'; @@ -226,11 +234,90 @@ namespace Step.UI this.label1.TabIndex = 54; this.label1.Text = "Vendor:"; // + // labelNetworkName + // + this.labelNetworkName.Location = new System.Drawing.Point(82, 12); + this.labelNetworkName.Name = "labelNetworkName"; + this.labelNetworkName.Size = new System.Drawing.Size(242, 22); + this.labelNetworkName.TabIndex = 55; + this.labelNetworkName.Text = "---"; + this.labelNetworkName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // metroPanel1 + // + this.metroPanel1.AccessibleName = ""; + this.metroPanel1.Controls.Add(this.label4); + this.metroPanel1.Controls.Add(this.labelNetworkBand); + this.metroPanel1.Controls.Add(this.label3); + this.metroPanel1.Controls.Add(this.labelNetworkSpeed); + this.metroPanel1.Controls.Add(this.label2); + this.metroPanel1.Controls.Add(this.labelNetworkName); + this.metroPanel1.HorizontalScrollbarBarColor = true; + this.metroPanel1.HorizontalScrollbarHighlightOnWheel = false; + this.metroPanel1.HorizontalScrollbarSize = 10; + this.metroPanel1.Location = new System.Drawing.Point(8, 371); + this.metroPanel1.Name = "metroPanel1"; + this.metroPanel1.Size = new System.Drawing.Size(331, 100); + this.metroPanel1.TabIndex = 56; + this.metroPanel1.Tag = ""; + this.metroPanel1.VerticalScrollbarBarColor = true; + this.metroPanel1.VerticalScrollbarHighlightOnWheel = false; + this.metroPanel1.VerticalScrollbarSize = 10; + // + // label3 + // + this.label3.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; + this.label3.Location = new System.Drawing.Point(3, 34); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(73, 22); + this.label3.TabIndex = 58; + this.label3.Text = "Load: "; + this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // labelNetworkSpeed + // + this.labelNetworkSpeed.Location = new System.Drawing.Point(82, 34); + this.labelNetworkSpeed.Name = "labelNetworkSpeed"; + this.labelNetworkSpeed.Size = new System.Drawing.Size(242, 22); + this.labelNetworkSpeed.TabIndex = 57; + this.labelNetworkSpeed.Text = "0.0%"; + this.labelNetworkSpeed.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label2 + // + this.label2.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; + this.label2.Location = new System.Drawing.Point(3, 12); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(73, 22); + this.label2.TabIndex = 56; + this.label2.Text = "NIC Name: "; + this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // label4 + // + this.label4.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; + this.label4.Location = new System.Drawing.Point(3, 56); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(73, 22); + this.label4.TabIndex = 60; + this.label4.Text = "Bandwidth: "; + this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // labelNetworkBand + // + this.labelNetworkBand.Location = new System.Drawing.Point(82, 56); + this.labelNetworkBand.Name = "labelNetworkBand"; + this.labelNetworkBand.Size = new System.Drawing.Size(242, 22); + this.labelNetworkBand.TabIndex = 59; + this.labelNetworkBand.Text = "0 Mb/s"; + this.labelNetworkBand.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // // ServerControlWindow // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(350, 457); + this.ClientSize = new System.Drawing.Size(350, 565); + this.Controls.Add(this.metroPanel1); this.Controls.Add(this.label1); this.Controls.Add(this.TXTType); this.Controls.Add(this.CHNcConnected); @@ -251,8 +338,10 @@ namespace Step.UI this.NotifyIconMenu.ResumeLayout(false); this.metroTabControl1.ResumeLayout(false); this.ThreadsInfo.ResumeLayout(false); + this.metroPanel1.ResumeLayout(false); this.ResumeLayout(false); this.PerformLayout(); + } #endregion @@ -269,6 +358,13 @@ namespace Step.UI private MetroFramework.Controls.MetroTextBox TXTstatus; private Label TXTType; private MetroFramework.Controls.MetroCheckBox CHNcConnected; - private Label label1; + private Label label1; + private Label labelNetworkName; + private MetroFramework.Controls.MetroPanel metroPanel1; + private Label label3; + private Label labelNetworkSpeed; + private Label label2; + private Label label4; + private Label labelNetworkBand; } } \ No newline at end of file diff --git a/Step.UI/ServerControlWindow.cs b/Step.UI/ServerControlWindow.cs index 2255bba2..d543ead3 100644 --- a/Step.UI/ServerControlWindow.cs +++ b/Step.UI/ServerControlWindow.cs @@ -151,6 +151,24 @@ namespace Step.UI //ShowMessage on UI TXTstatus.Text = "[" + DateTime.Now.ToString("T") + "] " + message.Message; }); + }), + MessageServices.Current.Subscribe(NETWORK_USAGE, (a, b) => + { + DTONetworkMonitor NICMonitor = (DTONetworkMonitor)a; + if (!IsDisposed) + Invoke((MethodInvoker)delegate () + { + labelNetworkSpeed.Text = NICMonitor.Value + " %"; + labelNetworkName.Text = NICMonitor.Name; + + if(NICMonitor.Bandwidth >= Math.Pow(10,9)) + labelNetworkBand.Text = (NICMonitor.Bandwidth * Math.Pow(10,-9)).ToString() + " Gb/s"; + else + labelNetworkBand.Text = (NICMonitor.Bandwidth * Math.Pow(10,-6)).ToString() + " Mb/s"; + + if(NICMonitor.Value > 95.0) + StepNotifyIcon.ShowBalloonTip(30000, "Network Card Warning", "Network Card - Bandwith Overload", ToolTipIcon.Error); + }); }), // NC status handler MessageServices.Current.Subscribe(SEND_NC_STATUS, (a, b) => diff --git a/Step.Utils/languages/IT.xml b/Step.Utils/languages/IT.xml index 0cb7380f..c1515bbe 100644 --- a/Step.Utils/languages/IT.xml +++ b/Step.Utils/languages/IT.xml @@ -140,7 +140,6 @@ Nuovo Offset Nuovo Tagliente Parametri - Modifica utensile n. %d - %s Modifica utensile n. %d Creazione Nuovo Utensile Modifica Tagliente n. %d @@ -470,10 +469,10 @@ Cancella Salva Nessun intervento di manutenzione effettuato - Ultimo intervento effettuato pochi minuti fa - Ultimo intervento effettuato %d ore fa - Ultimo intervento effettuato %d giorni fa - Ultimo intervento effettuato in data: %s + Ultimo intervento effettuato pochi minuti fa, da: %s + Ultimo intervento effettuato %d ore fa, da: %s + Ultimo intervento effettuato %d giorni fa, da: %s + Ultimo intervento effettuato in data: %s, da: %s Manutenzione creata in data %s alle ore %s Allegati Note diff --git a/Step.Utils/languages/en.xml b/Step.Utils/languages/en.xml index 5c478817..03eac72c 100644 --- a/Step.Utils/languages/en.xml +++ b/Step.Utils/languages/en.xml @@ -140,7 +140,6 @@ New Offset New Cutting Edge Parameters - Edit Tool no. %d - %s Edit Tool no. %d New Tool Creation Edit Offset no. %d @@ -469,10 +468,10 @@ Cancel Save Maintenance never registered - Last maintenance registered few minutes ago - Last maintenance registered %d hours ago - Last maintenance registered %d days ago - Last maintenance registered in: %s + Last maintenance registered few minutes ago, from: %s + Last maintenance registered %d hours ago, from: %s + Last maintenance registered %d days ago, from: %s + Last maintenance registered in: %s, from: %s Maintenance created in %s at %s Attachments Notes diff --git a/Step/wwwroot/assets/styles/base/card.less b/Step/wwwroot/assets/styles/base/card.less index d8b9f3d5..6e59ec90 100644 --- a/Step/wwwroot/assets/styles/base/card.less +++ b/Step/wwwroot/assets/styles/base/card.less @@ -1264,11 +1264,26 @@ justify-content: center; height: 335px; margin: 0px 18px 0 18px; - img{ - max-height:315px; - box-shadow: 2px 2px 2px 0 rgba(0, 0, 0, 0.4); - max-width: 100%; - } + .container{ + margin: auto; + overflow: visible; + position: relative; + cursor: pointer; + img { + display: block; + max-height:315px; + box-shadow: 2px 2px 2px 0 rgba(0, 0, 0, 0.4); + max-width: 100%; + } + .eye{ + position: absolute; + bottom: 2px; + right: 10px; + font-size: 25px; + color: @color-darkish-blue; + } + } + .noimage{ display: flex; align-items: center; diff --git a/Step/wwwroot/assets/styles/base/modals.less b/Step/wwwroot/assets/styles/base/modals.less index 2e6a6e85..a64b928f 100644 --- a/Step/wwwroot/assets/styles/base/modals.less +++ b/Step/wwwroot/assets/styles/base/modals.less @@ -989,6 +989,7 @@ justify-content: center; display: flex; background-color: #cccccc; + position: relative; } #imagecontainer{ position: relative; @@ -1085,178 +1086,7 @@ flex-flow: row; hr { width: 5%; - } - - - - .imageViewerZoom { - position: absolute; - width: 100%; - height: inherit; - background: #cccccc; - top: 0; - display: block; - overflow:hidden; - cursor: -webkit-grab; - - .container{ - width: 100%; - height: 100%; - } - img{ - position: absolute; - user-drag: none; - -webkit-user-drag: none; - box-shadow: 0 0px 3px 0 rgba(0, 0, 0, 0.4) - } - &::-webkit-scrollbar { - width: 4px; - height: 4px; - background-color: transparent; - } - - &::-webkit-scrollbar-thumb { - border-radius: 2px; - background-color: rgba(0, 0, 0, 0.3); - } - .btngroup_close{ - position: absolute; - top: 0; - right: 0; - margin-right: 20px; - margin-top: 20px; - - } - .btngroup{ - position: absolute; - bottom: 0; - right: 0; - margin-right: 20px; - margin-bottom: 50px; - button{ - margin-top: 20px; - } - button.searchminus{ - margin-top: 0px; - } - } - button { - font-size: 20px; - justify-content: center; - display: flex; - background-color: @color-header-button-background-color; - background-image: linear-gradient(to bottom, #1756ad, #002680); - box-shadow: @color-header-button-box-shadow; - border-radius: @header-button-size /2; - border: none; - height: @header-button-size; - max-height: @header-button-size; - min-width: @header-button-size; - max-width: @header-button-size; - cursor: pointer; - color: #FFF; - z-index: 1; - } - button:disabled { - background-color: #002680 !important;; - filter: grayscale(100%); - } - button>img { - margin: auto; - height: @header-button-size/2; - margin: auto; - display: block; - } - button>img.h-20 { - height: 20px; - } - button>img.h-24 { - height: 24px; - } - button .machine-info small { - display: block; - text-align: left; - margin-left: 5px; - font-family: 'Work Sans', sans-serif; - font-size: 11px; - } - button.red { - background-color: @color-scarlet; - color: white; - box-shadow: 0 3px 5px 0 rgba(0, 0, 0, 0.4), inset 0 1px 3px 0 rgba(0, 0, 0, 0.5); - } - button.blue { - background-color: @color-clear-blue; - color: white; - } - button.dark-blue { - background-color: @color-darkish-blue; - color: white; - } - button.dark-blue:active { - background-color: @color-clear-blue; - } - button.gray { - background-color: @color-greyish-brown; - color: white; - } - button.profile { - width: @header-button-size; // background-image: url(../profile.png); - color: #000; - // background-size: cover; - &.colorWhite{ - color: #FFF; - } - } - button.unclickable { - cursor: default; - } - - - input[type=range] { - -webkit-appearance: none; - margin: 18px 0; - width: 200px; - transform: rotate(-90deg); - margin-top:200px; - } - input[type=range]:focus { - outline: none; - } - input[type=range]::-webkit-slider-runnable-track { - width: 100%; - height: 9px; - cursor: pointer; - background: #979797; - border-radius: 4px; - box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.4); - } - input[type=range]::-webkit-slider-thumb { - height: 30px; - width: 30px; - border-radius: 15px; - background-color: #ffffff; - background-image: linear-gradient(to left, #1756ad, #002680); - box-shadow: 0 0px 3px 0 rgba(0, 0, 0, 0.4); - cursor: pointer; - -webkit-appearance: none; - margin-top: -10px; - } - .rangecontainer{ - height: 257px; - width: 44px; - overflow: hidden; - .range{ - position: absolute; - top: -15px; - left: -79px; - } - } - } - .imageViewerZoom:active { - cursor: -webkit-grabbing; - } - + } .first-column { min-width: 215px; border-right: solid 2px @color-whitethree; @@ -2272,4 +2102,187 @@ justify-content: flex-end; } } +} + +.imageViewerZoom { + position: absolute; + width: 100%; + height: 100%; + background: #cccccc; + top: 0; + display: block; + overflow:hidden; + .container{ + width: 100%; + height: 100%; + cursor: -webkit-grab; + } + .loading{ + position: absolute; + width: 100%; + height: 100%; + top: 0; + left: 0; + background: #cccccc; + display: flex; + align-items: center; + text-align: center; + font-size: 4em; + justify-content: center; + cursor:wait; + color: #4b4b4b; + } + + img{ + position: absolute; + user-drag: none; + -webkit-user-drag: none; + box-shadow: 0 0px 3px 0 rgba(0, 0, 0, 0.4) + } + &::-webkit-scrollbar { + width: 4px; + height: 4px; + background-color: transparent; + } + + &::-webkit-scrollbar-thumb { + border-radius: 2px; + background-color: rgba(0, 0, 0, 0.3); + } + .btngroup_close{ + position: absolute; + top: 0; + right: 0; + margin-right: 20px; + margin-top: 20px; + + } + .btngroup{ + position: absolute; + bottom: 0; + right: 0; + margin-right: 20px; + margin-bottom: 50px; + button{ + margin-top: 20px; + } + button.searchminus{ + margin-top: 0px; + } + } + button { + font-size: 20px; + justify-content: center; + display: flex; + background-color: @color-header-button-background-color; + background-image: linear-gradient(to bottom, #1756ad, #002680); + box-shadow: @color-header-button-box-shadow; + border-radius: @header-button-size /2; + border: none; + height: @header-button-size; + max-height: @header-button-size; + min-width: @header-button-size; + max-width: @header-button-size; + cursor: pointer; + color: #FFF; + z-index: 1; + } + button:disabled { + background-color: #002680 !important;; + filter: grayscale(100%); + } + button>img { + margin: auto; + height: @header-button-size/2; + margin: auto; + display: block; + } + button>img.h-20 { + height: 20px; + } + button>img.h-24 { + height: 24px; + } + button .machine-info small { + display: block; + text-align: left; + margin-left: 5px; + font-family: 'Work Sans', sans-serif; + font-size: 11px; + } + button.red { + background-color: @color-scarlet; + color: white; + box-shadow: 0 3px 5px 0 rgba(0, 0, 0, 0.4), inset 0 1px 3px 0 rgba(0, 0, 0, 0.5); + } + button.blue { + background-color: @color-clear-blue; + color: white; + } + button.dark-blue { + background-color: @color-darkish-blue; + color: white; + } + button.dark-blue:active { + background-color: @color-clear-blue; + } + button.gray { + background-color: @color-greyish-brown; + color: white; + } + button.profile { + width: @header-button-size; // background-image: url(../profile.png); + color: #000; + // background-size: cover; + &.colorWhite{ + color: #FFF; + } + } + button.unclickable { + cursor: default; + } + + + input[type=range] { + -webkit-appearance: none; + margin: 18px 0; + width: 200px; + transform: rotate(-90deg); + margin-top:200px; + } + input[type=range]:focus { + outline: none; + } + input[type=range]::-webkit-slider-runnable-track { + width: 100%; + height: 9px; + cursor: pointer; + background: #979797; + border-radius: 4px; + box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.4); + } + input[type=range]::-webkit-slider-thumb { + height: 30px; + width: 30px; + border-radius: 15px; + background-color: #ffffff; + background-image: linear-gradient(to left, #1756ad, #002680); + box-shadow: 0 0px 3px 0 rgba(0, 0, 0, 0.4); + cursor: pointer; + -webkit-appearance: none; + margin-top: -10px; + } + .rangecontainer{ + height: 257px; + width: 44px; + overflow: hidden; + .range{ + position: absolute; + top: -15px; + left: -79px; + } + } +} +.imageViewerZoom:active { + cursor: -webkit-grabbing; } \ No newline at end of file diff --git a/Step/wwwroot/assets/styles/style.css b/Step/wwwroot/assets/styles/style.css index 3e03b373..12d23fe7 100644 --- a/Step/wwwroot/assets/styles/style.css +++ b/Step/wwwroot/assets/styles/style.css @@ -935,6 +935,7 @@ justify-content: center; display: flex; background-color: #cccccc; + position: relative; } .modal.modal-image #imagecontainer { position: relative; @@ -1060,256 +1061,6 @@ .modal.modal-add-element-queue .modal-add-element-queue-body hr { width: 5%; } -.modal.modal-load-program .modal-load-program-body .imageViewerZoom, -.modal.modal-add-element-queue .modal-load-program-body .imageViewerZoom, -.modal.modal-load-program .modal-add-element-queue-body .imageViewerZoom, -.modal.modal-add-element-queue .modal-add-element-queue-body .imageViewerZoom { - position: absolute; - width: 100%; - height: inherit; - background: #cccccc; - top: 0; - display: block; - overflow: hidden; - cursor: -webkit-grab; -} -.modal.modal-load-program .modal-load-program-body .imageViewerZoom .container, -.modal.modal-add-element-queue .modal-load-program-body .imageViewerZoom .container, -.modal.modal-load-program .modal-add-element-queue-body .imageViewerZoom .container, -.modal.modal-add-element-queue .modal-add-element-queue-body .imageViewerZoom .container { - width: 100%; - height: 100%; -} -.modal.modal-load-program .modal-load-program-body .imageViewerZoom img, -.modal.modal-add-element-queue .modal-load-program-body .imageViewerZoom img, -.modal.modal-load-program .modal-add-element-queue-body .imageViewerZoom img, -.modal.modal-add-element-queue .modal-add-element-queue-body .imageViewerZoom img { - position: absolute; - user-drag: none; - -webkit-user-drag: none; - box-shadow: 0 0px 3px 0 rgba(0, 0, 0, 0.4); -} -.modal.modal-load-program .modal-load-program-body .imageViewerZoom::-webkit-scrollbar, -.modal.modal-add-element-queue .modal-load-program-body .imageViewerZoom::-webkit-scrollbar, -.modal.modal-load-program .modal-add-element-queue-body .imageViewerZoom::-webkit-scrollbar, -.modal.modal-add-element-queue .modal-add-element-queue-body .imageViewerZoom::-webkit-scrollbar { - width: 4px; - height: 4px; - background-color: transparent; -} -.modal.modal-load-program .modal-load-program-body .imageViewerZoom::-webkit-scrollbar-thumb, -.modal.modal-add-element-queue .modal-load-program-body .imageViewerZoom::-webkit-scrollbar-thumb, -.modal.modal-load-program .modal-add-element-queue-body .imageViewerZoom::-webkit-scrollbar-thumb, -.modal.modal-add-element-queue .modal-add-element-queue-body .imageViewerZoom::-webkit-scrollbar-thumb { - border-radius: 2px; - background-color: rgba(0, 0, 0, 0.3); -} -.modal.modal-load-program .modal-load-program-body .imageViewerZoom .btngroup_close, -.modal.modal-add-element-queue .modal-load-program-body .imageViewerZoom .btngroup_close, -.modal.modal-load-program .modal-add-element-queue-body .imageViewerZoom .btngroup_close, -.modal.modal-add-element-queue .modal-add-element-queue-body .imageViewerZoom .btngroup_close { - position: absolute; - top: 0; - right: 0; - margin-right: 20px; - margin-top: 20px; -} -.modal.modal-load-program .modal-load-program-body .imageViewerZoom .btngroup, -.modal.modal-add-element-queue .modal-load-program-body .imageViewerZoom .btngroup, -.modal.modal-load-program .modal-add-element-queue-body .imageViewerZoom .btngroup, -.modal.modal-add-element-queue .modal-add-element-queue-body .imageViewerZoom .btngroup { - position: absolute; - bottom: 0; - right: 0; - margin-right: 20px; - margin-bottom: 50px; -} -.modal.modal-load-program .modal-load-program-body .imageViewerZoom .btngroup button, -.modal.modal-add-element-queue .modal-load-program-body .imageViewerZoom .btngroup button, -.modal.modal-load-program .modal-add-element-queue-body .imageViewerZoom .btngroup button, -.modal.modal-add-element-queue .modal-add-element-queue-body .imageViewerZoom .btngroup button { - margin-top: 20px; -} -.modal.modal-load-program .modal-load-program-body .imageViewerZoom .btngroup button.searchminus, -.modal.modal-add-element-queue .modal-load-program-body .imageViewerZoom .btngroup button.searchminus, -.modal.modal-load-program .modal-add-element-queue-body .imageViewerZoom .btngroup button.searchminus, -.modal.modal-add-element-queue .modal-add-element-queue-body .imageViewerZoom .btngroup button.searchminus { - margin-top: 0px; -} -.modal.modal-load-program .modal-load-program-body .imageViewerZoom button, -.modal.modal-add-element-queue .modal-load-program-body .imageViewerZoom button, -.modal.modal-load-program .modal-add-element-queue-body .imageViewerZoom button, -.modal.modal-add-element-queue .modal-add-element-queue-body .imageViewerZoom button { - font-size: 20px; - justify-content: center; - display: flex; - background-color: #ffffff; - background-image: linear-gradient(to bottom, #1756ad, #002680); - box-shadow: 0 3px 5px 0 rgba(0, 0, 0, 0.4); - border-radius: 22px; - border: none; - height: 44px; - max-height: 44px; - min-width: 44px; - max-width: 44px; - cursor: pointer; - color: #FFF; - z-index: 1; -} -.modal.modal-load-program .modal-load-program-body .imageViewerZoom button:disabled, -.modal.modal-add-element-queue .modal-load-program-body .imageViewerZoom button:disabled, -.modal.modal-load-program .modal-add-element-queue-body .imageViewerZoom button:disabled, -.modal.modal-add-element-queue .modal-add-element-queue-body .imageViewerZoom button:disabled { - background-color: #002680 !important; - filter: grayscale(100%); -} -.modal.modal-load-program .modal-load-program-body .imageViewerZoom button > img, -.modal.modal-add-element-queue .modal-load-program-body .imageViewerZoom button > img, -.modal.modal-load-program .modal-add-element-queue-body .imageViewerZoom button > img, -.modal.modal-add-element-queue .modal-add-element-queue-body .imageViewerZoom button > img { - height: 22px; - margin: auto; - display: block; -} -.modal.modal-load-program .modal-load-program-body .imageViewerZoom button > img.h-20, -.modal.modal-add-element-queue .modal-load-program-body .imageViewerZoom button > img.h-20, -.modal.modal-load-program .modal-add-element-queue-body .imageViewerZoom button > img.h-20, -.modal.modal-add-element-queue .modal-add-element-queue-body .imageViewerZoom button > img.h-20 { - height: 20px; -} -.modal.modal-load-program .modal-load-program-body .imageViewerZoom button > img.h-24, -.modal.modal-add-element-queue .modal-load-program-body .imageViewerZoom button > img.h-24, -.modal.modal-load-program .modal-add-element-queue-body .imageViewerZoom button > img.h-24, -.modal.modal-add-element-queue .modal-add-element-queue-body .imageViewerZoom button > img.h-24 { - height: 24px; -} -.modal.modal-load-program .modal-load-program-body .imageViewerZoom button .machine-info small, -.modal.modal-add-element-queue .modal-load-program-body .imageViewerZoom button .machine-info small, -.modal.modal-load-program .modal-add-element-queue-body .imageViewerZoom button .machine-info small, -.modal.modal-add-element-queue .modal-add-element-queue-body .imageViewerZoom button .machine-info small { - display: block; - text-align: left; - margin-left: 5px; - font-family: 'Work Sans', sans-serif; - font-size: 11px; -} -.modal.modal-load-program .modal-load-program-body .imageViewerZoom button.red, -.modal.modal-add-element-queue .modal-load-program-body .imageViewerZoom button.red, -.modal.modal-load-program .modal-add-element-queue-body .imageViewerZoom button.red, -.modal.modal-add-element-queue .modal-add-element-queue-body .imageViewerZoom button.red { - background-color: #d0021b; - color: white; - box-shadow: 0 3px 5px 0 rgba(0, 0, 0, 0.4), inset 0 1px 3px 0 rgba(0, 0, 0, 0.5); -} -.modal.modal-load-program .modal-load-program-body .imageViewerZoom button.blue, -.modal.modal-add-element-queue .modal-load-program-body .imageViewerZoom button.blue, -.modal.modal-load-program .modal-add-element-queue-body .imageViewerZoom button.blue, -.modal.modal-add-element-queue .modal-add-element-queue-body .imageViewerZoom button.blue { - background-color: #1791ff; - color: white; -} -.modal.modal-load-program .modal-load-program-body .imageViewerZoom button.dark-blue, -.modal.modal-add-element-queue .modal-load-program-body .imageViewerZoom button.dark-blue, -.modal.modal-load-program .modal-add-element-queue-body .imageViewerZoom button.dark-blue, -.modal.modal-add-element-queue .modal-add-element-queue-body .imageViewerZoom button.dark-blue { - background-color: #002680; - color: white; -} -.modal.modal-load-program .modal-load-program-body .imageViewerZoom button.dark-blue:active, -.modal.modal-add-element-queue .modal-load-program-body .imageViewerZoom button.dark-blue:active, -.modal.modal-load-program .modal-add-element-queue-body .imageViewerZoom button.dark-blue:active, -.modal.modal-add-element-queue .modal-add-element-queue-body .imageViewerZoom button.dark-blue:active { - background-color: #1791ff; -} -.modal.modal-load-program .modal-load-program-body .imageViewerZoom button.gray, -.modal.modal-add-element-queue .modal-load-program-body .imageViewerZoom button.gray, -.modal.modal-load-program .modal-add-element-queue-body .imageViewerZoom button.gray, -.modal.modal-add-element-queue .modal-add-element-queue-body .imageViewerZoom button.gray { - background-color: #4b4b4b; - color: white; -} -.modal.modal-load-program .modal-load-program-body .imageViewerZoom button.profile, -.modal.modal-add-element-queue .modal-load-program-body .imageViewerZoom button.profile, -.modal.modal-load-program .modal-add-element-queue-body .imageViewerZoom button.profile, -.modal.modal-add-element-queue .modal-add-element-queue-body .imageViewerZoom button.profile { - width: 44px; - color: #000; -} -.modal.modal-load-program .modal-load-program-body .imageViewerZoom button.profile.colorWhite, -.modal.modal-add-element-queue .modal-load-program-body .imageViewerZoom button.profile.colorWhite, -.modal.modal-load-program .modal-add-element-queue-body .imageViewerZoom button.profile.colorWhite, -.modal.modal-add-element-queue .modal-add-element-queue-body .imageViewerZoom button.profile.colorWhite { - color: #FFF; -} -.modal.modal-load-program .modal-load-program-body .imageViewerZoom button.unclickable, -.modal.modal-add-element-queue .modal-load-program-body .imageViewerZoom button.unclickable, -.modal.modal-load-program .modal-add-element-queue-body .imageViewerZoom button.unclickable, -.modal.modal-add-element-queue .modal-add-element-queue-body .imageViewerZoom button.unclickable { - cursor: default; -} -.modal.modal-load-program .modal-load-program-body .imageViewerZoom input[type=range], -.modal.modal-add-element-queue .modal-load-program-body .imageViewerZoom input[type=range], -.modal.modal-load-program .modal-add-element-queue-body .imageViewerZoom input[type=range], -.modal.modal-add-element-queue .modal-add-element-queue-body .imageViewerZoom input[type=range] { - -webkit-appearance: none; - margin: 18px 0; - width: 200px; - transform: rotate(-90deg); - margin-top: 200px; -} -.modal.modal-load-program .modal-load-program-body .imageViewerZoom input[type=range]:focus, -.modal.modal-add-element-queue .modal-load-program-body .imageViewerZoom input[type=range]:focus, -.modal.modal-load-program .modal-add-element-queue-body .imageViewerZoom input[type=range]:focus, -.modal.modal-add-element-queue .modal-add-element-queue-body .imageViewerZoom input[type=range]:focus { - outline: none; -} -.modal.modal-load-program .modal-load-program-body .imageViewerZoom input[type=range]::-webkit-slider-runnable-track, -.modal.modal-add-element-queue .modal-load-program-body .imageViewerZoom input[type=range]::-webkit-slider-runnable-track, -.modal.modal-load-program .modal-add-element-queue-body .imageViewerZoom input[type=range]::-webkit-slider-runnable-track, -.modal.modal-add-element-queue .modal-add-element-queue-body .imageViewerZoom input[type=range]::-webkit-slider-runnable-track { - width: 100%; - height: 9px; - cursor: pointer; - background: #979797; - border-radius: 4px; - box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.4); -} -.modal.modal-load-program .modal-load-program-body .imageViewerZoom input[type=range]::-webkit-slider-thumb, -.modal.modal-add-element-queue .modal-load-program-body .imageViewerZoom input[type=range]::-webkit-slider-thumb, -.modal.modal-load-program .modal-add-element-queue-body .imageViewerZoom input[type=range]::-webkit-slider-thumb, -.modal.modal-add-element-queue .modal-add-element-queue-body .imageViewerZoom input[type=range]::-webkit-slider-thumb { - height: 30px; - width: 30px; - border-radius: 15px; - background-color: #ffffff; - background-image: linear-gradient(to left, #1756ad, #002680); - box-shadow: 0 0px 3px 0 rgba(0, 0, 0, 0.4); - cursor: pointer; - -webkit-appearance: none; - margin-top: -10px; -} -.modal.modal-load-program .modal-load-program-body .imageViewerZoom .rangecontainer, -.modal.modal-add-element-queue .modal-load-program-body .imageViewerZoom .rangecontainer, -.modal.modal-load-program .modal-add-element-queue-body .imageViewerZoom .rangecontainer, -.modal.modal-add-element-queue .modal-add-element-queue-body .imageViewerZoom .rangecontainer { - height: 257px; - width: 44px; - overflow: hidden; -} -.modal.modal-load-program .modal-load-program-body .imageViewerZoom .rangecontainer .range, -.modal.modal-add-element-queue .modal-load-program-body .imageViewerZoom .rangecontainer .range, -.modal.modal-load-program .modal-add-element-queue-body .imageViewerZoom .rangecontainer .range, -.modal.modal-add-element-queue .modal-add-element-queue-body .imageViewerZoom .rangecontainer .range { - position: absolute; - top: -15px; - left: -79px; -} -.modal.modal-load-program .modal-load-program-body .imageViewerZoom:active, -.modal.modal-add-element-queue .modal-load-program-body .imageViewerZoom:active, -.modal.modal-load-program .modal-add-element-queue-body .imageViewerZoom:active, -.modal.modal-add-element-queue .modal-add-element-queue-body .imageViewerZoom:active { - cursor: -webkit-grabbing; -} .modal.modal-load-program .modal-load-program-body .first-column, .modal.modal-add-element-queue .modal-load-program-body .first-column, .modal.modal-load-program .modal-add-element-queue-body .first-column, @@ -2401,6 +2152,181 @@ align-items: center; justify-content: flex-end; } +.imageViewerZoom { + position: absolute; + width: 100%; + height: 100%; + background: #cccccc; + top: 0; + display: block; + overflow: hidden; +} +.imageViewerZoom .container { + width: 100%; + height: 100%; + cursor: -webkit-grab; +} +.imageViewerZoom .loading { + position: absolute; + width: 100%; + height: 100%; + top: 0; + left: 0; + background: #cccccc; + display: flex; + align-items: center; + text-align: center; + font-size: 4em; + justify-content: center; + cursor: wait; + color: #4b4b4b; +} +.imageViewerZoom img { + position: absolute; + user-drag: none; + -webkit-user-drag: none; + box-shadow: 0 0px 3px 0 rgba(0, 0, 0, 0.4); +} +.imageViewerZoom::-webkit-scrollbar { + width: 4px; + height: 4px; + background-color: transparent; +} +.imageViewerZoom::-webkit-scrollbar-thumb { + border-radius: 2px; + background-color: rgba(0, 0, 0, 0.3); +} +.imageViewerZoom .btngroup_close { + position: absolute; + top: 0; + right: 0; + margin-right: 20px; + margin-top: 20px; +} +.imageViewerZoom .btngroup { + position: absolute; + bottom: 0; + right: 0; + margin-right: 20px; + margin-bottom: 50px; +} +.imageViewerZoom .btngroup button { + margin-top: 20px; +} +.imageViewerZoom .btngroup button.searchminus { + margin-top: 0px; +} +.imageViewerZoom button { + font-size: 20px; + justify-content: center; + display: flex; + background-color: #ffffff; + background-image: linear-gradient(to bottom, #1756ad, #002680); + box-shadow: 0 3px 5px 0 rgba(0, 0, 0, 0.4); + border-radius: 22px; + border: none; + height: 44px; + max-height: 44px; + min-width: 44px; + max-width: 44px; + cursor: pointer; + color: #FFF; + z-index: 1; +} +.imageViewerZoom button:disabled { + background-color: #002680 !important; + filter: grayscale(100%); +} +.imageViewerZoom button > img { + height: 22px; + margin: auto; + display: block; +} +.imageViewerZoom button > img.h-20 { + height: 20px; +} +.imageViewerZoom button > img.h-24 { + height: 24px; +} +.imageViewerZoom button .machine-info small { + display: block; + text-align: left; + margin-left: 5px; + font-family: 'Work Sans', sans-serif; + font-size: 11px; +} +.imageViewerZoom button.red { + background-color: #d0021b; + color: white; + box-shadow: 0 3px 5px 0 rgba(0, 0, 0, 0.4), inset 0 1px 3px 0 rgba(0, 0, 0, 0.5); +} +.imageViewerZoom button.blue { + background-color: #1791ff; + color: white; +} +.imageViewerZoom button.dark-blue { + background-color: #002680; + color: white; +} +.imageViewerZoom button.dark-blue:active { + background-color: #1791ff; +} +.imageViewerZoom button.gray { + background-color: #4b4b4b; + color: white; +} +.imageViewerZoom button.profile { + width: 44px; + color: #000; +} +.imageViewerZoom button.profile.colorWhite { + color: #FFF; +} +.imageViewerZoom button.unclickable { + cursor: default; +} +.imageViewerZoom input[type=range] { + -webkit-appearance: none; + margin: 18px 0; + width: 200px; + transform: rotate(-90deg); + margin-top: 200px; +} +.imageViewerZoom input[type=range]:focus { + outline: none; +} +.imageViewerZoom input[type=range]::-webkit-slider-runnable-track { + width: 100%; + height: 9px; + cursor: pointer; + background: #979797; + border-radius: 4px; + box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.4); +} +.imageViewerZoom input[type=range]::-webkit-slider-thumb { + height: 30px; + width: 30px; + border-radius: 15px; + background-color: #ffffff; + background-image: linear-gradient(to left, #1756ad, #002680); + box-shadow: 0 0px 3px 0 rgba(0, 0, 0, 0.4); + cursor: pointer; + -webkit-appearance: none; + margin-top: -10px; +} +.imageViewerZoom .rangecontainer { + height: 257px; + width: 44px; + overflow: hidden; +} +.imageViewerZoom .rangecontainer .range { + position: absolute; + top: -15px; + left: -79px; +} +.imageViewerZoom:active { + cursor: -webkit-grabbing; +} .popup { width: 288px; height: 218px; @@ -6881,11 +6807,25 @@ footer .container button.big:before { height: 335px; margin: 0px 18px 0 18px; } -.card-job-production .card-job-production-body .card-job-production-body-top img { +.card-job-production .card-job-production-body .card-job-production-body-top .container { + margin: auto; + overflow: visible; + position: relative; + cursor: pointer; +} +.card-job-production .card-job-production-body .card-job-production-body-top .container img { + display: block; max-height: 315px; box-shadow: 2px 2px 2px 0 rgba(0, 0, 0, 0.4); max-width: 100%; } +.card-job-production .card-job-production-body .card-job-production-body-top .container .eye { + position: absolute; + bottom: 2px; + right: 10px; + font-size: 25px; + color: #002680; +} .card-job-production .card-job-production-body .card-job-production-body-top .noimage { display: flex; align-items: center; diff --git a/Step/wwwroot/src/app_modules/maintenance/components/maintenance-card.ts b/Step/wwwroot/src/app_modules/maintenance/components/maintenance-card.ts index 55d10e73..065f21fd 100644 --- a/Step/wwwroot/src/app_modules/maintenance/components/maintenance-card.ts +++ b/Step/wwwroot/src/app_modules/maintenance/components/maintenance-card.ts @@ -165,14 +165,15 @@ export default class MaintenanceCard extends Vue { var end = moment(m.lastPerformedDate); var days = (moment.duration(today.diff(end)) as any)._data.days; var hours = (moment.duration(today.diff(end)) as any)._data.hours; + var author = m.maintainer.username; if (hours == 0) - return this.$options.filters.localize("maintenance_date_justdone", "Ultimo intervento effettuato pochi minuti fa"); + return this.$options.filters.localize("maintenance_date_justdone", "Ultimo intervento effettuato pochi minuti fa, da: %s",author); else if (days == 0) - return this.$options.filters.localize("maintenance_date_hours", "Ultimo intervento effettuato %d ore fa", hours); + return this.$options.filters.localize("maintenance_date_hours", "Ultimo intervento effettuato %d ore fa, da: %s", hours,author); else if (days <= 7) - return this.$options.filters.localize("maintenance_date_days", "Ultimo intervento effettuato %d giorni fa", days); + return this.$options.filters.localize("maintenance_date_days", "Ultimo intervento effettuato %d giorni fa, da: %s", days,author); else - return this.$options.filters.localize("maintenance_date_fixeddate", "Ultimo intervento effettuato in data: %s", moment(m.lastPerformedDate).format('L')); + return this.$options.filters.localize("maintenance_date_fixeddate", "Ultimo intervento effettuato in data: %s, da: %s", moment(m.lastPerformedDate).format('L'),author); } return ""; } diff --git a/Step/wwwroot/src/app_modules/maintenance/components/maintenance-card.vue b/Step/wwwroot/src/app_modules/maintenance/components/maintenance-card.vue index fdf3f2b0..f19bf573 100644 --- a/Step/wwwroot/src/app_modules/maintenance/components/maintenance-card.vue +++ b/Step/wwwroot/src/app_modules/maintenance/components/maintenance-card.vue @@ -11,7 +11,9 @@
{{getDescMaintenance(selectedMaintenance.createdByCms, selectedMaintenance.id, selectedMaintenance.description)}}
-
{{this.getDaysFromLastExpiration(selectedMaintenance)}}
+
+ {{this.getDaysFromLastExpiration(selectedMaintenance)}} +
 
{{'maintenance_date_neverdone' | localize("Nessuna manutenzione effettuata")}}
diff --git a/Step/wwwroot/src/app_modules/production/components/card-job-production.ts b/Step/wwwroot/src/app_modules/production/components/card-job-production.ts index 8ed2a0ea..c6b0a005 100644 --- a/Step/wwwroot/src/app_modules/production/components/card-job-production.ts +++ b/Step/wwwroot/src/app_modules/production/components/card-job-production.ts @@ -1,11 +1,11 @@ import Vue from "vue"; import cardProductionSectionFile from "./card-production-section-file.vue"; import moment from "moment"; - import { fileService, FileService } from "src/services/fileService"; - import Component from "vue-class-component"; import { Prop, Watch } from "vue-property-decorator"; +import { ModalHelper,Modal } from "src/components/modals"; +import { ModalImage } from "src/modules/base-components/index"; @Component({ components: { @@ -92,6 +92,12 @@ export default class CardJobProduction extends Vue { selectRow(row) { this.rowSelected = row; } + zoomImage() { + ModalHelper.modalImage.content = this.currentProgramImage; + ModalHelper.modalImage.title = this.currentProgramName; + ModalHelper.ShowModal(ModalImage); + + } async deactivateProgram() { await fileService.deactivateProgram(); } diff --git a/Step/wwwroot/src/app_modules/production/components/card-job-production.vue b/Step/wwwroot/src/app_modules/production/components/card-job-production.vue index b2d17733..f275f6ef 100644 --- a/Step/wwwroot/src/app_modules/production/components/card-job-production.vue +++ b/Step/wwwroot/src/app_modules/production/components/card-job-production.vue @@ -16,7 +16,12 @@
- + +
+ +
+
+
{{'modal_load_program_lbl_img_not_found' | localize('Preview non disponibile')}}
diff --git a/Step/wwwroot/src/app_modules/tooling/components/depot-action-generic.ts b/Step/wwwroot/src/app_modules/tooling/components/depot-action-generic.ts index b1e285ad..903cf35c 100644 --- a/Step/wwwroot/src/app_modules/tooling/components/depot-action-generic.ts +++ b/Step/wwwroot/src/app_modules/tooling/components/depot-action-generic.ts @@ -6,6 +6,4 @@ import Modal from "src/components/modals/modal.vue"; @Component({ components: { modal: Modal } }) export default class DepotActionGeneric extends Vue { - @Prop({ default: "../assets/icons/png/start-machine.png" }) - imgSource; } diff --git a/Step/wwwroot/src/app_modules/tooling/components/depot-action-loading.ts b/Step/wwwroot/src/app_modules/tooling/components/depot-action-loading.ts index d3ae1f26..b1875c00 100644 --- a/Step/wwwroot/src/app_modules/tooling/components/depot-action-loading.ts +++ b/Step/wwwroot/src/app_modules/tooling/components/depot-action-loading.ts @@ -7,8 +7,6 @@ import { cardAssistedTooling } from "src/modules/base-components/cards"; @Component({ components: { cardAssistedTooling, modal: Modal } }) export default class DepotActionLoading extends Vue { - @Prop({ default: "/assets/icons/png/start-machine.png" }) - imgSource; magazineStatusModel() { diff --git a/Step/wwwroot/src/app_modules/tooling/components/depot-action-transfer.ts b/Step/wwwroot/src/app_modules/tooling/components/depot-action-transfer.ts index a18b0867..ea8b49ec 100644 --- a/Step/wwwroot/src/app_modules/tooling/components/depot-action-transfer.ts +++ b/Step/wwwroot/src/app_modules/tooling/components/depot-action-transfer.ts @@ -7,8 +7,6 @@ import { cardAssistedTooling } from "src/modules/base-components/cards"; @Component({ components: { cardAssistedTooling, modal: Modal } }) export default class DepotActionTransfer extends Vue { - @Prop({ default: "../../assets/icons/png/start-machine.png" }) - imgSource; magazineStatusModel() { diff --git a/Step/wwwroot/src/app_modules/tooling/components/depot-action-unloading.ts b/Step/wwwroot/src/app_modules/tooling/components/depot-action-unloading.ts index 4ea3041c..d7f22d60 100644 --- a/Step/wwwroot/src/app_modules/tooling/components/depot-action-unloading.ts +++ b/Step/wwwroot/src/app_modules/tooling/components/depot-action-unloading.ts @@ -7,9 +7,6 @@ import { cardAssistedTooling } from "src/modules/base-components/cards"; @Component({ components: { cardAssistedTooling, modal: Modal } }) export default class DepotActionUnloading extends Vue { - @Prop({ default: "../assets/icons/png/start-machine.png" }) - imgSource; - magazineStatusModel() { return this.$store.state.depot.magazineStatusModel; diff --git a/Step/wwwroot/src/modules/base-components/modal-image.vue b/Step/wwwroot/src/modules/base-components/modal-image.vue index 7daa8a54..67b70ea7 100644 --- a/Step/wwwroot/src/modules/base-components/modal-image.vue +++ b/Step/wwwroot/src/modules/base-components/modal-image.vue @@ -1,17 +1,16 @@