-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Item tracking improvements #11919
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Item tracking improvements #11919
Changes from all commits
Commits
Show all changes
64 commits
Select commit
Hold shift + click to select a range
41d0143
Adding TrackedReferencesController
elit0451 528ad1c
Adding/changing views
elit0451 0392f3d
Adding/Editing js files
elit0451 42e4a58
RelationService changes
elit0451 ebdc6a1
RelationRepository changes
elit0451 be70d92
Adding missing translations
elit0451 29672dc
Adding/Modifying tests
elit0451 3193670
Beginning of #9125 migration
elit0451 ad91a7d
Introducing a new component + refactoring based on that
elit0451 6ab4a3e
Abstracting + refactoring
elit0451 9da356a
Work on content unpublishing
elit0451 dab2384
Work on media.delete
elit0451 c7a42d4
Various small changes
elit0451 66eab0b
Beginning of #9119 migration
elit0451 3505c4b
Changes on content.delete
elit0451 b081f60
Various fixes
elit0451 fa3f8e2
Merge branch 'v9/dev' into v9/feature/item-tracking
elit0451 815ab04
Adding new keys used in the listview bulk actions
elit0451 36d2f8d
Adding methods to get the items used in relations from array of ids
elit0451 9477500
Adding the checkLinkedItems function to the trackedReferencesResource
elit0451 706fbb0
Passing the selected items from a listview to unpublish and delete
elit0451 f7b8ef1
Adding umb-tracked-references-listview
elit0451 d2bf55a
Adding umb-tracked-references-listview-table with language column
elit0451 f67ca53
Fixes for tracked references
elit0451 ec1ff97
Changes in listview unpublish dialog
elit0451 44e86d1
Changes in listview delete dialog
elit0451 03bfebf
Removing Variants logic as it is not currently supported
elit0451 3710890
Visual fixes
elit0451 74c1c75
Merge remote-tracking branch 'origin/v9/dev' into v9/feature/item-tra…
elit0451 7d71122
Closing dialogs on click
elit0451 7754781
Fix wording
elit0451 094eb8a
Fix breaking changes
elit0451 ead8da3
Merge remote-tracking branch 'origin/v9/dev' into v9/feature/item-tra…
elit0451 14a2459
Change to a single title "Items in use" instead of 2 different for Co…
elit0451 c6dbbe7
No need for obsoleting because we can change new controllers
elit0451 ee0135f
Return ActionResult from actions
elit0451 ed585ae
Merge remote-tracking branch 'origin/v9/dev' into v9/feature/item-tra…
elit0451 e185610
V9: Prevent delete or unpublish of items that have references (#12047)
elit0451 53fe129
V9: Displaying descendants in use as part of item tracking (#12039)
elit0451 f50eb90
rename busfy to busy
nielslyngsoe c992b31
Merge remote-tracking branch 'origin/v9/dev' into v9/feature/item-tra…
nielslyngsoe dd92898
always show references
nielslyngsoe 7846f7b
rearrange for scrollbar to appear at the edge of the dialog
nielslyngsoe 4fee8a9
use the word referenced instead of used
nielslyngsoe 3f9c4e7
change fallback texts
nielslyngsoe d54a07c
Added "IsDependency" to relation types
bergmania a4a4445
Merge remote-tracking branch 'origin/v9/feature/item-tracking' into v…
bergmania cf4db21
refactor of umb-tracked-references
nielslyngsoe 798b43b
rename checkLinkedItems to getPagedReferencedItems
nielslyngsoe 8fce67b
rename check to load, to be consistent with the rest.
nielslyngsoe 342d380
Merge remote-tracking branch 'origin/v9/feature/item-tracking' into v…
bergmania d606f36
Refactored backend . Needs frontend fixes
bergmania 28de6d1
Cleanup
bergmania 9cbc24a
Use filters
bergmania eaa9e8c
Front-end refactor to match refactored end-points
nielslyngsoe 9d020e5
Fixed bug + warning
bergmania fb57ef4
Fixed query (more then 2100 descensdants) and optimized it (using nes…
bergmania c2238cb
remove comment
nielslyngsoe 5a41d3e
hideNoneDependencies including varying text for the configuration
nielslyngsoe c5154c9
Merge branch 'v9/feature/item-tracking-refactor' of https://github.co…
nielslyngsoe 89abb29
Hack for SqlCE :(
bergmania 36226fd
some final adjustments for item tracking ui
nielslyngsoe ba044f2
Unbreak change
bergmania 1e25256
Merge remote-tracking branch 'origin/v9/feature/item-tracking-refacto…
bergmania File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| using System; | ||
| using System.Runtime.Serialization; | ||
| using Umbraco.Cms.Core.Models.Entities; | ||
|
|
||
| namespace Umbraco.Cms.Core.Models | ||
| { | ||
| [DataContract(Name = "relationItem", Namespace = "")] | ||
| public class RelationItem | ||
| { | ||
| [DataMember(Name = "id")] | ||
| public int NodeId { get; set; } | ||
|
|
||
| [DataMember(Name = "key")] | ||
| public Guid NodeKey { get; set; } | ||
|
|
||
| [DataMember(Name = "name")] | ||
| public string NodeName { get; set; } | ||
|
|
||
| [DataMember(Name = "type")] | ||
| public string NodeType { get; set; } | ||
|
|
||
| [DataMember(Name = "udi")] | ||
| public Udi NodeUdi => Udi.Create(NodeType, NodeKey); | ||
|
|
||
| [DataMember(Name = "icon")] | ||
| public string ContentTypeIcon { get; set; } | ||
|
|
||
| [DataMember(Name = "alias")] | ||
| public string ContentTypeAlias { get; set; } | ||
|
|
||
| [DataMember(Name = "contentTypeName")] | ||
| public string ContentTypeName { get; set; } | ||
|
|
||
| [DataMember(Name = "relationTypeName")] | ||
| public string RelationTypeName { get; set; } | ||
|
|
||
| [DataMember(Name = "relationTypeIsBidirectional")] | ||
| public bool RelationTypeIsBidirectional { get; set; } | ||
|
|
||
| [DataMember(Name = "relationTypeIsDependency")] | ||
| public bool RelationTypeIsDependency { get; set; } | ||
|
|
||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/Umbraco.Core/Persistence/Repositories/IRelationRepository.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
src/Umbraco.Core/Persistence/Repositories/ITrackedReferencesRepository.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| using System; | ||
| using System.Collections.Generic; | ||
| using Umbraco.Cms.Core.Models; | ||
| using Umbraco.Cms.Core.Models.Entities; | ||
|
|
||
| namespace Umbraco.Cms.Core.Persistence.Repositories | ||
| { | ||
| public interface ITrackedReferencesRepository | ||
| { | ||
| IEnumerable<RelationItem> GetPagedRelationsForItems(int[] ids, long pageIndex, int pageSize, bool filterMustBeIsDependency,out long totalRecords); | ||
| IEnumerable<RelationItem> GetPagedItemsWithRelations(int[] ids, long pageIndex, int pageSize, bool filterMustBeIsDependency,out long totalRecords); | ||
| IEnumerable<RelationItem> GetPagedDescendantsInReferences(int parentId, long pageIndex, int pageSize, bool filterMustBeIsDependency,out long totalRecords); | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| using Umbraco.Cms.Core.Models; | ||
|
|
||
| namespace Umbraco.Cms.Core.Services | ||
| { | ||
| public interface ITrackedReferencesService | ||
| { | ||
| PagedResult<RelationItem> GetPagedRelationsForItems(int[] ids, long pageIndex, int pageSize, bool filterMustBeIsDependency); | ||
|
|
||
|
|
||
| PagedResult<RelationItem> GetPagedDescendantsInReferences(int parentId, long pageIndex, int pageSize, bool filterMustBeIsDependency); | ||
|
|
||
|
|
||
| PagedResult<RelationItem> GetPagedItemsWithRelations(int[] ids, long pageIndex, int pageSize, bool filterMustBeIsDependency); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
...raco.Infrastructure/Migrations/Upgrade/V_9_4_0/UpdateRelationTypesToHandleDependencies.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| using System.Linq; | ||
| using Umbraco.Cms.Infrastructure.Persistence.Dtos; | ||
| using Umbraco.Extensions; | ||
|
|
||
|
|
||
| namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_9_4_0 | ||
| { | ||
| internal class UpdateRelationTypesToHandleDependencies : MigrationBase | ||
| { | ||
| public UpdateRelationTypesToHandleDependencies(IMigrationContext context) | ||
| : base(context) | ||
| { | ||
| } | ||
|
|
||
| protected override void Migrate() | ||
| { | ||
| var columns = SqlSyntax.GetColumnsInSchema(Context.Database).ToList(); | ||
|
|
||
| AddColumnIfNotExists<RelationTypeDto>(columns, "isDependency"); | ||
|
|
||
| var aliasesWithDependencies = new[] | ||
| { | ||
| Core.Constants.Conventions.RelationTypes.RelatedDocumentAlias, | ||
| Core.Constants.Conventions.RelationTypes.RelatedMediaAlias | ||
| }; | ||
|
|
||
| Database.Execute( | ||
| Sql() | ||
| .Update<RelationTypeDto>(u => u.Set(x => x.IsDependency, true)) | ||
| .WhereIn<RelationTypeDto>(x => x.Alias, aliasesWithDependencies)); | ||
|
|
||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.