Added isSelectable to axes buttons

Added axes funcitonality
This commit is contained in:
Lucio Maranta
2018-11-08 13:27:30 +01:00
parent 48d627f489
commit ddced53d73
9 changed files with 13 additions and 8 deletions
Binary file not shown.
+1 -1
View File
@@ -3,7 +3,7 @@
<alarm>
<alarmId>1</alarmId>
<plcId>1</plcId>
<restoreIsActive>false</restoreIsActive>
<restoreIsActive>true</restoreIsActive>
</alarm>
<alarm>
<alarmId>2</alarmId>
+1 -1
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<serverConfig>
<ncConfig>
<ncVendor>SIEMENS</ncVendor> <!-- NO_NC/DEMO/FANUC/SIEMENS/OSAI -->
<ncVendor>DEMO</ncVendor> <!-- NO_NC/DEMO/FANUC/SIEMENS/OSAI -->
<showNcHMI>true</showNcHMI>
<ncIpAddress>localhost</ncIpAddress>
<ncPort>8080</ncPort>
+2 -2
View File
@@ -23,7 +23,7 @@ namespace Step.Database.Migrations
new RoleModel() { RoleId = (int)ROLE_IDS.ADMIN, Level = 10, Name = "Admin" },
new RoleModel() { RoleId = (int)ROLE_IDS.GUEST, Level = 1, Name = "Guest" }
);
context.FunctionsAccess.AddOrUpdate(
// General Function
new FunctionAccessModel() { Name = GENERAL, Area = GENERAL_KEY, Enabled = true, WriteLevelMin = 100, ReadLevelMin = 1, PlcId = 0 },
@@ -37,7 +37,7 @@ namespace Step.Database.Migrations
new FunctionAccessModel() { Name = NC_SOFTKEY, Area = UNDER_HOOD, Enabled = true, WriteLevelMin = 1, ReadLevelMin = 1, PlcId = 4 },
new FunctionAccessModel() { Name = USER_SOFTKEY, Area = UNDER_HOOD, Enabled = true, WriteLevelMin = 1, ReadLevelMin = 1, PlcId = 5 },
new FunctionAccessModel() { Name = HEADS_CMD, Area = UNDER_HOOD, Enabled = true, WriteLevelMin = 1, ReadLevelMin = 1, PlcId = 6 },
new FunctionAccessModel() { Name = AXES_CMD, Area = UNDER_HOOD, Enabled = true, WriteLevelMin = 1, ReadLevelMin = 1, PlcId = 7 },
new FunctionAccessModel() { Name = AXES_SELECTION, Area = UNDER_HOOD, Enabled = true, WriteLevelMin = 1, ReadLevelMin = 1, PlcId = 7 },
new FunctionAccessModel() { Name = TOOL_MANAGER, Area = TOOLING_KEY, Enabled = true, WriteLevelMin = 1, ReadLevelMin = 1, PlcId = 8 },
new FunctionAccessModel() { Name = MAINTENANCE, Area = MAINTENANCE_KEY, Enabled = true, WriteLevelMin = 1, ReadLevelMin = 1, PlcId = 9 }
+1
View File
@@ -210,6 +210,7 @@ namespace Step.Model
public const string AXES_CMD = "axesCmd";
public const string TOOL_MANAGER = "toolManager";
public const string MAINTENANCE = "maintenance";
public const string AXES_SELECTION = "axesSoftkeys";
}
public static class API_ERROR_KEYS
+4 -1
View File
@@ -7,7 +7,7 @@ namespace Step.Model.DTOModels
public override bool Equals(object obj)
{
var item = obj as DTOAxisNameModel;
// Object is not a DTOAxisNameModel instance
if (item == null)
return false;
@@ -18,6 +18,9 @@ namespace Step.Model.DTOModels
if (item.Name != Name)
return false;
if (item.IsSelectable != IsSelectable)
return false;
return true;
}
+2 -1
View File
@@ -1342,7 +1342,8 @@ namespace Step.NC
axesNames = plcAxes.Select(x => new DTOAxisNameModel()
{
Id = x.Id,
Name = x.Name
Name = x.Name,
IsSelectable = x.IsSelectable
}).ToList();
}
+1 -1
View File
@@ -19,7 +19,7 @@ declare module signalr_process {
interface AxisData{
id:number;
name: string;
isSelectable: string;
}
interface AxisValueData{
@@ -14,7 +14,7 @@
<div class="axes-menu-container" v-if="showAxesMenu">
<div class="menu">
<button @click="setAxes(a.id)"
v-for="a in axes"
v-for="a in axes" v-if="a.isSelectable"
:key="a.id"
:class="{active: a.id == selectedAxisId}">{{a.name}}</button>
</div>