Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ artifacts:
deploy:
- provider: NuGet
api_key:
secure: luVm1C63eoBD+VuUPGu66KsalR39FTAbnQtRgs8HmO21D53xm/I6o0eIN7Tm0Y83
secure: jFkBflAkupwH+6ebPfcScQzBwCJGArjzcE6716DMgVG5SSktBSXIgAtPE2URki8r
skip_symbols: true
on:
branch: /^(master|dev)$/
Expand Down
10 changes: 1 addition & 9 deletions example/SeqQuery/SeqQuery.csproj
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net46;netcoreapp1.0</TargetFrameworks>
<TargetFrameworks>net461;netcoreapp2.2</TargetFrameworks>
<AssemblyName>seq-query</AssemblyName>
<OutputType>Exe</OutputType>
<PackageId>SeqQuery</PackageId>
<PackageTargetFallback Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">$(PackageTargetFallback);dnxcore50;portable-net45+win8</PackageTargetFallback>
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">1.0.4</RuntimeFrameworkVersion>
</PropertyGroup>

<ItemGroup>
Expand All @@ -21,9 +18,4 @@
<PackageReference Include="docopt.net" Version="0.6.1.9" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net46' ">
<Reference Include="System" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>

</Project>
12 changes: 1 addition & 11 deletions example/SeqTail/SeqTail.csproj
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net46;netcoreapp1.0</TargetFrameworks>
<TargetFrameworks>net461;netcoreapp2.2</TargetFrameworks>
<AssemblyName>seq-tail</AssemblyName>
<OutputType>Exe</OutputType>
<PackageId>SeqTail</PackageId>
<RuntimeIdentifiers>win</RuntimeIdentifiers>
<PackageTargetFallback Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">$(PackageTargetFallback);dnxcore50;portable-net45+win8</PackageTargetFallback>
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">1.0.4</RuntimeFrameworkVersion>
</PropertyGroup>

<ItemGroup>
Expand All @@ -19,16 +15,10 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="System.Threading.Tasks" Version="4.3.0" />
<PackageReference Include="docopt.net" Version="0.6.1.9" />
<PackageReference Include="Serilog.Formatting.Compact.Reader" Version="1.0.1" />
<PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" />
<PackageReference Include="System.Reactive" Version="3.0.0" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net46' ">
<Reference Include="System" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>

</Project>
10 changes: 1 addition & 9 deletions example/SignalCopy/SignalCopy.csproj
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net46;netcoreapp1.0</TargetFrameworks>
<TargetFrameworks>net461;netcoreapp2.2</TargetFrameworks>
<AssemblyName>signal-copy</AssemblyName>
<OutputType>Exe</OutputType>
<PackageId>SignalCopy</PackageId>
<PackageTargetFallback Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">$(PackageTargetFallback);dnxcore50;portable-net45+win8</PackageTargetFallback>
<RuntimeFrameworkVersion Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">1.0.4</RuntimeFrameworkVersion>
</PropertyGroup>

<ItemGroup>
Expand All @@ -21,9 +18,4 @@
<PackageReference Include="docopt.net" Version="0.6.1.9" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net46' ">
<Reference Include="System" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>

</Project>
4 changes: 2 additions & 2 deletions src/Seq.Api/Client/SeqApiClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class SeqApiClient : IDisposable
// Future versions of Seq may not completely support v1 features, however
// providing this as an Accept header will ensure what compatibility is available
// can be utilised.
const string SeqApiV6MediaType = "application/vnd.datalust.seq.v6+json";
const string SeqApiV7MediaType = "application/vnd.datalust.seq.v7+json";

readonly HttpClient _httpClient;
readonly CookieContainer _cookies = new CookieContainer();
Expand Down Expand Up @@ -181,7 +181,7 @@ async Task<Stream> HttpSendAsync(HttpRequestMessage request, CancellationToken c
if (_apiKey != null)
request.Headers.Add("X-Seq-ApiKey", _apiKey);

request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(SeqApiV6MediaType));
request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(SeqApiV7MediaType));

