File tree Expand file tree Collapse file tree
BlogEngine.NET/admin/app/dashboard Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -102,11 +102,11 @@ public List<QuickNote> Notes
102102 /// <summary>
103103 /// Log items counter
104104 /// </summary>
105- public List < SelectOption > Logs
105+ public string Logs
106106 {
107107 get
108108 {
109- return GetLogFile ( ) . ToList ( ) ;
109+ return GetLogFile ( ) ;
110110 }
111111 }
112112
@@ -216,7 +216,7 @@ private void LoadTrash()
216216 Trash = _trash ;
217217 }
218218
219- IEnumerable < SelectOption > GetLogFile ( )
219+ IEnumerable < SelectOption > GetLogs ( )
220220 {
221221 string fileLocation = HostingEnvironment . MapPath ( Path . Combine ( BlogConfig . StorageLocation , "logger.txt" ) ) ;
222222 var items = new List < SelectOption > ( ) ;
@@ -259,6 +259,24 @@ IEnumerable<SelectOption> GetLogFile()
259259 }
260260 }
261261
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+
262280 #endregion
263281 }
264282}
Original file line number Diff line number Diff line change 1919[ assembly: CLSCompliant ( false ) ]
2020[ assembly: ComVisible ( false ) ]
2121[ assembly: AllowPartiallyTrustedCallers ]
22- [ assembly: AssemblyVersion ( "3.1.4.0 " ) ]
22+ [ assembly: AssemblyVersion ( "3.1.4.1 " ) ]
2323[ assembly: SecurityRules ( SecurityRuleSet . Level1 ) ]
Original file line number Diff line number Diff line change 77 < h4 class ="modal-title "> {{lbl.logFile}}</ h4 >
88 </ div >
99 < 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 >
1513 < div class ="modal-buttons text-right ">
1614 < 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 >
1715 < button type ="button " class ="btn btn-default " data-dismiss ="modal "> {{lbl.close}}</ button >
@@ -46,7 +44,7 @@ <h4 class="modal-title">{{lbl.trash}}</h4>
4644 < div class ="page-header clearfix ">
4745 < div class ="page-title pull-left "> {{lbl.dashboard}}</ div >
4846 < 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 >
5048 </ div >
5149 < div class ="content-inner content-dashboard ">
5250 < div class ="version-alert " id ="versionMsg ">
You can’t perform that action at this time.
0 commit comments