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

knowledgepixels / nanodash / 28788771886

06 Jul 2026 11:38AM UTC coverage: 28.51% (+0.008%) from 28.502%
28788771886

Pull #535

github

web-flow
Merge d9131b781 into 571599d46
Pull Request #535: feat: persistent navigation context with back-link and post-publish forwarding

1811 of 7177 branches covered (25.23%)

Branch coverage included in aggregate %.

3710 of 12188 relevant lines covered (30.44%)

4.52 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/UserListPage.java
1
package com.knowledgepixels.nanodash.page;
2

3
import com.knowledgepixels.nanodash.Utils;
4
import com.knowledgepixels.nanodash.View;
5
import com.knowledgepixels.nanodash.ViewDisplay;
6
import com.knowledgepixels.nanodash.component.QueryResultItemListBuilder;
7
import com.knowledgepixels.nanodash.component.QueryResultListBuilder;
8
import com.knowledgepixels.nanodash.component.TitleBar;
9
import org.apache.wicket.markup.html.link.ExternalLink;
10
import org.apache.wicket.request.mapper.parameter.PageParameters;
11
import org.nanopub.extra.services.QueryRef;
12

13
/**
14
 * Page that lists all users and groups.
15
 */
16
public class UserListPage extends NanodashPage {
17

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

23
    private static final String HUMAN_USERS_VIEW = "https://w3id.org/np/RAeDwLoelA43CfcetS7LVQOAgQuDCw-Yf5naRYdmCmCXs/human-users-view";
24
    private static final String SOFTWARE_AGENTS_VIEW = "https://w3id.org/np/RAr4qrDh77rNoRcodAoGDOJLEECu3sBvrUJPAhuK73e1c/software-agents-view";
25
    private static final String NON_APPROVED_USERS_VIEW = "https://w3id.org/np/RA8Xkr-SnsRqu0RBGExZ3Ms8J1TviL_1bRQVRnymaWafw/non-approved-users-view";
26

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

35
    /**
36
     * Constructor for the user list page.
37
     *
38
     * @param parameters the page parameters
39
     */
40
    public UserListPage(final PageParameters parameters) {
41
        super(parameters);
×
42

43
        add(new TitleBar("titlebar", this, "users"));
×
44

45
//                final List<Group> groupList = new ArrayList<Group>(Group.getGroups());
46
//                add(new DataView<Group>("groups", new ListDataProvider<Group>(groupList)) {
47
//
48
//                        @Override
49
//                        protected void populateItem(Item<Group> item) {
50
//                                Group g = item.getModelObject();
51
//                                PageParameters params = new PageParameters();
52
//                                params.add("id", g.getIri());
53
//                                BookmarkablePageLink<Void> l = new BookmarkablePageLink<Void>("grouplink", GroupPage.class, params);
54
//                                l.add(new Label("linktext", g.getName()));
55
//                                item.add(l);
56
//                        }
57
//
58
//                });
59

60
        View topCreatorsView = View.get("https://w3id.org/np/RACcywnbkn6OAd_6E25qZL9-vdO-UwmpO1vXVWzNWJYLo/top-creators-last-30days");
×
61
        QueryRef tcQueryRef = new QueryRef(topCreatorsView.getQuery().getQueryId());
×
62
        add(QueryResultListBuilder.create("topcreators", tcQueryRef, new ViewDisplay(topCreatorsView).withDisplayWidth(6)).build());
×
63

64
        View latestUsersView = View.get("https://w3id.org/np/RAtwNLvsJbz3pk_UxdKSydsghbX6D_60ivTZpDQhK-9zA/latest-users");
×
65
        QueryRef luQueryRef = new QueryRef(latestUsersView.getQuery().getQueryId());
×
66
        add(QueryResultListBuilder.create("latestusers", luQueryRef, new ViewDisplay(latestUsersView).withDisplayWidth(6)).build());
×
67

68
        View humanUsersView = View.get(HUMAN_USERS_VIEW);
×
69
        add(QueryResultItemListBuilder.create("approved-human-users",
×
70
                new QueryRef(humanUsersView.getQuery().getQueryId()), new ViewDisplay(humanUsersView)).build());
×
71

72
        View softwareAgentsView = View.get(SOFTWARE_AGENTS_VIEW);
×
73
        add(QueryResultItemListBuilder.create("approved-software-agents",
×
74
                new QueryRef(softwareAgentsView.getQuery().getQueryId()), new ViewDisplay(softwareAgentsView)).build());
×
75

76
        View nonApprovedUsersView = View.get(NON_APPROVED_USERS_VIEW);
×
77
        add(QueryResultItemListBuilder.create("other-users",
×
78
                new QueryRef(nonApprovedUsersView.getQuery().getQueryId()), new ViewDisplay(nonApprovedUsersView)).build());
×
79

80
        String contextParam = getContextId() == null ? "" : "&context=" + Utils.urlEncode(getContextId());
×
81
        add(new ExternalLink("approve", PublishPage.MOUNT_PATH + "?template=http://purl.org/np/RA6TVVSnZChEwyxjvFDNAujk1i8sSPnQx60ZQjldtiDkw&template-version=latest" + contextParam, "approve somebody else..."));
×
82
        //add(new ExternalLink("newgroup", PublishPage.MOUNT_PATH + "?template=http://purl.org/np/RAJz6w5cvlsFGkCDtWOUXt2VwEQ3tVGtPdy3atPj_DUhk&template-version=latest", "new group"));
83
    }
×
84

85
    /**
86
     * {@inheritDoc}
87
     */
88
    @Override
89
    protected boolean hasAutoRefreshEnabled() {
90
        return true;
×
91
    }
92

93
}
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