var response = await _httpClient.SendAsync(request, cancellationToken).ConfigureAwait(false);
var stream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false);
Expand Down
35 changes: 28 additions & 7 deletions src/Seq.Api/Model/AppInstances/AppInstanceEntity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,42 @@ public AppInstanceEntity()
Metrics = new AppInstanceMetricsPart();
}

public string Title { get; set; }
public bool IsManualInputOnly { get; set; }
public string AppId { get; set; }
public string Title { get; set; }
public Dictionary<string, string> Settings { get; set; }

/// <summary>
/// If <c>true</c>, administrative users may invoke the app manually or through alerts.
/// This field is read-only from the API and generally indicates that the app is an input.
/// </summary>
public bool AcceptPrivilegedInvocation { get; set; }

/// <summary>
/// If <c>true</c>, regular users can manually send events to the app, or use the app
/// as the target for alert notifications.
/// </summary>
public bool AcceptDirectInvocation { get; set; }
public List<string> InvocationOverridableSettings { get; set; }
public TimeSpan? ArrivalWindow { get; set; }
public List<AppSettingPart> InvocationOverridableSettingDefinitions { get; set; }

/// <summary>
/// If <c>true</c>, events will be streamed to the app.
/// </summary>
public bool AcceptStreamedEvents { get; set; }
public SignalExpressionPart InputSignalExpression { get; set; }
public bool DisallowManualInput { get; set; }
public int ChannelCapacity { get; set; }
public TimeSpan? ArrivalWindow { get; set; }
public TimeSpan SuppressionTime { get; set; }
public int EventsPerSuppressionWindow { get; set; }

public List<AppSettingPart> InvocationOverridableSettingDefinitions { get; set; }

[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]
public AppInstanceMetricsPart Metrics { get; set; }

[Obsolete("Use !AcceptStreamedEvents instead. This field will be removed in Seq 6.0.")]
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]
public bool? IsManualInputOnly { get; set; }

[Obsolete("Use !AcceptDirectInvocation instead. This field will be removed in Seq 6.0.")]
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]
public bool? DisallowManualInput { get; set; }
}
}
17 changes: 6 additions & 11 deletions src/Seq.Api/Model/Apps/AppEntity.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using Newtonsoft.Json;

