<commit_before><div class="identities-list">
  <md-list>
    <ng-switch
      ng-repeat="i in $ctrl.userIdentities"
      ng-if="!$ctrl.onlySelfService || i.selfService"
      on="i.provider">

    <md-list-item
      ng-switch-default
      class="md-3-line">

      <md-icon ng-if="i.connected" md-colors="{color: 'teal'}">check_circle</md-icon>

      <div class="md-list-item-text" ng-class="{'md-offset': !i.connected}">
        <h3>{{i.title}}</h3>

        <p ng-if="i.connected">
          ID: {{i.external_id}}
        </p>

        <p ng-if="i.connected && i.external_username">
          Username: {{i.external_username}}
        </p>

        <md-button
          class="md-raised md-secondary"
          ng-if="i.selfService && !i.connected"
          ng-click="$ctrl.connect(i.provider)"
          aria-label="Connect {{i.title}} identity">
          Connect
        </md-button>
        <md-button
          class="md-raised md-secondary"
          ng-if="i.selfService && i.connected"
          ng-click="$ctrl.disconnect(i.provider, $event)"
          aria-label="Disconnect {{i.title}} identity">
          Disconnect
        </md-button>

      </div>

      <md-divider></md-divider>

    </md-list-item>

    <md-list-item
      ng-switch-when="kubernetes"
      ng-if="$ctrl.FeatureFlags.isEnabled($ctrl.featureFlagKeys.kubernetesTokens)"
      class="md-3-line md-long-text">

      <md-icon ng-if="i.connected" md-colors="{color: 'teal'}">check_circle</md-icon>

      <div class="md-list-item-text" ng-class="{'md-offset': !i.connected}">
        <h3>{{i.title}}</h3>

        <p ng-if="i.connected">
          ID: {{i.external_id}}
        </p>

        <p ng-if="i.kubernetes_tokens.length == 0">
          No tokens currently available for you
        </p>

        <div ng-if="$ctrl.showKubeTokens">
          <ul class="md-body-1">
            <li ng-repeat="t in i.kubernetes_tokens">
              <p>
                {{t.cluster}}: <strong>{{t.token}}</strong>
              </p>

              <ul ng-if="t.groups.length > 0 || t.expire_privileged_at">
                <li>
                  <p>
                    Groups: {{t.groups.join(', ')}}
                  </p>
                </li>
                <li>
                  <p
                    md-colors="{color: 'accent'}">
                    <strong>Escalated privilege ends at:</strong>
                    <br />
                    {{t.expire_privileged_at | date:'EEE MMM d y HH:mm UTC':'UTC'}}
                    (<span am-time-ago="t.expire_privileged_at"></span>)
                  </p>
                </li>
              </ul>
            </li>
          </ul>
        </div>

        <md-button class="md-secondary md-raised"
          ng-if="i.kubernetes_tokens.length > 0"
          ng-click="$ctrl.showKubeTokens = !$ctrl.showKubeTokens"
          aria-label="Show/Hide tokens">
          <span ng-if="!$ctrl.showKubeTokens">Show tokens</span>
          <span ng-if="$ctrl.showKubeTokens">Hide tokens</span>
        </md-button><commit_msg>Web: fix visibility of data for Kube tokens<commit_after><div class="identities-list">
  <md-list>
    <ng-switch
      ng-repeat="i in $ctrl.userIdentities"
      ng-if="!$ctrl.onlySelfService || i.selfService"
      on="i.provider">

    <md-list-item
      ng-switch-default
      class="md-3-line">

      <md-icon ng-if="i.connected" md-colors="{color: 'teal'}">check_circle</md-icon>

      <div class="md-list-item-text" ng-class="{'md-offset': !i.connected}">
        <h3>{{i.title}}</h3>

        <p ng-if="i.connected">
          ID: {{i.external_id}}
        </p>

        <p ng-if="i.connected && i.external_username">
          Username: {{i.external_username}}
        </p>

        <md-button
          class="md-raised md-secondary"
          ng-if="i.selfService && !i.connected"
          ng-click="$ctrl.connect(i.provider)"
          aria-label="Connect {{i.title}} identity">
          Connect
        </md-button>
        <md-button
          class="md-raised md-secondary"
          ng-if="i.selfService && i.connected"
          ng-click="$ctrl.disconnect(i.provider, $event)"
          aria-label="Disconnect {{i.title}} identity">
          Disconnect
        </md-button>

      </div>

      <md-divider></md-divider>

    </md-list-item>

    <md-list-item
      ng-switch-when="kubernetes"
      ng-if="$ctrl.FeatureFlags.isEnabled($ctrl.featureFlagKeys.kubernetesTokens)"
      class="md-3-line md-long-text">

      <md-icon ng-if="i.connected" md-colors="{color: 'teal'}">check_circle</md-icon>

      <div class="md-list-item-text" ng-class="{'md-offset': !i.connected}">
        <h3>{{i.title}}</h3>

        <p ng-if="i.connected">
          ID: {{i.external_id}}
        </p>

        <p ng-if="i.kubernetes_tokens.length == 0">
          No tokens currently available for you
        </p>

        <div ng-if="$ctrl.showKubeTokens">
          <ul class="md-body-1">
            <li ng-repeat="t in i.kubernetes_tokens">
              <p>
                {{t.cluster}}: <strong>{{t.token}}</strong>
              </p>

              <ul ng-if="t.groups.length > 0 || t.expire_privileged_at">
                <li ng-if="t.groups.length > 0">
                  <p>
                    Groups: {{t.groups.join(', ')}}
                  </p>
                </li>
                <li ng-if="t.expire_privileged_at">
                  <p
                    md-colors="{color: 'accent'}">
                    <strong>Escalated privilege ends at:</strong>
                    <br />
                    {{t.expire_privileged_at | date:'EEE MMM d y HH:mm UTC':'UTC'}}
                    (<span am-time-ago="t.expire_privileged_at"></span>)
                  </p>
                </li>
              </ul>
            </li>
          </ul>
        </div>

        <md-button class="md-secondary md-raised"
          ng-if="i.kubernetes_tokens.length > 0"
          ng-click="$ctrl.showKubeTokens = !$ctrl.showKubeTokens"
          aria-label="Show/Hide tokens">
          <span ng-if="!$ctrl.showKubeTokens">Show tokens</span>
          <span ng-if="$ctrl.showKubeTokens">Hide tokens</span>
        </md-button>
{'fraction_non_alphanumeric': 0.17455191345067012, 'fraction_numerical': 0.00339092523817213, 'mean_word_length': 1.6895353886235345, 'pattern_counts': {'":': 0, '<': 127, '<?xml version=': 0, '>': 132, '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': '5759757', 'n_tokens_mistral': 2077, 'n_tokens_neox': 1973, 'n_words': 309}