• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

knowledgepixels / nanodash / 26594957788

28 May 2026 06:43PM UTC coverage: 20.76% (+0.1%) from 20.649%
26594957788

push

github

web-flow
Merge pull request #474 from knowledgepixels/feat/queries-page-as-proper-view

feat: render /queries panel as a proper ResourceView with dropdown menu

1008 of 6154 branches covered (16.38%)

Branch coverage included in aggregate %.

2594 of 11197 relevant lines covered (23.17%)

3.32 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
src/main/java/com/knowledgepixels/nanodash/page/QueryListPage.java
1
package com.knowledgepixels.nanodash.page;
2

3
import org.apache.wicket.markup.html.form.Form;
4
import org.apache.wicket.markup.html.form.TextField;
5
import org.apache.wicket.model.Model;
6
import org.apache.wicket.request.mapper.parameter.PageParameters;
7
import org.nanopub.extra.services.QueryRef;
8

9
import com.knowledgepixels.nanodash.View;
10
import com.knowledgepixels.nanodash.ViewDisplay;
11
import com.knowledgepixels.nanodash.component.QueryResultListBuilder;
12
import com.knowledgepixels.nanodash.component.TitleBar;
13

14
/**
15
 * Page that lists queries and allows searching through them.
16
 */
17
public class QueryListPage extends NanodashPage {
18

19
    /**
20
     * The mount path for this page.
21
     */
22
    public static final String MOUNT_PATH = "/queries";
23

24
    private static final String QUERIES_VIEW = "https://w3id.org/np/RAHfLCMk5jF0yaamDU9d0tQAaKKRZaYwWFH1HdbW35Qwo/queries-view";
25

26
    /**
27
     * {@inheritDoc}
28
     */
29
    @Override
30
    public String getMountPath() {
31
        return MOUNT_PATH;
×
32
    }
33

34
    private TextField<String> searchField;
35

36
    /**
37
     * Constructor for the QueryListPage.
38
     *
39
     * @param parameters Page parameters containing the search query.
40
     */
41
    public QueryListPage(final PageParameters parameters) {
42
        super(parameters);
×
43

44
        add(new TitleBar("titlebar", this, "query"));
×
45

46
        final String searchText = parameters.get("query").toString();
×
47

48
        Form<?> form = new Form<Void>("form") {
×
49

50
            protected void onSubmit() {
51
                String searchText = searchField.getModelObject().trim();
×
52
                PageParameters params = new PageParameters();
×
53
                params.set("query", searchText);
×
54
                setResponsePage(SearchPage.class, params);
×
55
            }
×
56
        };
57
        add(form);
×
58

59
        form.add(searchField = new TextField<String>("search", Model.of(searchText)));
×
60

61
        View queriesView = View.get(QUERIES_VIEW);
×
62
        QueryRef queryRef = new QueryRef(queriesView.getQuery().getQueryId());
×
63
        add(QueryResultListBuilder.create("queries", queryRef, new ViewDisplay(queriesView)).build());
×
64
    }
×
65

66
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc