File tree Expand file tree Collapse file tree 3 files changed +26
-10
lines changed
BlogEngine.NET/admin/app/dashboard Expand file tree Collapse file tree 3 files changed +26
-10
lines changed Original file line number Diff line number Diff line change @@ -102,11 +102,11 @@ public List<QuickNote> Notes
102
102
/// <summary>
103
103
/// Log items counter
104
104
/// </summary>
105
- public List < SelectOption > Logs
105
+ public string Logs
106
106
{
107
107
get
108
108
{
109
- return GetLogFile ( ) . ToList ( ) ;
109
+ return GetLogFile ( ) ;
110
110
}
111
111
}
112
112
@@ -216,7 +216,7 @@ private void LoadTrash()
216
216
Trash = _trash ;
217
217
}
218
218
219
- IEnumerable < SelectOption > GetLogFile ( )
219
+ IEnumerable < SelectOption > GetLogs ( )
220
220
{
221
221
string fileLocation = HostingEnvironment . MapPath ( Path . Combine ( BlogConfig . StorageLocation , "logger.txt" ) ) ;
222
222
var items = new List < SelectOption > ( ) ;
@@ -259,6 +259,24 @@ IEnumerable<SelectOption> GetLogFile()
259
259
}
260
260
}
261
261
262
+ string GetLogFile ( )
263
+ {
264
+ string fileLocation = HostingEnvironment . MapPath ( Path . Combine ( BlogConfig . StorageLocation , "logger.txt" ) ) ;
265
+ var items = new List < SelectOption > ( ) ;
266
+
267
+ if ( File . Exists ( fileLocation ) )
268
+ {
269
+ using ( var sw = new StreamReader ( fileLocation ) )
270
+ {
271
+ return sw . ReadToEnd ( ) ;
272
+ }
273
+ }
274
+ else
275
+ {
276
+ return string . Empty ;
277
+ }
278
+ }
279
+
262
280
#endregion
263
281
}
264
282
}
Original file line number Diff line number Diff line change 19
19
[ assembly: CLSCompliant ( false ) ]
20
20
[ assembly: ComVisible ( false ) ]
21
21
[ assembly: AllowPartiallyTrustedCallers ]
22
- [ assembly: AssemblyVersion ( "3.1.4.0 " ) ]
22
+ [ assembly: AssemblyVersion ( "3.1.4.1 " ) ]
23
23
[ assembly: SecurityRules ( SecurityRuleSet . Level1 ) ]
Original file line number Diff line number Diff line change 7
7
< h4 class ="modal-title "> {{lbl.logFile}}</ h4 >
8
8
</ div >
9
9
< div class ="modal-body logs-list ">
10
- < ul class ="list-group ">
11
- < li class ="list-group-item " data-ng-repeat ="log in vm.Logs ">
12
- < div ng-bind-html ="log.OptionValue "> </ div >
13
- </ li >
14
- </ ul >
10
+ < div class ="form-group ">
11
+ < textarea ng-bind ="vm.Logs " rows ="12 " maxlength ="450 " class ="form-control " id ="txtLogs "> </ textarea >
12
+ </ div >
15
13
< div class ="modal-buttons text-right ">
16
14
< button type ="button " data-ng-if ="vm.Logs.length > 0 " data-ng-click ="purgeLog() " class ="btn btn-hasicon btn-danger "> < i class ="fa fa-trash "> </ i > {{lbl.purge}}</ button >
17
15
< button type ="button " class ="btn btn-default " data-dismiss ="modal "> {{lbl.close}}</ button >
@@ -46,7 +44,7 @@ <h4 class="modal-title">{{lbl.trash}}</h4>
46
44
< div class ="page-header clearfix ">
47
45
< div class ="page-title pull-left "> {{lbl.dashboard}}</ div >
48
46
< a ng-click ="openTrash() " ng-if ="vm.Trash.length > 0 " class ="icon-header-dashboard icon-header-trash pull-right " angular-tooltip tooltip ="lbl.trash "> < i class ="fa fa-trash-o "> </ i > < span > {{vm.Trash.length}}</ span > </ a >
49
- < a ng-click ="openLogFile() " ng-if ="vm.Logs.length > 0 " class ="icon-header-dashboard icon-header-logs pull-right " angular-tooltip tooltip ="lbl.logs "> < i class ="fa fa-warning "> </ i > < span > {{vm.Logs.length}} </ span > </ a >
47
+ < a ng-click ="openLogFile() " ng-if ="vm.Logs.length > 0 " class ="icon-header-dashboard icon-header-logs pull-right " angular-tooltip tooltip ="lbl.logs "> < i class ="fa fa-warning "> </ i > </ a >
50
48
</ div >
51
49
< div class ="content-inner content-dashboard ">
52
50
< div class ="version-alert " id ="versionMsg ">
You can’t perform that action at this time.
0 commit comments