diff --git a/Disco.BI/Properties/AssemblyInfo.cs b/Disco.BI/Properties/AssemblyInfo.cs index fa692972..98594c03 100644 --- a/Disco.BI/Properties/AssemblyInfo.cs +++ b/Disco.BI/Properties/AssemblyInfo.cs @@ -32,10 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -<<<<<<< HEAD [assembly: AssemblyVersion("1.2.0430.1219")] -[assembly: AssemblyFileVersion("1.2.0430.1219")] -======= -[assembly: AssemblyVersion("1.2.0411.1608")] -[assembly: AssemblyFileVersion("1.2.0411.1608")] ->>>>>>> origin/Repository-Monitor +[assembly: AssemblyFileVersion("1.2.0430.1219")] \ No newline at end of file diff --git a/Disco.Client/Properties/AssemblyInfo.cs b/Disco.Client/Properties/AssemblyInfo.cs index f8d18446..312128e4 100644 --- a/Disco.Client/Properties/AssemblyInfo.cs +++ b/Disco.Client/Properties/AssemblyInfo.cs @@ -32,10 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -<<<<<<< HEAD [assembly: AssemblyVersion("1.2.0429.1616")] -[assembly: AssemblyFileVersion("1.2.0429.1616")] -======= -[assembly: AssemblyVersion("1.2.0411.1608")] -[assembly: AssemblyFileVersion("1.2.0411.1608")] ->>>>>>> origin/Repository-Monitor +[assembly: AssemblyFileVersion("1.2.0429.1616")] \ No newline at end of file diff --git a/Disco.ClientBootstrapper/Properties/AssemblyInfo.cs b/Disco.ClientBootstrapper/Properties/AssemblyInfo.cs index fcdfcfdd..e9afa829 100644 --- a/Disco.ClientBootstrapper/Properties/AssemblyInfo.cs +++ b/Disco.ClientBootstrapper/Properties/AssemblyInfo.cs @@ -32,10 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -<<<<<<< HEAD [assembly: AssemblyVersion("1.2.0426.1841")] -[assembly: AssemblyFileVersion("1.2.0426.1841")] -======= -[assembly: AssemblyVersion("1.2.0411.1608")] -[assembly: AssemblyFileVersion("1.2.0411.1608")] ->>>>>>> origin/Repository-Monitor +[assembly: AssemblyFileVersion("1.2.0426.1841")] \ No newline at end of file diff --git a/Disco.Data/Properties/AssemblyInfo.cs b/Disco.Data/Properties/AssemblyInfo.cs index 750b4bbb..8ed97915 100644 --- a/Disco.Data/Properties/AssemblyInfo.cs +++ b/Disco.Data/Properties/AssemblyInfo.cs @@ -32,10 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -<<<<<<< HEAD [assembly: AssemblyVersion("1.2.0430.1219")] -[assembly: AssemblyFileVersion("1.2.0430.1219")] -======= -[assembly: AssemblyVersion("1.2.0411.1608")] -[assembly: AssemblyFileVersion("1.2.0411.1608")] ->>>>>>> origin/Repository-Monitor +[assembly: AssemblyFileVersion("1.2.0430.1219")] \ No newline at end of file diff --git a/Disco.Data/Repository/DiscoDataContext.cs b/Disco.Data/Repository/DiscoDataContext.cs index fb2acfb4..3fcdd193 100644 --- a/Disco.Data/Repository/DiscoDataContext.cs +++ b/Disco.Data/Repository/DiscoDataContext.cs @@ -76,17 +76,10 @@ namespace Disco.Data.Repository // Notify before changes are committed var changes = Monitor.RepositoryMonitor.BeforeSaveChanges(this); -<<<<<<< HEAD - changeCount = base.SaveChanges(); - - if (changes.Length > 0) - { -======= if (changes.Length > 0) { changeCount = base.SaveChanges(); ->>>>>>> origin/Repository-Monitor // Notify after changes are committed Monitor.RepositoryMonitor.AfterSaveChanges(this, changes); } diff --git a/Disco.Data/Repository/Monitor/RepositoryMonitor.cs b/Disco.Data/Repository/Monitor/RepositoryMonitor.cs index dec1cf51..543606ef 100644 --- a/Disco.Data/Repository/Monitor/RepositoryMonitor.cs +++ b/Disco.Data/Repository/Monitor/RepositoryMonitor.cs @@ -23,17 +23,7 @@ namespace Disco.Data.Repository.Monitor internal static RepositoryMonitorEvent[] BeforeSaveChanges(DiscoDataContext dbContext) { var contextStateManager = ((IObjectContextAdapter)dbContext).ObjectContext.ObjectStateManager; -<<<<<<< HEAD - //var changes = contextStateManager.GetObjectStateEntries(System.Data.EntityState.Added).Concat(contextStateManager.GetObjectStateEntries(System.Data.EntityState.Deleted)).Concat(contextStateManager.GetObjectStateEntries(System.Data.EntityState.Modified)); - dbContext.ChangeTracker.DetectChanges(); - - var events = dbContext.ChangeTracker.Entries().Where(e => e.State != System.Data.EntityState.Unchanged && e.State != System.Data.EntityState.Detached).Select(entryState => - { - var monitorEvent = EventFromEntryState(dbContext, entryState, contextStateManager.GetObjectStateEntry(entryState.Entity)); - // Push to Stream - streamBefore.OnNext(monitorEvent); -======= var changes = contextStateManager.GetObjectStateEntries(System.Data.EntityState.Added).Concat(contextStateManager.GetObjectStateEntries(System.Data.EntityState.Deleted)).Concat(contextStateManager.GetObjectStateEntries(System.Data.EntityState.Modified)); var events = changes.Select(entryState => @@ -43,7 +33,6 @@ namespace Disco.Data.Repository.Monitor // Push to Stream streamBefore.OnNext(monitorEvent); ->>>>>>> origin/Repository-Monitor return monitorEvent; }).ToArray(); @@ -91,28 +80,16 @@ namespace Disco.Data.Repository.Monitor var entryState = stateManager.GetObjectStateEntry(monitorEvent.Entity); monitorEvent.EntityKey = entryState.EntityKey.EntityKeyValues.Select(kv => kv.Value).ToArray(); } -<<<<<<< HEAD - - monitorEvent.afterCommit = true; - } - - internal static RepositoryMonitorEvent EventFromEntryState(DiscoDataContext dbContext, DbEntityEntry dbEntryState, ObjectStateEntry objectEntryState) -======= } internal static RepositoryMonitorEvent EventFromEntryState(ObjectStateEntry entryState) ->>>>>>> origin/Repository-Monitor { RepositoryMonitorEventType eventType; string[] modifiedProperties = null; object[] entityKey = null; Type entityType; -<<<<<<< HEAD - switch (dbEntryState.State) -======= switch (entryState.State) ->>>>>>> origin/Repository-Monitor { case System.Data.EntityState.Added: eventType = RepositoryMonitorEventType.Added; @@ -130,28 +107,6 @@ namespace Disco.Data.Repository.Monitor eventType = RepositoryMonitorEventType.Unchanged; break; default: -<<<<<<< HEAD - throw new NotSupportedException(string.Format("Database Entry State not supported: {0}", dbEntryState.State.ToString())); - } - - entityType = EntityTypeFromProxy(dbEntryState.Entity.GetType()); - - // Only pass modified properties on Modified Event (Ignore Added/Deleted) - if (eventType == RepositoryMonitorEventType.Modified) - modifiedProperties = objectEntryState.GetModifiedProperties().ToArray(); - - // Don't pass entity key when entity newly added - if (eventType != RepositoryMonitorEventType.Added) - entityKey = objectEntryState.EntityKey.EntityKeyValues.Select(kv => kv.Value).ToArray(); - - return new RepositoryMonitorEvent() - { - dbEntityState = dbEntryState, - objectEntryState = objectEntryState, - dbContext = dbContext, - EventType = eventType, - Entity = dbEntryState.Entity, -======= throw new NotSupportedException(string.Format("Database Entry State not supported: {0}", entryState.State.ToString())); } @@ -169,7 +124,6 @@ namespace Disco.Data.Repository.Monitor { EventType = eventType, Entity = entryState.Entity, ->>>>>>> origin/Repository-Monitor EntityKey = entityKey, EntityType = entityType, ModifiedProperties = modifiedProperties diff --git a/Disco.Data/Repository/Monitor/RepositoryMonitorEvent.cs b/Disco.Data/Repository/Monitor/RepositoryMonitorEvent.cs index 8914080e..cf3cc5ca 100644 --- a/Disco.Data/Repository/Monitor/RepositoryMonitorEvent.cs +++ b/Disco.Data/Repository/Monitor/RepositoryMonitorEvent.cs @@ -1,11 +1,8 @@ using Newtonsoft.Json; using System; using System.Collections.Generic; -<<<<<<< HEAD using System.Data.Entity.Infrastructure; using System.Data.Objects; -======= ->>>>>>> origin/Repository-Monitor using System.Linq; using System.Text; using System.Threading.Tasks; @@ -14,7 +11,6 @@ namespace Disco.Data.Repository.Monitor { public class RepositoryMonitorEvent { -<<<<<<< HEAD [JsonIgnore] internal ObjectStateEntry objectEntryState { get; set; } [JsonIgnore] @@ -25,8 +21,6 @@ namespace Disco.Data.Repository.Monitor [JsonIgnore] public DiscoDataContext dbContext { get; set; } -======= ->>>>>>> origin/Repository-Monitor public RepositoryMonitorEventType EventType { get; set; } [JsonIgnore] @@ -46,7 +40,6 @@ namespace Disco.Data.Repository.Monitor public object[] EntityKey { get; set; } public string[] ModifiedProperties { get; set; } -<<<<<<< HEAD public T GetPreviousPropertyValue(string PropertyName) { @@ -59,7 +52,5 @@ namespace Disco.Data.Repository.Monitor { return (T)dbEntityState.CurrentValues[PropertyName]; } -======= ->>>>>>> origin/Repository-Monitor } } diff --git a/Disco.Models/Properties/AssemblyInfo.cs b/Disco.Models/Properties/AssemblyInfo.cs index 6642216b..39b89013 100644 --- a/Disco.Models/Properties/AssemblyInfo.cs +++ b/Disco.Models/Properties/AssemblyInfo.cs @@ -32,10 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -<<<<<<< HEAD [assembly: AssemblyVersion("1.2.0430.1219")] -[assembly: AssemblyFileVersion("1.2.0430.1219")] -======= -[assembly: AssemblyVersion("1.2.0411.1608")] -[assembly: AssemblyFileVersion("1.2.0411.1608")] ->>>>>>> origin/Repository-Monitor +[assembly: AssemblyFileVersion("1.2.0430.1219")] \ No newline at end of file diff --git a/Disco.Services/Properties/AssemblyInfo.cs b/Disco.Services/Properties/AssemblyInfo.cs index 3732a436..dfa4bac3 100644 --- a/Disco.Services/Properties/AssemblyInfo.cs +++ b/Disco.Services/Properties/AssemblyInfo.cs @@ -32,10 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -<<<<<<< HEAD [assembly: AssemblyVersion("1.2.0430.1219")] -[assembly: AssemblyFileVersion("1.2.0430.1219")] -======= -[assembly: AssemblyVersion("1.2.0411.1608")] -[assembly: AssemblyFileVersion("1.2.0411.1608")] ->>>>>>> origin/Repository-Monitor +[assembly: AssemblyFileVersion("1.2.0430.1219")] \ No newline at end of file diff --git a/Disco.Web.Extensions/Properties/AssemblyInfo.cs b/Disco.Web.Extensions/Properties/AssemblyInfo.cs index 0b5dab92..af707973 100644 --- a/Disco.Web.Extensions/Properties/AssemblyInfo.cs +++ b/Disco.Web.Extensions/Properties/AssemblyInfo.cs @@ -32,10 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -<<<<<<< HEAD [assembly: AssemblyVersion("1.2.0430.1219")] -[assembly: AssemblyFileVersion("1.2.0430.1219")] -======= -[assembly: AssemblyVersion("1.2.0411.1608")] -[assembly: AssemblyFileVersion("1.2.0411.1608")] ->>>>>>> origin/Repository-Monitor +[assembly: AssemblyFileVersion("1.2.0430.1219")] \ No newline at end of file diff --git a/Disco.Web/Properties/AssemblyInfo.cs b/Disco.Web/Properties/AssemblyInfo.cs index 7e14a89b..e9dd8032 100644 --- a/Disco.Web/Properties/AssemblyInfo.cs +++ b/Disco.Web/Properties/AssemblyInfo.cs @@ -31,10 +31,5 @@ using System.Runtime.InteropServices; // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -<<<<<<< HEAD [assembly: AssemblyVersion("1.2.0430.1219")] -[assembly: AssemblyFileVersion("1.2.0430.1219")] -======= -[assembly: AssemblyVersion("1.2.0411.1608")] -[assembly: AssemblyFileVersion("1.2.0411.1608")] ->>>>>>> origin/Repository-Monitor +[assembly: AssemblyFileVersion("1.2.0430.1219")] \ No newline at end of file diff --git a/Disco.Web/Views/Job/JobParts/Resources.cshtml b/Disco.Web/Views/Job/JobParts/Resources.cshtml index 49870b9a..bd32dd8b 100644 --- a/Disco.Web/Views/Job/JobParts/Resources.cshtml +++ b/Disco.Web/Views/Job/JobParts/Resources.cshtml @@ -20,169 +20,6 @@ -<<<<<<< HEAD -======= - ->>>>>>> origin/Repository-Monitor
diff --git a/Disco.Web/Views/Job/JobParts/Resources.generated.cs b/Disco.Web/Views/Job/JobParts/Resources.generated.cs index ed019ffd..e548c2c5 100644 --- a/Disco.Web/Views/Job/JobParts/Resources.generated.cs +++ b/Disco.Web/Views/Job/JobParts/Resources.generated.cs @@ -167,193 +167,7 @@ WriteLiteral(">\r\n \r\n
\r\n \r\n \r\n \r\n \r\n $(function () {\r\n var jobId = parseInt(\'"); - - - #line 25 "..\..\Views\Job\JobParts\Resources.cshtml" - Write(Model.Job.Id); - - - #line default - #line hidden -WriteLiteral("\');\r\n $Comments = $(\'#Comments\');\r\n $Commen" + -"tOutput = $Comments.find(\'.commentOutput\');\r\n $CommentOutputC" + -"ontainer = $Comments.find(\'.commentOutputContainer\');\r\n $Comm" + -"entInput = $Comments.find(\'textarea.commentInput\');\r\n\r\n windo" + -"w.setTimeout(function () {\r\n $CommentOutput[0].scrollTop " + -"= $CommentOutput[0].scrollHeight; // Scroll to Bottom\r\n }, 0)" + -";\r\n $(\'#jobDetailTabs\').on(\'tabsactivate\', function (event, u" + -"i) {\r\n if (ui.newPanel && ui.newPanel.is(\'#jobDetailTab-R" + -"esources\')) {\r\n $CommentOutput[0].scrollTop = $Commen" + -"tOutput[0].scrollHeight; // Scroll to Bottom\r\n }\r\n " + -" });\r\n\r\n $Comments.find(\'.commentInputPost\').clic" + -"k(postComment);\r\n $CommentInput.keypress(function (e) {\r\n " + -" if (e.which == 13 && !e.shiftKey) {\r\n " + -" postComment();\r\n return false;\r\n " + -" }\r\n });\r\n $CommentOutput.find(\'spa" + -"n.remove\').click(removePost);\r\n\r\n $dialogRemoveLog = $(\'#dial" + -"ogRemoveLog\');\r\n $dialogRemoveLog.dialog({\r\n " + -" resizable: false,\r\n height: 140,\r\n " + -" modal: true,\r\n autoOpen: false\r\n " + -" });\r\n\r\n function postComment() {\r\n " + -"var comment = $CommentInput.val();\r\n if (comment != \'\') {" + -"\r\n var data = { comment: comment }\r\n " + -" $.ajax({\r\n url: \'"); - - - #line 62 "..\..\Views\Job\JobParts\Resources.cshtml" - Write(Url.Action(MVC.API.Job.CommentPost(Model.Job.Id, null))); - - - #line default - #line hidden -WriteLiteral("\',\r\n dataType: \'json\',\r\n " + -" data: data,\r\n success: function (d) {\r\n " + -" if (d.Result == \'OK\') {\r\n " + -" // Should be added via Repository Notifications\r\n " + -" // addComment(d.Comment, false);\r\n " + -" $CommentInput.val(\'\').attr(\'disabled\', false).focus();\r\n " + -" } else {\r\n " + -" alert(\'Unable to post comment: \' + d.Result);\r\n " + -" $CommentInput.attr(\'disabled\', false);\r\n " + -" }\r\n },\r\n erro" + -"r: function (jqXHR, textStatus, errorThrown) {\r\n " + -" alert(\'Unable to post comment: \' + textStatus);\r\n " + -" $CommentInput.attr(\'disabled\', false);\r\n " + -" }\r\n });\r\n }\r\n " + -" }\r\n function removePost() {\r\n $thi" + -"s = $(this);\r\n var data = { id: $this.closest(\'div\').attr" + -"(\'data-logid\') };\r\n\r\n $dialogRemoveLog.dialog(\"enable\");\r" + -"\n $dialogRemoveLog.dialog(\'option\', \'buttons\', {\r\n " + -" \"Remove\": function () {\r\n $d" + -"ialogRemoveLog.dialog(\"disable\");\r\n $dialogRemove" + -"Log.dialog(\"option\", \"buttons\", null);\r\n $.ajax({" + -"\r\n url: \'"); - - - #line 92 "..\..\Views\Job\JobParts\Resources.cshtml" - Write(Url.Action(MVC.API.Job.CommentRemove())); - - - #line default - #line hidden -WriteLiteral("\',\r\n dataType: \'json\',\r\n " + -" data: data,\r\n success: function" + -" (d) {\r\n if (d == \'OK\') {\r\n " + -" // Should be removed via Repository Notifications\r" + -"\n //$this.closest(\'div\').slideUp(300)" + -".delay(300).queue(function () {\r\n // " + -" $(this).remove();\r\n //});\r\n " + -" } else {\r\n " + -" alert(\'Unable to remove comment: \' + d);\r\n " + -" }\r\n $dialogRemoveLog.dialog(\"clo" + -"se\");\r\n },\r\n " + -" error: function (jqXHR, textStatus, errorThrown) {\r\n " + -" alert(\'Unable to remove comment: \' + textStatus);\r\n " + -" $dialogRemoveLog.dialog(\"close\");\r\n " + -" }\r\n });\r\n " + -" },\r\n \"Cancel\": function () {\r\n " + -" $dialogRemoveLog.dialog(\"close\");\r\n }\r\n" + -" });\r\n\r\n $dialogRemoveLog.dialog(\'" + -"open\');\r\n\r\n return false;\r\n }\r\n " + -" function loadLiveComment(id) {\r\n $.ajax({\r\n " + -" url: \'"); - - - #line 123 "..\..\Views\Job\JobParts\Resources.cshtml" - Write(Url.Action(MVC.API.Job.Comment())); - - - #line default - #line hidden -WriteLiteral(@"', - dataType: 'json', - data: { id: id }, - success: function (d) { - if (d && d.JobId == jobId) { - addComment(d, false); - } - }, - error: function (jqXHR, textStatus, errorThrown) { - alert('Unable to load live comment ' + id + ': ' + textStatus); - } - }); - } - function addComment(c, quick) { - var e = $('
'); - e.attr('data-logid', c.Id); - e.find('.author').text(c.Author); - e.find('.timestamp').text(c.TimestampFuzzy).attr('title', c.TimestampFull); - e.find('.remove').click(removePost); - var eComment = e.find('.comment').text(c.Comments); - var commentHtml = eComment.text().replace(/\r\n|\r|\n/g, '
'); - commentHtml = commentHtml.replace(/\#(\d+)/g, ''); - eComment.html(commentHtml); - - $CommentOutput.append(e); - - if (!quick) { - e.animate({ backgroundColor: '#ffff99' }, 500, function () { - e.animate({ backgroundColor: '#f4f4f4' }, 500); - }); - $CommentOutput.animate({ scrollTop: $CommentOutput[0].scrollHeight }, 250) - } - } - - // Sign up for Live Events - function liveMessageRecieved(d) { - if (d) { - switch (d.EventType) { - case 0: // Added - loadLiveComment(d.EntityKey[0]); - break; - case 1: // Removed - $CommentOutput.children('div[data-logid=""' + d.EntityKey[0] + '""]').slideUp(300).delay(300).queue(function () { - $(this).remove(); - }); - break; - } - } - } - var liveMessagesConnection = $.connection('"); - - - #line 172 "..\..\Views\Job\JobParts\Resources.cshtml" - Write(Url.Content("~/API/Repository/Notifications")); - - - #line default - #line hidden -WriteLiteral(@"') - liveMessagesConnection.received(liveMessageRecieved); - liveMessagesConnection.error(function (e) { - alert('Error: ' + JSON.stringify(e)); - }); - liveMessagesConnection.start(function () { - liveMessagesConnection.send('/addToGroups:JobLog'); - }); - - }); - - - >>>>>> origin/Repository-Monitor WriteLiteral(" id=\"Attachments\""); @@ -364,21 +178,13 @@ WriteLiteral(" class=\"attachmentOutput\""); WriteLiteral(">\r\n"); -<<<<<<< HEAD #line 26 "..\..\Views\Job\JobParts\Resources.cshtml" -======= - #line 186 "..\..\Views\Job\JobParts\Resources.cshtml" ->>>>>>> origin/Repository-Monitor #line default #line hidden -<<<<<<< HEAD #line 26 "..\..\Views\Job\JobParts\Resources.cshtml" -======= - #line 186 "..\..\Views\Job\JobParts\Resources.cshtml" ->>>>>>> origin/Repository-Monitor foreach (var ja in Model.Job.JobAttachments) { @@ -387,7 +193,6 @@ WriteLiteral(">\r\n"); #line hidden WriteLiteral("