Fix various Multi-Domain bugs
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using Disco.Data.Repository;
|
||||
using Disco.Models.Repository;
|
||||
using Disco.Services.Interop.ActiveDirectory;
|
||||
using System;
|
||||
namespace Disco.BI.DocumentTemplateBI
|
||||
{
|
||||
@@ -65,10 +66,14 @@ namespace Disco.BI.DocumentTemplateBI
|
||||
}
|
||||
public DocumentUniqueIdentifier(string TemplateTypeId, string DataId, string CreatorId, DateTime TimeStamp, int? Page = null, string Tag = null)
|
||||
{
|
||||
var creatorId = (string.IsNullOrEmpty(CreatorId) || CreatorId.IndexOf('\\') > -1)
|
||||
? CreatorId
|
||||
: string.Format(@"{0}\{1}", ActiveDirectory.PrimaryDomain.NetBiosName, CreatorId);
|
||||
|
||||
this.Tag = Tag;
|
||||
this.TemplateTypeId = TemplateTypeId;
|
||||
this.DataId = DataId;
|
||||
this.CreatorId = CreatorId;
|
||||
this.CreatorId = creatorId;
|
||||
this.TimeStamp = TimeStamp;
|
||||
this.Page = Page ?? 0;
|
||||
}
|
||||
@@ -93,7 +98,11 @@ namespace Disco.BI.DocumentTemplateBI
|
||||
}
|
||||
if (s.Length >= 5)
|
||||
{
|
||||
this.CreatorId = s[4];
|
||||
var creatorId = s[4];
|
||||
if (!string.IsNullOrWhiteSpace(creatorId) && creatorId.IndexOf('\\') < 0)
|
||||
creatorId = string.Format(@"{0}\{1}", ActiveDirectory.PrimaryDomain.NetBiosName, creatorId);
|
||||
|
||||
this.CreatorId = creatorId;
|
||||
}
|
||||
if (s.Length >= 6)
|
||||
{
|
||||
@@ -180,6 +189,12 @@ namespace Disco.BI.DocumentTemplateBI
|
||||
}
|
||||
break;
|
||||
case DocumentTemplate.DocumentTemplateScopes.User:
|
||||
|
||||
// Patch for existing documents (before DBv13 - Multi-Domain Support)
|
||||
// Add default domain to User Ids
|
||||
if (this.DataId.IndexOf('\\') < 0)
|
||||
this.DataId = string.Format(@"{0}\{1}", ActiveDirectory.PrimaryDomain.NetBiosName, this.DataId);
|
||||
|
||||
User u = Database.Users.Find(this.DataId);
|
||||
if (u != null)
|
||||
{
|
||||
|
||||
@@ -409,7 +409,7 @@ namespace Disco.BI.Interop.Pdf
|
||||
pdfPagesAssigned.Add(PageNumber, new Tuple<DocumentUniqueIdentifier, byte[]>(docId, pageResult.AttachmentThumbnailImage.ToArray()));
|
||||
|
||||
docId.LoadComponents(Database);
|
||||
DocumentImporterLog.LogImportPageDetected(SessionId, PageNumber, docId.DocumentUniqueId, docId.DocumentTemplate.Description, docId.DocumentTemplate.Scope, docId.DataId, docId.DataDescription);
|
||||
DocumentImporterLog.LogImportPageDetected(SessionId, PageNumber, docId.TemplateTypeId, docId.DocumentTemplate.Description, docId.DocumentTemplate.Scope, docId.DataId, docId.DataDescription);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -32,6 +32,15 @@ namespace Disco.Models.Repository
|
||||
|
||||
[NotMapped, Obsolete("Should be using Combined Domain\\User format - UserId")]
|
||||
public string Id
|
||||
{
|
||||
get
|
||||
{
|
||||
return DomainUsername;
|
||||
}
|
||||
}
|
||||
|
||||
[NotMapped]
|
||||
public string DomainUsername
|
||||
{
|
||||
get
|
||||
{
|
||||
|
||||
@@ -294,7 +294,7 @@ namespace Disco.Web.Areas.API.Controllers
|
||||
if (invalidSubjects.Count > 0)
|
||||
throw new ArgumentException(string.Format("Subjects not found: {0}", string.Join(", ", invalidSubjects)), "Subjects");
|
||||
|
||||
var proposedSubjects = subjects.Select(s => s.Item2.SamAccountName).OrderBy(s => s).ToArray();
|
||||
var proposedSubjects = subjects.Select(s => s.Item2.NetBiosId).OrderBy(s => s).ToArray();
|
||||
|
||||
subjectIds = string.Join(",", proposedSubjects);
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace Disco.Web.Areas.API.Models.JobQueue
|
||||
{
|
||||
return new Models.JobQueue.SubjectItem()
|
||||
{
|
||||
Id = ADObject.SamAccountName,
|
||||
Id = ADObject.NetBiosId,
|
||||
Name = ADObject.DisplayName,
|
||||
Type = ADObject is ActiveDirectoryGroup ? "group" : "user"
|
||||
};
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace Disco.Web.Areas.Config.Models.JobQueue
|
||||
{
|
||||
var item = new SubjectDescriptor()
|
||||
{
|
||||
Id = ADObject.SamAccountName,
|
||||
Id = ADObject.NetBiosId,
|
||||
Name = ADObject.DisplayName
|
||||
};
|
||||
|
||||
|
||||
@@ -168,13 +168,18 @@
|
||||
self.assignedDataUrl = ko.computed(function () {
|
||||
var t = self.assignedDataType();
|
||||
var dId = self.assignedDataId();
|
||||
switch (t) {
|
||||
case 'Device':
|
||||
return urlDeviceShow + dId;
|
||||
case 'Job':
|
||||
return urlJobShow + dId;
|
||||
case 'User':
|
||||
return urlUserShow + dId;
|
||||
if (dId !== undefined) {
|
||||
switch (t) {
|
||||
case 'Device':
|
||||
return urlDeviceShow + dId;
|
||||
case 'Job':
|
||||
return urlJobShow + dId;
|
||||
case 'User':
|
||||
if (dId.indexOf('\\') < 0)
|
||||
return urlUserShow + dId;
|
||||
else
|
||||
return urlUserShow + dId.substr(dId.indexOf('\\') + 1) + '?domain=' + dId.substr(0, dId.indexOf('\\'));
|
||||
}
|
||||
}
|
||||
return null;
|
||||
});
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.34011
|
||||
// Runtime Version:4.0.30319.34014
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -354,77 +354,81 @@ WriteLiteral("\';\r\n var isLive = false;\r\n\r\n function pageVie
|
||||
" {\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 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 return urlUserShow + dId;\r\n" +
|
||||
" }\r\n return null;\r\n });\r\n se" +
|
||||
"lf.thumbnailUrl = ko.computed(function () {\r\n var enabled = self." +
|
||||
"thumbnailEnabled();\r\n if (enabled > 0) {\r\n ret" +
|
||||
"urn \'url(\' + urlPageThumbnail + \'?SessionId=\' + self.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.Arguments && log.Arguments.length " +
|
||||
"> 0) {\r\n // find session\r\n var sessionId = log.Arg" +
|
||||
"uments[0];\r\n var session = vm.sessionIndex[sessionId];\r\n " +
|
||||
" if (!session && log.EventTypeId === 10) { // Starting Session (Ignore \'pa" +
|
||||
"rtial\' sessions)\r\n session = new sessionViewModel(log.Argumen" +
|
||||
"ts[1]);\r\n vm.sessionIndex[sessionId] = 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.FormattedTimestamp.substring(log.For" +
|
||||
"mattedTimestamp.indexOf(\' \') + 1));\r\n break;\r\n " +
|
||||
" case 11: // SessionProgress\r\n sessio" +
|
||||
"n.progressValue(log.Arguments[1]);\r\n session.progress" +
|
||||
"Status(log.Arguments[2]);\r\n break;\r\n " +
|
||||
" case 12: // SessionFinished\r\n session.sessionE" +
|
||||
"nded(true);\r\n session.progressStatus(\'Import Finished" +
|
||||
"\');\r\n break;\r\n case 15: // Ses" +
|
||||
"sionWarning\r\n session.messages.unshift(log);\r\n " +
|
||||
" break;\r\n case 16: // SessionError\r\n " +
|
||||
" session.messages.unshift(log);\r\n " +
|
||||
" break;\r\n case 100: // ImportPageStarting\r\n " +
|
||||
" session.addSessionPage(new sessionPageViewModel(sessionId, l" +
|
||||
"og.Arguments[1]));\r\n break;\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: // Import" +
|
||||
"PageProgress\r\n var p = session.sessionPagesIndex[log." +
|
||||
"Arguments[1]];\r\n if (p) {\r\n " +
|
||||
" p.progressValue(log.Arguments[2]);\r\n p.prog" +
|
||||
"ressStatus(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.documentTem" +
|
||||
"plateId(log.Arguments[2]);\r\n p.documentTemplate(l" +
|
||||
"og.Arguments[3]);\r\n p.assignedDataType(log.Argume" +
|
||||
"nts[4]);\r\n p.assignedDataId(log.Arguments[5]);\r\n " +
|
||||
" p.assignedData(log.Arguments[6]);\r\n " +
|
||||
" p.detected(true);\r\n if (!isLive" +
|
||||
") {\r\n p.updateThumbnail();\r\n " +
|
||||
" }\r\n }\r\n ses" +
|
||||
"sion.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.updateThumbnail()" +
|
||||
";\r\n }\r\n }\r\n " +
|
||||
" session.messages.unshift(log);\r\n bre" +
|
||||
"ak;\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 // Cr" +
|
||||
"eate View Model\r\n vm = new pageViewModel();\r\n\r\n // Load Lo" +
|
||||
"gs\r\n var d = new Date();\r\n var loadData = {\r\n " +
|
||||
" Format: \"json\",\r\n Start: d.getFullYear() + \'-\' + (d.getMonth()" +
|
||||
" + 1) + \'-\' + d.getDate(),\r\n End: null,\r\n ModuleId" +
|
||||
": 40,\r\n Take: 2000\r\n };\r\n $.ajax({\r\n " +
|
||||
" url: \'");
|
||||
"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: \'");
|
||||
|
||||
|
||||
#line 283 "..\..\Areas\Config\Views\DocumentTemplate\ImportStatus.cshtml"
|
||||
#line 288 "..\..\Areas\Config\Views\DocumentTemplate\ImportStatus.cshtml"
|
||||
Write(Url.Action(MVC.API.Logging.RetrieveEvents()));
|
||||
|
||||
|
||||
@@ -453,7 +457,7 @@ WriteLiteral(@"',
|
||||
liveConnection = $.connection('");
|
||||
|
||||
|
||||
#line 303 "..\..\Areas\Config\Views\DocumentTemplate\ImportStatus.cshtml"
|
||||
#line 308 "..\..\Areas\Config\Views\DocumentTemplate\ImportStatus.cshtml"
|
||||
Write(Url.Content("~/API/Logging/Notifications"));
|
||||
|
||||
|
||||
@@ -462,7 +466,7 @@ WriteLiteral(@"',
|
||||
WriteLiteral("\', { addToGroups: \'");
|
||||
|
||||
|
||||
#line 303 "..\..\Areas\Config\Views\DocumentTemplate\ImportStatus.cshtml"
|
||||
#line 308 "..\..\Areas\Config\Views\DocumentTemplate\ImportStatus.cshtml"
|
||||
Write(Disco.BI.DocumentTemplateBI.Importer.DocumentImporterLog.Current.LiveLogGroupName);
|
||||
|
||||
|
||||
|
||||
@@ -429,7 +429,7 @@
|
||||
|
||||
$.ajax({
|
||||
url: '@Url.Action(MVC.API.JobQueue.Subject())',
|
||||
method: 'get',
|
||||
method: 'post',
|
||||
data: { Id: id }
|
||||
}).done(function (response) {
|
||||
if (response) {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.34011
|
||||
// Runtime Version:4.0.30319.34014
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -1373,53 +1373,53 @@ WriteLiteral("\',\r\n minLength:
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
WriteLiteral("\',\r\n method: \'get\',\r\n " +
|
||||
" data: { Id: id }\r\n }).done" +
|
||||
"(function (response) {\r\n if (response) {\r" +
|
||||
"\n if (list.find(\'li[data-subjectid=\"\'" +
|
||||
" + response.Id + \'\"]\').filter(\'[data-status!=\"removed\"]\').length == 0) {\r\n\r\n " +
|
||||
" var liIcon = $(\'<i>\').addClass(\'fa f" +
|
||||
"a-lg\');\r\n if (response.Type === \'" +
|
||||
"user\')\r\n liIcon.addClass(\'fa-" +
|
||||
"user\');\r\n else\r\n " +
|
||||
" liIcon.addClass(\'fa-users\');\r\n\r\n " +
|
||||
" var li = $(\'<li>\')\r\n " +
|
||||
" .append(liIcon)\r\n " +
|
||||
" .append($(\'<span>\').text(response.Id == response.Name ? response" +
|
||||
".Id : response.Name + \' [\' + response.Id + \']\'))\r\n " +
|
||||
" .append($(\'<i>\').addClass(\'fa fa-times-circle remove\'))\r\n " +
|
||||
" .addClass(response.Type)\r\n " +
|
||||
" .attr(\'data-subjectid\', respons" +
|
||||
"e.Id)\r\n .attr(\'data-subjectst" +
|
||||
"atus\', \'new\');\r\n\r\n list.append(li" +
|
||||
");\r\n\r\n updateNoSubjects();\r\n " +
|
||||
" } else {\r\n " +
|
||||
" alert(\'That subject has already been added\');\r\n " +
|
||||
" }\r\n } else {\r" +
|
||||
"\n alert(\'Unknown Id\');\r\n " +
|
||||
" }\r\n }).fail(functi" +
|
||||
"on (jqXHR, textStatus, errorThrown) {\r\n a" +
|
||||
"lert(\'Error: \' + errorThrown);\r\n });\r\n " +
|
||||
" }\r\n\r\n function updat" +
|
||||
"eNoSubjects() {\r\n if (list.find(\'li:visible\')" +
|
||||
".length > 0)\r\n noSubjects.hide();\r\n " +
|
||||
" else\r\n noSu" +
|
||||
"bjects.show();\r\n }\r\n\r\n " +
|
||||
" function saveChanges() {\r\n var form = $(" +
|
||||
"\'#Config_JobQueues_Subjects_Update_Dialog_Form\').empty();\r\n\r\n " +
|
||||
" list.find(\'li[data-subjectstatus!=\"removed\"]\').each(function ()" +
|
||||
" {\r\n var subjectId = $(this).attr(\'data-s" +
|
||||
"ubjectid\');\r\n\r\n form.append($(\'<input>\')." +
|
||||
"attr({\r\n \'name\': \'Subjects\',\r\n " +
|
||||
" \'type\': \'hidden\'\r\n " +
|
||||
" }).val(subjectId));\r\n\r\n }).get" +
|
||||
"();\r\n\r\n form.submit();\r\n\r\n " +
|
||||
" dialog.dialog(\"disable\");\r\n " +
|
||||
"dialog.dialog(\"option\", \"buttons\", null);\r\n }\r\n\r\n" +
|
||||
" $(function () {\r\n " +
|
||||
" $(\'#Config_JobQueues_Subjects_Update\').click(showDialog);\r\n " +
|
||||
" });\r\n\r\n })();\r\n " +
|
||||
" </script>\r\n </div>\r\n");
|
||||
WriteLiteral("\',\r\n method: \'post\',\r\n " +
|
||||
" data: { Id: id }\r\n }).don" +
|
||||
"e(function (response) {\r\n if (response) {" +
|
||||
"\r\n if (list.find(\'li[data-subjectid=\"" +
|
||||
"\' + response.Id + \'\"]\').filter(\'[data-status!=\"removed\"]\').length == 0) {\r\n\r\n " +
|
||||
" var liIcon = $(\'<i>\').addClass(\'fa " +
|
||||
"fa-lg\');\r\n if (response.Type === " +
|
||||
"\'user\')\r\n liIcon.addClass(\'fa" +
|
||||
"-user\');\r\n else\r\n " +
|
||||
" liIcon.addClass(\'fa-users\');\r\n\r\n " +
|
||||
" var li = $(\'<li>\')\r\n " +
|
||||
" .append(liIcon)\r\n " +
|
||||
" .append($(\'<span>\').text(response.Id == response.Name ? respons" +
|
||||
"e.Id : response.Name + \' [\' + response.Id + \']\'))\r\n " +
|
||||
" .append($(\'<i>\').addClass(\'fa fa-times-circle remove\'))\r\n" +
|
||||
" .addClass(response.Type)\r\n " +
|
||||
" .attr(\'data-subjectid\', respon" +
|
||||
"se.Id)\r\n .attr(\'data-subjects" +
|
||||
"tatus\', \'new\');\r\n\r\n list.append(l" +
|
||||
"i);\r\n\r\n updateNoSubjects();\r\n " +
|
||||
" } else {\r\n " +
|
||||
" alert(\'That subject has already been added\');\r\n " +
|
||||
" }\r\n } else {" +
|
||||
"\r\n alert(\'Unknown Id\');\r\n " +
|
||||
" }\r\n }).fail(funct" +
|
||||
"ion (jqXHR, textStatus, errorThrown) {\r\n " +
|
||||
"alert(\'Error: \' + errorThrown);\r\n });\r\n " +
|
||||
" }\r\n\r\n function upda" +
|
||||
"teNoSubjects() {\r\n if (list.find(\'li:visible\'" +
|
||||
").length > 0)\r\n noSubjects.hide();\r\n " +
|
||||
" else\r\n noS" +
|
||||
"ubjects.show();\r\n }\r\n\r\n " +
|
||||
" function saveChanges() {\r\n var form = $" +
|
||||
"(\'#Config_JobQueues_Subjects_Update_Dialog_Form\').empty();\r\n\r\n " +
|
||||
" list.find(\'li[data-subjectstatus!=\"removed\"]\').each(function (" +
|
||||
") {\r\n var subjectId = $(this).attr(\'data-" +
|
||||
"subjectid\');\r\n\r\n form.append($(\'<input>\')" +
|
||||
".attr({\r\n \'name\': \'Subjects\',\r\n " +
|
||||
" \'type\': \'hidden\'\r\n " +
|
||||
" }).val(subjectId));\r\n\r\n }).ge" +
|
||||
"t();\r\n\r\n form.submit();\r\n\r\n " +
|
||||
" dialog.dialog(\"disable\");\r\n " +
|
||||
" dialog.dialog(\"option\", \"buttons\", null);\r\n }\r\n\r" +
|
||||
"\n $(function () {\r\n " +
|
||||
" $(\'#Config_JobQueues_Subjects_Update\').click(showDialog);\r\n " +
|
||||
" });\r\n\r\n })();\r\n " +
|
||||
" </script>\r\n </div>\r\n");
|
||||
|
||||
|
||||
#line 499 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
||||
@@ -1613,15 +1613,15 @@ WriteLiteral(">\r\n");
|
||||
#line hidden
|
||||
WriteLiteral(" <div");
|
||||
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 28526), Tuple.Create("\"", 28548)
|
||||
, Tuple.Create(Tuple.Create("", 28531), Tuple.Create("trJobType", 28531), true)
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 28527), Tuple.Create("\"", 28549)
|
||||
, Tuple.Create(Tuple.Create("", 28532), Tuple.Create("trJobType", 28532), true)
|
||||
|
||||
#line 544 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 28540), Tuple.Create<System.Object, System.Int32>(jt.Id
|
||||
, Tuple.Create(Tuple.Create("", 28541), Tuple.Create<System.Object, System.Int32>(jt.Id
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 28540), false)
|
||||
, 28541), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" class=\"jobTypes\"");
|
||||
@@ -1629,29 +1629,29 @@ WriteLiteral(" class=\"jobTypes\"");
|
||||
WriteLiteral(">\r\n <h4>\r\n <inp" +
|
||||
"ut");
|
||||
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 28649), Tuple.Create("\"", 28668)
|
||||
, Tuple.Create(Tuple.Create("", 28654), Tuple.Create("Types_", 28654), true)
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 28650), Tuple.Create("\"", 28669)
|
||||
, Tuple.Create(Tuple.Create("", 28655), Tuple.Create("Types_", 28655), true)
|
||||
|
||||
#line 546 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 28660), Tuple.Create<System.Object, System.Int32>(jt.Id
|
||||
, Tuple.Create(Tuple.Create("", 28661), Tuple.Create<System.Object, System.Int32>(jt.Id
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 28660), false)
|
||||
, 28661), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" class=\"jobType\"");
|
||||
|
||||
WriteLiteral(" type=\"checkbox\"");
|
||||
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 28701), Tuple.Create("\"", 28717)
|
||||
WriteAttribute("value", Tuple.Create(" value=\"", 28702), Tuple.Create("\"", 28718)
|
||||
|
||||
#line 546 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 28709), Tuple.Create<System.Object, System.Int32>(jt.Id
|
||||
, Tuple.Create(Tuple.Create("", 28710), Tuple.Create<System.Object, System.Int32>(jt.Id
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 28709), false)
|
||||
, 28710), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" ");
|
||||
@@ -1665,15 +1665,15 @@ WriteLiteral(" ");
|
||||
#line hidden
|
||||
WriteLiteral(" /><label");
|
||||
|
||||
WriteAttribute("for", Tuple.Create(" for=\"", 28788), Tuple.Create("\"", 28808)
|
||||
, Tuple.Create(Tuple.Create("", 28794), Tuple.Create("Types_", 28794), true)
|
||||
WriteAttribute("for", Tuple.Create(" for=\"", 28789), Tuple.Create("\"", 28809)
|
||||
, Tuple.Create(Tuple.Create("", 28795), Tuple.Create("Types_", 28795), true)
|
||||
|
||||
#line 546 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 28800), Tuple.Create<System.Object, System.Int32>(jt.Id
|
||||
, Tuple.Create(Tuple.Create("", 28801), Tuple.Create<System.Object, System.Int32>(jt.Id
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 28800), false)
|
||||
, 28801), false)
|
||||
);
|
||||
|
||||
WriteLiteral(">");
|
||||
@@ -1687,15 +1687,15 @@ WriteLiteral(">");
|
||||
#line hidden
|
||||
WriteLiteral("</label></h4>\r\n <div");
|
||||
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 28876), Tuple.Create("\"", 28898)
|
||||
, Tuple.Create(Tuple.Create("", 28881), Tuple.Create("SubTypes_", 28881), true)
|
||||
WriteAttribute("id", Tuple.Create(" id=\"", 28877), Tuple.Create("\"", 28899)
|
||||
, Tuple.Create(Tuple.Create("", 28882), Tuple.Create("SubTypes_", 28882), true)
|
||||
|
||||
#line 547 "..\..\Areas\Config\Views\JobQueue\Show.cshtml"
|
||||
, Tuple.Create(Tuple.Create("", 28890), Tuple.Create<System.Object, System.Int32>(jt.Id
|
||||
, Tuple.Create(Tuple.Create("", 28891), Tuple.Create<System.Object, System.Int32>(jt.Id
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
, 28890), false)
|
||||
, 28891), false)
|
||||
);
|
||||
|
||||
WriteLiteral(" class=\"jobSubTypes\"");
|
||||
|
||||
@@ -505,22 +505,3 @@ span.fancytree-node.fancytree-selected {
|
||||
font-style: normal;
|
||||
background: none;
|
||||
}
|
||||
span.fancytree-checkbox {
|
||||
margin-left: 3px;
|
||||
background-position: -96px -32px;
|
||||
}
|
||||
span.fancytree-checkbox:hover {
|
||||
background-position: -96px -32px;
|
||||
}
|
||||
.fancytree-partsel span.fancytree-checkbox {
|
||||
background-position: -128px -32px;
|
||||
}
|
||||
.fancytree-partsel span.fancytree-checkbox:hover {
|
||||
background-position: -128px -32px;
|
||||
}
|
||||
.fancytree-selected span.fancytree-checkbox {
|
||||
background-position: -112px -32px;
|
||||
}
|
||||
.fancytree-selected span.fancytree-checkbox:hover {
|
||||
background-position: -112px -32px;
|
||||
}
|
||||
|
||||
@@ -40,29 +40,4 @@
|
||||
span.fancytree-node.fancytree-selected {
|
||||
font-style: normal;
|
||||
background: none;
|
||||
}
|
||||
|
||||
span.fancytree-checkbox {
|
||||
margin-left: 3px;
|
||||
background-position: -96px -32px;
|
||||
}
|
||||
|
||||
span.fancytree-checkbox:hover {
|
||||
background-position: -96px -32px;
|
||||
}
|
||||
|
||||
.fancytree-partsel span.fancytree-checkbox {
|
||||
background-position: -128px -32px;
|
||||
}
|
||||
|
||||
.fancytree-partsel span.fancytree-checkbox:hover {
|
||||
background-position: -128px -32px;
|
||||
}
|
||||
|
||||
.fancytree-selected span.fancytree-checkbox {
|
||||
background-position: -112px -32px;
|
||||
}
|
||||
|
||||
.fancytree-selected span.fancytree-checkbox:hover {
|
||||
background-position: -112px -32px;
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
+25
-18
@@ -869,6 +869,11 @@
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Index.cshtml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Views\Update\_ViewStart.generated.cs">
|
||||
<DependentUpon>_ViewStart.cshtml</DependentUpon>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<Compile Include="Views\User\Index.generated.cs">
|
||||
<DependentUpon>Index.cshtml</DependentUpon>
|
||||
<AutoGen>True</AutoGen>
|
||||
@@ -1181,6 +1186,12 @@
|
||||
<None Include="ClientSource\Style\Config.css">
|
||||
<DependentUpon>Config.less</DependentUpon>
|
||||
</None>
|
||||
<Content Include="ClientSource\Style\AppMaintenance.css">
|
||||
<DependentUpon>AppMaintenance.less</DependentUpon>
|
||||
</Content>
|
||||
<Content Include="ClientSource\Style\AppMaintenance.min.css">
|
||||
<DependentUpon>AppMaintenance.less</DependentUpon>
|
||||
</Content>
|
||||
<Content Include="ClientSource\Style\BundleSite.min.css">
|
||||
<DependentUpon>BundleSite.less</DependentUpon>
|
||||
</Content>
|
||||
@@ -1223,9 +1234,9 @@
|
||||
<None Include="ClientSource\Style\Dialog.css">
|
||||
<DependentUpon>Dialog.less</DependentUpon>
|
||||
</None>
|
||||
<Content Include="ClientSource\Style\Device.css">
|
||||
<None Include="ClientSource\Style\Device.css">
|
||||
<DependentUpon>Device.less</DependentUpon>
|
||||
</Content>
|
||||
</None>
|
||||
<Content Include="ClientSource\Style\Device.min.css">
|
||||
<DependentUpon>Device.less</DependentUpon>
|
||||
</Content>
|
||||
@@ -1256,24 +1267,23 @@
|
||||
<None Include="ClientSource\Style\Fancytree\ui.fancytree.less" />
|
||||
<None Include="ClientSource\Style\Fancytree\icons-DiscoMod.png" />
|
||||
<None Include="ClientSource\Style\Fancytree\icons-disco-shrunk.png" />
|
||||
<Content Include="ClientSource\Style\Fancytree\disco.fancytree.css">
|
||||
<None Include="ClientSource\Style\Fancytree\disco.fancytree.css">
|
||||
<DependentUpon>disco.fancytree.less</DependentUpon>
|
||||
</Content>
|
||||
</None>
|
||||
<Content Include="ClientSource\Style\Fancytree\disco.fancytree.min.css">
|
||||
<DependentUpon>disco.fancytree.less</DependentUpon>
|
||||
</Content>
|
||||
<Content Include="ClientSource\Style\Fancytree\ui.fancytree.min.css">
|
||||
<None Include="ClientSource\Style\Fancytree\ui.fancytree.min.css">
|
||||
<DependentUpon>ui.fancytree.less</DependentUpon>
|
||||
</Content>
|
||||
</None>
|
||||
<Content Include="ClientSource\Style\Images\AttachmentTypes\document.png" />
|
||||
<Content Include="ClientSource\Style\Images\AttachmentTypes\expressionBrowserIcons.png" />
|
||||
<Content Include="ClientSource\Style\Images\AttachmentTypes\image.png" />
|
||||
<Content Include="ClientSource\Style\Images\AttachmentTypes\pdf.png" />
|
||||
<Content Include="ClientSource\Style\Images\AttachmentTypes\unknown.png" />
|
||||
<None Include="ClientSource\Style\Images\BackgroundDocument.png" />
|
||||
<None Include="ClientSource\Style\Images\BackgroundInitialConfig.jpg" />
|
||||
<None Include="ClientSource\Style\Images\BackgroundPage.png" />
|
||||
<Content Include="ClientSource\Style\Images\BackgroundInitialHeading.jpg" />
|
||||
<Content Include="ClientSource\Style\Images\BackgroundInitial.jpg" />
|
||||
<Content Include="ClientSource\Style\Images\DeviceTypes\AppliancePC.png" />
|
||||
<Content Include="ClientSource\Style\Images\DeviceTypes\Desktop.png" />
|
||||
<Content Include="ClientSource\Style\Images\DeviceTypes\EnterpriseServer.png" />
|
||||
@@ -1284,18 +1294,11 @@
|
||||
<Content Include="ClientSource\Style\Images\DeviceTypes\Unknown.png" />
|
||||
<Content Include="ClientSource\Style\Images\DeviceTypes\Workstation.png" />
|
||||
<Content Include="ClientSource\Style\Images\Heading.png" />
|
||||
<Content Include="ClientSource\Style\Images\Heading64.png" />
|
||||
<Content Include="ClientSource\Style\Images\Status\fail32.png" />
|
||||
<None Include="ClientSource\Style\Images\Status\fileBroken256.png" />
|
||||
<None Include="ClientSource\Style\Images\Status\loading.gif" />
|
||||
<None Include="ClientSource\Style\Images\Status\progressBar.png" />
|
||||
<Content Include="ClientSource\Style\Images\Status\warning32.png" />
|
||||
<None Include="ClientSource\Style\InitialConfig.css">
|
||||
<DependentUpon>InitialConfig.less</DependentUpon>
|
||||
</None>
|
||||
<Content Include="ClientSource\Style\InitialConfig.min.css">
|
||||
<DependentUpon>InitialConfig.less</DependentUpon>
|
||||
</Content>
|
||||
<None Include="ClientSource\Style\IsotopeStyles.css" />
|
||||
<Content Include="ClientSource\Style\IsotopeStyles.min.css">
|
||||
<DependentUpon>IsotopeStyles.css</DependentUpon>
|
||||
@@ -1452,7 +1455,7 @@
|
||||
<Content Include="favicon.ico" />
|
||||
<Content Include="ClientSource\Style\FontAwesome\fontawesome-webfont.svg" />
|
||||
<Content Include="Global.asax" />
|
||||
<None Include="ClientSource\Style\InitialConfig.less" />
|
||||
<None Include="ClientSource\Style\AppMaintenance.less" />
|
||||
<None Include="ClientSource\Style\Dialog.less" />
|
||||
<None Include="ClientSource\Scripts\Core.js.bundle">
|
||||
<SubType>Designer</SubType>
|
||||
@@ -1569,10 +1572,10 @@
|
||||
<Generator>RazorGenerator</Generator>
|
||||
<LastGenOutput>_ViewStart.generated.cs</LastGenOutput>
|
||||
</None>
|
||||
<Content Include="Views\InitialConfig\Administrators.cshtml">
|
||||
<None Include="Views\InitialConfig\Administrators.cshtml">
|
||||
<Generator>RazorGenerator</Generator>
|
||||
<LastGenOutput>Administrators.generated.cs</LastGenOutput>
|
||||
</Content>
|
||||
</None>
|
||||
<None Include="Views\InitialConfig\_ViewStart.cshtml">
|
||||
<Generator>RazorGenerator</Generator>
|
||||
<LastGenOutput>_ViewStart.generated.cs</LastGenOutput>
|
||||
@@ -1896,6 +1899,10 @@
|
||||
<Generator>RazorGenerator</Generator>
|
||||
<LastGenOutput>Index.generated.cs</LastGenOutput>
|
||||
</None>
|
||||
<None Include="Views\Update\_ViewStart.cshtml">
|
||||
<Generator>RazorGenerator</Generator>
|
||||
<LastGenOutput>_ViewStart.generated.cs</LastGenOutput>
|
||||
</None>
|
||||
<None Include="Views\User\Index.cshtml">
|
||||
<Generator>RazorGenerator</Generator>
|
||||
<LastGenOutput>Index.generated.cs</LastGenOutput>
|
||||
|
||||
+7
-7
@@ -476,6 +476,10 @@ namespace Links
|
||||
private const string URLPATH = "~/ClientSource/Style";
|
||||
public static string Url() { return T4MVCHelpers.ProcessVirtualPath(URLPATH); }
|
||||
public static string Url(string fileName) { return T4MVCHelpers.ProcessVirtualPath(URLPATH + "/" + fileName); }
|
||||
public static readonly string AppMaintenance_less = Url("AppMaintenance.less");
|
||||
public static readonly string AppMaintenance_css = T4MVCHelpers.IsProduction() && T4Extensions.FileExists(URLPATH + "/AppMaintenance.min.css") ? Url("AppMaintenance.min.css") : Url("AppMaintenance.css");
|
||||
|
||||
public static readonly string AppMaintenance_min_css = Url("AppMaintenance.min.css");
|
||||
public static readonly string BundleSite_less = Url("BundleSite.less");
|
||||
public static readonly string BundleSite_css = T4MVCHelpers.IsProduction() && T4Extensions.FileExists(URLPATH + "/BundleSite.min.css") ? Url("BundleSite.min.css") : Url("BundleSite.css");
|
||||
|
||||
@@ -600,8 +604,7 @@ namespace Links
|
||||
}
|
||||
|
||||
public static readonly string BackgroundDocument_png = Url("BackgroundDocument.png");
|
||||
public static readonly string BackgroundInitialConfig_jpg = Url("BackgroundInitialConfig.jpg");
|
||||
public static readonly string BackgroundInitialHeading_jpg = Url("BackgroundInitialHeading.jpg");
|
||||
public static readonly string BackgroundInitial_jpg = Url("BackgroundInitial.jpg");
|
||||
public static readonly string BackgroundPage_png = Url("BackgroundPage.png");
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public static class DeviceTypes {
|
||||
@@ -620,7 +623,6 @@ namespace Links
|
||||
}
|
||||
|
||||
public static readonly string Heading_png = Url("Heading.png");
|
||||
public static readonly string Heading64_png = Url("Heading64.png");
|
||||
[GeneratedCode("T4MVC", "2.0"), DebuggerNonUserCode]
|
||||
public static class Status {
|
||||
private const string URLPATH = "~/ClientSource/Style/Images/Status";
|
||||
@@ -635,10 +637,6 @@ namespace Links
|
||||
|
||||
}
|
||||
|
||||
public static readonly string InitialConfig_less = Url("InitialConfig.less");
|
||||
public static readonly string InitialConfig_css = T4MVCHelpers.IsProduction() && T4Extensions.FileExists(URLPATH + "/InitialConfig.min.css") ? Url("InitialConfig.min.css") : Url("InitialConfig.css");
|
||||
|
||||
public static readonly string InitialConfig_min_css = Url("InitialConfig.min.css");
|
||||
public static readonly string IsotopeStyles_css = T4MVCHelpers.IsProduction() && T4Extensions.FileExists(URLPATH + "/IsotopeStyles.min.css") ? Url("IsotopeStyles.min.css") : Url("IsotopeStyles.css");
|
||||
|
||||
public static readonly string IsotopeStyles_min_css = Url("IsotopeStyles.min.css");
|
||||
@@ -2120,8 +2118,10 @@ namespace Disco.Web.Controllers
|
||||
public _ViewNamesClass ViewNames { get { return s_ViewNames; } }
|
||||
public class _ViewNamesClass
|
||||
{
|
||||
public readonly string _ViewStart = "_ViewStart";
|
||||
public readonly string Index = "Index";
|
||||
}
|
||||
public readonly string _ViewStart = "~/Views/Update/_ViewStart.cshtml";
|
||||
public readonly string Index = "~/Views/Update/Index.cshtml";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user