Make sure the table showing the list of packages installed in an image displays correctly with Bootstrap 3.
Signed-off-by: Belen Barros Pena <[email protected]> --- bitbake/lib/toaster/toastergui/buildtables.py | 12 ++++++------ bitbake/lib/toaster/toastergui/static/css/default.css | 8 +++++++- bitbake/lib/toaster/toastergui/static/js/libtoaster.js | 4 +--- .../toastergui/templates/snippets/gitrev_popover.html | 2 +- .../templates/snippets/pkg_dependencies_popover.html | 2 +- .../templates/snippets/pkg_revdependencies_popover.html | 2 +- bitbake/lib/toaster/toastergui/templates/target.html | 10 +++++----- 7 files changed, 22 insertions(+), 18 deletions(-) diff --git a/bitbake/lib/toaster/toastergui/buildtables.py b/bitbake/lib/toaster/toastergui/buildtables.py index e237e4e..5d00aa4 100644 --- a/bitbake/lib/toaster/toastergui/buildtables.py +++ b/bitbake/lib/toaster/toastergui/buildtables.py @@ -75,8 +75,8 @@ class BuiltPackagesTableBase(tables.PackagesTable): {%% endif %%} ''' % {'value': val}) - add_pkg_link_to = ['name', 'version', 'size', 'license'] - add_recipe_link_to = ['recipe__name', 'recipe__version'] + add_pkg_link_to = ['name'] + add_recipe_link_to = ['recipe__name'] # Add the recipe and pkg build links to the required columns for column in self.columns: @@ -160,7 +160,7 @@ class InstalledPackagesTable(BuildTablesMixin, BuiltPackagesTableBase): """ Show all packages installed in an image """ def __init__(self, *args, **kwargs): super(InstalledPackagesTable, self).__init__(*args, **kwargs) - self.title = "Installed Packages" + self.title = "Packages Included" self.default_orderby = "name" def make_package_list(self, target): @@ -213,11 +213,11 @@ class InstalledPackagesTable(BuildTablesMixin, BuiltPackagesTableBase): ' extra.target_id data.pk %}">{{data.name}}</a>' '{% if data.installed_name and data.installed_name !=' ' data.name %}' - '<span class="muted"> as {{data.installed_name}}</span>' - ' <i class="icon-question-sign get-help hover-help"' + '<span class="text-muted"> as {{data.installed_name}}</span>' + ' <span class="glyphicon glyphicon-question-sign get-help hover-help"' ' title="{{data.name}} was renamed at packaging time and' ' was installed in your image as {{data.installed_name}}' - '"></i>{% endif %} ') + '"></span>{% endif %} ') for column in self.columns: if column['static_data_name'] == 'name': diff --git a/bitbake/lib/toaster/toastergui/static/css/default.css b/bitbake/lib/toaster/toastergui/static/css/default.css index c275dbb..d808ab0 100644 --- a/bitbake/lib/toaster/toastergui/static/css/default.css +++ b/bitbake/lib/toaster/toastergui/static/css/default.css @@ -22,6 +22,9 @@ img.logo { height: 30px; vertical-align: bottom; } /* Increase popovers width to fit commit SHAs */ .popover { max-width: 350px; } +/* Set a limit to popover height to handle long dependency lists */ +.popover-content { max-height: 350px; overflow: scroll; } + /* Increase bottom margin of definition lists inside popovers for the Toaster version information in the top navbar, and also inside the right hand columns of our details pages */ .popover-content dd, .item-info dd { margin-bottom: 15px; } @@ -55,7 +58,7 @@ img.logo { height: 30px; vertical-align: bottom; } #edit-columns-button { margin-right: 30px; } .navbar-default[id^="table-chrome-"] { background-color: transparent; } [id^="table-chrome-collapse-"] .navbar-form { margin-left: -15px; } -.dropdown-menu.editcol { padding-left: 10px; min-width: 180px; } +.dropdown-menu.editcol { padding-left: 10px; min-width: 200px; } span[class^="remove-search-btn-"] { position: absolute; right: 5px; top: 0; bottom: 0; height: 14px; margin: auto; font-size: 14px; cursor: pointer; color: #777;} span[class^="remove-search-btn-"]:hover { color: #333; } #no-results-special-selectpackagestable .form-inline { margin-top: 20px; } @@ -273,3 +276,6 @@ h2.panel-title { font-size: 30px; } /* Style the wells in the build dashboard */ .dashboard-section h3 { margin-top: 10px; margin-bottom: 20px; } .col-md-4.dashboard-section dd { margin-bottom: 10px; } + +/* Make the help in tables insivisble until you hover over the right cell */ +.hover-help { visibility: hidden; } diff --git a/bitbake/lib/toaster/toastergui/static/js/libtoaster.js b/bitbake/lib/toaster/toastergui/static/js/libtoaster.js index e4e4f6c..eafe70d 100644 --- a/bitbake/lib/toaster/toastergui/static/js/libtoaster.js +++ b/bitbake/lib/toaster/toastergui/static/js/libtoaster.js @@ -541,9 +541,7 @@ $(document).ready(function() { delay: { show : 300 } }); - // show help bubble only on hover inside tables - $(".hover-help").css("visibility","hidden"); - + // show help bubble on hover inside tables $("table").on("mouseover", "th, td", function () { $(this).find(".hover-help").css("visibility","visible"); }); diff --git a/bitbake/lib/toaster/toastergui/templates/snippets/gitrev_popover.html b/bitbake/lib/toaster/toastergui/templates/snippets/gitrev_popover.html index 281a3bd..c1e3dab 100644 --- a/bitbake/lib/toaster/toastergui/templates/snippets/gitrev_popover.html +++ b/bitbake/lib/toaster/toastergui/templates/snippets/gitrev_popover.html @@ -1,6 +1,6 @@ {% load projecttags %} {% if vcs_ref|is_shaid %} -<a class="btn" data-content="<ul class='unstyled'> <li>{{vcs_ref}}</li> </ul>"> +<a class="btn btn-default" data-content="{{vcs_ref}}"> {{vcs_ref|truncatechars:10}} </a> {% else %} diff --git a/bitbake/lib/toaster/toastergui/templates/snippets/pkg_dependencies_popover.html b/bitbake/lib/toaster/toastergui/templates/snippets/pkg_dependencies_popover.html index 5be409c..273437e 100644 --- a/bitbake/lib/toaster/toastergui/templates/snippets/pkg_dependencies_popover.html +++ b/bitbake/lib/toaster/toastergui/templates/snippets/pkg_dependencies_popover.html @@ -5,7 +5,7 @@ {% with count_package=package_deps.packages|length %} {% if count_package > 0 %} - <a data-content='<ul class="unstyled"> + <a data-content='<ul class="list-unstyled"> {% for dep in package_deps.packages %} <li> {% if extra.add_links %} diff --git a/bitbake/lib/toaster/toastergui/templates/snippets/pkg_revdependencies_popover.html b/bitbake/lib/toaster/toastergui/templates/snippets/pkg_revdependencies_popover.html index 65c2b29..e6ef816 100644 --- a/bitbake/lib/toaster/toastergui/templates/snippets/pkg_revdependencies_popover.html +++ b/bitbake/lib/toaster/toastergui/templates/snippets/pkg_revdependencies_popover.html @@ -5,7 +5,7 @@ {% with count_package=package_deps.packages|length %} {% if count_package > 0 %} - <a data-content='<ul class="unstyled"> + <a data-content='<ul class="list-unstyled"> {% for dep in package_deps.packages|dictsort:"package.name" %} <li> {% if extra.add_links %} diff --git a/bitbake/lib/toaster/toastergui/templates/target.html b/bitbake/lib/toaster/toastergui/templates/target.html index 0b2fe99..1924a0d 100644 --- a/bitbake/lib/toaster/toastergui/templates/target.html +++ b/bitbake/lib/toaster/toastergui/templates/target.html @@ -18,7 +18,7 @@ {% block buildinfomain %} <div class="col-md-10"> - <div class="page-header"> + <div class="page-header build-data"> <h1> {% if request.GET.search and objects.paginator.count > 0 %} {{objects.paginator.count}} package{{objects.paginator.count|pluralize}} found @@ -30,16 +30,16 @@ </h1> </div> <div id="navTab"> - <ul class="nav nav-pills"> + <ul class="nav nav-tabs"> <li class="active"> <a href="#target"> - <i class="icon-question-sign get-help" title="Of all the packages built, the subset installed in the root file system of this image"></i> + <span class="glyphicon glyphicon-question-sign get-help" title="Of all the packages built, the subset installed in the root file system of this image"></span> Packages included ({{target.package_count}} - {{packages_sum|filtered_filesizeformat}}) </a> </li> <li> <a href="{% url 'dirinfo' build.id target.id %}"> - <i class="icon-question-sign get-help" title="The directories and files in the root file system of this image"></i> + <span class="glyphicon glyphicon-question-sign get-help" title="The directories and files in the root file system of this image"></span> Directory structure </a> </li> @@ -51,6 +51,6 @@ {% include "toastertable.html" %} {% endwith %} </div> <!-- tabpane --> - </div> <!--navTab -->> + </div> <!--navTab --> <!-- col-md-10 --> {% endblock buildinfomain %} -- 1.9.1 -- _______________________________________________ toaster mailing list [email protected] https://lists.yoctoproject.org/listinfo/toaster
