Skip to content

Commit

Permalink
4.2
Browse files Browse the repository at this point in the history
removed Team Folders, added Open Templates button
  • Loading branch information
jackb-dropbox committed Sep 22, 2016
1 parent 4167eb5 commit 41fc366
Show file tree
Hide file tree
Showing 13 changed files with 226 additions and 153 deletions.
Binary file modified Installer/DBAdminToolkit.Setup.zip
Binary file not shown.
4 changes: 2 additions & 2 deletions Source/DBAdminToolkit.Setup/DBAdminToolkit.Setup.vdproj
Original file line number Diff line number Diff line change
Expand Up @@ -813,15 +813,15 @@
{
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:Dropbox Business Admin Toolkit"
"ProductCode" = "8:{F095753C-0E82-4DEA-B5B4-4A6D3EB75D53}"
"ProductCode" = "8:{E45FF5F2-727B-4B69-B555-247B6A8C959D}"
"PackageCode" = "8:{4F507568-2104-402C-812B-BF0F65944546}"
"UpgradeCode" = "8:{F6F4214B-C1CB-4F20-B1B3-35E1B7262F93}"
"AspNetVersion" = "8:4.0.30319.0"
"RestartWWWService" = "11:FALSE"
"RemovePreviousVersions" = "11:TRUE"
"DetectNewerInstalledVersion" = "11:TRUE"
"InstallAllUsers" = "11:FALSE"
"ProductVersion" = "8:4.1.0"
"ProductVersion" = "8:4.2.0"
"Manufacturer" = "8:Dropbox Enterprise Services"
"ARPHELPTELEPHONE" = "8:"
"ARPHELPLINK" = "8:"
Expand Down
4 changes: 2 additions & 2 deletions Source/DfBAdminToolkit.Common/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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("4.1.0.0")]
[assembly: AssemblyFileVersion("4.1.0.0")]
[assembly: AssemblyVersion("4.2.0.0")]
[assembly: AssemblyFileVersion("4.2.0.0")]
33 changes: 33 additions & 0 deletions Source/DfBAdminToolkit/DfBAdminToolkit.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,21 @@
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand Down Expand Up @@ -276,6 +291,12 @@
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<None Include="Templates\ProvisioningTemplate.csv">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Templates\UpdateMembersTemplate.csv">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Include="App.config">
Expand Down Expand Up @@ -308,6 +329,18 @@
<ItemGroup>
<Folder Include="View\Renderer\" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.5.2">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4.5.2 %28x86 and x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Expand Down
2 changes: 1 addition & 1 deletion Source/DfBAdminToolkit/ErrorMessages.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public static class ErrorMessages
public readonly static string CONFIRM_SUSPEND = "Are you sure you want to suspend this list of members from your Dropbox Business account?";
public readonly static string CONFIRM_UNSUSPEND = "Are you sure you want to unsuspend this list of members from your Dropbox Business account?";
public readonly static string CONFIRM_SET_PROFILE = "Are you sure you want to update profiles on this list of members from your Dropbox Business account?";
public readonly static string CONFIRM_SEND_WELCOME_EMAIL = "Warning: Please consult your Dropbox account team prior to disabling welcome emails. Please ensure that your domains are verified and single sign-on (SSO) is enabled and set to required in the Dropbox admin console if you decide to use this feature.";
public readonly static string NO_TEAM_JOIN_EMAIL = "Warning: Please consult your Dropbox account team prior to disabling team join emails. Please ensure that your domains are verified and single sign-on (SSO) is enabled and set to required in the Dropbox admin console if you decide to use this feature.";
public readonly static string MISSING_TOKEN = "You must go to File->Settings to add your app tokens before performing any actions in the toolkit.";
public readonly static string INVALID_EXPORT_FOLDER = "Directory to export report file is not found.";
public readonly static string FAILED_TO_GET_GROUPS = "Bad request to the API, possibly due to no permissions to get groups.";
Expand Down
26 changes: 5 additions & 21 deletions Source/DfBAdminToolkit/Presenter/ProvisioningPresenter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ private string ProvisionRoles(IProvisioningModel model, IMainPresenter presenter
}
}
}
catch (Exception ex)
catch (Exception)
{
// error message.
SyncContext.Post(delegate
Expand Down Expand Up @@ -259,7 +259,7 @@ private string DeprovisionRoles(IProvisioningModel model, IMainPresenter present
}
}
}
catch (Exception ex)
catch (Exception)
{
// error message.
SyncContext.Post(delegate
Expand Down Expand Up @@ -304,7 +304,7 @@ private string SuspendMember(IProvisioningModel model, IMainPresenter presenter)
}
}
}
catch (Exception ex)
catch (Exception)
{
// error message.
SyncContext.Post(delegate
Expand Down Expand Up @@ -349,7 +349,7 @@ private string UnsuspendMember(IProvisioningModel model, IMainPresenter presente
}
}
}
catch (Exception ex)
catch (Exception)
{
// error message.
SyncContext.Post(delegate
Expand Down Expand Up @@ -404,10 +404,9 @@ private string UpdateProfile(IProvisioningModel model, IMainPresenter presenter)
}
}
}
catch(Exception ex)
catch(Exception)
{
//just catch the exception and return error message
// error message.
SyncContext.Post(delegate {
presenter.ShowErrorMessage(ErrorMessages.FAILED_TO_UPDATE_PROFILE, ErrorMessages.DLG_DEFAULT_TITLE);
presenter.UpdateProgressInfo("");
Expand Down Expand Up @@ -699,9 +698,6 @@ private void OnCommandLoadInputFile(object sender, EventArgs e) {
presenter.UpdateProgressInfo("Loading Input File...");
}, null);
}

// TODO: to improve stability, we will need to ensure to kill
// thread when user exits application while thread is running for REST service call
Thread load = new Thread(() => {
if (!string.IsNullOrEmpty(model.AccessToken)) {
bool loaded = this.LoadInputFile(model, presenter);
Expand Down Expand Up @@ -736,9 +732,6 @@ private void OnCommandLoadUpdateInputFile(object sender, EventArgs e)
presenter.UpdateProgressInfo("Loading Input File...");
}, null);
}

// TODO: to improve stability, we will need to ensure to kill
// thread when user exits application while thread is running for REST service call
Thread load = new Thread(() => {
if (!string.IsNullOrEmpty(model.AccessToken))
{
Expand Down Expand Up @@ -835,9 +828,6 @@ private void OnCommandDeprovision(object sender, System.EventArgs e)
presenter.UpdateProgressInfo("Processing...");
}, null);
}

// TODO: to improve stability, we will need to ensure to kill
// thread when user exits application while thread is running for REST service call
Thread deprovision = new Thread(() =>
{
if (string.IsNullOrEmpty(model.AccessToken))
Expand Down Expand Up @@ -1048,9 +1038,6 @@ private void OnCommandListMembersCreateCSV(object sender, EventArgs e)
presenter.UpdateProgressInfo("Creating CSV file...");
}, null);
}

