Search in sources :

Example 1 with SiteTreeFilter

use of org.zaproxy.zap.view.SiteTreeFilter in project zaproxy by zaproxy.

the class SiteMapPanel method setFilter.

private void setFilter() {
    SiteTreeFilter filter = new SiteTreeFilter(getFilterPlusDialog().getFilter());
    filter.setInScope(scopeButton.isSelected());
    ((SiteMap) treeSite.getModel()).setFilter(filter);
    ((DefaultTreeModel) treeSite.getModel()).nodeStructureChanged((SiteNode) treeSite.getModel().getRoot());
    getFilterStatus().setText(filter.toShortString());
    getFilterStatus().setToolTipText(filter.toLongString());
    expandRoot();
    // Remove any out of scope contexts too
    this.reloadContextTree();
}
Also used : SiteTreeFilter(org.zaproxy.zap.view.SiteTreeFilter) SiteMap(org.parosproxy.paros.model.SiteMap) DefaultTreeModel(javax.swing.tree.DefaultTreeModel)

Example 2 with SiteTreeFilter

use of org.zaproxy.zap.view.SiteTreeFilter in project zaproxy by zaproxy.

the class SiteMapPanel method showFilterPlusDialog.

private void showFilterPlusDialog() {
    HistoryFilterPlusDialog dialog = getFilterPlusDialog();
    dialog.setModal(true);
    try {
        dialog.setAllTags(Model.getSingleton().getDb().getTableTag().getAllTags());
    } catch (DatabaseException e) {
        log.error(e.getMessage(), e);
    }
    int exit = dialog.showDialog();
    SiteTreeFilter filter = new SiteTreeFilter(dialog.getFilter());
    filter.setInScope(this.getScopeButton().isSelected());
    if (exit != JOptionPane.CANCEL_OPTION) {
        setFilter();
    }
}
Also used : HistoryFilterPlusDialog(org.zaproxy.zap.extension.history.HistoryFilterPlusDialog) SiteTreeFilter(org.zaproxy.zap.view.SiteTreeFilter) DatabaseException(org.parosproxy.paros.db.DatabaseException)

Aggregations

SiteTreeFilter (org.zaproxy.zap.view.SiteTreeFilter)2 DefaultTreeModel (javax.swing.tree.DefaultTreeModel)1 DatabaseException (org.parosproxy.paros.db.DatabaseException)1 SiteMap (org.parosproxy.paros.model.SiteMap)1 HistoryFilterPlusDialog (org.zaproxy.zap.extension.history.HistoryFilterPlusDialog)1