From ed823280efb9b4ed5da13751a63d94a4582fc15d Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Thu, 26 Apr 2018 18:22:18 +0200 Subject: [PATCH] primi aggiustamenti pagina MON --- MP-MON/Content/Site.css | 12 +- MP-MON/Content/Site.less | 343 +++++++++++++-------------- MP-MON/Content/Site.min.css | 2 +- MP-MON/Controllers/HomeController.cs | 184 +++++++------- MP-MON/Views/Home/_checkIOB.cshtml | 12 +- MP-MON/Views/MSE/_StatusMap.cshtml | 6 +- MP/Views/Shared/_Layout.cshtml | 2 +- 7 files changed, 277 insertions(+), 284 deletions(-) diff --git a/MP-MON/Content/Site.css b/MP-MON/Content/Site.css index 5452d192..67249d74 100644 --- a/MP-MON/Content/Site.css +++ b/MP-MON/Content/Site.css @@ -4,7 +4,7 @@ body { font-family: 'Open Sans', sans-serif; background-color: #5d5d5d; - padding: 35px 40px 20px 40px; + padding: 25px 0 20px 0; } body .ui-body-a, body .ui-body-c, @@ -16,8 +16,8 @@ body .ui-overlay-c { } /* Set padding to keep content from hitting the edges */ .body-content { - padding-left: 15px; - padding-right: 15px; + padding-left: 0.1em; + padding-right: 0.1em; } /* Override the default bootstrap behavior where horizontal description lists will truncate terms that are too long to fit in the left column @@ -31,7 +31,6 @@ body .ui-overlay-c { } body { font-size: 0.8em; - padding: 35px 0 20px 0; } .logoImg { height: 30px; @@ -43,7 +42,6 @@ body .ui-overlay-c { } body { font-size: 1em; - padding: 35px 0 20px 0; } .logoImg { height: 35px; @@ -55,7 +53,6 @@ body .ui-overlay-c { } body { font-size: 1.2em; - padding: 35px 40px 20px 40px; } .logoImg { height: 40px; @@ -67,7 +64,6 @@ body .ui-overlay-c { } body { font-size: 1.4em; - padding: 35px 40px 20px 40px; } .logoImg { height: 40px; @@ -79,7 +75,6 @@ body .ui-overlay-c { } body { font-size: 1.6em; - padding: 35px 40px 20px 40px; } .logoImg { height: 40px; @@ -91,7 +86,6 @@ body .ui-overlay-c { } body { font-size: 0.7em; - padding: 35px 0 20px 0; } .logoImg { height: 25px; diff --git a/MP-MON/Content/Site.less b/MP-MON/Content/Site.less index 44cba668..e63fe632 100644 --- a/MP-MON/Content/Site.less +++ b/MP-MON/Content/Site.less @@ -3,176 +3,171 @@ /* Gestione blocchi base */ body { - font-family: 'Open Sans', sans-serif; - background-color: #5d5d5d; - padding: 35px 40px 20px 40px; + font-family: 'Open Sans', sans-serif; + background-color: #5d5d5d; + padding: 25px 0 20px 0; } - body .ui-body-a, body .ui-body-c, body .ui-overlay-c { - text-shadow: 0 0 0; - } + body .ui-body-a, body .ui-body-c, body .ui-overlay-c { + text-shadow: 0 0 0; + } .logoImg { - height: 40px; + height: 40px; } /* Set padding to keep content from hitting the edges */ .body-content { - padding-left: 15px; - padding-right: 15px; + padding-left: 0.1em; + padding-right: 0.1em; } /* Override the default bootstrap behavior where horizontal description lists will truncate terms that are too long to fit in the left column */ .dl-horizontal dt { - white-space: normal; + white-space: normal; } @media all and (min-width: 425px) { - .mainHead { - font-size: 1.3em; - } + .mainHead { + font-size: 1.3em; + } - body { - font-size: 0.8em; - padding: 35px 0 20px 0; - } + body { + font-size: 0.8em; + } - .logoImg { - height: 30px; - } + .logoImg { + height: 30px; + } } @media all and (min-width: 768px) { - .mainHead { - font-size: 1.4em; - } + .mainHead { + font-size: 1.4em; + } - body { - font-size: 1em; - padding: 35px 0 20px 0; - } + body { + font-size: 1em; + } - .logoImg { - height: 35px; - } + .logoImg { + height: 35px; + } } @media all and (min-width: 1024px) { - .mainHead { - font-size: 1.5em; - } + .mainHead { + font-size: 1.5em; + } - body { - font-size: 1.2em; - padding: 35px 40px 20px 40px; - } + body { + font-size: 1.2em; + } - .logoImg { - height: 40px; - } + .logoImg { + height: 40px; + } } @media all and (min-width: 1440px) { - .mainHead { - font-size: 1.6em; - } + .mainHead { + font-size: 1.6em; + } - body { - font-size: 1.4em; - padding: 35px 40px 20px 40px; - } + body { + font-size: 1.4em; + } - .logoImg { - height: 40px; - } + .logoImg { + height: 40px; + } } @media all and (min-width: 1600px) { - .mainHead { - font-size: 1.6em; - } + .mainHead { + font-size: 1.6em; + } - body { - font-size: 1.6em; - padding: 35px 40px 20px 40px; - } + body { + font-size: 1.6em; + } - .logoImg { - height: 40px; - } + .logoImg { + height: 40px; + } } @media all and (max-width: 425px) { - .mainHead { - font-size: 1em; - } + .mainHead { + font-size: 1em; + } - body { - font-size: 0.7em; - padding: 35px 0 20px 0; - } + body { + font-size: 0.7em; + } - .logoImg { - height: 25px; - } + .logoImg { + height: 25px; + } } /* Set width on the form input elements since they're 100% wide by default */ input, select, textarea { - max-width: 280px; + max-width: 280px; } .deleted { - text-decoration: line-through; + text-decoration: line-through; } .padZL { - padding-left: 0.2em; + padding-left: 0.2em; } .padZR { - padding-right: 0.2em; + padding-right: 0.2em; } .padZRL { - .padZL; - .padZR; + .padZL; + .padZR; } .colAlt { - color: #C93; + color: #C93; } .fontSmall { font-size: 0.66em; } + .fontSmaller { font-size: 0.5em; } .fontBig { - font-size: 2em; + font-size: 2em; } .tNote { - color: #8a8a8a; - font-style: italic; + color: #8a8a8a; + font-style: italic; } .tNoWrap { - white-space: nowrap; + white-space: nowrap; } .navbar { - min-height: 0; - /*z-index: 0; // commentare quando in prod?!?*/ - color: #696969; - background-color: #000; + min-height: 0; + /*z-index: 0; // commentare quando in prod?!?*/ + color: #696969; + background-color: #000; } /*------------------------------------------------------------------ @@ -182,104 +177,104 @@ textarea { @blSCut: 20px; .shortcuts { - text-align: center; + text-align: center; } - .shortcuts .shortcut { - min-width: @blSCut * 9; - min-height: @blSCut * 5; - display: inline-block; - padding: @blSCut*2/3 0; - margin: 0 2px 1em; - vertical-align: top; - text-decoration: none; - background: #F3F3F3; - background-image: -webkit-gradient(linear, left 0%, left 100%, from(#ffffff), to(#eeeeee)); - background-image: -webkit-linear-gradient(top, #ffffff, 0%, #eeeeee, 100%); - background-image: -moz-linear-gradient(top, #ffffff 0%, #eeeeee 100%); - background-image: linear-gradient(to bottom, #ffffff 0%, #eeeeee 100%); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffeeeeee', GradientType=0); - border: 1px solid #ddd; - box-sizing: border-box; - border-radius: @blSCut/2; - } + .shortcuts .shortcut { + min-width: @blSCut * 9; + min-height: @blSCut * 5; + display: inline-block; + padding: @blSCut*2/3 0; + margin: 0 2px 1em; + vertical-align: top; + text-decoration: none; + background: #F3F3F3; + background-image: -webkit-gradient(linear, left 0%, left 100%, from(#ffffff), to(#eeeeee)); + background-image: -webkit-linear-gradient(top, #ffffff, 0%, #eeeeee, 100%); + background-image: -moz-linear-gradient(top, #ffffff 0%, #eeeeee 100%); + background-image: linear-gradient(to bottom, #ffffff 0%, #eeeeee 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffeeeeee', GradientType=0); + border: 1px solid #ddd; + box-sizing: border-box; + border-radius: @blSCut/2; + } - .shortcuts .shortcut-sm { - min-width: @blSCut * 4.5; - min-height: @blSCut * 3; - display: inline-block; - padding: @blSCut/4 0; - margin: 0 2px 1em; - vertical-align: top; - text-decoration: none; - background: #F3F3F3; - background-image: -webkit-gradient(linear, left 0%, left 100%, from(#ffffff), to(#eeeeee)); - background-image: -webkit-linear-gradient(top, #ffffff, 0%, #eeeeee, 100%); - background-image: -moz-linear-gradient(top, #ffffff 0%, #eeeeee 100%); - background-image: linear-gradient(to bottom, #ffffff 0%, #eeeeee 100%); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffeeeeee', GradientType=0); - border: 1px solid #ddd; - box-sizing: border-box; - border-radius: @blSCut/2; - } + .shortcuts .shortcut-sm { + min-width: @blSCut * 4.5; + min-height: @blSCut * 3; + display: inline-block; + padding: @blSCut/4 0; + margin: 0 2px 1em; + vertical-align: top; + text-decoration: none; + background: #F3F3F3; + background-image: -webkit-gradient(linear, left 0%, left 100%, from(#ffffff), to(#eeeeee)); + background-image: -webkit-linear-gradient(top, #ffffff, 0%, #eeeeee, 100%); + background-image: -moz-linear-gradient(top, #ffffff 0%, #eeeeee 100%); + background-image: linear-gradient(to bottom, #ffffff 0%, #eeeeee 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffeeeeee', GradientType=0); + border: 1px solid #ddd; + box-sizing: border-box; + border-radius: @blSCut/2; + } - .shortcuts .shortcut .shortcut-icon { - width: 100%; - margin-top: 0; - margin-bottom: 0; - font-size: @blSCut*2; - color: #333; - } + .shortcuts .shortcut .shortcut-icon { + width: 100%; + margin-top: 0; + margin-bottom: 0; + font-size: @blSCut*2; + color: #333; + } - .shortcuts .shortcut-sm .shortcut-icon { - width: 100%; - margin-top: 0; - margin-bottom: 0; - font-size: @blSCut*2; - color: #333; - } + .shortcuts .shortcut-sm .shortcut-icon { + width: 100%; + margin-top: 0; + margin-bottom: 0; + font-size: @blSCut*2; + color: #333; + } - .shortcuts .shortcut:hover { - background: #E8E8E8; - background-image: -webkit-gradient(linear, left 0%, left 100%, from(#fafafa), to(#e1e1e1)); - background-image: -webkit-linear-gradient(top, #fafafa, 0%, #e1e1e1, 100%); - background-image: -moz-linear-gradient(top, #fafafa 0%, #e1e1e1 100%); - background-image: linear-gradient(to bottom, #fafafa 0%, #e1e1e1 100%); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffafafa', endColorstr='#ffe1e1e1', GradientType=0); - } + .shortcuts .shortcut:hover { + background: #E8E8E8; + background-image: -webkit-gradient(linear, left 0%, left 100%, from(#fafafa), to(#e1e1e1)); + background-image: -webkit-linear-gradient(top, #fafafa, 0%, #e1e1e1, 100%); + background-image: -moz-linear-gradient(top, #fafafa 0%, #e1e1e1 100%); + background-image: linear-gradient(to bottom, #fafafa 0%, #e1e1e1 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffafafa', endColorstr='#ffe1e1e1', GradientType=0); + } - .shortcuts .shortcut-sm:hover { - background: #E8E8E8; - background-image: -webkit-gradient(linear, left 0%, left 100%, from(#fafafa), to(#e1e1e1)); - background-image: -webkit-linear-gradient(top, #fafafa, 0%, #e1e1e1, 100%); - background-image: -moz-linear-gradient(top, #fafafa 0%, #e1e1e1 100%); - background-image: linear-gradient(to bottom, #fafafa 0%, #e1e1e1 100%); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffafafa', endColorstr='#ffe1e1e1', GradientType=0); - } + .shortcuts .shortcut-sm:hover { + background: #E8E8E8; + background-image: -webkit-gradient(linear, left 0%, left 100%, from(#fafafa), to(#e1e1e1)); + background-image: -webkit-linear-gradient(top, #fafafa, 0%, #e1e1e1, 100%); + background-image: -moz-linear-gradient(top, #fafafa 0%, #e1e1e1 100%); + background-image: linear-gradient(to bottom, #fafafa 0%, #e1e1e1 100%); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffafafa', endColorstr='#ffe1e1e1', GradientType=0); + } - .shortcuts .shortcut:active { - box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); - } + .shortcuts .shortcut:active { + box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + } - .shortcuts .shortcut-sm:active { - box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); - } + .shortcuts .shortcut-sm:active { + box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); + } - .shortcuts .shortcut:hover .shortcut-icon { - color: #C93; - } + .shortcuts .shortcut:hover .shortcut-icon { + color: #C93; + } - .shortcuts .shortcut-sm:hover .shortcut-icon { - color: #666; - } + .shortcuts .shortcut-sm:hover .shortcut-icon { + color: #666; + } - .shortcuts .shortcut-label { - display: block; - margin-top: .75em; - font-weight: 400; - color: #666; - } + .shortcuts .shortcut-label { + display: block; + margin-top: .75em; + font-weight: 400; + color: #666; + } diff --git a/MP-MON/Content/Site.min.css b/MP-MON/Content/Site.min.css index 25a40084..3f1cf1fa 100644 --- a/MP-MON/Content/Site.min.css +++ b/MP-MON/Content/Site.min.css @@ -1 +1 @@ -@import url('fonts.min.css');body{font-family:'Open Sans',sans-serif;background-color:#5d5d5d;padding:35px 40px 20px 40px;}body .ui-body-a,body .ui-body-c,body .ui-overlay-c{text-shadow:0 0 0;}.logoImg{height:40px;}.body-content{padding-left:15px;padding-right:15px;}.dl-horizontal dt{white-space:normal;}@media all and (min-width:425px){.mainHead{font-size:1.3em;}body{font-size:.8em;padding:35px 0 20px 0;}.logoImg{height:30px;}}@media all and (min-width:768px){.mainHead{font-size:1.4em;}body{font-size:1em;padding:35px 0 20px 0;}.logoImg{height:35px;}}@media all and (min-width:1024px){.mainHead{font-size:1.5em;}body{font-size:1.2em;padding:35px 40px 20px 40px;}.logoImg{height:40px;}}@media all and (min-width:1440px){.mainHead{font-size:1.6em;}body{font-size:1.4em;padding:35px 40px 20px 40px;}.logoImg{height:40px;}}@media all and (min-width:1600px){.mainHead{font-size:1.6em;}body{font-size:1.6em;padding:35px 40px 20px 40px;}.logoImg{height:40px;}}@media all and (max-width:425px){.mainHead{font-size:1em;}body{font-size:.7em;padding:35px 0 20px 0;}.logoImg{height:25px;}}input,select,textarea{max-width:280px;}.deleted{text-decoration:line-through;}.padZL{padding-left:.2em;}.padZR{padding-right:.2em;}.padZRL{padding-left:.2em;padding-right:.2em;}.colAlt{color:#c93;}.fontSmall{font-size:.66em;}.fontSmaller{font-size:.5em;}.fontBig{font-size:2em;}.tNote{color:#8a8a8a;font-style:italic;}.tNoWrap{white-space:nowrap;}.navbar{min-height:0;color:#696969;background-color:#000;}.shortcuts{text-align:center;}.shortcuts .shortcut{min-width:180px;min-height:100px;display:inline-block;padding:13.33333333px 0;margin:0 2px 1em;vertical-align:top;text-decoration:none;background:#f3f3f3;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fff),to(#eee));background-image:-webkit-linear-gradient(top,#fff,0%,#eee,100%);background-image:-moz-linear-gradient(top,#fff 0%,#eee 100%);background-image:linear-gradient(to bottom,#fff 0%,#eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffeeeeee',GradientType=0);border:1px solid #ddd;box-sizing:border-box;border-radius:10px;}.shortcuts .shortcut-sm{min-width:90px;min-height:60px;display:inline-block;padding:5px 0;margin:0 2px 1em;vertical-align:top;text-decoration:none;background:#f3f3f3;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fff),to(#eee));background-image:-webkit-linear-gradient(top,#fff,0%,#eee,100%);background-image:-moz-linear-gradient(top,#fff 0%,#eee 100%);background-image:linear-gradient(to bottom,#fff 0%,#eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffeeeeee',GradientType=0);border:1px solid #ddd;box-sizing:border-box;border-radius:10px;}.shortcuts .shortcut .shortcut-icon{width:100%;margin-top:0;margin-bottom:0;font-size:40px;color:#333;}.shortcuts .shortcut-sm .shortcut-icon{width:100%;margin-top:0;margin-bottom:0;font-size:40px;color:#333;}.shortcuts .shortcut:hover{background:#e8e8e8;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fafafa),to(#e1e1e1));background-image:-webkit-linear-gradient(top,#fafafa,0%,#e1e1e1,100%);background-image:-moz-linear-gradient(top,#fafafa 0%,#e1e1e1 100%);background-image:linear-gradient(to bottom,#fafafa 0%,#e1e1e1 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffafafa',endColorstr='#ffe1e1e1',GradientType=0);}.shortcuts .shortcut-sm:hover{background:#e8e8e8;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fafafa),to(#e1e1e1));background-image:-webkit-linear-gradient(top,#fafafa,0%,#e1e1e1,100%);background-image:-moz-linear-gradient(top,#fafafa 0%,#e1e1e1 100%);background-image:linear-gradient(to bottom,#fafafa 0%,#e1e1e1 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffafafa',endColorstr='#ffe1e1e1',GradientType=0);}.shortcuts .shortcut:active{box-shadow:inset 0 3px 5px rgba(0,0,0,.125);}.shortcuts .shortcut-sm:active{box-shadow:inset 0 3px 5px rgba(0,0,0,.125);}.shortcuts .shortcut:hover .shortcut-icon{color:#c93;}.shortcuts .shortcut-sm:hover .shortcut-icon{color:#666;}.shortcuts .shortcut-label{display:block;margin-top:.75em;font-weight:400;color:#666;} \ No newline at end of file +@import url('fonts.min.css');body{font-family:'Open Sans',sans-serif;background-color:#5d5d5d;padding:25px 0 20px 0;}body .ui-body-a,body .ui-body-c,body .ui-overlay-c{text-shadow:0 0 0;}.logoImg{height:40px;}.body-content{padding-left:.1em;padding-right:.1em;}.dl-horizontal dt{white-space:normal;}@media all and (min-width:425px){.mainHead{font-size:1.3em;}body{font-size:.8em;}.logoImg{height:30px;}}@media all and (min-width:768px){.mainHead{font-size:1.4em;}body{font-size:1em;}.logoImg{height:35px;}}@media all and (min-width:1024px){.mainHead{font-size:1.5em;}body{font-size:1.2em;}.logoImg{height:40px;}}@media all and (min-width:1440px){.mainHead{font-size:1.6em;}body{font-size:1.4em;}.logoImg{height:40px;}}@media all and (min-width:1600px){.mainHead{font-size:1.6em;}body{font-size:1.6em;}.logoImg{height:40px;}}@media all and (max-width:425px){.mainHead{font-size:1em;}body{font-size:.7em;}.logoImg{height:25px;}}input,select,textarea{max-width:280px;}.deleted{text-decoration:line-through;}.padZL{padding-left:.2em;}.padZR{padding-right:.2em;}.padZRL{padding-left:.2em;padding-right:.2em;}.colAlt{color:#c93;}.fontSmall{font-size:.66em;}.fontSmaller{font-size:.5em;}.fontBig{font-size:2em;}.tNote{color:#8a8a8a;font-style:italic;}.tNoWrap{white-space:nowrap;}.navbar{min-height:0;color:#696969;background-color:#000;}.shortcuts{text-align:center;}.shortcuts .shortcut{min-width:180px;min-height:100px;display:inline-block;padding:13.33333333px 0;margin:0 2px 1em;vertical-align:top;text-decoration:none;background:#f3f3f3;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fff),to(#eee));background-image:-webkit-linear-gradient(top,#fff,0%,#eee,100%);background-image:-moz-linear-gradient(top,#fff 0%,#eee 100%);background-image:linear-gradient(to bottom,#fff 0%,#eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffeeeeee',GradientType=0);border:1px solid #ddd;box-sizing:border-box;border-radius:10px;}.shortcuts .shortcut-sm{min-width:90px;min-height:60px;display:inline-block;padding:5px 0;margin:0 2px 1em;vertical-align:top;text-decoration:none;background:#f3f3f3;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fff),to(#eee));background-image:-webkit-linear-gradient(top,#fff,0%,#eee,100%);background-image:-moz-linear-gradient(top,#fff 0%,#eee 100%);background-image:linear-gradient(to bottom,#fff 0%,#eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffeeeeee',GradientType=0);border:1px solid #ddd;box-sizing:border-box;border-radius:10px;}.shortcuts .shortcut .shortcut-icon{width:100%;margin-top:0;margin-bottom:0;font-size:40px;color:#333;}.shortcuts .shortcut-sm .shortcut-icon{width:100%;margin-top:0;margin-bottom:0;font-size:40px;color:#333;}.shortcuts .shortcut:hover{background:#e8e8e8;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fafafa),to(#e1e1e1));background-image:-webkit-linear-gradient(top,#fafafa,0%,#e1e1e1,100%);background-image:-moz-linear-gradient(top,#fafafa 0%,#e1e1e1 100%);background-image:linear-gradient(to bottom,#fafafa 0%,#e1e1e1 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffafafa',endColorstr='#ffe1e1e1',GradientType=0);}.shortcuts .shortcut-sm:hover{background:#e8e8e8;background-image:-webkit-gradient(linear,left 0%,left 100%,from(#fafafa),to(#e1e1e1));background-image:-webkit-linear-gradient(top,#fafafa,0%,#e1e1e1,100%);background-image:-moz-linear-gradient(top,#fafafa 0%,#e1e1e1 100%);background-image:linear-gradient(to bottom,#fafafa 0%,#e1e1e1 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffafafa',endColorstr='#ffe1e1e1',GradientType=0);}.shortcuts .shortcut:active{box-shadow:inset 0 3px 5px rgba(0,0,0,.125);}.shortcuts .shortcut-sm:active{box-shadow:inset 0 3px 5px rgba(0,0,0,.125);}.shortcuts .shortcut:hover .shortcut-icon{color:#c93;}.shortcuts .shortcut-sm:hover .shortcut-icon{color:#666;}.shortcuts .shortcut-label{display:block;margin-top:.75em;font-weight:400;color:#666;} \ No newline at end of file diff --git a/MP-MON/Controllers/HomeController.cs b/MP-MON/Controllers/HomeController.cs index 403ab481..b3c1d6b8 100644 --- a/MP-MON/Controllers/HomeController.cs +++ b/MP-MON/Controllers/HomeController.cs @@ -7,98 +7,98 @@ using System.Web.Mvc; namespace MP_MON.Controllers { - public class HomeController : Controller + public class HomeController : Controller + { + private MoonProEntities db = new MoonProEntities(); + + public ActionResult Index() { - private MoonProEntities db = new MoonProEntities(); - - public ActionResult Index() - { - // ricarico ogni minuto COMUNQUE tutto... - string pageRefreshSec = "60"; - // refresh std ogni sec - int pageRefreshMs = 1000; - ViewBag.cssSemBase = "sem"; - try - { - pageRefreshSec = WebConfigurationManager.AppSettings["pageRefreshSec"]; - } - catch - { } - if (pageRefreshSec == "") pageRefreshSec = "60"; - ViewBag.pageRefreshMs = pageRefreshMs; - Response.AddHeader("Refresh", pageRefreshSec); - return View(); - } - - public ActionResult Blink() - { - // ricarico ogni minuto COMUNQUE tutto... - string pageRefreshSec = "60"; - // se ho animazione refresh è ogni 2 sec... - int pageRefreshMs = 2000; - ViewBag.cssSemBase = "semBlink"; - try - { - pageRefreshSec = WebConfigurationManager.AppSettings["pageRefreshSec"]; - } - catch - { } - if (pageRefreshSec == "") pageRefreshSec = "60"; - ViewBag.pageRefreshMs = pageRefreshMs; - Response.AddHeader("Refresh", pageRefreshSec); - return View("Index"); - } - - public ActionResult GetClock() - { - return PartialView("_mmClock"); - } - - public ActionResult checkIOB() - { - string esito = "ND"; - // verifico TUTTE le macchine x il keepAlive e se almeno 1 è offline da oltre "keepAliveMin" minuti --> invio email!!! - int keepAliveMin = 1; - try - { - keepAliveMin = Convert.ToInt32(WebConfigurationManager.AppSettings["keepAliveMin"]); - } - catch - { } - // recupero elenco macchine offline e mostro! - var MappaStato = db.stp_MSE_getOffline(keepAliveMin); - List risultato = MappaStato.ToList(); - int numKO = risultato.Count; - if (numKO > 0) - { - // scrivo esito - esito = string.Format("Trovate {0} schede offline", numKO); - // invio email... - string from = WebConfigurationManager.AppSettings["_fromEmail"]; - string to = WebConfigurationManager.AppSettings["_checkIobEmail"]; - string subject = "MapoIOB - ciclo di controllo schede MapoIOB"; - string body = string.Format("

Attenzione!

durante l'ultimo ciclo di controllo sono state {1}{0}", Environment.NewLine, esito); - foreach (MappaStatoExpl item in risultato) - { - body += string.Format("{2}{0} \t\t | Art: {1}", item.CodMacchina, item.CodArticolo, Environment.NewLine); - } - // se ho una pwd/user utilizzo smtp auth, altrimenti base... - if ((WebConfigurationManager.AppSettings["_emailUser"] != "") && (WebConfigurationManager.AppSettings["_emailPwd"] != "")) - { - SteamWare.gestEmail.geAuth.mandaEmail(from, to, subject, body); - } - else - { - SteamWare.gestEmail.ge.mandaEmail(from, to, subject, body); - } - } - else - { - esito = "OK"; - } - ViewBag.EsitoVerifica = esito; - // inserisco elenco macchine offline x rendering in aprtialView - return PartialView("_checkIOB", risultato); - } + // ricarico ogni minuto COMUNQUE tutto... + string pageRefreshSec = "60"; + // refresh std ogni sec + int pageRefreshMs = 1000; + ViewBag.cssSemBase = "sem"; + try + { + pageRefreshSec = WebConfigurationManager.AppSettings["pageRefreshSec"]; + } + catch + { } + if (pageRefreshSec == "") pageRefreshSec = "60"; + ViewBag.pageRefreshMs = pageRefreshMs; + Response.AddHeader("Refresh", pageRefreshSec); + return View(); } + + public ActionResult Blink() + { + // ricarico ogni minuto COMUNQUE tutto... + string pageRefreshSec = "60"; + // se ho animazione refresh è ogni 2 sec... + int pageRefreshMs = 2000; + ViewBag.cssSemBase = "semBlink"; + try + { + pageRefreshSec = WebConfigurationManager.AppSettings["pageRefreshSec"]; + } + catch + { } + if (pageRefreshSec == "") pageRefreshSec = "60"; + ViewBag.pageRefreshMs = pageRefreshMs; + Response.AddHeader("Refresh", pageRefreshSec); + return View("Index"); + } + + public ActionResult GetClock() + { + return PartialView("_mmClock"); + } + + public ActionResult checkIOB() + { + string esito = "ND"; + // verifico TUTTE le macchine x il keepAlive e se almeno 1 è offline da oltre "keepAliveMin" minuti --> invio email!!! + int keepAliveMin = 1; + try + { + keepAliveMin = Convert.ToInt32(WebConfigurationManager.AppSettings["keepAliveMin"]); + } + catch + { } + // recupero elenco macchine offline e mostro! + var MappaStato = db.stp_MSE_getOffline(keepAliveMin); + List risultato = MappaStato.ToList(); + int numKO = risultato.Count; + if (numKO > 0) + { + // scrivo esito + esito = string.Format("Trovate {0} schede offline", numKO); + // invio email... + string from = WebConfigurationManager.AppSettings["_fromEmail"]; + string to = WebConfigurationManager.AppSettings["_checkIobEmail"]; + string subject = "MapoIOB - ciclo di controllo schede MapoIOB"; + string body = string.Format("

Attenzione!

durante l'ultimo ciclo di controllo sono state {1}{0}", Environment.NewLine, esito); + foreach (MappaStatoExpl item in risultato) + { + body += string.Format("{2}{0} \t\t | Art: {1}", item.Nome, item.CodArticolo, Environment.NewLine); + } + // se ho una pwd/user utilizzo smtp auth, altrimenti base... + if ((WebConfigurationManager.AppSettings["_emailUser"] != "") && (WebConfigurationManager.AppSettings["_emailPwd"] != "")) + { + SteamWare.gestEmail.geAuth.mandaEmail(from, to, subject, body); + } + else + { + SteamWare.gestEmail.ge.mandaEmail(from, to, subject, body); + } + } + else + { + esito = "OK"; + } + ViewBag.EsitoVerifica = esito; + // inserisco elenco macchine offline x rendering in partialView + return PartialView("_checkIOB", risultato); + } + } } \ No newline at end of file diff --git a/MP-MON/Views/Home/_checkIOB.cshtml b/MP-MON/Views/Home/_checkIOB.cshtml index d9207f14..0ad89ad3 100644 --- a/MP-MON/Views/Home/_checkIOB.cshtml +++ b/MP-MON/Views/Home/_checkIOB.cshtml @@ -11,20 +11,24 @@ Macchina Articolo Stato - TC + TC STD + TC Lav @foreach (var item in Model) { // calcolo durata... - TimeSpan TC = TimeSpan.FromMinutes((double)item.TCAssegnato); + TimeSpan TCAss = TimeSpan.FromMinutes((double)item.TCAssegnato); + TimeSpan TCLav = TimeSpan.FromMinutes((double)item.TCLavRT); // converto a stringa! - string TCAssegnato = TC.ToString(@"mm\:ss"); + string TCAssegnato = TCAss.ToString(@"mm\:ss"); + string TCLavorato = TCLav.ToString(@"mm\:ss"); - @Html.DisplayFor(modelItem => item.CodMacchina) + @Html.DisplayFor(modelItem => item.Nome) @Html.DisplayFor(modelItem => item.CodArticolo) @Html.DisplayFor(modelItem => item.DescrizioneStato) @TCAssegnato + @TCLavorato } diff --git a/MP-MON/Views/MSE/_StatusMap.cshtml b/MP-MON/Views/MSE/_StatusMap.cshtml index e71e6f80..f6d68d58 100644 --- a/MP-MON/Views/MSE/_StatusMap.cshtml +++ b/MP-MON/Views/MSE/_StatusMap.cshtml @@ -1,7 +1,7 @@ @model IEnumerable -
+
@foreach (var item in Model) { @@ -29,8 +29,8 @@ cssStatus += "_b"; } } -
-
+
+
@*noCpu*@
diff --git a/MP/Views/Shared/_Layout.cshtml b/MP/Views/Shared/_Layout.cshtml index 0b7c78ac..c03d5003 100644 --- a/MP/Views/Shared/_Layout.cshtml +++ b/MP/Views/Shared/_Layout.cshtml @@ -28,7 +28,7 @@
-
+
@RenderBody()
@{