chg: redundant members list and organisations page #1013

pull/1391/head
Cristian Bell 2016-07-28 17:36:24 +02:00
parent e1289a122c
commit f29b1c1e2e
8 changed files with 53 additions and 16 deletions

View File

@ -77,7 +77,6 @@
<li><a href="<?php echo $baseurl;?>/news">News</a></li>
<li><a href="<?php echo $baseurl;?>/users/view/me">My Profile</a></li>
<li><a href="<?php echo $baseurl;?>/users/dashboard">Dashboard</a></li>
<li><a href="<?php echo $baseurl;?>/users/memberslist">Members List</a></li>
<li><a href="<?php echo $baseurl;?>/organisations/index">Organisations</a></li>
<li><a href="<?php echo $baseurl;?>/roles/index">Role Permissions</a></li>
<li class="divider"></li>
@ -89,6 +88,7 @@
<li><a href="<?php echo $baseurl;?>/pages/display/doc/quickstart">User Guide</a></li>
<li><a href="<?php echo $baseurl;?>/users/terms">Terms &amp; Conditions</a></li>
<li><a href="<?php echo $baseurl;?>/users/statistics">Statistics</a></li>
<li><a href="<?php echo $baseurl;?>/users/memberslist">Attribute Histogram</a></li>
</ul>
</li>

View File

@ -1,5 +1,34 @@
<h2>Attribute Types Histogram</h2>
<table>
<tr>
<td colspan="2"><h4 class="histogram-legendH4">Attributes</h4> (you can also choose specific histogram items by clicking on attributes below)</td>
</tr>
<tr>
<td class="membersList-histogram-legend">
<div class="membersList-histogram-legend-line col">
<?php
$cnt = 0;
foreach ($typeDb as $type => $colour): ?>
<div class="membersList-histogram-legend-line">
<div class="membersList-histogram-legend-box" style="display: block;float: left;margin: 4px 6px 0 0;background-color:<?php echo $colour; ?>">&nbsp;</div>
<div style="display: inline-block;cursor: pointer;<?php if (in_array($type, $selectedTypes)) echo 'font-weight:bold';?>" onClick='toggleHistogramType("<?php echo $type; ?>", [<?php foreach ($selectedTypes as $t) echo '"' . $t . '", ' ?>]);'><?php echo $type;?></div>
</div>
<?php
if($cnt%12==11){?>
</div>
<div class="membersList-histogram-legend-line col">
<?php
} ?>
<?php
$cnt++;
endforeach;
?>
</div>
</td>
</tr>
<tr>
<td colspan="2"><h4 >Attributes per organization</h4></td>
</tr>
<tr>
<td class="membersList-histogram-left-table">
<table style="border-spacing:0px !important;">
@ -24,15 +53,5 @@
<?php endforeach; ?>
</table>
</td>
<td class="membersList-histogram-legend">
<?php foreach ($typeDb as $type => $colour): ?>
<div class="membersList-histogram-legend-line">
<div class="membersList-histogram-legend-box" style="background-color:<?php echo $colour; ?>">&nbsp;</div>
<div style="display: inline-block;<?php if (in_array($type, $selectedTypes)) echo 'font-weight:bold';?>" onClick='toggleHistogramType("<?php echo $type; ?>", [<?php foreach ($selectedTypes as $t) echo '"' . $t . '", ' ?>]);'><?php echo $type;?></div>
</div>
<?php
endforeach;
?>
</td>
</tr>
</table>

View File

