diff --git a/Installer/DBAdminToolkit.Setup.zip b/Installer/DBAdminToolkit.Setup.zip
index 88a77bf..b01bb14 100644
Binary files a/Installer/DBAdminToolkit.Setup.zip and b/Installer/DBAdminToolkit.Setup.zip differ
diff --git a/README.md b/README.md
index 89f121a..7400611 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
![Dropbox Business Admin Toolkit](https://dl.dropboxusercontent.com/u/354544978/MKTG-DEMO/static/dropbox_s.png)
-## Release 6.0
+## Release 6.0.1
## Features
diff --git a/Source/DBAdminToolkit.Setup/DBAdminToolkit.Setup.vdproj b/Source/DBAdminToolkit.Setup/DBAdminToolkit.Setup.vdproj
index 95a9e31..ae99ec8 100644
--- a/Source/DBAdminToolkit.Setup/DBAdminToolkit.Setup.vdproj
+++ b/Source/DBAdminToolkit.Setup/DBAdminToolkit.Setup.vdproj
@@ -1072,7 +1072,7 @@
"RemovePreviousVersions" = "11:TRUE"
"DetectNewerInstalledVersion" = "11:TRUE"
"InstallAllUsers" = "11:FALSE"
- "ProductVersion" = "8:6.0.0"
+ "ProductVersion" = "8:6.0.1"
"Manufacturer" = "8:Dropbox Enterprise Services"
"ARPHELPTELEPHONE" = "8:"
"ARPHELPLINK" = "8:"
diff --git a/Source/DfBAdminToolkit.Common/Properties/AssemblyInfo.cs b/Source/DfBAdminToolkit.Common/Properties/AssemblyInfo.cs
index 9708512..c86ac6e 100644
--- a/Source/DfBAdminToolkit.Common/Properties/AssemblyInfo.cs
+++ b/Source/DfBAdminToolkit.Common/Properties/AssemblyInfo.cs
@@ -32,5 +32,5 @@
// 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.*")]
-[assembly: AssemblyVersion("6.0.0.0")]
-[assembly: AssemblyFileVersion("6.0.0.0")]
+[assembly: AssemblyVersion("6.0.1.0")]
+[assembly: AssemblyFileVersion("6.0.1.0")]
diff --git a/Source/DfBAdminToolkit/App.config b/Source/DfBAdminToolkit/App.config
index 16f3409..38db222 100644
--- a/Source/DfBAdminToolkit/App.config
+++ b/Source/DfBAdminToolkit/App.config
@@ -10,7 +10,7 @@
-
+
diff --git a/Source/DfBAdminToolkit/ConfigBackup/DfBAdminToolkit.exe.config b/Source/DfBAdminToolkit/ConfigBackup/DfBAdminToolkit.exe.config
index c90d535..3a526fb 100644
--- a/Source/DfBAdminToolkit/ConfigBackup/DfBAdminToolkit.exe.config
+++ b/Source/DfBAdminToolkit/ConfigBackup/DfBAdminToolkit.exe.config
@@ -10,7 +10,7 @@
-
+
diff --git a/Source/DfBAdminToolkit/Install Config/DfBAdminToolkit.exe.config b/Source/DfBAdminToolkit/Install Config/DfBAdminToolkit.exe.config
index 0915172..4f09d2f 100644
--- a/Source/DfBAdminToolkit/Install Config/DfBAdminToolkit.exe.config
+++ b/Source/DfBAdminToolkit/Install Config/DfBAdminToolkit.exe.config
@@ -10,7 +10,7 @@
-
+
diff --git a/Source/DfBAdminToolkit/Presenter/TeamAuditingPresenter.cs b/Source/DfBAdminToolkit/Presenter/TeamAuditingPresenter.cs
index 923f110..1e4970f 100644
--- a/Source/DfBAdminToolkit/Presenter/TeamAuditingPresenter.cs
+++ b/Source/DfBAdminToolkit/Presenter/TeamAuditingPresenter.cs
@@ -127,13 +127,13 @@ private void GetEvents(ITeamAuditingModel model, ITeamAuditingView view, IMainPr
}
dynamic actorType = null;
string actorTypeString = string.Empty;
+ dynamic emailObj = null;
+ string email = string.Empty;
if (events["actor"][".tag"] != null)
{
actorType = events["actor"][".tag"];
actorTypeString = actorType.Value as string;
- }
- dynamic emailObj = null;
- string email = string.Empty;
+ }
if (actorTypeString == "user")
{
//non team member check first
@@ -151,18 +151,27 @@ private void GetEvents(ITeamAuditingModel model, ITeamAuditingView view, IMainPr
}
if (actorTypeString == "admin")
{
- emailObj = events["actor"]["app"]["display_name"];
- email = emailObj;
+ if (events["actor"]["admin"]["display_name"] != null)
+ {
+ emailObj = events["actor"]["admin"]["display_name"];
+ email = emailObj;
+ }
}
if (actorTypeString == "app")
{
- emailObj = events["actor"]["app"]["display_name"];
- email = emailObj;
+ if (events["actor"]["app"]["display_name"] != null)
+ {
+ emailObj = events["actor"]["app"]["display_name"];
+ email = emailObj;
+ }
}
if (actorTypeString == "reseller")
{
- emailObj = events["actor"]["reseller"]["reseller_name"];
- email = emailObj;
+ if (events["actor"]["reseller"]["reseller_name"] != null)
+ {
+ emailObj = events["actor"]["reseller"]["reseller_name"];
+ email = emailObj;
+ }
}
if (actorTypeString == "dropbox")
{
@@ -180,8 +189,11 @@ private void GetEvents(ITeamAuditingModel model, ITeamAuditingView view, IMainPr
if (contextTypeString == "team_member")
{
- contextObj = events["context"]["email"];
- context = contextObj.Value as string;
+ if (events["context"]["email"] != null)
+ {
+ contextObj = events["context"]["email"];
+ context = contextObj.Value as string;
+ }
}
if (contextTypeString == "non_team_member")
{
@@ -443,13 +455,13 @@ private void GetEvents(ITeamAuditingModel model, ITeamAuditingView view, IMainPr
}
dynamic actorType = null;
string actorTypeString = string.Empty;
+ dynamic emailObj = null;
+ string email = string.Empty;
if (events["actor"][".tag"] != null)
{
actorType = events["actor"][".tag"];
actorTypeString = actorType.Value as string;
}
- dynamic emailObj = null;
- string email = string.Empty;
if (actorTypeString == "user")
{
//non team member check first
@@ -467,18 +479,27 @@ private void GetEvents(ITeamAuditingModel model, ITeamAuditingView view, IMainPr
}
if (actorTypeString == "admin")
{
- emailObj = events["actor"]["app"]["display_name"];
- email = emailObj;
+ if (events["actor"]["admin"]["display_name"] != null)
+ {
+ emailObj = events["actor"]["admin"]["display_name"];
+ email = emailObj;
+ }
}
if (actorTypeString == "app")
{
- emailObj = events["actor"]["app"]["display_name"];
- email = emailObj;
+ if (events["actor"]["app"]["display_name"] != null)
+ {
+ emailObj = events["actor"]["app"]["display_name"];
+ email = emailObj;
+ }
}
if (actorTypeString == "reseller")
{
- emailObj = events["actor"]["reseller"]["reseller_name"];
- email = emailObj;
+ if (events["actor"]["reseller"]["reseller_name"] != null)
+ {
+ emailObj = events["actor"]["reseller"]["reseller_name"];
+ email = emailObj;
+ }
}
if (actorTypeString == "dropbox")
{
@@ -493,11 +514,14 @@ private void GetEvents(ITeamAuditingModel model, ITeamAuditingView view, IMainPr
{
contextTypeObj = events["context"][".tag"];
contextTypeString = contextTypeObj.Value as string;
-
+
if (contextTypeString == "team_member")
{
- contextObj = events["context"]["email"];
- context = contextObj.Value as string;
+ if (events["context"]["email"] != null)
+ {
+ contextObj = events["context"]["email"];
+ context = contextObj.Value as string;
+ }
}
if (contextTypeString == "non_team_member")
{
@@ -671,8 +695,6 @@ private void GetEvents(ITeamAuditingModel model, ITeamAuditingView view, IMainPr
{
timestamp = timestampObj;
}
-
-
if (region != "Unknown" || region != "")
{
region = FileUtil.ConvertStateToAbbreviation(region);
@@ -722,6 +744,8 @@ private void GetEvents(ITeamAuditingModel model, ITeamAuditingView view, IMainPr
EventCount++;
}
}
+ hasMore = jsonDataCont["has_more"];
+ cursor = jsonDataCont["cursor"];
}
}
}
@@ -871,7 +895,7 @@ private void OnCommandFilterMembers(object sender, EventArgs e)
{
newAudit = new List();
newAudit = view.RenderTeamAuditingFilteredMemberList(members, model.TeamAuditing, newAudit);
- presenter.UpdateProgressInfo("Filtering complete.");
+ presenter.UpdateProgressInfo("Filtering complete. Events loaded [" + newAudit.Count + "]");
presenter.ActivateSpinner(false);
presenter.EnableControl(true);
}, null);
diff --git a/Source/DfBAdminToolkit/Presenter/TeamHealthPresenter.cs b/Source/DfBAdminToolkit/Presenter/TeamHealthPresenter.cs
index e6cbaff..43c2bd2 100644
--- a/Source/DfBAdminToolkit/Presenter/TeamHealthPresenter.cs
+++ b/Source/DfBAdminToolkit/Presenter/TeamHealthPresenter.cs
@@ -132,28 +132,78 @@ private void RefreshHealth(ITeamHealthModel model, IMainPresenter presenter)
activityStartDate = jsonData["start_date"];
if (jsonData["adds"][0] != null)
{
- int addsCount = (jsonData["adds"].Count) - 2;
- adds = jsonData["adds"][addsCount];
+ int availableData = 1;
+ bool complete = false;
+ while (!complete)
+ {
+ if (((jsonData["adds"].Count) - availableData) != null)
+ {
+ int addsCount = (jsonData["adds"].Count) - availableData;
+ adds = jsonData["adds"][addsCount];
+ complete = true;
+ }
+ availableData++;
+ }
}
if (jsonData["edits"][0] != null)
{
- int editsCount = (jsonData["edits"].Count) - 2;
- edits = jsonData["edits"][editsCount];
+ int availableData = 1;
+ bool complete = false;
+ while (!complete)
+ {
+ if (((jsonData["edits"].Count) - availableData) != null)
+ {
+ int editsCount = (jsonData["edits"].Count) - availableData;
+ edits = jsonData["edits"][editsCount];
+ complete = true;
+ }
+ availableData++;
+ }
}
if (jsonData["deletes"][0] != null)
{
- int deletesCount = (jsonData["deletes"].Count) - 2;
- deletes = jsonData["deletes"][deletesCount];
+ int availableData = 1;
+ bool complete = false;
+ while (!complete)
+ {
+ if (((jsonData["deletes"].Count) - availableData) != null)
+ {
+ int deletesCount = (jsonData["deletes"].Count) - availableData;
+ deletes = jsonData["deletes"][deletesCount];
+ complete = true;
+ }
+ availableData++;
+ }
}
if (jsonData["active_shared_folders_7_day"][0] != null)
{
- int activeSharedCount = (jsonData["active_shared_folders_7_day"].Count) - 2;
- activeSharedFolders7Day = jsonData["active_shared_folders_7_day"][activeSharedCount];
+ int availableData = 1;
+ bool complete = false;
+ while (!complete)
+ {
+ if (((jsonData["active_shared_folders_7_day"].Count) - availableData) != null)
+ {
+ int activeSharedCount = (jsonData["active_shared_folders_7_day"].Count) - availableData;
+ activeSharedFolders7Day = jsonData["active_shared_folders_7_day"][activeSharedCount];
+ complete = true;
+ }
+ availableData++;
+ }
}
if (jsonData["active_users_7_day"][0] != null)
{
- int activeUsers = (jsonData["active_users_7_day"].Count) - 2;
- activeUsers7Day = jsonData["active_users_7_day"][activeUsers];
+ int availableData = 1;
+ bool complete = false;
+ while (!complete)
+ {
+ if (((jsonData["active_users_7_day"].Count) - availableData) != null)
+ {
+ int activeUsers = (jsonData["active_users_7_day"].Count) - availableData;
+ activeUsers7Day = jsonData["active_users_7_day"][activeUsers];
+ complete = true;
+ }
+ availableData++;
+ }
}
model.Adds = adds.ToString();
model.Edits = edits.ToString();
@@ -171,41 +221,111 @@ private void RefreshHealth(ITeamHealthModel model, IMainPresenter presenter)
devicesStartDate = jsonData["start_date"];
if (jsonData["active_7_day"] != null)
- {
+ {
if (jsonData["active_7_day"]["windows"][0] != null)
{
- int windowsUsers = (jsonData["active_7_day"]["windows"].Count) - 2;
- windows = jsonData["active_7_day"]["windows"][windowsUsers];
+ int availableData = 1;
+ bool complete = false;
+ while (!complete)
+ {
+ if (((jsonData["active_7_day"]["windows"].Count) - availableData) != null)
+ {
+ int windowsUsers = (jsonData["active_7_day"]["windows"].Count) - availableData;
+ windows = jsonData["active_7_day"]["windows"][windowsUsers];
+ complete = true;
+ }
+ availableData++;
+ }
}
if (jsonData["active_7_day"]["macos"][0] != null)
{
- int macosUsers = (jsonData["active_7_day"]["macos"].Count) - 2;
- macos = jsonData["active_7_day"]["macos"][macosUsers];
+ int availableData = 1;
+ bool complete = false;
+ while (!complete)
+ {
+ if (((jsonData["active_7_day"]["macos"].Count) - availableData) != null)
+ {
+ int macosUsers = (jsonData["active_7_day"]["macos"].Count) - availableData;
+ macos = jsonData["active_7_day"]["macos"][macosUsers];
+ complete = true;
+ }
+ availableData++;
+ }
}
if (jsonData["active_7_day"]["linux"][0] != null)
{
- int linuxUsers = (jsonData["active_7_day"]["linux"].Count) - 2;
- linux = jsonData["active_7_day"]["linux"][linuxUsers];
+ int availableData = 1;
+ bool complete = false;
+ while (!complete)
+ {
+ if (((jsonData["active_7_day"]["linux"].Count) - availableData) != null)
+ {
+ int linuxUsers = (jsonData["active_7_day"]["linux"].Count) - availableData;
+ linux = jsonData["active_7_day"]["linux"][linuxUsers];
+ complete = true;
+ }
+ availableData++;
+ }
}
if (jsonData["active_7_day"]["ios"][0] != null)
{
- int iosUsers = (jsonData["active_7_day"]["ios"].Count) - 2;
- ios = jsonData["active_7_day"]["ios"][iosUsers];
+ int availableData = 1;
+ bool complete = false;
+ while (!complete)
+ {
+ if (((jsonData["active_7_day"]["ios"].Count) - availableData) != null)
+ {
+ int iosUsers = (jsonData["active_7_day"]["ios"].Count) - availableData;
+ ios = jsonData["active_7_day"]["ios"][iosUsers];
+ complete = true;
+ }
+ availableData++;
+ }
}
if (jsonData["active_7_day"]["android"][0] != null)
{
- int androidUsers = (jsonData["active_7_day"]["android"].Count) - 2;
- android = jsonData["active_7_day"]["android"][androidUsers];
+ int availableData = 1;
+ bool complete = false;
+ while (!complete)
+ {
+ if (((jsonData["active_7_day"]["android"].Count) - availableData) != null)
+ {
+ int androidUsers = (jsonData["active_7_day"]["android"].Count) - availableData;
+ android = jsonData["active_7_day"]["android"][androidUsers];
+ complete = true;
+ }
+ availableData++;
+ }
}
if (jsonData["active_7_day"]["other"][0] != null)
{
- int otherUsers = (jsonData["active_7_day"]["other"].Count) - 2;
- other = jsonData["active_7_day"]["other"][otherUsers];
+ int availableData = 1;
+ bool complete = false;
+ while (!complete)
+ {
+ if (((jsonData["active_7_day"]["other"].Count) - availableData) != null)
+ {
+ int otherUsers = (jsonData["active_7_day"]["other"].Count) - availableData;
+ other = jsonData["active_7_day"]["other"][otherUsers];
+ complete = true;
+ }
+ availableData++;
+ }
}
if (jsonData["active_7_day"]["total"][0] != null)
{
- int totalUsers = (jsonData["active_7_day"]["total"].Count) - 2;
- total = jsonData["active_7_day"]["total"][totalUsers];
+ int availableData = 1;
+ bool complete = false;
+ while (!complete)
+ {
+ if (((jsonData["active_7_day"]["total"].Count) - availableData) != null)
+ {
+ int totalUsers = (jsonData["active_7_day"]["total"].Count) - availableData;
+ total = jsonData["active_7_day"]["total"][totalUsers];
+ complete = true;
+ }
+ availableData++;
+ }
}
}
model.windows = windows.ToString();
@@ -227,33 +347,81 @@ private void RefreshHealth(ITeamHealthModel model, IMainPresenter presenter)
storageStartDate = jsonData["start_date"];
if (jsonData["total_usage"][0] != null)
{
- int totalCount = (jsonData["total_usage"].Count) - 2;
- totalStorage = jsonData["total_usage"][totalCount];
- double totalStorageDec = FileUtil.FormatFileSizeTB(totalStorage);
- model.TotalUsage = totalStorageDec.ToString() + " TB";
+ int availableData = 1;
+ bool complete = false;
+ while (!complete)
+ {
+ if (((jsonData["total_usage"].Count) - availableData) != null)
+ {
+ int totalCount = (jsonData["total_usage"].Count) - availableData;
+ totalStorage = jsonData["total_usage"][totalCount];
+ double totalStorageDec = FileUtil.FormatFileSizeTB(totalStorage);
+ model.TotalUsage = totalStorageDec.ToString() + " TB";
+ complete = true;
+ }
+ availableData++;
+ }
}
if (jsonData["shared_usage"][0] != null)
{
- int sharedCount = (jsonData["shared_usage"].Count) - 2;
- sharedStorage = jsonData["shared_usage"][sharedCount];
- double sharedStorageDec = FileUtil.FormatFileSizeTB(sharedStorage);
- model.SharedUsage = sharedStorageDec.ToString() + " TB";
+ int availableData = 1;
+ bool complete = false;
+ while (!complete)
+ {
+ if (((jsonData["shared_usage"].Count) - availableData) != null)
+ {
+ int sharedCount = (jsonData["shared_usage"].Count) - availableData;
+ sharedStorage = jsonData["shared_usage"][sharedCount];
+ double sharedStorageDec = FileUtil.FormatFileSizeTB(sharedStorage);
+ model.SharedUsage = sharedStorageDec.ToString() + " TB";
+ complete = true;
+ }
+ availableData++;
+ }
}
if (jsonData["unshared_usage"][0] != null)
{
- int unsharedCount = (jsonData["unshared_usage"].Count) - 2;
- unsharedStorage = jsonData["unshared_usage"][unsharedCount];
- double unsharedStorageDec = FileUtil.FormatFileSizeTB(unsharedStorage);
- model.UnsharedUsage = unsharedStorageDec.ToString() + " TB";
+ int availableData = 1;
+ bool complete = false;
+ while (!complete)
+ {
+ if (((jsonData["unshared_usage"].Count) - availableData) != null)
+ {
+ int unsharedCount = (jsonData["unshared_usage"].Count) - availableData;
+ unsharedStorage = jsonData["unshared_usage"][unsharedCount];
+ double unsharedStorageDec = FileUtil.FormatFileSizeTB(unsharedStorage);
+ model.UnsharedUsage = unsharedStorageDec.ToString() + " TB";
+ complete = true;
+ }
+ availableData++;
+ }
}
if (jsonData["shared_folders"][0] != null)
{
- int sharedFolderCount = (jsonData["shared_folders"].Count) - 2;
- sharedFolders = jsonData["shared_folders"][sharedFolderCount];
- model.SharedFolders = sharedFolders.ToString();
+ int availableData = 1;
+ bool complete = false;
+ while (!complete)
+ {
+ if (((jsonData["shared_usage"].Count) - availableData) != null)
+ {
+ int sharedFolderCount = (jsonData["shared_folders"].Count) - availableData;
+ sharedFolders = jsonData["shared_folders"][sharedFolderCount];
+ model.SharedFolders = sharedFolders.ToString();
+ complete = true;
+ }
+ availableData++;
+ }
}
}
}
+ if (responseStorage.StatusCode != HttpStatusCode.OK)
+ {
+ //if Dropbox gives back Internal Server error, bug filed from engineering on this
+ model.TotalUsage = "N/A";
+ model.SharedUsage = "N/A";
+ model.UnsharedUsage = "N/A";
+ model.SharedFolders = "N/A";
+ }
model.RefreshDateTime = DateTime.Now;
}
diff --git a/Source/DfBAdminToolkit/Properties/AssemblyInfo.cs b/Source/DfBAdminToolkit/Properties/AssemblyInfo.cs
index 6bd79ed..e31b75b 100644
--- a/Source/DfBAdminToolkit/Properties/AssemblyInfo.cs
+++ b/Source/DfBAdminToolkit/Properties/AssemblyInfo.cs
@@ -32,5 +32,5 @@
// 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.*")]
-[assembly: AssemblyVersion("6.0.0.0")]
-[assembly: AssemblyFileVersion("6.0.0.0")]
+[assembly: AssemblyVersion("6.0.1.0")]
+[assembly: AssemblyFileVersion("6.0.1.0")]
diff --git a/Source/ProviderLauncher/Properties/AssemblyInfo.cs b/Source/ProviderLauncher/Properties/AssemblyInfo.cs
index afe74ba..91ab8d3 100644
--- a/Source/ProviderLauncher/Properties/AssemblyInfo.cs
+++ b/Source/ProviderLauncher/Properties/AssemblyInfo.cs
@@ -32,5 +32,5 @@
// 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.*")]
-[assembly: AssemblyVersion("6.0.0.0")]
-[assembly: AssemblyFileVersion("6.0.0.0")]
+[assembly: AssemblyVersion("6.0.1.0")]
+[assembly: AssemblyFileVersion("6.0.1.0")]