<commit_before><div class="container-fluid">
  <h3 class="mt-4 mb-3">Sessions</h3>

  <div class="row">
    <div class="col">

      <!-- new session and import sessions buttons -->
      <div class="mt-2 mb-4">
        <button class="btn btn-sm btn-info mr-2" (click)="createSession()">
          <span class="fas fa-plus" aria-hidden="true"></span>
          New session
        </button>
        <ch-open-session-file (done)="sessionsUploaded($event)"></ch-open-session-file>
      </div>

      <!-- session list -->
      <div class="session-list">
        <div *ngFor="let sharedByUsername of sessionsByUserKeys">

          <!-- sessions section header (Your sessions, Example sessions...) -->
          <h5>{{getSharedByTitlePart(sharedByUsername)}}
            <i>{{getSharedByUsernamePart(sharedByUsername)}}</i>
          </h5>

          <!-- info text if no personal sessions -->
          <table *ngIf="noPersonalSessions && sharedByUsername === null" class="table table-sm">
            <tbody>
              <tr class="session-list-item">
                <td style="font-size: smaller"><i>No sessions yet.</i></td>
              </tr>
            </tbody>
          </table>

          <!-- session rows -->
          <table class="table table-sm" [ngClass]="{'table-hover': !selectionDisabled}">
            <tbody>
              <tr *ngFor="let session of sessionsByUser.get(sharedByUsername)" (mouseover)="onSessionMouseover(session)"
                (mouseout)="onSessionMouseout(session)" (click)="onSessionClick(session)"
                [ngClass]="{'highlight': rowHighlighted(session)}" class="session-list-item"
                [title]="getSessionRowTitle()">
                <td>
                  <!-- session name -->
                  <span>{{session.name}}

                    <!-- buttons -->
                    <span *ngIf="!this.deletingSessions.has(session)">
                      <!-- delete button -->
                      <button class="btn btn-sm btn-outline-dark btn-no-border hidden float-right"
                        [ngClass]="{'visible-button': buttonsVisible(session) && this.sessionDataService.hasPersonalRule(session.rules)}"
                        (click)="deleteSession(session); sessionDropdown.close(); $event.stopImmediatePropagation(); "
                        title="Delete">
                        <span class="fas fa-times "></span>
                      </button>

                      <!-- context menu button -->
                      <div ngbDropdown #sessionDropdown="ngbDropdown" class="float-right d-inline-block"
                        placement="bottom-right" (openChange)="sessionMenuOpenChange($event)">
                        <button (click)="$event.stopImmediatePropagation();"
                          [ngClass]="{'visible-button': buttonsVisible(session)}"
                          [ngClass]="{'show-on-row-hover': !selectionDisabled}"
                          class="btn btn-sm btn-outline-dark btn-no-border hidden float-right" id="sessionDropdown"
                          title="Actions" ngbDropdownToggle>
                          <i class="fas fa-ellipsis-h" aria-hidden="true"></i></button>
                        <div ngbDropdownMenu aria-labelledby="sessionDropdown" class="dropdown-menu-left">
                          <button class="dropdown-item"
                            (click)="$event.stopImmediatePropagation();sessionDropdown.toggle();rename(session)"
                            [disabled]="sessionDataService.isReadOnlySession(session)">Rename&hellip;</button>
                          <button class="dropdown-item"
                            (click)="$event.stopImmediatePropagation();sessionDropdown.toggle();notes(session)">{{getNotesButtonText(session)}}&hellip;</button>
                          <button class="dropdown-item"
                            (click)="$event.stopImmediatePropagation();sessionDropdown.toggle();duplicate(session)">Duplicate&hellip;</button>
                          <button class="dropdown-item"
                            (click)="$event.stopImmediatePropagation();sessionDropdown.toggle();share(session)"
                            [disabled]="sessionDataService.isReadOnlySession(session)">Share&hellip;</button>
                          <button class="dropdown-item"
                            (click)="$event.stopImmediatePropagation();sessionDropdown.toggle();download(session)">Download</button>
                        </div>
                      </div>
                    </span>

                    <!-- preview button -->
                    <button *ngIf="mode === SessionListMode.CLICK_TO_OPEN_BUTTON_TO_PREVIEW"
                      (click)="$event.stopImmediatePropagation();selectSession(session)"
                      [ngClass]="{'visible-button': buttonsVisible(session)}"
                      [ngClass]="{'show-on-row-hover': !selectionDisabled}"
                      class="btn btn-sm btn-outline-dark btn-no-border hidden float-right" title="Preview">
                      <span class="fas fa-eye"></span>
                    </button>

                    <!-- accept button -->
                    <button *ngIf="isAcceptVisible(sharedByUsername)"
                      (click)="$event.stopImmediatePropagation();acceptSession(session)"
                      [ngClass]="{'visible-button': buttonsVisible(session)}"
                      [ngClass]="{'show-on-row-hover': !selectionDisabled}"
                      class="btn btn-sm btn-secondary hidden float-right mr-3" title="Accept">
                      <!-- <span class="fas fa-play"></span> -->
                      Accept share
                    </button>

                    <!-- open button -->
                    <button *ngIf="mode === SessionListMode.CLICK_TO_PREVIEW_BUTTON_TO_OPEN"
                      (click)="$event.stopImmediatePropagation();openSession(session.sessionId)"
                      [ngClass]="{'visible-button': buttonsVisible(session)}"
                      [ngClass]="{'show-on-row-hover': !selectionDisabled}"
                      class="btn btn-sm btn-secondary hidden float-right mr-3" title="Open">
                      <!-- <span class="fas fa-play"></span> -->
                      Open
                    </button>

                    <!-- deleting text instead of buttons for sessions which are being deleted -->
                    <span *ngIf="deletingSessions.has(session)" class="float-right"
                      style="font-size: smaller; font-style: italic">
                      <!-- use hidden button to keep the row height static -->
                      <button class="btn btn-sm btn-outline-dark btn-no-border hidden">
                        <span class="fas fa-times "></span>
                      </button>
                      Deleting&hellip;
                    </span>

                  </span>
                </td>
              </tr>
            </tbody>
          </table>
          <br>
        </div>
      </div>
    </div>

    <!-- right side panel-->
    <div class="col">

      <div id="workflow-dataset-panel" class="lighter">
        <p *ngIf="mode !== SessionListMode.CLICK_TO_PREVIEW_BUTTON_TO_OPEN">To open a session, click on the session
          name.
        </p>

        <p *ngIf="mode === SessionListMode.CLICK_TO_PREVIEW_BUTTON_TO_OPEN">Click on the session name to see a preview.
        </p>

        <p>Sessions keep your analysis projects organized. They combine together your raw data files and analysis
          results
          and also keep track of the analysis history. This makes it easy to understand afterwards how the data was
          analyzed.
        </p>

        <p>Creating a new session for each experiment is usually a good approach.</p>

        <p>Sessions are stored on the server, but you can download session to a local zip file to have a backup copy of
          your
          data or transfer data between different Chipster servers.</p>
      </div>


      <div id="session-preview" style="position: relative">
        <div id="preview-container" *ngIf="selectedSession ">

          <button *ngIf="mode !== SessionListMode.CLICK_TO_OPEN_HOVER_TO_PREVIEW" id="close-button" class="close"
            aria-label="Close" (click)="closePreview()" title="Close preview">
            <span aria-hidden="true">&times;</span>
          </button>
