mirror of
https://github.com/valitydev/redash.git
synced 2024-11-08 18:03:54 +00:00
30 lines
1.2 KiB
HTML
30 lines
1.2 KiB
HTML
<settings-screen>
|
|
<div class="">
|
|
<form name="snippetForm" class="form">
|
|
<div class="form-group">
|
|
<label>Trigger</label>
|
|
<input type="string" class="form-control" ng-model="$ctrl.snippet.trigger" ng-disabled="!$ctrl.canEdit" required autofocus>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label>Description</label>
|
|
<input type="string" class="form-control" ng-model="$ctrl.snippet.description" ng-disabled="!$ctrl.canEdit">
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label>Snippet</label>
|
|
<pre ng-if="!$ctrl.canEdit">{{$ctrl.snippet.snippet}}</pre>
|
|
<div ui-ace="$ctrl.editorOptions" ng-model="$ctrl.snippet.snippet" style="height:300px" ng-if="$ctrl.canEdit"></div>
|
|
</div>
|
|
|
|
<div class="form-group" ng-if="$ctrl.canEdit">
|
|
<button class="btn btn-primary" ng-disabled="!snippetForm.$valid" ng-click="$ctrl.saveChanges()">Save</button>
|
|
<button class="btn btn-danger" ng-if="$ctrl.snippet.id" ng-click="$ctrl.delete()">Delete</button>
|
|
</div>
|
|
<small ng-if="$ctrl.snippet.user">
|
|
Created by: {{$ctrl.snippet.user.name}}
|
|
</small>
|
|
</form>
|
|
</div>
|
|
</settings-screen>
|