SignalR Bug Fixes & Minor UI Changes

Document Template import status and Device Enrolment status fixes.
Attachment download fixes for SignalR foreverFrame transport. Database
queries for Devices, Jobs and Users updated. Device attributes (model,
profile, batch) now shown in various places.
This commit is contained in:
Gary Sharp
2014-06-03 12:36:48 +10:00
parent 830a9c8d05
commit a0e18ef963
25 changed files with 1088 additions and 465 deletions
@@ -41,6 +41,7 @@ namespace Disco.Models.Services.Searching
public string ComputerName { get; set; }
public string DeviceModelDescription { get; set; }
public string DeviceProfileDescription { get; set; }
public string DeviceBatchName { get; set; }
public int JobCount { get; set; }
public DateTime? DecommissionedDate { get; set; }
+1
View File
@@ -276,6 +276,7 @@ namespace Disco.Services.Searching
ComputerName = d.DeviceDomainId,
DeviceModelDescription = d.DeviceModel.Description,
DeviceProfileDescription = d.DeviceProfile.Description,
DeviceBatchName = d.DeviceBatch.Name,
DecommissionedDate = d.DecommissionedDate,
AssignedUserId = d.AssignedUserId,
AssignedUserDisplayName = d.AssignedUser.DisplayName,
@@ -519,7 +519,7 @@ namespace Disco.Web.Areas.API.Controllers
[DiscoAuthorize(Claims.Device.ShowAttachments)]
public virtual ActionResult Attachment(int id)
{
var da = Database.DeviceAttachments.Include("TechUser").Where(m => m.Id == id).FirstOrDefault();
var da = Database.DeviceAttachments.Include("DocumentTemplate").Include("TechUser").Where(m => m.Id == id).FirstOrDefault();
if (da != null)
{
@@ -537,7 +537,7 @@ namespace Disco.Web.Areas.API.Controllers
[DiscoAuthorize(Claims.Device.ShowAttachments)]
public virtual ActionResult Attachments(string id)
{
var d = Database.Devices.Include("DeviceAttachments.TechUser").Where(m => m.SerialNumber == id).FirstOrDefault();
var d = Database.Devices.Include("DeviceAttachments.DocumentTemplate").Include("DeviceAttachments.TechUser").Where(m => m.SerialNumber == id).FirstOrDefault();
if (d != null)
{
var m = new Models.Attachment.AttachmentsModel()
@@ -1974,7 +1974,7 @@ namespace Disco.Web.Areas.API.Controllers
[DiscoAuthorize(Claims.Job.ShowAttachments)]
public virtual ActionResult Attachment(int id)
{
var ja = Database.JobAttachments.Include("TechUser").Where(m => m.Id == id).FirstOrDefault();
var ja = Database.JobAttachments.Include("DocumentTemplate").Include("TechUser").Where(m => m.Id == id).FirstOrDefault();
if (ja != null)
{
@@ -1992,7 +1992,7 @@ namespace Disco.Web.Areas.API.Controllers
[DiscoAuthorize(Claims.Job.ShowAttachments)]
public virtual ActionResult Attachments(int id)
{
var j = Database.Jobs.Include("JobAttachments.TechUser").Where(m => m.Id == id).FirstOrDefault();
var j = Database.Jobs.Include("JobAttachments.DocumentTemplate").Include("JobAttachments.TechUser").Where(m => m.Id == id).FirstOrDefault();
if (j != null)
{
var m = new Models.Attachment.AttachmentsModel()
@@ -102,7 +102,7 @@ namespace Disco.Web.Areas.API.Controllers
[DiscoAuthorize(Claims.User.ShowAttachments)]
public virtual ActionResult Attachment(int id)
{
var ua = Database.UserAttachments.Include("TechUser").Where(m => m.Id == id).FirstOrDefault();
var ua = Database.UserAttachments.Include("DocumentTemplate").Include("TechUser").Where(m => m.Id == id).FirstOrDefault();
if (ua != null)
{
@@ -125,7 +125,7 @@ namespace Disco.Web.Areas.API.Controllers
else
id = Domain + @"\" + id;
var u = Database.Users.Include("UserAttachments.TechUser").Where(m => m.UserId == id).FirstOrDefault();
var u = Database.Users.Include("UserAttachments.DocumentTemplate").Include("UserAttachments.TechUser").Where(m => m.UserId == id).FirstOrDefault();
if (u != null)
{
var m = new Models.Attachment.AttachmentsModel()
@@ -11,6 +11,18 @@ namespace Disco.Web.Areas.API.Models.Attachment
public string AuthorId { get; set; }
public DateTime Timestamp { get; set; }
public string Comments { get; set; }
public string DocumentTemplateId { get; set; }
public string DocumentTemplateDescription { get; set; }
public string Description
{
get
{
if (DocumentTemplateId != null && DocumentTemplateDescription != null)
return DocumentTemplateDescription;
else
return Comments;
}
}
public string Filename { get; set; }
public string MimeType { get; set; }
public long TimestampUnixEpoc { get { return Timestamp.ToUnixEpoc(); } }
@@ -26,6 +38,8 @@ namespace Disco.Web.Areas.API.Models.Attachment
Author = ua.TechUser.ToStringFriendly(),
Timestamp = ua.Timestamp,
Comments = ua.Comments,
DocumentTemplateId = ua.DocumentTemplateId,
DocumentTemplateDescription = ua.DocumentTemplateId == null ? null : ua.DocumentTemplate.Description,
Filename = ua.Filename,
MimeType = ua.MimeType
};
@@ -40,6 +54,8 @@ namespace Disco.Web.Areas.API.Models.Attachment
Author = ja.TechUser.ToStringFriendly(),
Timestamp = ja.Timestamp,
Comments = ja.Comments,
DocumentTemplateId = ja.DocumentTemplateId,
DocumentTemplateDescription = ja.DocumentTemplateId == null ? null : ja.DocumentTemplate.Description,
Filename = ja.Filename,
MimeType = ja.MimeType
};
@@ -54,6 +70,8 @@ namespace Disco.Web.Areas.API.Models.Attachment
Author = da.TechUser.ToStringFriendly(),
Timestamp = da.Timestamp,
Comments = da.Comments,
DocumentTemplateId = da.DocumentTemplateId,
DocumentTemplateDescription = da.DocumentTemplateId == null ? null : da.DocumentTemplate.Description,
Filename = da.Filename,
MimeType = da.MimeType
};
@@ -1,6 +1,6 @@
@{
Authorization.Require(Claims.Config.DocumentTemplate.ShowStatus);
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Document Templates", MVC.Config.DocumentTemplate.Index(), "Import Status");
Html.BundleDeferred("~/ClientScripts/Modules/Knockout");
Html.BundleDeferred("~/ClientScripts/Modules/jQuery-SignalR");
@@ -99,7 +99,7 @@
var vm;
var host = $('#importStatus');
var hostSessions = $('#sessions');
var liveConnection;
var logHub = null;
var urlDeviceShow = '@(Url.Action(MVC.Device.Show()))/'
var urlJobShow = '@(Url.Action(MVC.Job.Show()))/'
var urlUserShow = '@(Url.Action(MVC.User.Show()))/'
@@ -134,10 +134,8 @@
self.sessionPages = ko.observableArray();
self.sessionPagesIndex = {};
self.addSessionPage = function (sessionPage) {
//if (isLive) {
self.sessionPages.push(sessionPage);
self.sessionPagesIndex[sessionPage.pageNumber] = sessionPage;
//}
}
}
function sessionPageViewModel(sessionId, pageNumber) {
@@ -305,11 +303,19 @@
ko.applyBindings(vm);
// Init Persistent Connection
liveConnection = $.connection('@(Url.Content("~/API/Logging/Notifications"))', { addToGroups: '@(Disco.BI.DocumentTemplateBI.Importer.DocumentImporterLog.Current.LiveLogGroupName)' });
liveConnection.received(parseLog);
liveConnection.error(function (e) { if (e.status != 200) alert('Live-Log Error: ' + e.statusText + ': ' + e.responseText); });
isLive = true;
liveConnection.start();
logHub = $.connection.logNotifications;
logHub.client.receiveLog = parseLog
$.connection.hub.qs = { LogModules: '@(Disco.BI.DocumentTemplateBI.Importer.DocumentImporterLog.Current.LiveLogGroupName)' };
$.connection.hub.error(function (error) {
alert('Live-Log Error: ' + error);
});
$.connection.hub.start()
.done(function () { isLive = true; })
.fail(function (error) {
alert('Live-Log Connection Error: ' + error);
});
}
init();
});
@@ -48,7 +48,7 @@ namespace Disco.Web.Areas.Config.Views.DocumentTemplate
#line 1 "..\..\Areas\Config\Views\DocumentTemplate\ImportStatus.cshtml"
Authorization.Require(Claims.Config.DocumentTemplate.ShowStatus);
ViewBag.Title = Html.ToBreadcrumb("Configuration", MVC.Config.Config.Index(), "Document Templates", MVC.Config.DocumentTemplate.Index(), "Import Status");
Html.BundleDeferred("~/ClientScripts/Modules/Knockout");
Html.BundleDeferred("~/ClientScripts/Modules/jQuery-SignalR");
@@ -267,8 +267,8 @@ WriteLiteral(@">
WriteLiteral(" type=\"text/javascript\"");
WriteLiteral(">\r\n $(function () {\r\n var vm;\r\n var host = $(\'#importStatus\');\r\n" +
" var hostSessions = $(\'#sessions\');\r\n var liveConnection;\r\n " +
" var urlDeviceShow = \'");
" var hostSessions = $(\'#sessions\');\r\n var logHub = null;\r\n " +
"var urlDeviceShow = \'");
#line 103 "..\..\Areas\Config\Views\DocumentTemplate\ImportStatus.cshtml"
@@ -334,101 +334,100 @@ WriteLiteral("\';\r\n var isLive = false;\r\n\r\n function pageVie
"= ko.observable();\r\n self.startTime = ko.observable();\r\n s" +
"elf.sessionEnded = ko.observable(false);\r\n\r\n self.sessionPages = ko.o" +
"bservableArray();\r\n self.sessionPagesIndex = {};\r\n self.ad" +
"dSessionPage = function (sessionPage) {\r\n //if (isLive) {\r\n " +
" self.sessionPages.push(sessionPage);\r\n self.sessionPage" +
"sIndex[sessionPage.pageNumber] = sessionPage;\r\n //}\r\n " +
"}\r\n }\r\n function sessionPageViewModel(sessionId, pageNumber) {\r\n " +
" var self = this;\r\n\r\n self.sessionId = sessionId;\r\n " +
" self.pageNumber = pageNumber;\r\n self.title = \'Page \' + pageNumber;" +
"\r\n self.progressStatus = ko.observable();\r\n self.progressV" +
"alue = ko.observable();\r\n self.undetected = ko.observable(false);\r\n " +
" self.detected = ko.observable(false);\r\n self.documentTempla" +
"teId = ko.observable();\r\n self.documentTemplate = ko.observable();\r\n " +
" self.assignedDataType = ko.observable();\r\n self.assignedDa" +
"taId = ko.observable();\r\n self.assignedData = ko.observable();\r\n " +
" self.thumbnailEnabled = ko.observable(0);\r\n self.updateThumbna" +
"il = function () {\r\n self.thumbnailEnabled(self.thumbnailEnabled(" +
") + 1);\r\n }\r\n self.documentTemplateUrl = ko.computed(funct" +
"ion () {\r\n return urlDocumentTemplate + self.documentTemplateId()" +
";\r\n });\r\n self.manuallyAssignUrl = ko.computed(function ()" +
" {\r\n return urlManuallyAssign + \'#\' + self.sessionId + \'_\' + self" +
".pageNumber;\r\n });\r\n self.assignedDataUrl = ko.computed(fu" +
"nction () {\r\n var t = self.assignedDataType();\r\n v" +
"ar dId = self.assignedDataId();\r\n if (dId !== undefined) {\r\n " +
" switch (t) {\r\n case \'Device\':\r\n " +
" return urlDeviceShow + dId;\r\n case \'Job\'" +
":\r\n return urlJobShow + dId;\r\n " +
" case \'User\':\r\n if (dId.indexOf(\'\\\\\') < 0)\r\n " +
" return urlUserShow + dId;\r\n el" +
"se\r\n return urlUserShow + dId.substr(dId.indexOf(" +
"\'\\\\\') + 1) + \'?domain=\' + dId.substr(0, dId.indexOf(\'\\\\\'));\r\n " +
" }\r\n }\r\n return null;\r\n });\r\n " +
" self.thumbnailUrl = ko.computed(function () {\r\n var enabled = s" +
"elf.thumbnailEnabled();\r\n if (enabled > 0) {\r\n " +
" return \'url(\' + urlPageThumbnail + \'?SessionId=\' + self.sessionId + \'&PageNumbe" +
"r=\' + self.pageNumber + \'&NoCache=\' + enabled + \')\';\r\n }\r\n " +
" return null;\r\n });\r\n }\r\n\r\n function parseLog(l" +
"og) {\r\n if (log.ModuleId === 40 && log.Arguments && log.Arguments.len" +
"gth > 0) {\r\n // find session\r\n var sessionId = log" +
".Arguments[0];\r\n var session = vm.sessionIndex[sessionId];\r\n " +
" if (!session && log.EventTypeId === 10) { // Starting Session (Ignore" +
" \'partial\' sessions)\r\n session = new sessionViewModel(log.Arg" +
"uments[1]);\r\n vm.sessionIndex[sessionId] = session;\r\n " +
" vm.sessions.unshift(session);\r\n vm.noSessions(fal" +
"se);\r\n }\r\n if (session) {\r\n swi" +
"tch (log.EventTypeId) {\r\n case 10: // SessionStarting\r\n " +
" session.startTime(log.FormattedTimestamp.substring(log" +
".FormattedTimestamp.indexOf(\' \') + 1));\r\n break;\r\n " +
" case 11: // SessionProgress\r\n se" +
"ssion.progressValue(log.Arguments[1]);\r\n session.prog" +
"ressStatus(log.Arguments[2]);\r\n break;\r\n " +
" case 12: // SessionFinished\r\n session.sess" +
"ionEnded(true);\r\n session.progressStatus(\'Import Fini" +
"shed\');\r\n break;\r\n case 15: //" +
" SessionWarning\r\n session.messages.unshift(log);\r\n " +
" break;\r\n case 16: // SessionErro" +
"r\r\n session.messages.unshift(log);\r\n " +
" break;\r\n case 100: // ImportPageStarting\r\n " +
" session.addSessionPage(new sessionPageViewModel(sessionI" +
"d, log.Arguments[1]));\r\n break;\r\n " +
" case 104: // ImportPageImageUpdate\r\n var p = sess" +
"ion.sessionPagesIndex[log.Arguments[1]];\r\n if (p) {\r\n" +
" p.updateThumbnail();\r\n " +
" }\r\n break;\r\n case 105: // Im" +
"portPageProgress\r\n var p = session.sessionPagesIndex[" +
"log.Arguments[1]];\r\n if (p) {\r\n " +
" p.progressValue(log.Arguments[2]);\r\n p." +
"progressStatus(log.Arguments[3]);\r\n }\r\n " +
" break;\r\n case 110: // ImportPageDetected\r\n " +
" var p = session.sessionPagesIndex[log.Arguments[1]];\r" +
"\n if (p) {\r\n p.documen" +
"tTemplateId(log.Arguments[2]);\r\n p.documentTempla" +
"te(log.Arguments[3]);\r\n p.assignedDataType(log.Ar" +
"guments[4]);\r\n p.assignedDataId(log.Arguments[5])" +
";\r\n p.assignedData(log.Arguments[6]);\r\n " +
" p.detected(true);\r\n if (!is" +
"Live) {\r\n p.updateThumbnail();\r\n " +
" }\r\n }\r\n " +
" session.messages.unshift(log);\r\n break;\r\n " +
" case 115: // ImportPageUndetected\r\n var " +
"p = session.sessionPagesIndex[log.Arguments[1]];\r\n if" +
" (p) {\r\n p.undetected(true);\r\n " +
" if (!isLive) {\r\n p.updateThumbna" +
"il();\r\n }\r\n }\r\n " +
" session.messages.unshift(log);\r\n " +
" break;\r\n case 150: // Ignore: ImportPageUndetectedStored" +
"\r\n break;\r\n default:\r\n " +
" session.messages.unshift(log);\r\n }\r\n " +
" }\r\n }\r\n }\r\n function init() {\r\n /" +
"/ Create View Model\r\n vm = new pageViewModel();\r\n\r\n // Loa" +
"d Logs\r\n var d = new Date();\r\n var loadData = {\r\n " +
" Format: \"json\",\r\n Start: d.getFullYear() + \'-\' + (d.getMon" +
"th() + 1) + \'-\' + d.getDate(),\r\n End: null,\r\n Modu" +
"leId: 40,\r\n Take: 2000\r\n };\r\n $.ajax({\r\n " +
" url: \'");
"dSessionPage = function (sessionPage) {\r\n self.sessionPages.push(" +
"sessionPage);\r\n self.sessionPagesIndex[sessionPage.pageNumber] = " +
"sessionPage;\r\n }\r\n }\r\n function sessionPageViewModel(se" +
"ssionId, pageNumber) {\r\n var self = this;\r\n\r\n self.session" +
"Id = sessionId;\r\n self.pageNumber = pageNumber;\r\n self.tit" +
"le = \'Page \' + pageNumber;\r\n self.progressStatus = ko.observable();\r\n" +
" self.progressValue = ko.observable();\r\n self.undetected =" +
" ko.observable(false);\r\n self.detected = ko.observable(false);\r\n " +
" self.documentTemplateId = ko.observable();\r\n self.documentTemp" +
"late = ko.observable();\r\n self.assignedDataType = ko.observable();\r\n " +
" self.assignedDataId = ko.observable();\r\n self.assignedData" +
" = ko.observable();\r\n self.thumbnailEnabled = ko.observable(0);\r\n " +
" self.updateThumbnail = function () {\r\n self.thumbnailEnab" +
"led(self.thumbnailEnabled() + 1);\r\n }\r\n self.documentTempl" +
"ateUrl = ko.computed(function () {\r\n return urlDocumentTemplate +" +
" self.documentTemplateId();\r\n });\r\n self.manuallyAssignUrl" +
" = ko.computed(function () {\r\n return urlManuallyAssign + \'#\' + s" +
"elf.sessionId + \'_\' + self.pageNumber;\r\n });\r\n self.assign" +
"edDataUrl = ko.computed(function () {\r\n var t = self.assignedData" +
"Type();\r\n var dId = self.assignedDataId();\r\n if (d" +
"Id !== undefined) {\r\n switch (t) {\r\n c" +
"ase \'Device\':\r\n return urlDeviceShow + dId;\r\n " +
" case \'Job\':\r\n return urlJobShow + dId" +
";\r\n case \'User\':\r\n if (dId.ind" +
"exOf(\'\\\\\') < 0)\r\n return urlUserShow + dId;\r\n " +
" else\r\n return urlUserShow" +
" + dId.substr(dId.indexOf(\'\\\\\') + 1) + \'?domain=\' + dId.substr(0, dId.indexOf(\'\\" +
"\\\'));\r\n }\r\n }\r\n return null;\r\n " +
" });\r\n self.thumbnailUrl = ko.computed(function () {\r\n " +
" var enabled = self.thumbnailEnabled();\r\n if (enabled >" +
" 0) {\r\n return \'url(\' + urlPageThumbnail + \'?SessionId=\' + se" +
"lf.sessionId + \'&PageNumber=\' + self.pageNumber + \'&NoCache=\' + enabled + \')\';\r\n" +
" }\r\n return null;\r\n });\r\n }\r\n\r\n " +
" function parseLog(log) {\r\n if (log.ModuleId === 40 && log.Argu" +
"ments && log.Arguments.length > 0) {\r\n // find session\r\n " +
" var sessionId = log.Arguments[0];\r\n var session = vm.sessi" +
"onIndex[sessionId];\r\n if (!session && log.EventTypeId === 10) { /" +
"/ Starting Session (Ignore \'partial\' sessions)\r\n session = ne" +
"w sessionViewModel(log.Arguments[1]);\r\n vm.sessionIndex[sessi" +
"onId] = session;\r\n vm.sessions.unshift(session);\r\n " +
" vm.noSessions(false);\r\n }\r\n if (session) " +
"{\r\n switch (log.EventTypeId) {\r\n case " +
"10: // SessionStarting\r\n session.startTime(log.Format" +
"tedTimestamp.substring(log.FormattedTimestamp.indexOf(\' \') + 1));\r\n " +
" break;\r\n case 11: // SessionProgress\r\n " +
" session.progressValue(log.Arguments[1]);\r\n " +
" session.progressStatus(log.Arguments[2]);\r\n " +
" break;\r\n case 12: // SessionFinished\r\n " +
" session.sessionEnded(true);\r\n session.p" +
"rogressStatus(\'Import Finished\');\r\n break;\r\n " +
" case 15: // SessionWarning\r\n session.m" +
"essages.unshift(log);\r\n break;\r\n " +
" case 16: // SessionError\r\n session.messages.unshif" +
"t(log);\r\n break;\r\n case 100: /" +
"/ ImportPageStarting\r\n session.addSessionPage(new ses" +
"sionPageViewModel(sessionId, log.Arguments[1]));\r\n br" +
"eak;\r\n case 104: // ImportPageImageUpdate\r\n " +
" var p = session.sessionPagesIndex[log.Arguments[1]];\r\n " +
" if (p) {\r\n p.updateThumbnail();\r\n" +
" }\r\n break;\r\n " +
" case 105: // ImportPageProgress\r\n var p = " +
"session.sessionPagesIndex[log.Arguments[1]];\r\n if (p)" +
" {\r\n p.progressValue(log.Arguments[2]);\r\n " +
" p.progressStatus(log.Arguments[3]);\r\n " +
" }\r\n break;\r\n case 110" +
": // ImportPageDetected\r\n var p = session.sessionPage" +
"sIndex[log.Arguments[1]];\r\n if (p) {\r\n " +
" p.documentTemplateId(log.Arguments[2]);\r\n " +
" p.documentTemplate(log.Arguments[3]);\r\n " +
" p.assignedDataType(log.Arguments[4]);\r\n p.assign" +
"edDataId(log.Arguments[5]);\r\n p.assignedData(log." +
"Arguments[6]);\r\n p.detected(true);\r\n " +
" if (!isLive) {\r\n p.updateT" +
"humbnail();\r\n }\r\n }\r\n " +
" session.messages.unshift(log);\r\n " +
" break;\r\n case 115: // ImportPageUndetected\r\n " +
" var p = session.sessionPagesIndex[log.Arguments[1]];\r\n " +
" if (p) {\r\n p.undetected(t" +
"rue);\r\n if (!isLive) {\r\n " +
" p.updateThumbnail();\r\n }\r\n " +
" }\r\n session.messages.unshift(log);\r\n " +
" break;\r\n case 150: // Ignore: " +
"ImportPageUndetectedStored\r\n break;\r\n " +
" default:\r\n session.messages.unshift(log);\r\n " +
" }\r\n }\r\n }\r\n }\r\n functi" +
"on init() {\r\n // Create View Model\r\n vm = new pageViewMode" +
"l();\r\n\r\n // Load Logs\r\n var d = new Date();\r\n v" +
"ar loadData = {\r\n Format: \"json\",\r\n Start: d.getFu" +
"llYear() + \'-\' + (d.getMonth() + 1) + \'-\' + d.getDate(),\r\n End: n" +
"ull,\r\n ModuleId: 40,\r\n Take: 2000\r\n };\r" +
"\n $.ajax({\r\n url: \'");
#line 288 "..\..\Areas\Config\Views\DocumentTemplate\ImportStatus.cshtml"
#line 286 "..\..\Areas\Config\Views\DocumentTemplate\ImportStatus.cshtml"
Write(Url.Action(MVC.API.Logging.RetrieveEvents()));
@@ -454,29 +453,28 @@ WriteLiteral(@"',
ko.applyBindings(vm);
// Init Persistent Connection
liveConnection = $.connection('");
logHub = $.connection.logNotifications;
logHub.client.receiveLog = parseLog
$.connection.hub.qs = { LogModules: '");
#line 308 "..\..\Areas\Config\Views\DocumentTemplate\ImportStatus.cshtml"
Write(Url.Content("~/API/Logging/Notifications"));
#line 309 "..\..\Areas\Config\Views\DocumentTemplate\ImportStatus.cshtml"
Write(Disco.BI.DocumentTemplateBI.Importer.DocumentImporterLog.Current.LiveLogGroupName);
#line default
#line hidden
WriteLiteral("\', { addToGroups: \'");
WriteLiteral(@"' };
$.connection.hub.error(function (error) {
alert('Live-Log Error: ' + error);
});
#line 308 "..\..\Areas\Config\Views\DocumentTemplate\ImportStatus.cshtml"
Write(Disco.BI.DocumentTemplateBI.Importer.DocumentImporterLog.Current.LiveLogGroupName);
#line default
#line hidden
WriteLiteral(@"' });
liveConnection.received(parseLog);
liveConnection.error(function (e) { if (e.status != 200) alert('Live-Log Error: ' + e.statusText + ': ' + e.responseText); });
isLive = true;
liveConnection.start();
$.connection.hub.start()
.done(function () { isLive = true; })
.fail(function (error) {
alert('Live-Log Connection Error: ' + error);
});
}
init();
});
@@ -136,7 +136,7 @@
var hostDialogSessions = $('#dialogSession');
//var hostDialogSessionsProgress = $('#dialogSession').find('.sessionProgress');
var deviceModels = {};
var liveConnection;
var logHub;
var deviceBaseUrl = '@(Url.Action(MVC.Device.Show()))/'
var deviceModelImageUrl = '@(Url.Action(MVC.API.DeviceModel.Image()))/'
var iconWarningUrl = 'url(@(Links.ClientSource.Style.Images.Status.warning32_png))';
@@ -356,10 +356,19 @@
vm.isotopeInited = true;
// Init Persistent Connection
liveConnection = $.connection('@(Url.Content("~/API/Logging/Notifications"))', { addToGroups: '@(Disco.BI.DeviceBI.EnrolmentLog.Current.LiveLogGroupName)' });
liveConnection.received(parseLog);
liveConnection.error(function (e) { if (e.status != 200) alert('Live-Log Error: ' + e.statusText + ': ' + e.responseText); });
liveConnection.start();
logHub = $.connection.logNotifications;
logHub.client.receiveLog = parseLog
$.connection.hub.qs = { LogModules: '@(Disco.BI.DeviceBI.EnrolmentLog.Current.LiveLogGroupName)' };
$.connection.hub.error(function (error) {
alert('Live-Log Error: ' + error);
});
$.connection.hub.start()
.done(function () { isLive = true; })
.fail(function (error) {
alert('Live-Log Connection Error: ' + error);
});
}
init();
});
@@ -319,7 +319,7 @@ WriteLiteral(@">
var hostDialogSessions = $('#dialogSession');
//var hostDialogSessionsProgress = $('#dialogSession').find('.sessionProgress');
var deviceModels = {};
var liveConnection;
var logHub;
var deviceBaseUrl = '");
@@ -520,28 +520,28 @@ WriteLiteral(@"',
vm.isotopeInited = true;
// Init Persistent Connection
liveConnection = $.connection('");
logHub = $.connection.logNotifications;
logHub.client.receiveLog = parseLog
$.connection.hub.qs = { LogModules: '");
#line 359 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
Write(Url.Content("~/API/Logging/Notifications"));
#line 362 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
Write(Disco.BI.DeviceBI.EnrolmentLog.Current.LiveLogGroupName);
#line default
#line hidden
WriteLiteral("\', { addToGroups: \'");
WriteLiteral(@"' };
$.connection.hub.error(function (error) {
alert('Live-Log Error: ' + error);
});
#line 359 "..\..\Areas\Config\Views\Enrolment\Status.cshtml"
Write(Disco.BI.DeviceBI.EnrolmentLog.Current.LiveLogGroupName);
#line default
#line hidden
WriteLiteral(@"' });
liveConnection.received(parseLog);
liveConnection.error(function (e) { if (e.status != 200) alert('Live-Log Error: ' + e.statusText + ': ' + e.responseText); });
liveConnection.start();
$.connection.hub.start()
.done(function () { isLive = true; })
.fail(function (error) {
alert('Live-Log Connection Error: ' + error);
});
}
init();
});
+3 -1
View File
@@ -202,7 +202,9 @@ namespace Disco.Web.Controllers
Database.Configuration.LazyLoadingEnabled = true;
m.Device = Database.Devices
.Include("DeviceModel").Include("DeviceDetails").Include("DeviceUserAssignments.AssignedUser").Include("DeviceAttachments")
.Include("DeviceModel").Include("DeviceProfile").Include("DeviceBatch").Include("DeviceDetails")
.Include("DeviceUserAssignments.AssignedUser").Include("AssignedUser").Include("DeviceCertificates")
.Include("DeviceAttachments.TechUser").Include("DeviceAttachments.DocumentTemplate")
.FirstOrDefault(d => d.SerialNumber == id);
if (m.Device == null)
+5 -4
View File
@@ -294,10 +294,11 @@ namespace Disco.Web.Controllers
var m = new Models.Job.ShowModel();
m.Job = (from j in Database.Jobs.Include("Device.DeviceModel").Include("Device.DeviceBatch").Include("DeviceHeldTechUser").Include("DeviceReadyForReturnTechUser").Include("DeviceReturnedTechUser")
.Include("OpenedTechUser").Include("ClosedTechUser").Include("JobType").Include("JobSubTypes").Include("User").Include("JobLogs.TechUser")
where (j.Id == id.Value)
select j).FirstOrDefault();
m.Job = Database.Jobs
.Include("Device.DeviceModel").Include("Device.DeviceBatch").Include("DeviceHeldTechUser").Include("DeviceReadyForReturnTechUser").Include("DeviceReturnedTechUser")
.Include("OpenedTechUser").Include("ClosedTechUser").Include("JobType").Include("JobSubTypes").Include("User").Include("JobLogs.TechUser")
.Include("JobAttachments.TechUser").Include("JobAttachments.DocumentTemplate")
.FirstOrDefault(j => j.Id == id.Value);
if (m.Job == null)
throw new ArgumentException(string.Format("Unknown Job: [{0}]", id), "id");
+5 -1
View File
@@ -56,7 +56,11 @@ namespace Disco.Web.Controllers
}
m.User = Database.Users
.Include("DeviceUserAssignments.Device.DeviceModel").Include("UserAttachments")
.Include("DeviceUserAssignments.Device.DeviceModel")
.Include("DeviceUserAssignments.Device.DeviceProfile")
.Include("DeviceUserAssignments.Device.DeviceBatch")
.Include("UserAttachments.TechUser")
.Include("UserAttachments.DocumentTemplate")
.FirstOrDefault(um => um.UserId == id);
if (m.User == null)
@@ -52,6 +52,7 @@
$(function () {
var $Attachments = $('#Attachments');
var $attachmentOutput = $Attachments.find('.attachmentOutput');
var $attachmentDownloadHost;
var $dialogUpload = null;
var $dialogRemoveAttachment = null;
@@ -114,7 +115,7 @@
e.attr('data-attachmentid', a.Id).attr('data-mimetype', a.MimeType).attr('href', '@(Url.Action(MVC.API.Device.AttachmentDownload()))/' + a.Id);
e.find('.icon img').attr('src', '@(Url.Action(MVC.API.Device.AttachmentThumbnail()))/' + a.Id);
e.find('.comments').text(a.Comments);
e.find('.comments').text(a.Description);
e.find('.author').text(a.Author);
e.find('.timestamp').text(a.TimestampFull).attr('title', a.TimestampFull).livestamp(a.TimestampUnixEpoc);
if (canRemove)
@@ -126,7 +127,9 @@
if (!quick)
e.show('slow');
if (a.MimeType.toLowerCase().indexOf('image/') == 0)
e.shadowbox({ gallery: 'attachments', player: 'img', title: a.Comments });
e.shadowbox({ gallery: 'attachments', player: 'img', title: a.Description });
else
e.click(onDownload);
}
function onRemoveAttachment(id) {
@@ -142,6 +145,30 @@
});
}
function onDownload() {
var $this = $(this);
var url = $this.attr('href');
if ($.connection && $.connection.hub && $.connection.hub.transport &&
$.connection.hub.transport.name == 'foreverFrame') {
// SignalR active with foreverFrame transport - use popup window
window.open(url, '_blank', 'height=150,width=250,location=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no');
} else {
// use iFrame
if (!$attachmentDownloadHost) {
$attachmentDownloadHost = $('<iframe>')
.attr({ 'src': url, 'title': 'Attachment Download Host' })
.addClass('hidden')
.appendTo('body')
.contents();
} else {
$attachmentDownloadHost[0].location.href = url;
}
}
return false;
}
function onUpdate() {
var attachmentCount = $attachmentOutput.children('a').length;
var tabHeading = 'Attachments [' + attachmentCount + ']';
@@ -266,6 +293,8 @@
$this = $(this);
if ($this.attr('data-mimetype').toLowerCase().indexOf('image/') == 0)
$this.shadowbox({ gallery: 'attachments', player: 'img', title: $this.find('.comments').text() });
else
$this.click(onDownload);
});
});
</script>
@@ -361,6 +361,7 @@ WriteLiteral(@">
$(function () {
var $Attachments = $('#Attachments');
var $attachmentOutput = $Attachments.find('.attachmentOutput');
var $attachmentDownloadHost;
var $dialogUpload = null;
var $dialogRemoveAttachment = null;
@@ -375,7 +376,7 @@ WriteLiteral(@">
$.connection.hub.qs = { DeviceSerialNumber: '");
#line 66 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
#line 67 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
Write(Model.Device.SerialNumber);
@@ -397,7 +398,7 @@ WriteLiteral(@"' };
url: '");
#line 79 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
#line 80 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
Write(Url.Action(MVC.API.Device.Attachment()));
@@ -412,13 +413,13 @@ WriteLiteral(@"',
");
#line 85 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
#line 86 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
#line default
#line hidden
#line 85 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
#line 86 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
if (canRemoveAnyAttachments)
{
@@ -432,7 +433,7 @@ WriteLiteral("buildAttachment(a, true, quick);");
WriteLiteral("\r\n");
#line 88 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
#line 89 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
}
else if (canRemoveOwnAttachments)
{
@@ -445,7 +446,7 @@ WriteLiteral(" ");
WriteLiteral("buildAttachment(a, (a.AuthorId === \'");
#line 91 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
#line 92 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
Write(CurrentUser.UserId);
@@ -456,7 +457,7 @@ WriteLiteral("\'), quick);");
WriteLiteral("\r\n");
#line 92 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
#line 93 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
}
else
{
@@ -471,7 +472,7 @@ WriteLiteral("buildAttachment(a, false, quick);");
WriteLiteral("\r\n");
#line 96 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
#line 97 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
}
@@ -498,7 +499,7 @@ WriteLiteral(@" } else {
e.attr('data-attachmentid', a.Id).attr('data-mimetype', a.MimeType).attr('href', '");
#line 115 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
#line 116 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
Write(Url.Action(MVC.API.Device.AttachmentDownload()));
@@ -507,45 +508,64 @@ WriteLiteral(@" } else {
WriteLiteral("/\' + a.Id);\r\n e.find(\'.icon img\').attr(\'src\', \'");
#line 116 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
#line 117 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
Write(Url.Action(MVC.API.Device.AttachmentThumbnail()));
#line default
#line hidden
WriteLiteral("/\' + a.Id);\r\n e.find(\'.comments\').text(a.Comments);\r\n " +
" e.find(\'.author\').text(a.Author);\r\n " +
" e.find(\'.timestamp\').text(a.TimestampFull).attr(\'title\', a.TimestampFu" +
"ll).livestamp(a.TimestampUnixEpoc);\r\n if (canRemove)\r" +
"\n e.find(\'.remove\').click(removeAttachment);\r\n " +
" if (!quick)\r\n e.hide();\r" +
"\n $attachmentOutput.append(e);\r\n " +
" onUpdate();\r\n if (!quick)\r\n " +
" e.show(\'slow\');\r\n if (a.MimeType.toLower" +
"Case().indexOf(\'image/\') == 0)\r\n e.shadowbox({ ga" +
"llery: \'attachments\', player: \'img\', title: a.Comments });\r\n " +
" }\r\n\r\n function onRemoveAttachment(id) {\r\n " +
" var a = $attachmentOutput.find(\'a[data-attachmentid=\' + id + \']\'" +
");\r\n\r\n a.hide(300).delay(300).queue(function () {\r\n " +
" var $this = $(this);\r\n " +
" if ($this.attr(\'data-mimetype\').toLowerCase().indexOf(\'image/\') == 0)\r\n " +
" Shadowbox.removeCache(this);\r\n " +
" $this.find(\'.timestamp\').livestamp(\'destroy\');\r\n " +
" $this.remove();\r\n onUpdate();\r\n " +
" });\r\n }\r\n\r\n " +
" function onUpdate() {\r\n var attachmentCount = $attac" +
"hmentOutput.children(\'a\').length;\r\n var tabHeading = " +
"\'Attachments [\' + attachmentCount + \']\';\r\n $(\'#Device" +
"DetailTab-ResourcesLink\').text(tabHeading);\r\n }\r\n\r\n");
WriteLiteral("/\' + a.Id);\r\n e.find(\'.comments\').text(a.Description);" +
"\r\n e.find(\'.author\').text(a.Author);\r\n " +
" e.find(\'.timestamp\').text(a.TimestampFull).attr(\'title\', a.Timestam" +
"pFull).livestamp(a.TimestampUnixEpoc);\r\n if (canRemov" +
"e)\r\n e.find(\'.remove\').click(removeAttachment);\r\n" +
" if (!quick)\r\n e.hide(" +
");\r\n $attachmentOutput.append(e);\r\n " +
" onUpdate();\r\n if (!quick)\r\n " +
" e.show(\'slow\');\r\n if (a.MimeType.toLo" +
"werCase().indexOf(\'image/\') == 0)\r\n e.shadowbox({" +
" gallery: \'attachments\', player: \'img\', title: a.Description });\r\n " +
" else\r\n e.click(onDownload);\r\n " +
" }\r\n\r\n function onRemoveAttachment(id) {" +
"\r\n var a = $attachmentOutput.find(\'a[data-attachmenti" +
"d=\' + id + \']\');\r\n\r\n a.hide(300).delay(300).queue(fun" +
"ction () {\r\n var $this = $(this);\r\n " +
" if ($this.attr(\'data-mimetype\').toLowerCase().indexOf(\'image/\'" +
") == 0)\r\n Shadowbox.removeCache(this);\r\n " +
" $this.find(\'.timestamp\').livestamp(\'destroy\');\r\n " +
" $this.remove();\r\n onUp" +
"date();\r\n });\r\n }\r\n\r\n " +
" function onDownload() {\r\n var $this = " +
"$(this);\r\n var url = $this.attr(\'href\');\r\n\r\n " +
" if ($.connection && $.connection.hub && $.connection.hub.tran" +
"sport &&\r\n $.connection.hub.trans" +
"port.name == \'foreverFrame\') {\r\n // SignalR activ" +
"e with foreverFrame transport - use popup window\r\n " +
" window.open(url, \'_blank\', \'height=150,width=250,location=no,menubar=no,resiza" +
"ble=no,scrollbars=no,status=no,toolbar=no\');\r\n } else" +
" {\r\n // use iFrame\r\n " +
" if (!$attachmentDownloadHost) {\r\n $attachm" +
"entDownloadHost = $(\'<iframe>\')\r\n .attr({" +
" \'src\': url, \'title\': \'Attachment Download Host\' })\r\n " +
" .addClass(\'hidden\')\r\n .appen" +
"dTo(\'body\')\r\n .contents();\r\n " +
" } else {\r\n $attachmentDown" +
"loadHost[0].location.href = url;\r\n }\r\n " +
" }\r\n\r\n return false;\r\n " +
" }\r\n\r\n function onUpdate() {\r\n " +
" var attachmentCount = $attachmentOutput.children(\'a\').length;\r\n " +
" var tabHeading = \'Attachments [\' + attachmentCount + \']\';\r\n " +
" $(\'#DeviceDetailTab-ResourcesLink\').text(tabHeading);" +
"\r\n }\r\n\r\n");
#line 151 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
#line 178 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
#line default
#line hidden
#line 151 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
#line 178 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
if (canAddAttachments)
{
@@ -576,7 +596,7 @@ WriteLiteral("\r\n //#region Add Attachments\r\n
" Silverlight.createObject(\'");
#line 186 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
#line 213 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
Write(Links.ClientBin.Disco_Silverlight_AttachmentUpload_xap);
@@ -597,7 +617,7 @@ WriteLiteral(@"',
'UploadUrl=");
#line 198 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
#line 225 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
Write(Url.Action(MVC.API.Device.AttachmentUpload(Model.Device.SerialNumber, null)));
@@ -618,7 +638,7 @@ WriteLiteral(@"');
");
#line 210 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
#line 237 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
}
@@ -627,7 +647,7 @@ WriteLiteral(@"');
WriteLiteral(" ");
#line 211 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
#line 238 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
if (canRemoveAnyAttachments || canRemoveOwnAttachments)
{
@@ -660,7 +680,7 @@ WriteLiteral(@"
url: '");
#line 236 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
#line 263 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
Write(Url.Action(MVC.API.Device.AttachmentRemove()));
@@ -696,7 +716,7 @@ WriteLiteral(@"',
");
#line 263 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
#line 290 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
}
@@ -707,6 +727,8 @@ WriteLiteral(@"
$this = $(this);
if ($this.attr('data-mimetype').toLowerCase().indexOf('image/') == 0)
$this.shadowbox({ gallery: 'attachments', player: 'img', title: $this.find('.comments').text() });
else
$this.click(onDownload);
});
});
</script>
@@ -742,7 +764,7 @@ WriteLiteral("></i>&nbsp;Are you sure?\r\n </p>\r\n </div>\r\n <scr
"etailTab-ResourcesLink\">Attachments [");
#line 285 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
#line 314 "..\..\Views\Device\DeviceParts\_Resources.cshtml"
Write(Model.Device.DeviceAttachments == null ? 0 : Model.Device.DeviceAttachments.Count);
@@ -19,6 +19,8 @@
</th>
<th>Profile
</th>
<th>Batch
</th>
<th>Assigned User
</th>
<th>Jobs
@@ -64,6 +66,16 @@
<td>
@item.DeviceProfileDescription
</td>
<td>
@if (item.DeviceBatchName != null)
{
<span>@item.DeviceBatchName</span>
}
else
{
<span class="smallMessage">N/A</span>
}
</td>
<td>
@if (string.IsNullOrEmpty(item.AssignedUserId))
{
@@ -90,6 +90,8 @@ WriteLiteral(@">
</th>
<th>Profile
</th>
<th>Batch
</th>
<th>Assigned User
</th>
<th>Jobs
@@ -100,13 +102,13 @@ WriteLiteral(@">
");
#line 29 "..\..\Views\Device\_DeviceTable.cshtml"
#line 31 "..\..\Views\Device\_DeviceTable.cshtml"
#line default
#line hidden
#line 29 "..\..\Views\Device\_DeviceTable.cshtml"
#line 31 "..\..\Views\Device\_DeviceTable.cshtml"
foreach (var item in Model)
{
@@ -115,40 +117,40 @@ WriteLiteral(@">
#line hidden
WriteLiteral(" <tr");
WriteAttribute("class", Tuple.Create(" class=\"", 965), Tuple.Create("\"", 1042)
WriteAttribute("class", Tuple.Create(" class=\"", 1023), Tuple.Create("\"", 1100)
#line 31 "..\..\Views\Device\_DeviceTable.cshtml"
, Tuple.Create(Tuple.Create("", 973), Tuple.Create<System.Object, System.Int32>(item.DecommissionedDate.HasValue ? "decommissioned" : string.Empty
#line 33 "..\..\Views\Device\_DeviceTable.cshtml"
, Tuple.Create(Tuple.Create("", 1031), Tuple.Create<System.Object, System.Int32>(item.DecommissionedDate.HasValue ? "decommissioned" : string.Empty
#line default
#line hidden
, 973), false)
, 1031), false)
);
WriteLiteral(">\r\n <td>\r\n");
#line 33 "..\..\Views\Device\_DeviceTable.cshtml"
#line 35 "..\..\Views\Device\_DeviceTable.cshtml"
#line default
#line hidden
#line 33 "..\..\Views\Device\_DeviceTable.cshtml"
#line 35 "..\..\Views\Device\_DeviceTable.cshtml"
if (canShowDevices)
{
#line default
#line hidden
#line 34 "..\..\Views\Device\_DeviceTable.cshtml"
#line 36 "..\..\Views\Device\_DeviceTable.cshtml"
Write(Html.ActionLink(item.Id, MVC.Device.Show(item.Id)));
#line default
#line hidden
#line 34 "..\..\Views\Device\_DeviceTable.cshtml"
#line 36 "..\..\Views\Device\_DeviceTable.cshtml"
}
else
{
@@ -156,14 +158,14 @@ WriteLiteral(">\r\n <td>\r\n");
#line default
#line hidden
#line 36 "..\..\Views\Device\_DeviceTable.cshtml"
#line 38 "..\..\Views\Device\_DeviceTable.cshtml"
Write(item.Id);
#line default
#line hidden
#line 36 "..\..\Views\Device\_DeviceTable.cshtml"
#line 38 "..\..\Views\Device\_DeviceTable.cshtml"
}
@@ -174,7 +176,7 @@ WriteLiteral(" </td>\r\n <td>\r\n"
WriteLiteral(" ");
#line 39 "..\..\Views\Device\_DeviceTable.cshtml"
#line 41 "..\..\Views\Device\_DeviceTable.cshtml"
Write(item.AssetNumber);
@@ -183,13 +185,13 @@ WriteLiteral(" ");
WriteLiteral("\r\n");
#line 40 "..\..\Views\Device\_DeviceTable.cshtml"
#line 42 "..\..\Views\Device\_DeviceTable.cshtml"
#line default
#line hidden
#line 40 "..\..\Views\Device\_DeviceTable.cshtml"
#line 42 "..\..\Views\Device\_DeviceTable.cshtml"
if (item.DecommissionedDate.HasValue)
{
@@ -204,7 +206,7 @@ WriteLiteral(">(Decommissioned\r\n");
WriteLiteral(" ");
#line 42 "..\..\Views\Device\_DeviceTable.cshtml"
#line 44 "..\..\Views\Device\_DeviceTable.cshtml"
Write(CommonHelpers.FriendlyDate(item.DecommissionedDate.Value));
@@ -213,7 +215,7 @@ WriteLiteral(" ");
WriteLiteral(")</span> ");
#line 42 "..\..\Views\Device\_DeviceTable.cshtml"
#line 44 "..\..\Views\Device\_DeviceTable.cshtml"
}
@@ -222,13 +224,13 @@ WriteLiteral(")</span> ");
WriteLiteral(" </td>\r\n <td>\r\n");
#line 45 "..\..\Views\Device\_DeviceTable.cshtml"
#line 47 "..\..\Views\Device\_DeviceTable.cshtml"
#line default
#line hidden
#line 45 "..\..\Views\Device\_DeviceTable.cshtml"
#line 47 "..\..\Views\Device\_DeviceTable.cshtml"
if (string.IsNullOrWhiteSpace(item.ComputerName))
{
@@ -242,7 +244,7 @@ WriteLiteral(" class=\"smallMessage\"");
WriteLiteral(">Unknown</span>\r\n");
#line 48 "..\..\Views\Device\_DeviceTable.cshtml"
#line 50 "..\..\Views\Device\_DeviceTable.cshtml"
}
else
{
@@ -251,14 +253,14 @@ WriteLiteral(">Unknown</span>\r\n");
#line default
#line hidden
#line 51 "..\..\Views\Device\_DeviceTable.cshtml"
#line 53 "..\..\Views\Device\_DeviceTable.cshtml"
Write(item.ComputerName);
#line default
#line hidden
#line 51 "..\..\Views\Device\_DeviceTable.cshtml"
#line 53 "..\..\Views\Device\_DeviceTable.cshtml"
}
@@ -268,13 +270,13 @@ WriteLiteral(">Unknown</span>\r\n");
WriteLiteral(" </td>\r\n <td>\r\n");
#line 55 "..\..\Views\Device\_DeviceTable.cshtml"
#line 57 "..\..\Views\Device\_DeviceTable.cshtml"
#line default
#line hidden
#line 55 "..\..\Views\Device\_DeviceTable.cshtml"
#line 57 "..\..\Views\Device\_DeviceTable.cshtml"
if (item.DeviceModelDescription != null)
{
@@ -284,7 +286,7 @@ WriteLiteral(" </td>\r\n <td>\r\n"
WriteLiteral(" <span>");
#line 57 "..\..\Views\Device\_DeviceTable.cshtml"
#line 59 "..\..\Views\Device\_DeviceTable.cshtml"
Write(item.DeviceModelDescription);
@@ -293,7 +295,7 @@ WriteLiteral(" <span>");
WriteLiteral("</span>\r\n");
#line 58 "..\..\Views\Device\_DeviceTable.cshtml"
#line 60 "..\..\Views\Device\_DeviceTable.cshtml"
}
else
{
@@ -308,7 +310,7 @@ WriteLiteral(" class=\"smallMessage\"");
WriteLiteral(">Unknown</span> \r\n");
#line 62 "..\..\Views\Device\_DeviceTable.cshtml"
#line 64 "..\..\Views\Device\_DeviceTable.cshtml"
}
@@ -319,7 +321,7 @@ WriteLiteral(" </td>\r\n <td>\r\n"
WriteLiteral(" ");
#line 65 "..\..\Views\Device\_DeviceTable.cshtml"
#line 67 "..\..\Views\Device\_DeviceTable.cshtml"
Write(item.DeviceProfileDescription);
@@ -328,13 +330,62 @@ WriteLiteral(" ");
WriteLiteral("\r\n </td>\r\n <td>\r\n");
#line 68 "..\..\Views\Device\_DeviceTable.cshtml"
#line 70 "..\..\Views\Device\_DeviceTable.cshtml"
#line default
#line hidden
#line 68 "..\..\Views\Device\_DeviceTable.cshtml"
#line 70 "..\..\Views\Device\_DeviceTable.cshtml"
if (item.DeviceBatchName != null)
{
#line default
#line hidden
WriteLiteral(" <span>");
#line 72 "..\..\Views\Device\_DeviceTable.cshtml"
Write(item.DeviceBatchName);
#line default
#line hidden
WriteLiteral("</span>\r\n");
#line 73 "..\..\Views\Device\_DeviceTable.cshtml"
}
else
{
#line default
#line hidden
WriteLiteral(" <span");
WriteLiteral(" class=\"smallMessage\"");
WriteLiteral(">N/A</span> \r\n");
#line 77 "..\..\Views\Device\_DeviceTable.cshtml"
}
#line default
#line hidden
WriteLiteral(" </td>\r\n <td>\r\n");
#line 80 "..\..\Views\Device\_DeviceTable.cshtml"
#line default
#line hidden
#line 80 "..\..\Views\Device\_DeviceTable.cshtml"
if (string.IsNullOrEmpty(item.AssignedUserId))
{
@@ -348,7 +399,7 @@ WriteLiteral(" class=\"smallMessage\"");
WriteLiteral(">N/A</span> \r\n");
#line 71 "..\..\Views\Device\_DeviceTable.cshtml"
#line 83 "..\..\Views\Device\_DeviceTable.cshtml"
}
else
{
@@ -359,7 +410,7 @@ WriteLiteral(">N/A</span> \r\n");
WriteLiteral(" <span>");
#line 74 "..\..\Views\Device\_DeviceTable.cshtml"
#line 86 "..\..\Views\Device\_DeviceTable.cshtml"
if (canShowUsers)
{
@@ -367,14 +418,14 @@ WriteLiteral(" <span>");
#line default
#line hidden
#line 76 "..\..\Views\Device\_DeviceTable.cshtml"
#line 88 "..\..\Views\Device\_DeviceTable.cshtml"
Write(Html.ActionLink(item.AssignedUserDescription, MVC.User.Show(item.AssignedUserId)));
#line default
#line hidden
#line 76 "..\..\Views\Device\_DeviceTable.cshtml"
#line 88 "..\..\Views\Device\_DeviceTable.cshtml"
}
else
@@ -384,14 +435,14 @@ WriteLiteral(" <span>");
#line default
#line hidden
#line 80 "..\..\Views\Device\_DeviceTable.cshtml"
#line 92 "..\..\Views\Device\_DeviceTable.cshtml"
Write(item.AssignedUserDescription);
#line default
#line hidden
#line 80 "..\..\Views\Device\_DeviceTable.cshtml"
#line 92 "..\..\Views\Device\_DeviceTable.cshtml"
}
@@ -401,7 +452,7 @@ WriteLiteral(" <span>");
WriteLiteral(" </span>\r\n");
#line 83 "..\..\Views\Device\_DeviceTable.cshtml"
#line 95 "..\..\Views\Device\_DeviceTable.cshtml"
}
@@ -412,7 +463,7 @@ WriteLiteral(" </td>\r\n <td>\r\n"
WriteLiteral(" ");
#line 86 "..\..\Views\Device\_DeviceTable.cshtml"
#line 98 "..\..\Views\Device\_DeviceTable.cshtml"
Write(item.JobCount);
@@ -421,7 +472,7 @@ WriteLiteral(" ");
WriteLiteral("\r\n </td>\r\n </tr>\r\n");
#line 89 "..\..\Views\Device\_DeviceTable.cshtml"
#line 101 "..\..\Views\Device\_DeviceTable.cshtml"
}
@@ -430,7 +481,7 @@ WriteLiteral("\r\n </td>\r\n </tr>\r\n
WriteLiteral(" </tbody>\r\n </table>\r\n");
#line 92 "..\..\Views\Device\_DeviceTable.cshtml"
#line 104 "..\..\Views\Device\_DeviceTable.cshtml"
}
else
{
@@ -445,7 +496,7 @@ WriteLiteral(" class=\"smallMessage\"");
WriteLiteral(">No Devices Found</span>\r\n");
#line 96 "..\..\Views\Device\_DeviceTable.cshtml"
#line 108 "..\..\Views\Device\_DeviceTable.cshtml"
}
+30 -8
View File
@@ -398,12 +398,6 @@
success: function (d) {
if (d == 'OK') {
// Should be removed via Repository Notifications
//$this.hide(300).delay(300).queue(function () {
// var $this = $(this);
// if ($this.attr('data-mimetype').toLowerCase().indexOf('image/') == 0)
// Shadowbox.removeCache(this);
// $this.remove();
//});
} else {
alert('Unable to remove attachment: ' + d);
}
@@ -468,7 +462,7 @@
e.attr('data-attachmentid', a.Id).attr('data-mimetype', a.MimeType).attr('href', '@(Url.Action(MVC.API.Job.AttachmentDownload()))/' + a.Id);
e.find('.icon img').attr('src', '@(Url.Action(MVC.API.Job.AttachmentThumbnail()))/' + a.Id);
e.find('.comments').text(a.Comments);
e.find('.comments').text(a.Description);
e.find('.author').text(a.Author);
e.find('.timestamp').text(a.TimestampFull).attr('title', a.TimestampFull).livestamp(a.TimestampUnixEpoc);
if (canRemove)
@@ -480,10 +474,36 @@
if (!quick)
e.show('slow');
if (a.MimeType.toLowerCase().indexOf('image/') == 0)
e.shadowbox({ gallery: 'attachments', player: 'img', title: a.Comments });
e.shadowbox({ gallery: 'attachments', player: 'img', title: a.Description });
else
e.click(onDownload);
}
}
function onDownload() {
var $this = $(this);
var url = $this.attr('href');
if ($.connection && $.connection.hub && $.connection.hub.transport &&
$.connection.hub.transport.name == 'foreverFrame') {
// SignalR active with foreverFrame transport - use popup window
window.open(url, '_blank', 'height=150,width=250,location=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no');
} else {
// use iFrame
if (!$attachmentDownloadHost) {
$attachmentDownloadHost = $('<iframe>')
.attr({ 'src': url, 'title': 'Attachment Download Host' })
.addClass('hidden')
.appendTo('body')
.contents();
} else {
$attachmentDownloadHost[0].location.href = url;
}
}
return false;
}
function removeAttachment(key) {
var $element = $attachmentOutput.find('a[data-attachmentid="' + key + '"]');
if ($element.length > 0) {
@@ -500,6 +520,8 @@
$this = $(this);
if ($this.attr('data-mimetype').toLowerCase().indexOf('image/') == 0)
$this.shadowbox({ gallery: 'attachments', player: 'img', title: $this.find('.comments').text() });
else
$this.click(onDownload);
});
// Add Globally Available Functions
@@ -1170,29 +1170,37 @@ WriteLiteral(@"
#line default
#line hidden
WriteLiteral("\',\r\n dataType: \'json\',\r\n da" +
"ta: data,\r\n success: function (d) {\r\n " +
" if (d == \'OK\') {\r\n // Should " +
"be removed via Repository Notifications\r\n //$" +
"this.hide(300).delay(300).queue(function () {\r\n " +
" // var $this = $(this);\r\n // if ($th" +
"is.attr(\'data-mimetype\').toLowerCase().indexOf(\'image/\') == 0)\r\n " +
" // Shadowbox.removeCache(this);\r\n " +
" // $this.remove();\r\n //});" +
"\r\n } else {\r\n " +
"alert(\'Unable to remove attachment: \' + d);\r\n }\r\n" +
" $dialogRemoveAttachment.dialog(\"close\");\r\n " +
" },\r\n error: function (jqXHR, te" +
"xtStatus, errorThrown) {\r\n alert(\'Unable to remov" +
"e attachment: \' + textStatus);\r\n $dialogRemoveAtt" +
"achment.dialog(\"close\");\r\n }\r\n " +
" });\r\n },\r\n \"Cancel\": function () {\r\n " +
" $dialogRemoveAttachment.dialog(\"close\");\r\n " +
" }\r\n }).dialog(\'open\');\r\n\r\n return false;\r\n " +
" }\r\n\r\n //#endregion\r\n\r\n ");
WriteLiteral(@"',
dataType: 'json',
data: data,
success: function (d) {
if (d == 'OK') {
// Should be removed via Repository Notifications
} else {
alert('Unable to remove attachment: ' + d);
}
$dialogRemoveAttachment.dialog(""close"");
},
error: function (jqXHR, textStatus, errorThrown) {
alert('Unable to remove attachment: ' + textStatus);
$dialogRemoveAttachment.dialog(""close"");
}
});
},
""Cancel"": function () {
$dialogRemoveAttachment.dialog(""close"");
}
}).dialog('open');
return false;
}
//#endregion
");
#line 428 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 422 "..\..\Views\Job\JobParts\Resources.cshtml"
}
@@ -1202,7 +1210,7 @@ WriteLiteral("\r\n function addAttachment(key, quick) {\r\n
"id: key };\r\n $.ajax({\r\n url: \'");
#line 433 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 427 "..\..\Views\Job\JobParts\Resources.cshtml"
Write(Url.Action(MVC.API.Job.Attachment()));
@@ -1213,13 +1221,13 @@ WriteLiteral("\',\r\n dataType: \'json\',\r\n
"\'OK\') {\r\n var a = d.Attachment;\r\n");
#line 439 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 433 "..\..\Views\Job\JobParts\Resources.cshtml"
#line default
#line hidden
#line 439 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 433 "..\..\Views\Job\JobParts\Resources.cshtml"
if (canRemoveAnyAttachments)
{
@@ -1233,7 +1241,7 @@ WriteLiteral("buildAttachment(a, true, quick);");
WriteLiteral("\r\n");
#line 442 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 436 "..\..\Views\Job\JobParts\Resources.cshtml"
}
else if (canRemoveOwnAttachments)
{
@@ -1246,7 +1254,7 @@ WriteLiteral(" ");
WriteLiteral("buildAttachment(a, (a.AuthorId === \'");
#line 445 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 439 "..\..\Views\Job\JobParts\Resources.cshtml"
Write(CurrentUser.UserId);
@@ -1257,7 +1265,7 @@ WriteLiteral("\'), quick);");
WriteLiteral("\r\n");
#line 446 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 440 "..\..\Views\Job\JobParts\Resources.cshtml"
}
else
{
@@ -1272,7 +1280,7 @@ WriteLiteral("buildAttachment(a, false, quick);");
WriteLiteral("\r\n");
#line 450 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 444 "..\..\Views\Job\JobParts\Resources.cshtml"
}
@@ -1299,7 +1307,7 @@ WriteLiteral(@" } else {
e.attr('data-attachmentid', a.Id).attr('data-mimetype', a.MimeType).attr('href', '");
#line 469 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 463 "..\..\Views\Job\JobParts\Resources.cshtml"
Write(Url.Action(MVC.API.Job.AttachmentDownload()));
@@ -1308,47 +1316,63 @@ WriteLiteral(@" } else {
WriteLiteral("/\' + a.Id);\r\n e.find(\'.icon img\').attr(\'src\', \'");
#line 470 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 464 "..\..\Views\Job\JobParts\Resources.cshtml"
Write(Url.Action(MVC.API.Job.AttachmentThumbnail()));
#line default
#line hidden
WriteLiteral("/\' + a.Id);\r\n e.find(\'.comments\').text(a.Comments);\r\n " +
" e.find(\'.author\').text(a.Author);\r\n e.find(\'.times" +
"tamp\').text(a.TimestampFull).attr(\'title\', a.TimestampFull).livestamp(a.Timestam" +
"pUnixEpoc);\r\n if (canRemove)\r\n e.find(" +
"\'.remove\').click(removeLocalAttachment);\r\n if (!quick)\r\n " +
" e.hide();\r\n $attachmentOutput.append(e);\r\n" +
" document.DiscoFunctions.liveAfterUpdate();\r\n " +
" if (!quick)\r\n e.show(\'slow\');\r\n if" +
" (a.MimeType.toLowerCase().indexOf(\'image/\') == 0)\r\n e.sh" +
"adowbox({ gallery: \'attachments\', player: \'img\', title: a.Comments });\r\n " +
" }\r\n }\r\n\r\n function removeAttachment(key) {\r\n " +
" var $element = $attachmentOutput.find(\'a[data-attachmentid=\"\' + key + " +
"\'\"]\');\r\n if ($element.length > 0) {\r\n $element" +
".hide(300).delay(300).queue(function () {\r\n if ($element." +
"attr(\'data-mimetype\').toLowerCase().indexOf(\'image/\') == 0)\r\n " +
" Shadowbox.removeCache(this);\r\n $element.remove()" +
";\r\n document.DiscoFunctions.liveAfterUpdate();\r\n " +
" });\r\n }\r\n }\r\n\r\n $attachmentOutpu" +
"t.children(\'a\').each(function () {\r\n $this = $(this);\r\n " +
" if ($this.attr(\'data-mimetype\').toLowerCase().indexOf(\'image/\') == 0)\r\n " +
" $this.shadowbox({ gallery: \'attachments\', player: \'img\', title:" +
" $this.find(\'.comments\').text() });\r\n });\r\n\r\n // Add Globa" +
"lly Available Functions\r\n document.DiscoFunctions.liveAddAttachment =" +
" addAttachment;\r\n document.DiscoFunctions.liveRemoveAttachment = remo" +
"veAttachment;\r\n\r\n //#endregion\r\n });\r\n\r\n\r\n </script>\r\n");
WriteLiteral("/\' + a.Id);\r\n e.find(\'.comments\').text(a.Description);\r\n " +
" e.find(\'.author\').text(a.Author);\r\n e.find(\'.ti" +
"mestamp\').text(a.TimestampFull).attr(\'title\', a.TimestampFull).livestamp(a.Times" +
"tampUnixEpoc);\r\n if (canRemove)\r\n e.fi" +
"nd(\'.remove\').click(removeLocalAttachment);\r\n if (!quick)\r\n " +
" e.hide();\r\n $attachmentOutput.append(e)" +
";\r\n document.DiscoFunctions.liveAfterUpdate();\r\n " +
" if (!quick)\r\n e.show(\'slow\');\r\n " +
" if (a.MimeType.toLowerCase().indexOf(\'image/\') == 0)\r\n e" +
".shadowbox({ gallery: \'attachments\', player: \'img\', title: a.Description });\r\n " +
" else\r\n e.click(onDownload);\r\n " +
" }\r\n }\r\n\r\n function onDownload() {\r\n v" +
"ar $this = $(this);\r\n var url = $this.attr(\'href\');\r\n\r\n " +
" if ($.connection && $.connection.hub && $.connection.hub.transport &&\r\n " +
" $.connection.hub.transport.name == \'foreverFram" +
"e\') {\r\n // SignalR active with foreverFrame transport - use p" +
"opup window\r\n window.open(url, \'_blank\', \'height=150,width=25" +
"0,location=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no\');\r\n " +
" } else {\r\n // use iFrame\r\n if" +
" (!$attachmentDownloadHost) {\r\n $attachmentDownloadHost =" +
" $(\'<iframe>\')\r\n .attr({ \'src\': url, \'title\': \'Attach" +
"ment Download Host\' })\r\n .addClass(\'hidden\')\r\n " +
" .appendTo(\'body\')\r\n .contents();" +
"\r\n } else {\r\n $attachmentDownloadHost[" +
"0].location.href = url;\r\n }\r\n }\r\n\r\n " +
" return false;\r\n }\r\n\r\n function removeAttachment(key) " +
"{\r\n var $element = $attachmentOutput.find(\'a[data-attachmentid=\"\'" +
" + key + \'\"]\');\r\n if ($element.length > 0) {\r\n " +
" $element.hide(300).delay(300).queue(function () {\r\n if (" +
"$element.attr(\'data-mimetype\').toLowerCase().indexOf(\'image/\') == 0)\r\n " +
" Shadowbox.removeCache(this);\r\n $element" +
".remove();\r\n document.DiscoFunctions.liveAfterUpdate();\r\n" +
" });\r\n }\r\n }\r\n\r\n $attach" +
"mentOutput.children(\'a\').each(function () {\r\n $this = $(this);\r\n " +
" if ($this.attr(\'data-mimetype\').toLowerCase().indexOf(\'image/\') =" +
"= 0)\r\n $this.shadowbox({ gallery: \'attachments\', player: \'img" +
"\', title: $this.find(\'.comments\').text() });\r\n else\r\n " +
" $this.click(onDownload);\r\n });\r\n\r\n // Add Globally" +
" Available Functions\r\n document.DiscoFunctions.liveAddAttachment = ad" +
"dAttachment;\r\n document.DiscoFunctions.liveRemoveAttachment = removeA" +
"ttachment;\r\n\r\n //#endregion\r\n });\r\n\r\n\r\n </script>\r\n");
#line 514 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 536 "..\..\Views\Job\JobParts\Resources.cshtml"
}
#line default
#line hidden
#line 515 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 537 "..\..\Views\Job\JobParts\Resources.cshtml"
if (canShowLogs || canShowAttachments)
{
@@ -1358,7 +1382,7 @@ WriteLiteral("/\' + a.Id);\r\n e.find(\'.comments\').text(a.C
WriteLiteral(" <script>\r\n $(function () {\r\n var jobId = parseInt(\'");
#line 519 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 541 "..\..\Views\Job\JobParts\Resources.cshtml"
Write(Model.Job.Id);
@@ -1368,7 +1392,7 @@ WriteLiteral("\');\r\n\r\n //#region LiveEvents\r\n var hu
"dates;\r\n\r\n // Map Functions\r\n");
#line 525 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 547 "..\..\Views\Job\JobParts\Resources.cshtml"
if (canShowLogs)
{
@@ -1379,14 +1403,14 @@ WriteLiteral("\r\n hub.client.addLog = document.DiscoFunctions.liveLo
" ");
#line 529 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 551 "..\..\Views\Job\JobParts\Resources.cshtml"
}
#line default
#line hidden
#line 530 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 552 "..\..\Views\Job\JobParts\Resources.cshtml"
if (canShowAttachments)
{
@@ -1407,7 +1431,7 @@ WriteLiteral(@"
");
#line 543 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 565 "..\..\Views\Job\JobParts\Resources.cshtml"
}
@@ -1430,7 +1454,7 @@ WriteLiteral(@"
");
#line 558 "..\..\Views\Job\JobParts\Resources.cshtml"
#line 580 "..\..\Views\Job\JobParts\Resources.cshtml"
}
#line default
@@ -13,6 +13,10 @@
</th>
<th>Device Model
</th>
<th>Device Profile
</th>
<th>Device Batch
</th>
<th>Assigned
</th>
<th>Unassigned
@@ -32,10 +36,58 @@
}
</td>
<td>
@dua.Device.AssetNumber
@if (!string.IsNullOrWhiteSpace(dua.Device.AssetNumber))
{
@dua.Device.AssetNumber
}
else
{
<span class="smallMessage">N/A</span>
}
</td>
<td>
@dua.Device.DeviceModel.ToString()
@if (dua.Device.DeviceModelId.HasValue)
{
if (Authorization.Has(Claims.Config.DeviceModel.Show))
{
@Html.ActionLink(dua.Device.DeviceModel.ToString(), MVC.Config.DeviceModel.Index(dua.Device.DeviceModelId))
}
else
{
@dua.Device.DeviceModel.ToString()
}
}
else
{
<span class="smallMessage">Unknown</span>
}
</td>
<td>
@if (Authorization.Has(Claims.Config.DeviceProfile.Show))
{
@Html.ActionLink(dua.Device.DeviceProfile.ToString(), MVC.Config.DeviceProfile.Index(dua.Device.DeviceProfileId))
}
else
{
@dua.Device.DeviceProfile.ToString()
}
</td>
<td>
@if (dua.Device.DeviceBatchId.HasValue)
{
if (Authorization.Has(Claims.Config.DeviceBatch.Show))
{
@Html.ActionLink(dua.Device.DeviceBatch.ToString(), MVC.Config.DeviceBatch.Index(dua.Device.DeviceBatchId))
}
else
{
@dua.Device.DeviceModel.ToString()
}
}
else
{
<span class="smallMessage">None</span>
}
</td>
<td>
@CommonHelpers.FriendlyDate(dua.AssignedDate)
@@ -86,6 +86,10 @@ WriteLiteral(@">
</th>
<th>Device Model
</th>
<th>Device Profile
</th>
<th>Device Batch
</th>
<th>Assigned
</th>
<th>Unassigned
@@ -94,13 +98,13 @@ WriteLiteral(@">
");
#line 21 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
#line 25 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
#line default
#line hidden
#line 21 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
#line 25 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
foreach (var dua in Model.User.DeviceUserAssignments.OrderByDescending(m => m.AssignedDate))
{
@@ -110,13 +114,13 @@ WriteLiteral(@">
WriteLiteral(" <tr>\r\n <td>\r\n");
#line 25 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
#line 29 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
#line default
#line hidden
#line 25 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
#line 29 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
if (Authorization.Has(Claims.Device.Show))
{
@@ -124,14 +128,14 @@ WriteLiteral(" <tr>\r\n <td>\r\n");
#line default
#line hidden
#line 27 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
#line 31 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
Write(Html.ActionLink(dua.Device.SerialNumber, MVC.Device.Show(dua.DeviceSerialNumber)));
#line default
#line hidden
#line 27 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
#line 31 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
}
else
@@ -141,14 +145,14 @@ WriteLiteral(" <tr>\r\n <td>\r\n");
#line default
#line hidden
#line 31 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
#line 35 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
Write(dua.Device.SerialNumber);
#line default
#line hidden
#line 31 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
#line 35 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
}
@@ -157,32 +161,236 @@ WriteLiteral(" <tr>\r\n <td>\r\n");
#line hidden
WriteLiteral(" </td>\r\n <td>\r\n");
#line 39 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
#line default
#line hidden
#line 39 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
if (!string.IsNullOrWhiteSpace(dua.Device.AssetNumber))
{
#line default
#line hidden
#line 41 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
Write(dua.Device.AssetNumber);
#line default
#line hidden
#line 41 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
}
else
{
#line default
#line hidden
WriteLiteral(" <span");
WriteLiteral(" class=\"smallMessage\"");
WriteLiteral(">N/A</span>\r\n");
#line 46 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
}
#line default
#line hidden
WriteLiteral(" </td>\r\n <td>\r\n");
#line 49 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
#line default
#line hidden
#line 49 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
if (dua.Device.DeviceModelId.HasValue)
{
if (Authorization.Has(Claims.Config.DeviceModel.Show))
{
#line default
#line hidden
#line 53 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
Write(Html.ActionLink(dua.Device.DeviceModel.ToString(), MVC.Config.DeviceModel.Index(dua.Device.DeviceModelId)));
#line default
#line hidden
#line 53 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
}
else
{
#line default
#line hidden
#line 57 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
Write(dua.Device.DeviceModel.ToString());
#line default
#line hidden
#line 57 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
}
}
else
{
#line default
#line hidden
WriteLiteral(" <span");
WriteLiteral(" class=\"smallMessage\"");
WriteLiteral(">Unknown</span>\r\n");
#line 63 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
}
#line default
#line hidden
WriteLiteral(" </td>\r\n <td>\r\n");
#line 66 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
#line default
#line hidden
#line 66 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
if (Authorization.Has(Claims.Config.DeviceProfile.Show))
{
#line default
#line hidden
#line 68 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
Write(Html.ActionLink(dua.Device.DeviceProfile.ToString(), MVC.Config.DeviceProfile.Index(dua.Device.DeviceProfileId)));
#line default
#line hidden
#line 68 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
}
else
{
#line default
#line hidden
#line 72 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
Write(dua.Device.DeviceProfile.ToString());
#line default
#line hidden
#line 72 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
}
#line default
#line hidden
WriteLiteral(" </td>\r\n <td>\r\n");
#line 76 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
#line default
#line hidden
#line 76 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
if (dua.Device.DeviceBatchId.HasValue)
{
if (Authorization.Has(Claims.Config.DeviceBatch.Show))
{
#line default
#line hidden
#line 80 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
Write(Html.ActionLink(dua.Device.DeviceBatch.ToString(), MVC.Config.DeviceBatch.Index(dua.Device.DeviceBatchId)));
#line default
#line hidden
#line 80 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
}
else
{
#line default
#line hidden
#line 84 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
Write(dua.Device.DeviceModel.ToString());
#line default
#line hidden
#line 84 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
}
}
else
{
#line default
#line hidden
WriteLiteral(" <span");
WriteLiteral(" class=\"smallMessage\"");
WriteLiteral(">None</span>\r\n");
#line 90 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
}
#line default
#line hidden
WriteLiteral(" </td>\r\n <td>\r\n");
WriteLiteral(" ");
#line 35 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
Write(dua.Device.AssetNumber);
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n <td>\r\n");
WriteLiteral(" ");
#line 38 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
Write(dua.Device.DeviceModel.ToString());
#line default
#line hidden
WriteLiteral("\r\n </td>\r\n <td>\r\n");
WriteLiteral(" ");
#line 41 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
#line 93 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
Write(CommonHelpers.FriendlyDate(dua.AssignedDate));
@@ -193,7 +401,7 @@ WriteLiteral("\r\n </td>\r\n <td>\r\n");
WriteLiteral(" ");
#line 44 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
#line 96 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
Write(CommonHelpers.FriendlyDate(dua.UnassignedDate, "Current"));
@@ -202,7 +410,7 @@ WriteLiteral(" ");
WriteLiteral("\r\n </td>\r\n </tr>\r\n");
#line 47 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
#line 99 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
}
@@ -211,7 +419,7 @@ WriteLiteral("\r\n </td>\r\n </tr>\r\n");
WriteLiteral(" </table>\r\n");
#line 49 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
#line 101 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
}
else
{
@@ -226,7 +434,7 @@ WriteLiteral(" class=\"smallMessage\"");
WriteLiteral(">No Assignment History Available</span>\r\n");
#line 53 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
#line 105 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
}
@@ -236,7 +444,7 @@ WriteLiteral(" <script>\r\n $(\'#UserDetailTabItems\').append(\'<li><a
"b-AssignmentHistory\">Assignment History [");
#line 55 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
#line 107 "..\..\Views\User\UserParts\_AssignmentHistory.cshtml"
Write(Model.User.DeviceUserAssignments.Count);
@@ -112,7 +112,7 @@
e.attr('data-attachmentid', a.Id).attr('data-mimetype', a.MimeType).attr('href', '@(Url.Action(MVC.API.User.AttachmentDownload()))/' + a.Id);
e.find('.icon img').attr('src', '@(Url.Action(MVC.API.User.AttachmentThumbnail()))/' + a.Id);
e.find('.comments').text(a.Comments);
e.find('.comments').text(a.Description);
e.find('.author').text(a.Author);
e.find('.timestamp').text(a.TimestampFull).attr('title', a.TimestampFull).livestamp(a.TimestampUnixEpoc);
if (canRemove)
@@ -124,8 +124,35 @@
if (!quick)
e.show('slow');
if (a.MimeType.toLowerCase().indexOf('image/') == 0)
e.shadowbox({ gallery: 'attachments', player: 'img', title: a.Comments });
e.shadowbox({ gallery: 'attachments', player: 'img', title: a.Description });
else
e.click(onDownload);
}
function onDownload() {
var $this = $(this);
var url = $this.attr('href');
if ($.connection && $.connection.hub && $.connection.hub.transport &&
$.connection.hub.transport.name == 'foreverFrame') {
// SignalR active with foreverFrame transport - use popup window
window.open(url, '_blank', 'height=150,width=250,location=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no');
} else {
// use iFrame
if (!$attachmentDownloadHost) {
$attachmentDownloadHost = $('<iframe>')
.attr({ 'src': url, 'title': 'Attachment Download Host' })
.addClass('hidden')
.appendTo('body')
.contents();
} else {
$attachmentDownloadHost[0].location.href = url;
}
}
return false;
}
function onRemoveAttachment(id) {
var a = $attachmentOutput.find('a[data-attachmentid=' + id + ']');
@@ -265,6 +292,8 @@
$this = $(this);
if ($this.attr('data-mimetype').toLowerCase().indexOf('image/') == 0)
$this.shadowbox({ gallery: 'attachments', player: 'img', title: $this.find('.comments').text() });
else
$this.click(onDownload);
});
});
</script>
@@ -511,39 +511,58 @@ WriteLiteral("/\' + a.Id);\r\n e.find(\'.icon img\').
#line default
#line hidden
WriteLiteral("/\' + a.Id);\r\n e.find(\'.comments\').text(a.Comments);\r\n " +
" e.find(\'.author\').text(a.Author);\r\n " +
" e.find(\'.timestamp\').text(a.TimestampFull).attr(\'title\', a.TimestampFu" +
"ll).livestamp(a.TimestampUnixEpoc);\r\n if (canRemove)\r" +
"\n e.find(\'.remove\').click(removeAttachment);\r\n " +
" if (!quick)\r\n e.hide();\r" +
"\n $attachmentOutput.append(e);\r\n " +
" onUpdate();\r\n if (!quick)\r\n " +
" e.show(\'slow\');\r\n if (a.MimeType.toLower" +
"Case().indexOf(\'image/\') == 0)\r\n e.shadowbox({ ga" +
"llery: \'attachments\', player: \'img\', title: a.Comments });\r\n " +
" }\r\n function onRemoveAttachment(id) {\r\n " +
" var a = $attachmentOutput.find(\'a[data-attachmentid=\' + id + \']\');" +
"\r\n\r\n a.hide(300).delay(300).queue(function () {\r\n " +
" var $this = $(this);\r\n " +
" if ($this.attr(\'data-mimetype\').toLowerCase().indexOf(\'image/\') == 0)\r\n " +
" Shadowbox.removeCache(this);\r\n " +
" $this.find(\'.timestamp\').livestamp(\'destroy\');\r\n " +
" $this.remove();\r\n onUpdate();\r\n " +
" });\r\n }\r\n\r\n f" +
"unction onUpdate() {\r\n var attachmentCount = $attachm" +
"entOutput.children(\'a\').length;\r\n var tabHeading = \'A" +
"ttachments [\' + attachmentCount + \']\';\r\n $(\'#UserDeta" +
"ilTab-ResourcesLink\').text(tabHeading);\r\n }\r\n\r\n");
WriteLiteral("/\' + a.Id);\r\n e.find(\'.comments\').text(a.Description);" +
"\r\n e.find(\'.author\').text(a.Author);\r\n " +
" e.find(\'.timestamp\').text(a.TimestampFull).attr(\'title\', a.Timestam" +
"pFull).livestamp(a.TimestampUnixEpoc);\r\n if (canRemov" +
"e)\r\n e.find(\'.remove\').click(removeAttachment);\r\n" +
" if (!quick)\r\n e.hide(" +
");\r\n $attachmentOutput.append(e);\r\n " +
" onUpdate();\r\n if (!quick)\r\n " +
" e.show(\'slow\');\r\n if (a.MimeType.toLo" +
"werCase().indexOf(\'image/\') == 0)\r\n e.shadowbox({" +
" gallery: \'attachments\', player: \'img\', title: a.Description });\r\n " +
" else\r\n e.click(onDownload);\r\n " +
" }\r\n\r\n function onDownload() {\r\n " +
" var $this = $(this);\r\n var url = " +
"$this.attr(\'href\');\r\n\r\n if ($.connection && $.connect" +
"ion.hub && $.connection.hub.transport &&\r\n " +
" $.connection.hub.transport.name == \'foreverFrame\') {\r\n " +
" // SignalR active with foreverFrame transport - use popup window" +
"\r\n window.open(url, \'_blank\', \'height=150,width=2" +
"50,location=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no\');\r\n " +
" } else {\r\n // use iFram" +
"e\r\n if (!$attachmentDownloadHost) {\r\n " +
" $attachmentDownloadHost = $(\'<iframe>\')\r\n " +
" .attr({ \'src\': url, \'title\': \'Attachment Download Host\'" +
" })\r\n .addClass(\'hidden\')\r\n " +
" .appendTo(\'body\')\r\n " +
" .contents();\r\n } else {\r\n " +
" $attachmentDownloadHost[0].location.href = url;\r\n " +
" }\r\n }\r\n\r\n " +
" return false;\r\n }\r\n\r\n function o" +
"nRemoveAttachment(id) {\r\n var a = $attachmentOutput.f" +
"ind(\'a[data-attachmentid=\' + id + \']\');\r\n\r\n a.hide(30" +
"0).delay(300).queue(function () {\r\n var $this = $" +
"(this);\r\n if ($this.attr(\'data-mimetype\').toLower" +
"Case().indexOf(\'image/\') == 0)\r\n Shadowbox.re" +
"moveCache(this);\r\n $this.find(\'.timestamp\').lives" +
"tamp(\'destroy\');\r\n $this.remove();\r\n " +
" onUpdate();\r\n });\r\n " +
" }\r\n\r\n function onUpdate() {\r\n " +
" var attachmentCount = $attachmentOutput.children(\'a\').length;\r\n " +
" var tabHeading = \'Attachments [\' + attachmentCount + \']\';\r\n " +
" $(\'#UserDetailTab-ResourcesLink\').text(tabHeading);\r\n" +
" }\r\n\r\n");
#line 148 "..\..\Views\User\UserParts\_Resources.cshtml"
#line 175 "..\..\Views\User\UserParts\_Resources.cshtml"
#line default
#line hidden
#line 148 "..\..\Views\User\UserParts\_Resources.cshtml"
#line 175 "..\..\Views\User\UserParts\_Resources.cshtml"
if (canAddAttachments)
{
@@ -574,7 +593,7 @@ WriteLiteral("\r\n //#region Add Attachments\r\n
" Silverlight.createObject(\'");
#line 183 "..\..\Views\User\UserParts\_Resources.cshtml"
#line 210 "..\..\Views\User\UserParts\_Resources.cshtml"
Write(Links.ClientBin.Disco_Silverlight_AttachmentUpload_xap);
@@ -595,7 +614,7 @@ WriteLiteral(@"',
'UploadUrl=");
#line 195 "..\..\Views\User\UserParts\_Resources.cshtml"
#line 222 "..\..\Views\User\UserParts\_Resources.cshtml"
Write(Url.Action(MVC.API.User.AttachmentUpload(Model.User.UserId, null)));
@@ -616,7 +635,7 @@ WriteLiteral(@"');
");
#line 207 "..\..\Views\User\UserParts\_Resources.cshtml"
#line 234 "..\..\Views\User\UserParts\_Resources.cshtml"
}
@@ -625,7 +644,7 @@ WriteLiteral(@"');
WriteLiteral(" ");
#line 208 "..\..\Views\User\UserParts\_Resources.cshtml"
#line 235 "..\..\Views\User\UserParts\_Resources.cshtml"
if (canRemoveAnyAttachments || canRemoveOwnAttachments)
{
@@ -659,7 +678,7 @@ WriteLiteral(@"
url: '");
#line 234 "..\..\Views\User\UserParts\_Resources.cshtml"
#line 261 "..\..\Views\User\UserParts\_Resources.cshtml"
Write(Url.Action(MVC.API.User.AttachmentRemove()));
@@ -696,7 +715,7 @@ WriteLiteral(@"',
");
#line 262 "..\..\Views\User\UserParts\_Resources.cshtml"
#line 289 "..\..\Views\User\UserParts\_Resources.cshtml"
}
@@ -707,6 +726,8 @@ WriteLiteral(@"
$this = $(this);
if ($this.attr('data-mimetype').toLowerCase().indexOf('image/') == 0)
$this.shadowbox({ gallery: 'attachments', player: 'img', title: $this.find('.comments').text() });
else
$this.click(onDownload);
});
});
</script>
@@ -717,7 +738,7 @@ WriteLiteral(@"
$('#UserDetailTabItems').append('<li><a href=""#UserDetailTab-Resources"" id=""UserDetailTab-ResourcesLink"">Attachments [");
#line 275 "..\..\Views\User\UserParts\_Resources.cshtml"
#line 304 "..\..\Views\User\UserParts\_Resources.cshtml"
Write(Model.User.UserAttachments == null ? 0 : Model.User.UserAttachments.Count);
@@ -726,7 +747,7 @@ WriteLiteral(@"
WriteLiteral("]</a></li>\');\r\n </script>\r\n</div>\r\n");
#line 278 "..\..\Views\User\UserParts\_Resources.cshtml"
#line 307 "..\..\Views\User\UserParts\_Resources.cshtml"
if (canAddAttachments)
{
@@ -748,14 +769,14 @@ WriteLiteral(" id=\"silverlightHostUploadAttachment\"");
WriteLiteral(">\r\n </div>\r\n </div>\r\n");
#line 284 "..\..\Views\User\UserParts\_Resources.cshtml"
#line 313 "..\..\Views\User\UserParts\_Resources.cshtml"
}
#line default
#line hidden
#line 285 "..\..\Views\User\UserParts\_Resources.cshtml"
#line 314 "..\..\Views\User\UserParts\_Resources.cshtml"
if (canRemoveAnyAttachments || canRemoveOwnAttachments)
{
@@ -777,7 +798,7 @@ WriteLiteral(" class=\"fa fa-exclamation-triangle fa-lg\"");
WriteLiteral("></i>&nbsp;Are you sure?\r\n </p>\r\n </div>\r\n");
#line 292 "..\..\Views\User\UserParts\_Resources.cshtml"
#line 321 "..\..\Views\User\UserParts\_Resources.cshtml"
}
#line default
+39 -19
View File
@@ -261,29 +261,49 @@
{
@assignment.Device.SerialNumber
}
</span>(<span>@assignment.Device.ComputerName</span>)
</td>
</tr>
<tr>
<td>Model:
</td>
<td>
<span class="User_Show_AssignedDevices_CurrentAssignment_Model">@assignment.Device.DeviceModel.ToString()</span>
</td>
</tr>
<tr>
<td>Asset:</td>
<td>
@if (!string.IsNullOrEmpty(assignment.Device.AssetNumber))
</span>
@if (!string.IsNullOrWhiteSpace(assignment.Device.ComputerName))
{
<text>(<span class="User_Show_AssignedDevices_CurrentAssignment_ComputerName">@assignment.Device.ComputerName</span>)</text>
}
</td>
</tr>
@if (!string.IsNullOrEmpty(assignment.Device.AssetNumber))
{
<tr>
<td>Asset:</td>
<td>
<span class="User_Show_AssignedDevices_CurrentAssignment_Asset">@assignment.Device.AssetNumber</span>
}
else
{
<span class="smallMessage">Unknown</span>
}
</td>
</tr>
}
@if (assignment.Device.DeviceModelId.HasValue)
{
<tr>
<td>Model:
</td>
<td>
<span class="User_Show_AssignedDevices_CurrentAssignment_Model">@assignment.Device.DeviceModel.ToString()</span>
</td>
</tr>
}
<tr>
<td>Profile:
</td>
<td>
<span class="User_Show_AssignedDevices_CurrentAssignment_Profile">@assignment.Device.DeviceProfile.ToString()</span>
</td>
</tr>
@if (assignment.Device.DeviceBatchId.HasValue)
{
<tr>
<td>Batch:
</td>
<td>
<span class="User_Show_AssignedDevices_CurrentAssignment_Batch">@assignment.Device.DeviceBatch.ToString()</span>
</td>
</tr>
}
<tr>
<td>Assigned:</td>
<td>
@@ -873,107 +873,200 @@ WriteLiteral(">\r\n");
#line default
#line hidden
WriteLiteral(" </span>(<span>");
WriteLiteral(" </span>\r\n");
#line 264 "..\..\Views\User\UserParts\_Subject.cshtml"
Write(assignment.Device.ComputerName);
#line default
#line hidden
WriteLiteral(@"</span>)
</td>
</tr>
<tr>
<td>Model:
</td>
<td>
<span");
WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_Model\"");
WriteLiteral(">");
#line 271 "..\..\Views\User\UserParts\_Subject.cshtml"
Write(assignment.Device.DeviceModel.ToString());
#line default
#line hidden
WriteLiteral(@"</span>
</td>
</tr>
<tr>
<td>Asset:</td>
<td>
");
#line 277 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 265 "..\..\Views\User\UserParts\_Subject.cshtml"
#line default
#line hidden
#line 277 "..\..\Views\User\UserParts\_Subject.cshtml"
if (!string.IsNullOrEmpty(assignment.Device.AssetNumber))
#line 265 "..\..\Views\User\UserParts\_Subject.cshtml"
if (!string.IsNullOrWhiteSpace(assignment.Device.ComputerName))
{
#line default
#line hidden
WriteLiteral(" <span");
WriteLiteral(" ");
WriteLiteral("(<span");
WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_ComputerName\"");
WriteLiteral(">");
#line 267 "..\..\Views\User\UserParts\_Subject.cshtml"
Write(assignment.Device.ComputerName);
#line default
#line hidden
WriteLiteral("</span>)");
WriteLiteral("\r\n");
#line 268 "..\..\Views\User\UserParts\_Subject.cshtml"
}
#line default
#line hidden
WriteLiteral(" </td>\r\n " +
" </tr>\r\n");
#line 271 "..\..\Views\User\UserParts\_Subject.cshtml"
#line default
#line hidden
#line 271 "..\..\Views\User\UserParts\_Subject.cshtml"
if (!string.IsNullOrEmpty(assignment.Device.AssetNumber))
{
#line default
#line hidden
WriteLiteral(@" <tr>
<td>Asset:</td>
<td>
<span");
WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_Asset\"");
WriteLiteral(">");
#line 279 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 276 "..\..\Views\User\UserParts\_Subject.cshtml"
Write(assignment.Device.AssetNumber);
#line default
#line hidden
WriteLiteral("</span>\r\n");
WriteLiteral("</span>\r\n </td>\r\n " +
" </tr>\r\n");
#line 279 "..\..\Views\User\UserParts\_Subject.cshtml"
}
#line default
#line hidden
WriteLiteral(" ");
#line 280 "..\..\Views\User\UserParts\_Subject.cshtml"
}
else
{
if (assignment.Device.DeviceModelId.HasValue)
{
#line default
#line hidden
WriteLiteral(" <span");
WriteLiteral(@" <tr>
<td>Model:
</td>
<td>
<span");
WriteLiteral(" class=\"smallMessage\"");
WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_Model\"");
WriteLiteral(">Unknown</span>\r\n");
WriteLiteral(">");
#line 284 "..\..\Views\User\UserParts\_Subject.cshtml"
}
#line 286 "..\..\Views\User\UserParts\_Subject.cshtml"
Write(assignment.Device.DeviceModel.ToString());
#line default
#line hidden
WriteLiteral(@" </td>
</tr>
<tr>
<td>Assigned:</td>
WriteLiteral("</span>\r\n </td>\r\n " +
" </tr>\r\n");
#line 289 "..\..\Views\User\UserParts\_Subject.cshtml"
}
#line default
#line hidden
WriteLiteral(@" <tr>
<td>Profile:
</td>
<td>
<span");
WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_Profile\"");
WriteLiteral(">");
#line 294 "..\..\Views\User\UserParts\_Subject.cshtml"
Write(assignment.Device.DeviceProfile.ToString());
#line default
#line hidden
WriteLiteral("</span>\r\n </td>\r\n " +
" </tr>\r\n");
#line 297 "..\..\Views\User\UserParts\_Subject.cshtml"
#line default
#line hidden
#line 297 "..\..\Views\User\UserParts\_Subject.cshtml"
if (assignment.Device.DeviceBatchId.HasValue)
{
#line default
#line hidden
WriteLiteral(@" <tr>
<td>Batch:
</td>
<td>
<span");
WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_Batch\"");
WriteLiteral(">");
#line 303 "..\..\Views\User\UserParts\_Subject.cshtml"
Write(assignment.Device.DeviceBatch.ToString());
#line default
#line hidden
WriteLiteral("</span>\r\n </td>\r\n " +
" </tr>\r\n");
#line 306 "..\..\Views\User\UserParts\_Subject.cshtml"
}
#line default
#line hidden
WriteLiteral(" <tr>\r\n " +
" <td>Assigned:</td>\r\n " +
" <td>\r\n <" +
"span");
WriteLiteral(" class=\"User_Show_AssignedDevices_CurrentAssignment_Assigned\"");
WriteLiteral(">");
#line 290 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 310 "..\..\Views\User\UserParts\_Subject.cshtml"
Write(CommonHelpers.FriendlyDate(assignment.AssignedDate));
@@ -989,7 +1082,7 @@ WriteLiteral(@"</span>
");
#line 297 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 317 "..\..\Views\User\UserParts\_Subject.cshtml"
}
}
else
@@ -1005,7 +1098,7 @@ WriteLiteral(" class=\"smallMessage\"");
WriteLiteral(">No Current Device Assignments</span>\r\n");
#line 302 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 322 "..\..\Views\User\UserParts\_Subject.cshtml"
}
@@ -1015,7 +1108,7 @@ WriteLiteral(" </div>\r\n </div>\r\n
"\r\n");
#line 306 "..\..\Views\User\UserParts\_Subject.cshtml"
#line 326 "..\..\Views\User\UserParts\_Subject.cshtml"
}