<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 layout="row" flex class="api-events" style="margin-top: 20px;">

  <div class="api-events-timeline" flex="20">
    <timeline>
      <div ng-repeat="eventTimeline in apiEventsCtrl.eventsTimeline">
        <timeline-event side="right">
          <timeline-badge class="{{eventTimeline.badgeClass}}">
            <i class="glyphicon {{eventTimeline.badgeIconClass}}"></i>
          </timeline-badge>
          <a class="timeline-link" href="javascript:void(0);" ng-click="apiEventsCtrl.selectEvent(eventTimeline)">
            <timeline-panel ng-class="{active : apiEventsCtrl.isEventSelected(eventTimeline)}" class="{{eventTimeline.badgeClass}}">
              <timeline-heading>
                <h5>{{eventTimeline.title | uppercase}}
                  <ng-md-icon class="api-events-icon" ng-show="apiEventsCtrl.eventToCompareRequired && !apiEventsCtrl.isEventSelected(eventTimeline)" icon="crop_din" style="fill: rgba(0,0,0,0.54);"></ng-md-icon>
                  <ng-md-icon class="api-events-icon" ng-show="apiEventsCtrl.isEventSelectedForComparaison(eventTimeline)" icon="compare" style="fill: green;"></ng-md-icon>
                </h5>
                <p ng-if="eventTimeline.when">
                  <small class="text-muted ng-binding"><i class="glyphicon glyphicon-time"></i>{{eventTimeline.when | date : 'medium'}} by {{eventTimeline.username}}</small>
                </p>
                <p ng-if="eventTimeline.isCurrentAPI">
                  <small class="text-muted ng-binding"><i class="glyphicon glyphicon-info-sign"></i>The current undeployed API</small>
                </p>
              </timeline-heading>
            </timeline-panel>
          </a>
        </timeline-event>
      </div>
    </timeline>
  </div>
  
  <div class="api-events-content" flex="80">
    <div ng-show="apiEventsCtrl.eventsSelected.length == 1" class="api-events-content-descriptor">
      <md-card style="box-shadow:none;">
        <div style="border: 1px solid #e7eaec; border-bottom: 0;" layout-padding>
          <md-button ng-show="apiEventsCtrl.eventsSelected[0].isCurrentAPI" class="md-raised" ng-click="apiEventsCtrl.$scope.$parent.apiCtrl.showDeployAPIConfirm($event, apiEventsCtrl.api)">Deploy</md-button>
          <md-button ng-show="!apiEventsCtrl.eventsSelected[0].isCurrentAPI && apiEventsCtrl.eventsSelected[0].event.id != apiEventsCtrl.events[0].id" class="md-raised" ng-click="apiEventsCtrl.showRollbackAPIConfirm($event, apiEventsCtrl.eventSelectedPayload)">Rollback</md-button>
          <md-button ng-show="apiEventsCtrl.events.length > 0 && apiEventsCtrl.eventsSelected[0].event.id != apiEventsCtrl.events[0].id" class="md-raised" ng-click="apiEventsCtrl.diffWithMaster()">Diff with published API</md-button>
          <md-button ng-show="apiEventsCtrl.events.length > 1" class="md-raised" ng-click="apiEventsCtrl.enableDiff()">Diff</md-button>
        </div>
        <md-card-content style="background-color: #fff; border: 1px solid #e7eaec; padding-top: 0px">
          <pre ng-show="!apiEventsCtrl.diffMode" class="api-events-definition">{{apiEventsCtrl.eventSelectedPayloadDefinition | json }}</pre>
          <pre ng-show="apiEventsCtrl.diffMode" class="api-events-definition" gravitee-diff old-value="apiEventsCtrl.left" new-value="apiEventsCtrl.right"></pre>
        </md-card-content>
      </md-card>    
    </div>
  </div>
  
