@spotinst/spinnaker-deck
Version:
Spinnaker-Deck service, forked with support to Spotinst
59 lines (58 loc) • 2.5 kB
HTML
<div modal-page class="flex-fill modal-show-history snapshot-history">
<modal-close dismiss="$dismiss()"></modal-close>
<div class="modal-header">
<h4 class="modal-title">Application Snapshot History</h4>
</div>
<div class="modal-body" ng-if="ctrl.state.loading">
<div class="horizontal center">
<loading-spinner size="'small'"></loading-spinner>
</div>
</div>
<div class="modal-body flex-fill" ng-if="!ctrl.state.loading">
<div class="form-inline modal-history-header">
<label for="compare-base">Timestamp</label>
<select
id="compare-base"
ng-options="snapshot.index as snapshot.formattedTimestamp for snapshot in ctrl.snapshots"
ng-model="ctrl.version"
ng-change="ctrl.updateDiff()"
class="form-control input-sm"
></select>
<label for="compare-account">Account</label>
<select
id="compare-account"
ng-options="account for account in ctrl.availableAccounts"
ng-model="ctrl.selectedAccount"
ng-change="ctrl.getSnapshotHistoryForAccount(ctrl.selectedAccount)"
class="form-control input-sm"
></select>
<diff-summary summary="ctrl.diff.summary"></diff-summary>
<div class="pull-right">
<label for="compare-compare" class="middle">compare to </label>
<select
class="form-control input-sm"
id="compare-compare"
ng-options="entry for entry in ctrl.compareOptions"
ng-change="ctrl.updateDiff()"
ng-model="ctrl.compareTo"
></select>
</div>
</div>
<div ng-if="ctrl.state.error">
<h4 class="text-center">There was an error loading the snapshot history for this application.</h4>
</div>
<form role="form" class="form-horizontal flex-fill" ng-if="ctrl.snapshots.length > 1">
<div class="form-group flex-fill">
<h3 class="text-center" ng-if="ctrl.state.loading">loading...</h3>
<diff-view diff="ctrl.diff" ng-if="ctrl.snapshots" class="flex-fill"></diff-view>
</div>
</form>
</div>
<div class="modal-body" ng-if="ctrl.snapshots.length <= 1 && !ctrl.state.loading && !ctrl.state.error">
<h4 class="text-center">Sorry, we couldn't find any snapshot history for this application.</h4>
</div>
<div class="modal-footer">
<button class="btn btn-primary" ng-click="ctrl.restoreSnapshot()">Restore Snapshot</button>
<button class="btn btn-primary" ng-click="ctrl.close()">Close</button>
</div>
</div>