• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

iplweb / bpp / 0950478e-207f-4389-967f-fb3a6c1090d4

01 Apr 2025 12:57PM UTC coverage: 43.279% (-3.3%) from 46.628%
0950478e-207f-4389-967f-fb3a6c1090d4

push

circleci

mpasternak
Merge branch 'release/v202504.1175'

1 of 19 new or added lines in 5 files covered. (5.26%)

1780 existing lines in 123 files now uncovered.

15876 of 36683 relevant lines covered (43.28%)

0.79 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

52.94
src/tee/admin.py
1
from tee.models import Log
2✔
2
from tee.utils import last_n_lines
2✔
3

4
from django.contrib import admin
2✔
5

6
from django.utils.safestring import mark_safe
2✔
7

8

9
@admin.register(Log)
2✔
10
class LogAdmin(admin.ModelAdmin):
2✔
11
    list_display = [
2✔
12
        "cmd_name",
13
        "started_on",
14
        "finished_on",
15
        "finished_successfully",
16
        "last_5_lines",
17
    ]
18

19
    list_per_page = 10
2✔
20

21
    readonly_fields = [
2✔
22
        "started_on",
23
        "finished_on",
24
        "finished_successfully",
25
        "command_name",
26
        "args",
27
        "stdout",
28
        "stderr",
29
        "traceback",
30
    ]
31

32
    date_hierarchy = "started_on"
2✔
33

34
    def has_add_permission(self, request):
2✔
UNCOV
35
        return False
1✔
36

37
    def has_change_permission(self, request, obj=None):
2✔
UNCOV
38
        return False
1✔
39

40
    def cmd_name(self, obj):
2✔
41
        args = ""
×
42
        if obj.args:
×
43
            args = f" {' '.join(obj.args)}"
×
44
        return f"{obj.command_name}" + args
×
45

46
    def finished_successfully(self, obj: Log):
2✔
47
        if obj.exit_code == 0:
×
48
            return True
×
49
        return False
×
50

51
    def last_5_lines(self, obj):
2✔
52
        s = obj.stderr
×
53

54
        if obj.traceback:
×
55
            s = obj.traceback
×
56

57
        if not s:
×
58
            s = obj.stdout
×
59

60
        r = last_n_lines(s, nlines=5)
×
61
        if r is None:
×
62
            return
×
63
        return mark_safe(f"<pre>{r}</pre>")
×
64

65
    last_5_lines.short_description = "Results"
2✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc