-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
738 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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,25 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 16 | ||
VisualStudioVersion = 16.0.30413.136 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AzureArtifactManager", "AzureArtifactManager\AzureArtifactManager.csproj", "{54A95BB7-F568-42C0-884B-9CD7C050BF31}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{54A95BB7-F568-42C0-884B-9CD7C050BF31}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{54A95BB7-F568-42C0-884B-9CD7C050BF31}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{54A95BB7-F568-42C0-884B-9CD7C050BF31}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{54A95BB7-F568-42C0-884B-9CD7C050BF31}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {CC52D297-B189-4FE9-99AA-2A1E5A7D9E5C} | ||
EndGlobalSection | ||
EndGlobal |
This file contains 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,8 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<configuration> | ||
<appSettings> | ||
<add key="PersonalAccessToken" value="" /> | ||
<add key="Organization" value="" /> | ||
<add key="Project" value="" /> | ||
</appSettings> | ||
</configuration> |
This file contains 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,9 @@ | ||
<Application x:Class="AzureArtifactManager.App" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:local="clr-namespace:AzureArtifactManager" | ||
StartupUri="MainWindow.xaml"> | ||
<Application.Resources> | ||
|
||
</Application.Resources> | ||
</Application> |
This file contains 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,17 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Configuration; | ||
using System.Data; | ||
using System.Linq; | ||
using System.Threading.Tasks; | ||
using System.Windows; | ||
|
||
namespace AzureArtifactManager | ||
{ | ||
/// <summary> | ||
/// Interaction logic for App.xaml | ||
/// </summary> | ||
public partial class App : Application | ||
{ | ||
} | ||
} |
This file contains 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,10 @@ | ||
using System.Windows; | ||
|
||
[assembly: ThemeInfo( | ||
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located | ||
//(used if a resource is not found in the page, | ||
// or application resource dictionaries) | ||
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located | ||
//(used if a resource is not found in the page, | ||
// app, or any theme specific resource dictionaries) | ||
)] |
This file contains 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 @@ | ||
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop"> | ||
|
||
<PropertyGroup> | ||
<OutputType>WinExe</OutputType> | ||
<TargetFramework>netcoreapp3.1</TargetFramework> | ||
<UseWPF>true</UseWPF> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="MvvmLightLibsStd10" Version="5.4.1.1" /> | ||
<PackageReference Include="System.Text.Json" Version="4.7.2" /> | ||
<PackageReference Include="WindowsAPICodePack-Shell" Version="1.1.1" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains 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,121 @@ | ||
<Window x:Class="AzureArtifactManager.MainWindow" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:model="clr-namespace:AzureArtifactManager.Model" | ||
xmlns:viewmodel="clr-namespace:AzureArtifactManager.ViewModels" | ||
mc:Ignorable="d" | ||
Title="Azure Artifact Manager" Height="450" Width="800"> | ||
|
||
<Window.Resources> | ||
<BooleanToVisibilityConverter x:Key="BoolToVisibilityConverter" /> | ||
</Window.Resources> | ||
|
||
<Grid> | ||
<Grid.RowDefinitions> | ||
<RowDefinition Height="Auto" /> | ||
<RowDefinition Height="*" /> | ||
</Grid.RowDefinitions> | ||
|
||
<StackPanel Grid.RowSpan="2" Visibility="{Binding HasConfigurationError, Converter={StaticResource BoolToVisibilityConverter}}"> | ||
<TextBlock Text="Configuration Error" Foreground="Red" /> | ||
<TextBlock Text="Please configure your Organization and Personal Access Token in the app.config file" Foreground="Red" /> | ||
<TextBlock Text="Configuration of a Project is optional (not needed to see Organization Level Feeds)" /> | ||
<TextBlock Text="Just specify the organization name: MyOrg if your url is https://dev.azure.com/MyOrg" /> | ||
<Button Content="Open App Config" Command="{Binding OpenAppConfigCommand}" /> | ||
</StackPanel> | ||
|
||
<Grid Grid.Row="0" Visibility="{Binding HasNoConfigurationError, Converter={StaticResource BoolToVisibilityConverter}}"> | ||
<DockPanel LastChildFill="True"> | ||
<StackPanel> | ||
<StackPanel Orientation="Horizontal"> | ||
<TextBlock Text="Connected to: " /> | ||
<TextBlock Text="{Binding Organization}" /> | ||
</StackPanel> | ||
<TextBlock Text="Available Feeds:" /> | ||
<ComboBox ItemsSource="{Binding Feeds}" SelectedItem="{Binding SelectedFeed, Mode=TwoWay}" > | ||
<ComboBox.ItemTemplate> | ||
<DataTemplate DataType="{x:Type model:Feed}"> | ||
<TextBlock Text="{Binding Name}" /> | ||
</DataTemplate> | ||
</ComboBox.ItemTemplate> | ||
</ComboBox> | ||
</StackPanel> | ||
</DockPanel> | ||
</Grid> | ||
|
||
<Grid Grid.Row="1" Visibility="{Binding HasNoConfigurationError, Converter={StaticResource BoolToVisibilityConverter}}"> | ||
<DockPanel LastChildFill="True"> | ||
<DockPanel LastChildFill="True" DockPanel.Dock="Top"> | ||
<Button DockPanel.Dock="Right" Content="Add New Package" Command="{Binding AddNewPackageCommand}" /> | ||
|
||
<StackPanel Orientation="Horizontal"> | ||
<TextBlock Text="Available Packages for Feed" /> | ||
<TextBlock Margin="10 0 0 0" Text="{Binding SelectedFeed.Name}"/> | ||
</StackPanel> | ||
|
||
</DockPanel> | ||
|
||
<Grid> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="*" /> | ||
<ColumnDefinition Width="*" /> | ||
</Grid.ColumnDefinitions> | ||
|
||
<ListBox ItemsSource="{Binding AvailablePackages}" SelectedItem="{Binding SelectedPackage}" Grid.Column="0"> | ||
<ListBox.ItemTemplate> | ||
<DataTemplate DataType="{x:Type viewmodel:PackageViewModel}"> | ||
<TextBlock Text="{Binding Name}" Grid.Column="0"/> | ||
</DataTemplate> | ||
</ListBox.ItemTemplate> | ||
</ListBox> | ||
|
||
<DockPanel Grid.Column="1" Visibility="{Binding ShowPackageDetails, Converter={StaticResource BoolToVisibilityConverter}}"> | ||
|
||
<GroupBox Header="Upload" DockPanel.Dock="Bottom"> | ||
<StackPanel> | ||
<TextBlock Foreground="Red" Text="Make sure you know what you're doing!" /> | ||
<Button Content="Upload new Version" DockPanel.Dock="Right" Command="{Binding SelectedPackage.UploadNewVersionCommand}"/> | ||
</StackPanel> | ||
</GroupBox> | ||
|
||
<Grid> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="Auto"/> | ||
<ColumnDefinition Width="*"/> | ||
</Grid.ColumnDefinitions> | ||
|
||
<Grid.RowDefinitions> | ||
<RowDefinition Height="Auto" /> | ||
<RowDefinition Height="Auto" /> | ||
<RowDefinition Height="Auto" /> | ||
<RowDefinition Height="Auto" /> | ||
<RowDefinition Height="Auto" /> | ||
</Grid.RowDefinitions> | ||
|
||
<TextBlock Text="Name:" Grid.Column="0" Grid.Row="0"/> | ||
<TextBox Text="{Binding SelectedPackage.Name, Mode=TwoWay}" IsEnabled="{Binding SelectedPackage.IsNewPackage}" Grid.Column="1" Grid.Row="0" /> | ||
|
||
<TextBlock Text="Version:" Grid.Column="0" Grid.Row="1"/> | ||
<TextBox Text="{Binding SelectedPackage.Version, Mode=TwoWay}" Grid.Column="1" Grid.Row="1" /> | ||
|
||
<TextBlock Text="Description:" Grid.Column="0" Grid.Row="2"/> | ||
<TextBox Text="{Binding SelectedPackage.Description, Mode=TwoWay}" Grid.Column="1" Grid.Row="2" /> | ||
|
||
<Button Content="Download" Command="{Binding SelectedPackage.DownloadSelectedPackageCommand}" Grid.ColumnSpan="2" Grid.Row="3"/> | ||
|
||
<StackPanel Grid.ColumnSpan="2" Grid.Row="4" Margin="0 30 0 0 "> | ||
<TextBlock Text="Name must be all lowercase and no spaces are allowed!" /> | ||
<TextBlock Text="Version only includes Major.Minor.Patch - upload will fail if format is not correct" /> | ||
</StackPanel> | ||
</Grid> | ||
</DockPanel> | ||
|
||
</Grid> | ||
|
||
</DockPanel> | ||
</Grid> | ||
</Grid> | ||
|
||
</Window> |
This file contains 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,19 @@ | ||
using AzureArtifactManager.ViewModels; | ||
using Microsoft.WindowsAPICodePack.Dialogs; | ||
using System.Windows; | ||
|
||
namespace AzureArtifactManager | ||
{ | ||
/// <summary> | ||
/// Interaction logic for MainWindow.xaml | ||
/// </summary> | ||
public partial class MainWindow : Window | ||
{ | ||
public MainWindow() | ||
{ | ||
InitializeComponent(); | ||
|
||
DataContext = new MainWindowViewModel(); | ||
} | ||
} | ||
} |
This file contains 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,16 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
using System.Text.Json.Serialization; | ||
|
||
namespace AzureArtifactManager.Model | ||
{ | ||
public class ApiResponse<T> | ||
{ | ||
[JsonPropertyName("count")] | ||
public int Count { get; set; } | ||
|
||
[JsonPropertyName("value")] | ||
public IEnumerable<T> Value { get; set; } | ||
} | ||
} |
This file contains 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,19 @@ | ||
using System.Text.Json.Serialization; | ||
|
||
namespace AzureArtifactManager.Model | ||
{ | ||
public class ArtifactTool | ||
{ | ||
[JsonPropertyName("name")] | ||
public string Name{ get; set; } | ||
|
||
[JsonPropertyName("version")] | ||
public string Version { get; set; } | ||
|
||
[JsonPropertyName("uri")] | ||
public string Uri { get; set; } | ||
|
||
[JsonPropertyName("rid")] | ||
public string Os { get; set; } | ||
} | ||
} |
This file contains 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,16 @@ | ||
using System.Text.Json.Serialization; | ||
|
||
namespace AzureArtifactManager.Model | ||
{ | ||
public class Feed | ||
{ | ||
[JsonPropertyName("name")] | ||
public string Name { get; set; } | ||
|
||
[JsonPropertyName("id")] | ||
public string Id { get; set; } | ||
|
||
[JsonPropertyName("project")] | ||
public Project Project{ get; set; } | ||
} | ||
} |
This file contains 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,27 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Text.Json.Serialization; | ||
|
||
namespace AzureArtifactManager.Model | ||
{ | ||
public class Package | ||
{ | ||
public Package() | ||
{ | ||
AvailableVersions = new List<PackageVersion>(); | ||
} | ||
|
||
[JsonPropertyName("id")] | ||
public string Id { get; set; } | ||
|
||
[JsonPropertyName("name")] | ||
public string Name { get; set; } | ||
|
||
public PackageVersion LatestVersion => AvailableVersions.FirstOrDefault(x => x.IsLatest); | ||
|
||
[JsonPropertyName("versions")] | ||
public IEnumerable<PackageVersion> AvailableVersions { get; set; } | ||
} | ||
} |
This file contains 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,20 @@ | ||
using System.Text.Json.Serialization; | ||
|
||
namespace AzureArtifactManager.Model | ||
{ | ||
public class PackageVersion | ||
{ | ||
[JsonPropertyName("version")] | ||
public string Version { get; set; } | ||
|
||
[JsonPropertyName("id")] | ||
public string Id { get; set; } | ||
|
||
[JsonPropertyName("isLatest")] | ||
public bool IsLatest { get; set; } | ||
|
||
[JsonPropertyName("packageDescription")] | ||
public string Description { get; set; } | ||
|
||
} | ||
} |
This file contains 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,13 @@ | ||
using System.Text.Json.Serialization; | ||
|
||
namespace AzureArtifactManager.Model | ||
{ | ||
public class Project | ||
{ | ||
[JsonPropertyName("id")] | ||
public string Id { get; set; } | ||
|
||
[JsonPropertyName("name")] | ||
public string Name { get; set; } | ||
} | ||
} |
Oops, something went wrong.