[New] Added exception view in operations-log

This commit is contained in:
Robert von Burg 2018-08-08 16:46:51 +02:00
parent 6e734e149a
commit 91999619eb
1 changed files with 39 additions and 1 deletions

View File

@ -75,6 +75,21 @@
padding: 0.3em;
}
.dlg {
width: 100vw;
position: absolute;
top: 0;
left: 0;
}
textarea {
padding: 10px;
margin: 10px;
width: calc(100% - 40px);
height: 100%;
min-height: 300px;
}
</style>
<paper-material elevation="1" class="g-m-3">
@ -156,7 +171,10 @@
<div class="g-2">[[log.id]]</div>
<div class="g-3">[[log.date]]</div>
<div class="g-2">[[log.severity]]</div>
<div class="g-5">[[log.locator]]</div>
<div class="g-4">[[log.locator]]</div>
<div class="g-1">
<paper-icon-button icon="bug-report" on-tap="showException" hidden="[[!log.exception]]"></paper-icon-button>
</div>
</div>
<div class="g-row">
<div class="g-12">
@ -193,6 +211,16 @@
</div>
</paper-dialog>
<paper-dialog id="exDlg" class="dlg" modal>
<h3>Exception</h3>
<textarea value="{{exception::input}}"></textarea>
<div class="buttons">
<paper-button dialog-confirm autofocus>Close</paper-button>
</div>
</paper-dialog>
<iron-ajax id="ajax"
content-type="application/json"
handle-as="json"
@ -235,6 +263,11 @@
observer: 'severityChanged'
},
exception: {
type: String,
value: ''
},
searchTerm: {
type: String,
observer: 'searchTermChanged'
@ -365,6 +398,11 @@
}
},
showException: function (e) {
this.exception = e.model.log.exception;
this.$.exDlg.open();
},
onShowDialog: function (event) {
this.showError(event.detail.title, event.detail.text);
},