<commit_before>﻿import * as React from 'react'
import * as moment from 'moment'
import { RestLogEntity } from '../Signum.Entities.Rest'
import { TypeContext, ValueLine, EntityLine, EntityRepeater } from "@framework/Lines";
import { } from "@framework/ConfigureReactWidgets";
import { RestLogDiff, API } from '../RestClient'
import { DiffDocument } from '../../DiffLog/Templates/DiffDocument';
import * as Navigator from '@framework/Navigator'
import { Tab, UncontrolledTabs } from '@framework/Components/Tabs'
import { Button } from '@framework/Components';

export interface RestLogState {
    diff?: RestLogDiff,
    newURL: string
}

export default class RestLog extends React.Component<{ ctx: TypeContext<RestLogEntity> }, RestLogState> {

    constructor(props: { ctx: TypeContext<RestLogEntity> }) {
        super(props);
        var prefix = Navigator.toAbsoluteUrl("~/api");
        var suffix = props.ctx.subCtx(f => f.url).value.after("/api");
        this.state = {
            newURL: location.protocol + "//" + location.hostname + prefix + suffix
        }
    }

    render() {
        const ctx = this.props.ctx;
        const ctx4 = ctx.subCtx({ labelColumns: 4 });

        return (
            <div><commit_msg>added port number to restlog replay.<commit_after>﻿import * as React from 'react'
import * as moment from 'moment'
import { RestLogEntity } from '../Signum.Entities.Rest'
import { TypeContext, ValueLine, EntityLine, EntityRepeater } from "@framework/Lines";
import { } from "@framework/ConfigureReactWidgets";
import { RestLogDiff, API } from '../RestClient'
import { DiffDocument } from '../../DiffLog/Templates/DiffDocument';
import * as Navigator from '@framework/Navigator'
import { Tab, UncontrolledTabs } from '@framework/Components/Tabs'
import { Button } from '@framework/Components';

export interface RestLogState {
    diff?: RestLogDiff,
    newURL: string
}

export default class RestLog extends React.Component<{ ctx: TypeContext<RestLogEntity> }, RestLogState> {

    constructor(props: { ctx: TypeContext<RestLogEntity> }) {
        super(props);
        var prefix = Navigator.toAbsoluteUrl("~/api");
        var suffix = props.ctx.subCtx(f => f.url).value.after("/api");
        this.state = {
            newURL: `${location.protocol}//${location.hostname}:${location.port}${prefix}${suffix}`
        }
    }

    render() {
        const ctx = this.props.ctx;
        const ctx4 = ctx.subCtx({ labelColumns: 4 });

        return (
            <div>
{'fraction_non_alphanumeric': 0.13690952762209768, 'fraction_numerical': 0.0016012810248198558, 'mean_word_length': 3.4151943462897525, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, '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': '5894245', 'n_tokens_mistral': 711, 'n_tokens_neox': 710, 'n_words': 183}