增加程序异常查看服务器日志窗口增加返回顶端返回底部快速导航按钮
This commit is contained in:
parent
605b0e4e3f
commit
2c4e82f699
|
@ -200,6 +200,17 @@ ul.sidebar-menu {
|
||||||
top: -1px;
|
top: -1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.modal-body .affix {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 95px;
|
||||||
|
right: 50px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-body .affix a {
|
||||||
|
font-size: 20px;
|
||||||
|
margin-top: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
.toolbar {
|
.toolbar {
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
|
|
|
@ -28,7 +28,9 @@ namespace Bootstrap.Admin.Controllers
|
||||||
public IEnumerable<string> Post()
|
public IEnumerable<string> Post()
|
||||||
{
|
{
|
||||||
var filePath = HttpContext.Current.Server.MapPath("~/App_Data/ErrorLog");
|
var filePath = HttpContext.Current.Server.MapPath("~/App_Data/ErrorLog");
|
||||||
return Directory.GetFiles(filePath).Select(f => Path.GetFileNameWithoutExtension(f)).OrderByDescending(s => s);
|
return Directory.GetFiles(filePath)
|
||||||
|
.Where(f => Path.GetExtension(f).Equals(".log", System.StringComparison.OrdinalIgnoreCase))
|
||||||
|
.Select(f => Path.GetFileNameWithoutExtension(f)).OrderByDescending(s => s);
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
|
@ -41,7 +43,7 @@ namespace Bootstrap.Admin.Controllers
|
||||||
if (!File.Exists(logName)) return new { content = string.Empty };
|
if (!File.Exists(logName)) return new { content = string.Empty };
|
||||||
using (StreamReader reader = new StreamReader(logName))
|
using (StreamReader reader = new StreamReader(logName))
|
||||||
{
|
{
|
||||||
return new { content = reader.ReadToEnd().Replace("\r\n", "</br>") };
|
return new { content = reader.ReadToEnd().Replace("<", "<").Replace(">", ">").Replace("\r\n", "</br>") };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -97,7 +97,13 @@
|
||||||
<h4 class="modal-title" id="myDetailModalLabel">程序异常日志窗口</h4>
|
<h4 class="modal-title" id="myDetailModalLabel">程序异常日志窗口</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
<i id="fa-top"></i>
|
||||||
|
<div class="affix" id="myScrollspy">
|
||||||
|
<div><a href="#fa-top" class="fa fa-arrow-circle-up"></a></div>
|
||||||
|
<div><a href="#fa-bottom" class="fa fa-arrow-circle-down"></a></div>
|
||||||
|
</div>
|
||||||
<div id="dataFormDetail"><div class="text-center"><i class="fa fa-spinner fa-pulse fa-3x fa-fw"></i></div></div>
|
<div id="dataFormDetail"><div class="text-center"><i class="fa fa-spinner fa-pulse fa-3x fa-fw"></i></div></div>
|
||||||
|
<i id="fa-bottom"></i>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-default">
|
<button type="button" class="btn btn-default">
|
||||||
|
|
Loading…
Reference in New Issue