<commit_before><mat-card>
  <mat-card-header>
    <h1>Adding node to "{{ clusterName }}"</h1>
  </mat-card-header>
  <mat-card-content>

    <section class="column machines-list">
      <div class="machine"
           *ngFor="let m of machines; let idx = index">
        <mat-form-field *ngIf="(provider$ | async)  === 'aws'">
          <mat-select [disabled]="!availabilityZones"
                      [(value)]="m.availabilityZone"
                      (selectionChange)="onAzChange($event.value)"
                      placeholder="Select an Availability Zone"
                      required>
            <mat-option *ngFor="let a of availabilityZones"
                        [value]="a">{{ a }}</mat-option>
          </mat-select>
        </mat-form-field>


      <mat-form-field class="type">
      <mat-select placeholder="Machine Type (size)"
                  [disabled]="!m.availabilityZone && (provider$ | async)  === 'aws'"
                  [(value)]="m.machineType"
                  (selectionChange)="checkAndSetValidMachineConfig()">
      <mat-option *ngFor="let type of (machineSizes$ | async)"
                  [value]="type">{{ type }}</mat-option>
      </mat-select>
      </mat-form-field>
        <div class="spinner-wrapper">
          <mat-spinner *ngIf="isLoadingMachineTypes"
                     class="progress-spinner"
                     color="primary"
                     [diameter]="20">
        </mat-spinner>
        </div>

          <mat-form-field class="role">
            <mat-select placeholder="Role"
                        [(value)]="m.role"
                        (selectionChange)="checkAndSetValidMachineConfig()">
              <mat-option value="Node">Node</mat-option>
            </mat-select>
          </mat-form-field>

          <mat-form-field class="quantity">
            <input matInput
                   type="number"
                   min="1"
                   placeholder="Q-ty"
                   [(ngModel)]="m.qty"
                   (ngModelChange)="checkAndSetValidMachineConfig()">
          </mat-form-field>
          <div class="delete-machine"
               [hidden]="machines.length === 1"
               (click)="deleteMachine(idx)">
        </div>

      </div>
    </section>

    <section class="column">
      <section class="architecture">
        <mat-form-field>
          <mat-select placeholder="Arch"
                      [value]="clusterOptions.archs[0]">
            <mat-option *ngFor="let a of clusterOptions.archs"
                        [value]="a">{{ a }}</mat-option>
          </mat-select>
        </mat-form-field>


        <mat-form-field>
          <mat-select placeholder="Operating System"
                      [value]="clusterOptions.operatingSystems[0]">
            <mat-option *ngFor="let os of clusterOptions.operatingSystems"
                        [value]="os">{{ os }}</mat-option>
          </mat-select>
        </mat-form-field>

        <mat-form-field>
          <mat-select placeholder="Ubuntu Version"
                      [value]="clusterOptions.ubuntuVersions[0]">
            <mat-option *ngFor="let u of clusterOptions.ubuntuVersions"
                        [value]="u">{{ u }}</mat-option>
          </mat-select>
        </mat-form-field>
      </section>
    </section>
  </mat-card-content>

  <p *ngIf="displayMachineConfigError"
     class="warning">Current machine configuration is invalid. Please check that each machine has a type, role, and
                     valid quantity.</p>

  <mat-card-actions>
    <div class="add-machines"
         (click)="addBlankMachine()">
      <div class="add-machine-btn"></div>
      <span>Add more machines</span>
    </div>

    <div>
      <button mat-raised-button
              color="primary"
              class="submit-btn"
              (click)="finish()"
              [disabled]="!validMachinesConfig">
        <span [hidden]="isProcessing">Finish</span>
        <mat-progress-spinner [diameter]="24"
                              [mode]="'indeterminate'"
                              [color]="'warn'"
                              [hidden]="!isProcessing"></mat-progress-spinner>
      </button>
    </div>
  </mat-card-actions>
