Searching: Add detail to device search results

This commit is contained in:
Gary Sharp committed 2018-04-19 17:06:58 +10:00
1 parent 8278efb9a6
commit df721d7d6e
8 files changed
+117 -110

No files matched your search

@@ -40,7 +40,7 @@ namespace Disco.Models.Services.Searching
public string AssignedUserId { get; set; } public string AssignedUserId { get; set; }
public string ComputerName { get; set; } public string ComputerName { get; set; }
public string DeviceModelDescription { get; set; } public string DeviceModelDescription { get; set; }
public string DeviceProfileDescription { get; set; } public string DeviceProfileName { get; set; }
public string DeviceBatchName { get; set; } public string DeviceBatchName { get; set; }
public int JobCount { get; set; } public int JobCount { get; set; }
public DateTime? DecommissionedDate { get; set; } public DateTime? DecommissionedDate { get; set; }
+1 -1
View File
@@ -301,7 +301,7 @@ namespace Disco.Services.Searching
AssetNumber = d.AssetNumber, AssetNumber = d.AssetNumber,
ComputerName = d.DeviceDomainId, ComputerName = d.DeviceDomainId,
DeviceModelDescription = d.DeviceModel.Description, DeviceModelDescription = d.DeviceModel.Description,
DeviceProfileDescription = d.DeviceProfile.Description, DeviceProfileName = d.DeviceProfile.Name,
DeviceBatchName = d.DeviceBatch.Name, DeviceBatchName = d.DeviceBatch.Name,
DecommissionedDate = d.DecommissionedDate, DecommissionedDate = d.DecommissionedDate,
AssignedUserId = d.AssignedUserId, AssignedUserId = d.AssignedUserId,
@@ -95,18 +95,21 @@
"bSort": true, "bSort": true,
"bInfo": false, "bInfo": false,
"bAutoWidth": false, "bAutoWidth": false,
"aoColumnDefs": [
{ 'aTargets': ['date'], 'sSortDataType': 'disco_datetime', 'sType': 'disco_datetime' }
],
"aaSorting": [], "aaSorting": [],
"oLanguage": { "oLanguage": {
"sSearch": "Filter:" "sSearch": "Filter:"
} }
}; };
var $dataTable = $table.dataTable(dataTableOptions); // Contains Decommissioned Devices?
// Contains Decommissioned Devces?
var $tbody = $table.children('tbody'); var $tbody = $table.children('tbody');
var $decommissionedDevices = $tbody.children('tr.decommissioned'); var $decommissionedDevices = $tbody.children('tr.decommissioned');
var $dataTable = $table.dataTable(dataTableOptions);
if ($decommissionedDevices.length > 0) { if ($decommissionedDevices.length > 0) {
var wrapper = $(this).closest('.dataTables_wrapper'); var wrapper = $(this).closest('.dataTables_wrapper');
@@ -1 +1 @@
(function(n,t,i){var r=[];i(function(){function t(){var t=i(this).closest(".dataTables_wrapper");t.length>0&&n.setTimeout(function(){var e=i(n),o=t.height(),r=t.offset(),u=e.scrollTop(),s=e.height(),h=u-r.top,f;h>0?i("html").animate({scrollTop:r.top},125):(f=(u+s-(o+r.top))*-1,f>0&&(o>s?i("html").animate({scrollTop:r.top},125):i("html").animate({scrollTop:u+f},125)))},1)}i("table.jobTable").each(function(){var u=i(this),h=!1,l=u.hasClass("enablePaging"),a=u.hasClass("enableFilter"),v=u.find("tr").length>20,y={bPaginate:l,sPaginationType:"full_numbers",bLengthChange:v,iDisplayLength:20,bFilter:a,bSort:!0,bInfo:!1,bAutoWidth:!1,aoColumnDefs:[{aTargets:["dates"],sSortDataType:"disco_datetime",sType:"disco_datetime"}],aaSorting:[],oLanguage:{sSearch:"Filter:"},fnDrawCallback:function(){h?t.apply(u):h=!0}},p=u.dataTable(y),c,o,f,e,n,s;if(u.hasClass("hideStatusClosed")&&(c=u.children("tbody"),o=c.children('tr[data-status="Closed"]'),o.length>0)){f=i(this).closest(".dataTables_wrapper");e=f;f.parent(".jobTable").length>0&&(e=f.parent());n=e.prev();n.length>0&&(n.is("h1")||n.is("h2")||n.is("h3"))?n.data("dataTable_originalContent",n.html()).text("Active "+n.text()):n=null;s=e.find("div.allClosed_container");s.length>0?(u.hide(),f.find(".dataTables_filter").hide()):i('<a class="dataTables_showStatusClosed button small" href="#">').text("Show Closed Jobs ("+o.length+")").appendTo(e);e.on("click","a.dataTables_showStatusClosed",function(){return u.show(),f.find(".dataTables_filter").show(),u.removeClass("hideStatusClosed"),s.remove(),i(this).remove(),n&&n.html(n.data("dataTable_originalContent")),t.apply(u[0]),!1})}r.push(this)});i("table.deviceTable").each(function(){var n=i(this),t=n.find("tr").length>20,u={bPaginate:t,sPaginationType:"full_numbers",bLengthChange:t,iDisplayLength:20,bFilter:!0,bSort:!0,bInfo:!1,bAutoWidth:!1,aaSorting:[],oLanguage:{sSearch:"Filter:"}};n.dataTable(u);r.push(this)});i("table.userTable").each(function(){var n=i(this),t=n.find("tr").length>20,u={bPaginate:t,sPaginationType:"full_numbers",bLengthChange:t,iDisplayLength:20,bFilter:!0,bSort:!0,bInfo:!1,bAutoWidth:!1,aaSorting:[],oLanguage:{sSearch:"Filter:"}};n.dataTable(u);r.push(this)})})})(window,document,$); (function(n,t,i){var r=[];i(function(){function t(){var t=i(this).closest(".dataTables_wrapper");t.length>0&&n.setTimeout(function(){var e=i(n),o=t.height(),r=t.offset(),u=e.scrollTop(),s=e.height(),h=u-r.top,f;h>0?i("html").animate({scrollTop:r.top},125):(f=(u+s-(o+r.top))*-1,f>0&&(o>s?i("html").animate({scrollTop:r.top},125):i("html").animate({scrollTop:u+f},125)))},1)}i("table.jobTable").each(function(){var u=i(this),h=!1,l=u.hasClass("enablePaging"),a=u.hasClass("enableFilter"),v=u.find("tr").length>20,y={bPaginate:l,sPaginationType:"full_numbers",bLengthChange:v,iDisplayLength:20,bFilter:a,bSort:!0,bInfo:!1,bAutoWidth:!1,aoColumnDefs:[{aTargets:["dates"],sSortDataType:"disco_datetime",sType:"disco_datetime"}],aaSorting:[],oLanguage:{sSearch:"Filter:"},fnDrawCallback:function(){h?t.apply(u):h=!0}},p=u.dataTable(y),c,o,f,e,n,s;if(u.hasClass("hideStatusClosed")&&(c=u.children("tbody"),o=c.children('tr[data-status="Closed"]'),o.length>0)){f=i(this).closest(".dataTables_wrapper");e=f;f.parent(".jobTable").length>0&&(e=f.parent());n=e.prev();n.length>0&&(n.is("h1")||n.is("h2")||n.is("h3"))?n.data("dataTable_originalContent",n.html()).text("Active "+n.text()):n=null;s=e.find("div.allClosed_container");s.length>0?(u.hide(),f.find(".dataTables_filter").hide()):i('<a class="dataTables_showStatusClosed button small" href="#">').text("Show Closed Jobs ("+o.length+")").appendTo(e);e.on("click","a.dataTables_showStatusClosed",function(){return u.show(),f.find(".dataTables_filter").show(),u.removeClass("hideStatusClosed"),s.remove(),i(this).remove(),n&&n.html(n.data("dataTable_originalContent")),t.apply(u[0]),!1})}r.push(this)});i("table.deviceTable").each(function(){var n=i(this),u=n.find("tr").length>20,o={bPaginate:u,sPaginationType:"full_numbers",bLengthChange:u,iDisplayLength:20,bFilter:!0,bSort:!0,bInfo:!1,bAutoWidth:!1,aoColumnDefs:[{aTargets:["date"],sSortDataType:"disco_datetime",sType:"disco_datetime"}],aaSorting:[],oLanguage:{sSearch:"Filter:"}},s=n.children("tbody"),f=s.children("tr.decommissioned"),c=n.dataTable(o);if(f.length>0){var e=i(this).closest(".dataTables_wrapper"),h=i('<div class="dataTables_decommissioned"><label><input type="checkbox" /><span><\/span><\/label><\/div>').prependTo(e),l=h.find("span").text("Hide Decommissioned ("+f.length+")");e.on("change",".dataTables_decommissioned input",function(){var r=i(this);return r.is(":checked")?n.addClass("hideDecommissioned"):n.removeClass("hideDecommissioned"),t.apply(n[0]),!1})}r.push(this)});i("table.userTable").each(function(){var n=i(this),t=n.find("tr").length>20,u={bPaginate:t,sPaginationType:"full_numbers",bLengthChange:t,iDisplayLength:20,bFilter:!0,bSort:!0,bInfo:!1,bAutoWidth:!1,aaSorting:[],oLanguage:{sSearch:"Filter:"}};n.dataTable(u);r.push(this)})})})(window,document,$);
@@ -95,13 +95,41 @@
"bSort": true, "bSort": true,
"bInfo": false, "bInfo": false,
"bAutoWidth": false, "bAutoWidth": false,
"aoColumnDefs": [
{ 'aTargets': ['date'], 'sSortDataType': 'disco_datetime', 'sType': 'disco_datetime' }
],
"aaSorting": [], "aaSorting": [],
"oLanguage": { "oLanguage": {
"sSearch": "Filter:" "sSearch": "Filter:"
} }
}; };
$table.dataTable(dataTableOptions); // Contains Decommissioned Devices?
var $tbody = $table.children('tbody');
var $decommissionedDevices = $tbody.children('tr.decommissioned');
var $dataTable = $table.dataTable(dataTableOptions);
if ($decommissionedDevices.length > 0) {
var wrapper = $(this).closest('.dataTables_wrapper');
var $host = $('<div class="dataTables_decommissioned"><label><input type="checkbox" /><span></span></label></div>').prependTo(wrapper);
var $span = $host.find('span').text('Hide Decommissioned (' + $decommissionedDevices.length + ')');
wrapper.on('change', '.dataTables_decommissioned input', function () {
var $this = $(this);
if ($this.is(':checked')) {
$table.addClass('hideDecommissioned');
} else {
$table.removeClass('hideDecommissioned');
}
scrollCheck.apply($table[0]);
return false;
});
}
dataTables.push(this); dataTables.push(this);
}); });
+1 -1
View File
@@ -1 +1 @@
(function(){(function(n){var r=this||eval("this"),i=r.document,f=r.navigator,t=r.jQuery,u=r.JSON;(function(n){"function"==typeof require&&"object"==typeof exports&&"object"==typeof module?n(module.exports||exports):"function"==typeof define&&define.amd?define(["exports"],n):n(r.ko={})})(function(e){function a(n,t){return null===n||typeof n in p?n===t:!1}function w(t,i){var r;return function(){r||(r=setTimeout(function(){r=n;t()},i))}}function b(n,t){var i;return function(){clearTimeout(i);i=setTimeout(n,t)}}function v(n,t,i,r){o.d[n]={init:function(n,u,f,e,s){var c,h;return o.ba(function(){var l=o.a.c(u()),f=!i!=!l,e=!h;(e||t||f!==c)&&(e&&o.ca.fa()&&(h=o.a.lb(o.e.childNodes(n),!0)),f?(e||o.e.U(n,o.a.lb(h)),o.gb(r?r(s,l):s,n)):o.e.da(n),c=f)},null,{G:n}),{controlsDescendantBindings:!0}}};o.g.aa[n]=!1;o.e.Q[n]=!0}var o="undefined"!=typeof e?e:{},p,h,s,c,y,l;o.b=function(n,t){for(var i=n.split("."),r=o,u=0;u<i.length-1;u++)r=r[i[u]];r[i[i.length-1]]=t};o.s=function(n,t,i){n[t]=i};o.version="3.1.0";o.b("version",o.version);o.a=function(){function s(n,t){for(var i in n)n.hasOwnProperty(i)&&t(i,n[i])}function c(n,t){if(t)for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);return n}function l(n,t){return n.__proto__=t,n}var a={__proto__:[]}instanceof Array,h={},v={},y,e;return h[f&&/Firefox\/2/i.test(f.userAgent)?"KeyboardEvent":"UIEvents"]=["keyup","keydown","keypress"],h.MouseEvents="click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave".split(" "),s(h,function(n,t){if(t.length)for(var i=0,r=t.length;i<r;i++)v[t[i]]=n}),y={propertychange:!0},e=i&&function(){for(var t=3,r=i.createElement("div"),u=r.getElementsByTagName("i");r.innerHTML="<!--[if gt IE "+ ++t+"]><i><\/i><![endif]-->",u[0];);return 4<t?t:n}(),{mb:["authenticity_token",/^__RequestVerificationToken(_.*)?$/],r:function(n,t){for(var i=0,r=n.length;i<r;i++)t(n[i],i)},l:function(n,t){if("function"==typeof Array.prototype.indexOf)return Array.prototype.indexOf.call(n,t);for(var i=0,r=n.length;i<r;i++)if(n[i]===t)return i;return-1},hb:function(n,t,i){for(var r=0,u=n.length;r<u;r++)if(t.call(i,n[r],r))return n[r];return null},ma:function(n,t){var i=o.a.l(n,t);0<i?n.splice(i,1):0===i&&n.shift()},ib:function(n){n=n||[];for(var i=[],t=0,r=n.length;t<r;t++)0>o.a.l(i,n[t])&&i.push(n[t]);return i},ya:function(n,t){n=n||[];for(var r=[],i=0,u=n.length;i<u;i++)r.push(t(n[i],i));return r},la:function(n,t){n=n||[];for(var r=[],i=0,u=n.length;i<u;i++)t(n[i],i)&&r.push(n[i]);return r},$:function(n,t){if(t instanceof Array)n.push.apply(n,t);else for(var i=0,r=t.length;i<r;i++)n.push(t[i]);return n},Y:function(n,t,i){var r=o.a.l(o.a.Sa(n),t);0>r?i&&n.push(t):i||n.splice(r,1)},na:a,extend:c,ra:l,sa:a?l:c,A:s,Oa:function(n,t){if(!n)return n;var r={};for(var i in n)n.hasOwnProperty(i)&&(r[i]=t(n[i],i,n));return r},Fa:function(n){for(;n.firstChild;)o.removeNode(n.firstChild)},ec:function(n){n=o.a.R(n);for(var r=i.createElement("div"),t=0,u=n.length;t<u;t++)r.appendChild(o.M(n[t]));return r},lb:function(n,t){for(var r,i=0,f=n.length,u=[];i<f;i++)r=n[i].cloneNode(!0),u.push(t?o.M(r):r);return u},U:function(n,t){if(o.a.Fa(n),t)for(var i=0,r=t.length;i<r;i++)n.appendChild(t[i])},Bb:function(n,t){var r=n.nodeType?[n]:n;if(0<r.length){for(var f=r[0],e=f.parentNode,i=0,u=t.length;i<u;i++)e.insertBefore(t[i],f);for(i=0,u=r.length;i<u;i++)o.removeNode(r[i])}},ea:function(n,t){if(n.length){for(t=8===t.nodeType&&t.parentNode||t;n.length&&n[0].parentNode!==t;)n.shift();if(1<n.length){var i=n[0],r=n[n.length-1];for(n.length=0;i!==r;)if(n.push(i),i=i.nextSibling,!i)return;n.push(r)}}return n},Db:function(n,t){7>e?n.setAttribute("selected",t):n.selected=t},ta:function(t){return null===t||t===n?"":t.trim?t.trim():t.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},oc:function(n,t){for(var r,u=[],f=(n||"").split(t),i=0,e=f.length;i<e;i++)r=o.a.ta(f[i]),""!==r&&u.push(r);return u},kc:function(n,t){return n=n||"",t.length>n.length?!1:n.substring(0,t.length)===t},Sb:function(n,t){if(n===t)return!0;if(11===n.nodeType)return!1;if(t.contains)return t.contains(3===n.nodeType?n.parentNode:n);if(t.compareDocumentPosition)return 16==(t.compareDocumentPosition(n)&16);for(;n&&n!=t;)n=n.parentNode;return!!n},Ea:function(n){return o.a.Sb(n,n.ownerDocument.documentElement)},eb:function(n){return!!o.a.hb(n,o.a.Ea)},B:function(n){return n&&n.tagName&&n.tagName.toLowerCase()},q:function(n,i,r){var s=e&&y[i],u,f;if(!s&&t)t(n).bind(i,r);else if(s||"function"!=typeof n.addEventListener)if("undefined"!=typeof n.attachEvent)u=function(t){r.call(n,t)},f="on"+i,n.attachEvent(f,u),o.a.u.ja(n,function(){n.detachEvent(f,u)});else throw Error("Browser doesn't support addEventListener or attachEvent");else n.addEventListener(i,r,!1)},ha:function(n,u){if(!n||!n.nodeType)throw Error("element must be a DOM node when calling triggerEvent");var f;if("input"===o.a.B(n)&&n.type&&"click"==u.toLowerCase()?(f=n.type,f="checkbox"==f||"radio"==f):f=!1,t&&!f)t(n).trigger(u);else if("function"==typeof i.createELine truncated (function(){(function(n){var r=this||(0,eval)("this"),i=r.document,f=r.navigator,t=r.jQuery,u=r.JSON;(function(n){"function"==typeof require&&"object"==typeof exports&&"object"==typeof module?n(module.exports||exports):"function"==typeof define&&define.amd?define(["exports"],n):n(r.ko={})})(function(e){function a(n,t){return null===n||typeof n in p?n===t:!1}function w(t,i){var r;return function(){r||(r=setTimeout(function(){r=n;t()},i))}}function b(n,t){var i;return function(){clearTimeout(i);i=setTimeout(n,t)}}function v(n,t,i,r){o.d[n]={init:function(n,u,f,e,s){var c,h;return o.ba(function(){var l=o.a.c(u()),f=!i!=!l,e=!h;(e||t||f!==c)&&(e&&o.ca.fa()&&(h=o.a.lb(o.e.childNodes(n),!0)),f?(e||o.e.U(n,o.a.lb(h)),o.gb(r?r(s,l):s,n)):o.e.da(n),c=f)},null,{G:n}),{controlsDescendantBindings:!0}}};o.g.aa[n]=!1;o.e.Q[n]=!0}var o="undefined"!=typeof e?e:{},p,h,s,c,y,l;o.b=function(n,t){for(var i=n.split("."),r=o,u=0;u<i.length-1;u++)r=r[i[u]];r[i[i.length-1]]=t};o.s=function(n,t,i){n[t]=i};o.version="3.1.0";o.b("version",o.version);o.a=function(){function s(n,t){for(var i in n)n.hasOwnProperty(i)&&t(i,n[i])}function c(n,t){if(t)for(var i in t)t.hasOwnProperty(i)&&(n[i]=t[i]);return n}function l(n,t){return n.__proto__=t,n}var a={__proto__:[]}instanceof Array,h={},v={},y,e;return h[f&&/Firefox\/2/i.test(f.userAgent)?"KeyboardEvent":"UIEvents"]=["keyup","keydown","keypress"],h.MouseEvents="click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave".split(" "),s(h,function(n,t){if(t.length)for(var i=0,r=t.length;i<r;i++)v[t[i]]=n}),y={propertychange:!0},e=i&&function(){for(var t=3,r=i.createElement("div"),u=r.getElementsByTagName("i");r.innerHTML="<!--[if gt IE "+ ++t+"]><i><\/i><![endif]-->",u[0];);return 4<t?t:n}(),{mb:["authenticity_token",/^__RequestVerificationToken(_.*)?$/],r:function(n,t){for(var i=0,r=n.length;i<r;i++)t(n[i],i)},l:function(n,t){if("function"==typeof Array.prototype.indexOf)return Array.prototype.indexOf.call(n,t);for(var i=0,r=n.length;i<r;i++)if(n[i]===t)return i;return-1},hb:function(n,t,i){for(var r=0,u=n.length;r<u;r++)if(t.call(i,n[r],r))return n[r];return null},ma:function(n,t){var i=o.a.l(n,t);0<i?n.splice(i,1):0===i&&n.shift()},ib:function(n){n=n||[];for(var i=[],t=0,r=n.length;t<r;t++)0>o.a.l(i,n[t])&&i.push(n[t]);return i},ya:function(n,t){n=n||[];for(var r=[],i=0,u=n.length;i<u;i++)r.push(t(n[i],i));return r},la:function(n,t){n=n||[];for(var r=[],i=0,u=n.length;i<u;i++)t(n[i],i)&&r.push(n[i]);return r},$:function(n,t){if(t instanceof Array)n.push.apply(n,t);else for(var i=0,r=t.length;i<r;i++)n.push(t[i]);return n},Y:function(n,t,i){var r=o.a.l(o.a.Sa(n),t);0>r?i&&n.push(t):i||n.splice(r,1)},na:a,extend:c,ra:l,sa:a?l:c,A:s,Oa:function(n,t){if(!n)return n;var r={};for(var i in n)n.hasOwnProperty(i)&&(r[i]=t(n[i],i,n));return r},Fa:function(n){for(;n.firstChild;)o.removeNode(n.firstChild)},ec:function(n){n=o.a.R(n);for(var r=i.createElement("div"),t=0,u=n.length;t<u;t++)r.appendChild(o.M(n[t]));return r},lb:function(n,t){for(var r,i=0,f=n.length,u=[];i<f;i++)r=n[i].cloneNode(!0),u.push(t?o.M(r):r);return u},U:function(n,t){if(o.a.Fa(n),t)for(var i=0,r=t.length;i<r;i++)n.appendChild(t[i])},Bb:function(n,t){var r=n.nodeType?[n]:n;if(0<r.length){for(var f=r[0],e=f.parentNode,i=0,u=t.length;i<u;i++)e.insertBefore(t[i],f);for(i=0,u=r.length;i<u;i++)o.removeNode(r[i])}},ea:function(n,t){if(n.length){for(t=8===t.nodeType&&t.parentNode||t;n.length&&n[0].parentNode!==t;)n.shift();if(1<n.length){var i=n[0],r=n[n.length-1];for(n.length=0;i!==r;)if(n.push(i),i=i.nextSibling,!i)return;n.push(r)}}return n},Db:function(n,t){7>e?n.setAttribute("selected",t):n.selected=t},ta:function(t){return null===t||t===n?"":t.trim?t.trim():t.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},oc:function(n,t){for(var r,u=[],f=(n||"").split(t),i=0,e=f.length;i<e;i++)r=o.a.ta(f[i]),""!==r&&u.push(r);return u},kc:function(n,t){return n=n||"",t.length>n.length?!1:n.substring(0,t.length)===t},Sb:function(n,t){if(n===t)return!0;if(11===n.nodeType)return!1;if(t.contains)return t.contains(3===n.nodeType?n.parentNode:n);if(t.compareDocumentPosition)return 16==(t.compareDocumentPosition(n)&16);for(;n&&n!=t;)n=n.parentNode;return!!n},Ea:function(n){return o.a.Sb(n,n.ownerDocument.documentElement)},eb:function(n){return!!o.a.hb(n,o.a.Ea)},B:function(n){return n&&n.tagName&&n.tagName.toLowerCase()},q:function(n,i,r){var s=e&&y[i],u,f;if(!s&&t)t(n).bind(i,r);else if(s||"function"!=typeof n.addEventListener)if("undefined"!=typeof n.attachEvent)u=function(t){r.call(n,t)},f="on"+i,n.attachEvent(f,u),o.a.u.ja(n,function(){n.detachEvent(f,u)});else throw Error("Browser doesn't support addEventListener or attachEvent");else n.addEventListener(i,r,!1)},ha:function(n,u){if(!n||!n.nodeType)throw Error("element must be a DOM node when calling triggerEvent");var f;if("input"===o.a.B(n)&&n.type&&"click"==u.toLowerCase()?(f=n.type,f="checkbox"==f||"radio"==f):f=!1,t&&!f)t(n).trigger(u);else if("function"==typeof i.creLine truncated
+13 -19
View File
@@ -11,22 +11,15 @@
<table class="genericData deviceTable"> <table class="genericData deviceTable">
<thead> <thead>
<tr> <tr>
<th>Serial# <th>Serial</th>
</th> <th>Asset</th>
<th>Asset# <th class="date">Decommissioned</th>
</th> <th>Name</th>
<th>Name <th>Model</th>
</th> <th>Profile</th>
<th>Model <th>Batch</th>
</th> <th>Assigned User</th>
<th>Profile <th>Jobs</th>
</th>
<th>Batch
</th>
<th>Assigned User
</th>
<th>Jobs
</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@@ -41,9 +34,10 @@
</td> </td>
<td> <td>
@item.AssetNumber @item.AssetNumber
</td>
<td>
@if (item.DecommissionedDate.HasValue) @if (item.DecommissionedDate.HasValue)
{ <span class="smallMessage">(Decommissioned { @CommonHelpers.FriendlyDate(item.DecommissionedDate.Value) }
@CommonHelpers.FriendlyDate(item.DecommissionedDate.Value))</span> }
</td> </td>
<td> <td>
@if (string.IsNullOrWhiteSpace(item.ComputerName)) @if (string.IsNullOrWhiteSpace(item.ComputerName))
@@ -66,7 +60,7 @@
} }
</td> </td>
<td> <td>
@item.DeviceProfileDescription @item.DeviceProfileName
</td> </td>
<td> <td>
@if (item.DeviceBatchName != null) @if (item.DeviceBatchName != null)
@@ -2,7 +2,7 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.
// Runtime Version:4.0.30319.34014 // Runtime Version:4.0.30319.42000
// //
// Changes to this file may cause incorrect behavior and will be lost if // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.
@@ -27,7 +27,6 @@ namespace Disco.Web.Views.Device
using System.Web.UI; using System.Web.UI;
using System.Web.WebPages; using System.Web.WebPages;
using Disco; using Disco;
using Disco.BI.Extensions;
using Disco.Models.Repository; using Disco.Models.Repository;
using Disco.Services; using Disco.Services;
using Disco.Services.Authorization; using Disco.Services.Authorization;
@@ -37,9 +36,9 @@ namespace Disco.Web.Views.Device
[System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "2.0.0.0")] [System.CodeDom.Compiler.GeneratedCodeAttribute("RazorGenerator", "2.0.0.0")]
[System.Web.WebPages.PageVirtualPathAttribute("~/Views/Device/_DeviceTable.cshtml")] [System.Web.WebPages.PageVirtualPathAttribute("~/Views/Device/_DeviceTable.cshtml")]
public partial class DeviceTable : Disco.Services.Web.WebViewPage<IEnumerable<Disco.Models.Services.Searching.DeviceSearchResultItem>> public partial class _DeviceTable : Disco.Services.Web.WebViewPage<IEnumerable<Disco.Models.Services.Searching.DeviceSearchResultItem>>
{ {
public DeviceTable() public _DeviceTable()
{ {
} }
public override void Execute() public override void Execute()
@@ -79,38 +78,31 @@ WriteLiteral(" <table");
WriteLiteral(" class=\"genericData deviceTable\""); WriteLiteral(" class=\"genericData deviceTable\"");
WriteLiteral(@"> WriteLiteral(">\r\n <thead>\r\n <tr>\r\n <th>Serial</th>" +
<thead> "\r\n <th>Asset</th>\r\n <th");
<tr>
<th>Serial# WriteLiteral(" class=\"date\"");
</th>
<th>Asset# WriteLiteral(@">Decommissioned</th>
</th> <th>Name</th>
<th>Name <th>Model</th>
</th> <th>Profile</th>
<th>Model <th>Batch</th>
</th> <th>Assigned User</th>
<th>Profile <th>Jobs</th>
</th>
<th>Batch
</th>
<th>Assigned User
</th>
<th>Jobs
</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
"); ");
#line 33 "..\..\Views\Device\_DeviceTable.cshtml" #line 26 "..\..\Views\Device\_DeviceTable.cshtml"
#line default #line default
#line hidden #line hidden
#line 33 "..\..\Views\Device\_DeviceTable.cshtml" #line 26 "..\..\Views\Device\_DeviceTable.cshtml"
foreach (var item in Model) foreach (var item in Model)
{ {
@@ -119,40 +111,40 @@ WriteLiteral(@">
#line hidden #line hidden
WriteLiteral(" <tr"); WriteLiteral(" <tr");
WriteAttribute("class", Tuple.Create(" class=\"", 1101), Tuple.Create("\"", 1178) WriteAttribute("class", Tuple.Create(" class=\"", 981), Tuple.Create("\"", 1058)
#line 35 "..\..\Views\Device\_DeviceTable.cshtml" #line 28 "..\..\Views\Device\_DeviceTable.cshtml"
, Tuple.Create(Tuple.Create("", 1109), Tuple.Create<System.Object, System.Int32>(item.DecommissionedDate.HasValue ? "decommissioned" : string.Empty , Tuple.Create(Tuple.Create("", 989), Tuple.Create<System.Object, System.Int32>(item.DecommissionedDate.HasValue ? "decommissioned" : string.Empty
#line default #line default
#line hidden #line hidden
, 1109), false) , 989), false)
); );
WriteLiteral(">\r\n <td>\r\n"); WriteLiteral(">\r\n <td>\r\n");
#line 37 "..\..\Views\Device\_DeviceTable.cshtml" #line 30 "..\..\Views\Device\_DeviceTable.cshtml"
#line default #line default
#line hidden #line hidden
#line 37 "..\..\Views\Device\_DeviceTable.cshtml" #line 30 "..\..\Views\Device\_DeviceTable.cshtml"
if (canShowDevices) if (canShowDevices)
{ {
#line default #line default
#line hidden #line hidden
#line 38 "..\..\Views\Device\_DeviceTable.cshtml" #line 31 "..\..\Views\Device\_DeviceTable.cshtml"
Write(Html.ActionLink(item.Id, MVC.Device.Show(item.Id))); Write(Html.ActionLink(item.Id, MVC.Device.Show(item.Id)));
#line default #line default
#line hidden #line hidden
#line 38 "..\..\Views\Device\_DeviceTable.cshtml" #line 31 "..\..\Views\Device\_DeviceTable.cshtml"
} }
else else
{ {
@@ -160,14 +152,14 @@ WriteLiteral(">\r\n <td>\r\n");
#line default #line default
#line hidden #line hidden
#line 40 "..\..\Views\Device\_DeviceTable.cshtml" #line 33 "..\..\Views\Device\_DeviceTable.cshtml"
Write(item.Id); Write(item.Id);
#line default #line default
#line hidden #line hidden
#line 40 "..\..\Views\Device\_DeviceTable.cshtml" #line 33 "..\..\Views\Device\_DeviceTable.cshtml"
} }
@@ -178,47 +170,37 @@ WriteLiteral(" </td>\r\n <td>\r\n"
WriteLiteral(" "); WriteLiteral(" ");
#line 43 "..\..\Views\Device\_DeviceTable.cshtml" #line 36 "..\..\Views\Device\_DeviceTable.cshtml"
Write(item.AssetNumber); Write(item.AssetNumber);
#line default #line default
#line hidden #line hidden
WriteLiteral("\r\n"); WriteLiteral("\r\n </td>\r\n <td>\r\n");
#line 44 "..\..\Views\Device\_DeviceTable.cshtml" #line 39 "..\..\Views\Device\_DeviceTable.cshtml"
#line default #line default
#line hidden #line hidden
#line 44 "..\..\Views\Device\_DeviceTable.cshtml" #line 39 "..\..\Views\Device\_DeviceTable.cshtml"
if (item.DecommissionedDate.HasValue) if (item.DecommissionedDate.HasValue)
{ {
#line default #line default
#line hidden #line hidden
WriteLiteral(" <span");
WriteLiteral(" class=\"smallMessage\""); #line 40 "..\..\Views\Device\_DeviceTable.cshtml"
Write(CommonHelpers.FriendlyDate(item.DecommissionedDate.Value));
WriteLiteral(">(Decommissioned\r\n");
WriteLiteral(" ");
#line 46 "..\..\Views\Device\_DeviceTable.cshtml"
Write(CommonHelpers.FriendlyDate(item.DecommissionedDate.Value));
#line default #line default
#line hidden #line hidden
WriteLiteral(")</span> ");
#line 40 "..\..\Views\Device\_DeviceTable.cshtml"
#line 46 "..\..\Views\Device\_DeviceTable.cshtml" }
}
#line default #line default
@@ -226,13 +208,13 @@ WriteLiteral(")</span> ");
WriteLiteral(" </td>\r\n <td>\r\n"); WriteLiteral(" </td>\r\n <td>\r\n");
#line 49 "..\..\Views\Device\_DeviceTable.cshtml" #line 43 "..\..\Views\Device\_DeviceTable.cshtml"
#line default #line default
#line hidden #line hidden
#line 49 "..\..\Views\Device\_DeviceTable.cshtml" #line 43 "..\..\Views\Device\_DeviceTable.cshtml"
if (string.IsNullOrWhiteSpace(item.ComputerName)) if (string.IsNullOrWhiteSpace(item.ComputerName))
{ {
@@ -246,7 +228,7 @@ WriteLiteral(" class=\"smallMessage\"");
WriteLiteral(">Unknown</span>\r\n"); WriteLiteral(">Unknown</span>\r\n");
#line 52 "..\..\Views\Device\_DeviceTable.cshtml" #line 46 "..\..\Views\Device\_DeviceTable.cshtml"
} }
else else
{ {
@@ -255,14 +237,14 @@ WriteLiteral(">Unknown</span>\r\n");
#line default #line default
#line hidden #line hidden
#line 55 "..\..\Views\Device\_DeviceTable.cshtml" #line 49 "..\..\Views\Device\_DeviceTable.cshtml"
Write(item.ComputerName); Write(item.ComputerName);
#line default #line default
#line hidden #line hidden
#line 55 "..\..\Views\Device\_DeviceTable.cshtml" #line 49 "..\..\Views\Device\_DeviceTable.cshtml"
} }
@@ -272,13 +254,13 @@ WriteLiteral(">Unknown</span>\r\n");
WriteLiteral(" </td>\r\n <td>\r\n"); WriteLiteral(" </td>\r\n <td>\r\n");
#line 59 "..\..\Views\Device\_DeviceTable.cshtml" #line 53 "..\..\Views\Device\_DeviceTable.cshtml"
#line default #line default
#line hidden #line hidden
#line 59 "..\..\Views\Device\_DeviceTable.cshtml" #line 53 "..\..\Views\Device\_DeviceTable.cshtml"
if (item.DeviceModelDescription != null) if (item.DeviceModelDescription != null)
{ {
@@ -288,7 +270,7 @@ WriteLiteral(" </td>\r\n <td>\r\n"
WriteLiteral(" <span>"); WriteLiteral(" <span>");
#line 61 "..\..\Views\Device\_DeviceTable.cshtml" #line 55 "..\..\Views\Device\_DeviceTable.cshtml"
Write(item.DeviceModelDescription); Write(item.DeviceModelDescription);
@@ -297,7 +279,7 @@ WriteLiteral(" <span>");
WriteLiteral("</span>\r\n"); WriteLiteral("</span>\r\n");
#line 62 "..\..\Views\Device\_DeviceTable.cshtml" #line 56 "..\..\Views\Device\_DeviceTable.cshtml"
} }
else else
{ {
@@ -312,7 +294,7 @@ WriteLiteral(" class=\"smallMessage\"");
WriteLiteral(">Unknown</span> \r\n"); WriteLiteral(">Unknown</span> \r\n");
#line 66 "..\..\Views\Device\_DeviceTable.cshtml" #line 60 "..\..\Views\Device\_DeviceTable.cshtml"
} }
@@ -323,8 +305,8 @@ WriteLiteral(" </td>\r\n <td>\r\n"
WriteLiteral(" "); WriteLiteral(" ");
#line 69 "..\..\Views\Device\_DeviceTable.cshtml" #line 63 "..\..\Views\Device\_DeviceTable.cshtml"
Write(item.DeviceProfileDescription); Write(item.DeviceProfileName);
#line default #line default
@@ -332,13 +314,13 @@ WriteLiteral(" ");
WriteLiteral("\r\n </td>\r\n <td>\r\n"); WriteLiteral("\r\n </td>\r\n <td>\r\n");
#line 72 "..\..\Views\Device\_DeviceTable.cshtml" #line 66 "..\..\Views\Device\_DeviceTable.cshtml"
#line default #line default
#line hidden #line hidden
#line 72 "..\..\Views\Device\_DeviceTable.cshtml" #line 66 "..\..\Views\Device\_DeviceTable.cshtml"
if (item.DeviceBatchName != null) if (item.DeviceBatchName != null)
{ {
@@ -348,7 +330,7 @@ WriteLiteral("\r\n </td>\r\n <td>\
WriteLiteral(" <span>"); WriteLiteral(" <span>");
#line 74 "..\..\Views\Device\_DeviceTable.cshtml" #line 68 "..\..\Views\Device\_DeviceTable.cshtml"
Write(item.DeviceBatchName); Write(item.DeviceBatchName);
@@ -357,7 +339,7 @@ WriteLiteral(" <span>");
WriteLiteral("</span>\r\n"); WriteLiteral("</span>\r\n");
#line 75 "..\..\Views\Device\_DeviceTable.cshtml" #line 69 "..\..\Views\Device\_DeviceTable.cshtml"
} }
else else
{ {
@@ -372,7 +354,7 @@ WriteLiteral(" class=\"smallMessage\"");
WriteLiteral(">N/A</span> \r\n"); WriteLiteral(">N/A</span> \r\n");
#line 79 "..\..\Views\Device\_DeviceTable.cshtml" #line 73 "..\..\Views\Device\_DeviceTable.cshtml"
} }
@@ -381,13 +363,13 @@ WriteLiteral(">N/A</span> \r\n");
WriteLiteral(" </td>\r\n <td>\r\n"); WriteLiteral(" </td>\r\n <td>\r\n");
#line 82 "..\..\Views\Device\_DeviceTable.cshtml" #line 76 "..\..\Views\Device\_DeviceTable.cshtml"
#line default #line default
#line hidden #line hidden
#line 82 "..\..\Views\Device\_DeviceTable.cshtml" #line 76 "..\..\Views\Device\_DeviceTable.cshtml"
if (string.IsNullOrEmpty(item.AssignedUserId)) if (string.IsNullOrEmpty(item.AssignedUserId))
{ {
@@ -401,7 +383,7 @@ WriteLiteral(" class=\"smallMessage\"");
WriteLiteral(">N/A</span> \r\n"); WriteLiteral(">N/A</span> \r\n");
#line 85 "..\..\Views\Device\_DeviceTable.cshtml" #line 79 "..\..\Views\Device\_DeviceTable.cshtml"
} }
else else
{ {
@@ -412,7 +394,7 @@ WriteLiteral(">N/A</span> \r\n");
WriteLiteral(" <span>"); WriteLiteral(" <span>");
#line 88 "..\..\Views\Device\_DeviceTable.cshtml" #line 82 "..\..\Views\Device\_DeviceTable.cshtml"
if (canShowUsers) if (canShowUsers)
{ {
@@ -420,14 +402,14 @@ WriteLiteral(" <span>");
#line default #line default
#line hidden #line hidden
#line 90 "..\..\Views\Device\_DeviceTable.cshtml" #line 84 "..\..\Views\Device\_DeviceTable.cshtml"
Write(Html.ActionLink(item.AssignedUserDescription, MVC.User.Show(item.AssignedUserId))); Write(Html.ActionLink(item.AssignedUserDescription, MVC.User.Show(item.AssignedUserId)));
#line default #line default
#line hidden #line hidden
#line 90 "..\..\Views\Device\_DeviceTable.cshtml" #line 84 "..\..\Views\Device\_DeviceTable.cshtml"
} }
else else
@@ -437,14 +419,14 @@ WriteLiteral(" <span>");
#line default #line default
#line hidden #line hidden
#line 94 "..\..\Views\Device\_DeviceTable.cshtml" #line 88 "..\..\Views\Device\_DeviceTable.cshtml"
Write(item.AssignedUserDescription); Write(item.AssignedUserDescription);
#line default #line default
#line hidden #line hidden
#line 94 "..\..\Views\Device\_DeviceTable.cshtml" #line 88 "..\..\Views\Device\_DeviceTable.cshtml"
} }
@@ -454,7 +436,7 @@ WriteLiteral(" <span>");
WriteLiteral(" </span>\r\n"); WriteLiteral(" </span>\r\n");
#line 97 "..\..\Views\Device\_DeviceTable.cshtml" #line 91 "..\..\Views\Device\_DeviceTable.cshtml"
} }
@@ -465,7 +447,7 @@ WriteLiteral(" </td>\r\n <td>\r\n"
WriteLiteral(" "); WriteLiteral(" ");
#line 100 "..\..\Views\Device\_DeviceTable.cshtml" #line 94 "..\..\Views\Device\_DeviceTable.cshtml"
Write(item.JobCount); Write(item.JobCount);
@@ -474,7 +456,7 @@ WriteLiteral(" ");
WriteLiteral("\r\n </td>\r\n </tr>\r\n"); WriteLiteral("\r\n </td>\r\n </tr>\r\n");
#line 103 "..\..\Views\Device\_DeviceTable.cshtml" #line 97 "..\..\Views\Device\_DeviceTable.cshtml"
} }
@@ -483,7 +465,7 @@ WriteLiteral("\r\n </td>\r\n </tr>\r\n
WriteLiteral(" </tbody>\r\n </table>\r\n"); WriteLiteral(" </tbody>\r\n </table>\r\n");
#line 106 "..\..\Views\Device\_DeviceTable.cshtml" #line 100 "..\..\Views\Device\_DeviceTable.cshtml"
} }
else else
{ {
@@ -498,7 +480,7 @@ WriteLiteral(" class=\"smallMessage\"");
WriteLiteral(">No Devices Found</span>\r\n"); WriteLiteral(">No Devices Found</span>\r\n");
#line 110 "..\..\Views\Device\_DeviceTable.cshtml" #line 104 "..\..\Views\Device\_DeviceTable.cshtml"
} }