Commit graph

63 commits

Author SHA1 Message Date
Yuming Zhu
fa69c4904e flake8: apply E70x rule 2020-03-03 21:38:22 +08:00
Yuming Zhu
0f727a2ab4 flake8: apply E3 rules 2020-03-03 21:38:22 +08:00
Yuming Zhu
05340b146b flake8: apply E2 rules except E266 2020-03-03 21:38:21 +08:00
Yuming Zhu
ce1f9928af flake8: apply E1 rules 2020-03-03 21:38:21 +08:00
Yuming Zhu
97cfaa4fcf flake8: follow E265 rule 2020-03-03 21:35:08 +08:00
Tomas Kopecek
96d3cff5f2 remove usage of deprecated cgi.escape function
Fixes: https://pagure.io/koji/issue/1887
2020-02-13 14:44:50 +01:00
Yu Ming Zhu
5b83c682e4 remove unused imports 2019-12-12 11:00:58 +00:00
Yu Ming Zhu
b8653736dd sort imports in www 2019-12-12 11:00:56 +00:00
Tomas Kopecek
a803f0a0f3 [web] human-friendly file sizes in taskinfo page
Fixes: https://pagure.io/koji/issue/1819
2019-12-12 13:23:26 +01:00
Tomas Kopecek
dfbe322222 deprecate sha1/md5_constructor from koji.util
These functions are now fully provided by hashlib. Commit removes their
usage from koji's codebase and leaves deprecation message in lib.

Final removal from lib is scheduled to 1.21.

Fixes: https://pagure.io/koji/issue/1487
2019-08-12 16:07:55 -04:00
Tomas Kopecek
15e4d07763 encode to bytes only under py3
Related: https://pagure.io/koji/pull-request/1498
2019-06-24 18:09:10 -04:00
Mengjing Shi
2d88836a4b Pass bytes to md5_constructor
Fixes login TypeError on koji-web
2019-06-24 18:07:23 -04:00
Tomas Kopecek
7a5c9130bc retain form values in search page 2019-06-14 15:23:49 -04:00
Tomas Kopecek
e5b0a3ac6e display task durations in webui
Fixes: https://pagure.io/koji/issue/1382
2019-05-06 10:33:06 -04:00
Tomas Kopecek
eeeeb3ab78 skip fixEncoding for py3 2019-03-04 10:13:51 -05:00
Tomas Kopecek
ee673d4b66 Web UI python3 changes
Fixes: https://pagure.io/koji/issue/890
2019-02-12 15:01:37 -05:00
Tomas Kopecek
8e61dc7c56 python-modernize -f libmodernize.fixes.fix_classic_division 2018-07-11 17:37:40 -04:00
Tomas Kopecek
be535c2854 python-modernize -f libmodernize.fixes.fix_imports_six 2018-07-11 17:37:39 -04:00
Tomas Kopecek
b96092334d python-modernize -f libmodernize.fixes.fix_xrange_six 2018-07-11 17:37:39 -04:00
Tomas Kopecek
5ac2a6b8f0 display suid bit in web ui
Related: https://pagure.io/koji/issue/616
2017-10-05 10:38:48 -04:00
Mike McLean
9f3568dcb7 handle buildroots with state=None
If content generators are in use, they will create buildroots that have no
state. This change prevents this function from erroring in that case.
2017-04-06 14:07:11 -04:00
Tomas Kopecek
70224c42c1 remove obsoleted StandardError 2017-03-17 11:35:53 -04:00
Tomas Kopecek
cc9fff9840 remove has_key (not working in python3) 2017-03-07 08:15:20 -05:00
Tomas Kopecek
1494301465 use new exception syntax 2017-03-02 10:52:30 -05:00
Xibo Ning
fe8c5964ca fix method names to listPackagesSimple and countAndFilterResults.
1. replace listPackages call by listPackagesSimple.
    2. replace filterResults by countAndFilterResults.
