<commit_before><mn-element-cargo depot="actions">
  <div class="header-controls">
    <a
       ng-show="viewsListCtl.showViewCreationButtons() && rbac.cluster.bucket[viewsCtl.currentBucketName].views.write"
       ng-click="viewsListCtl.showSpatialCreationDialog()">
      ADD SPATIAL VIEW
    </a>
    <a
       ng-click="viewsListCtl.showMapreduceCreationDialog()"
       ng-show="viewsListCtl.showViewCreationButtons() && rbac.cluster.bucket[viewsCtl.currentBucketName].views.write">
      ADD VIEW
    </a>
  </div>
</mn-element-cargo>

<mn-element-cargo depot="alerts">
  <div
     ng-if="viewsListCtl.ddocs.status && rbac.bucketNames['.views!read'].length"
     ng-switch="viewsListCtl.ddocs.status"
     class="interim alert alert-warning">
    <p ng-switch-when="_404">Bucket name should be specified.</p>
    <p ng-switch-when="400">Error 400: Either this bucket is not Couchbase bucket or is hosted on another node.</p>
    <p ng-switch-when="404">Error 404: This bucket does not exist.</p>
    <p ng-switch-when="403">Error 403: You do not have the necessary permissions to see views in this bucket.</p>
    <p ng-switch-default>Unexpected Error</p>
  </div>
</mn-element-cargo>

<div>
  <div class="row">
    <ui-select
       ng-model="viewsCtl.currentBucketName"
       on-select="viewsCtl.onSelectBucket($item)"
       theme="selectize"
       ng-disabled="!rbac.bucketNames['.views!read'].length"
       class="inline">
      <ui-select-match
         class="ui-select-match">{{$select.selected}}</ui-select-match>
      <ui-select-choices
         class="ui-select-choices"
         repeat="name in rbac.bucketNames['.views!read'] | filter: $select.search">
        <span class="select-item ellipsis" ng-bind-html="name | highlight: $select.search" ></span>
      </ui-select-choices>
    </ui-select>
    <span class="pills">
      <a
         ui-sref="{ type: 'development' }"
         ui-sref-active="selected">Development Views</a>
      <a
         ui-sref="{ type: 'production' }"
         ui-sref-active="selected">Production Views</a>
      <span
         class="label badge red-3"
         ng-show="viewsListCtl.ddocs.production.length">{{viewsListCtl.ddocs.production.length}}
      </span>
    </span>
  </div>

  <div mn-spinner="viewsListCtl.showViewsPollerSpinner">
    <div class="cbui-table">
      <div
         class="zero-content"
         ng-show="viewsListCtl.ddocs.status === '_404' && !rbac.bucketNames['.views!read'].length">
        There are currently no Couchbase buckets and no views to show.
        <span ng-show="rbac.cluster.buckets.create">
          Go to <a ui-sref="app.admin.buckets">Buckets</a> to add one,
          or load a <a ui-sref="app.admin.settings.sampleBuckets">sample bucket</a> with data & indexes.
        </span>
      </div>

      <div
         class="zero-content"
         ng-show="!viewsListCtl.ddocs.status && rbac.bucketNames['.views!read'].length && !viewsListCtl.ddocs[viewsListCtl.type].length">
        <span ng-show="viewsListCtl.isDevelopmentViews">
          There are currently no design documents in development.
          <span
             class="when-roadmin-avoid-me"
             ng-show="rbac.cluster.bucket[viewsCtl.currentBucketName].views.write">
            Use ADD VIEW above to create one.
          </span>
        </span>
        <span ng-show="!viewsListCtl.isDevelopmentViews">
          There are no design documents currently published.
          <span
             class="when-roadmin-avoid-me"
             ng-show="rbac.cluster.bucket[viewsCtl.currentBucketName].views.write">
            Go to Development Views to create one.
          </span>
        </span>
      </div>

      <div
         ng-repeat-start="row in viewsListCtl.ddocs[viewsListCtl.type] | orderBy:'hostname' track by row.doc.meta.id"
         ng-if="viewsListCtl.ddocs.rows.length">
        <hr class="margin-bottom-half margin-top-1">
        <div class="cbui-tablerow">
          <span class="cbui-table-cell flex-grow-2 cbui-tablerow-title">
            {{row.doc.meta.id}}
            <span class="label lt-blue" ng-show="viewsListCtl.showSpatialButton(row)">spatial views</span>
            <span class="label lt-blue" ng-show="viewsListCtl.showCreationButton(row)">views</span>
          </span>
          <span class="cbui-table-cell flex-grow-0">
            <div ng-if="viewsListCtl.tasks[row.doc.meta.id][0].progress && rbac.cluster.tasks.read">
              <div ng-style="{width: {{viewsListCtl.tasks[row.doc.meta.id][0].progress}}%}"></div>
              <span>{{viewsListCtl.tasks[row.doc.meta.id][0].type == 'indexer' ? "Indexing" : "Compacting"}} {{viewsListCtl.tasks[row.doc.meta.id][0].progress}}%</span>
            </div>
          </span>
          <span class="cbui-table-cell flex-grow-2 wrap text-right">
            <button
               class="outline tight"
               ng-show="rbac.cluster.bucket[viewsCtl.currentBucketName].views.write"
               ng-click="viewsListCtl.showDdocDeletionDialog(row.doc)">Delete</button>
            <button
               class="outline tight"
               ng-disabled="(('isEmpty' | lodash:row.doc.json.views) && ('isEmpty' | lodash:row.doc.json.spatial)) || !!(viewsListCtl.tasks[row.doc.meta.id][0].type === 'view_compaction') || !!viewsListCtl.getStartedCompactions()[row.controllers.compact]"
               ng-show="rbac.cluster.bucket[viewsCtl.currentBucketName].views.compact"
               ng-click="viewsListCtl.registerCompactionAsTriggeredAndPost(row)">Compact</button>
            <button
               class="outline tight"<commit_msg>MB-24851: MB-24763: fix syntax in ng-style expression<commit_after><mn-element-cargo depot="actions">
  <div class="header-controls">
    <a
       ng-show="viewsListCtl.showViewCreationButtons() && rbac.cluster.bucket[viewsCtl.currentBucketName].views.write"
       ng-click="viewsListCtl.showSpatialCreationDialog()">
      ADD SPATIAL VIEW
    </a>
    <a
       ng-click="viewsListCtl.showMapreduceCreationDialog()"
       ng-show="viewsListCtl.showViewCreationButtons() && rbac.cluster.bucket[viewsCtl.currentBucketName].views.write">
      ADD VIEW
    </a>
  </div>
