<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.

-->
<md-card class="no-box-shadow" ng-if="!isLoading && $ctrl.instances.length > 0">
  <md-card-header>
    <md-card-header-text layout="row" layout-align="center">
      <div class="input-group apis-header-filter" flex="60">
        <input class="form-control" type="text" ng-model="$ctrl.searchGatewayInstances"
               placeholder="Search Gateway instances..." autofocus/>
      </div>
    </md-card-header-text>
    <md-switch style="margin: 0 auto;" ng-model="$ctrl.displayAllInstances"
               ng-change="switchDisplayInstances()">
      Display all instances
    </md-switch>
  </md-card-header>
  <md-card-content ng-if="!isLoading && !$ctrl._displayEmptyMode"
                   style="padding: 0; overflow-y: auto;">
    <div layout="row" layout-wrap class="inset">
      <div class="gravitee-instances-box"
           ng-repeat="instance in $ctrl.instances | filter:displayAllInstances?{}:{state: 'started'}
             | filter:$ctrl.searchGatewayInstances | orderBy:'-started_at'">
        <a ui-sref="management.instances.detail.environment({instanceId: instance.event})">
          <md-card class="gravitee-instances-box gravitee-card gravitee-api-card">
            <md-card-header layout="row" layout-align="end start">
            </md-card-header>
            <md-card-content>
              <div class="api-box-description">
                <ng-md-icon icon="{{$ctrl.getOSIcon(instance.operating_system_name)}}" size="60"></ng-md-icon>
                <div class="api-box-name-version">
                  <div>{{instance.hostname}}</div>
                  <div>{{instance.ip}}:{{instance.port}}</div>
                  <span style="font-size: 10px">v.{{instance.version | limitTo:5:0}}</span>
                  <span ng-if="instance.tenant" style="font-size: 10px"> - {{instance.tenant}}</span>
                </div>
                <div class="api-box-state" layout-padding>
                    <span ng-class="{'gravitee-instances-started':instance.state === 'started',
                    'gravitee-instances-stopped':instance.state === 'stopped'}">{{instance.state}}</span>
                </div>
              </div>
            </md-card-content>
          </md-card>
        </a>
      </div>
    </div>
  </md-card-content>
</md-card><commit_msg>feat(instances): Include gateway sharding tags in instances view<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.

-->
<md-card class="no-box-shadow" ng-if="!isLoading && $ctrl.instances.length > 0">
  <md-card-header>
    <md-card-header-text layout="row" layout-align="center">
      <div class="input-group apis-header-filter" flex="60">
        <input class="form-control" type="text" ng-model="$ctrl.searchGatewayInstances"
               placeholder="Search Gateway instances..." autofocus/>
      </div>
    </md-card-header-text>
    <md-switch style="margin: 0 auto;" ng-model="$ctrl.displayAllInstances"
               ng-change="switchDisplayInstances()">
      Display all instances
    </md-switch>
  </md-card-header>
  <md-card-content ng-if="!isLoading && !$ctrl._displayEmptyMode"
                   style="padding: 0; overflow-y: auto;">
    <div layout="row" layout-wrap class="inset">
      <div class="gravitee-instances-box"
           ng-repeat="instance in $ctrl.instances | filter:displayAllInstances?{}:{state: 'started'}
             | filter:$ctrl.searchGatewayInstances | orderBy:'-started_at'">
        <a ui-sref="management.instances.detail.environment({instanceId: instance.event})">
          <md-card class="gravitee-instances-box gravitee-card gravitee-api-card">
            <md-card-header layout="row" layout-align="end start">
            </md-card-header>
            <md-card-content>
              <div class="api-box-description">
                <ng-md-icon icon="{{$ctrl.getOSIcon(instance.operating_system_name)}}" size="60"></ng-md-icon>
                <div class="api-box-name-version">
                  <div>{{instance.hostname}}</div>
                  <div>{{instance.ip}}:{{instance.port}}</div>
                  <span style="font-size: 10px">v.{{instance.version | limitTo:5:0}}</span>
                  <span ng-if="instance.tenant" style="font-size: 10px"> - {{instance.tenant}}</span>
                  <div ng-if="instance.tags" style="font-size: 10px">Tags: {{instance.tags.join(', ')}}</div>
                </div>
                <div class="api-box-state" layout-padding>
                    <span ng-class="{'gravitee-instances-started':instance.state === 'started',
                    'gravitee-instances-stopped':instance.state === 'stopped'}">{{instance.state}}</span>
                </div>
              </div>
            </md-card-content>
          </md-card>
        </a>
      </div>
    </div>
  </md-card-content>
</md-card>
{'fraction_non_alphanumeric': 0.1526742838218248, 'fraction_numerical': 0.007285974499089253, 'mean_word_length': 2.5157159487776486, 'pattern_counts': {'":': 0, '<': 93, '<?xml version=': 0, '>': 95, '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': '1546105', 'n_tokens_mistral': 1819, 'n_tokens_neox': 1731, 'n_words': 390}