<commit_before>﻿import { Component } from 'vue-property-decorator';
import Vue from 'vue';
import { DefaultSortOptions, ElTable } from 'element-ui/types/table';
import MessagesController from "../ApiClient/MessagesController";
import MessageSummary from "../ApiClient/MessageSummary";
import * as moment from 'moment';
import HubConnectionManager from '../HubConnectionManager';
import sortedArraySync from '../sortedArraySync';
import { Mutex } from 'async-mutex';
import Message from '../ApiClient/Message';


@Component({
    components: {
        hubconnstatus: (<any>require('./hubconnectionstatus.vue.html')).default
    }
})
export default class MessageList extends Vue {


    constructor() {
        super();

        if (Notification.permission == "default") {
            Notification.requestPermission();
        }

        this.connection = new HubConnectionManager('/hubs/messages', this.refresh);
        this.connection.on('messageschanged', () => {
            this.refresh();
        });
        this.connection.start();

        
    }

    private selectedSortDescending: boolean = true;
    private selectedSortColumn: string = "receivedDate";

    connection: HubConnectionManager;
    messages: MessageSummary[] = [];
    error: Error | null = null;
    selectedmessage: MessageSummary | null = null;
    loading = false;

    handleCurrentChange(message: MessageSummary | null): void {
        this.selectedmessage = message;
        this.$emit("selected-message-changed", message);
    }

    formatDate(row: number, column: number, cellValue: string, index: number): string {
        return moment(String(cellValue)).format('YYYY-DD-MM hh:mm:ss');
    }<commit_msg>Changes to the date format for messagelist.<commit_after>﻿import { Component } from 'vue-property-decorator';
import Vue from 'vue';
import { DefaultSortOptions, ElTable } from 'element-ui/types/table';
import MessagesController from "../ApiClient/MessagesController";
import MessageSummary from "../ApiClient/MessageSummary";
import * as moment from 'moment';
import HubConnectionManager from '../HubConnectionManager';
import sortedArraySync from '../sortedArraySync';
import { Mutex } from 'async-mutex';
import Message from '../ApiClient/Message';


@Component({
    components: {
        hubconnstatus: (<any>require('./hubconnectionstatus.vue.html')).default
    }
})
export default class MessageList extends Vue {


    constructor() {
        super();

        if (Notification.permission == "default") {
            Notification.requestPermission();
        }

        this.connection = new HubConnectionManager('/hubs/messages', this.refresh);
        this.connection.on('messageschanged', () => {
            this.refresh();
        });
        this.connection.start();

        
    }

    private selectedSortDescending: boolean = true;
    private selectedSortColumn: string = "receivedDate";

    connection: HubConnectionManager;
    messages: MessageSummary[] = [];
    error: Error | null = null;
    selectedmessage: MessageSummary | null = null;
    loading = false;

    handleCurrentChange(message: MessageSummary | null): void {
        this.selectedmessage = message;
        this.$emit("selected-message-changed", message);
    }

    formatDate(row: number, column: number, cellValue: string, index: number): string {
        return moment(String(cellValue)).format('YYYY-MM-DD HH:mm:ss');
    }
{'fraction_non_alphanumeric': 0.12690504103165298, 'fraction_numerical': 0.0, 'mean_word_length': 3.4324675324675327, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2362569', 'n_tokens_mistral': 884, 'n_tokens_neox': 856, 'n_words': 220}