2017-01-17 15:08:26 -05:00
Xibo Ning
fbc8314d13 fix the link to full results 2016-12-13 21:45:41 -05:00
Xibo Ning
408f5a816a low the limits to 4 line and 400 chars 2016-12-13 21:45:41 -05:00
Xibo Ning
b82d804d02 lower the length limits and put the expansion link at the postscript end 2016-12-13 21:45:41 -05:00
Xibo Ning
4785d2cb3d remove the escaped instance variable and let TaskResultLine to add postscript 2016-12-13 21:45:41 -05:00
Xibo Ning
8501c7599d fix hence the abbreviated result always with the postscript 2016-12-13 21:45:41 -05:00
Xibo Ning
abcf99bf4b add docstring and replace func name by a good one.
1. follow PEP-257 add docstring.
2. change func naem "task_result_to_html_or_string" to "task_result_to_html".
3. add postfix instance attribute for TaskResultLine.
4. add empty_str_placeholder instance attribute for TaskResultFragment.
5. recover class NoSuchException.
6. honoring line limit for dictionaries.
2016-12-13 21:45:41 -05:00
Xibo Ning
584c5bb20f Fix as mikem review result.
replace reduce func by sum func
     max lines is honored for dictionary results
     follow PEP8 style
     do not require HTMLParser
     from url args remove maxAbbrResultLines/maxAbbrResultLen
2016-12-13 21:45:41 -05:00
Xibo Ning
5aa4fc1b3b fix issue 222: Don't hide results in kojiweb
The same with patch1 except add two paramerters hence we can ajust
abbr result lines and length from taskinfo page
2016-12-13 21:45:41 -05:00
Tomas Kopecek
921258749a removed unused imports 2016-10-04 15:48:54 +02:00
Dennis Gilmore
e35d2b4cef allow kojiweb login to be disabled
Signed-off-by: Dennis Gilmore <dennis@ausil.us>
2016-05-25 09:56:37 -05:00
Mike McLean
e50b5e04d7 move buildroot label display code into util function 2015-10-21 12:04:05 -04:00
Dennis Gilmore
4d296f11be Check task method before trying to determine "scratch" status.
reabsed patch from https://lists.fedoraproject.org/pipermail/buildsys/2015-May/004685.html

Signed-off-by: Dennis Gilmore <dennis@ausil.us>
2015-07-23 21:43:01 -05:00
Ralph Bean
8ec72226d4 Make the templated footer configurable.
We ran into a problem[1] where old footers would cause syntax errors when
interpreted as templates.  This makes that behavior configurable and defaults
to the old literal interpretation.

[1] https://lists.fedoraproject.org/pipermail/buildsys/2015-May/004751.html
2015-06-06 16:34:07 -04:00
Pavol Babincak
9e89ebb9a4 Ran reindent.py from cpython tools on all python scripts
Citing from reindent docs:

    Change Python (.py) files to use 4-space indents and no hard tab
    characters. Also trim excess spaces and tabs from ends of lines, and
    remove empty lines at the end of files.  Also ensure the last line
    ends with a newline.

Citing from PEP 8:

    Use 4 spaces per indentation level.

    Python 2 code indented with a mixture of tabs and spaces should be
    converted to using spaces exclusively.

    Don't write string literals that rely on significant trailing
    whitespace. Such trailing whitespace is visually indistinguishable
    and some editors (or more recently, reindent.py) will trim them.

Also PyLint recommends not to have trailing whitespace on any line.
2015-05-13 16:39:53 -04:00
Ralph Bean
c738175d4a (koji-web) Markup scratch builds.
With this we can markup scratch builds, deemphasize them, etc.
2015-05-07 13:14:48 -05:00
Mike Bonnet
ab53d2deb0 update copyright 2014-10-28 23:54:21 -04:00
Mike McLean
54c0ed8438 Support wsgi in koji-hub and koji-web
- mod_python still supported, but deprecated
 - mod_wsgi is the default
 - koji-web now configured via web.conf
 - new wsgi-friendly publisher for koji-web
 - koji-web now has logging
2012-05-10 17:27:40 -04:00
Mike McLean
fa0b2cbbb6 make extra nav and footer follow theme 2012-01-23 17:02:34 -05:00
Mike McLean
5b9f515250 new approach for web themes 2012-01-21 20:45:02 -05:00
Mike Bonnet
7449f5a619 check that _session is an attribute of req 2011-07-19 15:09:29 -04:00
Mike McLean
6ae8ee226a don't assume req._session 2011-05-06 16:09:52 -04:00
Mike Bonnet
a2b91eaa1e enable selection of Windows tasks on the Tasks page 2010-09-23 12:13:20 -04:00
Mike Bonnet
424de47845 hide Maven-specific UI if Maven support is not enabled 2010-07-06 14:30:10 -04:00
Mike Bonnet
ec58365837 - add support for importing tarballs
- show list of files in a tarball in the web UI
 - show more information about archive files, if it's available
2009-11-06 23:17:36 -05:00
Mike Bonnet
be958c0696 avoid double-escaping ampersands 2009-09-30 17:05:23 -04:00