Skip to content

Commit

Permalink
Refactored Manager/Groups template
Browse files Browse the repository at this point in the history
  • Loading branch information
JuanjiJG authored and havidarou committed May 31, 2018
1 parent ce0e574 commit c0ebb99
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 17 deletions.
58 changes: 44 additions & 14 deletions public/templates/manager/groups/groups-preview.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
<md-content flex layout="column" ng-controller="groupsPreviewController" class="manager-groups-main-div overflow-hidden"
ng-if="groupsMenu == 'preview'">
<div flex layout="column" layout-align="start stretch" ng-init="groupsSelectedTab='agents'">
<md-content flex layout="column" ng-controller="groupsPreviewController" class="overflow-hidden" ng-if="groupsMenu == 'preview'">

<!-- Loading ring -->
<div class='uil-ring-css' ng-show="load">
<div></div>
</div>

<div flex layout="column" layout-align="start stretch" ng-show="!load" ng-init="groupsSelectedTab='agents'">

<div flex layout="column" ng-init="lookingGroup=false">

<div flex layout="column" class="md-padding">

<!-- MD5 Sums and Details cards -->
<div layout="row" ng-if="lookingGroup">

<!-- Group MD5 sums section -->
<md-card flex class="no-margin-left wz-md-card">
<md-card-content>
<span class="wz-headline-title">{{ groups.items[selectedGroup].name }}</span>
Expand All @@ -19,6 +30,9 @@
</div>
</md-card-content>
</md-card>
<!-- End Group MD5 sums section -->

<!-- Group Details section -->
<md-card flex class="no-margin-right wz-md-card">
<md-card-content>
<span class="wz-headline-title">Details</span>
Expand All @@ -36,29 +50,38 @@
</div>
</md-card-content>
</md-card>
<!-- End Group Details section -->

</div>
<!-- End MD5 Sums and Details cards -->

<wz-search-bar layout="row" ng-show="groupsSelectedTab==='agents' && lookingGroup" data="groupAgents" term="searchTermAgent"
placetext="'Filter agents...'"></wz-search-bar>
<!-- Agents search bar -->
<wz-search-bar layout="row" ng-show="groupsSelectedTab==='agents' && lookingGroup" data="groupAgents" term="searchTermAgent" placetext="'Filter agents...'"></wz-search-bar>

<wz-search-bar layout="row" ng-show="groupsSelectedTab==='files' && !file && lookingGroup" data="groupFiles" term="searchTermFile"
placetext="'Filter files...'"></wz-search-bar>
<!-- Files search bar -->
<wz-search-bar layout="row" ng-show="groupsSelectedTab==='files' && !file && lookingGroup" data="groupFiles" term="searchTermFile" placetext="'Filter files...'"></wz-search-bar>

<!-- Groups search bar -->
<wz-search-bar ng-show="!lookingGroup" layout="row" data="groups" term="searchTerm" placetext="'Filter groups...'"></wz-search-bar>

<!-- Groups table -->
<wz-table-header ng-if="!lookingGroup" layout="row" data="groups" keys="[
{name:'Name',sortValue:'name',size:20},
{name:'Agents',sortValue:'count',size:15},
{name:'MD5 agent.conf'}
]">
</wz-table-header>
<wz-table ng-if="!lookingGroup" layout="row" flex func="loadGroup(index)" data="groups" keys="[{col:'name',size:20},{col:'count',size:15},'merged_sum']"></wz-table>

<!-- End groups table -->

<!-- CSV Download button section for groups -->
<div layout="row" class="wz-margin-top-10" ng-if="!lookingGroup">
<span flex></span>
<a class="small" id="btnDownload" ng-click="downloadCsv('groups')">Formatted <i aria-hidden="true" class="fa fa-download"></i></a>
<a class="small" id="btnDownload" ng-click="downloadCsv('groups')">Formatted <i aria-hidden="true" class="fa fa-fw fa-download"></i></a>
</div>
<!-- End CSV Download button section for groups -->