</mn-element-cargo>

<mn-element-cargo depot="alerts">
  <div
     ng-if="viewsListCtl.ddocs.status && rbac.bucketNames['.views!read'].length"
     ng-switch="viewsListCtl.ddocs.status"
     class="interim alert alert-warning">
    <p ng-switch-when="_404">Bucket name should be specified.</p>
    <p ng-switch-when="400">Error 400: Either this bucket is not Couchbase bucket or is hosted on another node.</p>
    <p ng-switch-when="404">Error 404: This bucket does not exist.</p>
    <p ng-switch-when="403">Error 403: You do not have the necessary permissions to see views in this bucket.</p>
    <p ng-switch-default>Unexpected Error</p>
  </div>
</mn-element-cargo>

<div>
  <div class="row">
    <ui-select
       ng-model="viewsCtl.currentBucketName"
       on-select="viewsCtl.onSelectBucket($item)"
       theme="selectize"
       ng-disabled="!rbac.bucketNames['.views!read'].length"
       class="inline">
      <ui-select-match
         class="ui-select-match">{{$select.selected}}</ui-select-match>
      <ui-select-choices
         class="ui-select-choices"
         repeat="name in rbac.bucketNames['.views!read'] | filter: $select.search">
        <span class="select-item ellipsis" ng-bind-html="name | highlight: $select.search" ></span>
      </ui-select-choices>
    </ui-select>
    <span class="pills">
      <a
         ui-sref="{ type: 'development' }"
         ui-sref-active="selected">Development Views</a>
      <a
         ui-sref="{ type: 'production' }"
         ui-sref-active="selected">Production Views</a>
      <span
         class="label badge red-3"
         ng-show="viewsListCtl.ddocs.production.length">{{viewsListCtl.ddocs.production.length}}
      </span>
    </span>
  </div>

  <div mn-spinner="viewsListCtl.showViewsPollerSpinner">
    <div class="cbui-table">
      <div
         class="zero-content"
         ng-show="viewsListCtl.ddocs.status === '_404' && !rbac.bucketNames['.views!read'].length">
        There are currently no Couchbase buckets and no views to show.
        <span ng-show="rbac.cluster.buckets.create">
          Go to <a ui-sref="app.admin.buckets">Buckets</a> to add one,
          or load a <a ui-sref="app.admin.settings.sampleBuckets">sample bucket</a> with data & indexes.
        </span>
      </div>

      <div
         class="zero-content"
         ng-show="!viewsListCtl.ddocs.status && rbac.bucketNames['.views!read'].length && !viewsListCtl.ddocs[viewsListCtl.type].length">
        <span ng-show="viewsListCtl.isDevelopmentViews">
          There are currently no design documents in development.
          <span
             class="when-roadmin-avoid-me"
             ng-show="rbac.cluster.bucket[viewsCtl.currentBucketName].views.write">
            Use ADD VIEW above to create one.
          </span>
        </span>
        <span ng-show="!viewsListCtl.isDevelopmentViews">
          There are no design documents currently published.
          <span
             class="when-roadmin-avoid-me"
             ng-show="rbac.cluster.bucket[viewsCtl.currentBucketName].views.write">
            Go to Development Views to create one.
          </span>
        </span>
      </div>

      <div
         ng-repeat-start="row in viewsListCtl.ddocs[viewsListCtl.type] | orderBy:'hostname' track by row.doc.meta.id"
         ng-if="viewsListCtl.ddocs.rows.length">
        <hr class="margin-bottom-half margin-top-1">
        <div class="cbui-tablerow">
          <span class="cbui-table-cell flex-grow-2 cbui-tablerow-title">
            {{row.doc.meta.id}}
            <span class="label lt-blue" ng-show="viewsListCtl.showSpatialButton(row)">spatial views</span>
            <span class="label lt-blue" ng-show="viewsListCtl.showCreationButton(row)">views</span>
          </span>
          <span class="cbui-table-cell flex-grow-0">
            <div ng-if="viewsListCtl.tasks[row.doc.meta.id][0].progress && rbac.cluster.tasks.read">
              <div ng-style="{width: viewsListCtl.tasks[row.doc.meta.id][0].progress + '%'}"></div>
              <span>{{viewsListCtl.tasks[row.doc.meta.id][0].type == 'indexer' ? "Indexing" : "Compacting"}} {{viewsListCtl.tasks[row.doc.meta.id][0].progress}}%</span>
            </div>
          </span>
          <span class="cbui-table-cell flex-grow-2 wrap text-right">
            <button
               class="outline tight"
               ng-show="rbac.cluster.bucket[viewsCtl.currentBucketName].views.write"
               ng-click="viewsListCtl.showDdocDeletionDialog(row.doc)">Delete</button>
            <button
               class="outline tight"
               ng-disabled="(('isEmpty' | lodash:row.doc.json.views) && ('isEmpty' | lodash:row.doc.json.spatial)) || !!(viewsListCtl.tasks[row.doc.meta.id][0].type === 'view_compaction') || !!viewsListCtl.getStartedCompactions()[row.controllers.compact]"
               ng-show="rbac.cluster.bucket[viewsCtl.currentBucketName].views.compact"
               ng-click="viewsListCtl.registerCompactionAsTriggeredAndPost(row)">Compact</button>
            <button
               class="outline tight"
{'fraction_non_alphanumeric': 0.15450262245532936, 'fraction_numerical': 0.0069339496844163925, 'mean_word_length': 2.730106100795756, 'pattern_counts': {'":': 0, '<': 171, '<?xml version=': 0, '>': 169, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3874031', 'n_tokens_mistral': 3718, 'n_tokens_neox': 3571, 'n_words': 584}