// TODO: to improve stability, we will need to ensure to kill
// thread when user exits application while thread is running for REST service call
Thread createCSV = new Thread(() =>
{
if (string.IsNullOrEmpty(ConfigurationManager.AppSettings.Get("DefaultAccessToken")))
Expand Down Expand Up @@ -1113,9 +1100,6 @@ private void OnCommandGetUsage(object sender, EventArgs e)
presenter.UpdateProgressInfo("Gathering usage data...");
}, null);
}

// TODO: to improve stability, we will need to ensure to kill
// thread when user exits application while thread is running for REST service call
Thread getUsage = new Thread(() =>
{
if (!string.IsNullOrEmpty(model.AccessToken))
Expand Down
4 changes: 2 additions & 2 deletions Source/DfBAdminToolkit/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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("4.1.0.0")]
[assembly: AssemblyFileVersion("4.1.0.0")]
[assembly: AssemblyVersion("4.2.0.0")]
[assembly: AssemblyFileVersion("4.2.0.0")]
4 changes: 4 additions & 0 deletions Source/DfBAdminToolkit/Templates/ProvisioningTemplate.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[email protected],Joe,Banks
[email protected],Jane,Doe


3 changes: 3 additions & 0 deletions Source/DfBAdminToolkit/Templates/UpdateMembersTemplate.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[email protected],[email protected],17393722876
jdoe@@gmail.com,[email protected],

26 changes: 13 additions & 13 deletions Source/DfBAdminToolkit/View/MainView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ public partial class MainView : Form, IMainView {
DumpContent = 1,
Provisioning = 2,
Groups = 3,
TeamFolders = 4,
Devices = 5,
DataMigration = 6
//TeamFolders = 4,
Devices = 4,
DataMigration = 5
}

#endregion Runtime components
Expand Down Expand Up @@ -141,14 +141,14 @@ private void InitializeRuntimeComponent() {
Padding = new Padding(5, 3, 5, 3),
UseVisualStyleBackColor = true
});
_tabPages.Add(new TabPage()
{
Name = "tabPage_TeamFolders",
Text = "Team Folders",
Dock = DockStyle.Fill,
Padding = new Padding(5, 3, 5, 3),
UseVisualStyleBackColor = true
});
//_tabPages.Add(new TabPage()
//{
// Name = "tabPage_TeamFolders",
// Text = "Team Folders",
// Dock = DockStyle.Fill,
// Padding = new Padding(5, 3, 5, 3),
// UseVisualStyleBackColor = true
//});
_tabPages.Add(new TabPage() {
Name = "tabPage_Devices",
Text = "Devices",
Expand Down Expand Up @@ -274,15 +274,15 @@ private void RegisterTabPages() {
_tabPages[(int)TabIndex.DumpContent].Controls.Add(CreateDumpUserContentView());
_tabPages[(int)TabIndex.Provisioning].Controls.Add(CreateProvisionView());
_tabPages[(int)TabIndex.Groups].Controls.Add(CreateGroupsView());
_tabPages[(int)TabIndex.TeamFolders].Controls.Add(CreateTeamFoldersView());
//_tabPages[(int)TabIndex.TeamFolders].Controls.Add(CreateTeamFoldersView());
_tabPages[(int)TabIndex.Devices].Controls.Add(CreateDevicesView());
_tabPages[(int)TabIndex.DataMigration].Controls.Add(CreateDataMigrationView());

_tabControl.Controls.Add(_tabPages[(int)TabIndex.TextSearch]);
_tabControl.Controls.Add(_tabPages[(int)TabIndex.DumpContent]);
_tabControl.Controls.Add(_tabPages[(int)TabIndex.Provisioning]);
_tabControl.Controls.Add(_tabPages[(int)TabIndex.Groups]);
_tabControl.Controls.Add(_tabPages[(int)TabIndex.TeamFolders]);
//_tabControl.Controls.Add(_tabPages[(int)TabIndex.TeamFolders]);
_tabControl.Controls.Add(_tabPages[(int)TabIndex.Devices]);
_tabControl.Controls.Add(_tabPages[(int)TabIndex.DataMigration]);

Expand Down
Loading

0 comments on commit 41fc366

Please sign in to comment.