(opt))
- {
- // Start Threads
- ThreadsHandler.Start();
- // Start listeners
- ListenersHandler.Start();
-
-
+ {
+ if (databaseStatus)
+ {
+ // Start Threads
+ ThreadsHandler.Start();
+ // Start listeners
+ ListenersHandler.Start();
+ }
+
// Wait interrupt from client
StopRequest.WaitOne();
@@ -99,7 +107,7 @@ namespace Step
// Stop messageservice listeners
ListenersHandler.Stop();
// Close WinForm
- ServerControlWindow.Stop();
+ ServerControlWindow.Stop();
}
private static bool ValidateAddress(string Addr)
@@ -129,6 +137,29 @@ namespace Step
}
LogException((Exception)args.ExceptionObject, ERROR_LEVEL.FATAL);
+ }
+
+ private static void CreateDirectories()
+ {
+ if (!Directory.Exists(MAINTENANCE_ATTACHMENT_PATH))
+ Directory.CreateDirectory(MAINTENANCE_ATTACHMENT_PATH);
+ if (!Directory.Exists(ALARM_ATTACHMENT_PATH))
+ Directory.CreateDirectory(ALARM_ATTACHMENT_PATH);
+
+ if (!Directory.Exists(TEMP_PP_FOLDER))
+ Directory.CreateDirectory(TEMP_PP_FOLDER);
+
+ if (!Directory.Exists(PART_PRG_IMAGES))
+ Directory.CreateDirectory(PART_PRG_IMAGES);
+
+ if (!Directory.Exists(JOB_TMP_DIRECTORY))
+ Directory.CreateDirectory(JOB_TMP_DIRECTORY);
+
+ if (!Directory.Exists(QUEUE_TMP_FOLDER))
+ Directory.CreateDirectory(QUEUE_TMP_FOLDER);
+
+ if (!Directory.Exists(SCADA_DIRECTORY))
+ Directory.CreateDirectory(SCADA_DIRECTORY);
}
}
}
\ No newline at end of file
diff --git a/Step/wwwroot/assets/styles/base/alarms.less b/Step/wwwroot/assets/styles/base/alarms.less
index 2cbbe01c..586b7ce4 100644
--- a/Step/wwwroot/assets/styles/base/alarms.less
+++ b/Step/wwwroot/assets/styles/base/alarms.less
@@ -444,6 +444,7 @@
margin-left: 132px;
&.my {
+ margin-top: 5px;
margin-left: 15px;
}
@@ -934,30 +935,30 @@
th:nth-child(2),
td:nth-child(2) {
- width: 550px;
- max-width: 550px;
+ width: 500px;
+ max-width: 500px;
text-align: left;
}
th:nth-child(3),
td:nth-child(3) {
- width: 150px;
- max-width: 150px;
+ width: 130px;
+ max-width: 130px;
text-align: left;
}
th:nth-child(4),
td:nth-child(4) {
- width: 100px;
- max-width: 100px;
- min-width: 50px;
+ width: 150px;
+ max-width: 150px;
+ min-width: 100px;
text-align: left;
}
th:nth-child(5),
td:nth-child(5) {
- width: 100px;
- max-width: 100px;
+ width: 150px;
+ min-width: 150px;
}
th,
@@ -972,11 +973,10 @@
tbody {
display: block;
- height: 552px;
- width: 1200px;
- overflow-y: scroll;
+ height: 559px;
+ width: 1241px;
+ overflow-y: hidden;
overflow-x: hidden;
- padding-right: 20px;
&.without-footer {
height: 620px
@@ -1003,7 +1003,7 @@
tr {
cursor: pointer;
- height: 64px;
+ height: 62px;
padding: 10px;
td {
diff --git a/Step/wwwroot/assets/styles/base/buttons.less b/Step/wwwroot/assets/styles/base/buttons.less
index dc82b192..46dc89fc 100644
--- a/Step/wwwroot/assets/styles/base/buttons.less
+++ b/Step/wwwroot/assets/styles/base/buttons.less
@@ -241,8 +241,25 @@ button.soft {
}
}
&.square {
- width: 48px;
+ width: 60px;
}
+ &.incremental {
+ padding: 0px 2px;
+ margin-right: 0px;
+ margin-left: 0px;
+ }
+
+ &.firstIncr {
+ margin-left: 4px;
+ border-radius: 2px 0px 0px 2px !important
+ }
+ &.middleIncr {
+ border-radius: 0px !important
+ }
+ &.lastIncr {
+ border-radius: 0px 2px 2px 0px !important
+ }
+
i.fa {
font-size: 24px;
}
diff --git a/Step/wwwroot/assets/styles/base/card.less b/Step/wwwroot/assets/styles/base/card.less
index 45ff5c56..c7324507 100644
--- a/Step/wwwroot/assets/styles/base/card.less
+++ b/Step/wwwroot/assets/styles/base/card.less
@@ -760,21 +760,23 @@
}
.card-axes-production {
- height: 558px;
+ height: 562px;
width: 232px;
- border-radius: 2px;
- box-shadow: 0 1px 2px 0 @color-black-40;
+ //border-radius: 2px;
+ //box-shadow: 0 1px 2px 0 @color-black-40;
background-color: @color-background-white;
display: flex;
flex-flow: column;
- .first-box-axes,
- .second-box-axes {
- height: 264px;
+ .first-box-axes {
+ height: 294px;
width: 100%;
display: flex;
flex-flow: column;
overflow: auto;
+ border-radius: 2px;
+ box-shadow: 0 1px 2px 0 @color-black-40;
+ margin-top: 8px;
.axes {
min-height: 32px;
@@ -874,12 +876,7 @@
.axes:last-child {
margin-bottom: 16px;
}
- }
-
- .second-box-axes {
- width: 100%;
- height: 294px;
-
+
.tabs {
min-height: 30px;
width: 100%;
@@ -918,6 +915,38 @@
}
}
+.override-box {
+ height: 260px;
+ width: 232px;
+ display: block;
+ margin: auto;
+ border-radius: 2px;
+ box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
+
+ .label-container{
+ display: flex;
+ justify-content: space-around;
+ font-weight: 600;
+ text-align: center;
+
+ .title {
+ font-size: 14px;
+ }
+
+ .value {
+ font-size: 25px;
+ }
+
+ .rapid {
+ color: #002680
+ }
+
+ .work {
+ color: #1791ff
+ }
+ }
+}
+
.card-folder-path {
width: auto;
height: 64px;
diff --git a/Step/wwwroot/assets/styles/base/job-editor.less b/Step/wwwroot/assets/styles/base/job-editor.less
index 3b87d43f..35ff7430 100644
--- a/Step/wwwroot/assets/styles/base/job-editor.less
+++ b/Step/wwwroot/assets/styles/base/job-editor.less
@@ -313,6 +313,7 @@
height: 14px;
margin-left: 132px;
&.my{
+ margin-top: 5px;
margin-left: 15px;
}
.text-date{
diff --git a/Step/wwwroot/assets/styles/base/layout.less b/Step/wwwroot/assets/styles/base/layout.less
index 8e2126b6..cf91fb93 100644
--- a/Step/wwwroot/assets/styles/base/layout.less
+++ b/Step/wwwroot/assets/styles/base/layout.less
@@ -41,7 +41,7 @@
@background-color: rgb(216, 216, 216);
@handle-width: 48px;
@handle-height: 32px;
-@persona-size: 88px;
+@persona-size: 80px;
@spinner-loading-height: 200px;
@spinner-loading-width: 200px;
a, a:visited, a:hover, a:active {
@@ -51,8 +51,9 @@ a, a:visited, a:hover, a:active {
.persona {
height: @persona-size;
width: @persona-size;
+ line-height: @persona-size;
border-radius: @persona-size;
- font-size: @persona-size;
+ font-size: 50px;
text-align: center;
background-color: @color-darkish-blue;
color: white;
diff --git a/Step/wwwroot/assets/styles/base/maintenance-card.less b/Step/wwwroot/assets/styles/base/maintenance-card.less
index 7fbafccf..cc1eca01 100644
--- a/Step/wwwroot/assets/styles/base/maintenance-card.less
+++ b/Step/wwwroot/assets/styles/base/maintenance-card.less
@@ -299,6 +299,7 @@
height: 14px;
margin-left: 132px;
&.my{
+ margin-top: 5px;
margin-left: 15px;
}
.text-date{
diff --git a/Step/wwwroot/assets/styles/base/modals.less b/Step/wwwroot/assets/styles/base/modals.less
index e1a7e13c..e085985f 100644
--- a/Step/wwwroot/assets/styles/base/modals.less
+++ b/Step/wwwroot/assets/styles/base/modals.less
@@ -33,6 +33,7 @@
@modal-iframe-height: 800px;
@modal-iframe-width: 1800px;
@modal-user-info-height: 610px;
+@modal-concact-info-height: 375px;
@modal-login-top: @modal-login-height / 2;
@modal-login-left: @modal-login-width / 2;
@modal-create-maintenance-width: 896px;
@@ -183,6 +184,7 @@
align-items: center;
span{
word-wrap: break-word;
+ max-width: 445px;
}
input{
margin-left: auto;
@@ -343,6 +345,52 @@
}
}
+.@{modal}.contact-info {
+ width: @modal-login-width;
+ height: @modal-concact-info-height;
+ top: calc(~"50%" - @modal-concact-info-height / 2);
+ left: calc(~"50%" - @modal-login-width / 2);
+ header {
+ background-color: @color-darkish-blue;
+ color: @color-white;
+ font-family: @font-family;
+ font-weight: 600;
+ font-size: 24px;
+ text-align: left;
+ padding: 0px 23px;
+ }
+ img {
+ display: block;
+ width: 88px;
+ height: 88px;
+ margin: auto;
+ margin-top: 48px;
+ margin-bottom: 40px;
+ }
+ .details {
+ text-align: center;
+ color: @color-greyish-brown;
+ & > * {
+ display: block;
+ margin-bottom: 5px;
+ height: 20px;
+ line-height: 20px;
+ }
+ & > label {
+ text-align: right;
+ strong {
+ display: inline-block;
+ width: 50%;
+ text-align: left;
+ }
+ }
+
+ & > hr {
+ border: none;
+ }
+ }
+}
+
.@{modal}.self-adaptive {
width: @modal-selfadaptivepath-width;
height: @modal-selfadaptivepath-height;
diff --git a/Step/wwwroot/assets/styles/base/production.less b/Step/wwwroot/assets/styles/base/production.less
index bfc1e8b5..8a0d40a8 100644
--- a/Step/wwwroot/assets/styles/base/production.less
+++ b/Step/wwwroot/assets/styles/base/production.less
@@ -131,7 +131,7 @@
height: 353px;
width: 232px;
border-radius: 2px;
- margin-top: 8px;
+ margin-top: 12px;
margin-bottom: 16px;
box-shadow: 0 1px 2px 0 @color-black-40;
button:nth-child(odd),button:nth-child(even){
@@ -178,11 +178,28 @@
float: right;
border-radius: 2px;
box-shadow: 0 1px 2px 0 @color-black-40;
+ position: relative;
&.has-scada{
height: 360px !important;
}
+ .SelectionInProgress{
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ font-size: 2em;
+ font-weight: 600;
+ background-color: rgba(217, 217, 217, 0.5);
+ flex-flow: column;
+ line-height: 2.5em;
+ }
+
.box-softkeys-prefered-header{
display: flex;
height: 62px;
diff --git a/Step/wwwroot/assets/styles/base/scada.less b/Step/wwwroot/assets/styles/base/scada.less
index 3adb8b44..e32c9487 100644
--- a/Step/wwwroot/assets/styles/base/scada.less
+++ b/Step/wwwroot/assets/styles/base/scada.less
@@ -43,9 +43,41 @@
input[type=number]{
border: solid 1px #ccc;
}
+
input[type=number]:disabled{
border: solid 1px #FFFFFF;
}
+
+ .input-group{
+ display: flex;
+ input::-webkit-outer-spin-button,
+ input::-webkit-inner-spin-button {
+ /* display: none; <- Crashes Chrome on hover */
+ -webkit-appearance: none;
+ margin: 0; /* <-- Apparently some margin are still there even though it's hidden */
+ }
+ }
+
+ .input-group-append{
+ display: flex;
+ margin-left: 0px;
+ align-items: center;
+ justify-content: center;
+ }
+
+ .appended-btn {
+ position: relative;
+ z-index: 2;
+ background-image: linear-gradient(to bottom, @button-success-color-from, @button-success-color-to);
+ color: white;
+ border: #001e48 1px solid;
+ &:active {
+ background-image: linear-gradient(to bottom, @button-success-color-to, @button-success-color-from) !important;
+ box-shadow: inset @button-shadow;
+ border: #001e48 1px solid !important;
+ color: #8eb5e2
+ }
+ }
}
}
@@ -136,7 +168,8 @@
input[type=number]{
- border: solid 1px #ccc;
+ border: solid 1px #ccc;
+ padding: 0px;
}
input[type=number]:disabled{
border: solid 1px #FFFFFF;
@@ -169,6 +202,37 @@
& >* {
position: absolute;
}
+
+ .input-group{
+ display: flex;
+ input::-webkit-outer-spin-button,
+ input::-webkit-inner-spin-button {
+ /* display: none; <- Crashes Chrome on hover */
+ -webkit-appearance: none;
+ margin: 0; /* <-- Apparently some margin are still there even though it's hidden */
+ }
+ }
+
+ .input-group-append{
+ display: flex;
+ margin-left: 0px;
+ align-items: center;
+ justify-content: center;
+ }
+
+ .appended-btn {
+ position: relative;
+ z-index: 2;
+ background-image: linear-gradient(to bottom, @button-success-color-from, @button-success-color-to);
+ color: white;
+ border: #001e48 1px solid;
+ &:active {
+ background-image: linear-gradient(to bottom, @button-success-color-to, @button-success-color-from) !important;
+ box-shadow: inset @button-shadow;
+ border: #001e48 1px solid !important;
+ color: #8eb5e2
+ }
+ }
}
}
}
diff --git a/Step/wwwroot/assets/styles/style.css b/Step/wwwroot/assets/styles/style.css
index 8430094b..b87cc31c 100644
--- a/Step/wwwroot/assets/styles/style.css
+++ b/Step/wwwroot/assets/styles/style.css
@@ -127,6 +127,7 @@
}
.modal.m155 .content-real-showval span {
word-wrap: break-word;
+ max-width: 445px;
}
.modal.m155 .content-real-showval input {
margin-left: auto;
@@ -279,6 +280,50 @@
.modal.machine-info .details > hr {
border: none;
}
+.modal.contact-info {
+ width: 600px;
+ height: 375px;
+ top: calc(50% - 187.5px);
+ left: calc(50% - 300px);
+}
+.modal.contact-info header {
+ background-color: #002680;
+ color: #fff;
+ font-family: 'Work Sans', sans-serif;
+ font-weight: 600;
+ font-size: 24px;
+ text-align: left;
+ padding: 0px 23px;
+}
+.modal.contact-info img {
+ display: block;
+ width: 88px;
+ height: 88px;
+ margin: auto;
+ margin-top: 48px;
+ margin-bottom: 40px;
+}
+.modal.contact-info .details {
+ text-align: center;
+ color: #4b4b4b;
+}
+.modal.contact-info .details > * {
+ display: block;
+ margin-bottom: 5px;
+ height: 20px;
+ line-height: 20px;
+}
+.modal.contact-info .details > label {
+ text-align: right;
+}
+.modal.contact-info .details > label strong {
+ display: inline-block;
+ width: 50%;
+ text-align: left;
+}
+.modal.contact-info .details > hr {
+ border: none;
+}
.modal.self-adaptive {
width: 750px;
height: 350px;
@@ -3439,7 +3484,22 @@ button.soft[disabled]:not(.readonly) img {
filter: grayscale(100%) invert(44%);
}
button.soft.square {
- width: 48px;
+ width: 60px;
+}
+button.soft.incremental {
+ padding: 0px 2px;
+ margin-right: 0px;
+ margin-left: 0px;
+}
+button.soft.firstIncr {
+ margin-left: 4px;
+ border-radius: 2px 0px 0px 2px !important;
+}
+button.soft.middleIncr {
+ border-radius: 0px !important;
+}
+button.soft.lastIncr {
+ border-radius: 0px 2px 2px 0px !important;
}
button.soft i.fa {
font-size: 24px;
@@ -4680,6 +4740,7 @@ footer .container button.big:before {
margin-left: 132px;
}
.accordion section .dropdown .all-message-box .message-box .message-box-body.my {
+ margin-top: 5px;
margin-left: 15px;
}
.accordion section .dropdown .all-message-box .message-box .message-box-body .text-date {
@@ -5108,27 +5169,27 @@ footer .container button.big:before {
}
.alarm-history-container .alarm-history-body .alarm-history-body-left .alarm-history-table th:nth-child(2),
.alarm-history-container .alarm-history-body .alarm-history-body-left .alarm-history-table td:nth-child(2) {
- width: 550px;
- max-width: 550px;
+ width: 500px;
+ max-width: 500px;
text-align: left;
}
.alarm-history-container .alarm-history-body .alarm-history-body-left .alarm-history-table th:nth-child(3),
.alarm-history-container .alarm-history-body .alarm-history-body-left .alarm-history-table td:nth-child(3) {
- width: 150px;
- max-width: 150px;
+ width: 130px;
+ max-width: 130px;
text-align: left;
}
.alarm-history-container .alarm-history-body .alarm-history-body-left .alarm-history-table th:nth-child(4),
.alarm-history-container .alarm-history-body .alarm-history-body-left .alarm-history-table td:nth-child(4) {
- width: 100px;
- max-width: 100px;
- min-width: 50px;
+ width: 150px;
+ max-width: 150px;
+ min-width: 100px;
text-align: left;
}
.alarm-history-container .alarm-history-body .alarm-history-body-left .alarm-history-table th:nth-child(5),
.alarm-history-container .alarm-history-body .alarm-history-body-left .alarm-history-table td:nth-child(5) {
- width: 100px;
- max-width: 100px;
+ width: 150px;
+ min-width: 150px;
}
.alarm-history-container .alarm-history-body .alarm-history-body-left .alarm-history-table th,
.alarm-history-container .alarm-history-body .alarm-history-body-left .alarm-history-table td {
@@ -5141,11 +5202,10 @@ footer .container button.big:before {
}
.alarm-history-container .alarm-history-body .alarm-history-body-left .alarm-history-table tbody {
display: block;
- height: 552px;
- width: 1200px;
- overflow-y: scroll;
+ height: 559px;
+ width: 1241px;
+ overflow-y: hidden;
overflow-x: hidden;
- padding-right: 20px;
}
.alarm-history-container .alarm-history-body .alarm-history-body-left .alarm-history-table tbody.without-footer {
height: 620px;
@@ -5167,7 +5227,7 @@ footer .container button.big:before {
}
.alarm-history-container .alarm-history-body .alarm-history-body-left .alarm-history-table tbody tr {
cursor: pointer;
- height: 64px;
+ height: 62px;
padding: 10px;
}
.alarm-history-container .alarm-history-body .alarm-history-body-left .alarm-history-table tbody tr td {
@@ -7631,24 +7691,23 @@ footer .container button.big:before {
color: #002680;
}
.card-axes-production {
- height: 558px;
+ height: 562px;
width: 232px;
- border-radius: 2px;
- box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
background-color: #fff;
display: flex;
flex-flow: column;
}
-.card-axes-production .first-box-axes,
-.card-axes-production .second-box-axes {
- height: 264px;
+.card-axes-production .first-box-axes {
+ height: 294px;
width: 100%;
display: flex;
flex-flow: column;
overflow: auto;
+ border-radius: 2px;
+ box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
+ margin-top: 8px;
}
-.card-axes-production .first-box-axes .axes,
-.card-axes-production .second-box-axes .axes {
+.card-axes-production .first-box-axes .axes {
min-height: 32px;
width: 100%;
display: flex;
@@ -7657,20 +7716,16 @@ footer .container button.big:before {
justify-content: space-between;
margin-top: 8px;
}
-.card-axes-production .first-box-axes .axes._7,
-.card-axes-production .second-box-axes .axes._7 {
+.card-axes-production .first-box-axes .axes._7 {
min-height: 26px;
}
-.card-axes-production .first-box-axes .axes._8,
-.card-axes-production .second-box-axes .axes._8 {
+.card-axes-production .first-box-axes .axes._8 {
min-height: 22px;
}
-.card-axes-production .first-box-axes .axes._9,
-.card-axes-production .second-box-axes .axes._9 {
+.card-axes-production .first-box-axes .axes._9 {
min-height: 18px;
}
-.card-axes-production .first-box-axes .axes .variable,
-.card-axes-production .second-box-axes .axes .variable {
+.card-axes-production .first-box-axes .axes .variable {
font-size: 48px;
width: 75px;
line-height: 0;
@@ -7678,24 +7733,19 @@ footer .container button.big:before {
color: #4b4b4b;
text-align: right;
}
-.card-axes-production .first-box-axes .axes .variable._7,
-.card-axes-production .second-box-axes .axes .variable._7 {
+.card-axes-production .first-box-axes .axes .variable._7 {
font-size: 42px;
}
-.card-axes-production .first-box-axes .axes .variable._8,
-.card-axes-production .second-box-axes .axes .variable._8 {
+.card-axes-production .first-box-axes .axes .variable._8 {
font-size: 36px;
}
-.card-axes-production .first-box-axes .axes .variable._9,
-.card-axes-production .second-box-axes .axes .variable._9 {
+.card-axes-production .first-box-axes .axes .variable._9 {
font-size: 29px;
}
-.card-axes-production .first-box-axes .axes .variable.more9,
-.card-axes-production .second-box-axes .axes .variable.more9 {
+.card-axes-production .first-box-axes .axes .variable.more9 {
width: 69px;
}
-.card-axes-production .first-box-axes .axes .number,
-.card-axes-production .second-box-axes .axes .number {
+.card-axes-production .first-box-axes .axes .number {
width: 135px;
height: 32px;
border-radius: 2px;
@@ -7707,79 +7757,92 @@ footer .container button.big:before {
padding-right: 8px;
font-size: 20px;
}
-.card-axes-production .first-box-axes .axes .number._7,
-.card-axes-production .second-box-axes .axes .number._7 {
+.card-axes-production .first-box-axes .axes .number._7 {
height: 26px;
}
-.card-axes-production .first-box-axes .axes .number._8,
-.card-axes-production .second-box-axes .axes .number._8 {
+.card-axes-production .first-box-axes .axes .number._8 {
height: 22px;
}
-.card-axes-production .first-box-axes .axes .number._9,
-.card-axes-production .second-box-axes .axes .number._9 {
+.card-axes-production .first-box-axes .axes .number._9 {
height: 18px;
font-size: 18px;
}
-.card-axes-production .first-box-axes .axes .number.more9,
-.card-axes-production .second-box-axes .axes .number.more9 {
+.card-axes-production .first-box-axes .axes .number.more9 {
margin-right: 5px;
}
-.card-axes-production .first-box-axes .axes .umeasure,
-.card-axes-production .second-box-axes .axes .umeasure {
+.card-axes-production .first-box-axes .axes .umeasure {
width: 32px;
margin-left: 5px;
text-align: left;
}
-.card-axes-production .first-box-axes .axes:nth-child(odd) .number,
-.card-axes-production .second-box-axes .axes:nth-child(odd) .number {
+.card-axes-production .first-box-axes .axes:nth-child(odd) .number {
background-color: #f3f3f3;
}
-.card-axes-production .first-box-axes .axes:nth-child(even) .number,
-.card-axes-production .second-box-axes .axes:nth-child(even) .number {
+.card-axes-production .first-box-axes .axes:nth-child(even) .number {
background-color: rgba(23, 145, 255, 0.3);
}
-.card-axes-production .first-box-axes .axes:first-child,
-.card-axes-production .second-box-axes .axes:first-child {
+.card-axes-production .first-box-axes .axes:first-child {
margin-top: 16px;
}
-.card-axes-production .first-box-axes .axes:last-child,
-.card-axes-production .second-box-axes .axes:last-child {
+.card-axes-production .first-box-axes .axes:last-child {
margin-bottom: 16px;
}
-.card-axes-production .second-box-axes {
- width: 100%;
- height: 294px;
-}
-.card-axes-production .second-box-axes .tabs {
+.card-axes-production .first-box-axes .tabs {
min-height: 30px;
width: 100%;
background-color: #e7e7e7;
display: flex;
flex-direction: row;
}
-.card-axes-production .second-box-axes .tabs button {
+.card-axes-production .first-box-axes .tabs button {
visibility: hidden;
border: none;
}
-.card-axes-production .second-box-axes .tabs .tab {
+.card-axes-production .first-box-axes .tabs .tab {
visibility: visible;
width: 77px;
border-right: solid 1px #979797;
}
-.card-axes-production .second-box-axes .tabs .tab.active {
+.card-axes-production .first-box-axes .tabs .tab.active {
background-color: #fff;
border-top: solid 2px #1791ff !important;
}
-.card-axes-production .second-box-axes .tabs .tab:last-child {
+.card-axes-production .first-box-axes .tabs .tab:last-child {
border: none;
}
-.card-axes-production .second-box-axes .content-box {
+.card-axes-production .first-box-axes .content-box {
height: calc(100% - 30px);
width: 100%;
display: flex;
flex-flow: column;
overflow: auto;
}
+.override-box {
+ height: 260px;
+ width: 232px;
+ display: block;
+ margin: auto;
+ border-radius: 2px;
+ box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
+}
+.override-box .label-container {
+ display: flex;
+ justify-content: space-around;
+ font-weight: 600;
+ text-align: center;
+}
+.override-box .label-container .title {
+ font-size: 14px;
+}
+.override-box .label-container .value {
+ font-size: 25px;
+}
+.override-box .label-container .rapid {
+ color: #002680;
+}
+.override-box .label-container .work {
+ color: #1791ff;
+}
.card-folder-path {
width: auto;
height: 64px;
@@ -17390,6 +17453,7 @@ footer .container button.big:before {
margin-left: 132px;
}
.accordion-maintenance section .dropdown .all-message-box .message-box .message-box-body.my {
+ margin-top: 5px;
margin-left: 15px;
}
.accordion-maintenance section .dropdown .all-message-box .message-box .message-box-body .text-date {
@@ -18419,7 +18483,7 @@ footer .container button.big:before {
height: 353px;
width: 232px;
border-radius: 2px;
- margin-top: 8px;
+ margin-top: 12px;
margin-bottom: 16px;
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
}
@@ -18465,10 +18529,26 @@ footer .container button.big:before {
float: right;
border-radius: 2px;
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
+ position: relative;
}
.production-container .production-box .box-softkeys-prefered.has-scada {
height: 360px !important;
}
+.production-container .production-box .box-softkeys-prefered .SelectionInProgress {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ font-size: 2em;
+ font-weight: 600;
+ background-color: rgba(217, 217, 217, 0.5);
+ flex-flow: column;
+ line-height: 2.5em;
+}
.production-container .production-box .box-softkeys-prefered .box-softkeys-prefered-header {
display: flex;
height: 62px;
@@ -19203,6 +19283,7 @@ footer .container button.big:before {
margin-left: 132px;
}
.job-editor-container .job-editor-box .job-editor-body .job-editor-body-box .job-editor-body-box-right .box-right-body .box-right-body-container .all-message-box .message-box .message-box-body.my {
+ margin-top: 5px;
margin-left: 15px;
}
.job-editor-container .job-editor-box .job-editor-body .job-editor-body-box .job-editor-body-box-right .box-right-body .box-right-body-container .all-message-box .message-box .message-box-body .text-date {
@@ -19591,6 +19672,35 @@ footer .container button.big:before {
.card-scada-production .card-scada-prod-body input[type=number]:disabled {
border: solid 1px #FFFFFF;
}
+.card-scada-production .card-scada-prod-body .input-group {
+ display: flex;
+}
+.card-scada-production .card-scada-prod-body .input-group input::-webkit-outer-spin-button,
+.card-scada-production .card-scada-prod-body .input-group input::-webkit-inner-spin-button {
+ /* display: none; <- Crashes Chrome on hover */
+ -webkit-appearance: none;
+ margin: 0;
+ /* <-- Apparently some margin are still there even though it's hidden */
+}
+.card-scada-production .card-scada-prod-body .input-group-append {
+ display: flex;
+ margin-left: 0px;
+ align-items: center;
+ justify-content: center;
+}
+.card-scada-production .card-scada-prod-body .appended-btn {
+ position: relative;
+ z-index: 2;
+ background-image: linear-gradient(to bottom, #1756ad, #002680);
+ color: white;
+ border: #001e48 1px solid;
+}
+.card-scada-production .card-scada-prod-body .appended-btn:active {
+ background-image: linear-gradient(to bottom, #002680, #1756ad) !important;
+ box-shadow: inset 0 1px 2px 0 rgba(0, 0, 0, 0.4);
+ border: #001e48 1px solid !important;
+ color: #8eb5e2;
+}
.scada-container {
height: 100%;
width: 100%;
@@ -19675,6 +19785,7 @@ footer .container button.big:before {
}
.scada-container .scada-box .scada-box-body input[type=number] {
border: solid 1px #ccc;
+ padding: 0px;
}
.scada-container .scada-box .scada-box-body input[type=number]:disabled {
border: solid 1px #FFFFFF;
@@ -19704,6 +19815,35 @@ footer .container button.big:before {
.scada-container .scada-box .scada-box-body > * {
position: absolute;
}
+.scada-container .scada-box .scada-box-body .input-group {
+ display: flex;
+}
+.scada-container .scada-box .scada-box-body .input-group input::-webkit-outer-spin-button,
+.scada-container .scada-box .scada-box-body .input-group input::-webkit-inner-spin-button {
+ /* display: none; <- Crashes Chrome on hover */
+ -webkit-appearance: none;
+ margin: 0;
+ /* <-- Apparently some margin are still there even though it's hidden */
+}
+.scada-container .scada-box .scada-box-body .input-group-append {
+ display: flex;
+ margin-left: 0px;
+ align-items: center;
+ justify-content: center;
+}
+.scada-container .scada-box .scada-box-body .appended-btn {
+ position: relative;
+ z-index: 2;
+ background-image: linear-gradient(to bottom, #1756ad, #002680);
+ color: white;
+ border: #001e48 1px solid;
+}
+.scada-container .scada-box .scada-box-body .appended-btn:active {
+ background-image: linear-gradient(to bottom, #002680, #1756ad) !important;
+ box-shadow: inset 0 1px 2px 0 rgba(0, 0, 0, 0.4);
+ border: #001e48 1px solid !important;
+ color: #8eb5e2;
+}
.event-transparent {
pointer-events: none;
}
@@ -20480,10 +20620,11 @@ a:active {
text-decoration: none;
}
.persona {
- height: 88px;
- width: 88px;
- border-radius: 88px;
- font-size: 88px;
+ height: 80px;
+ width: 80px;
+ line-height: 80px;
+ border-radius: 80px;
+ font-size: 50px;
text-align: center;
background-color: #002680;
color: white;
diff --git a/Step/wwwroot/src/@types/tooling.d.ts b/Step/wwwroot/src/@types/tooling.d.ts
index 14668413..6f34d0e1 100644
--- a/Step/wwwroot/src/@types/tooling.d.ts
+++ b/Step/wwwroot/src/@types/tooling.d.ts
@@ -133,7 +133,10 @@ declare module server {
length: number,
radius: number,
wearLength: number,
- wearRadius: number
+ wearRadius: number,
+ unitOfMeasure: string,
+ realRadius: number,
+ realLength: number
}
export interface ShankNc{
@@ -209,6 +212,7 @@ declare module server {
childId: number,
familyName: string,
type: number
+ id: number
}
export interface MagazinesPositions {
diff --git a/Step/wwwroot/src/App.ts b/Step/wwwroot/src/App.ts
index 0a239622..79456ff8 100644
--- a/Step/wwwroot/src/App.ts
+++ b/Step/wwwroot/src/App.ts
@@ -1,11 +1,11 @@
import Vue from "vue";
import { Hub } from "./services/hub";
-import { Header, Footer } from "./app.modules";
+import { Header, Footer, LocalizationService } from "./app.modules";
import { Login } from "src/app_modules/machine";
import { alarmList } from "src/app_modules/alarms";
-import { LoginService } from "src/services/loginService";
+import { loginService } from "src/services/loginService";
import { DataService } from "src/services/dataService";
-import { Factory, MessageService } from "./_base";
+import { Factory, messageService } from "./_base";
import { ModalContainer, ModalNcContainer } from "./modules/base-components";
import { ModalHelper } from "src/components/modals"
import { appModelActions } from "src/store";
@@ -15,9 +15,13 @@ import * as iziToast from "izitoast";
import moment from "moment";
import Component from "vue-class-component";
import { Watch } from "vue-property-decorator";
+import { UsersService } from "./services/usersService";
declare var cmsClient;
+
+
+
@Component({
name: "app",
components: {
@@ -48,7 +52,7 @@ export default class app extends Vue {
moment.locale((window.navigator as any).userLanguage || window.navigator.language);
}
mounted() {
- let ms = Factory.Get(MessageService);
+ let ms = messageService;
// if cms is connected
if (typeof cmsClient != "undefined")
@@ -58,6 +62,14 @@ export default class app extends Vue {
this.applyBlur = true;
});
+ ms.subscribeToChannel("show-modal-login", args => {
+ this.applyBlur = true;
+ });
+
+ ms.subscribeToChannel("hide-modal-login", args => {
+ this.applyBlur = false;
+ });
+
ms.subscribeToChannel("hide-modal", args => {
this.applyBlur = false;
});
@@ -101,18 +113,17 @@ export default class app extends Vue {
});
let $this = this;
- Factory.Get(LoginService)
- .getUserInfo()
+ loginService.getUserInfo()
.then(() => {
if (!$this.isAuthenticated)
- $this.$nextTick(() => ModalHelper.ShowModal(Login));
+ $this.$nextTick(() => ModalHelper.ShowModalLogin(Login));
});
this.$store.watch(
s => s.currentUser,
(n, o) => {
if (!n) {
- this.$nextTick(() => ModalHelper.ShowModal(Login));
+ this.$nextTick(() => ModalHelper.ShowModalLogin(Login));
} else
new DataService().SetCurrentNcLanguage(
this.$store.state.currentUser.language
@@ -125,7 +136,7 @@ export default class app extends Vue {
window.addEventListener("keyup", function (event) {
// If down arrow was pressed...
if (event.keyCode == 27) {
- Factory.Get(MessageService).publishToChannel("esc_pressed");
+ messageService.publishToChannel("esc_pressed");
}
});
}
@@ -146,24 +157,24 @@ export default class app extends Vue {
this.applyViewPosition(-window.innerHeight + 84);
//Hide the HMI if is showed (in production)
- Factory.Get(MessageService).publishToChannel("HMI-production-hide");
- Factory.Get(MessageService).publishToChannel("PROD-production-hide");
+ messageService.publishToChannel("HMI-production-hide");
+ messageService.publishToChannel("PROD-production-hide");
//Show the HMI with delay (For the animation)
- Factory.Get(MessageService).publishToChannel("HMI-show", 500);
+ messageService.publishToChannel("HMI-show", 500);
} else {
//Setup the Position of the View
this.applyViewPosition(0);
//Hide the HMI
- Factory.Get(MessageService).publishToChannel("HMI-hide");
+ messageService.publishToChannel("HMI-hide");
//Launche the show in delay if we are in production
if (this.showHMIinProduction && this.$route.path.includes("production"))
- Factory.Get(MessageService).publishToChannel(
+ messageService.publishToChannel(
"HMI-production-show",
700
);
if (this.showPRODinProduction && this.$route.path.includes("production"))
- Factory.Get(MessageService).publishToChannel(
+ messageService.publishToChannel(
"PROD-production-show",
700
);
@@ -199,10 +210,10 @@ export default class app extends Vue {
this.hub.Hello();
}
onstartdrag() {
- Factory.Get(MessageService).publishToChannel("HMI-start-drag");
+ messageService.publishToChannel("HMI-start-drag");
}
onstopdrag() {
- Factory.Get(MessageService).publishToChannel("HMI-stop-drag", 600);
+ messageService.publishToChannel("HMI-stop-drag", 600);
}
toggleMainView(direction) {
if (!direction || direction == "down" || direction == "none")
@@ -212,7 +223,7 @@ export default class app extends Vue {
}
}
sendMessage(name) {
- Factory.Get(MessageService).publishToChannel(name);
+ messageService.publishToChannel(name);
}
movepanel(e) {
if (e && e.touches && e.touches[0]) {
diff --git a/Step/wwwroot/src/App.vue b/Step/wwwroot/src/App.vue
index e3597905..5c0fc481 100644
--- a/Step/wwwroot/src/App.vue
+++ b/Step/wwwroot/src/App.vue
@@ -21,6 +21,7 @@
+
diff --git a/Step/wwwroot/src/_base/baseRestService.ts b/Step/wwwroot/src/_base/baseRestService.ts
index d8144b6c..de27ec3d 100644
--- a/Step/wwwroot/src/_base/baseRestService.ts
+++ b/Step/wwwroot/src/_base/baseRestService.ts
@@ -1,7 +1,6 @@
import Axios, { AxiosInstance, AxiosPromise, AxiosResponse, AxiosBasicCredentials, AxiosRequestConfig } from "axios";
import Factory from "./factoryService";
import * as iziToast from "izitoast";
-import { MessageService } from "./messageService";
// import { localizeString } from "../filters/localizeFilter";
import { store, AppModel } from "src/store";
diff --git a/Step/wwwroot/src/_base/index.js b/Step/wwwroot/src/_base/index.js
index b2b875e1..3bb74af6 100644
--- a/Step/wwwroot/src/_base/index.js
+++ b/Step/wwwroot/src/_base/index.js
@@ -1,19 +1,19 @@
import Factory from "./factoryService";
-import { MessageService } from "./messageService";
+import { messageService } from "./messageService";
import { UUID,Utilities } from "./utils";
export function awaiter(promise) {
- Factory.Get(MessageService).publishToChannel("show-loading");
+ messageService.publishToChannel("show-loading");
return promise.then(data => {
- Factory.Get(MessageService).publishToChannel("hide-loading");
+ messageService.publishToChannel("hide-loading");
return data
})
.catch(err => {
- Factory.Get(MessageService).publishToChannel("hide-loading");
+ messageService.publishToChannel("hide-loading");
return Promise.reject(err);
});
}
-export { Factory, MessageService, UUID, Utilities };
\ No newline at end of file
+export { Factory, UUID, Utilities, messageService };
\ No newline at end of file
diff --git a/Step/wwwroot/src/_base/messageService.ts b/Step/wwwroot/src/_base/messageService.ts
index 045efff9..98fd3061 100644
--- a/Step/wwwroot/src/_base/messageService.ts
+++ b/Step/wwwroot/src/_base/messageService.ts
@@ -4,7 +4,7 @@ import Vue from "vue";
// Message Service Definition
// --------------------------------------------------
-export class MessageService {
+class MessageService {
private _events: Vue = new Vue({});
@@ -28,5 +28,4 @@ export class MessageService {
}
}
-Factory.Register(MessageService);
-
+export const messageService = new MessageService();
\ No newline at end of file
diff --git a/Step/wwwroot/src/app.business-logic.ts b/Step/wwwroot/src/app.business-logic.ts
index b0e21b2b..74f548b4 100644
--- a/Step/wwwroot/src/app.business-logic.ts
+++ b/Step/wwwroot/src/app.business-logic.ts
@@ -1,11 +1,11 @@
-import { MessageService, Factory } from "./_base";
+import { Factory, messageService } from "./_base";
import { machineService } from "src/services/machineService";
-import { LoginService } from "src/services/loginService";
+import { loginService } from "src/services/loginService";
import { store, AppModel, MachineStatusModel, machineStatusActions, localizationModelActions, machineInfoActions } from "src/store";
-import { UserInfoDialog, MachineInfoDialog, AxesCalibration, Login } from "src/app_modules/machine";
+import { UserInfoDialog, MachineInfoDialog, AxesCalibration, ContactInfoDialog, Login } from "src/app_modules/machine";
import { AreaModel } from "src/store/machineStatus.store";
@@ -13,12 +13,16 @@ import { DataService } from "./services/dataService";
import { ToolingService } from "./services/toolingService";
import { DepotService } from "./services/depotService";
import { MaintenanceService } from "./services/maintenanceService";
-import { localizationService } from "./services/localizationService";
+import { localizationService, LocalizationService } from "./services/localizationService";
import { DEBUG_CONFIGURATION, USE_RUNTIME_CONFIGURATION } from "./config";
import { ModalHelper } from "./components/modals";
import Vue from "vue";
import { scadaService } from "./services/scadaService";
import { Hub } from "./services";
+import { UsersService } from "./services/usersService";
+
+Factory.Register(UsersService);
+Factory.Register(LocalizationService);
declare let cmsClient: any;
let HMIvisible = false;
@@ -39,10 +43,10 @@ let HMIScreenshotInterval;
let HMIprodTimeout;
let RerenderInterval;
-const messageService = Factory.Get(MessageService);
messageService.subscribeToChannel("show-user-info", () => { ModalHelper.ShowModal(UserInfoDialog); });
messageService.subscribeToChannel("show-machine-info", () => { ModalHelper.ShowModal(MachineInfoDialog); });
+messageService.subscribeToChannel("show-contact-info", () => { ModalHelper.ShowModal(ContactInfoDialog); });
messageService.subscribeToChannel("show-axes-calibration", () => { ModalHelper.ShowNcModal(AxesCalibration); });
messageService.subscribeToChannel("hide-axes-calibration", () => { ModalHelper.HideNcModal(AxesCalibration); });
messageService.subscribeToChannel("show-m155-questions", () => { ModalHelper.ShowNextM155Modal(); });
@@ -58,12 +62,12 @@ messageService.subscribeToChannel("show-nochange-page", () => {
//Loading machine configuration
async function loadMachineConfig() {
- await Factory.Get(LoginService).getUserInfo();
- try{
- await scadaService.ListScada();
- }catch(err){
+ await loginService.getUserInfo();
+ // try{
+ // await scadaService.ListScada();
+ // }catch(err){
- }
+ // }
try {
@@ -85,9 +89,9 @@ async function loadMachineConfig() {
// set vendor type
switch (vendor) {
- case "siemens": machineInfoActions.updateMachineInfo(store, { isSiemens: true, isFanuc: false, isOsai: false, defaultLanguage: mcresult.defaultLanguage, isSCMVisualStyle: isSCM }); break;
- case "fanuc": machineInfoActions.updateMachineInfo(store, { isSiemens: false, isFanuc: true, isOsai: false, defaultLanguage: mcresult.defaultLanguage, isSCMVisualStyle: isSCM }); break;
- case "osai": machineInfoActions.updateMachineInfo(store, { isSiemens: false, isFanuc: false, isOsai: true, defaultLanguage: mcresult.defaultLanguage, isSCMVisualStyle: isSCM }); break;
+ case "siemens": machineInfoActions.updateMachineInfo(store, { isSiemens: true, isFanuc: false, isOsai: false, defaultLanguage: mcresult.defaultLanguage, isSCMVisualStyle: isSCM, mgiOption : false }); break;
+ case "fanuc": machineInfoActions.updateMachineInfo(store, { isSiemens: false, isFanuc: true, isOsai: false, defaultLanguage: mcresult.defaultLanguage, isSCMVisualStyle: isSCM, mgiOption: mcresult.mgiOption }); break;
+ case "osai": machineInfoActions.updateMachineInfo(store, { isSiemens: false, isFanuc: false, isOsai: true, defaultLanguage: mcresult.defaultLanguage, isSCMVisualStyle: isSCM, mgiOption: false }); break;
default: machineInfoActions.updateMachineInfo(store, { isSiemens: false, isFanuc: false, isOsai: false, defaultLanguage: mcresult.defaultLanguage, isSCMVisualStyle: isSCM }); break;
}
@@ -127,7 +131,6 @@ if (typeof cmsClient != "undefined") {
Vue.filter('localize')("modal_confirm_close_application", "Sei sicuro di voler chiudere l'applicazione?"),
() => {
messageService.publishToChannel("close-scada");
- Hub.Current.QuitServerApp();
cmsClient.closeForm();
},null ,'modal');
}
@@ -155,7 +158,7 @@ if (typeof cmsClient != "undefined") {
cmsClient.setNcWindowState(0);
//Events handler
- Factory.Get(MessageService).subscribeToChannel("HMI-show", args => {
+ messageService.subscribeToChannel("HMI-show", args => {
clearTimeout(HMIshowTimeout);
if (args[0] > 0)
HMIshowTimeout = setTimeout(ShowHmi, args[0]);
@@ -163,7 +166,7 @@ if (typeof cmsClient != "undefined") {
ShowHmi()
});
- Factory.Get(MessageService).subscribeToChannel("HMI-hide", args => {
+ messageService.subscribeToChannel("HMI-hide", args => {
clearTimeout(HMIshowTimeout);
if (args[0] > 0)
HMIshowTimeout = setTimeout(HideHmi, args[0]);
@@ -171,7 +174,7 @@ if (typeof cmsClient != "undefined") {
HideHmi()
});
- Factory.Get(MessageService).subscribeToChannel("HMI-production-show", args => {
+ messageService.subscribeToChannel("HMI-production-show", args => {
clearTimeout(HMIprodTimeout);
if (args[0] > 0)
HMIprodTimeout = setTimeout(ShowHmiProduction, args[0]);
@@ -179,7 +182,7 @@ if (typeof cmsClient != "undefined") {
ShowHmiProduction()
});
- Factory.Get(MessageService).subscribeToChannel("HMI-production-hide", args => {
+ messageService.subscribeToChannel("HMI-production-hide", args => {
clearTimeout(HMIprodTimeout);
if (args[0] > 0)
HMIprodTimeout = setTimeout(HideHmiProduction, args[0]);
@@ -189,7 +192,7 @@ if (typeof cmsClient != "undefined") {
});
- Factory.Get(MessageService).subscribeToChannel("PROD-production-show", args => {
+ messageService.subscribeToChannel("PROD-production-show", args => {
clearTimeout(PRODprodTimeout);
if (args[0] > 0)
PRODprodTimeout = setTimeout(ShowProdProduction, args[0]);
@@ -197,7 +200,7 @@ if (typeof cmsClient != "undefined") {
ShowProdProduction()
});
- Factory.Get(MessageService).subscribeToChannel("PROD-production-hide", args => {
+ messageService.subscribeToChannel("PROD-production-hide", args => {
clearTimeout(PRODprodTimeout);
if (args[0] > 0)
PRODprodTimeout = setTimeout(HideProdProduction, args[0]);
@@ -206,7 +209,7 @@ if (typeof cmsClient != "undefined") {
});
- Factory.Get(MessageService).subscribeToChannel("HMI-show-alarms", args => {
+ messageService.subscribeToChannel("HMI-show-alarms", args => {
clearTimeout(HMIAlarmsTimeout);
if (args[0] > 0)
HMIAlarmsTimeout = setTimeout(showAlarms, args[0]);
@@ -214,7 +217,7 @@ if (typeof cmsClient != "undefined") {
showAlarms()
});
- Factory.Get(MessageService).subscribeToChannel("HMI-hide-alarms", args => {
+ messageService.subscribeToChannel("HMI-hide-alarms", args => {
clearTimeout(HMIAlarmsTimeout);
if (args[0] > 0)
HMIAlarmsTimeout = setTimeout(hideAlarms, args[0]);
@@ -222,7 +225,7 @@ if (typeof cmsClient != "undefined") {
hideAlarms()
});
- Factory.Get(MessageService).subscribeToChannel("HMI-show-modal", args => {
+ messageService.subscribeToChannel("HMI-show-modal", args => {
clearTimeout(HMIModalsTimeout);
if (args[0] > 0)
HMIModalsTimeout = setTimeout(showModal, args[0]);
@@ -230,7 +233,7 @@ if (typeof cmsClient != "undefined") {
showModal()
});
- Factory.Get(MessageService).subscribeToChannel("HMI-show-modal-nc", args => {
+ messageService.subscribeToChannel("HMI-show-modal-nc", args => {
clearTimeout(HMIModalsNcTimeout);
if (args[0] > 0)
HMIModalsNcTimeout = setTimeout(showNcModal, args[0]);
@@ -238,7 +241,7 @@ if (typeof cmsClient != "undefined") {
showNcModal()
});
- Factory.Get(MessageService).subscribeToChannel("HMI-hide-modal-nc", args => {
+ messageService.subscribeToChannel("HMI-hide-modal-nc", args => {
clearTimeout(HMIModalsNcTimeout);
if (args[0] > 0)
HMIModalsNcTimeout = setTimeout(hideNcModal, args[0]);
@@ -246,7 +249,7 @@ if (typeof cmsClient != "undefined") {
hideNcModal()
});
- Factory.Get(MessageService).subscribeToChannel("HMI-hide-modal", args => {
+ messageService.subscribeToChannel("HMI-hide-modal", args => {
clearTimeout(HMIModalsTimeout);
if (args[0] > 0)
HMIModalsTimeout = setTimeout(hideModal, args[0]);
@@ -254,7 +257,7 @@ if (typeof cmsClient != "undefined") {
hideModal()
});
- Factory.Get(MessageService).subscribeToChannel("HMI-start-drag", args => {
+ messageService.subscribeToChannel("HMI-start-drag", args => {
clearTimeout(HMIDraggingTimeout);
if (args[0] > 0)
HMIDraggingTimeout = setTimeout(startDrag, args[0]);
@@ -262,7 +265,7 @@ if (typeof cmsClient != "undefined") {
startDrag()
});
- Factory.Get(MessageService).subscribeToChannel("HMI-stop-drag", args => {
+ messageService.subscribeToChannel("HMI-stop-drag", args => {
clearTimeout(HMIDraggingTimeout);
if (args[0] > 0)
HMIDraggingTimeout = setTimeout(stopDrag, args[0]);
@@ -365,10 +368,10 @@ function ElaborateHMIStatus() {
// Enable/Disable Scrollers
-Factory.Get(MessageService).subscribeToChannel("disable-scroll", (args) => {
+messageService.subscribeToChannel("disable-scroll", (args) => {
disableScroll(args[0]);
});
-Factory.Get(MessageService).subscribeToChannel("enable-scroll", (args) => {
+messageService.subscribeToChannel("enable-scroll", (args) => {
enableScroll(args[0]);
});
// Scroll manipulation
diff --git a/Step/wwwroot/src/app.modules.ts b/Step/wwwroot/src/app.modules.ts
index f4396100..c8ba3362 100644
--- a/Step/wwwroot/src/app.modules.ts
+++ b/Step/wwwroot/src/app.modules.ts
@@ -1,5 +1,5 @@
// GLobal services
-import { LoginService } from "./services/loginService";
+import { loginService } from "./services/loginService";
import { LocalizationService } from "./services/localizationService";
// Page and modules
@@ -39,7 +39,7 @@ import ModalReportSelectColumn from './modules/base-components/modal-report-sele
export {
- LoginService,
+ loginService,
LocalizationService,
Header,
Footer,
diff --git a/Step/wwwroot/src/app_modules/alarms/components/alarm-detail.ts b/Step/wwwroot/src/app_modules/alarms/components/alarm-detail.ts
index fc75039a..389ed3c3 100644
--- a/Step/wwwroot/src/app_modules/alarms/components/alarm-detail.ts
+++ b/Step/wwwroot/src/app_modules/alarms/components/alarm-detail.ts
@@ -97,7 +97,7 @@ export default class AlarmDetail extends Vue {
let idx = $this.attaches.indexOf(attach);
$this.attaches.splice(idx, 1);
});
- }, null);
+ }, null, "modal");
}
}
diff --git a/Step/wwwroot/src/app_modules/alarms/components/alarm-history.ts b/Step/wwwroot/src/app_modules/alarms/components/alarm-history.ts
index 6d171a4c..975817e7 100644
--- a/Step/wwwroot/src/app_modules/alarms/components/alarm-history.ts
+++ b/Step/wwwroot/src/app_modules/alarms/components/alarm-history.ts
@@ -11,7 +11,7 @@ import { AlarmModel } from "@/src/store";
import { loginService } from "src/services";
import { alarmsService } from "src/services/alarmsService";
-import { awaiter } from "src/_base";
+import { awaiter, messageService } from "src/_base";
import { getColorFromName, isDarkColor } from "src/_base/utils";
import DatePicker from "vue2-datepicker";
@@ -73,6 +73,7 @@ export default class AlarmHistory extends Vue {
currentPage: number = 0;
itemsPerPage: number = 9;
totalPages: number = 1;
+ canDelete: boolean = false;
get currentUser() {
@@ -107,10 +108,11 @@ export default class AlarmHistory extends Vue {
arrayUserFilter.push(user.id);
})
- let result = await awaiter(alarmsService.getAlarms(this.filter.title, arraySourceFilter, arrayUserFilter, from, to, this.currentPage, this.itemsPerPage));
+ let result = await awaiter(alarmsService.getAlarms(this.filter.title, arraySourceFilter, arrayUserFilter, from, to, this.currentPage, this.itemsPerPage,
+ this.$store.state.currentUser.language));
this.data = result.alarms;
this.totalPages = result.pages;
-
+ this.canDelete = result.canDelete;
}
async mounted() {
@@ -125,14 +127,17 @@ export default class AlarmHistory extends Vue {
this.filter.multiUser.push(this.users[index].username);
}
this.onloading = false;
+
+ messageService.subscribeToChannel("login-reload",
+ () => {
+ this.filterChanged("","")
+ });
}
async onChange(e) {
this.newAttach = e.target.files[0];
let result = await awaiter(alarmsService.postAttachment(this.selectedAlarm.alarmId, this.selectedAlarm.source, this.newAttach));
this.attaches.push(result.data);
-
- // new MaintenanceService().uploadFile(this.selectedMaintenance, this.state.file);
}
user(id: number) {
@@ -145,6 +150,15 @@ export default class AlarmHistory extends Vue {
this.notes = await awaiter(alarmsService.getNote(this.selectedAlarm.alarmId, this.selectedAlarm.source));
}
+ async deleteAlarms(){
+ ModalHelper.AskConfirm(this.$options.filters.localize("modal_confirm_title", "Richiesta di conferma"),
+ this.$options.filters.localize("modal_confirm_delete_alarms", "Confermi la cancellazione di tutti gli allarmi salvati?"),
+ async () => {
+ await awaiter(alarmsService.DeleteAlarms())
+ this.filterChanged("","")
+ }, null);
+ }
+
async exportAlarms(){
let $this = this;
let from = this.filter.interval && this.filter.interval.length ? this.filter.interval[0] : null;
@@ -157,20 +171,12 @@ export default class AlarmHistory extends Vue {
arraySourceFilter.push(item.id);
});
- /*this.filter.multiUser.forEach(function (item) {
- $this.users.forEach(function (items) {
- if (items.username == item) {
- arrayUserFilter.push(items.id);
- }
- })
- })*/
-
this.filter.multiUser.forEach(function (item) {
var user = $this.users.find(x => x.username == item)
arrayUserFilter.push(user.id);
})
- await awaiter(alarmsService.exportAlarms(this.filter.title, arraySourceFilter, arrayUserFilter, from, to));
+ await awaiter(alarmsService.exportAlarms(this.filter.title, arraySourceFilter, arrayUserFilter, from, to, this.$store.state.currentUser.language));
}
updateLimitation() {
diff --git a/Step/wwwroot/src/app_modules/alarms/components/alarm-history.vue b/Step/wwwroot/src/app_modules/alarms/components/alarm-history.vue
index 21eb48b8..32504567 100644
--- a/Step/wwwroot/src/app_modules/alarms/components/alarm-history.vue
+++ b/Step/wwwroot/src/app_modules/alarms/components/alarm-history.vue
@@ -85,6 +85,9 @@
+
diff --git a/Step/wwwroot/src/app_modules/machine/components/contact-info-dialog.ts b/Step/wwwroot/src/app_modules/machine/components/contact-info-dialog.ts
new file mode 100644
index 00000000..40aad79d
--- /dev/null
+++ b/Step/wwwroot/src/app_modules/machine/components/contact-info-dialog.ts
@@ -0,0 +1,31 @@
+import Vue from "vue";
+import { Modal, ModalHelper } from "src/components/modals";
+import { machineService, ContactConfigurationModel } from "src/services/machineService";
+import { Factory, messageService, awaiter } from "src/_base";
+import Component from "vue-class-component";
+
+@Component({ components: { modal: Modal } })
+export default class ContactInfoDialog extends Vue {
+ public contactInfo: ContactConfigurationModel = {
+ name:"",
+ phoneNumber: "",
+ email: ""
+ };
+
+ async beforeMount() {
+ this.contactInfo = await awaiter(new machineService().getContactConfiguration());
+ messageService.subscribeToChannel("esc_pressed", args => {
+ this.close();
+ });
+ }
+
+ beforeDestroy() {
+ messageService.deleteChannel("esc_pressed");
+ }
+
+ close() {
+ messageService.deleteChannel("esc_pressed");
+ ModalHelper.HideModal();
+ }
+}
+
diff --git a/Step/wwwroot/src/app_modules/machine/components/contact-info-dialog.vue b/Step/wwwroot/src/app_modules/machine/components/contact-info-dialog.vue
new file mode 100644
index 00000000..2fde904b
--- /dev/null
+++ b/Step/wwwroot/src/app_modules/machine/components/contact-info-dialog.vue
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Step/wwwroot/src/app_modules/machine/components/login.ts b/Step/wwwroot/src/app_modules/machine/components/login.ts
index d789a560..0ab9c5ae 100644
--- a/Step/wwwroot/src/app_modules/machine/components/login.ts
+++ b/Step/wwwroot/src/app_modules/machine/components/login.ts
@@ -2,13 +2,16 @@ import Vue from "vue";
import Component from "vue-class-component";
import { Modal, ModalHelper } from "src/components/modals"
-import { Factory, MessageService, awaiter } from "src/_base";
-import { LoginService } from "src/app.modules";
+import { Factory, messageService, awaiter } from "src/_base";
+import { loginService } from "src/app.modules";
import { DataService } from 'src/services/dataService';
import iziToast, { IziToastSettings } from "izitoast";
+import { store, machineStatusActions } from "src/store";
@Component({ name: "login", components: { modal: Modal } })
export default class Login extends Vue {
+ $route: any;
+ $router: any;
public user: server.loginViewModel = { password: null, username: null };
public hasError: boolean = false;
@@ -16,22 +19,33 @@ export default class Login extends Vue {
public logginIn: boolean = false;
async doLogin() {
- var service = Factory.Get(LoginService);
-
+ var service = loginService;
+ var userNotAuthorized = false;
this.logginIn = true;
- if (await awaiter(service.doLogin(this.user)).then(() => {
- Factory.Get(MessageService).publishToChannel("update-maintenance");
- Factory.Get(MessageService).publishToChannel("update-softkeys-favorite");
- ModalHelper.HideModal();
+ await awaiter(service.doLogin(this.user)).then(() => {
+ // messageService.publishToChannel("update-maintenance");
+ messageService.publishToChannel("update-softkeys-favorite");
+ messageService.publishToChannel("login-reload");
+
+ // Check if user can access to current view, else redirect to production
+ if(!this.checkIfUserIsAuthorized()){
+ userNotAuthorized = true;
+ }
}).catch(() => {
this.logginIn = false;
this.hasError = !service.isAuthenticated;
- }))
- ModalHelper.HideModal();
+ })
+
+ if(this.logginIn) {
+ if(userNotAuthorized)
+ this.$router.push('/production')
+
+ ModalHelper.HideModal("modal-login");
+ }
}
mounted(){
- Factory.Get(MessageService).subscribeToChannel("force-ui-update", args => {
+ messageService.subscribeToChannel("force-ui-update", args => {
this.$forceUpdate();
});
document.body.addEventListener('keydown', function(e) {
@@ -40,7 +54,22 @@ export default class Login extends Vue {
}
return true;
})
+ }
+ checkIfUserIsAuthorized(): boolean {
+ return machineStatusActions.isAreaVisible(store, this.URLS_TO_FUNCTIONS_BINDING[this.$route.path]);
+ }
+
+ URLS_TO_FUNCTIONS_BINDING = {
+ "/production": "production",
+ "/tooling": "tooling",
+ "/report": "report",
+ "/alarms": "alarms",
+ "/maintenance": "maintenance",
+ "/scada": "scada",
+ "/users": "users",
+ "/jobeditor": "job-editor",
+ "/utilities": "utilities"
}
}
diff --git a/Step/wwwroot/src/app_modules/machine/components/m155-dialog.ts b/Step/wwwroot/src/app_modules/machine/components/m155-dialog.ts
index 6d3a03dd..353080a5 100644
--- a/Step/wwwroot/src/app_modules/machine/components/m155-dialog.ts
+++ b/Step/wwwroot/src/app_modules/machine/components/m155-dialog.ts
@@ -3,7 +3,7 @@ import { Modal, ModalHelper } from "src/components/modals";
import Component from "vue-class-component";
import Vue from "vue";
import { Hub } from "src/services";
-import { Factory, MessageService } from "src/_base";
+import { Factory, messageService } from "src/_base";
import { Watch } from "vue-property-decorator";
@Component({ components: { modal: Modal } })
@@ -19,7 +19,7 @@ export default class M155Dialog extends Vue{
mounted(){
this.data = ModalHelper.M155ModalData.data;
this.value = 0;
- Factory.Get(MessageService).subscribeToChannel("show-modal-nc", args => {
+ messageService.subscribeToChannel("show-modal-nc", args => {
this.data = ModalHelper.M155ModalData.data;
});
}
diff --git a/Step/wwwroot/src/app_modules/machine/components/machine-info-dialog.ts b/Step/wwwroot/src/app_modules/machine/components/machine-info-dialog.ts
index 81fc1a24..99720c69 100644
--- a/Step/wwwroot/src/app_modules/machine/components/machine-info-dialog.ts
+++ b/Step/wwwroot/src/app_modules/machine/components/machine-info-dialog.ts
@@ -1,7 +1,7 @@
import Vue from "vue";
import { Modal, ModalHelper } from "src/components/modals";
import { machineService } from "src/services/machineService";
-import { Factory, MessageService } from "src/_base";
+import { Factory, messageService } from "src/_base";
import moment from "moment";
import Component from "vue-class-component";
@@ -12,16 +12,16 @@ export default class MachineInfoDialog extends Vue {
beforeMount() {
new machineService().getMachineCNInfo();
- Factory.Get(MessageService).subscribeToChannel("esc_pressed", args => {
+ messageService.subscribeToChannel("esc_pressed", args => {
this.close();
});
}
beforeDestroy() {
- Factory.Get(MessageService).deleteChannel("esc_pressed");
+ messageService.deleteChannel("esc_pressed");
}
close() {
- Factory.Get(MessageService).deleteChannel("esc_pressed");
+ messageService.deleteChannel("esc_pressed");
ModalHelper.HideModal();
}
diff --git a/Step/wwwroot/src/app_modules/machine/components/user-info-dialog.ts b/Step/wwwroot/src/app_modules/machine/components/user-info-dialog.ts
index edded262..af23a95a 100644
--- a/Step/wwwroot/src/app_modules/machine/components/user-info-dialog.ts
+++ b/Step/wwwroot/src/app_modules/machine/components/user-info-dialog.ts
@@ -5,8 +5,8 @@ import { Watch } from "vue-property-decorator";
import { Modal, ModalHelper } from "src/components/modals"
import { AppModel, localizationModelActions } from "src/store";
-import { Factory, MessageService, awaiter } from "src/_base";
-import { LoginService } from "src/app.modules";
+import { Factory, messageService, awaiter } from "src/_base";
+import { loginService } from "src/app.modules";
import { getColorFromName,isDarkColor } from "src/_base/utils";
import { LocalizationService, localizationService } from "src/services/localizationService";
import { DataService } from "src/services/dataService";
@@ -26,7 +26,7 @@ export default class UserInfo extends Vue {
doLogout() {
ModalHelper.HideModal();
- Factory.Get(LoginService).Logout();
+ loginService.Logout();
}
getColor(nome,cognome){
@@ -44,13 +44,13 @@ export default class UserInfo extends Vue {
this.currentLanguage = (this.$store.state as AppModel).localization.currentLanguage;
this.reloadLanguages();
- Factory.Get(MessageService).subscribeToChannel("esc_pressed", args => {
+ messageService.subscribeToChannel("esc_pressed", args => {
this.close();
});
}
beforeDestroy() {
- Factory.Get(MessageService).deleteChannel("esc_pressed");
+ messageService.deleteChannel("esc_pressed");
}
async reloadLanguages() {
diff --git a/Step/wwwroot/src/app_modules/machine/components/user-info.ts b/Step/wwwroot/src/app_modules/machine/components/user-info.ts
index 806de425..93a797b7 100644
--- a/Step/wwwroot/src/app_modules/machine/components/user-info.ts
+++ b/Step/wwwroot/src/app_modules/machine/components/user-info.ts
@@ -1,6 +1,6 @@
import Vue from "vue";
import Component from "vue-class-component";
-import { Factory, MessageService } from "src/_base";
+import { Factory, messageService } from "src/_base";
import moment from "moment";
import { AppModel } from "src/store";
import { getColorFromName,isDarkColor } from "src/_base/utils";
@@ -58,6 +58,6 @@ export default class UserInfo extends Vue {
}
public sendMessage(name:string) {
- Factory.Get(MessageService).publishToChannel(name);
+ messageService.publishToChannel(name);
}
}
diff --git a/Step/wwwroot/src/app_modules/machine/components/user-info.vue b/Step/wwwroot/src/app_modules/machine/components/user-info.vue
index 5e50dfd1..eb3da213 100644
--- a/Step/wwwroot/src/app_modules/machine/components/user-info.vue
+++ b/Step/wwwroot/src/app_modules/machine/components/user-info.vue
@@ -5,6 +5,10 @@
-->
+