Skip to Content.
Sympa Menu

grouper-users - [grouper-users] RE: [JIRA] (GRP-1506) New feature - Configurable subject icons (ready for pull)

Subject: Grouper Users - Open Discussion List

List archive

[grouper-users] RE: [JIRA] (GRP-1506) New feature - Configurable subject icons (ready for pull)


Chronological Thread 
  • From: "Hyzer, Chris" <>
  • To: " Mailing List" <>
  • Subject: [grouper-users] RE: [JIRA] (GRP-1506) New feature - Configurable subject icons (ready for pull)
  • Date: Fri, 24 Mar 2017 20:11:48 +0000
  • Accept-language: en-US
  • Authentication-results: internet2.edu; dkim=none (message not signed) header.d=none;internet2.edu; dmarc=none action=none header.from=isc.upenn.edu;
  • Ironport-phdr: 9a23:BVucaB8/Xfczmv9uRHKM819IXTAuvvDOBiVQ1KB+0+oRIJqq85mqBkHD//Il1AaPBtSGra0ZwLON6ejJYi8p2d65qncMcZhBBVcuqP49uEgeOvODElDxN/XwbiY3T4xoXV5h+GynYwAOQJ6tL1LdrWev4jEMBx7xKRR6JvjvGo7Vks+7y/2+94fdbghMhDexe7F/IRW5oQnMuMQan5ZpJ7osxBfOvnZGYfldy3lyJVKUkRb858Ow84Bm/i9Npf8v9NNOXLvjcaggQrNWEDopM2Yu5M32rhbDVheA5mEdUmoNjBVFBRXO4QzgUZfwtiv6sfd92DWfMMbrQ704RSiu4qF2QxLulSwJNSM28HvPh8JwkqxVvQ6hqRJ8zY7aYYGaKPVwcazGcNMGXmVNQtpdWzBdDo6+aYYEEuoPPfxfr4n4v1YCoxmwBAmtBezx0D9EnmL90LM60+Q7EAHGxwIsFM8JvXTRsNr1NKcTUOGrw6nS1jjDbuhW1ivn5IjVahAuv/eMXbRqfcXP1EYvChrIg1ONooLrODOV0/4Cs2md7+d4SeKglWEmqx1rrjih3McgkojJhoQJyl/a7yV5xpg6JcGmREJhf9GrDYZQuzmVN4t3XsMiQ3xotz0gxrIavp67eTAGyJU8yBHEcfCIb4+I7xT+X+iSOTd1nGxpd6ijixqv9EWs1/DwWtSx3VZEoSdJjsXAu3UP2hPN5cWLVP5w80K/1TqT1w3f8vxILE4omabBL5Mt36Q8moQOvUnHBCP6hUf7ga6Qe0454Oan8f7nba/jppKEN497lAX+MqM2l8KnHek2NRQCU3WC9emh1rLv41T1QLJRgfIoiKXZt43aJdgAqa6+Hg9V1Jss5wynDze819QYgWcII05ZeBKGiIjpPUvCIPflDfejh1SslzBrx/PcMrL9BZXNK2DPkLbnfblj905R0BQ/wspD655JD7wNPe//VlL0udzWARI1LxC4zuPlBdpj2Y4SR2eCD6qHPK/OsVKE/ucvLPONZI8Rtjb9Mf8l5/v2gH88hVAdfamo3JoJZ3CiBflmIl6Zbmb2jtccCWcFoAw+TOrwhFKcTDFTem6+X7gg6TEjFIKmEYDDS5iigLyb2ye7A4VWaX5cClyVDHfobJuLW+0XaC+JJs9hkycEVaS6S4M/zx2utQn6y6Z5IerO/C0Xq47j2MZv6+LNiB4y6G88M8PImW6XSHxsk3lNWiQ7xrtXoEphx02F3LQixfFUCJR27vJNUwE1fbrd1PAwQ4T9QAXcZtqTDUu9T8+9KTA3Ut8rxdISOQBwF8j03T7Z2C//SZ8EhbGRQNQf8rjdxDK5c8N2y2fU2bMJjkItBNZXOGugwKNz6l6AVMbyj0yFmvPyJuwn1ynX+TLbwA==
  • Spamdiagnosticmetadata: NSPM
  • Spamdiagnosticoutput: 1:99

This is in 2.3.0 ui patch #20. Thanks Chad! :)

Ps. if you can apply the patch and make sure everything is ok, that would be
swell...


Pps. On the demo server I got this error, did you?

Problem applying patch since this patch old file:

/opt/grouper/2.3/patchesAuto/tarballs/patches/grouper_v2_3_0_ui_patch_20/old/classes/grouperText/grouper.text.fr.fr.base.properties
is not the same as what the patch expects:

/opt/tomcats/tomcat_f/webapps/grouper_v2_3/WEB-INF/classes/grouperText/grouper.text.fr.fr.base.properties
Do you want to force install this patch (t|f)? [f]:
<using default which is blank due to
grouperInstaller.autorun.useDefaultsAsMuchAsAvailable and
grouperInstaller.autorun.forceInstallPatch>:
Cannot apply patch since this patch file:

