github.com/billybanfield/evergreen@v0.0.0-20170525200750-eeee692790f7/service/templates/version.html (about)

     1  {{define "scripts"}}
     2  <style type="text/css">
     3    body{ background: #f5f6f7; }
     4  </style>
     5  
     6  <!-- ReactJS libs -->
     7  <script type="text/javascript" src="/static/js/react.min.js"></script>
     8  <script type="text/javascript" src="/static/js/react-dom.min.js"></script>
     9  <script type="text/javascript" src="/static/js/browser.min.js"></script>
    10  <script type="text/javascript" src="/static/js/react-bootstrap.min.js"></script>
    11  
    12  <script type="text/javascript">
    13    window.version = {{ .Version }};
    14    window.canEdit = {{ .CanEdit }};
    15    window.plugins = {{.PluginContent.Data}}
    16    window.jiraHost= {{.JiraHost}}
    17  </script>
    18  <script type="text/javascript" src="{{Static "js" "version.js"}}?hash={{ StaticsMD5 }}"></script>
    19  <script type="text/javascript" src="{{Static "js" "tasks_grid.js"}}?hash={{ StaticsMD5 }}"></script>
    20  {{if .User}}
    21    <script type="text/javascript" src="{{Static "js" "version_admin.js"}}?hash={{ StaticsMD5 }}"></script>
    22  {{end}}
    23    {{range .PluginContent.Includes}}
    24      {{.}}
    25    {{end}}
    26  {{end}}
    27  
    28  {{define "title"}}
    29    {{ if .Version.PatchInfo }}
    30  Evergreen - Version Patch {{.Version.PatchInfo.Patch.PatchNumber}} by {{.Version.PatchInfo.Patch.Author}}
    31    {{else}}
    32  Evergreen - Version {{Trunc .Version.Version.Revision 10}}
    33    {{end}}
    34  {{end}}
    35  
    36  {{define "content"}}
    37  <span ng-controller="VersionController">
    38  {{ if not .ProjectData.Patch }}
    39  <div ng-controller="VersionHistoryDrawerCtrl" id="drawer">
    40    <div id="drawer-contents">
    41      <div id="drawer-filled">
    42        <div ng-repeat="revisionsForDate in groupedRevisions">
    43          <div class="drawer-section-header">
    44            <span class="history-date-header-words">[[revisionsForDate.date | date:'MMM d']]</span>
    45            <span class="history-date-header-numbers history-date-header-slash">&nbsp;</span>
    46            <span class="history-date-header-numbers">[[revisionsForDate.date | date:'M/d/yyyy']]</span>
    47          </div>
    48  
    49          <div ng-repeat="revision in revisionsForDate.revisions" class="drawer-item"
    50              ng-class="{ 'drawer-item-highlighted': isCurrent(revision), }">
    51            <revision-blurb  linktype="'version'" linkid="revision.version_id" revision="revision" hash="getTab()"><revision-blurb>
    52          </div>
    53        </div>
    54      </div>
    55    </div>
    56  </div>
    57  
    58  <div id="page-content" class="container-fluid">
    59  {{ else }}
    60  <div id="content" class="container-fluid">
    61  {{ end }}
    62  
    63  <div id="content" class="container-fluid">
    64    {{template "flash" . }}
    65    <notify-box ng-init="destination='notifyHeader';"></notify-box>
    66    <ol class="breadcrumb">
    67      <li>
    68        <span>
    69          <span ng-show="version.PatchInfo">
    70            Patch [[version.PatchInfo.Patch.PatchNumber]]
    71            by [[version.PatchInfo.Patch.Author]]
    72          </span>
    73          <span class="gitspec" ng-hide="version.PatchInfo">
    74            [[version.Version.revision.substr(0, 10)]]
    75          </span>
    76        </span>
    77      </li>
    78    </ol>
    79  
    80    <div class="row">
    81      <div class="col-lg-7">
    82          <!-- The breadcrumb acts as the header on this page, but we have this empty <h1> to make
    83               the spacing above the github commit info panel consistent with the task and build pages. -->
    84          <h1></h1>
    85          {{if .User}}
    86            <div ng-controller="AdminOptionsCtrl">
    87               <div id="admin-dropdown" class="dropdown pull-right page-actions">
    88                 <a id="admin-options" class="btn btn-default" data-toggle="dropdown">
    89                   <i class="fa fa-gear"></i>
    90                   <i class="fa fa-caret-down"></i>
    91                 </a>
    92  
    93                 <ul class="dropdown-menu" role="menu">
    94                   <li><a ng-show="version.PatchInfo.Patch.Id && canEdit" ng-href="/patch/[[version.PatchInfo.Patch.Id]]">Reconfigure Tasks/Variants</a></li>
    95                   <li><a tabindex="-1" href="#" ng-click="openAdminModal('schedule')">Schedule all</a></li>
    96                   <li><a tabindex="-1" href="#" ng-click="openAdminModal('unschedule')">Unschedule all</a></li>
    97                   <li><a tabindex="-1" href="#" ng-click="openAdminModal('restart')">Restart</a></li>
    98                   <li><a tabindex="-1" href="#" ng-click="openAdminModal('priority')">Set priority</a></li>
    99                 </ul>
   100               </div>
   101               <admin-modal>
   102                   <admin-schedule-all ng-show="adminOption=='schedule'"></admin-schedule-all>
   103                   <admin-unschedule-all ng-show="adminOption=='unschedule'"></admin-unschedule-all>
   104                   <admin-set-priority ng-show="adminOption=='priority'"></admin-set-priority>
   105                   <admin-restart-version ng-show="adminOption=='restart'"></admin-restart-version>
   106               </admin-modal>
   107             </div>
   108           {{end}}
   109  
   110           <div class="row mci-pod">
   111             <div>
   112               {{if .Version.PatchInfo}}
   113                 <patch-commit-panel patchinfo="version.PatchInfo" basecommit="version" timezone="{{GetTimezone .User}}" baselink="/version" base="{{.Version.PatchInfo.BaseVersionId}}"></patch-commit-panel>
   114               {{else}}
   115                 <github-commit-panel commit="commit" timezone="{{GetTimezone .User}}"></github-commit-panel>
   116               {{end}}
   117               <div class="error-text" ng-show="[[version.Version.errors.length]]">
   118                 <i class="fa fa-ban"></i>
   119                 [[version.Version.errors.length]]  [[version.Version.errors.length | pluralize:'error']] in configuration file
   120                 <div ng-repeat="error in version.Version.errors">- [[error]]</div>
   121               </div>
   122               <div class="warning-text" ng-show="[[version.Version.warnings.length]]">
   123                 <i class="fa fa-warning"></i>
   124                 [[version.Version.warnings.length]]  [[version.Version.warnings.length | pluralize:'warning']] in configuration file
   125                 <div ng-repeat="warning in version.Version.warnings">- [[warning]]</div>
   126               </div>
   127               <div class="semi-muted" ng-show="[[version.Version.ignored]]">
   128                 <i class="fa fa-eye-slash"></i>
   129                 This revision will not be automatically scheduled, because only
   130                 <a href="https://github.com/evergreen-ci/evergreen/wiki/Project-Files#ignoring-changes-to-certain-files">ignored files</a> are changed. 
   131                 It may still be scheduled manually, or on failure stepback.
   132               </div>
   133  
   134             </div>
   135             <table id="build-info-elements">
   136               <tr ng-show="makeSpanMS > 0"><td><i class="fa fa-clock-o"></i></td><th><strong title="The makespan is the difference in time from when the first task in the version has started to when the last task is completed.">Makespan</strong></th><td>[[makeSpanMS * 1000000 | default:0 | stringifyNanoseconds:true]]</td></tr>
   137               <tr ng-show="totalTimeMS > 0"><td><i class="fa fa-clock-o"></i></td><th><strong title="The time spent indicates the sum of the processing time across all the tasks in the build.">Time Spent</strong></th><td>[[totalTimeMS * 1000000 | default:0 | stringifyNanoseconds:true]]</td></tr>
   138               <tr/>
   139             </table>
   140           </div>
   141  
   142           <div class="mci-pod row" ng-hide="[[version.Version.errors.length]]">
   143             <ul class="nav nav-tabs">
   144               <li ng-class="{active:tab==0}"><a href="#" ng-click="setTab(0)">By Variant</a></li>
   145               <li ng-class="{active:tab==1}"><a href="#" ng-click="setTab(1)">Grid</a></li>
   146             </ul>
   147             <div class="row" ng-hide="tab!=0">
   148              <div class="semi-muted collapse-panel">
   149                <span id="collapsed-prompt">Show collapsed view</span>
   150                     <input type="checkbox" ng-model="collapsed"></input>
   151              </div>
   152               <div ng-repeat="build in version.Builds | orderBy:'Build.display_name'" class="col-lg-4">
   153                 <h4 class="one-liner" style="margin-bottom: 5px;">
   154                   <a ng-href="/build/[[build.Build._id]]" class="semi-muted">[[build.Build.display_name]]</a>
   155                 </h4>
   156                     <build-grid build="build" collapsed="collapsed"></build-grid>
   157               </div>
   158             </div>
   159             <div class="row" ng-hide="tab!=1">
   160               <div class="gridtable-small gridtable-scroll">  
   161                 <div class="top-header-row">
   162                   <div class="header-cell" ng-repeat="task in taskNames" id="[['bv' + $index]]">
   163                     <span class="header-text">[[task]]</span>
   164                   </div>
   165                 </div>
   166                 <div class="tablerow" ng-repeat="build in version.Builds">
   167                   <div class="header">
   168                     <div class="testname" id="[['test' + $index]]">[[build.Build.display_name]]</div>
   169                   </div>
   170                   <div class="cells">
   171                     <a ng-href="[[getGridLink(build.Build.display_name, task)]]" ng-repeat="task in taskNames" ng-class="'cell ' + getGridClass(build.Build.display_name, task)">&nbsp;</a>
   172                   </div>
   173                 </div>
   174               </div>
   175             </div>
   176           </div>
   177  
   178  
   179        <div class="row">
   180          <div class="col-lg-12">
   181            {{range .PluginContent.Panels.Left}}
   182              {{.}}
   183            {{end}}
   184          </div>
   185        </div>
   186      </div>
   187  
   188      <div class="col-lg-5" ng-show="version.PatchInfo.StatusDiffs">
   189        <patch-diff-panel type="Task"
   190                          baselink="/task/"
   191                          diffs="version.PatchInfo.StatusDiffs"
   192                          ng-show="version.PatchInfo.StatusDiffs">
   193        </patch-diff-panel>
   194      </div>
   195      <div class="col-lg-5">
   196        {{range .PluginContent.Panels.Right}}
   197          {{.}}
   198        {{end}}
   199      </div>
   200    </div>
   201    <div class="row">
   202      <div class="col-lg-12">
   203        {{range .PluginContent.Panels.Center}}
   204          {{.}}
   205        {{end}}
   206      </div>
   207    </div>
   208  </div>
   209  </span>
   210  
   211  {{end}}