File tree 4 files changed +32
-25
lines changed
test/SeqCli.EndToEnd/Dashboard 4 files changed +32
-25
lines changed Original file line number Diff line number Diff line change @@ -8,14 +8,8 @@ EndProject
8
8
Project ("{2150E333-8FDC-42A3-9474-1A3956D46DE8}" ) = "sln" , "sln" , "{2EA56595-519F-4DD5-9E94-CCC43E3DF624}"
9
9
Project Section (SolutionItems ) = preProject
10
10
.gitignore = .gitignore
11
- appveyor .yml = appveyor .yml
12
- Build .ps1 = Build .ps1
13
11
LICENSE = LICENSE
14
12
README .md = README .md
15
- setup .sh = setup .sh
16
- Build .Docker .ps1 = Build .Docker .ps1
17
- docker -publish .ps1 = docker -publish .ps1
18
- Setup .ps1 = Setup .ps1
19
13
CONTRIBUTING .md = CONTRIBUTING .md
20
14
ci .global .json = ci .global .json
21
15
EndProject Section
Original file line number Diff line number Diff line change @@ -85,23 +85,36 @@ protected override async Task<int> Run()
85
85
if ( ! string . IsNullOrWhiteSpace ( _filter ) )
86
86
filter = ( await connection . Expressions . ToStrictAsync ( _filter ) ) . StrictExpression ;
87
87
88
- var search = _noWebSockets ?
89
- connection . Events . PagedEnumerateAsync ( null ,
90
- _signal . Signal ,
91
- filter ,
92
- _count ,
93
- fromDateUtc : _range . Start ,
94
- toDateUtc : _range . End ,
95
- trace : _trace ) :
96
- connection . Events . EnumerateAsync ( null ,
97
- _signal . Signal ,
98
- filter ,
99
- _count ,
100
- fromDateUtc : _range . Start ,
101
- toDateUtc : _range . End ,
102
- trace : _trace ) ;
88
+ try
89
+ {
90
+ if ( ! _noWebSockets )
91
+ {
92
+ await foreach ( var evt in connection . Events . EnumerateAsync ( null ,
93
+ _signal . Signal ,
94
+ filter ,
95
+ _count ,
96
+ fromDateUtc : _range . Start ,
97
+ toDateUtc : _range . End ,
98
+ trace : _trace ) )
99
+ {
100
+ output . Write ( ToSerilogEvent ( evt ) ) ;
101
+ }
102
+
103
+ return 0 ;
104
+ }
105
+ }
106
+ catch ( NotSupportedException nse )
107
+ {
108
+ Log . Information ( nse , "WebSockets not supported; falling back to paged search" ) ;
109
+ }
103
110
104
- await foreach ( var evt in search )
111
+ await foreach ( var evt in connection . Events . PagedEnumerateAsync ( null ,
112
+ _signal . Signal ,
113
+ filter ,
114
+ _count ,
115
+ fromDateUtc : _range . Start ,
116
+ toDateUtc : _range . End ,
117
+ trace : _trace ) )
105
118
{
106
119
output . Write ( ToSerilogEvent ( evt ) ) ;
107
120
}
Original file line number Diff line number Diff line change @@ -35,9 +35,9 @@ class OutputFormatFeature : CommandFeature
35
35
public const string DefaultOutputTemplate =
36
36
"[{Timestamp:o} {Level:u3}] {Message:lj} {Properties:j}{NewLine}{Exception}" ;
37
37
38
- public static readonly ConsoleTheme DefaultTheme = SystemConsoleTheme . Literate ;
39
38
public static readonly ConsoleTheme DefaultAnsiTheme = AnsiConsoleTheme . Code ;
40
- static readonly TemplateTheme DefaultTemplateTheme = TemplateTheme . Literate ;
39
+ public static readonly ConsoleTheme DefaultTheme = OperatingSystem . IsWindows ( ) ? SystemConsoleTheme . Literate : DefaultAnsiTheme ;
40
+ static readonly TemplateTheme DefaultTemplateTheme = TemplateTheme . Code ;
41
41
42
42
bool _json , _noColor , _forceColor ;
43
43
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ public Task ExecuteAsync(
19
19
20
20
var id = runner . LastRunProcess . Output . Split ( ' ' ) [ 0 ] ;
21
21
22
- exit = runner . Exec ( "dashboard render" , $ "-i { id } -c \" All Events\" --last 1d --by 1h") ;
22
+ exit = runner . Exec ( "dashboard render" , $ "-i { id } -c \" All Events\" --last 1d --by 1h --no-color ") ;
23
23
Assert . Equal ( 0 , exit ) ;
24
24
25
25
var lines = new StringReader ( runner . LastRunProcess . Output ) ;
You can’t perform that action at this time.
0 commit comments