Skip to content

Commit 03da1de

Browse files
Merge pull request #3 from jamf/individual-add-and-deletes
Individual add and deletes
2 parents 22504e7 + 195e711 commit 03da1de

31 files changed

+675
-248
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# SPDX-License-Identifier: MIT
22
# Copyright 2024, Jamf
33

4-
* @HarryStrandJamf @BIG-RAT @KapnKerk @mjKosmic @rydgecrakerjamf @jamf/apple-natives-write
4+
* @jamf/jamf_sync-maintainer

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [1.3.0] - 2024-05-08
8+
### Features
9+
- Added buttons below the source and destination distribution point to allow local files to be added or removed directly to/from the distribution point.
10+
- Added the ability to copy selected log messages to the clipboard.
11+
- Added support for mpkg files.
12+
### Bug fixes
13+
- Changed the timeout for uploads to an hour to solve an issue with large uploads. This does not solve the issue with files > 5 GB that are uploaded to a JCDS2 DP.
14+
- Fixed an issue with the "Cloud" DP type where the file progress wasn't quite right.
15+
716
## [1.2.0] - 2024-04-16
817
### Features
918
- Added the ability to use the v1/packages endpoint on Jamf Pro version 11.5 and above, which includes the ablity to upload files to any cloud instance that Jamf Pro supports. It shows up as a distribution point called "Cloud", but only for the destination since there isn't a way to download those files at this time.

Jamf Sync.xcodeproj/project.pbxproj

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
840A79032ACB75FC00161D85 /* SavableItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 840A79022ACB75FC00161D85 /* SavableItem.swift */; };
1212
840A79072ACC8EFF00161D85 /* FolderInstance.swift in Sources */ = {isa = PBXBuildFile; fileRef = 840A79062ACC8EFF00161D85 /* FolderInstance.swift */; };
1313
840A79092ACD9B0A00161D85 /* ConfirmationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 840A79082ACD9B0A00161D85 /* ConfirmationView.swift */; };
14+
8412279F2BEADBB20097B83E /* XmlErrorParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8412279E2BEADBB20097B83E /* XmlErrorParser.swift */; };
15+
841227A12BEADD6E0097B83E /* XmlErrorParserTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 841227A02BEADD6E0097B83E /* XmlErrorParserTests.swift */; };
1416
841DE9D92BA395900092DBE7 /* Jamf Sync User Guide.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 841DE9D82BA395900092DBE7 /* Jamf Sync User Guide.pdf */; };
1517
843BE0F62AEFE6350053431B /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 843BE0F52AEFE6350053431B /* Assets.xcassets */; };
1618
844CF9D12AC4B96600576E1A /* FolderDp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 844CF9D02AC4B96600576E1A /* FolderDp.swift */; };
@@ -113,6 +115,8 @@
113115
840A79022ACB75FC00161D85 /* SavableItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SavableItem.swift; sourceTree = "<group>"; };
114116
840A79062ACC8EFF00161D85 /* FolderInstance.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FolderInstance.swift; sourceTree = "<group>"; };
115117
840A79082ACD9B0A00161D85 /* ConfirmationView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConfirmationView.swift; sourceTree = "<group>"; };
118+
8412279E2BEADBB20097B83E /* XmlErrorParser.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XmlErrorParser.swift; sourceTree = "<group>"; };
119+
841227A02BEADD6E0097B83E /* XmlErrorParserTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XmlErrorParserTests.swift; sourceTree = "<group>"; };
116120
841DE9D82BA395900092DBE7 /* Jamf Sync User Guide.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; path = "Jamf Sync User Guide.pdf"; sourceTree = "<group>"; };
117121
841DE9DA2BA395F00092DBE7 /* User Guide */ = {isa = PBXFileReference; lastKnownFileType = folder; path = "User Guide"; sourceTree = "<group>"; };
118122
843BE0F52AEFE6350053431B /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
@@ -292,6 +296,7 @@
292296
846499DC2B699F5E00A8EA7B /* Mocks */,
293297
846499E32B6B080B00A8EA7B /* SynchronizeTaskTests.swift */,
294298
846499D22B64165E00A8EA7B /* TestErrors.swift */,
299+
841227A02BEADD6E0097B83E /* XmlErrorParserTests.swift */,
295300
);
296301
path = JamfSyncTests;
297302
sourceTree = "<group>";
@@ -378,6 +383,7 @@
378383
84E489982B5AC80600FFFE59 /* UserSettings.swift */,
379384
84FC415F2AD5A78C00DCB033 /* View+NSWindow.swift */,
380385
849FC3402BD06A43008BAC02 /* VersionInfo.swift */,
386+
8412279E2BEADBB20097B83E /* XmlErrorParser.swift */,
381387
);
382388
path = Utility;
383389
sourceTree = "<group>";
@@ -585,6 +591,7 @@
585591
849FC3412BD06A43008BAC02 /* VersionInfo.swift in Sources */,
586592
84E489992B5AC80600FFFE59 /* UserSettings.swift in Sources */,
587593
84BC6E472AC380D200CF6D39 /* JamfProServerView.swift in Sources */,
594+
8412279F2BEADBB20097B83E /* XmlErrorParser.swift in Sources */,
588595
84E489932B58681D00FFFE59 /* LogMessageView.swift in Sources */,
589596
84DD58372BC58E0D00E8DA23 /* JamfProPackageApi.swift in Sources */,
590597
84DD583B2BC5C2A700E8DA23 /* URL+isDirectory.swift in Sources */,
@@ -632,6 +639,7 @@
632639
isa = PBXSourcesBuildPhase;
633640
buildActionMask = 2147483647;
634641
files = (
642+
841227A12BEADD6E0097B83E /* XmlErrorParserTests.swift in Sources */,
635643
846499E02B699FB500A8EA7B /* MockJamfProInstance.swift in Sources */,
636644
846499DE2B699F8E00A8EA7B /* MockDistributionPoint.swift in Sources */,
637645
846499D52B64268A00A8EA7B /* DistributionPointTests.swift in Sources */,
@@ -813,7 +821,7 @@
813821
"@executable_path/../Frameworks",
814822
);
815823
MACOSX_DEPLOYMENT_TARGET = 14.0;
816-
MARKETING_VERSION = 1.2.0;
824+
MARKETING_VERSION = 1.3.0;
817825
PRODUCT_BUNDLE_IDENTIFIER = com.jamf.jamfsync;
818826
PRODUCT_NAME = "$(TARGET_NAME)";
819827
SWIFT_EMIT_LOC_STRINGS = YES;
@@ -845,7 +853,7 @@
845853
"@executable_path/../Frameworks",
846854
);
847855
MACOSX_DEPLOYMENT_TARGET = 14.0;
848-
MARKETING_VERSION = 1.2.0;
856+
MARKETING_VERSION = 1.3.0;
849857
PRODUCT_BUNDLE_IDENTIFIER = com.jamf.jamfsync;
850858
PRODUCT_NAME = "$(TARGET_NAME)";
851859
SWIFT_EMIT_LOC_STRINGS = YES;

