Fix Min-Role for using Thermo UnderTheHood

This commit is contained in:
Thermo_SIM
2021-02-12 16:30:11 +01:00
parent abba69d0d7
commit 0b6c5475bd
15 changed files with 58 additions and 12 deletions
@@ -40,4 +40,9 @@
<allowExternalBrowser>true</allowExternalBrowser>
<ncNeeded>false</ncNeeded>
</users>
<thermoHood>
<enabled>true</enabled>
<allowExternalBrowser>true</allowExternalBrowser>
<ncNeeded>false</ncNeeded>
</thermoHood>
</areasConfig>
@@ -82,6 +82,16 @@
</xs:complexType>
</xs:element>
<xs:element name="thermoHood">
<xs:complexType>
<xs:all>
<xs:element name="enabled" type="xs:boolean" />
<xs:element name="allowExternalBrowser" type="xs:boolean" />
<xs:element name="ncNeeded" type="xs:boolean" />
</xs:all>
</xs:complexType>
</xs:element>
</xs:all>
</xs:complexType>
</xs:element>
+1
View File
@@ -47,6 +47,7 @@ namespace Thermo.Active.Config
public static AreasConfigModel ScadaConfig;
public static AreasConfigModel JobEditorConfig;
public static AreasConfigModel UsersConfig;
public static AreasConfigModel ThermoHoodConfig;
public static List<ScadaSchemaModel> ProductionScadaSchema = new List<ScadaSchemaModel>();
public static List<ScadaSchemaModel> ConfiguredScadaSchema = new List<ScadaSchemaModel>();
@@ -211,6 +211,10 @@ namespace Thermo.Active.Config
case AREAS.USERS_KEY:
SetAreaValue(ref UsersConfig, element);
break;
case AREAS.THERMO_HOOD_KEY:
SetAreaValue(ref ThermoHoodConfig, element);
break;
}
}
@@ -52,6 +52,7 @@ namespace Thermo.Active.Database.Migrations
new FunctionAccessModel() { Name = "usersArea", Area = GENERAL_KEY, Enabled = true, WriteLevelMin = 30, ReadLevelMin = 1, PlcId = 0 },
new FunctionAccessModel() { Name = "jobeditorArea", Area = GENERAL_KEY, Enabled = true, WriteLevelMin = 20, ReadLevelMin = 1, PlcId = 0 },
new FunctionAccessModel() { Name = "utilitiesArea", Area = GENERAL_KEY, Enabled = true, WriteLevelMin = 1, ReadLevelMin = 1, PlcId = 0 },
new FunctionAccessModel() { Name = "thermoHoodArea", Area = GENERAL_KEY, Enabled = true, WriteLevelMin = 30, ReadLevelMin = 1, PlcId = 0 },
// thermo functions
new FunctionAccessModel() { Name = RECIPE_MANAGER, Area = GENERAL_KEY, Enabled = true, WriteLevelMin = 1, ReadLevelMin = 1, PlcId = 0 }
+1
View File
@@ -263,6 +263,7 @@ namespace Thermo.Active.Model
public const string USERS_KEY = "users";
public const string THERMO_KEY = "thermo";
public const string RISC_KEY = "risc";
public const string THERMO_HOOD_KEY = "thermoHood";
}
// Config File Names
@@ -12,5 +12,6 @@ namespace Thermo.Active.Model.DTOModels
public AreasConfigModel ScadaConfig;
public AreasConfigModel JobEditorConfig;
public AreasConfigModel UsersConfig;
public AreasConfigModel ThermoHoodConfig;
}
}
@@ -27,7 +27,8 @@ namespace Thermo.Active.Controllers.WebApi
ReportConfig = ReportConfig,
UtilitiesConfig = UtilitiesConfig,
JobEditorConfig = JobEditorConfig,
UsersConfig = UsersConfig
UsersConfig = UsersConfig,
ThermoHoodConfig = ThermoHoodConfig
};
return Ok(startupConfiguration);
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

