syncope-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SYNCOPE-871) Link NumberWidgets on the dashboard to their respective pages
Date Thu, 16 Jun 2016 13:26:05 GMT

    [ https://issues.apache.org/jira/browse/SYNCOPE-871?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15333758#comment-15333758
] 

ASF GitHub Bot commented on SYNCOPE-871:
----------------------------------------

Github user ilgrosso commented on a diff in the pull request:

    https://github.com/apache/syncope/pull/21#discussion_r67342904
  
    --- Diff: client/console/src/main/java/org/apache/syncope/client/console/widgets/NumberWidget.java
---
    @@ -37,6 +56,57 @@ public NumberWidget(final String id, final String bg, final int number,
final St
     
             WebMarkupContainer box = new WebMarkupContainer("box");
             box.add(new AttributeAppender("class", " " + bg));
    +        box.add(new AjaxEventBehavior("onmousedown") {
    +            @Override 
    +            protected void onEvent(final AjaxRequestTarget target) {
    +                List<AnyTypeTO> anyTypeTOs = new AnyTypeRestClient().list();
    +                PageParameters pageParameters = new PageParameters();
    +                if (id.equals("totalUsers")) {
    +                    pageParameters.add("selectedIndex", 1);
    +                    setResponsePage(Realms.class, pageParameters);
    +                } else if (id.equals("totalGroups")) {
    +                    pageParameters.add("selectedIndex", 2);
    +                    setResponsePage(Realms.class, pageParameters);
    +                } else if (id.equals("totalAny1OrRoles")) {
    +                    if (icon.equals("ion ion-gear-a")) {
    +                        final Triple<UserFormLayoutInfo, GroupFormLayoutInfo, Map<String,
AnyObjectFormLayoutInfo>> 
    +                                formLayoutInfo = FormLayoutInfoUtils.fetch(anyTypeTOs);
    +                        Collections.sort(anyTypeTOs, new AnyTypeComparator());
    +                        int selectedIndex = 1;
    +                        for (final AnyTypeTO anyTypeTO : anyTypeTOs) {
    +                            if (anyTypeTO.getKey().equals(label)) {
    +                                pageParameters.add("selectedIndex", selectedIndex);
    +                                break;
    +                            }
    +                            selectedIndex++;
    +                        }
    +                        setResponsePage(Realms.class, pageParameters);
    +                    } else {
    +                        setResponsePage(Roles.class);
    +                    }
    +                } else if (id.equals("totalAny2OrResources")) {
    +                    if (icon.equals("ion ion-gear-a")) {
    +                        final Triple<UserFormLayoutInfo, GroupFormLayoutInfo, Map<String,
AnyObjectFormLayoutInfo>>
    --- End diff --
    
    This variable is unused, remove.


> Link NumberWidgets on the dashboard to their respective pages
> -------------------------------------------------------------
>
>                 Key: SYNCOPE-871
>                 URL: https://issues.apache.org/jira/browse/SYNCOPE-871
>             Project: Syncope
>          Issue Type: Improvement
>          Components: console
>            Reporter: Tushar Mishra
>            Priority: Minor
>              Labels: user-experience
>             Fix For: 2.0.0
>
>
> To implement intuitive user experience, the NumberWidgets shown on the console's dashboard
should link to the following pages:
> Users -> Realms/User
> Groups -> Realms/Group
> Printers -> Realms/Printer
> Resources -> Topology



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message