<commit_before>import {Component} from "@angular/core";
import {Observable} from "rxjs";
import {Http, Headers} from "@angular/http";
import {ButtonPainter} from "../../services/buttonpainter";
@Component({
    selector: 'add-history',
    templateUrl: '/static/components/addhistory/addhistory.html'
})
export class AddHistoryComponent {
    private endpoint_exercise_pairs: Observable<any>;
    private endpoint_add_history: Observable<any>;
    private pairs: Array<any>;

    constructor(private http: Http) {
        this.endpoint_exercise_pairs = http.post('/get-valid-id-exercise-pairs', '');
    }

    ngOnInit() {
        this.endpoint_exercise_pairs.subscribe(
            data => {
                this.pairs = data.json().pairs;
            },
            err => console.log(err)
        );
    }

    onSubmit(form: any) {
        let value: any = form.value;
        ButtonPainter.paintButtonYellow('#add-history-submit');
        ButtonPainter.disableButton('#add-history-submit');
        let headers: Headers = new Headers();
        headers.append('Content-Type', 'application/json');
        let data: any = {};
        data.history_exercise_id = value.history_exercise_id;
        data.history_sets = value.history_sets;
        data.history_reps = value.history_reps;
        data.history_weight = value.history_weight;
        data.history_date = value.history_date;<commit_msg>Change missed renamed endpoint reference<commit_after>import {Component} from "@angular/core";
import {Observable} from "rxjs";
import {Http, Headers} from "@angular/http";
import {ButtonPainter} from "../../services/buttonpainter";
@Component({
    selector: 'add-history',
    templateUrl: '/static/components/addhistory/addhistory.html'
})
export class AddHistoryComponent {
    private endpoint_exercise_pairs: Observable<any>;
    private endpoint_add_history: Observable<any>;
    private pairs: Array<any>;

    constructor(private http: Http) {
        this.endpoint_exercise_pairs = http.post('/get-valid-rep-id-exercise-pairs', '');
    }

    ngOnInit() {
        this.endpoint_exercise_pairs.subscribe(
            data => {
                this.pairs = data.json().pairs;
            },
            err => console.log(err)
        );
    }

    onSubmit(form: any) {
        let value: any = form.value;
        ButtonPainter.paintButtonYellow('#add-history-submit');
        ButtonPainter.disableButton('#add-history-submit');
        let headers: Headers = new Headers();
        headers.append('Content-Type', 'application/json');
        let data: any = {};
        data.history_exercise_id = value.history_exercise_id;
        data.history_sets = value.history_sets;
        data.history_reps = value.history_reps;
        data.history_weight = value.history_weight;
        data.history_date = value.history_date;
{'fraction_non_alphanumeric': 0.12742675608895165, 'fraction_numerical': 0.0, 'mean_word_length': 2.991549295774648, 'pattern_counts': {'":': 0, '<': 9, '<?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': '2881679', 'n_tokens_mistral': 831, 'n_tokens_neox': 803, 'n_words': 151}