bosun.org@v0.0.0-20210513094433-e25bc3e69a1f/cmd/bosun/web/static/partials/tokenNew.html (about)

     1  <h2>New Access Token</h2>
     2  <div class="alert alert-danger" ng-show="ct.status">{{ct.status}}</div>
     3  <div ng-show="ct.createdToken">
     4  	<div class='alert alert-success'>This is your new token. Please save it, because you will not be able to access it again.</div>
     5  	<h3>{{ct.createdToken}} <button class="btn btn-default" ngclipboard data-clipboard-text="{{ct.createdToken}}"><span class="fa fa-copy"></span></button></h3>
     6  
     7  	<p> Usage:
     8  		<pre>X-Access-Token= {{ct.createdToken}}</pre> or even make a cookie
     9  		<pre>document.cookie="AccessToken={{ct.createdToken}}; expires=Thu, 18 Dec 2018 12:00:00 UTC; path=/";</pre>
    10  		<a class='btn btn-primary' href='/tokens'>Back</a>
    11  </div>
    12  <div ng-hide="ct.createdToken">
    13  	<form class="form-horizontal" name="myForm">
    14  		<div class="form-group control-group">
    15  			<label class="col-md-1 control-label">Username</label>
    16  			<div class="col-md-3" ng-class="{'has-error': myForm.user.$invalid}">
    17  				<input type="text" name="user" class="form-control" ng-model="ct.token.User" required>
    18  			</div>
    19  		</div>
    20  		<div class="form-group control-group">
    21  			<label class="col-md-1 control-label ">Description</label>
    22  			<div class="col-md-3" ng-class="{'has-error': myForm.desc.$invalid}">
    23  				<input type="text" name="desc" class="form-control" ng-model="ct.token.Description" required>
    24  			</div>
    25  		</div>
    26  
    27  		<div class='row'>
    28  			<div class='col-md-3'>
    29  				<h4>Roles</h4>
    30  				<div ng-repeat="role in ct.roles">
    31  					<div class="checkbox">
    32  						<label>
    33  							<input type="checkbox" ng-checked="ct.getBits() == role.Bits" ng-click="ct.setRole(role.Bits, $event)"/> 
    34  							<span data-animation="am-flip-x" bs-tooltip="role.Desc" placement='right'>{{role.Name}} <span class='fa fa-question-sign'/></span>
    35  						</label>
    36  					</div>
    37  				</div>
    38  			</div>
    39  			<div class='col-md-3'>
    40  				<h4>Permissions</h4>
    41  				<div ng-repeat="perm in ct.permissions">
    42  					<div class="checkbox">
    43  						<label>
    44  							<input type="checkbox" ng-model="perm.Active"/> 
    45  							<span data-animation="am-flip-x" bs-tooltip="perm.Desc" placement='right'>{{perm.Name}} <span class='fa fa-question-sign'/></span>
    46  						</label>
    47  					</div>
    48  				</div>
    49  			</div>
    50  		</div>
    51  		<button class='btn btn-primary' ng-click="ct.create()" ng-disabled="myForm.$invalid">Create</button>
    52  	</form>
    53  </div>