/opt/grouper/2.3/patchesAuto/tarballs/patches/grouper_v2_3_0_ui_patch_20/old/classes/grouperText/grouper.text.fr.fr.base.properties
is not the same as what the patch expects:

/opt/tomcats/tomcat_f/webapps/grouper_v2_3/WEB-INF/classes/grouperText/grouper.text.fr.fr.base.properties
- added to end of property file: grouper_v2_3_0_ui_patch_20.state = error


Fixed by just forcing the patch, or doing this:

[appadmin@i2midev1 patchesAuto]$ cp
/opt/grouper/2.3/patchesAuto/tarballs/patches/grouper_v2_3_0_ui_patch_20/old/classes/grouperText/grouper.text.fr.fr.base.properties

/opt/tomcats/tomcat_f/webapps/grouper_v2_3/WEB-INF/classes/grouperText/grouper.text.fr.fr.base.properties

IF you get the error too I can fix the patch by removing that file I guess...


-----Original Message-----
From: Hyzer, Chris
Sent: Friday, March 24, 2017 1:33 PM
To:

Mailing List
<>
Subject: RE: [JIRA] (GRP-1506) New feature - Configurable subject icons
(ready for pull)

Chad, this looks like a great enhancement! Thanks! Can you make a pull
request for 2.3 and for master (or just master or whatever you want?

Thanks
Chris

-----Original Message-----
From: Chad Redman (JIRA)
[mailto:]

Sent: Friday, March 24, 2017 12:06 PM
To: Hyzer, Chris
<>
Subject: [JIRA] (GRP-1506) New feature - Configurable subject icons (ready
for pull)

Chad Redman created GRP-1506:
--------------------------------

Summary: New feature - Configurable subject icons (ready for
pull)
Key: GRP-1506
URL: https://bugs.internet2.edu/jira/browse/GRP-1506
Project: Grouper
Issue Type: New Feature
Components: UI
Affects Versions: 2.3.0, 2.4.0
Reporter: Chad Redman
Assignee: Chris Hyzer
Priority: Trivial


Our institutional Grouper config uses four distinct sources. To make it
easier to identify them, we have customized a few UI classes and added new
properties, so that different icons are used for different subjects. An
example showing usage (set in grouper-ui.properties) is:

grouperUi.screenSubjectIcon2.screenHtmlEl.default = ${'<i class="fa
fa-user"></i> '}
- this is added to grouper-ui.base.properties as the default or fallback
which can be overrided per subject id. If for some reason a patcher fails to
upgrade grouper-ui.base.properties, the same value is hardcoded in
GrouperUiUtils so that the existing person icon is still displayed as before.

grouperUi.screenSubjectIcon2.sourceId.0 = student
grouperUi.screenSubjectIcon2.screenHtmlEl.0 = ${'<i class="fa
fa-graduation-cap"></i> '}
grouperUi.screenSubjectIcon2.sourceId.1 = nonstudent
grouperUi.screenSubjectIcon2.screenHtmlEl.1 = ${'<i class="fa fa-coffee"></i>
'}
- like the other indexed properties, these start at zero and iterate
through sequential grouperUi.screenSubjectIcon2.sourceId.N indexes. If any
defined sourceId value matches the source ID for a subject, the corresponding
grouperUi.screenSubjectIcon2.screenHtmlEl.N value is used for the icon HTML
instead of the default.

Any valid EL can work here. For example, you can set a different icon based
on attributes. E.g.,:

grouperUi.screenSubjectIcon2.screenHtmlEl.1 =
${subject.attributes['businessCategory']==null ? '<i class="fa
fa-question-circle"></i> ' :
subject.attributes['businessCategory'].iterator().next() == 'Account Payable'
? '<i style="color: red" class="fa fa-coffee"></i> ' : '<i class="fa
fa-coffee"></i> '}

There is also a change in grouperText/grouper.text.*.base.properties, just to
replace the hardcoded HTML with the dynamic value. If you have customized
guiSubjectShortLink from the base default, you may want to change your
version to use the dynamic icon.

This works everywhere in the New UI (at least where I checked) - see links
for example screenshots:

* Search results
([example|https://image.ibb.co/eKnBRF/grouper_custom_icons_01_search_results.png])
* Subject detail page ([example
1|https://image.ibb.co/mzFy6F/grouper_custom_icons_02_student_source.png],
[example
2|https://image.ibb.co/cG65mF/grouper_custom_icons_03_nonstudent_source.png]
* Add members combo box ([example
1|https://image.ibb.co/gm3J6F/grouper_custom_icons_04_add_members.png],
[example
2|https://image.ibb.co/hyprRF/grouper_custom_icons_07_add_members_attribute.png])
* Group member listing
([example|https://image.ibb.co/cBnd6F/grouper_custom_icons_05_group_members.png])
* Subject API diagnostics page
([example|https://image.ibb.co/jk42Yv/grouper_custom_icons_06_subject_api_diag.png])

This only affects the New UI, not the Admin UI or Lite UI.

As it's a major feature add, I didn't know if this would be better as a
straight pull request, or as an optional package. The changeset are currently
in my [Github
fork|https://github.com/cer28/grouper/tree/cer28-custom-subject-icons].




--
This message was sent by Atlassian JIRA
(v7.2.6#72008)



Archive powered by MHonArc 2.6.19.

Top of Page