namespace Seq.Api.Model.Apps
{
Expand All @@ -8,28 +9,22 @@ public class AppEntity : Entity
public AppEntity()
{
Name = "New App";
#pragma warning disable CS0618 // Type or member is obsolete
AssemblyNames = new List<string>();
AvailableSettings = new List<AppSettingPart>();
#pragma warning restore CS0618 // Type or member is obsolete
}

public string Name { get; set; }

public string Description { get; set; }

[Obsolete("Packages must be installed via a feed.")]
public string MainReactorTypeName { get; set; }

[Obsolete("Packages must be installed via a feed.")]
public List<string> AssemblyNames { get; set; }

public List<AppSettingPart> AvailableSettings { get; set; }

public bool AllowReprocessing { get; set; }

public bool IsReadOnly { get; set; }

public AppPackagePart Package { get; set; }

/// <summary>
/// If <c>true</c>, the app produces an input stream and does not accept events itself.
/// </summary>
public bool IsInput { get; set; }
}
}
1 change: 1 addition & 0 deletions src/Seq.Api/Model/License/LicenseEntity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ public class LicenseEntity : Entity
public string StatusDescription { get; set; }
public bool IsWarning { get; set; }
public bool CanRenewOnlineNow { get; set; }
public int? LicensedUsers { get; set; }
}
}
3 changes: 3 additions & 0 deletions src/Seq.Api/Model/Monitoring/ChartQueryPart.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,8 @@ public class ChartQueryPart
public List<string> GroupBy { get; set; } = new List<string>();
public MeasurementDisplayStylePart DisplayStyle { get; set; } = new MeasurementDisplayStylePart();
public List<AlertPart> Alerts { get; set; } = new List<AlertPart>();
public string Having { get; set; }
public List<string> OrderBy { get; set; } = new List<string>();
public int? Limit { get; set; }
}
}
3 changes: 2 additions & 1 deletion src/Seq.Api/Model/Monitoring/MeasurementDisplayType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ public enum MeasurementDisplayType
Bar,
Point,
Value,
Pie
Pie,
Table
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public async Task<RetentionPolicyEntity> TemplateAsync(CancellationToken cancell

public async Task<RetentionPolicyEntity> AddAsync(RetentionPolicyEntity entity, CancellationToken cancellationToken = default)
{
return await Client.PostAsync<RetentionPolicyEntity, RetentionPolicyEntity>(entity, "Create", entity, cancellationToken: cancellationToken).ConfigureAwait(false);
return await GroupCreateAsync<RetentionPolicyEntity, RetentionPolicyEntity>(entity, cancellationToken: cancellationToken).ConfigureAwait(false);
}

public async Task RemoveAsync(RetentionPolicyEntity entity, CancellationToken cancellationToken = default)
Expand Down
5 changes: 0 additions & 5 deletions src/Seq.Api/ResourceGroups/SettingsResourceGroup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@ public async Task<SettingEntity> FindNamedAsync(SettingName name, CancellationTo
return await GroupGetAsync<SettingEntity>(name.ToString(), cancellationToken: cancellationToken).ConfigureAwait(false);
}

public async Task<List<SettingEntity>> ListAsync(CancellationToken cancellationToken = default)
{
return await GroupListAsync<SettingEntity>("Items", cancellationToken: cancellationToken).ConfigureAwait(false);
}

public async Task<SettingEntity> TemplateAsync(CancellationToken cancellationToken = default)
{
return await GroupGetAsync<SettingEntity>("Template", cancellationToken: cancellationToken).ConfigureAwait(false);
Expand Down
17 changes: 7 additions & 10 deletions src/Seq.Api/Seq.Api.csproj
Original file line number Diff line number Diff line change
@@ -1,27 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Description>Client library for the Seq HTTP API.</Description>
<VersionPrefix>5.0.0</VersionPrefix>
<VersionPrefix>5.1.0</VersionPrefix>
<Authors>Datalust;Contributors</Authors>
<TargetFrameworks>netstandard1.3;net46;netstandard2.0</TargetFrameworks>
<NoWarn>$(NoWarn);CS1591;CS1573</NoWarn>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<NoWarn>$(NoWarn);CS1591</NoWarn>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AssemblyName>Seq.Api</AssemblyName>
<PackageId>Seq.Api</PackageId>
<PackageTags>seq</PackageTags>
<Copyright>Copyright © 2014-2018 Datalust Pty Ltd and Contributors</Copyright>
<PackageIconUrl>https://getseq.net/images/seq-nuget.png</PackageIconUrl>
<Copyright>Copyright © 2014-2019 Datalust Pty Ltd and Contributors</Copyright>
<PackageIconUrl>https://datalust.co/images/seq-nuget.png</PackageIconUrl>
<PackageProjectUrl>https://github.com/datalust/seq-api</PackageProjectUrl>
<PackageLicenseUrl>http://www.apache.org/licenses/LICENSE-2.0</PackageLicenseUrl>
<RootNamespace>Seq.Api</RootNamespace>
<LangVersion>7.1</LangVersion>
<LangVersion>7.3</LangVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
<PackageReference Include="System.Net.WebSockets.Client" Version="4.3.2" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.1" />
<PackageReference Include="Tavis.UriTemplates" Version="1.1.1" />
<PackageReference Include="System.Collections.Concurrent" Version="4.3.0" />
<PackageReference Include="System.Net.Http" Version="4.3.3" />
</ItemGroup>
</Project>
4 changes: 2 additions & 2 deletions test/Seq.Api.Tests/Seq.Api.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net46;netcoreapp2.0</TargetFrameworks>
<TargetFrameworks>net461;netcoreapp2.2</TargetFrameworks>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
</PropertyGroup>

Expand All @@ -15,7 +15,7 @@
<PackageReference Include="xunit" Version="2.3.1" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net46' ">
<ItemGroup Condition=" '$(TargetFramework)' == 'net461' ">
<Reference Include="System" />
<Reference Include="Microsoft.CSharp" />
</ItemGroup>
Expand Down