@@ -139,7 +139,7 @@ button.btn.btn-success[disabled] {
}
button.under {
min-width: 118px;
min-width: 140px;
height: 45px;
object-fit: contain;
border-radius: 100px;
@@ -154,6 +154,13 @@ button.under {
font-weight: 500;
font-size: 18px;
&.thermoHood{
min-width:45px;
max-width: 45px;
margin-right: 15px;
margin-left: 10px;
}
img {
max-width: 178px;
max-height: 45px;
@@ -7,7 +7,7 @@
@footer-button-halfball-size: @footer-button-ball-size / 2;
@footer-button-margin: 19px;
@footer-padding: 0 0 9px 8px;
@footer-machine-area-size: 300px;
@footer-machine-area-size: 390px;
footer {
position: absolute;
@@ -29,6 +29,9 @@ footer {
img {
margin: 0px 5px;
}
.noThermoHood{
min-width: 45px;
}
}
.container {
+2 -2
View File
@@ -1,5 +1,5 @@
import {
// Home,
Home,
// CreateMaintenance,
// SoftKeysPrefered,
// CreateQueue,
@@ -34,7 +34,7 @@ import { routes as users } from "./app_modules/users/route";
//import { routes as ioRoutes } from "@/app_modules_thermo/sotto-cofano/route";
export let routes = [
{ path: "", component: productionRoutes[0].component, name: productionRoutes[0].name, meta: { title: "Dashboard" } },
{ path: "", component: Home, name: "home", meta: { title: "Dashboard" } },
{ path: "/utilities", component: Utilities, meta: { title: "Utilities", area: "utilities" } },
// { path: "/card-utilities", component: CardUtilities, meta: { title: "Card-Utilities", area: "card-utilities" } },
// { path: "/card-tool-depot", component: CardToolDepot, meta: { title: "Card-Tool-Depot", area: "card-tool-depot" } },
@@ -6,7 +6,7 @@ import { Factory, messageService, awaiter } from "@/_base";
import { loginService } from "@/app.modules";
import { DataService } from 'src/services/dataService';
import iziToast, { IziToastSettings } from "izitoast";
import { store, machineStatusActions } from "@/store";
import { store, machineStatusActions,appModelActions } from "@/store";
@Component({ name: "login", components: { modal: Modal } })
export default class Login extends Vue {
@@ -31,6 +31,10 @@ export default class Login extends Vue {
if(!this.checkIfUserIsAuthorized()){
userNotAuthorized = true;
}
if(!this.checkIfUserIsAuthorizedToThermoHood()){
appModelActions.MainViewLiftDown(this.$store);
}
}).catch(() => {
this.logginIn = false;
this.hasError = !service.isAuthenticated;
@@ -67,6 +71,11 @@ export default class Login extends Vue {
return machineStatusActions.isAreaVisible(store, this.URLS_TO_FUNCTIONS_BINDING[this.$route.path]);
}
checkIfUserIsAuthorizedToThermoHood(): boolean {
return machineStatusActions.isAreaVisible(store, "thermoHood");
}
URLS_TO_FUNCTIONS_BINDING = {
"/production": "production",
"/tooling": "tooling",
@@ -58,6 +58,9 @@ export default class AppFooter extends Vue {
return machineStatusActions.isAreaVisible(store, areaname);
}
isThermoHoodVisible() {
return machineStatusActions.isAreaVisible(store, "thermoHood");
}
public getUtilities(): Array<Object> {
if (typeof cmsClient != "undefined")
return JSON.parse(cmsClient.getConfiguredProcessesInMainMenu());
@@ -95,15 +95,15 @@
</div>
<div class="machine-area">
<button
<button
@mouseup="toggleMainView()"
style="min-width:45px"
class="under"
class="under thermoHood"
v-if="isThermoHoodVisible()"
:class="{'pressed':state.isMainViewLiftedUp}"
:title="'footer_tooltip_under_hood' | localize('Open/Close Under-the-hood area')"
>
<i class="fa fa-gear"></i>
</button>
><img src="assets/icons/png/ico-bt-dark-advanced.png" /></button>
<span class="noThermoHood" v-else ></span>
<button
class="under"