diff --git a/Step.Config/Config/serverConfig.xml b/Step.Config/Config/serverConfig.xml
index 89178614..dbc8112d 100644
--- a/Step.Config/Config/serverConfig.xml
+++ b/Step.Config/Config/serverConfig.xml
@@ -15,5 +15,6 @@
en
true
localhost
+ true
\ No newline at end of file
diff --git a/Step.Config/Config/serverConfigValidator.xsd b/Step.Config/Config/serverConfigValidator.xsd
index a7b73acc..fd012ffa 100644
--- a/Step.Config/Config/serverConfigValidator.xsd
+++ b/Step.Config/Config/serverConfigValidator.xsd
@@ -25,6 +25,7 @@
+
diff --git a/Step.Config/Config/toolManagerConfig.xml b/Step.Config/Config/toolManagerConfig.xml
index 97c13789..55ede02f 100644
--- a/Step.Config/Config/toolManagerConfig.xml
+++ b/Step.Config/Config/toolManagerConfig.xml
@@ -49,4 +49,27 @@
Raffreddamento 7
+
+
+ 1
+
+ Magazine 1
+ Magazzino 1
+
+
+
+ 2
+
+ Magazine 2
+ Magazzino 2
+
+
+
+ 3
+
+ Magazine 3
+ Magazzino 3
+
+
+
\ No newline at end of file
diff --git a/Step.Config/Config/toolManagerConfigValidator.xsd b/Step.Config/Config/toolManagerConfigValidator.xsd
index 294339d6..3f78cb7f 100644
--- a/Step.Config/Config/toolManagerConfigValidator.xsd
+++ b/Step.Config/Config/toolManagerConfigValidator.xsd
@@ -102,6 +102,31 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Step.Config/ServerConfigController.cs b/Step.Config/ServerConfigController.cs
index 3a8953fc..bbeab8e9 100644
--- a/Step.Config/ServerConfigController.cs
+++ b/Step.Config/ServerConfigController.cs
@@ -198,7 +198,8 @@ namespace Step.Config
ServerAddress = x.Element("serverAddress").Value,
ServerPort = Convert.ToInt32(x.Element("serverPort").Value),
EnableDirectoryBrowsing = Convert.ToBoolean(x.Element("enableDirectoryBrowsing").Value),
- DatabaseAddress = x.Element("databaseAddress").Value
+ DatabaseAddress = x.Element("databaseAddress").Value,
+ AutoOpenCmsClient = Convert.ToBoolean(x.Element("autoOpenCmsClient").Value)
}).FirstOrDefault();
}
@@ -391,6 +392,19 @@ namespace Step.Config
})
.FirstOrDefault();
+
+ ToolManagerConfig.MagazineNames = xmlConfigFile
+ .Root
+ .Descendants("magazineNames")
+ .Elements()
+ .Select(x => new MagazineNamesModel()
+ {
+ MagazineId = Convert.ToInt32(x.Element("id").Value),
+ LocalizedNames = x.Element("localizedNames").Elements().ToDictionary( // Read localized names and convert into a dictionary
+ y => y.Attribute("langKey").Value, y => y.Value
+ ),
+ })
+ .ToList();
}
public static void ReadMacros()
diff --git a/Step.Database/Controllers/QueueController.cs b/Step.Database/Controllers/QueueController.cs
index dc0c9d9e..8b1c9398 100644
--- a/Step.Database/Controllers/QueueController.cs
+++ b/Step.Database/Controllers/QueueController.cs
@@ -31,10 +31,11 @@ namespace Step.Database.Controllers
{
dbCtx.Queue.RemoveRange(dbCtx.Queue);
- foreach(var item in PartProgramQueue)
+ var dbRows = new List();
+ foreach (var item in PartProgramQueue)
{
// Create database model
- var dbRows = item.Value.Select(x => new QueueItemsModel()
+ dbRows =item.Value.Select(x => new QueueItemsModel()
{
Id = x.Id,
AbsolutePath = x.AbsolutePath,
diff --git a/Step.Model/ConfigModels/MagazineNamesModel.cs b/Step.Model/ConfigModels/MagazineNamesModel.cs
new file mode 100644
index 00000000..f36fb4bd
--- /dev/null
+++ b/Step.Model/ConfigModels/MagazineNamesModel.cs
@@ -0,0 +1,15 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Step.Model.ConfigModels
+{
+ public class MagazineNamesModel
+ {
+ public int MagazineId { get; set; }
+
+ public Dictionary LocalizedNames { get; set; }
+ }
+}
diff --git a/Step.Model/ConfigModels/ServerConfigModel.cs b/Step.Model/ConfigModels/ServerConfigModel.cs
index 74850527..e73db1d6 100644
--- a/Step.Model/ConfigModels/ServerConfigModel.cs
+++ b/Step.Model/ConfigModels/ServerConfigModel.cs
@@ -14,5 +14,6 @@ namespace Step.Model.ConfigModels
public string ServerAddress { get; set; }
public bool EnableDirectoryBrowsing { get; set; }
public string DatabaseAddress { get; set; }
+ public bool AutoOpenCmsClient { get; set; }
}
}
\ No newline at end of file
diff --git a/Step.Model/ConfigModels/ToolManagerConfigModel.cs b/Step.Model/ConfigModels/ToolManagerConfigModel.cs
index 18319cd7..a4f323cf 100644
--- a/Step.Model/ConfigModels/ToolManagerConfigModel.cs
+++ b/Step.Model/ConfigModels/ToolManagerConfigModel.cs
@@ -24,6 +24,7 @@ namespace Step.Model.ConfigModels
public CooligTranslations CooligsTranslations { get; set; }
+ public List MagazineNames { get; set; }
}
public class CooligTranslations
diff --git a/Step.Model/Step.Model.csproj b/Step.Model/Step.Model.csproj
index 22be59aa..c92eb66c 100644
--- a/Step.Model/Step.Model.csproj
+++ b/Step.Model/Step.Model.csproj
@@ -62,6 +62,7 @@
+
diff --git a/Step.UI/ServerControlWindow.cs b/Step.UI/ServerControlWindow.cs
index 42bbf327..ed05c087 100644
--- a/Step.UI/ServerControlWindow.cs
+++ b/Step.UI/ServerControlWindow.cs
@@ -115,7 +115,7 @@ namespace Step.UI
MessageServices.Current.Publish("StopServer");
}
- private void StartCMSClient(string url)
+ public static void StartCMSClient(string url)
{
//Setup the Path Variable
String CMSClientPath = "";
diff --git a/Step/Controllers/WebApi/LanguageController.cs b/Step/Controllers/WebApi/LanguageController.cs
index 130e318e..ecc41de6 100644
--- a/Step/Controllers/WebApi/LanguageController.cs
+++ b/Step/Controllers/WebApi/LanguageController.cs
@@ -40,6 +40,7 @@ namespace Step.Controllers.WebApi
Dictionary alarmsNames = GetPlcAlarmsTranslations(language);
Dictionary headsNames = GetLocalizedHeadsNames(language);
Dictionary coolingNames = GetCoolingTranslations(language);
+ Dictionary magazinesNames = GetMagazineTranslations(language);
// Concat maintenances dictionary with translations dictionary
@@ -55,6 +56,8 @@ namespace Step.Controllers.WebApi
{
translations[coolingItem.Key] = coolingItem.Value;
}
+ // Magazines
+ translations = translations.Concat(magazinesNames).ToDictionary(x => x.Key, x => x.Value);
if (translations == null)
return InternalServerError();
@@ -205,5 +208,20 @@ namespace Step.Controllers.WebApi
}
return dictionary;
}
+
+ private static Dictionary GetMagazineTranslations(string language)
+ {
+ Dictionary translatedNames = new Dictionary();
+
+ foreach (var mag in ToolManagerConfig.MagazineNames)
+ {
+ translatedNames.Add(
+ "magazine_name_" + mag.MagazineId,
+ GetValueFromLocalizationList(mag.LocalizedNames, language, "Magazine_" + mag.MagazineId)
+ );
+ }
+
+ return translatedNames;
+ }
}
}
\ No newline at end of file
diff --git a/Step/program.cs b/Step/program.cs
index 225097d5..32019851 100644
--- a/Step/program.cs
+++ b/Step/program.cs
@@ -75,6 +75,9 @@ namespace Step
// Start listeners
ListenersHandler.Start();
+ if (ServerStartupConfig.AutoOpenCmsClient)
+ ServerControlWindow.StartCMSClient(null);
+
// Wait interrupt from client
StopRequest.WaitOne();
LogInfo("Application closed");
diff --git a/Step/wwwroot/assets/styles/base/card.less b/Step/wwwroot/assets/styles/base/card.less
index 5f2837c2..c5781e4b 100644
--- a/Step/wwwroot/assets/styles/base/card.less
+++ b/Step/wwwroot/assets/styles/base/card.less
@@ -1616,7 +1616,7 @@
}
}
}
-.expanded{
+.job-expanded{
width: 623px !important;
height: auto !important;
}
diff --git a/Step/wwwroot/assets/styles/style.css b/Step/wwwroot/assets/styles/style.css
index 8f5dc4fc..5bdab1ee 100644
--- a/Step/wwwroot/assets/styles/style.css
+++ b/Step/wwwroot/assets/styles/style.css
@@ -6636,7 +6636,7 @@ footer .container button.big:before {
border-radius: 2px;
padding: 5px 10px;
}
-.expanded {
+.job-expanded {
width: 623px !important;
height: auto !important;
}
diff --git a/Step/wwwroot/src/components/tooling/tooling-depot.ts b/Step/wwwroot/src/components/tooling/tooling-depot.ts
index 91c344b0..afb8edc7 100644
--- a/Step/wwwroot/src/components/tooling/tooling-depot.ts
+++ b/Step/wwwroot/src/components/tooling/tooling-depot.ts
@@ -609,12 +609,14 @@ export default class depot extends Vue {
}
public updateMagStatusAndgetStoreTitle(id: number): string {
- var mag = this.magazines.find(d => d.id == id);
-
- if (mag && mag.loadingIsActive && mag.signalRLoadingIsActive)
- this.magazineLocked = false;
- else
- this.magazineLocked = true;
+ if(this.magazines.length > 0){
+ var mag = this.magazines.find(d => d.id == id);
+ console.log("MAG", mag.signalRLoadingIsActive)
+ if (mag && mag.loadingIsActive && mag.signalRLoadingIsActive)
+ this.magazineLocked = false;
+ else
+ this.magazineLocked = true;
+ }
if (mag && mag.type)
this.magazineType = mag.type;
diff --git a/Step/wwwroot/src/modules/base-components/cards/objects-job.vue b/Step/wwwroot/src/modules/base-components/cards/objects-job.vue
index ea1dd62c..33c0294b 100644
--- a/Step/wwwroot/src/modules/base-components/cards/objects-job.vue
+++ b/Step/wwwroot/src/modules/base-components/cards/objects-job.vue
@@ -1,6 +1,6 @@
-