</div><commit_msg>feat(event): rollback last published event<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 layout="row" flex class="api-events" style="margin-top: 20px;">

  <div class="api-events-timeline" flex="20">
    <timeline>
      <div ng-repeat="eventTimeline in apiEventsCtrl.eventsTimeline">
        <timeline-event side="right">
          <timeline-badge class="{{eventTimeline.badgeClass}}">
            <i class="glyphicon {{eventTimeline.badgeIconClass}}"></i>
          </timeline-badge>
          <a class="timeline-link" href="javascript:void(0);" ng-click="apiEventsCtrl.selectEvent(eventTimeline)">
            <timeline-panel ng-class="{active : apiEventsCtrl.isEventSelected(eventTimeline)}" class="{{eventTimeline.badgeClass}}">
              <timeline-heading>
                <h5>{{eventTimeline.title | uppercase}}
                  <ng-md-icon class="api-events-icon" ng-show="apiEventsCtrl.eventToCompareRequired && !apiEventsCtrl.isEventSelected(eventTimeline)" icon="crop_din" style="fill: rgba(0,0,0,0.54);"></ng-md-icon>
                  <ng-md-icon class="api-events-icon" ng-show="apiEventsCtrl.isEventSelectedForComparaison(eventTimeline)" icon="compare" style="fill: green;"></ng-md-icon>
                </h5>
                <p ng-if="eventTimeline.when">
                  <small class="text-muted ng-binding"><i class="glyphicon glyphicon-time"></i>{{eventTimeline.when | date : 'medium'}} by {{eventTimeline.username}}</small>
                </p>
                <p ng-if="eventTimeline.isCurrentAPI">
                  <small class="text-muted ng-binding"><i class="glyphicon glyphicon-info-sign"></i>The current undeployed API</small>
                </p>
              </timeline-heading>
            </timeline-panel>
          </a>
        </timeline-event>
      </div>
    </timeline>
  </div>
  
  <div class="api-events-content" flex="80">
    <div ng-show="apiEventsCtrl.eventsSelected.length == 1" class="api-events-content-descriptor">
      <md-card style="box-shadow:none;">
        <div ng-show="apiEventsCtrl.eventsTimeline.length > 1" style="border: 1px solid #e7eaec; border-bottom: 0;" layout-padding>
          <md-button ng-show="apiEventsCtrl.eventsSelected[0].isCurrentAPI" class="md-raised" ng-click="apiEventsCtrl.$scope.$parent.apiCtrl.showDeployAPIConfirm($event, apiEventsCtrl.api)">Deploy</md-button>
          <md-button ng-show="(!apiEventsCtrl.eventsSelected[0].isCurrentAPI && apiEventsCtrl.eventsSelected[0].event.id != apiEventsCtrl.events[0].id) || (!apiEventsCtrl.eventsSelected[0].isCurrentAPI && apiEventsCtrl.eventsTimeline[0].isCurrentAPI)" class="md-raised" ng-click="apiEventsCtrl.showRollbackAPIConfirm($event, apiEventsCtrl.eventSelectedPayload)" ng-click="apiEventsCtrl.showRollbackAPIConfirm($event, apiEventsCtrl.eventSelectedPayload)">Rollback</md-button>
          <md-button ng-show="apiEventsCtrl.events.length > 0 && apiEventsCtrl.eventsSelected[0].event.id != apiEventsCtrl.events[0].id" class="md-raised" ng-click="apiEventsCtrl.diffWithMaster()">Diff with published API</md-button>
          <md-button ng-show="apiEventsCtrl.eventsTimeline.length > 1" class="md-raised" ng-click="apiEventsCtrl.enableDiff()">Diff</md-button>
        </div>
        <md-card-content style="background-color: #fff; border: 1px solid #e7eaec; padding-top: 0px">
          <pre ng-show="!apiEventsCtrl.diffMode" class="api-events-definition">{{apiEventsCtrl.eventSelectedPayloadDefinition | json }}</pre>
          <pre ng-show="apiEventsCtrl.diffMode" class="api-events-definition" gravitee-diff old-value="apiEventsCtrl.left" new-value="apiEventsCtrl.right"></pre>
        </md-card-content>
      </md-card>    
    </div>
  </div>
  
</div>
{'fraction_non_alphanumeric': 0.14862275449101797, 'fraction_numerical': 0.009461077844311378, 'mean_word_length': 3.47534833869239, 'pattern_counts': {'":': 0, '<': 125, '<?xml version=': 0, '>': 130, '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': '5311267', 'n_tokens_mistral': 2574, 'n_tokens_neox': 2466, 'n_words': 475}