<commit_msg>Add backup notice to sessions list<commit_after><div class="container-fluid">
  <h3 class="mt-4 mb-3">Sessions</h3>

  <div class="row">
    <div class="col">

      <!-- new session and import sessions buttons -->
      <div class="mt-2 mb-4">
        <button class="btn btn-sm btn-info mr-2" (click)="createSession()">
          <span class="fas fa-plus" aria-hidden="true"></span>
          New session
        </button>
        <ch-open-session-file (done)="sessionsUploaded($event)"></ch-open-session-file>
      </div>

      <!-- session list -->
      <div class="session-list">
        <div *ngFor="let sharedByUsername of sessionsByUserKeys">

          <!-- sessions section header (Your sessions, Example sessions...) -->
          <h5>{{getSharedByTitlePart(sharedByUsername)}}
            <i>{{getSharedByUsernamePart(sharedByUsername)}}</i>
          </h5>

          <!-- info text if no personal sessions -->
          <table *ngIf="noPersonalSessions && sharedByUsername === null" class="table table-sm">
            <tbody>
              <tr class="session-list-item">
                <td style="font-size: smaller"><i>No sessions yet.</i></td>
              </tr>
            </tbody>
          </table>

          <!-- session rows -->
          <table class="table table-sm" [ngClass]="{'table-hover': !selectionDisabled}">
            <tbody>
              <tr *ngFor="let session of sessionsByUser.get(sharedByUsername)" (mouseover)="onSessionMouseover(session)"
                (mouseout)="onSessionMouseout(session)" (click)="onSessionClick(session)"
                [ngClass]="{'highlight': rowHighlighted(session)}" class="session-list-item"
                [title]="getSessionRowTitle()">
                <td>
                  <!-- session name -->
                  <span>{{session.name}}

                    <!-- buttons -->
                    <span *ngIf="!this.deletingSessions.has(session)">
                      <!-- delete button -->
                      <button class="btn btn-sm btn-outline-dark btn-no-border hidden float-right"
                        [ngClass]="{'visible-button': buttonsVisible(session) && this.sessionDataService.hasPersonalRule(session.rules)}"
                        (click)="deleteSession(session); sessionDropdown.close(); $event.stopImmediatePropagation(); "
                        title="Delete">
                        <span class="fas fa-times "></span>
                      </button>

                      <!-- context menu button -->
                      <div ngbDropdown #sessionDropdown="ngbDropdown" class="float-right d-inline-block"
                        placement="bottom-right" (openChange)="sessionMenuOpenChange($event)">
                        <button (click)="$event.stopImmediatePropagation();"
                          [ngClass]="{'visible-button': buttonsVisible(session)}"
                          [ngClass]="{'show-on-row-hover': !selectionDisabled}"
                          class="btn btn-sm btn-outline-dark btn-no-border hidden float-right" id="sessionDropdown"
                          title="Actions" ngbDropdownToggle>
                          <i class="fas fa-ellipsis-h" aria-hidden="true"></i></button>
                        <div ngbDropdownMenu aria-labelledby="sessionDropdown" class="dropdown-menu-left">
                          <button class="dropdown-item"
                            (click)="$event.stopImmediatePropagation();sessionDropdown.toggle();rename(session)"
                            [disabled]="sessionDataService.isReadOnlySession(session)">Rename&hellip;</button>
                          <button class="dropdown-item"
                            (click)="$event.stopImmediatePropagation();sessionDropdown.toggle();notes(session)">{{getNotesButtonText(session)}}&hellip;</button>
                          <button class="dropdown-item"
                            (click)="$event.stopImmediatePropagation();sessionDropdown.toggle();duplicate(session)">Duplicate&hellip;</button>
                          <button class="dropdown-item"
                            (click)="$event.stopImmediatePropagation();sessionDropdown.toggle();share(session)"
                            [disabled]="sessionDataService.isReadOnlySession(session)">Share&hellip;</button>
                          <button class="dropdown-item"
                            (click)="$event.stopImmediatePropagation();sessionDropdown.toggle();download(session)">Download</button>
                        </div>
                      </div>
                    </span>

                    <!-- preview button -->
                    <button *ngIf="mode === SessionListMode.CLICK_TO_OPEN_BUTTON_TO_PREVIEW"
                      (click)="$event.stopImmediatePropagation();selectSession(session)"
                      [ngClass]="{'visible-button': buttonsVisible(session)}"
                      [ngClass]="{'show-on-row-hover': !selectionDisabled}"
                      class="btn btn-sm btn-outline-dark btn-no-border hidden float-right" title="Preview">
                      <span class="fas fa-eye"></span>
                    </button>

                    <!-- accept button -->
                    <button *ngIf="isAcceptVisible(sharedByUsername)"
                      (click)="$event.stopImmediatePropagation();acceptSession(session)"
                      [ngClass]="{'visible-button': buttonsVisible(session)}"
                      [ngClass]="{'show-on-row-hover': !selectionDisabled}"
                      class="btn btn-sm btn-secondary hidden float-right mr-3" title="Accept">
                      <!-- <span class="fas fa-play"></span> -->
                      Accept share
                    </button>

                    <!-- open button -->
                    <button *ngIf="mode === SessionListMode.CLICK_TO_PREVIEW_BUTTON_TO_OPEN"
                      (click)="$event.stopImmediatePropagation();openSession(session.sessionId)"
                      [ngClass]="{'visible-button': buttonsVisible(session)}"
                      [ngClass]="{'show-on-row-hover': !selectionDisabled}"
                      class="btn btn-sm btn-secondary hidden float-right mr-3" title="Open">
                      <!-- <span class="fas fa-play"></span> -->
                      Open
                    </button>

                    <!-- deleting text instead of buttons for sessions which are being deleted -->
                    <span *ngIf="deletingSessions.has(session)" class="float-right"
                      style="font-size: smaller; font-style: italic">
                      <!-- use hidden button to keep the row height static -->
                      <button class="btn btn-sm btn-outline-dark btn-no-border hidden">
                        <span class="fas fa-times "></span>
                      </button>
                      Deleting&hellip;
                    </span>

                  </span>
                </td>
              </tr>
            </tbody>
          </table>
          <br>
        </div>
      </div>
    </div>

    <!-- right side panel-->
    <div class="col">

      <div id="workflow-dataset-panel" class="text-muted">
        <p *ngIf="mode !== SessionListMode.CLICK_TO_PREVIEW_BUTTON_TO_OPEN">To open a session, click on the session
          name.
        </p>

        <p *ngIf="mode === SessionListMode.CLICK_TO_PREVIEW_BUTTON_TO_OPEN">Click on the session name to see a preview.
        </p>

        <p>Sessions keep your analysis projects organized. They combine together your raw data files and analysis
          results
          and also keep track of the analysis history. This makes it easy to understand afterwards how the data was
          analyzed.
        </p>

        <p>Creating a new session for each experiment is usually a good approach.</p>

        <p>Sessions are stored on the server, but you can download session to a local zip file to have copy of
          your
          data or transfer data between different Chipster servers.</p>

        <p><em>It is highly recommended to have a backup of your data also
            in some other location</em>.</p>
      </div>


      <div id="session-preview" style="position: relative">
        <div id="preview-container" *ngIf="selectedSession ">

          <button *ngIf="mode !== SessionListMode.CLICK_TO_OPEN_HOVER_TO_PREVIEW" id="close-button" class="close"
            aria-label="Close" (click)="closePreview()" title="Close preview">
            <span aria-hidden="true">&times;</span>
          </button>

{'fraction_non_alphanumeric': 0.13555529384053705, 'fraction_numerical': 0.0012954893416558708, 'mean_word_length': 1.7955555555555556, 'pattern_counts': {'":': 0, '<': 249, '<?xml version=': 0, '>': 249, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2362322', 'n_tokens_mistral': 4352, 'n_tokens_neox': 4184, 'n_words': 865}