Skip to content

Commit 4892261

Browse files
Merge pull request #255 from microsoft/dev +resetdemo
Integrate new features and bugfixes
2 parents 0882306 + 41519f4 commit 4892261

File tree

13 files changed

+718
-112
lines changed

13 files changed

+718
-112
lines changed

TeamCloud.code-workspace

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,8 @@
33
{
44
"path": "."
55
}
6-
]
6+
],
7+
"settings": {
8+
"restructuredtext.languageServer.disabled": true
9+
}
710
}

scripts/delete-task-hubs.sh

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,30 +12,30 @@ pushd $cdir/../src/TeamCloud.Orchestrator > /dev/null
1212

1313
popd > /dev/null
1414

15-
for azureProvider in AppInsights DevOps DevTestLabs; do
15+
# for azureProvider in AppInsights DevOps DevTestLabs; do
1616

17-
echo "Deleting task hub for 'TeamCloud.Providers.Azure.$azureProvider'."
17+
# echo "Deleting task hub for 'TeamCloud.Providers.Azure.$azureProvider'."
1818

19-
pushd $cdir/../../TeamCloud-Providers/Azure/TeamCloud.Providers.Azure.$azureProvider > /dev/null
19+
# pushd $cdir/../../TeamCloud-Providers/Azure/TeamCloud.Providers.Azure.$azureProvider > /dev/null
2020

21-
func durable delete-task-hub --connection-string-setting DurableFunctionsHubStorage
22-
echo ""
21+
# func durable delete-task-hub --connection-string-setting DurableFunctionsHubStorage
22+
# echo ""
2323

24-
popd > /dev/null
24+
# popd > /dev/null
2525

26-
done
26+
# done
2727

28-
for githubProvider in Repos Actions; do
28+
# for githubProvider in Repos Actions; do
2929

30-
echo "Deleting task hub for 'TeamCloud.Providers.GitHub.$githubProvider'."
30+
# echo "Deleting task hub for 'TeamCloud.Providers.GitHub.$githubProvider'."
3131

32-
pushd $cdir/../../TeamCloud-Providers/Azure/TeamCloud.Providers.Azure.$githubProvider > /dev/null
32+
# pushd $cdir/../../TeamCloud-Providers/Azure/TeamCloud.Providers.Azure.$githubProvider > /dev/null
3333

34-
func durable delete-task-hub --connection-string-setting DurableFunctionsHubStorage
35-
echo ""
34+
# func durable delete-task-hub --connection-string-setting DurableFunctionsHubStorage
35+
# echo ""
3636

37-
popd > /dev/null
37+
# popd > /dev/null
3838

39-
done
39+
# done
4040

4141
echo "Done."

src/TeamCloud.API/Controllers/ProjectController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ public Task<IActionResult> Post([FromBody] ProjectDefinition projectDefinition)
192192
project.Tags = input
193193
.ToObject<Dictionary<string, object>>()
194194
.ToDictionary(kvp => kvp.Key, kvp => kvp.Value?.ToString());
195-
195+
196196
var currentUser = users.FirstOrDefault(u => u.Id == UserService.CurrentUserId);
197197

198198
var command = new ProjectCreateCommand(currentUser, project);

src/TeamCloud.API/Data/Serialization/DataResultConverter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
* Licensed under the MIT License.
44
*/
55

6-
using Newtonsoft.Json;
76
using System;
7+
using Newtonsoft.Json;
88
using TeamCloud.API.Data.Results;
99
using TeamCloud.Serialization;
1010

src/TeamCloud.API/GlobalExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
using TeamCloud.API.Data.Results;
2121
using TeamCloud.API.Initialization;
2222
using TeamCloud.API.Services;
23-
using TeamCloud.Model.Commands;
2423
using TeamCloud.Model.Commands.Core;
2524

2625
namespace TeamCloud.API
@@ -141,6 +140,7 @@ public static string GetTenantId(this ClaimsPrincipal claimsPrincipal)
141140
return tenantId;
142141
}
143142

143+
// TODO: Update to use teamcloud serializer
144144
public static Task<T> ReadAsAsync<T>(this HttpContent httpContent, JsonSerializerSettings serializerSettings = null)
145145
=> httpContent.ReadAsAsync<T>(JsonSerializer.CreateDefault(serializerSettings));
146146

src/TeamCloud.Azure.Resources/AzureResource.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,13 @@ protected virtual async Task<string> GetLatestApiVersionAsync(bool includePrevie
202202
return apiVersions.FirstOrDefault();
203203
}
204204

205+
public async Task<string> GetLocationAsync()
206+
{
207+
var json = await GetJsonAsync().ConfigureAwait(false);
208+
209+
return json?.SelectToken("location")?.ToString();
210+
}
211+
205212
public async Task<JObject> GetJsonAsync(string apiVersion = null)
206213
{
207214
apiVersion ??= await GetLatestApiVersionAsync()

src/TeamCloud.Azure.Resources/TeamCloud.Azure.Resources.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333

3434
<ItemGroup>
3535
<PackageReference Include="Azure.Storage.Files.Shares" Version="12.5.0" />
36+
<PackageReference Include="Docker.DotNet.BasicAuth" Version="3.125.3" />
3637
<PackageReference Include="Microsoft.Azure.Management.DevTestLabs" Version="3.0.0" />
3738
<PackageReference Include="System.Linq.Async" Version="4.1.1" />
3839
<ProjectReference Include="..\TeamCloud.Azure\TeamCloud.Azure.csproj" />

0 commit comments

Comments
 (0)