Commit Graph

73 Commits

Author SHA1 Message Date
Paul Eggleton
51d7f139f8 RRS: support grouping upgrades by version for multi-version recipes
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2019-11-21 02:27:39 +13:00
Paul Eggleton
928d19a9ab RRS: handle downgrades
Version downgrades (or what appear to be downgrades) do occasionally
happen, and if they did then the RRS was previously simply ignoring
them, resulting in the latest version being reported incorrectly.
Allow downgrades to be recorded as an upgrade with a new 'Downgrade'
type option set, and display a label on such records in the UI.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2019-11-21 02:27:39 +13:00
Paul Eggleton
5540a84434 RRS: Add deleted recipe handling
Now that we're using RecipeSymbols we have the complete list of recipes
that ever existed in a layer. We only want to see the ones that are
valid for the selected milestone, so when a recipe gets deleted (or
renamed or moved outside of the layer subdirectory, if any) we need to
record that - do so using a RecipeUpgrade record with a new field
upgrade_type set to 'R'. Additionally we need to store the file path so
that deletion events (where we don't parse the contents of the recipe,
thus we don't have PN) are easy to match up with RecipeUpgrade records;
naturally we need to keep the paths "up-to-date" when we notice recipe
files being moved around.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2019-11-21 02:27:39 +13:00
Paul Eggleton
8f37d77598 RRS: move Export button and restore Tools drop-down menu
Move the Export Recipe List button, change it to match the Export CSV
button on the layer detail page and put the Tools menu back (useful for
accessing the Admin site if not just for consistency). The Submit Layer
button remains hidden.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2019-02-21 15:47:56 +13:00
Paul Eggleton
0d19f49dd7 RRS: fix sorting arrow positioning
I'm not sure when or how they got broken but the sorting arrows were
overlapping the text, so move them back into the proper location, 8px
from the right of the column.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2019-02-14 10:05:53 +13:00
Paul Eggleton
0929289465 Add links to other branch recipes in recipe detail
Add links to the same recipe in other branches in the recipe detail page
(and RRS recipe detail page) so that you can see which versions are
available in other branches and drill down to the detail if you want to.

Implements [YOCTO #13019].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-12-06 09:25:06 +13:00
Paul Eggleton
aa10299356 Replace uitablefilter usage with jQuery
We were using uitablefilter.js to provide live filtering of table rows
based upon a search field value, but it turns out this module really
isn't necessary - we can accomplish the same thing using simple jQuery
code. While we're at it, enable the search field on the layers list page
to work in conjunction with with the drop-down layer type selection, fix
pasting into the search field and refreshing with a search specified.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-11-19 16:44:42 +13:00
Paul Eggleton
631116a1c4 Replace nvd3 with Chart.js
nvd3 and its python/django wrappers appear to be no longer actively
maintained, and at least the wrappers were a bit clunky to use. Looking
around for a suitable replacement, Chart.js seems capable, has no
additional dependencies and is fairly simple to use. As a bonus we get
to drop a few Python dependencies from our list.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-11-06 10:33:39 +13:00
Paul Eggleton
517424dc81 Upgrade to Bootstrap 3
Use a more modern version of Bootstrap and take the opportunity to
upgrade jQuery to the latest version at the same time. This provides
better browser compatibility, moves to MIT license, allows us to make
the site more responsive for different devices in future, and provides
theming capabilities for custom installs among other improvements.

(I chose to upgrade to v3 for now rather than straight to v4 as it was
easier to do this gradually.)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-09-20 15:57:59 +12:00
Paul Eggleton
575b6bc180 rrs: fix recipe count not showing up properly if no per-recipe maintainers
If a maintenance plan has no per-recipe maintainers then we don't show
the maintainer filtering drop-down, but we still had javascript code
that unconditionally tried to access it and of course that failed if it
wasn't there. Disable that as well without per-recipe maintainers.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-09-06 11:08:43 +12:00
Paul Eggleton
a1b7fdacdb rrs: fix recipe/maintainer count showing at top
We were using the main badge class as a selector here to show the recipe
or maintainer count, and that meant that it also showed up at the top
next to the login button if there were some layers to review. Use a
proper id to stop that from happening.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-08-22 16:05:31 +12:00
Paul Eggleton
99c7f0b916 rrs: show link to other distro comparison pages
If other distro comparison package(s) exist for a recipe being shown in
the RRS recipe detail page, link to the page for each package as well as
any extra URLs.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-08-13 16:02:59 +02:00
Paul Eggleton
e071ebab29 rrs: add flag to MaintenancePlan to specify layer-wide maintainers
Most layers do not track maintenance on a per-recipe basis, and for
those layers we will hide some of the per-recipe maintainer features
and on the recipe detail show the layer maintainer(s) as the
maintainer(s) of the recipe.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-05-04 23:57:53 +12:00
Paul Eggleton
2eedc87399 templates/rrs: replace use of = with ==
I can't quite tell which Django version broke this, but in any case
based on what's in pagination.html it seems we ought to have been
using == already.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-05-04 23:57:53 +12:00
Paul Eggleton
183ba0f7eb rrs: add charts page
Add some basic charts to show recipe upstream / patch status.

Implements [YOCTO #7909].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-05-04 23:57:53 +12:00
Paul Eggleton
130ff8e803 rrs: add patch listing to recipe list and detail
Expose the newly added patch information in the RRS:

* Add a table to the recipe detail listing the patches for the recipe
* Add pending / total counts to the recipe list page

Implements [YOCTO #7909].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-05-04 23:57:53 +12:00
Paul Eggleton
5ed5f748f2 rrs: restore full-width pages
Upon consideration, for the width of the information we want to present
we do actually want full-width pages for the RRS. When this was changed
earlier in the rrs branch it was changed in the base template, but we
want to keep the same style elsewhere, so put a block in that will let
use the "container-fluid" style (full width) in the RRS pages and
"container" by default everywhere else.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-05-04 23:57:53 +12:00
Paul Eggleton
c78fbde643 rrs: support new source structure in recipe detail
In the rrs branch we used to just store SRC_URI in a field, however we
now have a proper model to store sources, so use that in the RRS recipe
detail page.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-05-04 23:57:53 +12:00
Paul Eggleton
8e6975b1db rrs: Add link to layer detail to breadcrumb on recipe detail
Add a convenience link to the layer detail to the breadcrumb (also as an
indicator, since it's possible to have more than one layer in the
maintenance plan).

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-05-04 23:57:53 +12:00
Paul Eggleton
8a2839b870 rrs: add breadcrumb to recipe detail page
Make it possible to get back to the maintenance plan from the recipe
detail page.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-05-04 23:57:53 +12:00
Paul Eggleton
efc136b1bb rrs: add titles to maintainers/recipes page
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-05-04 23:57:53 +12:00
Paul Eggleton
ea6270f386 rrs: handle dependency field differences
The old RRS branch had its own addition of dependency support, but in the
mean time we added that to the layer index in the master branch using a
different structure. Adapt the RRS recipe detail page to that structure.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-05-04 23:57:53 +12:00
Paul Eggleton
88467d1ab9 rrs: use default milestone instead of "All" for release drop-down
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-05-04 23:57:53 +12:00
Paul Eggleton
1733170583 rrs: add maintenance plan selection
Add a drop-down for selecting the maintenance plan from the recipes
page.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-05-04 23:57:53 +12:00
Paul Eggleton
b8f51c7f9e rrs: handle maintenance plans in views
Insert maintenance plan into views, their corresponding URLs and
templates.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-05-04 23:57:53 +12:00
Paul Eggleton
227b9c65af rrs_upstream_email: rework
* Use maintenance plans to get layerbranches
* Use from/to/subject and admin contact from maintenance plan
* Use an actual template to render the email (and drop tabulate
  dependency)
* Improve grammar in the email text
* Use a single line to represent the most recent commit

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-05-04 23:57:53 +12:00
Paul Eggleton
e50c2e6841 Rename RRS URLs to have rrs_ prefix
Make these distinct from the layerindex ones.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-05-04 23:57:52 +12:00
Paul Eggleton
bb20ca4fb0 Drop "load url from future"
This is no longer needed with current Django versions.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-05-04 23:57:52 +12:00
Aníbal Limón
029796b103 templates/rrs/recipedetail.html: Change Maintainer to Committer
To avoid confusion about who is the current maintainer.

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2018-05-04 23:57:52 +12:00
Aníbal Limón
1c5b79a312 templates/rrs/recipedetail.html: Fix unneeded quotes in url call
The url template function resolve an URL associated with a model, so
in Django 1.6 quotes around variables don't get the variable value.

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2018-05-04 23:57:52 +12:00
Aníbal Limón
48375d481c rrs: Frontend update to work with Python3 and django
[YOCTO #9746]

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2018-05-04 23:57:52 +12:00
Belen Barros Pena
cd5c4ff7d1 Show the 'Upstream version' column only when relevant
Currently the recipes table always shows the 'Upstream version' column.
However, for recipes up-to-date, this column is irrelevant, since for such
recipes 'version' always equals 'upstream version'.

Since the vast majority of the recipes are up-to-date, when you are
showing all the recipes the 'upstream version' column is also pretty
useless.

The column is only really relevant when you are looking at recipes
with status 'not updated' or 'can't be updated'. I would have thought
there would be nothing to show in the 'Upstream version' column for
recipes with status 'Unknown', but it turns out some of those do have
an upstream version value, that I thought might be useful to the
maintainer somehow.

So, this patch hides the 'Upstream version' column whenever you are
looking at all the recipes or up-to-date recipes; and shows it when
you select any of the other recipe statuses

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
2018-05-04 23:57:52 +12:00
Aníbal Limón
3ccb422aeb rrs/recipes: Add support for persist search and filters.
Now when search something the URL is modified and you can
share the URL for access to the data.

[YOCTO #7809]

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2018-05-04 23:57:52 +12:00
Aníbal Limón
5e8eeaa8ac templates/rrs/recipes.html: Re-add the sort property into Maintainer.
When last updated colum comes we lost the sort property.

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2018-05-04 23:57:52 +12:00
Mariano Lopez
742128c517 rrs/base_toplevel.html: Navbar redesign
This provides changes in the front end for the
navbar, now it shows the percentage of recipes
up-to-date, not update, unknown and can't be
updated along with the number of recipes.

This also moves the update percentage to the
end and adds clarity to what it means.

This also moves the export list button the the
top bar.

[YOCTO #8020]

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2018-05-04 23:57:52 +12:00
Belen Barros Pena
66c0b28982 rrs: avoid too many columns in the recipes table
Currently, when you select 'Can't be updated' in the upstream
status filter, the resulting table will add the 'No update reason'
column to the default column set.

Although this is probably useful information to see in the
table itself, it results in too many columns, and a rather
unpleasant layout change.

This patch hides the 'Summary' column whenever you select
'Can't be updated' in the upstream status filter, effectively
replacing the 'Summary' with the 'No update reason' column,
which is probably more relevant in this context. Now you
have less columns distracting you, and a slightly less
jumpy layout change.

A designer would have come up with this solution in the
first place. Sadly, she was never asked.

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2018-05-04 23:57:52 +12:00
Belen Barros Pena
671d06aaa7 rrs: remove sorting from the 'No update reason' column
Nothing useful can come from sorting by this column.

Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com>
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2018-05-04 23:57:52 +12:00
Mariano Lopez
e325f317aa recipes.html: Format change for last updated column
This changes the format of the last updated column.
Now the column text is set to the default text color.

[YOCTO #8018]

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
2018-05-04 23:57:52 +12:00
Mariano Lopez
b833550285 recipes.html: Add Last Updated column
Added a column in the recipes view that show
the last time a recipe was updated when is
not up-to-date

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2018-05-04 23:57:52 +12:00
Mariano Lopez
d25036232c base_toplevel.html: Changed format of percentage done
Changed the text of percentage done to updated. Also
added a tooltip that shows how this percentage is calculated.

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2018-05-04 23:57:52 +12:00
Mariano Lopez
faafae13fa views.py: Add how long a recipe hasn't been updated
This add a tooltip in the upstream status field that
show how long the recipe hasn't been updated.

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2018-05-04 23:57:52 +12:00
Mariano Lopez
dc4d4f8aa9 templates/rrs/maintainers.html: Added links to recipe page. rrs/static/css/rrs-additional.css: Added formating to the table footer.
Added links to recipe page using the update status filter in the header.
Changed the <th> tags in the footer to <td>.
Added color to the footer format instead of bold.

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2018-05-04 23:57:52 +12:00
Mariano Lopez
a2e5ef75eb templates/rrs/maintainers.html: Added total row at the end of the table.
Added footer for the table and function updateTotals.
Added class and/or id attributes to some existing html tags.
Didn't modified existing class or id attributes for existing html tags.

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2018-05-04 23:57:52 +12:00
Aníbal Limón
b58c504ee9 templates/rrs: Recipes and Maintainers UI search improvments
Display button without btn-info to give consistency in the UI.
Don't display clear search button when search isn't active.

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2018-05-04 23:57:52 +12:00
Aníbal Limón
6752c23362 rrs: RecipeDetail show milestone instead of all in upgrades table
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2018-05-04 23:57:51 +12:00
Aníbal Limón
90f6db2da0 templates/rrs/recipes.html: Only apply sort to Recipe column at load
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2018-05-04 23:57:51 +12:00
Aníbal Limón
c83535bd42 templates/rrs/recipes.html: Fix url params in JS
Add parse with HTML entity to avoid problems when parameters
passed in URL to JS.

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2018-05-04 23:57:51 +12:00
Aníbal Limón
665dfae577 rrs: Release/Milestone improvments
rrs/models.py: Milestone now have unique in Release and Name fields
instead of only field. When try to get current milestone give priority
to Mn instead of All.

templates/rrs/base_toplevel.html: Display only release name when
milestone is All.

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2018-05-04 23:57:51 +12:00
Aníbal Limón
d61f95164b rrs: Maintainers statistics fixed sorting of weeks
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2018-05-04 23:57:51 +12:00
Aníbal Limón
f2244d4a09 rrs: UI add clear search button in Recipes and Maintainers
This enables the user to clear current search content and restore
the orginial status.

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2018-05-04 23:57:51 +12:00