@ -140,7 +140,6 @@
<?php endif; ?>
<li id='liview'><a href="<?php echo $baseurl;?>/users/view/me">My Profile</a></li>
<li id='lidashboard'><a href="<?php echo $baseurl;?>/users/dashboard">Dashboard</a></li>
<li id='limembers'><a href="<?php echo $baseurl;?>/users/memberslist">Members List</a></li>
<li id='liindexOrg'><a href="<?php echo $baseurl;?>/organisations/index">List Organisations</a></li>
<?php if ($menuItem === 'viewOrg'): ?>
<li class="active"><a href="<?php echo $baseurl;?>/organisations/view/<?php echo h($id);?>">View Organisation</a></li>
@ -157,6 +156,7 @@
<li id='liuserGuide'><a href="<?php echo $baseurl;?>/pages/display/doc/general">User Guide</a></li>
<li id='literms'><a href="<?php echo $baseurl;?>/users/terms">Terms &amp; Conditions</a></li>
<li id='listatistics'><a href="<?php echo $baseurl;?>/users/statistics">Statistics</a></li>
<li id='limembers'><a href="<?php echo $baseurl;?>/users/memberslist">Attribute Histogram</a></li>
<?php
break;

View File

@ -55,7 +55,7 @@
<ul>
<li><b>News:</b> Read about the latest news regarding the MISP system</li>
<li><b>My Profile:</b> Manage your user account.</li>
<li><b>Members List:</b> View the number of users per organisation and get some statistics about the currently stored attributes.</li>
<li><b>Attribute Histogram:</b> View some statistics about the currently stored attributes.</li>
<li><b>Role Permissions:</b> You can view the role permissions here. </li>
<li><b>User Guide:</b> A link to this user guide.</li>
<li><b>Terms &amp; Conditions:</b> View the terms &amp; conditions again.</li>

View File

@ -49,7 +49,7 @@ To alter any details regarding your profile, use the "My Profile" menu button to
MISP also provides its users with some information about itself and its users through the links provided in the Global Actions menu.<br><br>
<ul>
<li><b>News:</b> To read about the news regarding the system itself, click on News on the left menu. This will bring up a list of news items concerning updates and changes to MISP itself.<br /><br /></li>
<li><b>Member statistics:</b> By using the Members List menu button on the left, you can get a quick overview over how many users each organisation has registered on your server, and a histogram, depicting the distribution of attribute types created by each organisation.<br /><br /></li>
<li><b>Member statistics:</b> By using the Attribute Histogram menu button on the left, you can see a quick histogram depicting the distribution of attribute types created by each organisation.<br /><br /></li>
<li><b>User Guide:</b> The user guide is also accessible via the Global Actions menu. You can find out more about how to use the system by reading this.<br /><br /></li>
<li><b>Terms &amp; Conditions:</b> It is possible to review the terms &amp; conditions that were shown during the first run of the system by clicking on the terms &amp; conditions link in the Global Actions menu.<br /><br /></li>
<li><b>Statistics:</b> View statistics about the users and the data contained within this instance.

View File

@ -1,4 +1,5 @@
<div class="users index">
<div class="users index"><?php
/*
<h2>Members</h2>
<table class="table table-striped table-condensed table-bordered" style="width:300px;">
<tr>
@ -20,6 +21,8 @@ foreach ($orgs as $org):?>
<?php
endforeach; ?>
</table>
*/
?>
<div id = "histogram"></div>
<?php //echo $this->element('histogram');?>
<br /><br />

View File

@ -1115,7 +1115,7 @@ a.proposal_link_red:hover {
.memberslistBar {
overflow: hidden;
height:30px;
height:13px;
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
border-radius: 2px;
@ -1152,6 +1152,12 @@ a.proposal_link_red:hover {
box-shadow: 1px 1px 1px #888888;
}
.histogram-legendH4{
margin-bottom: 0;
}
.membersList-histogram-legend .col{float: left;margin: 0 0.4em 0 0;}
.attributeListContainer{
position:relative;
margin-top:10px;

View File

@ -791,6 +791,10 @@ function handleValidationErrors(responseArray, context, contextNamingConvention)
}
}
/**
* updates the histogram
* @param selected
*/
function toggleHistogramType(type, old) {
var done = false;
old.forEach(function(entry) {
@ -803,6 +807,11 @@ function toggleHistogramType(type, old) {
updateHistogram(JSON.stringify(old));
}
/**
* toggles which fields are taken into account when rendering the histogram activity
* @param type
* @param old
*/
function updateHistogram(selected) {
$.ajax({
beforeSend: function (XMLHttpRequest) {