This repository has been archived by the owner on Sep 17, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 799
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
42 changed files
with
986 additions
and
465 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
76 changes: 76 additions & 0 deletions
76
dart/lib/component/search_bar_component/search_bar_component.html
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 |
---|---|---|
@@ -0,0 +1,76 @@ | ||
<div class="panel panel-info"> | ||
<div class="panel-heading">Search<i class="glyphicon glyphicon-search pull-right"></i></div> | ||
<div class="panel-body"> | ||
<div> | ||
<h6>Region</h6> | ||
<input type="hidden" id="filterregions"></input> | ||
<input type="hidden" | ||
class="bigdrop select2-offscreen populate placeholder" | ||
multiple="multiple" id="s2_regions" style="width: 100%"> | ||
</div> | ||
<div> | ||
<h6>Tech</h6> | ||
<input type="hidden" id="filtertechnologies"></input> | ||
<input type="hidden" | ||
class="bigdrop select2-offscreen populate placeholder" | ||
multiple="multiple" id="s2_technologies" style="width: 100%"> | ||
</div> | ||
<div> | ||
<h6>Account</h6> | ||
<input type="hidden" id="filteraccounts"></input> | ||
<input type="hidden" | ||
class="bigdrop select2-offscreen populate placeholder" | ||
multiple="multiple" id="s2_accounts" style="width: 100%"> | ||
<!-- Foundation --> | ||
</div> | ||
<div> | ||
<h6>Name</h6> | ||
<input type="hidden" id="filternames"></input> | ||
<input type="hidden" | ||
class="bigdrop select2-offscreen populate placeholder" | ||
multiple="multiple" id="s2_names" style="width: 100%"> | ||
</div> | ||
|
||
<hr> | ||
|
||
<div> | ||
<h6>Search Config</h6> | ||
<input id="searchconfig" class="form-control" ng-model="cmp.searchconfig"></input> | ||
</div> | ||
|
||
<div> | ||
<h6>Status</h6> | ||
<select ng-model="cmp.active_filter_value" class="form-control"> | ||
<option value="null">None (Return Both)</option> | ||
<option value="True">Active</option> | ||
<option value="False">Inactive (Deleted)</option> | ||
</select> | ||
</div> | ||
|
||
<div> | ||
<h6>Type</h6> | ||
<select ng-model="cmp.result_type_binded" class="form-control"> | ||
<option value="items">Items</option> | ||
<option value="revisions">Items + Historical Changes</option> | ||
<option value="issues">Audit Issues</option> | ||
</select> | ||
</div> | ||
|
||
<div> | ||
<hr> | ||
<div class="row"> | ||
<div class="col-md-4"> | ||
<button class="btn btn-sm btn-primary" | ||
ng-click="cmp.pushFilterRoutes()">Search</button> | ||
</div> | ||
<div class="col-md-8"> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> <!-- end left-sidebar --> | ||
|
||
<!-- Setup the select2 autocomplete boxes --> | ||
<!-- Need to make this CSP compatible --> | ||
<script src="js/searchpage.js"> | ||
</script> |
19 changes: 19 additions & 0 deletions
19
dart/lib/component/search_page_component/search_page_component.dart
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
library security_monkey.search_page_component; | ||
|
||
import 'package:angular/angular.dart'; | ||
|
||
@Component( | ||
selector: 'search-page', | ||
templateUrl: 'packages/SecurityMonkey/component/search_page_component/search_page_component.html', | ||
publishAs: 'cmp', | ||
useShadowDom: false) // Because a Search-Page contains a Search-Bar, | ||
// and a Search-Bar uses JavaScript and is not shadow-dom Compatible, | ||
// the Search-Page cannot use shadow-dom. | ||
class SearchPageComponent { | ||
RouteProvider routeProvider; | ||
String current_result_type; | ||
|
||
SearchPageComponent(this.routeProvider) { | ||
this.current_result_type = this.routeProvider.route.parent.name; | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
dart/lib/component/search_page_component/search_page_component.html
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<div> | ||
<div class="col-lg-3"> | ||
<search-bar></search-bar> | ||
</div> | ||
|
||
<!-- right sidebar --> | ||
<div class="col-lg-9" ng-switch="cmp.current_result_type"> | ||
<revision-table ng-switch-when="revisions"></revision-table> | ||
<item-table ng-switch-when="items"></item-table> | ||
<issue-table ng-switch-when="issues"></issue-table> | ||
<h1 ng-switch-when="null">Enter a search on the left.</h1> | ||
</div> <!-- end right-sidebar --> | ||
</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
92 changes: 92 additions & 0 deletions
92
dart/lib/component/settings_component/settings_component.html
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 |
---|---|---|
@@ -0,0 +1,92 @@ | ||
<div> | ||
<div class="col-lg-3"> | ||
<div class="panel panel-info" ng-switch="cmp.isLoaded"> | ||
<div class="panel-heading">Notification Settings <i class="glyphicon glyphicon-pencil pull-right"></i></div> | ||
<div class="panel-body" ng-switch-when="false"> | ||
<p>Loading . . .</p> | ||
</div> | ||
<div class="panel-body" ng-switch-when="true"> | ||
<div> | ||
<h6>Change Emails</h6> | ||
<select ng-model="cmp.user_setting.change_report_setting" class="form-control"> | ||
<option value="ALL">All</option> | ||
<option value="ISSUES">With Issues</option> | ||
<option value="NONE">None</option> | ||
</select> | ||
<h6>Daily Email</h6> | ||
<input type="checkbox" ng-model="cmp.user_setting.daily_audit_email" /> | ||
</div> | ||
|
||
<div> | ||
<hr> | ||
<div class="row"> | ||
<div class="col-md-4 text-center"> | ||
|
||
<button class="btn btn-sm btn-primary" | ||
ng-click="cmp.saveSettings()"">Save</button> | ||
</div> | ||
<div class="col-md-8"> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="col-lg-9" ng-switch="cmp.isLoaded"> | ||
<div class="panel panel-info"> | ||
<div class="panel-heading">Accounts <span class="badge pull-right">{{cmp.accounts.length}} of {{cmp.accounts.length}}</span></div> | ||
<div class="panel-body" ng-switch-when="false"> | ||
<p>Loading . . .</p> | ||
</div> | ||
<div class="panel-body" ng-switch-when="true"> | ||
<table class="table table-striped"> | ||
<tr> | ||
<th>Notify</th> | ||
<th>Active</th> | ||
<th>Third Party</th> | ||
<th>Name</th> | ||
<th>S3 Name</th> | ||
<th>Account Number</th> | ||
<th>Notes</th> | ||
<th><button ng-click="cmp.createAccount()" class="btn btn-xs btn-primary"><i class="glyphicon glyphicon-plus"></i></button></th> | ||
</tr> | ||
<tr ng-repeat="account in cmp.accounts"> | ||
<td> | ||
<input ng-if="!cmp.enabledValueForAccount(account.active, account.third_party)" disabled="disabled" type="checkbox"> | ||
<input ng-if="cmp.enabledValueForAccount(account.active, account.third_party) && cmp.notificationValueForAccount(account.id)" type='checkbox' checked ng-click="cmp.toggleNotificationForAccount(account.id)"> | ||
<input ng-if="cmp.enabledValueForAccount(account.active, account.third_party) && !cmp.notificationValueForAccount(account.id)" type='checkbox' ng-click="cmp.toggleNotificationForAccount(account.id)"> | ||
</td> | ||
<td ng-if="account.active"><div class="text-center"><i class="glyphicon glyphicon-ok"></i></div></td> | ||
<td ng-if="!account.active"><div class="text-center"><i class="glyphicon glyphicon-remove"></i></div></td> | ||
<td ng-if="account.third_party"><div class="text-center"><i class="glyphicon glyphicon-ok"></i></div></td> | ||
<td ng-if="!account.third_party"><div class="text-center"><i class="glyphicon glyphicon-remove"></i></div></td> | ||
<td><a href="#/viewaccount/{{account.id}}">{{account.name}}</a></td> | ||
<td>{{account.s3_name}}</td> | ||
<td>{{account.number}}</td> | ||
<td>{{account.notes}}</td> | ||
<td></td> | ||
</tr> | ||
</table> | ||
|
||
</div> | ||
<div class="panel-footer"> | ||
<!-- Pagination is not net enabled for user-setting accounts | ||
<div class="pull-left"> | ||
<ul style="margin-top: 5px; margin-bottom: 5px;" class="pagination"> | ||
<li class="disabled"><a href="#">«</a></li> | ||
<li class="active"><a href="#">1 <span class="sr-only">(current)</span></a></li> | ||
</ul> | ||
</div> | ||
<div class="pull-right"> | ||
<select class="form-control"> | ||
<option>10</option> | ||
<option>25</option> | ||
<option>50</option> | ||
</select> | ||
</div> | ||
--> | ||
<div class="clearfix"></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
25 changes: 25 additions & 0 deletions
25
dart/lib/component/signout_component/signout_component.html
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<div> | ||
<div ng-switch="cmp.loading"> | ||
<div ng-switch-when="true"> | ||
<div class="page-header"> | ||
<h1>Signing Out <small>(Just a second.)</small></h1> | ||
</div> | ||
</div> | ||
<div ng-switch-when="false"> | ||
<div ng-if="cmp.complete"> | ||
<div class="page-header"> | ||
<h1>Signed Out <small>Your Security Monkey session has ended.</small></h1> | ||
</div> | ||
<div class="row"> | ||
<p>To continue using Security Monkey, please proceed to the <a href="/">Login page</a>.</p> | ||
</div> | ||
</div> | ||
<div ng-if="cmp.error"> | ||
<div class="page-header"> | ||
<h1>Error Signing Out <small>The bad thing about monkeys is when they fling poo. :(</small></h1> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
</div> |
Oops, something went wrong.