-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for updating/deleting sites - still needs validations and some deduplication of code
- Loading branch information
Showing
4 changed files
with
113 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
(function() { | ||
"use strict"; | ||
|
||
var app = angular.module("nsotApp"); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,93 @@ | ||
<loading-panel ng-if="loading"></loading-panel> | ||
<div ng-if="!loading"> | ||
<heading-bar heading="Sites" subheading="[[site.name]]"> | ||
<button class="btn btn-info">Update Site</button> | ||
<button class="btn btn-danger">Delete Site</button> | ||
<button | ||
class="btn btn-info" | ||
data-toggle="modal" | ||
data-target="#updateSiteModal" | ||
>Update Site</button> | ||
<button | ||
class="btn btn-danger" | ||
data-toggle="modal" | ||
data-target="#deleteSiteModal" | ||
>Delete Site</button> | ||
</heading-bar> | ||
|
||
<div class="modal fade" id="updateSiteModal" tabindex="-1" role="dialog"> | ||
<div class="modal-dialog"> | ||
<div class="modal-content"> | ||
<div class="modal-header"> | ||
<button type="button" class="close close-light" data-dismiss="modal"> | ||
<span class="fa fa-close"</span> | ||
</button> | ||
<h4 class="modal-title">Update Site</h4> | ||
</div> | ||
<div class="modal-body"> | ||
<div ng-if="updateError" class="alert alert-danger"> | ||
[[updateError.code]] - [[updateError.message]] | ||
</div> | ||
<form novalidate class="nsot-form"> | ||
<div class="form-group"> | ||
<input type="text" | ||
class="form-control"i | ||
placeholder="Name" | ||
ng-model="site.name" | ||
required | ||
> | ||
</div> | ||
<div class="form-group"> | ||
<textarea style="resize: vertical;" | ||
class="form-control" | ||
rows="5" | ||
placeholder="Description" | ||
ng-model="site.description" | ||
> | ||
</textarea> | ||
</div> | ||
</form> | ||
</div> | ||
<div class="modal-footer"> | ||
<button | ||
type="button" | ||
class="btn btn-default" | ||
data-dismiss="modal" | ||
>Close</button> | ||
<button type="submit" | ||
ng-click="updateSite(site)" | ||
class="btn btn-primary" | ||
>Update</button> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="modal fade" id="deleteSiteModal" tabindex="-1" role="dialog"> | ||
<div class="modal-dialog"> | ||
<div class="modal-content"> | ||
<div class="modal-header"> | ||
<button type="button" class="close close-light" data-dismiss="modal"> | ||
<span class="fa fa-close"</span> | ||
</button> | ||
<h4 class="modal-title">Delete Site</h4> | ||
</div> | ||
<div class="modal-body"> | ||
<div ng-if="deleteError" class="alert alert-danger"> | ||
[[deleteError.code]] - [[deleteError.message]] | ||
</div> | ||
Are you sure you want to delete this site? | ||
</div> | ||
<div class="modal-footer"> | ||
<button | ||
type="button" | ||
class="btn btn-default" | ||
data-dismiss="modal" | ||
>Close</button> | ||
<button type="submit" | ||
ng-click="deleteSite(site)" | ||
class="btn btn-primary" | ||
>Delete</button> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
-r requirements.txt | ||
mrproxy==0.3.2 | ||
mrproxy==0.3.3 | ||
py==1.4.26 | ||
pytest==2.6.4 | ||
Pygments==2.0.1 | ||
|