Bug 40528 - It should be possible to add links and modules as a shallow copy to an overview category
It should be possible to add links and modules as a shallow copy to an overvi...
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC (Generic)
UCS 4.1
Other Linux
: P5 normal (vote)
: UCS 4.1-0-errata
Assigned To: Alexander Kramer
Florian Best
:
Depends on:
Blocks: 38957
  Show dependency treegraph
 
Reported: 2016-01-28 14:16 CET by Alexander Kramer
Modified: 2016-03-23 13:21 CET (History)
3 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments
example of an xml file (1.15 KB, text/xml)
2016-01-28 14:48 CET, Alexander Kramer
Details
patch code cleanup (1.46 KB, patch)
2016-01-28 15:10 CET, Florian Best
Details | Diff
patch for DTD (2.12 KB, patch)
2016-02-04 17:41 CET, Florian Best
Details | Diff
xml file for qa (1.00 KB, text/xml)
2016-02-10 08:59 CET, Alexander Kramer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Kramer univentionstaff 2016-01-28 14:16:24 CET
Within the discussion about how to improve the usability of an app appliance, we need the possibility to add links (e.g. to the overview) and shallow copies of umc modules to another overiew category.
Comment 1 Alexander Kramer univentionstaff 2016-01-28 14:25:18 CET
With this changes it is possible to:

- add more than one module to a xml file
- the modules / flavors will be merged to make show copies possible

- add link elements

Questions:
Should it be possible to control links by acls?
Comment 2 Alexander Kramer univentionstaff 2016-01-28 14:44:50 CET
r67044              
univention-management-console-frontend (5.0.63-14)                                                                       * Bug #40528: Display links and shallow copies of modules in categories
Successful build 5.0.63-14.1201.201601281429

r67045 yaml file

----
r67046
univention-management-console (8.0.28-6)
* Bug #40528: Display links and shallow copies of modules in categories
Successful build 8.0.28-6.909.201601281440 

r67047 yaml file
Comment 3 Alexander Kramer univentionstaff 2016-01-28 14:48:08 CET
Created attachment 7434 [details]
example of an xml file

Maybe helpful for QA
Comment 4 Alexander Kramer univentionstaff 2016-01-28 14:55:22 CET
TODO dtd file:

remove possibility of url element in module
adapt comment of link element and remove version and notifier


module.py
if '__link' in mod.id: --> if mod.id.startswith('__link')
Comment 5 Florian Best univentionstaff 2016-01-28 15:10:42 CET
Created attachment 7435 [details]
patch code cleanup
Comment 6 Alexander Kramer univentionstaff 2016-02-02 09:19:57 CET
As discussed I adapted the files.

FYI: A link is now defined by having an url and not by a leading '__link' inside the id.

r67112
univention-management-console-frontend (5.0.63-16) 
* Bug #40528: A link is now defined by having a url
Successful build
Package: univention-management-console-frontend
Version: 5.0.63-16.1203.201602020908

r67113 yaml file


r67114
univention-management-console (8.0.28-7) 
* Bug #40528: Code clean up and adapted dtd file
Successful build
Package: univention-management-console
Version: 8.0.28-7.910.201602020917

r67115 yaml file
Comment 7 Alexander Kläser univentionstaff 2016-02-03 19:07:09 CET
I reverted the changes to the UMC frontend in order to be able to release staging errata for the package:

univention-management-console-frontend (5.0.63-17):
r67159 | Bug #40528: temporarily reverted last changes
r67158 | Revert "* Bug #40528: Display links and shallow copies of modules in categories"
r67157 | Revert "* Bug #40528: A link is now defined by having a url"

The changes for the package univention-management-console have been left untouched as there are no other errata pending for it.

UMC frontend package is building.
Comment 8 Alexander Kläser univentionstaff 2016-02-03 19:10:24 CET
Package built + adjusted the YAML file:

univention-management-console-frontend.yaml:
r67160 | Bug #40528: removed entry from YAML file + updated package version
Comment 9 Florian Best univentionstaff 2016-02-04 17:41:04 CET
Created attachment 7451 [details]
patch for DTD
Comment 10 Alexander Kramer univentionstaff 2016-02-05 08:53:15 CET
r67209
univention-management-console-frontend (5.0.63-18) 
* Bug #40528: Added the changes again

Successful build
Package: univention-management-console-frontend
Version: 5.0.63-18.1205.201602050848

r67210 yaml file
Comment 11 Alexander Kramer univentionstaff 2016-02-05 12:19:24 CET
(In reply to Florian Best from comment #9)
> Created attachment 7451 [details]
> patch for DTD

r67216
univention-management-console (8.0.28-8) 
* Bug #40528: Applied patch for dtd file

Successful build
Package: univention-management-console
Version: 8.0.28-8.911.201602051217

yaml file 67218
Comment 12 Florian Best univentionstaff 2016-02-05 14:25:08 CET
1. Please ignore <link> elements without <url>-tag - as they are invalid and wouldn't do anything on the overview.

2. Please make the URI translatable.
Comment 13 Florian Best univentionstaff 2016-02-05 14:33:49 CET
3. The UMC frontend does not load / is empty if there are modules with multiple _foo_ categories. I guess the following code causes this:

+			if (item.is_shallow_copy && item.categories.length > 1) {
+				item.category_for_color = array.filter(item.categories, lang.hitch(this, function(cat) {
+					return !this._is_shallow_copy(cat);
+				}))[0];
+			}
→ element [0] doesn't exists.
Comment 14 Alexander Kramer univentionstaff 2016-02-10 07:52:26 CET
r67283 
univention-management-console (8.0.29-1) 
* Bug #40528: ignore links without url element
make uri translateable

r67285 adapted debian/changelog

Successful build
Package: univention-management-console
Version: 8.0.28-9.913.201602100730

r67286 yaml file
----

r67287
univention-management-console-frontend (5.0.63-19) 
* Bug #40528: Allow multiple categories like _favorites_

Successful build
Package: univention-management-console-frontend
Version: 5.0.63-19.1206.201602100743

r67288 yaml file
Comment 15 Alexander Kramer univentionstaff 2016-02-10 08:42:46 CET
r67294
univention-management-console (8.0.28-10) 
* Bug #40528: replaced translationId with id

Successful build
Package: univention-management-console
Version: 8.0.28-10.914.201602100840

r67295 yaml file
Comment 16 Alexander Kramer univentionstaff 2016-02-10 08:59:27 CET
Created attachment 7462 [details]
xml file for qa

this xml file covers 4 scenarios:
(1) add a module as an shallow copy
(2) add a link also to another category / module
(3) add a link with multiple underscored categories like _favorites_
(4) do not add a invalid link without an url element
Comment 17 Florian Best univentionstaff 2016-02-10 12:12:37 CET
OK: FF | IE | Chromium
OK: <link>
OK: DTD
OK: <module>/<flavor>-category-merging
OK: translations
OK: YAML
Permissions → Bug #40626

It is also possible to create a pop up with this:

<link id="popup" priority="150" version="1.0">
        <name>Pop up</name>
        <description></description>
        <url>javascript:require('umc/dialog').alert('Hello world!');</url>
        <categories>
                <category name="domain"/>
        </categories>
</link>
Comment 18 Alexander Kramer univentionstaff 2016-02-10 14:28:34 CET
Together with Florian (QA) we added the following changes to make link elements translatable:

r67309
univention-management-console (8.0.28-11) 
* Bug #40528: adjust dh_umc.py to also collect translations of <link>
elements

Successful build
Package: univention-management-console
Version: 8.0.28-11.915.201602101423

r67310