|
@@ -299,12 +299,12 @@
|
|
|
</a-form-item>
|
|
|
<a-form-item>
|
|
|
<a-button type="primary" style="margin-bottom: 10px;"
|
|
|
- :href="'data:application/text;charset=utf-8,' + encodeURIComponent(logModal.logs)" download="x-ui.log">
|
|
|
+ :href="'data:application/text;charset=utf-8,' + encodeURIComponent(logModal.logs.join('\n'))" download="x-ui.log">
|
|
|
{{ i18n "download" }} x-ui.log
|
|
|
</a-button>
|
|
|
</a-form-item>
|
|
|
</a-form>
|
|
|
- <div class="ant-input" style="height: auto; max-height: 500px; overflow: auto;" v-html="logModal.logs"></div>
|
|
|
+ <div class="ant-input" style="height: auto; max-height: 500px; overflow: auto;" v-html="logModal.formattedLogs"></div>
|
|
|
</a-modal>
|
|
|
|
|
|
<a-modal id="backup-modal" v-model="backupModal.visible" :title="backupModal.title"
|
|
@@ -432,14 +432,16 @@
|
|
|
|
|
|
const logModal = {
|
|
|
visible: false,
|
|
|
- logs: '',
|
|
|
+ logs: [],
|
|
|
+ formattedLogs: '',
|
|
|
rows: 20,
|
|
|
level: 'info',
|
|
|
syslog: false,
|
|
|
loading: false,
|
|
|
show(logs) {
|
|
|
this.visible = true;
|
|
|
- this.logs = logs? this.formatLogs(logs) : "No Record...";
|
|
|
+ this.logs = logs;
|
|
|
+ this.formattedLogs = logs.length > 0 ? this.formatLogs(logs) : "No Record...";
|
|
|
},
|
|
|
formatLogs(logs) {
|
|
|
let formattedLogs = '';
|