|
@@ -66,6 +66,10 @@
|
|
v-if="Object.keys(log.data).length !== 0"
|
|
v-if="Object.keys(log.data).length !== 0"
|
|
name="riFileTextLine"
|
|
name="riFileTextLine"
|
|
class="cursor-pointer"
|
|
class="cursor-pointer"
|
|
|
|
+ @click="
|
|
|
|
+ exportDataModal.show = true;
|
|
|
|
+ exportDataModal.log = log;
|
|
|
|
+ "
|
|
/>
|
|
/>
|
|
<v-remixicon
|
|
<v-remixicon
|
|
name="riDeleteBin7Line"
|
|
name="riDeleteBin7Line"
|
|
@@ -78,6 +82,10 @@
|
|
</tr>
|
|
</tr>
|
|
</tbody>
|
|
</tbody>
|
|
</table>
|
|
</table>
|
|
|
|
+ <ui-modal v-model="exportDataModal.show">
|
|
|
|
+ <template #header> Data </template>
|
|
|
|
+ <logs-export-data :log="exportDataModal.log" />
|
|
|
|
+ </ui-modal>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<script setup>
|
|
<script setup>
|
|
@@ -85,6 +93,7 @@ import { shallowReactive, computed } from 'vue';
|
|
import { useStore } from 'vuex';
|
|
import { useStore } from 'vuex';
|
|
import dayjs from '@/lib/dayjs';
|
|
import dayjs from '@/lib/dayjs';
|
|
import Log from '@/models/log';
|
|
import Log from '@/models/log';
|
|
|
|
+import LogsExportData from '@/components/newtab/logs/LogsExportData.vue';
|
|
|
|
|
|
const filters = ['all', 'success', 'stopped', 'error'];
|
|
const filters = ['all', 'success', 'stopped', 'error'];
|
|
const sorts = [
|
|
const sorts = [
|
|
@@ -105,6 +114,10 @@ const state = shallowReactive({
|
|
sortOrder: 'desc',
|
|
sortOrder: 'desc',
|
|
sortBy: 'startedAt',
|
|
sortBy: 'startedAt',
|
|
});
|
|
});
|
|
|
|
+const exportDataModal = shallowReactive({
|
|
|
|
+ show: false,
|
|
|
|
+ log: {},
|
|
|
|
+});
|
|
|
|
|
|
const logs = computed(() =>
|
|
const logs = computed(() =>
|
|
Log.query()
|
|
Log.query()
|
|
@@ -134,8 +147,7 @@ function getDuration(started, ended) {
|
|
const seconds = parseInt(duration % 60, 10);
|
|
const seconds = parseInt(duration % 60, 10);
|
|
|
|
|
|
const getText = (num, suffix) => (num > 0 ? `${num}${suffix}` : '');
|
|
const getText = (num, suffix) => (num > 0 ? `${num}${suffix}` : '');
|
|
- console.log(duration, minutes, seconds);
|
|
|
|
- console.log(started, ended);
|
|
|
|
|
|
+
|
|
return `${getText(minutes, 'm')} ${getText(seconds, 's')}`;
|
|
return `${getText(minutes, 'm')} ${getText(seconds, 's')}`;
|
|
}
|
|
}
|
|
function deleteLog(id) {
|
|
function deleteLog(id) {
|