From aee467cb53075566c9fdd9b7993f7556c739175d Mon Sep 17 00:00:00 2001 From: Gary Sharp Date: Sun, 14 Jan 2024 18:29:58 +1100 Subject: [PATCH] #138 add/remove individual device flags UI --- Disco.Models/UI/Device/DeviceShowModel.cs | 4 + Disco.Web/ClientSource/Style/Device.css | 112 +++ Disco.Web/ClientSource/Style/Device.less | 137 ++++ Disco.Web/ClientSource/Style/Device.min.css | 2 +- Disco.Web/Controllers/DeviceController.cs | 34 +- Disco.Web/Controllers/UserController.cs | 21 +- Disco.Web/Disco.Web.csproj | 9 + .../T4MVC/DeviceController.generated.cs | 2 + Disco.Web/Models/Device/ShowModel.cs | 13 +- .../Views/Device/DeviceParts/_Flags.cshtml | 182 +++++ .../Device/DeviceParts/_Flags.generated.cs | 690 ++++++++++++++++++ .../Views/Device/DeviceParts/_Subject.cshtml | 90 +++ .../Device/DeviceParts/_Subject.generated.cs | 312 +++++++- Disco.Web/Views/Device/Show.cshtml | 4 + Disco.Web/Views/Device/Show.generated.cs | 29 +- 15 files changed, 1573 insertions(+), 68 deletions(-) create mode 100644 Disco.Web/Views/Device/DeviceParts/_Flags.cshtml create mode 100644 Disco.Web/Views/Device/DeviceParts/_Flags.generated.cs diff --git a/Disco.Models/UI/Device/DeviceShowModel.cs b/Disco.Models/UI/Device/DeviceShowModel.cs index b6456ee4..301cce42 100644 --- a/Disco.Models/UI/Device/DeviceShowModel.cs +++ b/Disco.Models/UI/Device/DeviceShowModel.cs @@ -1,4 +1,5 @@ using Disco.Models.BI.Config; +using Disco.Models.Repository; using Disco.Models.Services.Documents; using Disco.Models.Services.Jobs.JobLists; using System.Collections.Generic; @@ -22,6 +23,9 @@ namespace Disco.Models.UI.Device List DocumentTemplates { get; set; } List DocumentTemplatePackages { get; set; } + + List AvailableDeviceFlags { get; set; } + Dictionary AssignedUserDetails { get; set; } bool HasAssignedUserPhoto { get; set; } } diff --git a/Disco.Web/ClientSource/Style/Device.css b/Disco.Web/ClientSource/Style/Device.css index ea4fdf1c..583a89c3 100644 --- a/Disco.Web/ClientSource/Style/Device.css +++ b/Disco.Web/ClientSource/Style/Device.css @@ -404,6 +404,118 @@ background-color: inherit; border: 1px solid #fff; } +#Device_Show_Details_Actions_AddFlag_Dialog { + height: 400px; +} +#Device_Show_Details_Actions_AddFlag_Dialog .flagPicker { + position: absolute; + width: 250px; + height: 300px; + overflow-y: auto; + background-color: #fcfcfc; + border: 1px solid #ccc; +} +#Device_Show_Details_Actions_AddFlag_Dialog .flagPicker > div { + background-color: #fff; + border-bottom: 1px solid #ddd; + padding: 6px 0 6px 6px; + cursor: pointer; +} +#Device_Show_Details_Actions_AddFlag_Dialog .flagPicker > div:hover { + background-color: #f4f4f4; +} +#Device_Show_Details_Actions_AddFlag_Dialog .flagPicker > div.selected, +#Device_Show_Details_Actions_AddFlag_Dialog .flagPicker > div.selected:hover { + background-color: #eee; +} +#Device_Show_Details_Actions_AddFlag_Dialog .details { + display: none; + position: absolute; + left: 280px; + top: 1em; +} +#Device_Show_Details_Actions_AddFlag_Dialog .details h4 { + margin-bottom: 4px; +} +#Device_Show_Details_Actions_AddFlag_Dialog .details textarea { + min-width: 280px; + height: 200px; +} +#DeviceDetailTab-Flags #deviceFlags { + border: solid 1px #d8d8d8; + border-collapse: collapse; + table-layout: fixed; +} +#DeviceDetailTab-Flags #deviceFlags td { + border: solid 1px #d8d8d8; + background-color: #fff; +} +#DeviceDetailTab-Flags #deviceFlags th { + background-color: #eee; + border: solid 1px #d8d8d8; +} +#DeviceDetailTab-Flags #deviceFlags i.fa-edit { + position: absolute; + top: 0; + right: 0; + margin-top: 4px; + font-size: 1.1em; + cursor: pointer; + display: none; + color: #335A87; +} +#DeviceDetailTab-Flags #deviceFlags i.fa-edit:hover { + color: #5e8cc2; +} +#DeviceDetailTab-Flags #deviceFlags td:hover i.fa-edit { + display: inline-block; +} +#DeviceDetailTab-Flags #deviceFlags th.name { + width: 200px; +} +#DeviceDetailTab-Flags #deviceFlags tr.removed td { + background-color: #f4f4f4; +} +#DeviceDetailTab-Flags #deviceFlags td.name { + vertical-align: middle; +} +#DeviceDetailTab-Flags #deviceFlags td.name .fa-stack { + line-height: 1.6em; +} +#DeviceDetailTab-Flags #deviceFlags td.added, +#DeviceDetailTab-Flags #deviceFlags td.removed { + vertical-align: middle; +} +#DeviceDetailTab-Flags #deviceFlags td.added .expressionResult, +#DeviceDetailTab-Flags #deviceFlags td.removed .expressionResult { + margin-top: 4px; + font-style: italic; +} +#DeviceDetailTab-Flags #deviceFlags td.comments { + vertical-align: middle; +} +#DeviceDetailTab-Flags #deviceFlags td.comments .editable { + position: relative; +} +#DeviceDetailTab-Flags #deviceFlags td.comments .commentsRaw { + display: none; +} +#DeviceDetailTab-Flags #deviceFlags td.removed.na { + vertical-align: middle; + text-align: center; +} +#DeviceDetailTab-Flags > .none { + text-align: center; + padding: 30px 0; + font-style: italic; + background-color: #fff; +} +#Device_Show_Flags_Actions_EditComments_Dialog h4 { + margin-bottom: 4px; +} +#Device_Show_Flags_Actions_EditComments_Dialog_Comments { + width: 280px; +} #Devices_Export .Devices_Export_Type_Target { margin-top: 10px; display: none; diff --git a/Disco.Web/ClientSource/Style/Device.less b/Disco.Web/ClientSource/Style/Device.less index 5ef4c087..0910eca1 100644 --- a/Disco.Web/ClientSource/Style/Device.less +++ b/Disco.Web/ClientSource/Style/Device.less @@ -393,6 +393,143 @@ } } +#Device_Show_Details_Actions_AddFlag_Dialog { + height: 400px; + + .flagPicker { + position: absolute; + width: 250px; + height: 300px; + overflow-y: auto; + background-color: #fcfcfc; + border: 1px solid #ccc; + + & > div { + background-color: @white; + border-bottom: 1px solid #ddd; + padding: 6px 0 6px 6px; + cursor: pointer; + + &:hover { + background-color: @TableDataBorderColour; + } + + &.selected, &.selected:hover { + background-color: @TableDataDarkBackgroundColour; + } + } + } + + .details { + display: none; + position: absolute; + left: 280px; + top: 1em; + + h4 { + margin-bottom: 4px; + } + + textarea { + min-width: 280px; + height: 200px; + } + } +} + +#DeviceDetailTab-Flags { + #deviceFlags { + .tableDataDark; + table-layout: fixed; + + i.fa-edit { + position: absolute; + top: 0; + right: 0; + margin-top: 4px; + font-size: 1.1em; + cursor: pointer; + display: none; + color: @HyperLinkColour; + + &:hover { + color: @HyperLinkHoverColour; + } + } + + td:hover i.fa-edit { + display: inline-block; + } + + th.name { + width: 200px; + } + + th.added { + } + + th.removed { + } + + tr.removed td { + background-color: @TableDataBorderColour; + } + + td.name { + vertical-align: middle; + + .fa-stack { + line-height: 1.6em; + } + } + + td.added, td.removed { + vertical-align: middle; + + .expressionResult { + margin-top: 4px; + font-style: italic; + } + } + + td.comments { + vertical-align: middle; + + .editable { + position: relative; + } + + .commentsRaw { + display: none; + } + } + + td.removed { + &.na { + vertical-align: middle; + text-align: center; + } + } + } + + & > .none { + text-align: center; + padding: 30px 0; + font-style: italic; + background-color: @white; + } +} + +#Device_Show_Flags_Actions_EditComments_Dialog { + h4 { + margin-bottom: 4px; + } +} + +#Device_Show_Flags_Actions_EditComments_Dialog_Comments { + width: 280px; +} + #Devices_Export { .Devices_Export_Type_Target { margin-top: 10px; diff --git a/Disco.Web/ClientSource/Style/Device.min.css b/Disco.Web/ClientSource/Style/Device.min.css index 490b6274..b629af89 100644 --- a/Disco.Web/ClientSource/Style/Device.min.css +++ b/Disco.Web/ClientSource/Style/Device.min.css @@ -1 +1 @@ -.tableData{border:solid 1px #f4f4f4;border-collapse:collapse;}.tableData>tbody>tr>td{border:solid 1px #f4f4f4;background-color:#fff;}.tableData>tbody>tr:nth-child(odd)>td{background-color:hsl(0,0%,98.5%);}.tableData>thead>tr>th,.tableData>tbody>tr>th{background-color:#f4f4f4;border:solid 1px #f4f4f4;}.tableData>tbody>tr:hover>td{background-color:hsl(0,0%,97.5%);}.tableData>tfoot>tr>th,.tableData>tfoot>tr>td{background-color:#f4f4f4;}.tableDataDark{border:solid 1px #d8d8d8;border-collapse:collapse;}.tableDataDark td{border:solid 1px #d8d8d8;background-color:#fff;}.tableDataDark th{background-color:#eee;border:solid 1px #d8d8d8;}.tableDataContainer{background-color:#fff;}.tableDataVertical{border:solid 1px #f4f4f4;border-collapse:collapse;}.tableDataVertical>tbody>tr:nth-child(odd){background-color:#f4f4f4;margin:0;padding:0;}.tableDataVertical>tbody>tr>th.name{width:170px;text-align:right;}.tableDataVertical table.sub>tbody>tr:not(:first-child)>th,.tableDataVertical table.sub>tbody>tr:not(:first-child)>td{border-top:1px dashed #aaa;}.tableDataVertical table.sub>tbody>tr>th{font-weight:normal;text-align:right;}.tableDataVertical table.sub>tbody>tr>th.name{text-align:right;}.icon16{display:inline-block;height:16px;width:16px;margin-left:2px;cursor:pointer;}.subtleUntilHover{-moz-opacity:.3;opacity:.3;}.subtleUntilHover:hover{-moz-opacity:1;opacity:1;}#layout_PageHeading #Device_Show_Status{margin-left:20px;display:inline-block;height:50px;font-family:"Segoe UI",Arial,Verdana,Tahoma,sans-serif;font-weight:lighter;font-stretch:condensed;font-size:.7em;text-transform:uppercase;}#layout_PageHeading #Device_Show_Status span.icon{margin-right:6px;}#Device_Show #Device_Show_Subjects{table-layout:fixed;}#Device_Show #Device_Show_Subjects>tbody>tr>td{padding-top:0;height:100%;}#Device_Show #Device_Show_Subjects>tbody>tr>td>div{position:relative;}#Device_Show #Device_Show_Subjects>tbody>tr>td>div div.status{margin-top:2px;padding-top:2px;border-top:1px dashed #ddd;}#Device_Show #Device_Show_Subjects>tbody>tr>td>div input.discreet{margin-left:-2px;}#Device_Show #Device_Show_Subjects>tbody>tr>td:not(:last-child){border-right:1px dashed #aaa;}#Device_Show #Device_Show_Subjects #Device_Show_Details table.verticalHeadings>tbody>tr>td:first-child{width:104px;font-weight:600;}#Device_Show #Device_Show_Subjects #Device_Show_Details #Device_Show_Details_Asset_Name{font-weight:600;}#Device_Show #Device_Show_Subjects #Device_Show_Details #Device_Show_Details_Asset_Enrolled_Trusted{display:inline-block;height:16px;padding-left:16px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACWUlEQVQ4y6XRXWiSURgHcJsXa4WNNuuyiy6CoAupixERoXXhmljuxaJiFrVA1i72cVFCOSMt8rNt2YfGO5g5Z1NstWW+c4ZBq4QpqMkEbZDSCObAMprjdf90sIjxsgUdODd/zvmd5zwPCwDrf/aGB7q6utgmk8ngdruzVqt10eVyTWu1Wuk/AXK5vMpoNPpjsRgGbU8/9fbdH/J4PAuRSARKpfLKhoBYLG595nTCaDSZVjPp6TPbHQ5H0mAwfBeJRHXrAp0dna9JcqCguX2H/Xd+S625aLFYQBDE8XWBd+8/TI6Njc+vzcfGX4nLX4FOp5OuC0wGAlS53NzaPPAm2Gi32+H3+5tYJEl+pigKoVAIPp+PnpqaosPhMF1uHB2Px2mv14vya6VgMKhhHGN3d/dSMplENptFIpHA3NwcCoUCSqUSKqvScZVKBbPZHGQEFApFMZ1OI5PJIBqNrkD5fB40Ta8AlcrUajVsNpufEbh+42YxHEkh+/UbUqlZpGd/lAH8WTMzMzDd64d7NMAMDOobi/OpHqh6rqK9jcCvBQncQzK0Xm5DPn0BJ4lz6GgVIkedYAaamxqK0dEDePl4FziczehTsZGLs7BnNwdiwRac4lejvp6La83VzABv/8FF/qG9oD/WQS/fhNptHEw8rEJiuAo7ubXACAtH9m0Fu2YHxQzweEuEVIYnaiFmvQ04f1aItksi5KaP4ZFGjDB5GG/7j4LL5YYYgZYW2c/yiJbv6h/A0EvC4RjGiOsFnK4J+KgABmyjsDufL0skki8CgYCoXOLz+TWrwG+kXMkgQ6yv+QAAAABJRU5ErkJggg==);background-repeat:no-repeat;}#Device_Show #Device_Show_Subjects #Device_Show_Details #Device_Show_User #Device_Show_User_Photo_Container{float:left;padding-right:2px;}#Device_Show #Device_Show_Subjects #Device_Show_Details #Device_Show_User #Device_Show_User_Photo{max-width:48px;height:auto;}#Device_Show #Device_Show_Subjects #Device_Show_Details #Device_Show_User #Device_Show_User_Flags{font-size:16px;}#Device_Show #Device_Show_Subjects #Device_Show_Details #Device_Show_User #Device_Show_User_Flags>i{cursor:default;}#Device_Show #Device_Show_Subjects #Device_Show_Details #Device_Show_User #Device_Show_User_Flags>i>.details{display:none;}#Device_Show #Device_Show_Subjects #Device_Show_Details #Device_Show_GenerateDocument_Container{padding-top:4px;}#Device_Show #Device_Show_Subjects #Device_Show_Policies table.verticalHeadings>tbody>tr>td:first-child{width:120px;font-weight:600;}#Device_Show #Device_Show_Subjects #Device_Show_Aspects #Device_Show_Aspects_Model_Image{display:block;width:256px;height:256px;margin:0 auto;}#Device_Show #Device_Show_Subjects #Device_Show_Subjects_Actions>td{padding-top:4px;}#DeviceDetailTabs{margin-top:10px;border-radius:0;background-image:none;background-color:#fff;border:0;padding:0;}#DeviceDetailTabs #DeviceDetailTabItems{border-radius:0;border-top:1px solid #ddd;border-right:1px solid #ddd;border-left:1px solid #ddd;border-bottom:0;padding:2px 0 0 4px;background-image:none;background-color:#eee;display:table;}#DeviceDetailTabs #DeviceDetailTabItems>li{top:0;border-radius:0;margin:0 5px 0 0;padding:0;line-height:normal;margin-right:4px;}#DeviceDetailTabs #DeviceDetailTabItems>li>a{padding:5px 8px;}#DeviceDetailTabs div.ui-tabs-panel{border-radius:0;padding:4px;border-right:1px solid #ddd;border-bottom:1px solid #ddd;border-left:1px solid #ddd;border-top:0;background-color:#eee;}#Device_Show_Policies_Profile_Actions_Update_Dialog .profile-list,#Device_Show_Policies_Batch_Actions_Update_Dialog .profile-list{max-height:300px;overflow-y:auto;}#Device_Show_Policies_Profile_Actions_Update_Dialog .profile-list li,#Device_Show_Policies_Batch_Actions_Update_Dialog .profile-list li{background-color:#fff;padding:2px 0 2px 4px;}#Device_Show_Policies_Profile_Actions_Update_Dialog .profile-list li:nth-child(odd),#Device_Show_Policies_Batch_Actions_Update_Dialog .profile-list li:nth-child(odd){background-color:hsl(0,0%,98.5%);}#Device_Show_Policies_Profile_Actions_Update_Dialog .profile-list li.selected,#Device_Show_Policies_Batch_Actions_Update_Dialog .profile-list li.selected{background-color:#cddbec;font-weight:600;}#Device_Show_Policies_Profile_Actions_Update_Dialog .enforce-ou,#Device_Show_Policies_Batch_Actions_Update_Dialog .enforce-ou{padding-top:.5em;}#DeviceDetailTab-JobsContainer div.jobTable{margin:-1px;border:1px solid #ddd;}#DeviceDetailTab-JobsContainer .dataTables_wrapper .dataTables_filter{margin-top:-24px;-moz-opacity:1;opacity:1;}#DeviceDetailTab-JobsContainer .dataTables_wrapper .dataTables_length{margin-top:-24px;-moz-opacity:1;opacity:1;}#DeviceDetailTab-JobsContainer .dataTables_wrapper .dataTables_showStatusClosed{right:220px;margin-top:-24px;}#DeviceDetailTab-DetailsContainer>table{border:solid 1px #f4f4f4;border-collapse:collapse;}#DeviceDetailTab-DetailsContainer>table>tbody>tr>td{border:solid 1px #f4f4f4;background-color:#fff;}#DeviceDetailTab-DetailsContainer>table>tbody>tr:nth-child(odd)>td{background-color:hsl(0,0%,98.5%);}#DeviceDetailTab-DetailsContainer>table>thead>tr>th,#DeviceDetailTab-DetailsContainer>table>tbody>tr>th{background-color:#f4f4f4;border:solid 1px #f4f4f4;}#DeviceDetailTab-DetailsContainer>table>tbody>tr:hover>td{background-color:hsl(0,0%,97.5%);}#DeviceDetailTab-DetailsContainer>table>tfoot>tr>th,#DeviceDetailTab-DetailsContainer>table>tfoot>tr>td{background-color:#f4f4f4;}#DeviceDetailTab-DetailsContainer>table>tbody>tr>th{width:150px;}#DeviceDetailTab-DetailsContainer>table>tbody>tr>th,#DeviceDetailTab-DetailsContainer>table>tbody>tr>td.pad{padding:10px 6px;}#DeviceDetailTab-DetailsContainer .device_detail_disk_drives .partition{position:relative;height:40px;}#DeviceDetailTab-DetailsContainer .device_detail_disk_drives .partition>span{position:absolute;display:block;height:40px;box-sizing:border-box;overflow-x:hidden;overflow-y:hidden;text-overflow:ellipsis;white-space:nowrap;background-color:#f4f4f4;padding:2px;line-height:18px;border:1px solid #cacaca;}#DeviceDetailTab-DetailsContainer .device_detail_disk_drives .partition>span .details{position:relative;}#DeviceDetailTab-DetailsContainer .device_detail_disk_drives .partition>span .freespace{position:absolute;top:0;height:40px;display:block;background-color:#fff;background:repeating-linear-gradient(45deg,#f4f4f4,#f4f4f4 10px,#fff 10px,#fff 20px);}#deviceShowResources #AttachmentsContainer{padding:0;}#deviceShowResources #Attachments{position:relative;border:1px solid #ccc;background-color:#fff;}#deviceShowResources #Attachments div.attachmentOutput{position:relative;height:115px;overflow:auto;}#deviceShowResources #Attachments div.attachmentOutput>a{display:block;float:left;height:48px;width:221px;padding:2px;margin:2px;font-size:.9em;border:1px solid #fff;color:#000;text-decoration:none;}#deviceShowResources #Attachments div.attachmentOutput>a span.comments,#deviceShowResources #Attachments div.attachmentOutput>a span.author,#deviceShowResources #Attachments div.attachmentOutput>a span.timestamp{display:block;float:left;width:168px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;height:16px;}#deviceShowResources #Attachments div.attachmentOutput>a span.author{color:#888;width:150px;}#deviceShowResources #Attachments div.attachmentOutput>a span.timestamp{color:#888;font-style:italic;}#deviceShowResources #Attachments div.attachmentOutput>a span.icon{display:block;float:left;height:48px;width:48px;margin-right:2px;}#deviceShowResources #Attachments div.attachmentOutput>a span.icon img{height:48px;width:48px;}#deviceShowResources #Attachments div.attachmentOutput>a span.icon img.loading{display:none;}#deviceShowResources #Attachments div.attachmentOutput>a:hover{background-color:#ededed;border:1px solid #ccc;}#deviceShowResources #Attachments div.attachmentOutput>a:hover span.remove{opacity:.5;}#deviceShowResources #Attachments div.attachmentOutput>a span.remove{font-size:1.4em;color:#e51400;margin-left:6px;cursor:pointer;opacity:0;}#deviceShowResources #Attachments div.attachmentOutput>a span.remove:hover{opacity:1;}#deviceShowResources #Attachments div.attachmentInput{border-top:1px solid #ccc;height:40px;background-color:#fff;padding:3px;}#deviceShowResources #Attachments div.attachmentInput span.action{color:#333;display:block;margin:0 4px 0 0;font-size:1.5em;cursor:pointer;float:right;border:1px solid #fff;padding:.5em;}#deviceShowResources #Attachments div.attachmentInput span.action:hover{color:#335a87;background-color:#ededed;border:1px solid #ccc;}#deviceShowResources #Attachments div.attachmentInput span.action.disabled{color:rgba(51,51,51,.2);cursor:default;}#deviceShowResources #Attachments div.attachmentInput span.action.disabled:hover{color:rgba(51,51,51,.2);background-color:inherit;border:1px solid #fff;}#Devices_Export .Devices_Export_Type_Target{margin-top:10px;display:none;}#Devices_Export #Devices_Export_Fields #Devices_Export_Fields_Defaults{font-size:.75em;}#Devices_Export #Devices_Export_Fields th{font-size:1.05em;}#Devices_Export #Devices_Export_Fields th span{margin-top:4px;font-size:.8em;}#Devices_Export_Download_Dialog{padding-top:20px;text-align:center;}#Devices_Export_Download_Dialog h4{margin-bottom:30px;}#Devices_Export_Download_Dialog a{margin-bottom:20px;}#Devices_Export_Exporting{padding-top:50px;text-align:center;}#Devices_Export_Exporting i{margin-right:10px;color:#1e6dab;}#Devices_Import #ImportFile{width:96%;margin-bottom:8px;}#Devices_Import #Devices_Import_Documentation{width:700px;margin:20px auto;}#Devices_Import #Devices_Import_Documentation>table>tbody th:first-child{width:220px;}#Devices_Import_Completed_Dialog{padding:50px 0;text-align:center;}#Devices_Import_Completed_Dialog h3{margin-bottom:16px;}#Devices_Import_Completed_Dialog i{margin-right:10px;color:#60a917;}#Devices_Import_Loading_Dialog{padding-top:50px;text-align:center;}#Devices_Import_Loading_Dialog i{margin-right:10px;color:#1e6dab;}#Devices_Import_Headers #Devices_Import_Headers_TableContainer{margin:18px 0;overflow-x:auto;border:1px solid #ccc;}#Devices_Import_Headers #Devices_Import_Headers_TableContainer table>thead{white-space:nowrap;}#Devices_Import_Headers #Devices_Import_Headers_TableContainer table>thead ul.importHeaderType>li>a>span:not(.ui-menu-icon){padding-right:16px;}#Devices_Import_Headers #Devices_Import_Headers_TableContainer table>thead ul.importHeaderType ul{z-index:1000;}#Devices_Import_Headers #Devices_Import_Headers_TableContainer table>thead td.headerIgnoreColumn{background-color:#fa6800;}#Devices_Import_Headers #Devices_Import_Headers_TableContainer table>thead td:not(.headerIgnoreColumn){background-color:#1e6dab;}#Devices_Import_Headers #Devices_Import_Headers_TableContainer table>tbody td.headerDeviceSerialNumber{border-top-color:#d1e6f7;border-bottom-color:#d1e6f7;background-color:#e2f0fa;}#Devices_Import_Headers #Devices_Import_Headers_TableContainer table>tbody td.headerIgnoreColumn{max-width:150px;white-space:nowrap;overflow:hidden;-ms-text-overflow:ellipsis;-o-text-overflow:ellipsis;text-overflow:ellipsis;color:#ccc;}#Devices_Import_Parsing_Dialog{padding-top:50px;text-align:center;}#Devices_Import_Parsing_Dialog i{margin-right:10px;color:#1e6dab;}#Devices_Import_Review #Devices_Import_Review_Navigation{margin-top:15px;text-align:right;}#Devices_Import_Review #Devices_Import_Review_Navigation ul{display:inline-block;padding:0;border:1px solid #bbb;}#Devices_Import_Review #Devices_Import_Review_Navigation ul li{display:inline-block;padding:3px 10px;margin:0;}#Devices_Import_Review #Devices_Import_Review_Navigation ul li.actionDetached{background-color:#ffd0cc;}#Devices_Import_Review #Devices_Import_Review_Navigation ul li.actionModified{background-color:#e2f0fa;}#Devices_Import_Review #Devices_Import_Review_Navigation ul li.actionAdded{background-color:#e7f9d5;}#Devices_Import_Review #Devices_Import_Review_Navigation ul li.actionUnchanged{background-color:hsl(0,0%,98.5%);}#Devices_Import_Review #Devices_Import_Review_TableContainer{margin:18px 0;overflow-x:auto;border:1px solid #ccc;}#Devices_Import_Review #Devices_Import_Review_TableContainer table>thead{white-space:nowrap;}#Devices_Import_Review #Devices_Import_Review_TableContainer table>thead tr:nth-child(2) th{padding-top:0;font-weight:normal;font-size:.9em;}#Devices_Import_Review #Devices_Import_Review_TableContainer table>tbody td.action{text-align:center;}#Devices_Import_Review #Devices_Import_Review_TableContainer table>tbody tr.actionDetached td.action i:before{color:#e51400;content:"";}#Devices_Import_Review #Devices_Import_Review_TableContainer table>tbody tr.actionDetached td{background-color:#ffe7e5;}#Devices_Import_Review #Devices_Import_Review_TableContainer table>tbody tr.actionUnchanged td.action i:before{content:"";}#Devices_Import_Review #Devices_Import_Review_TableContainer table>tbody tr.actionUnchanged td{background-color:hsl(0,0%,98.5%);}#Devices_Import_Review #Devices_Import_Review_TableContainer table>tbody tr.actionUnchanged td:nth-child(n+3){color:#ccc;}#Devices_Import_Review #Devices_Import_Review_TableContainer table>tbody tr.actionModified td.action i:before{color:#1e6dab;content:"";}#Devices_Import_Review #Devices_Import_Review_TableContainer table>tbody tr.actionModified td{background-color:#f4f9fd;}#Devices_Import_Review #Devices_Import_Review_TableContainer table>tbody tr.actionAdded td.action i:before{color:#60a917;content:"";}#Devices_Import_Review #Devices_Import_Review_TableContainer table>tbody tr.actionAdded td{background-color:#e7f9d5;}#Devices_Import_Review #Devices_Import_Review_TableContainer table>tbody tr:not(.actionUnchanged) td.actionUnchanged:nth-child(n+3):not(.headerDeviceSerialNumber){color:#ccc;}#Devices_Import_Review #Devices_Import_Review_TableContainer table>tbody td.actionError{color:#e51400;background-color:#fff1ef;}#Devices_Import_Review #Devices_Import_Review_TableContainer table>tbody td.actionError span.errorMessage{display:none;}#Devices_Import_Review #Devices_Import_Review_TableContainer table>tbody td.actionModified{background-color:#e2f0fa!important;}#Devices_Import_Review #Devices_Import_Review_TableContainer table>tbody td.headerDeviceSerialNumber,#Devices_Import_Review #Devices_Import_Review_TableContainer table>tbody td.headerDeviceDecommissionedDate,#Devices_Import_Review #Devices_Import_Review_TableContainer table>tbody td.headerDeviceDecommissionedReason,#Devices_Import_Review #Devices_Import_Review_TableContainer table>tbody td.headerModelId,#Devices_Import_Review #Devices_Import_Review_TableContainer table>tbody td.headerBatchId,#Devices_Import_Review #Devices_Import_Review_TableContainer table>tbody td.headerProfileId,#Devices_Import_Review #Devices_Import_Review_TableContainer table>tbody td.headerAssignedUserId{white-space:nowrap;}#Devices_Import_Review #Devices_Import_Review_TableContainer table>tbody span.smallMessage{color:inherit;} \ No newline at end of file +.tableData{border:solid 1px #f4f4f4;border-collapse:collapse;}.tableData>tbody>tr>td{border:solid 1px #f4f4f4;background-color:#fff;}.tableData>tbody>tr:nth-child(odd)>td{background-color:hsl(0,0%,98.5%);}.tableData>thead>tr>th,.tableData>tbody>tr>th{background-color:#f4f4f4;border:solid 1px #f4f4f4;}.tableData>tbody>tr:hover>td{background-color:hsl(0,0%,97.5%);}.tableData>tfoot>tr>th,.tableData>tfoot>tr>td{background-color:#f4f4f4;}.tableDataDark{border:solid 1px #d8d8d8;border-collapse:collapse;}.tableDataDark td{border:solid 1px #d8d8d8;background-color:#fff;}.tableDataDark th{background-color:#eee;border:solid 1px #d8d8d8;}.tableDataContainer{background-color:#fff;}.tableDataVertical{border:solid 1px #f4f4f4;border-collapse:collapse;}.tableDataVertical>tbody>tr:nth-child(odd){background-color:#f4f4f4;margin:0;padding:0;}.tableDataVertical>tbody>tr>th.name{width:170px;text-align:right;}.tableDataVertical table.sub>tbody>tr:not(:first-child)>th,.tableDataVertical table.sub>tbody>tr:not(:first-child)>td{border-top:1px dashed #aaa;}.tableDataVertical table.sub>tbody>tr>th{font-weight:normal;text-align:right;}.tableDataVertical table.sub>tbody>tr>th.name{text-align:right;}.icon16{display:inline-block;height:16px;width:16px;margin-left:2px;cursor:pointer;}.subtleUntilHover{-moz-opacity:.3;opacity:.3;}.subtleUntilHover:hover{-moz-opacity:1;opacity:1;}#layout_PageHeading #Device_Show_Status{margin-left:20px;display:inline-block;height:50px;font-family:"Segoe UI",Arial,Verdana,Tahoma,sans-serif;font-weight:lighter;font-stretch:condensed;font-size:.7em;text-transform:uppercase;}#layout_PageHeading #Device_Show_Status span.icon{margin-right:6px;}#Device_Show #Device_Show_Subjects{table-layout:fixed;}#Device_Show #Device_Show_Subjects>tbody>tr>td{padding-top:0;height:100%;}#Device_Show #Device_Show_Subjects>tbody>tr>td>div{position:relative;}#Device_Show #Device_Show_Subjects>tbody>tr>td>div div.status{margin-top:2px;padding-top:2px;border-top:1px dashed #ddd;}#Device_Show #Device_Show_Subjects>tbody>tr>td>div input.discreet{margin-left:-2px;}#Device_Show #Device_Show_Subjects>tbody>tr>td:not(:last-child){border-right:1px dashed #aaa;}#Device_Show #Device_Show_Subjects #Device_Show_Details table.verticalHeadings>tbody>tr>td:first-child{width:104px;font-weight:600;}#Device_Show #Device_Show_Subjects #Device_Show_Details #Device_Show_Details_Asset_Name{font-weight:600;}#Device_Show #Device_Show_Subjects #Device_Show_Details #Device_Show_Details_Asset_Enrolled_Trusted{display:inline-block;height:16px;padding-left:16px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACWUlEQVQ4y6XRXWiSURgHcJsXa4WNNuuyiy6CoAupixERoXXhmljuxaJiFrVA1i72cVFCOSMt8rNt2YfGO5g5Z1NstWW+c4ZBq4QpqMkEbZDSCObAMprjdf90sIjxsgUdODd/zvmd5zwPCwDrf/aGB7q6utgmk8ngdruzVqt10eVyTWu1Wuk/AXK5vMpoNPpjsRgGbU8/9fbdH/J4PAuRSARKpfLKhoBYLG595nTCaDSZVjPp6TPbHQ5H0mAwfBeJRHXrAp0dna9JcqCguX2H/Xd+S625aLFYQBDE8XWBd+8/TI6Njc+vzcfGX4nLX4FOp5OuC0wGAlS53NzaPPAm2Gi32+H3+5tYJEl+pigKoVAIPp+PnpqaosPhMF1uHB2Px2mv14vya6VgMKhhHGN3d/dSMplENptFIpHA3NwcCoUCSqUSKqvScZVKBbPZHGQEFApFMZ1OI5PJIBqNrkD5fB40Ta8AlcrUajVsNpufEbh+42YxHEkh+/UbUqlZpGd/lAH8WTMzMzDd64d7NMAMDOobi/OpHqh6rqK9jcCvBQncQzK0Xm5DPn0BJ4lz6GgVIkedYAaamxqK0dEDePl4FziczehTsZGLs7BnNwdiwRac4lejvp6La83VzABv/8FF/qG9oD/WQS/fhNptHEw8rEJiuAo7ubXACAtH9m0Fu2YHxQzweEuEVIYnaiFmvQ04f1aItksi5KaP4ZFGjDB5GG/7j4LL5YYYgZYW2c/yiJbv6h/A0EvC4RjGiOsFnK4J+KgABmyjsDufL0skki8CgYCoXOLz+TWrwG+kXMkgQ6yv+QAAAABJRU5ErkJggg==);background-repeat:no-repeat;}#Device_Show #Device_Show_Subjects #Device_Show_Details #Device_Show_User #Device_Show_User_Photo_Container{float:left;padding-right:2px;}#Device_Show #Device_Show_Subjects #Device_Show_Details #Device_Show_User #Device_Show_User_Photo{max-width:48px;height:auto;}#Device_Show #Device_Show_Subjects #Device_Show_Details #Device_Show_User #Device_Show_User_Flags{font-size:16px;}#Device_Show #Device_Show_Subjects #Device_Show_Details #Device_Show_User #Device_Show_User_Flags>i{cursor:default;}#Device_Show #Device_Show_Subjects #Device_Show_Details #Device_Show_User #Device_Show_User_Flags>i>.details{display:none;}#Device_Show #Device_Show_Subjects #Device_Show_Details #Device_Show_GenerateDocument_Container{padding-top:4px;}#Device_Show #Device_Show_Subjects #Device_Show_Policies table.verticalHeadings>tbody>tr>td:first-child{width:120px;font-weight:600;}#Device_Show #Device_Show_Subjects #Device_Show_Aspects #Device_Show_Aspects_Model_Image{display:block;width:256px;height:256px;margin:0 auto;}#Device_Show #Device_Show_Subjects #Device_Show_Subjects_Actions>td{padding-top:4px;}#DeviceDetailTabs{margin-top:10px;border-radius:0;background-image:none;background-color:#fff;border:0;padding:0;}#DeviceDetailTabs #DeviceDetailTabItems{border-radius:0;border-top:1px solid #ddd;border-right:1px solid #ddd;border-left:1px solid #ddd;border-bottom:0;padding:2px 0 0 4px;background-image:none;background-color:#eee;display:table;}#DeviceDetailTabs #DeviceDetailTabItems>li{top:0;border-radius:0;margin:0 5px 0 0;padding:0;line-height:normal;margin-right:4px;}#DeviceDetailTabs #DeviceDetailTabItems>li>a{padding:5px 8px;}#DeviceDetailTabs div.ui-tabs-panel{border-radius:0;padding:4px;border-right:1px solid #ddd;border-bottom:1px solid #ddd;border-left:1px solid #ddd;border-top:0;background-color:#eee;}#Device_Show_Policies_Profile_Actions_Update_Dialog .profile-list,#Device_Show_Policies_Batch_Actions_Update_Dialog .profile-list{max-height:300px;overflow-y:auto;}#Device_Show_Policies_Profile_Actions_Update_Dialog .profile-list li,#Device_Show_Policies_Batch_Actions_Update_Dialog .profile-list li{background-color:#fff;padding:2px 0 2px 4px;}#Device_Show_Policies_Profile_Actions_Update_Dialog .profile-list li:nth-child(odd),#Device_Show_Policies_Batch_Actions_Update_Dialog .profile-list li:nth-child(odd){background-color:hsl(0,0%,98.5%);}#Device_Show_Policies_Profile_Actions_Update_Dialog .profile-list li.selected,#Device_Show_Policies_Batch_Actions_Update_Dialog .profile-list li.selected{background-color:#cddbec;font-weight:600;}#Device_Show_Policies_Profile_Actions_Update_Dialog .enforce-ou,#Device_Show_Policies_Batch_Actions_Update_Dialog .enforce-ou{padding-top:.5em;}#DeviceDetailTab-JobsContainer div.jobTable{margin:-1px;border:1px solid #ddd;}#DeviceDetailTab-JobsContainer .dataTables_wrapper .dataTables_filter{margin-top:-24px;-moz-opacity:1;opacity:1;}#DeviceDetailTab-JobsContainer .dataTables_wrapper .dataTables_length{margin-top:-24px;-moz-opacity:1;opacity:1;}#DeviceDetailTab-JobsContainer .dataTables_wrapper .dataTables_showStatusClosed{right:220px;margin-top:-24px;}#DeviceDetailTab-DetailsContainer>table{border:solid 1px #f4f4f4;border-collapse:collapse;}#DeviceDetailTab-DetailsContainer>table>tbody>tr>td{border:solid 1px #f4f4f4;background-color:#fff;}#DeviceDetailTab-DetailsContainer>table>tbody>tr:nth-child(odd)>td{background-color:hsl(0,0%,98.5%);}#DeviceDetailTab-DetailsContainer>table>thead>tr>th,#DeviceDetailTab-DetailsContainer>table>tbody>tr>th{background-color:#f4f4f4;border:solid 1px #f4f4f4;}#DeviceDetailTab-DetailsContainer>table>tbody>tr:hover>td{background-color:hsl(0,0%,97.5%);}#DeviceDetailTab-DetailsContainer>table>tfoot>tr>th,#DeviceDetailTab-DetailsContainer>table>tfoot>tr>td{background-color:#f4f4f4;}#DeviceDetailTab-DetailsContainer>table>tbody>tr>th{width:150px;}#DeviceDetailTab-DetailsContainer>table>tbody>tr>th,#DeviceDetailTab-DetailsContainer>table>tbody>tr>td.pad{padding:10px 6px;}#DeviceDetailTab-DetailsContainer .device_detail_disk_drives .partition{position:relative;height:40px;}#DeviceDetailTab-DetailsContainer .device_detail_disk_drives .partition>span{position:absolute;display:block;height:40px;box-sizing:border-box;overflow-x:hidden;overflow-y:hidden;text-overflow:ellipsis;white-space:nowrap;background-color:#f4f4f4;padding:2px;line-height:18px;border:1px solid #cacaca;}#DeviceDetailTab-DetailsContainer .device_detail_disk_drives .partition>span .details{position:relative;}#DeviceDetailTab-DetailsContainer .device_detail_disk_drives .partition>span .freespace{position:absolute;top:0;height:40px;display:block;background-color:#fff;background:repeating-linear-gradient(45deg,#f4f4f4,#f4f4f4 10px,#fff 10px,#fff 20px);}#deviceShowResources #AttachmentsContainer{padding:0;}#deviceShowResources #Attachments{position:relative;border:1px solid #ccc;background-color:#fff;}#deviceShowResources #Attachments div.attachmentOutput{position:relative;height:115px;overflow:auto;}#deviceShowResources #Attachments div.attachmentOutput>a{display:block;float:left;height:48px;width:221px;padding:2px;margin:2px;font-size:.9em;border:1px solid #fff;color:#000;text-decoration:none;}#deviceShowResources #Attachments div.attachmentOutput>a span.comments,#deviceShowResources #Attachments div.attachmentOutput>a span.author,#deviceShowResources #Attachments div.attachmentOutput>a span.timestamp{display:block;float:left;width:168px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;height:16px;}#deviceShowResources #Attachments div.attachmentOutput>a span.author{color:#888;width:150px;}#deviceShowResources #Attachments div.attachmentOutput>a span.timestamp{color:#888;font-style:italic;}#deviceShowResources #Attachments div.attachmentOutput>a span.icon{display:block;float:left;height:48px;width:48px;margin-right:2px;}#deviceShowResources #Attachments div.attachmentOutput>a span.icon img{height:48px;width:48px;}#deviceShowResources #Attachments div.attachmentOutput>a span.icon img.loading{display:none;}#deviceShowResources #Attachments div.attachmentOutput>a:hover{background-color:#ededed;border:1px solid #ccc;}#deviceShowResources #Attachments div.attachmentOutput>a:hover span.remove{opacity:.5;}#deviceShowResources #Attachments div.attachmentOutput>a span.remove{font-size:1.4em;color:#e51400;margin-left:6px;cursor:pointer;opacity:0;}#deviceShowResources #Attachments div.attachmentOutput>a span.remove:hover{opacity:1;}#deviceShowResources #Attachments div.attachmentInput{border-top:1px solid #ccc;height:40px;background-color:#fff;padding:3px;}#deviceShowResources #Attachments div.attachmentInput span.action{color:#333;display:block;margin:0 4px 0 0;font-size:1.5em;cursor:pointer;float:right;border:1px solid #fff;padding:.5em;}#deviceShowResources #Attachments div.attachmentInput span.action:hover{color:#335a87;background-color:#ededed;border:1px solid #ccc;}#deviceShowResources #Attachments div.attachmentInput span.action.disabled{color:rgba(51,51,51,.2);cursor:default;}#deviceShowResources #Attachments div.attachmentInput span.action.disabled:hover{color:rgba(51,51,51,.2);background-color:inherit;border:1px solid #fff;}#Device_Show_Details_Actions_AddFlag_Dialog{height:400px;}#Device_Show_Details_Actions_AddFlag_Dialog .flagPicker{position:absolute;width:250px;height:300px;overflow-y:auto;background-color:#fcfcfc;border:1px solid #ccc;}#Device_Show_Details_Actions_AddFlag_Dialog .flagPicker>div{background-color:#fff;border-bottom:1px solid #ddd;padding:6px 0 6px 6px;cursor:pointer;}#Device_Show_Details_Actions_AddFlag_Dialog .flagPicker>div:hover{background-color:#f4f4f4;}#Device_Show_Details_Actions_AddFlag_Dialog .flagPicker>div.selected,#Device_Show_Details_Actions_AddFlag_Dialog .flagPicker>div.selected:hover{background-color:#eee;}#Device_Show_Details_Actions_AddFlag_Dialog .details{display:none;position:absolute;left:280px;top:1em;}#Device_Show_Details_Actions_AddFlag_Dialog .details h4{margin-bottom:4px;}#Device_Show_Details_Actions_AddFlag_Dialog .details textarea{min-width:280px;height:200px;}#DeviceDetailTab-Flags #deviceFlags{border:solid 1px #d8d8d8;border-collapse:collapse;table-layout:fixed;}#DeviceDetailTab-Flags #deviceFlags td{border:solid 1px #d8d8d8;background-color:#fff;}#DeviceDetailTab-Flags #deviceFlags th{background-color:#eee;border:solid 1px #d8d8d8;}#DeviceDetailTab-Flags #deviceFlags i.fa-edit{position:absolute;top:0;right:0;margin-top:4px;font-size:1.1em;cursor:pointer;display:none;color:#335a87;}#DeviceDetailTab-Flags #deviceFlags i.fa-edit:hover{color:#5e8cc2;}#DeviceDetailTab-Flags #deviceFlags td:hover i.fa-edit{display:inline-block;}#DeviceDetailTab-Flags #deviceFlags th.name{width:200px;}#DeviceDetailTab-Flags #deviceFlags tr.removed td{background-color:#f4f4f4;}#DeviceDetailTab-Flags #deviceFlags td.name{vertical-align:middle;}#DeviceDetailTab-Flags #deviceFlags td.name .fa-stack{line-height:1.6em;}#DeviceDetailTab-Flags #deviceFlags td.added,#DeviceDetailTab-Flags #deviceFlags td.removed{vertical-align:middle;}#DeviceDetailTab-Flags #deviceFlags td.added .expressionResult,#DeviceDetailTab-Flags #deviceFlags td.removed .expressionResult{margin-top:4px;font-style:italic;}#DeviceDetailTab-Flags #deviceFlags td.comments{vertical-align:middle;}#DeviceDetailTab-Flags #deviceFlags td.comments .editable{position:relative;}#DeviceDetailTab-Flags #deviceFlags td.comments .commentsRaw{display:none;}#DeviceDetailTab-Flags #deviceFlags td.removed.na{vertical-align:middle;text-align:center;}#DeviceDetailTab-Flags>.none{text-align:center;padding:30px 0;font-style:italic;background-color:#fff;}#Device_Show_Flags_Actions_EditComments_Dialog h4{margin-bottom:4px;}#Device_Show_Flags_Actions_EditComments_Dialog_Comments{width:280px;}#Devices_Export .Devices_Export_Type_Target{margin-top:10px;display:none;}#Devices_Export #Devices_Export_Fields #Devices_Export_Fields_Defaults{font-size:.75em;}#Devices_Export #Devices_Export_Fields th{font-size:1.05em;}#Devices_Export #Devices_Export_Fields th span{margin-top:4px;font-size:.8em;}#Devices_Export_Download_Dialog{padding-top:20px;text-align:center;}#Devices_Export_Download_Dialog h4{margin-bottom:30px;}#Devices_Export_Download_Dialog a{margin-bottom:20px;}#Devices_Export_Exporting{padding-top:50px;text-align:center;}#Devices_Export_Exporting i{margin-right:10px;color:#1e6dab;}#Devices_Import #ImportFile{width:96%;margin-bottom:8px;}#Devices_Import #Devices_Import_Documentation{width:700px;margin:20px auto;}#Devices_Import #Devices_Import_Documentation>table>tbody th:first-child{width:220px;}#Devices_Import_Completed_Dialog{padding:50px 0;text-align:center;}#Devices_Import_Completed_Dialog h3{margin-bottom:16px;}#Devices_Import_Completed_Dialog i{margin-right:10px;color:#60a917;}#Devices_Import_Loading_Dialog{padding-top:50px;text-align:center;}#Devices_Import_Loading_Dialog i{margin-right:10px;color:#1e6dab;}#Devices_Import_Headers #Devices_Import_Headers_TableContainer{margin:18px 0;overflow-x:auto;border:1px solid #ccc;}#Devices_Import_Headers #Devices_Import_Headers_TableContainer table>thead{white-space:nowrap;}#Devices_Import_Headers #Devices_Import_Headers_TableContainer table>thead ul.importHeaderType>li>a>span:not(.ui-menu-icon){padding-right:16px;}#Devices_Import_Headers #Devices_Import_Headers_TableContainer table>thead ul.importHeaderType ul{z-index:1000;}#Devices_Import_Headers #Devices_Import_Headers_TableContainer table>thead td.headerIgnoreColumn{background-color:#fa6800;}#Devices_Import_Headers #Devices_Import_Headers_TableContainer table>thead td:not(.headerIgnoreColumn){background-color:#1e6dab;}#Devices_Import_Headers #Devices_Import_Headers_TableContainer table>tbody td.headerDeviceSerialNumber{border-top-color:#d1e6f7;border-bottom-color:#d1e6f7;background-color:#e2f0fa;}#Devices_Import_Headers #Devices_Import_Headers_TableContainer table>tbody td.headerIgnoreColumn{max-width:150px;white-space:nowrap;overflow:hidden;-ms-text-overflow:ellipsis;-o-text-overflow:ellipsis;text-overflow:ellipsis;color:#ccc;}#Devices_Import_Parsing_Dialog{padding-top:50px;text-align:center;}#Devices_Import_Parsing_Dialog i{margin-right:10px;color:#1e6dab;}#Devices_Import_Review #Devices_Import_Review_Navigation{margin-top:15px;text-align:right;}#Devices_Import_Review #Devices_Import_Review_Navigation ul{display:inline-block;padding:0;border:1px solid #bbb;}#Devices_Import_Review #Devices_Import_Review_Navigation ul li{display:inline-block;padding:3px 10px;margin:0;}#Devices_Import_Review #Devices_Import_Review_Navigation ul li.actionDetached{background-color:#ffd0cc;}#Devices_Import_Review #Devices_Import_Review_Navigation ul li.actionModified{background-color:#e2f0fa;}#Devices_Import_Review #Devices_Import_Review_Navigation ul li.actionAdded{background-color:#e7f9d5;}#Devices_Import_Review #Devices_Import_Review_Navigation ul li.actionUnchanged{background-color:hsl(0,0%,98.5%);}#Devices_Import_Review #Devices_Import_Review_TableContainer{margin:18px 0;overflow-x:auto;border:1px solid #ccc;}#Devices_Import_Review #Devices_Import_Review_TableContainer table>thead{white-space:nowrap;}#Devices_Import_Review #Devices_Import_Review_TableContainer table>thead tr:nth-child(2) th{padding-top:0;font-weight:normal;font-size:.9em;}#Devices_Import_Review #Devices_Import_Review_TableContainer table>tbody td.action{text-align:center;}#Devices_Import_Review #Devices_Import_Review_TableContainer table>tbody tr.actionDetached td.action i:before{color:#e51400;content:"";}#Devices_Import_Review #Devices_Import_Review_TableContainer table>tbody tr.actionDetached td{background-color:#ffe7e5;}#Devices_Import_Review #Devices_Import_Review_TableContainer table>tbody tr.actionUnchanged td.action i:before{content:"";}#Devices_Import_Review #Devices_Import_Review_TableContainer table>tbody tr.actionUnchanged td{background-color:hsl(0,0%,98.5%);}#Devices_Import_Review #Devices_Import_Review_TableContainer table>tbody tr.actionUnchanged td:nth-child(n+3){color:#ccc;}#Devices_Import_Review #Devices_Import_Review_TableContainer table>tbody tr.actionModified td.action i:before{color:#1e6dab;content:"";}#Devices_Import_Review #Devices_Import_Review_TableContainer table>tbody tr.actionModified td{background-color:#f4f9fd;}#Devices_Import_Review #Devices_Import_Review_TableContainer table>tbody tr.actionAdded td.action i:before{color:#60a917;content:"";}#Devices_Import_Review #Devices_Import_Review_TableContainer table>tbody tr.actionAdded td{background-color:#e7f9d5;}#Devices_Import_Review #Devices_Import_Review_TableContainer table>tbody tr:not(.actionUnchanged) td.actionUnchanged:nth-child(n+3):not(.headerDeviceSerialNumber){color:#ccc;}#Devices_Import_Review #Devices_Import_Review_TableContainer table>tbody td.actionError{color:#e51400;background-color:#fff1ef;}#Devices_Import_Review #Devices_Import_Review_TableContainer table>tbody td.actionError span.errorMessage{display:none;}#Devices_Import_Review #Devices_Import_Review_TableContainer table>tbody td.actionModified{background-color:#e2f0fa!important;}#Devices_Import_Review #Devices_Import_Review_TableContainer table>tbody td.headerDeviceSerialNumber,#Devices_Import_Review #Devices_Import_Review_TableContainer table>tbody td.headerDeviceDecommissionedDate,#Devices_Import_Review #Devices_Import_Review_TableContainer table>tbody td.headerDeviceDecommissionedReason,#Devices_Import_Review #Devices_Import_Review_TableContainer table>tbody td.headerModelId,#Devices_Import_Review #Devices_Import_Review_TableContainer table>tbody td.headerBatchId,#Devices_Import_Review #Devices_Import_Review_TableContainer table>tbody td.headerProfileId,#Devices_Import_Review #Devices_Import_Review_TableContainer table>tbody td.headerAssignedUserId{white-space:nowrap;}#Devices_Import_Review #Devices_Import_Review_TableContainer table>tbody span.smallMessage{color:inherit;} \ No newline at end of file diff --git a/Disco.Web/Controllers/DeviceController.cs b/Disco.Web/Controllers/DeviceController.cs index 4e402820..886b6ac9 100644 --- a/Disco.Web/Controllers/DeviceController.cs +++ b/Disco.Web/Controllers/DeviceController.cs @@ -4,6 +4,7 @@ using Disco.Models.Services.Jobs.JobLists; using Disco.Models.UI.Device; using Disco.Services; using Disco.Services.Authorization; +using Disco.Services.Devices.DeviceFlags; using Disco.Services.Exporting; using Disco.Services.Interop.ActiveDirectory; using Disco.Services.Plugins.Features.DetailsProvider; @@ -12,6 +13,7 @@ using Disco.Services.Users; using Disco.Services.Web; using System; using System.Collections.Generic; +using System.Data.Entity; using System.Linq; using System.Web; using System.Web.Mvc; @@ -226,16 +228,18 @@ namespace Disco.Web.Controllers Database.Configuration.LazyLoadingEnabled = true; m.Device = Database.Devices - .Include("DeviceModel") - .Include("DeviceProfile") - .Include("DeviceBatch") - .Include("DeviceDetails") - .Include("DeviceUserAssignments.AssignedUser.UserFlagAssignments") - .Include("AssignedUser.UserFlagAssignments") - .Include("AssignedUser.UserDetails") - .Include("DeviceCertificates") - .Include("DeviceAttachments.TechUser") - .Include("DeviceAttachments.DocumentTemplate") + .Include(d => d.DeviceModel) + .Include(d => d.DeviceProfile) + .Include(d => d.DeviceBatch) + .Include(d => d.DeviceDetails) + .Include(d => d.DeviceUserAssignments.Select(a => a.AssignedUser.UserFlagAssignments)) + .Include(d => d.AssignedUser.UserFlagAssignments) + .Include(d => d.AssignedUser.UserDetails) + .Include(d => d.DeviceCertificates) + .Include(d => d.DeviceAttachments.Select(a => a.TechUser)) + .Include(d => d.DeviceAttachments.Select(a => a.DocumentTemplate)) + .Include(d => d.DeviceFlagAssignments.Select(a => a.AddedUser)) + .Include(d => d.DeviceFlagAssignments.Select(a => a.RemovedUser)) .FirstOrDefault(d => d.SerialNumber == id); if (m.Device == null) @@ -310,6 +314,16 @@ namespace Disco.Web.Controllers m.DeviceProfileWirelessProfileProviders = m.Device.DeviceProfile.GetWirelessProfileProviders().ToList(); } + if (Authorization.Has(Claims.Device.ShowFlagAssignments)) + { + var usedFlags = m.Device.DeviceFlagAssignments + .Where(a => !a.RemovedDate.HasValue) + .Select(a => a.DeviceFlagId) + .Distinct().ToList(); + + m.AvailableDeviceFlags = DeviceFlagService.GetDeviceFlags().Where(f => !usedFlags.Contains(f.Id)).ToList(); + } + if (Authorization.Has(Claims.User.ShowDetails)) { // Populate Custom Details diff --git a/Disco.Web/Controllers/UserController.cs b/Disco.Web/Controllers/UserController.cs index 44d6b7ac..c1f56475 100644 --- a/Disco.Web/Controllers/UserController.cs +++ b/Disco.Web/Controllers/UserController.cs @@ -10,6 +10,7 @@ using Disco.Services.Users; using Disco.Services.Users.UserFlags; using Disco.Services.Web; using System; +using System.Data.Entity; using System.Linq; using System.Web.Mvc; @@ -54,15 +55,15 @@ namespace Disco.Web.Controllers } m.User = Database.Users - .Include("DeviceUserAssignments.Device.DeviceModel") - .Include("DeviceUserAssignments.Device.DeviceProfile") - .Include("DeviceUserAssignments.Device.DeviceBatch") - .Include("DeviceUserAssignments.Device.DeviceDetails") - .Include("UserAttachments.TechUser") - .Include("UserAttachments.DocumentTemplate") - .Include("UserFlagAssignments.AddedUser") - .Include("UserFlagAssignments.RemovedUser") - .Include("UserDetails") + .Include(u => u.DeviceUserAssignments.Select(dua => dua.Device.DeviceModel)) + .Include(u => u.DeviceUserAssignments.Select(dua => dua.Device.DeviceProfile)) + .Include(u => u.DeviceUserAssignments.Select(dua => dua.Device.DeviceBatch)) + .Include(u => u.DeviceUserAssignments.Select(dua => dua.Device.DeviceDetails)) + .Include(u => u.UserAttachments.Select(ua => ua.TechUser)) + .Include(u => u.UserAttachments.Select(ua => ua.DocumentTemplate)) + .Include(u => u.UserFlagAssignments.Select(ufa => ufa.AddedUser)) + .Include(u => u.UserFlagAssignments.Select(ufa => ufa.RemovedUser)) + .Include(u => u.UserDetails) .FirstOrDefault(um => um.UserId == id); if (m.User == null) @@ -79,7 +80,7 @@ namespace Disco.Web.Controllers HideClosedJobs = true, EnablePaging = false }; - m.Jobs.Fill(Database, Disco.Services.Searching.Search.BuildJobTableModel(Database).Where(j => j.UserId == id).OrderByDescending(j => j.Id), true); + m.Jobs.Fill(Database, Services.Searching.Search.BuildJobTableModel(Database).Where(j => j.UserId == id).OrderByDescending(j => j.Id), true); } if (Authorization.Has(Claims.User.ShowFlagAssignments)) diff --git a/Disco.Web/Disco.Web.csproj b/Disco.Web/Disco.Web.csproj index 121c6f33..11e08244 100644 --- a/Disco.Web/Disco.Web.csproj +++ b/Disco.Web/Disco.Web.csproj @@ -836,6 +836,11 @@ T4MVC.tt + + _Flags.cshtml + True + True + ImportHeaders.cshtml True @@ -1936,6 +1941,10 @@ RazorGenerator AddOffline.generated.cs + + RazorGenerator + _Flags.generated.cs + RazorGenerator ImportHeaders.generated.cs diff --git a/Disco.Web/Extensions/T4MVC/DeviceController.generated.cs b/Disco.Web/Extensions/T4MVC/DeviceController.generated.cs index 29b426ed..35e7a2ed 100644 --- a/Disco.Web/Extensions/T4MVC/DeviceController.generated.cs +++ b/Disco.Web/Extensions/T4MVC/DeviceController.generated.cs @@ -218,6 +218,7 @@ namespace Disco.Web.Controllers public readonly string _AssignmentHistory = "_AssignmentHistory"; public readonly string _Certificates = "_Certificates"; public readonly string _Details = "_Details"; + public readonly string _Flags = "_Flags"; public readonly string _Jobs = "_Jobs"; public readonly string _Resources = "_Resources"; public readonly string _Subject = "_Subject"; @@ -225,6 +226,7 @@ namespace Disco.Web.Controllers public readonly string _AssignmentHistory = "~/Views/Device/DeviceParts/_AssignmentHistory.cshtml"; public readonly string _Certificates = "~/Views/Device/DeviceParts/_Certificates.cshtml"; public readonly string _Details = "~/Views/Device/DeviceParts/_Details.cshtml"; + public readonly string _Flags = "~/Views/Device/DeviceParts/_Flags.cshtml"; public readonly string _Jobs = "~/Views/Device/DeviceParts/_Jobs.cshtml"; public readonly string _Resources = "~/Views/Device/DeviceParts/_Resources.cshtml"; public readonly string _Subject = "~/Views/Device/DeviceParts/_Subject.cshtml"; diff --git a/Disco.Web/Models/Device/ShowModel.cs b/Disco.Web/Models/Device/ShowModel.cs index 92f25923..b18957bf 100644 --- a/Disco.Web/Models/Device/ShowModel.cs +++ b/Disco.Web/Models/Device/ShowModel.cs @@ -1,4 +1,5 @@ -using Disco.Models.Services.Documents; +using Disco.Models.Repository; +using Disco.Models.Services.Documents; using Disco.Models.Services.Jobs.JobLists; using Disco.Models.UI.Device; using Disco.Services.Plugins; @@ -13,20 +14,20 @@ namespace Disco.Web.Models.Device { public Disco.Models.Repository.Device Device { get; set; } - public List DeviceProfiles { get; set; } + public List DeviceProfiles { get; set; } public HashSet DecommissionedDeviceProfileIds { get; set; } public Disco.Models.BI.Config.OrganisationAddress DeviceProfileDefaultOrganisationAddress { get; set; } public List DeviceProfileCertificateProviders { get; set; } public List DeviceProfileWirelessProfileProviders { get; set; } - public List DeviceBatches { get; set; } + public List DeviceBatches { get; set; } public HashSet DecommissionedDeviceBatchIds { get; set; } public JobTableModel Jobs { get; set; } - public List Certificates { get; set; } + public List Certificates { get; set; } public string OrganisationUnit { get; set; } - public List DocumentTemplates { get; set; } + public List DocumentTemplates { get; set; } public List DocumentTemplatePackages { get; set; } public GenerateDocumentControlModel GenerateDocumentControlModel => new GenerateDocumentControlModel() { @@ -36,6 +37,8 @@ namespace Disco.Web.Models.Device HandlersPresent = Plugins.GetPluginFeatures(typeof(DocumentHandlerProviderFeature)).Any(), }; + public List AvailableDeviceFlags { get; set; } + public Dictionary AssignedUserDetails { get; set; } public bool HasAssignedUserPhoto { get; set; } } diff --git a/Disco.Web/Views/Device/DeviceParts/_Flags.cshtml b/Disco.Web/Views/Device/DeviceParts/_Flags.cshtml new file mode 100644 index 00000000..47b4ed8a --- /dev/null +++ b/Disco.Web/Views/Device/DeviceParts/_Flags.cshtml @@ -0,0 +1,182 @@ +@model Disco.Web.Models.Device.ShowModel +@using Disco.Services.Devices.DeviceFlags; +@{ + Authorization.Require(Claims.Device.ShowFlagAssignments); + + var hasRemove = Authorization.Has(Claims.Device.Actions.RemoveFlags); + var hasEdit = Authorization.Has(Claims.Device.Actions.EditFlags); + + var hasDeviceFlagShow = Authorization.Has(Claims.Config.DeviceFlag.Show); + var activeAssignmentCount = Model.Device.DeviceFlagAssignments == null ? 0 : Model.Device.DeviceFlagAssignments.Count(a => !a.RemovedDate.HasValue); + + var flagAssignments = Model.Device.DeviceFlagAssignments.Select(a => Tuple.Create(a, DeviceFlagService.GetDeviceFlag(a.DeviceFlagId))).ToList(); +} +
+ @if (flagAssignments.Count > 0) + { + + + + + + + + @foreach (var fa in flagAssignments.OrderByDescending(a => a.Item1.AddedDate)) + { + + + + + + + } +
NameAddedCommentsRemoved
+ + @if (hasDeviceFlagShow) + { + @Html.ActionLink(fa.Item2.Name, MVC.Config.DeviceFlag.Index(fa.Item2.Id)) + } + else + { + @fa.Item2.Name + } + + @CommonHelpers.FriendlyDateAndUser(fa.Item1.AddedDate, fa.Item1.AddedUser) + @if (fa.Item1.OnAssignmentExpressionResult != null) + { +
@fa.Item1.OnAssignmentExpressionResult
+ } +
+ @if (hasEdit) + { +
+ } + @if (fa.Item1.Comments == null) + { +
[no comments]
+ } + else + { +
@fa.Item1.Comments.ToHtmlComment()
+
@fa.Item1.Comments
+ } +
+ @if (fa.Item1.RemovedDate.HasValue) + { + @CommonHelpers.FriendlyDateAndUser(fa.Item1.RemovedDate.Value, fa.Item1.RemovedUser) + if (fa.Item1.OnUnassignmentExpressionResult != null) + { +
@fa.Item1.OnUnassignmentExpressionResult
+ } + } + else if (fa.Item1.CanRemove()) + { + Remove + } +
+
+ @using (Html.BeginForm(MVC.API.DeviceFlagAssignment.RemoveDevice())) + { + +

+  Are you sure? +

+ } +
+
+ @using (Html.BeginForm(MVC.API.DeviceFlagAssignment.UpdateComments())) + { + + +

Comments:

+

+ +

+ } +
+ + } + else + { +
This device has no associated flags
+ } + +
diff --git a/Disco.Web/Views/Device/DeviceParts/_Flags.generated.cs b/Disco.Web/Views/Device/DeviceParts/_Flags.generated.cs new file mode 100644 index 00000000..f3c35631 --- /dev/null +++ b/Disco.Web/Views/Device/DeviceParts/_Flags.generated.cs @@ -0,0 +1,690 @@ +#pragma warning disable 1591 +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Disco.Web.Views.Device.DeviceParts +{ + using System; + using System.Collections.Generic; + using System.IO; + using System.Linq; + using System.Net; + using System.Text; + using System.Web; + using System.Web.Helpers; + using System.Web.Mvc; + using System.Web.Mvc.Ajax; + using System.Web.Mvc.Html; + using System.Web.Routing; + using System.Web.Security; + using System.Web.UI; + using System.Web.WebPages; + using Disco; + using Disco.Models.Repository; + using Disco.Services; + using Disco.Services.Authorization; + + #line 2 "..\..\Views\Device\DeviceParts\_Flags.cshtml" + using Disco.Services.Devices.DeviceFlags; + + #line default + #line hidden + using Disco.Services.Web; + using Disco.Web; + using Disco.Web.Extensions; + + [System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "2.0.0.0")] + [System.Web.WebPages.PageVirtualPathAttribute("~/Views/Device/DeviceParts/_Flags.cshtml")] + public partial class _Flags : Disco.Services.Web.WebViewPage + { + public _Flags() + { + } + public override void Execute() + { + + #line 3 "..\..\Views\Device\DeviceParts\_Flags.cshtml" + + Authorization.Require(Claims.Device.ShowFlagAssignments); + + var hasRemove = Authorization.Has(Claims.Device.Actions.RemoveFlags); + var hasEdit = Authorization.Has(Claims.Device.Actions.EditFlags); + + var hasDeviceFlagShow = Authorization.Has(Claims.Config.DeviceFlag.Show); + var activeAssignmentCount = Model.Device.DeviceFlagAssignments == null ? 0 : Model.Device.DeviceFlagAssignments.Count(a => !a.RemovedDate.HasValue); + + var flagAssignments = Model.Device.DeviceFlagAssignments.Select(a => Tuple.Create(a, DeviceFlagService.GetDeviceFlag(a.DeviceFlagId))).ToList(); + + + #line default + #line hidden +WriteLiteral("\r\n\r\n"); + + + #line 15 "..\..\Views\Device\DeviceParts\_Flags.cshtml" + + + #line default + #line hidden + + #line 15 "..\..\Views\Device\DeviceParts\_Flags.cshtml" + if (flagAssignments.Count > 0) + { + + + #line default + #line hidden +WriteLiteral(" \r\n \r\n Name\r\n Added\r\n Comments\r\n Removed\r\n \r\n"); + + + #line 24 "..\..\Views\Device\DeviceParts\_Flags.cshtml" + + + #line default + #line hidden + + #line 24 "..\..\Views\Device\DeviceParts\_Flags.cshtml" + foreach (var fa in flagAssignments.OrderByDescending(a => a.Item1.AddedDate)) + { + + + #line default + #line hidden +WriteLiteral("