</mat-card>
<commit_msg>github #1046 Spamming adding node button adds many a node (#1106)<commit_after><mat-card>
  <mat-card-header>
    <h1>Adding node to "{{ clusterName }}"</h1>
  </mat-card-header>
  <mat-card-content>

    <section class="column machines-list">
      <div class="machine"
           *ngFor="let m of machines; let idx = index">
        <mat-form-field *ngIf="(provider$ | async)  === 'aws'">
          <mat-select [disabled]="!availabilityZones"
                      [(value)]="m.availabilityZone"
                      (selectionChange)="onAzChange($event.value)"
                      placeholder="Select an Availability Zone"
                      required>
            <mat-option *ngFor="let a of availabilityZones"
                        [value]="a">{{ a }}</mat-option>
          </mat-select>
        </mat-form-field>


      <mat-form-field class="type">
      <mat-select placeholder="Machine Type (size)"
                  [disabled]="!m.availabilityZone && (provider$ | async)  === 'aws'"
                  [(value)]="m.machineType"
                  (selectionChange)="checkAndSetValidMachineConfig()">
      <mat-option *ngFor="let type of (machineSizes$ | async)"
                  [value]="type">{{ type }}</mat-option>
      </mat-select>
      </mat-form-field>
        <div class="spinner-wrapper">
          <mat-spinner *ngIf="isLoadingMachineTypes"
                     class="progress-spinner"
                     color="primary"
                     [diameter]="20">
        </mat-spinner>
        </div>

          <mat-form-field class="role">
            <mat-select placeholder="Role"
                        [(value)]="m.role"
                        (selectionChange)="checkAndSetValidMachineConfig()">
              <mat-option value="Node">Node</mat-option>
            </mat-select>
          </mat-form-field>

          <mat-form-field class="quantity">
            <input matInput
                   type="number"
                   min="1"
                   placeholder="Q-ty"
                   [(ngModel)]="m.qty"
                   (ngModelChange)="checkAndSetValidMachineConfig()">
          </mat-form-field>
          <div class="delete-machine"
               [hidden]="machines.length === 1"
               (click)="deleteMachine(idx)">
        </div>

      </div>
    </section>

    <section class="column">
      <section class="architecture">
        <mat-form-field>
          <mat-select placeholder="Arch"
                      [value]="clusterOptions.archs[0]">
            <mat-option *ngFor="let a of clusterOptions.archs"
                        [value]="a">{{ a }}</mat-option>
          </mat-select>
        </mat-form-field>


        <mat-form-field>
          <mat-select placeholder="Operating System"
                      [value]="clusterOptions.operatingSystems[0]">
            <mat-option *ngFor="let os of clusterOptions.operatingSystems"
                        [value]="os">{{ os }}</mat-option>
          </mat-select>
        </mat-form-field>

        <mat-form-field>
          <mat-select placeholder="Ubuntu Version"
                      [value]="clusterOptions.ubuntuVersions[0]">
            <mat-option *ngFor="let u of clusterOptions.ubuntuVersions"
                        [value]="u">{{ u }}</mat-option>
          </mat-select>
        </mat-form-field>
      </section>
    </section>
  </mat-card-content>

  <p *ngIf="displayMachineConfigError"
     class="warning">Current machine configuration is invalid. Please check that each machine has a type, role, and
                     valid quantity.</p>

  <mat-card-actions>
    <div class="add-machines"
         (click)="addBlankMachine()">
      <div class="add-machine-btn"></div>
      <span>Add more machines</span>
    </div>

    <div>
      <button mat-raised-button
              color="primary"
              class="submit-btn"
              (click)="finish()"
              [disabled]="!validMachinesConfig || isProcessing">
        <span [hidden]="isProcessing">Finish</span>
        <mat-progress-spinner [diameter]="24"
                              [mode]="'indeterminate'"
                              [color]="'warn'"
                              [hidden]="!isProcessing"></mat-progress-spinner>
      </button>
    </div>
  </mat-card-actions>
</mat-card>

{'fraction_non_alphanumeric': 0.1530921820303384, 'fraction_numerical': 0.003500583430571762, 'mean_word_length': 1.6826291079812206, 'pattern_counts': {'":': 0, '<': 161, '<?xml version=': 0, '>': 161, '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': '7661577', 'n_tokens_mistral': 2494, 'n_tokens_neox': 2334, 'n_words': 415}