This allows adding an important notice to a layer e.g. "this layer is
deprecated, please use layer xyz instead". Only one layer note can be
added through the interface although the data structures allow multiple,
so notes may be added programmatically without disturbing user-added
ones.
With this change we also add a get_absolute_url() function to the
LayerItem model and change the calls to reverse() for layers to use it.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
If editing rather than submitting we want users to be able to make an
existing maintainer inactive.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Show "unpublished" rather than "new" in dependencies list in submit
form, and mention publishing as the operation in the "thanks for
submitting" page.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
* Add a label making it clear the layer is unpublished
* Hide recipes list header since there should never be any recipes (as
the update script doesn't process unpublished layers)
* Add test links for base URLs
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Allow users with publish permission to edit any layer, and users with
the same email address as one of the maintainers of a layer to edit that
layer.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Show button only if user has appropriate permission, and remove the
duplicate button at the end of the page as it's unlikely to be useful.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
The number of machines is likely to be quite high and it may not be
immediately clear to users which layer machines can be found in, so add
a searchable index to help with this.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Previously I had added a custom widget to handle this, but it turns out
it's not flexible enough - we want to style items individually (not done
yet) and reorder checked items to the top on refresh (done).
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
If we don't do this then clicking on the link when you're already on the
submission form will reload it, blanking out all the values.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
In the submit layer form, if a user pastes/types in a name/email pair
(e.g. My Name <my.email@example.com>) then this will automatically be
split into the name and email input fields, saving the user from doing
this by hand (since this is a common notation within repositories and
documentation.)
Additionally, if there is any text after the email address then move it
into the responsibility field unless the responsibility has been entered
by the user.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
We have django-reversion to handle auditing/history now so we don't need
an explicit field to hold the creation date.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Add an icon with some javascript to select the URL / subdir text so it
can be easily copied (since dragging can easily select unwanted text
from the rest of the page).
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
If there is more than one layer in a repository, we want the latest
commit in the subdirectory not the entire repository (since we use it
to determine the last commit date which should show how "fresh" the
layer is).
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
If we aren't doing a full refresh, when changes to an included/required
file or an inherited class occur we need to update all of the files that
depend on them. BitBake records these dependencies, so read them and
record them against each recipe.
At the moment this only handles dependencies within the same layer; that
is probably sufficient to handle most changes for the purposes of
extracting the data this application cares about. A future improved
solution will probably involve making use of BitBake's cache rather than
and parsing all layers and their dependencies rather than individual
recipes.
This change also adds -x/--nofetch and -n/--dry-run options for
debugging as well as some further debug messages.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
"Fatal" errors during parsing a single recipe (such as finding legacy
staging) shouldn't stop us from parsing the rest of the layer. To do
this we need to catch BaseException instead of Exception as fatal errors
end up calling sys.exit.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Parse layer.conf files so that BBPATH is set correctly as well as any
other custom variables. This required the repository fetching to be
split out of the update process and done first so that we're sure we
have the data for the other layers.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Formsets allow us to have separate fields for name/email for each
maintainer, as well as being able to collect the responsibility field
value. Also split the form to be output field-by-field to allow styling.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Look for conf/machine/*.conf and add a record for each file found. These
are displayed in the layer detail page if any are present.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Set BBPATH so that files from the layer can be found when recipes use
include/require pointing to files with a specific path, or use
inherit to inherit a class in the layer.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
meta-ti has a recipe in it that causes parsing to fail with a fatal
error due to LICENSE not being set; for the purposes of the layer index
just set a default value for LICENSE so that this doesn't break parsing.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
If the repo URL matches known public hosting sites (i.e.
git.openembedded.org, git.yoctoproject.org, github.com, gitorious.org,
bitbucket.org) then we can set the web URLs automatically and save the
submitter from having to figure them out themselves.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Some git web interfaces use different paths for files (blobs) and
directories when it comes to browsing; this means we need to have a
separate field for the base URL for files.
Additionally, Gitweb typically puts the path within the URL instead of
at the end (although the parameters can be reordered) and cannot handle
the file parameter (f=) being specified with no value. So, to add some
flexibility, add the ability to use a positional macro %path% to
optionally specify where to put the path. If needed, square brackets
can be used in conjunction with %path% to exclude parts of the string
when there is no path, i.e. we want to browse the root. For example, the
following base URL:
http://git.example.com/?p=somerepo.git;a=tree;[;f=%path%];hb=HEAD
would be translated to this with a path of "path/to/dir":
http://git.example.com/?p=somerepo.git;a=tree;f=path/to/dir;hb=HEAD
and this if no path were specified:
http://git.example.com/?p=somerepo.git;a=tree;hb=HEAD
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
We want to force selection of a specific layer type, otherwise many
submitters will just leave it at the default value.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
These can be used to show important notes (e.g. "This layer is
deprecated, use layer xyz instead.") as eye-catching alerts at the top
of the detail page.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Changed to full screen layout to improve the table display
and get rid of the accordion for the layer information.
Signed-off-by: Belen Barros <belen.barros.pena@intel.com>
This should be set when the application is deployed, not set to some
default value out of the box.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
The layer list has a javascript-based search which won't interact well
with server-based pagination, so disable it for the moment.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Use a Django snippet to make pagination display a bit nicer (compressed
form instead of showing all page numbers). In order to interact properly
with GET requests, an additional snippet was required to add parameters
to the URL (why doesn't Django provide this out of the box?).
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
* Use more traditional GET instead of POST method
* Search in pn, summary, description and filename instead of just pn
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>