<!-- Group agents table -->
<wz-table-header layout="row" data="groupAgents" keys="[
{name:'ID',sortValue:'id',size:10},
{name:'Name',sortValue:'name'},
Expand All @@ -68,29 +91,35 @@
{name:'Agent version',sortValue:'version'}
]" ng-show="lookingGroup && groupsSelectedTab==='agents'">
</wz-table-header>

<wz-table layout="column" flex full="'agent'" func="showAgent(agent)" data="groupAgents" keys="[{col:'id',size:10},'name','ip','os.platform','os.version','version']" ng-if="lookingGroup && groupsSelectedTab==='agents'">
</wz-table>

<!-- End Group agents table -->

<!-- CSV Download button section for group agents -->
<div layout="row" class="wz-margin-top-10" ng-if="lookingGroup && groupsSelectedTab==='agents'">
<span flex></span>
<a class="small" id="btnDownload" ng-click="downloadCsv('groupAgents')">Formatted <i aria-hidden="true" class="fa fa-download"></i></a>
<a class="small" id="btnDownload" ng-click="downloadCsv('groupAgents')">Formatted <i aria-hidden="true" class="fa fa-fw fa-download"></i></a>
</div>
<!-- End CSV Download button section for group agents -->

<!-- Group files table -->
<wz-table-header layout="row" data="groupFiles" keys="[
{name:'File',sortValue:'filename',size:30},
{name:'MD5 checksum'}
]" ng-show="lookingGroup && groupsSelectedTab==='files' && !file">
</wz-table-header>

<wz-table layout="column" flex func="showFile(index)" data="groupFiles" keys="[{col:'filename',size:30},'hash']" ng-if="lookingGroup && groupsSelectedTab==='files' && !file">
</wz-table>
<!-- End Group files table -->

<!-- CSV Download button section for group files-->
<div layout="row" class="wz-margin-top-10" ng-if="lookingGroup && groupsSelectedTab==='files' && !file">
<span flex></span>
<a class="small" id="btnDownload" ng-click="downloadCsv('groupFiles')">Formatted <i aria-hidden="true" class="fa fa-download"></i></a>
<a class="small" id="btnDownload" ng-click="downloadCsv('groupFiles')">Formatted <i aria-hidden="true" class="fa fa-fw fa-download"></i></a>
</div>
<!-- End CSV Download button section for group files -->

<!-- File JSON viewer section -->
<div flex layout="column" class="md-padding" ng-if="lookingGroup && groupsSelectedTab==='files' && file">
<div flex layout="column">
<div layout="row" class="wz-padding-bottom-14">
Expand All @@ -102,6 +131,7 @@
</div>
</div>
</div>
<!-- End File JSON viewer section -->

</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion public/templates/manager/groups/groups.head
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<div flex layout="column" ng-controller="groupsController" class="mozilla-table-size-85" ng-if="submenuNavItem == 'groups'">
<div ng-cloak flex layout="column" class="mozilla-table-size-85" ng-controller="groupsController" ng-if="submenuNavItem == 'groups'">
<md-progress-linear class="md-accent" md-mode="indeterminate" ng-show="load"></md-progress-linear>
4 changes: 2 additions & 2 deletions public/templates/manager/manager-osseclog.html
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,12 @@
</wz-table>
<!-- End Realtime enabled section -->

<!-- CSV Download button section -->
<!-- CSV Download button section -->
<div layout="row" class="wz-margin-top-10">
<span flex></span>
<a class="small" id="btnDownload" ng-click="downloadCsv()">Formatted <i aria-hidden="true" class="fa fa-fw fa-download"></i></a>
</div>
<!-- End CSV Download button section -->
<!-- End CSV Download button section -->
</div>
<!-- End Logs table section -->
</div>

0 comments on commit c0ebb99

Please sign in to comment.