<commit_before>import { Component, Inject } from '@angular/core';
import { DiffusionService } from './diffusion.service';
import { Router } from '@angular/router';
import { StackService } from './stack.service';
import * as diffusion from 'diffusion';
import {SessionOptions} from "diffusion/src/typescript/options";

@Component({
  template: `<div class="col-md-10">
    <div class="panel panel-default">
        <div class="panel-heading">
            <h3 class="panel-title">Login</h3>
        </div>
        <div class="panel-body">
            <div *ngIf="!loadedSecurely" class="alert alert-danger" role="alert">
                <span class="fa fa-exclamation" aria-hidden="true"></span>
                <span class="sr-only">Error:</span>
                Not loading web interface over TLS.
            </div>
            <div *ngIf="!diffusionConfig.secure" class="alert alert-danger" role="alert">
                <span class="fa fa-exclamation" aria-hidden="true"></span>
                <span class="sr-only">Error:</span>
                Not connecting to Diffusion server over TLS.
            </div>
            <form *ngIf="active" #loginForm="ngForm" (ngSubmit)="doLogin()" class="form-horizontal">
                <div class="form-group" [class.has-error]="!username.valid && !username.pristine">
                    <label for="username" class="col-sm-2 control-label">Username</label>
                    <div class="col-sm-4">
                        <input id="username" required [(ngModel)]="user.username" name="username" #username="ngModel" class="form-control"><commit_msg>Correctly import symbol from the Diffusion client.<commit_after>import { Component, Inject } from '@angular/core';
import { DiffusionService } from './diffusion.service';
import { Router } from '@angular/router';
import { StackService } from './stack.service';
import * as diffusion from 'diffusion';
import {SessionOptions} from 'diffusion';

@Component({
  template: `<div class="col-md-10">
    <div class="panel panel-default">
        <div class="panel-heading">
            <h3 class="panel-title">Login</h3>
        </div>
        <div class="panel-body">
            <div *ngIf="!loadedSecurely" class="alert alert-danger" role="alert">
                <span class="fa fa-exclamation" aria-hidden="true"></span>
                <span class="sr-only">Error:</span>
                Not loading web interface over TLS.
            </div>
            <div *ngIf="!diffusionConfig.secure" class="alert alert-danger" role="alert">
                <span class="fa fa-exclamation" aria-hidden="true"></span>
                <span class="sr-only">Error:</span>
                Not connecting to Diffusion server over TLS.
            </div>
            <form *ngIf="active" #loginForm="ngForm" (ngSubmit)="doLogin()" class="form-horizontal">
                <div class="form-group" [class.has-error]="!username.valid && !username.pristine">
                    <label for="username" class="col-sm-2 control-label">Username</label>
                    <div class="col-sm-4">
                        <input id="username" required [(ngModel)]="user.username" name="username" #username="ngModel" class="form-control">
{'fraction_non_alphanumeric': 0.1588785046728972, 'fraction_numerical': 0.003738317757009346, 'mean_word_length': 2.653014789533561, 'pattern_counts': {'":': 0, '<': 53, '<?xml version=': 0, '>': 53, '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': '6987480', 'n_tokens_mistral': 916, 'n_tokens_neox': 874, 'n_words': 203}