<commit_before><!--

    Copyright (C) 2015 The Gravitee team (http://gravitee.io)

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

            http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

-->
<div class="gv-sub-content">
  <div class="gv-forms gv-forms-fluid" layout="column">
    <div class="gv-form" ng-show="$ctrl.apisProvider.length > 0 || $ctrl.isSearchResult()">
      <div class="apis-header-filter">
        <form flex layout="row" layout-align="center center" name="formSearch" autocomplete="off"
              ng-submit="$ctrl.search()">
          <input class="form-control apis-filter" type="text" style="max-width: 960px"
                 ng-model="$ctrl.query" placeholder="Search APIs" autofocus/>
          <md-button class="md-primary gv-search-button" type="submit" aria-label="Search">
            <ng-md-icon icon="search" ng-disabled="apisLoading"></ng-md-icon>
          </md-button>
        </form>
      </div>
      <div class="gv-form-content" id="apis-container" style="height: calc(100vh - 200px); overflow-y: auto">
        <div layout="row" layout-wrap class="inset" infinite-scroll="$ctrl.loadMore(query.order, true)"
             infinite-scroll-distance="1" infinite-scroll-container="'#apis-container'">
          <md-table-container style="width: 100%; min-height: 200px; text-align: center;">
            <table md-table ng-model="$ctrl.selectedApis">
              <thead md-head md-order="query.order">
              <tr md-row>
                <th md-column width="1%" md-order-by="name" ng-click="$ctrl.loadMore(query.order, false)"><span>Name</span></th>
                <th md-column width="1%"></th>
                <th md-column md-order-by="context_path" ng-click="$ctrl.loadMore(query.order, false)">Context path</th>
                <th md-column width="1%">Tags</th>
                <th md-column width="1%" ng-if="$ctrl.isQualityDisplayed">Quality</th>
                <th md-column width="1%">Owner</th>
                <th md-column width="1%"></th>
              </tr>
              </thead>
              <md-progress-circular ng-if="apisLoading" md-mode="indeterminate"></md-progress-circular>
              <tbody md-body ng-if="!apisLoading">
              <tr ng-if="$ctrl.apisProvider.length == 0">
                <td colspan="7" style="text-align: center" md-cell>No APIs found</td>
              </tr>
              <tr md-row ui-sref="management.apis.detail.portal.general({apiId: api.id})"
                  ng-repeat="api in $ctrl.apis track by api.id">
                <td md-cell nowrap>
                  <img style="max-height:40px; max-width: 40px;margin-right: 8px;" ng-src="{{::api.picture_url}}"/>
                  {{api.name}}
                  ({{api.version}})
                </td>
                <td md-cell nowrap>
                  <i ng-if="api.state == 'started'" class="icon-play-circled2" style="color:#43a047;font-size: 16px">
                    <md-tooltip>Started</md-tooltip>
                  </i>
                  <i ng-if="api.state !== 'started'" class="icon-stop-circle-o" style="color:#e53935;font-size: 16px">
                    <md-tooltip>Stopped</md-tooltip>
                  </i>
                  <i ng-if="$ctrl.syncStatus[api.id] === undefined?false:!$ctrl.syncStatus[api.id]" class="icon-arrows-cw" style="color:#e8ac3c;font-size: 14px;">
                    <md-tooltip>API out of sync</md-tooltip>
                  </i>
                  <ng-md-icon ng-if="api.lifecycle_state === 'published'" icon="cloud_done" size="17" style="top: 3px;">
                    <md-tooltip>Published</md-tooltip>
                  </ng-md-icon>
                  <ng-md-icon ng-if="api.lifecycle_state === 'unpublished'" icon="cloud_queue" size="17" style="top: 3px;">
                    <md-tooltip>Unpublished</md-tooltip>
                  </ng-md-icon>
                  <span class="badge gravitee-policy-method-badge-info ng-binding ng-scope" ng-if="$ctrl.getWorkflowStateLabel(api)"
                        ng-style="{'background-color': $ctrl.getWorkflowStateColor(api)}">
                    {{$ctrl.getWorkflowStateLabel(api)}}
                  </span>
                </td>
                <td md-cell>{{api.context_path}}</td>
                <td md-cell nowrap>{{api.tags.join(', ')}}</td>
                <td md-cell nowrap ng-if="$ctrl.isQualityDisplayed">
                  <span class="gravitee-qm-score-small" ng-class="$ctrl.getQualityMetricCssClass($ctrl.qualityScores[api.id])">
                  {{$ctrl.qualityScores[api.id] === undefined ? "-" : $ctrl.qualityScores[api.id]}}%
                  </span>
                </td>
                <td md-cell nowrap>
                  <span>
                  {{::api.owner.displayName}}
                    <md-tooltip>
                      <span ng-if="api.owner.email">{{::api.owner.email}}</span>
                    </md-tooltip>
                  </span>
                </td>
                <td md-cell nowrap>
                  <ng-md-icon icon="{{$ctrl.getVisibilityIcon(api)}}" size="20" style="fill: #cdcdcd;">
                    <md-tooltip>{{$ctrl.getVisibility(api)}}</md-tooltip>
                  </ng-md-icon>
                </td>
              </tr>
              </tbody>
            </table><commit_msg>fix: Display icon for unpublished APIs also when the lifecycle state is "created"<commit_after><!--

    Copyright (C) 2015 The Gravitee team (http://gravitee.io)

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

            http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

-->
<div class="gv-sub-content">
  <div class="gv-forms gv-forms-fluid" layout="column">
    <div class="gv-form" ng-show="$ctrl.apisProvider.length > 0 || $ctrl.isSearchResult()">
      <div class="apis-header-filter">
        <form flex layout="row" layout-align="center center" name="formSearch" autocomplete="off"
              ng-submit="$ctrl.search()">
          <input class="form-control apis-filter" type="text" style="max-width: 960px"
                 ng-model="$ctrl.query" placeholder="Search APIs" autofocus/>
          <md-button class="md-primary gv-search-button" type="submit" aria-label="Search">
            <ng-md-icon icon="search" ng-disabled="apisLoading"></ng-md-icon>
          </md-button>
        </form>
      </div>
      <div class="gv-form-content" id="apis-container" style="height: calc(100vh - 200px); overflow-y: auto">
        <div layout="row" layout-wrap class="inset" infinite-scroll="$ctrl.loadMore(query.order, true)"
             infinite-scroll-distance="1" infinite-scroll-container="'#apis-container'">
          <md-table-container style="width: 100%; min-height: 200px; text-align: center;">
            <table md-table ng-model="$ctrl.selectedApis">
              <thead md-head md-order="query.order">
              <tr md-row>
                <th md-column width="1%" md-order-by="name" ng-click="$ctrl.loadMore(query.order, false)"><span>Name</span></th>
                <th md-column width="1%"></th>
                <th md-column md-order-by="context_path" ng-click="$ctrl.loadMore(query.order, false)">Context path</th>
                <th md-column width="1%">Tags</th>
                <th md-column width="1%" ng-if="$ctrl.isQualityDisplayed">Quality</th>
                <th md-column width="1%">Owner</th>
                <th md-column width="1%"></th>
              </tr>
              </thead>
              <md-progress-circular ng-if="apisLoading" md-mode="indeterminate"></md-progress-circular>
              <tbody md-body ng-if="!apisLoading">
              <tr ng-if="$ctrl.apisProvider.length == 0">
                <td colspan="7" style="text-align: center" md-cell>No APIs found</td>
              </tr>
              <tr md-row ui-sref="management.apis.detail.portal.general({apiId: api.id})"
                  ng-repeat="api in $ctrl.apis track by api.id">
                <td md-cell nowrap>
                  <img style="max-height:40px; max-width: 40px;margin-right: 8px;" ng-src="{{::api.picture_url}}"/>
                  {{api.name}}
                  ({{api.version}})
                </td>
                <td md-cell nowrap>
                  <i ng-if="api.state == 'started'" class="icon-play-circled2" style="color:#43a047;font-size: 16px">
                    <md-tooltip>Started</md-tooltip>
                  </i>
                  <i ng-if="api.state !== 'started'" class="icon-stop-circle-o" style="color:#e53935;font-size: 16px">
                    <md-tooltip>Stopped</md-tooltip>
                  </i>
                  <i ng-if="$ctrl.syncStatus[api.id] === undefined?false:!$ctrl.syncStatus[api.id]" class="icon-arrows-cw" style="color:#e8ac3c;font-size: 14px;">
                    <md-tooltip>API out of sync</md-tooltip>
                  </i>
                  <ng-md-icon ng-if="api.lifecycle_state === 'published'" icon="cloud_done" size="17" style="top: 3px;">
                    <md-tooltip>Published</md-tooltip>
                  </ng-md-icon>
                  <ng-md-icon ng-if="api.lifecycle_state !== 'published'" icon="cloud_queue" size="17" style="top: 3px;">
                    <md-tooltip>Unpublished</md-tooltip>
                  </ng-md-icon>
                  <span class="badge gravitee-policy-method-badge-info ng-binding ng-scope" ng-if="$ctrl.getWorkflowStateLabel(api)"
                        ng-style="{'background-color': $ctrl.getWorkflowStateColor(api)}">
                    {{$ctrl.getWorkflowStateLabel(api)}}
                  </span>
                </td>
                <td md-cell>{{api.context_path}}</td>
                <td md-cell nowrap>{{api.tags.join(', ')}}</td>
                <td md-cell nowrap ng-if="$ctrl.isQualityDisplayed">
                  <span class="gravitee-qm-score-small" ng-class="$ctrl.getQualityMetricCssClass($ctrl.qualityScores[api.id])">
                  {{$ctrl.qualityScores[api.id] === undefined ? "-" : $ctrl.qualityScores[api.id]}}%
                  </span>
                </td>
                <td md-cell nowrap>
                  <span>
                  {{::api.owner.displayName}}
                    <md-tooltip>
                      <span ng-if="api.owner.email">{{::api.owner.email}}</span>
                    </md-tooltip>
                  </span>
                </td>
                <td md-cell nowrap>
                  <ng-md-icon icon="{{$ctrl.getVisibilityIcon(api)}}" size="20" style="fill: #cdcdcd;">
                    <md-tooltip>{{$ctrl.getVisibility(api)}}</md-tooltip>
                  </ng-md-icon>
                </td>
              </tr>
              </tbody>
            </table>
{'fraction_non_alphanumeric': 0.1613656006914434, 'fraction_numerical': 0.011235955056179775, 'mean_word_length': 1.9420289855072463, 'pattern_counts': {'":': 0, '<': 197, '<?xml version=': 0, '>': 199, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '1181435', 'n_tokens_mistral': 3617, 'n_tokens_neox': 3336, 'n_words': 671}