|
@@ -1750,7 +1750,7 @@ public class StatisticsFragment extends Fragment implements ChecklistDialog.Chec
|
|
|
if (index < this.currentData.size()){
|
|
|
PlotComparisonItem item = this.currentData.get(index);
|
|
|
ArrayList<String> selectedData;
|
|
|
- String sortKey = null;
|
|
|
+ String groupingKey = null;
|
|
|
selectedData = new ArrayList<String>();
|
|
|
|
|
|
if (item.getChildItems() == null){
|
|
@@ -1763,15 +1763,19 @@ public class StatisticsFragment extends Fragment implements ChecklistDialog.Chec
|
|
|
LogFilter filter = new LogFilter();
|
|
|
if (this.currentPlotView instanceof PieGraph){
|
|
|
filter.setProtocols(selectedData);
|
|
|
+ if(selectedData != null && selectedData.size() > 1){
|
|
|
+ groupingKey = MainActivity.getInstance().getResources().getString(R.string.rec_protocol);
|
|
|
+ }
|
|
|
}
|
|
|
if (this.currentPlotView instanceof BarGraph){
|
|
|
|
|
|
if (this.selectedCompareData.equals(COMPARE_TITLE_AttacksPerESSID)){
|
|
|
filter.setESSIDs(selectedData);
|
|
|
- sortKey = "ESSID";
|
|
|
+ groupingKey = MainActivity.getInstance().getResources().getString(R.string.ESSID);
|
|
|
} else {
|
|
|
filter.setBSSIDs(selectedData);
|
|
|
- sortKey = "BSSID";
|
|
|
+ groupingKey = MainActivity.getInstance().getResources().getString(R.string.BSSID);
|
|
|
+
|
|
|
}
|
|
|
ArrayList<String> currentSelectedProtocol = new ArrayList<String>();
|
|
|
currentSelectedProtocol.add(this.getCurrentSelectedProtocol());
|
|
@@ -1782,7 +1786,7 @@ public class StatisticsFragment extends Fragment implements ChecklistDialog.Chec
|
|
|
selectedData.add(item.getTitle());
|
|
|
filter.setESSIDs(selectedData);
|
|
|
filter.setProtocols(this.filter.getProtocols());
|
|
|
- sortKey = "ESSID";
|
|
|
+ groupingKey = MainActivity.getInstance().getResources().getString(R.string.ESSID);
|
|
|
}
|
|
|
|
|
|
if (this.filter.hasATimestamp()){
|
|
@@ -1790,7 +1794,7 @@ public class StatisticsFragment extends Fragment implements ChecklistDialog.Chec
|
|
|
filter.setBelowTimestamp(this.filter.getBelowTimestamp());
|
|
|
}
|
|
|
|
|
|
- this.pushRecordOverviewForFilter(filter, sortKey);
|
|
|
+ this.pushRecordOverviewForFilter(filter, groupingKey);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -1807,9 +1811,9 @@ public class StatisticsFragment extends Fragment implements ChecklistDialog.Chec
|
|
|
/**
|
|
|
* Displays a record over view fragment.
|
|
|
* @param filter {@link de.tudarmstadt.informatik.hostage.ui2.model.LogFilter LogFilter}
|
|
|
- * @param sortKey String
|
|
|
+ * @param groupingKey String, key to group the attack list in the RecordOverview
|
|
|
*/
|
|
|
- private void pushRecordOverviewForFilter(LogFilter filter, String sortKey){
|
|
|
+ private void pushRecordOverviewForFilter(LogFilter filter, String groupingKey){
|
|
|
|
|
|
FragmentManager fm = this.getActivity().getFragmentManager();
|
|
|
|
|
@@ -1818,7 +1822,7 @@ public class StatisticsFragment extends Fragment implements ChecklistDialog.Chec
|
|
|
newFragment.setUpNavigatible(true);
|
|
|
newFragment.setFilter(filter);
|
|
|
|
|
|
- if (sortKey != null && sortKey.length() != 0) newFragment.setGroupKey(sortKey);
|
|
|
+ if (groupingKey != null && groupingKey.length() != 0) newFragment.setGroupKey(groupingKey);
|
|
|
|
|
|
MainActivity.getInstance().injectFragment(newFragment);
|
|
|
|