Jamf Sync.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

JamfSync/Model/DataModel.swift

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ class DataModel: ObservableObject {
3030
@Published var dpsForDestination: [DistributionPoint] = []
3131
@Published var selectedSrcDpId = DataModel.noSelection
3232
@Published var selectedDstDpId = DataModel.noSelection
33-
@Published var selectedDpFiles: Set<DpFile.ID> = []
3433
@Published var forceSync = false
3534
@Published var showSpinner = false
3635
@Published var shouldPromptForDpPassword = false
@@ -175,30 +174,21 @@ class DataModel: ObservableObject {
175174
return synchronizationInProgress || selectedSrcDpId == DataModel.noSelection || selectedDstDpId == DataModel.noSelection || selectedSrcDpId == selectedDstDpId
176175
}
177176

178-
func adjustSelectedItems() {
179-
var idsToAdd: [UUID] = []
180-
var idsToRemove: [UUID] = []
181-
for id in selectedDpFiles {
182-
if let dstFile = dstPackageListViewModel.dpFiles.findDpFileViewModel(id: id) {
183-
if let srcFile = srcPackageListViewModel.dpFiles.findDpFile(name: dstFile.dpFile.name) {
184-
idsToAdd.append(srcFile.id)
185-
}
186-
idsToRemove.append(dstFile.id)
187-
}
188-
}
189-
for id in idsToAdd {
190-
selectedDpFiles.insert(id)
191-
}
192-
for id in idsToRemove {
193-
selectedDpFiles.remove(id)
194-
}
195-
}
196-
197177
func verifySelectedItemsStillExist() {
198178
verifySrcSelectedItemsStillExist()
199179
verifyDstSelectedItemsStillExist()
200180
}
201181

182+
func selectedDpFilesFromSelectionIds(packageListViewModel: PackageListViewModel) -> [DpFile] {
183+
var selectedFiles: [DpFile] = []
184+
for id in packageListViewModel.selectedDpFiles {
185+
if let viewModel = packageListViewModel.dpFiles.findDpFileViewModel(id: id) {
186+
selectedFiles.append(viewModel.dpFile)
187+
}
188+
}
189+
return selectedFiles
190+
}
191+
202192
// MARK: Private functions
203193

204194
private func updateDpsForSourceAndDestination() {

0 commit comments

Comments
 (0)