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 791
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #111 from Netflix/develop
Bump to v0.3.4
- Loading branch information
Showing
47 changed files
with
805 additions
and
145 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
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
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
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
41 changes: 41 additions & 0 deletions
41
dart/lib/component/settings/auditor_settings_component/auditor_settings_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,41 @@ | ||
part of security_monkey; | ||
|
||
@Component( | ||
selector: 'auditor-settings-cmp', | ||
templateUrl: 'packages/security_monkey/component/settings/auditor_settings_component/auditor_settings_component.html', | ||
useShadowDom: false | ||
) | ||
class AuditorSettingsComponent extends PaginatedTable { | ||
Router router; | ||
List<AuditorSetting> auditorlist; | ||
ObjectStore store; | ||
final Http _http; | ||
|
||
get isLoaded => super.is_loaded; | ||
get isError => super.is_error; | ||
|
||
String url_encode(input) => param_to_url(input); | ||
|
||
void toggleAuditorEnable(auditor) { | ||
auditor.disabled = !auditor.disabled; | ||
store.update(auditor); | ||
} | ||
|
||
AuditorSettingsComponent(this.router, this.store, this._http) { | ||
list(); | ||
} | ||
|
||
void list() { | ||
super.is_loaded = false; | ||
store.list(AuditorSetting, params: { | ||
"count": ipp_as_int, | ||
"page": currentPage, | ||
"order_by": sorting_column, | ||
"order_dir": order_dir() | ||
}).then((auditor_settings) { | ||
super.setPaginationData(auditor_settings.meta); | ||
this.auditorlist = auditor_settings; | ||
super.is_loaded = true; | ||
}); | ||
} | ||
} |
69 changes: 69 additions & 0 deletions
69
dart/lib/component/settings/auditor_settings_component/auditor_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,69 @@ | ||
<div class="col-lg-12"> | ||
<div class="panel panel-info" ng-switch="isLoaded"> | ||
<div class="panel-heading">Auditor Settings <span class="badge pull-right">{{ items_displayed() }} of {{ totalItems }}</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 ng-click="sort_column('issue')">Issue | ||
<span ng-class="class_for_column('issue')"> | ||
</span> | ||
</th> | ||
<th ng-click="sort_column('account')">Account | ||
<span ng-class="class_for_column('account')"> | ||
</span> | ||
</th> | ||
<th ng-click="sort_column('technology')">Technology | ||
<span ng-class="class_for_column('technology')"></span> | ||
</th> | ||
<th ng-click="sort_column('issue_count')">Number of Issues | ||
<span ng-class="class_for_column('issue_count')"></span> | ||
</th> | ||
<th ng-click="sort_column('enabled')">Disabled? | ||
<span ng-class="class_for_column('enabled')"></span> | ||
</th> | ||
<th>Enable/Disable</th> | ||
</tr> | ||
<tr ng-repeat="auditoritem in auditorlist"> | ||
<td>{{auditoritem.issue}}</td> | ||
<td>{{auditoritem.account}}</td> | ||
<td>{{auditoritem.technology}}</td> | ||
<td><a href="#/issues/-/{{url_encode(auditoritem.technology)}}/{{url_encode(auditoritem.account)}}/-/True/{{url_encode(auditoritem.issue)}}/1/25">{{auditoritem.count}}</a></td> | ||
<td ng-if="auditoritem.disabled==true"><b>TRUE</b></td> | ||
<td ng-if="auditoritem.disabled==false">false</td> | ||
<td> | ||
<button ng-if="auditoritem.disabled==false" class="btn btn-xs btn-danger" ng-click="toggleAuditorEnable(auditoritem)">Disable</button> | ||
<button ng-if="auditoritem.disabled==true" class="btn btn-xs" ng-click="toggleAuditorEnable(auditoritem)">Enable</button> | ||
</td> | ||
</tr> | ||
</table> | ||
</div> | ||
<div class="panel-footer"> | ||
<div class="row"> | ||
<div class="col-lg-9"> | ||
<pagination | ||
items-per-page="ipp_as_int" | ||
total-items="totalItems" | ||
page="currentPage" | ||
on-select-page="pageChanged()" | ||
max-size="maxSize" | ||
boundary-links="true" | ||
|
||
></pagination> | ||
</div> | ||
<div class="col-lg-3 pull-right"> | ||
<br/> <!-- Why do I need a br-tag to get the dropdown to line up properly? --> | ||
<select ng-model="items_per_page" class="form-control"> | ||
<option | ||
ng-repeat="page in items_per_page_options" | ||
value="{{page}}">{{page}}</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
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
Oops, something went wrong.