]> git.ipfire.org Git - pbs.git/commitdiff
Drop all all history stuff
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 13 Oct 2022 08:36:07 +0000 (08:36 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 13 Oct 2022 08:36:07 +0000 (08:36 +0000)
This is too complicated to maintain

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
13 files changed:
po/pakfire-build-service.pot
src/buildservice/__init__.py
src/buildservice/builders.py
src/buildservice/builds.py
src/buildservice/jobs.py
src/buildservice/mirrors.py
src/buildservice/repository.py
src/database.sql
src/templates/builders/detail.html
src/templates/mirrors/detail.html
src/templates/mirrors/list.html
src/web/builders.py
src/web/mirrors.py

index 8cf688d16e99fc6ee11bc772cf14867a709e07b8..fba31489e7583b8eed36abd54386ec3cebe2e93c 100644 (file)
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2022-10-12 13:55+0000\n"
+"POT-Creation-Date: 2022-10-12 18:09+0000\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
index de14cf44e4c94069bae24114de2c2a2a5043a357..ed09699911bada04978166af1d3171c21338d6c0 100644 (file)
@@ -23,7 +23,6 @@ from . import events
 from . import jobqueue
 from . import jobs
 from . import keys
-from . import logs
 from . import messages
 from . import mirrors
 from . import packages
index 93260c5f6911d62070e528bf37852f3a279f4ba7..415e053d5e564ba4220acc1aebbfed49087275b0 100644 (file)
@@ -10,7 +10,6 @@ import string
 import time
 
 from . import base
-from . import logs
 from . import misc
 
 from .decorators import *
@@ -44,10 +43,6 @@ class Builders(base.Object):
                builder = self._get_builder("INSERT INTO builders(name) \
                        VALUES(%s) RETURNING *", name)
 
-               # Log what we have done.
-               if log:
-                       builder.log("created", user=user)
-
                # The Builder object and the passphrase are returned.
                return builder
 
@@ -58,40 +53,6 @@ class Builders(base.Object):
                return self._get_builder("SELECT * FROM builders \
                        WHERE name = %s AND deleted IS FALSE", name)
 
-       def get_history(self, limit=None, offset=None, builder=None, user=None):
-               query = "SELECT * FROM builders_history"
-               args  = []
-
-               conditions = []
-
-               if builder:
-                       conditions.append("builder_id = %s")
-                       args.append(builder.id)
-
-               if user:
-                       conditions.append("user_id = %s")
-                       args.append(user.id)
-
-               if conditions:
-                       query += " WHERE %s" % " AND ".join(conditions)
-
-               query += " ORDER BY time DESC"
-
-               if limit:
-                       if offset:
-                               query += " LIMIT %s,%s"
-                               args  += [offset, limit,]
-                       else:
-                               query += " LIMIT %s"
-                               args  += [limit,]
-
-               entries = []
-               for entry in self.db.query(query, *args):
-                       entry = logs.BuilderLogEntry(self.pakfire, entry)
-                       entries.append(entry)
-
-               return entries
-
        async def sync(self, *args, **kwargs):
                """
                        Synchronize any state with AWS
@@ -237,14 +198,6 @@ class Builder(base.DataObject):
        def __str__(self):
                return self.hostname
 
-       def log(self, action, user=None):
-               user_id = None
-               if user:
-                       user_id = user.id
-
-               self.db.execute("INSERT INTO builders_history(builder_id, action, user_id, time) \
-                       VALUES(%s, %s, %s, NOW())", self.id, action, user_id)
-
        # Description
 
        def set_description(self, description):
@@ -502,11 +455,6 @@ class Builder(base.DataObject):
 
                return "online"
 
-       def get_history(self, *args, **kwargs):
-               kwargs["builder"] = self
-
-               return self.pakfire.builders.get_history(*args, **kwargs)
-
        def is_ready(self):
                # If the builder is not enabled, we are obviously not ready
                if not self.enabled:
index c673cf8bb4475df40e56b86df06c1da0a2ebcd1f..602451fda1b0ba8d38318113ad16e0fb29c67248 100644 (file)
@@ -288,29 +288,15 @@ class Build(base.DataObject):
                # Delete all comments
                self.db.execute("DELETE FROM builds_comments WHERE build_id = %s", self.id)
 
-               # Delete the repository history
-               self.db.execute("DELETE FROM repositories_history WHERE build_id = %s", self.id)
-
                # Delete all watchers
                self.db.execute("DELETE FROM builds_watchers WHERE build_id = %s", self.id)
 
-               # Delete build history
-               self.db.execute("DELETE FROM builds_history WHERE build_id = %s", self.id)
-
                # Delete the build itself.
                self.db.execute("DELETE FROM builds WHERE id = %s", self.id)
 
                # Delete source package
                self.pkg.delete()
 
-       def log(self, action, user=None, bug_id=None):
-               user_id = None
-               if user:
-                       user_id = user.id
-
-               self.db.execute("INSERT INTO builds_history(build_id, action, user_id, time, bug_id) \
-                       VALUES(%s, %s, %s, NOW(), %s)", self.id, action, user_id, bug_id)
-
        @property
        def uuid(self):
                """
index 5d5d984c7de961e26f241ab815bd3b1cfdcd9535..f11914da52a160687ef3f3aa9969131f19ced14a 100644 (file)
@@ -11,7 +11,6 @@ import pakfire
 import pakfire.config
 
 from . import base
-from . import logs
 from . import users
 
 from .constants import *
index 4447f3656c3e65ed4ccd18efee635a69804f072c..fe713def76735fc1f84b6bf03532b89bf993837c 100644 (file)
@@ -11,7 +11,6 @@ import urllib.parse
 import location
 
 from . import base
-from . import logs
 
 from .decorators import lazy_property
 
@@ -52,9 +51,6 @@ class Mirrors(base.Object):
                mirror = self._get_mirror("INSERT INTO mirrors(hostname, path, owner, contact) \
                        VALUES(%s, %s, %s, %s) RETURNING *", hostname, path, owner, contact)
 
-               # Log creation
-               mirror.log("created", user=user)
-
                return mirror
 
        def get_by_id(self, id):
@@ -79,40 +75,6 @@ class Mirrors(base.Object):
 
                return mirrors
 
-       def get_history(self, limit=None, offset=None, mirror=None, user=None):
-               query = "SELECT * FROM mirrors_history"
-               args  = []
-
-               conditions = []
-
-               if mirror:
-                       conditions.append("mirror_id = %s")
-                       args.append(mirror.id)
-
-               if user:
-                       conditions.append("user_id = %s")
-                       args.append(user.id)
-
-               if conditions:
-                       query += " WHERE %s" % " AND ".join(conditions)
-
-               query += " ORDER BY time DESC"
-
-               if limit:
-                       if offset:
-                               query += " LIMIT %s,%s"
-                               args  += [offset, limit,]
-                       else:
-                               query += " LIMIT %s"
-                               args  += [limit,]
-
-               entries = []
-               for entry in self.db.query(query, *args):
-                       entry = logs.MirrorLogEntry(self.pakfire, entry)
-                       entries.append(entry)
-
-               return entries
-
        def check(self, **kwargs):
                """
                        Runs the mirror check for all mirrors
@@ -131,14 +93,6 @@ class Mirror(base.DataObject):
 
                return NotImplemented
 
-       def log(self, action, user=None):
-               user_id = None
-               if user:
-                       user_id = user.id
-
-               self.db.execute("INSERT INTO mirrors_history(mirror_id, action, user_id, time) \
-                       VALUES(%s, %s, %s, NOW())", self.id, action, user_id)
-
        def set_hostname(self, hostname):
                self._set_attribute("hostname", hostname)
 
@@ -290,8 +244,3 @@ class Mirror(base.DataObject):
                        return network.country_code
 
                return "UNKNOWN"
-
-       def get_history(self, *args, **kwargs):
-               kwargs["mirror"] = self
-
-               return self.pakfire.mirrors.get_history(*args, **kwargs)
index 51ae287a608289c4685568cf28af840fe43e0e06..23f4c502493e506769ac134e78fd6713059266bf 100644 (file)
@@ -10,7 +10,6 @@ import os.path
 import pakfire
 
 from . import base
-from . import logs
 from . import misc
 
 from .constants import *
@@ -134,27 +133,6 @@ class Repositories(base.Object):
                return self._get_repository("SELECT * FROM repositories \
                        WHERE id = %s", repo_id)
 
-       def get_history(self, limit=None, offset=None, build=None, repo=None, user=None):
-               query = "SELECT * FROM repositories_history"
-               args  = []
-
-               query += " ORDER BY time DESC"
-
-               if limit:
-                       if offset:
-                               query += " LIMIT %s,%s"
-                               args  += [offset, limit,]
-                       else:
-                               query += " LIMIT %s"
-                               args  += [limit,]
-
-               entries = []
-               for entry in self.db.query(query, *args):
-                       entry = logs.RepositoryLogEntry(self.pakfire, entry)
-                       entries.append(entry)
-
-               return entries
-
        async def write(self):
                """
                        Write/re-write all repositories
@@ -455,22 +433,6 @@ class Repository(base.DataObject):
                # XXX TODO
                return []
 
-       def _log_build(self, action, build, from_repo=None, to_repo=None, user=None):
-               user_id = None
-               if user:
-                       user_id = user.id
-
-               from_repo_id = None
-               if from_repo:
-                       from_repo_id = from_repo.id
-
-               to_repo_id = None
-               if to_repo:
-                       to_repo_id = to_repo.id
-
-               self.db.execute("INSERT INTO repositories_history(action, build_id, from_repo_id, to_repo_id, user_id, time) \
-                       VALUES(%s, %s, %s, %s, %s, NOW())", action, build.id, from_repo_id, to_repo_id, user_id)
-
        def add_build(self, build, user=None, log=True):
                self.db.execute("INSERT INTO repositories_builds(repo_id, build_id, time_added)"
                        " VALUES(%s, %s, NOW())", self.id, build.id)
@@ -604,13 +566,6 @@ class Repository(base.DataObject):
 
                return { row.arch : row.size for row in res if row.arch in self.distro.arches }
 
-       def get_history(self, **kwargs):
-               kwargs.update({
-                       "repo" : self,
-               })
-
-               return self.pakfire.repos.get_history(**kwargs)
-
        # Write repository
 
        async def write(self, *args, **kwargs):
index 97a7c17e6c9f5fd16f90089586de01cfd3ea572d..f5a2a4e9cacdde6f8fe4623e12033ea8b53bcb7c 100644 (file)
@@ -121,38 +121,6 @@ CREATE TABLE public.builders (
 );
 
 
---
--- Name: builders_history; Type: TABLE; Schema: public; Owner: -
---
-
-CREATE TABLE public.builders_history (
-    id integer NOT NULL,
-    builder_id integer NOT NULL,
-    action text NOT NULL,
-    user_id integer,
-    "time" timestamp without time zone NOT NULL
-);
-
-
---
--- Name: builders_history_id_seq; Type: SEQUENCE; Schema: public; Owner: -
---
-
-CREATE SEQUENCE public.builders_history_id_seq
-    START WITH 1
-    INCREMENT BY 1
-    NO MINVALUE
-    NO MAXVALUE
-    CACHE 1;
-
-
---
--- Name: builders_history_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
---
-
-ALTER SEQUENCE public.builders_history_id_seq OWNED BY public.builders_history.id;
-
-
 --
 -- Name: builders_id_seq; Type: SEQUENCE; Schema: public; Owner: -
 --
@@ -263,39 +231,6 @@ CREATE SEQUENCE public.builds_comments_id_seq
 ALTER SEQUENCE public.builds_comments_id_seq OWNED BY public.builds_comments.id;
 
 
---
--- Name: builds_history; Type: TABLE; Schema: public; Owner: -
---
-
-CREATE TABLE public.builds_history (
-    id integer NOT NULL,
-    build_id integer NOT NULL,
-    action text NOT NULL,
-    user_id integer,
-    "time" timestamp without time zone NOT NULL,
-    bug_id integer
-);
-
-
---
--- Name: builds_history_id_seq; Type: SEQUENCE; Schema: public; Owner: -
---
-
-CREATE SEQUENCE public.builds_history_id_seq
-    START WITH 1
-    INCREMENT BY 1
-    NO MINVALUE
-    NO MAXVALUE
-    CACHE 1;
-
-
---
--- Name: builds_history_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
---
-
-ALTER SEQUENCE public.builds_history_id_seq OWNED BY public.builds_history.id;
-
-
 --
 -- Name: builds_id_seq; Type: SEQUENCE; Schema: public; Owner: -
 --
@@ -457,21 +392,6 @@ CREATE TABLE public.jobs_buildroots (
 );
 
 
---
--- Name: jobs_history; Type: TABLE; Schema: public; Owner: -
---
-
-CREATE TABLE public.jobs_history (
-    job_id integer NOT NULL,
-    action text NOT NULL,
-    state text,
-    user_id integer,
-    "time" timestamp without time zone NOT NULL,
-    builder_id integer,
-    test_job_id integer
-);
-
-
 --
 -- Name: jobs_id_seq; Type: SEQUENCE; Schema: public; Owner: -
 --
@@ -674,38 +594,6 @@ CREATE SEQUENCE public.mirrors_checks_id_seq
 ALTER SEQUENCE public.mirrors_checks_id_seq OWNED BY public.mirrors_checks.id;
 
 
---
--- Name: mirrors_history; Type: TABLE; Schema: public; Owner: -
---
-
-CREATE TABLE public.mirrors_history (
-    id integer NOT NULL,
-    mirror_id integer NOT NULL,
-    action text NOT NULL,
-    user_id integer,
-    "time" timestamp without time zone NOT NULL
-);
-
-
---
--- Name: mirrors_history_id_seq; Type: SEQUENCE; Schema: public; Owner: -
---
-
-CREATE SEQUENCE public.mirrors_history_id_seq
-    START WITH 1
-    INCREMENT BY 1
-    NO MINVALUE
-    NO MAXVALUE
-    CACHE 1;
-
-
---
--- Name: mirrors_history_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
---
-
-ALTER SEQUENCE public.mirrors_history_id_seq OWNED BY public.mirrors_history.id;
-
-
 --
 -- Name: mirrors_id_seq; Type: SEQUENCE; Schema: public; Owner: -
 --
@@ -944,20 +832,6 @@ CREATE SEQUENCE public.repositories_builds_id_seq
 ALTER SEQUENCE public.repositories_builds_id_seq OWNED BY public.repositories_builds.id;
 
 
---
--- Name: repositories_history; Type: TABLE; Schema: public; Owner: -
---
-
-CREATE TABLE public.repositories_history (
-    build_id bigint NOT NULL,
-    action text NOT NULL,
-    from_repo_id integer,
-    to_repo_id integer,
-    user_id integer,
-    "time" timestamp without time zone NOT NULL
-);
-
-
 --
 -- Name: repositories_id_seq; Type: SEQUENCE; Schema: public; Owner: -
 --
@@ -1237,13 +1111,6 @@ ALTER SEQUENCE public.users_id_seq OWNED BY public.users.id;
 ALTER TABLE ONLY public.builders ALTER COLUMN id SET DEFAULT nextval('public.builders_id_seq'::regclass);
 
 
---
--- Name: builders_history id; Type: DEFAULT; Schema: public; Owner: -
---
-
-ALTER TABLE ONLY public.builders_history ALTER COLUMN id SET DEFAULT nextval('public.builders_history_id_seq'::regclass);
-
-
 --
 -- Name: builds id; Type: DEFAULT; Schema: public; Owner: -
 --
@@ -1265,13 +1132,6 @@ ALTER TABLE ONLY public.builds_bugs_updates ALTER COLUMN id SET DEFAULT nextval(
 ALTER TABLE ONLY public.builds_comments ALTER COLUMN id SET DEFAULT nextval('public.builds_comments_id_seq'::regclass);
 
 
---
--- Name: builds_history id; Type: DEFAULT; Schema: public; Owner: -
---
-
-ALTER TABLE ONLY public.builds_history ALTER COLUMN id SET DEFAULT nextval('public.builds_history_id_seq'::regclass);
-
-
 --
 -- Name: distributions id; Type: DEFAULT; Schema: public; Owner: -
 --
@@ -1335,13 +1195,6 @@ ALTER TABLE ONLY public.mirrors ALTER COLUMN id SET DEFAULT nextval('public.mirr
 ALTER TABLE ONLY public.mirrors_checks ALTER COLUMN id SET DEFAULT nextval('public.mirrors_checks_id_seq'::regclass);
 
 
---
--- Name: mirrors_history id; Type: DEFAULT; Schema: public; Owner: -
---
-
-ALTER TABLE ONLY public.mirrors_history ALTER COLUMN id SET DEFAULT nextval('public.mirrors_history_id_seq'::regclass);
-
-
 --
 -- Name: packages id; Type: DEFAULT; Schema: public; Owner: -
 --
@@ -1436,14 +1289,6 @@ ALTER TABLE ONLY public.builders
     ADD CONSTRAINT idx_2197954_primary PRIMARY KEY (id);
 
 
---
--- Name: builders_history idx_2197982_primary; Type: CONSTRAINT; Schema: public; Owner: -
---
-
-ALTER TABLE ONLY public.builders_history
-    ADD CONSTRAINT idx_2197982_primary PRIMARY KEY (id);
-
-
 --
 -- Name: builds_bugs_updates idx_2198008_primary; Type: CONSTRAINT; Schema: public; Owner: -
 --
@@ -1460,14 +1305,6 @@ ALTER TABLE ONLY public.builds_comments
     ADD CONSTRAINT idx_2198018_primary PRIMARY KEY (id);
 
 
---
--- Name: builds_history idx_2198027_primary; Type: CONSTRAINT; Schema: public; Owner: -
---
-
-ALTER TABLE ONLY public.builds_history
-    ADD CONSTRAINT idx_2198027_primary PRIMARY KEY (id);
-
-
 --
 -- Name: images_types idx_2198057_primary; Type: CONSTRAINT; Schema: public; Owner: -
 --
@@ -1500,14 +1337,6 @@ ALTER TABLE ONLY public.mirrors
     ADD CONSTRAINT idx_2198115_primary PRIMARY KEY (id);
 
 
---
--- Name: mirrors_history idx_2198126_primary; Type: CONSTRAINT; Schema: public; Owner: -
---
-
-ALTER TABLE ONLY public.mirrors_history
-    ADD CONSTRAINT idx_2198126_primary PRIMARY KEY (id);
-
-
 --
 -- Name: packages_properties idx_2198147_primary; Type: CONSTRAINT; Schema: public; Owner: -
 --
@@ -1709,13 +1538,6 @@ CREATE INDEX filelists_pkg_id ON public.filelists USING btree (pkg_id);
 ALTER TABLE public.filelists CLUSTER ON filelists_pkg_id;
 
 
---
--- Name: idx_2197982_builder_id; Type: INDEX; Schema: public; Owner: -
---
-
-CREATE INDEX idx_2197982_builder_id ON public.builders_history USING btree (builder_id);
-
-
 --
 -- Name: idx_2198018_build_id; Type: INDEX; Schema: public; Owner: -
 --
@@ -1730,13 +1552,6 @@ CREATE INDEX idx_2198018_build_id ON public.builds_comments USING btree (build_i
 CREATE INDEX idx_2198018_user_id ON public.builds_comments USING btree (user_id);
 
 
---
--- Name: idx_2198080_job_id; Type: INDEX; Schema: public; Owner: -
---
-
-CREATE INDEX idx_2198080_job_id ON public.jobs_history USING btree (job_id);
-
-
 --
 -- Name: idx_2198147_name; Type: INDEX; Schema: public; Owner: -
 --
@@ -1751,13 +1566,6 @@ CREATE UNIQUE INDEX idx_2198147_name ON public.packages_properties USING btree (
 CREATE UNIQUE INDEX idx_2198189_build_id ON public.repositories_builds USING btree (build_id);
 
 
---
--- Name: idx_2198193_build_id; Type: INDEX; Schema: public; Owner: -
---
-
-CREATE INDEX idx_2198193_build_id ON public.repositories_history USING btree (build_id);
-
-
 --
 -- Name: idx_2198199_k; Type: INDEX; Schema: public; Owner: -
 --
@@ -2006,22 +1814,6 @@ ALTER TABLE ONLY public.builder_stats
     ADD CONSTRAINT builder_stats_builder_id FOREIGN KEY (builder_id) REFERENCES public.builders(id);
 
 
---
--- Name: builders_history builders_history_builder_id; Type: FK CONSTRAINT; Schema: public; Owner: -
---
-
-ALTER TABLE ONLY public.builders_history
-    ADD CONSTRAINT builders_history_builder_id FOREIGN KEY (builder_id) REFERENCES public.builders(id);
-
-
---
--- Name: builders_history builders_history_user_id; Type: FK CONSTRAINT; Schema: public; Owner: -
---
-
-ALTER TABLE ONLY public.builders_history
-    ADD CONSTRAINT builders_history_user_id FOREIGN KEY (user_id) REFERENCES public.users(id);
-
-
 --
 -- Name: builds builds_build_repo_id; Type: FK CONSTRAINT; Schema: public; Owner: -
 --
@@ -2046,22 +1838,6 @@ ALTER TABLE ONLY public.builds_comments
     ADD CONSTRAINT builds_comments_user_id FOREIGN KEY (user_id) REFERENCES public.users(id);
 
 
---
--- Name: builds_history builds_history_build_id; Type: FK CONSTRAINT; Schema: public; Owner: -
---
-
-ALTER TABLE ONLY public.builds_history
-    ADD CONSTRAINT builds_history_build_id FOREIGN KEY (build_id) REFERENCES public.builds(id);
-
-
---
--- Name: builds_history builds_history_user_id; Type: FK CONSTRAINT; Schema: public; Owner: -
---
-
-ALTER TABLE ONLY public.builds_history
-    ADD CONSTRAINT builds_history_user_id FOREIGN KEY (user_id) REFERENCES public.users(id);
-
-
 --
 -- Name: builds builds_owner_id; Type: FK CONSTRAINT; Schema: public; Owner: -
 --
@@ -2110,38 +1886,6 @@ ALTER TABLE ONLY public.jobs_buildroots
     ADD CONSTRAINT jobs_buildroots_job_id FOREIGN KEY (job_id) REFERENCES public.jobs(id);
 
 
---
--- Name: jobs_history jobs_history_builder_id; Type: FK CONSTRAINT; Schema: public; Owner: -
---
-
-ALTER TABLE ONLY public.jobs_history
-    ADD CONSTRAINT jobs_history_builder_id FOREIGN KEY (builder_id) REFERENCES public.builders(id);
-
-
---
--- Name: jobs_history jobs_history_job_id; Type: FK CONSTRAINT; Schema: public; Owner: -
---
-
-ALTER TABLE ONLY public.jobs_history
-    ADD CONSTRAINT jobs_history_job_id FOREIGN KEY (job_id) REFERENCES public.jobs(id);
-
-
---
--- Name: jobs_history jobs_history_test_job_id; Type: FK CONSTRAINT; Schema: public; Owner: -
---
-
-ALTER TABLE ONLY public.jobs_history
-    ADD CONSTRAINT jobs_history_test_job_id FOREIGN KEY (test_job_id) REFERENCES public.jobs(id);
-
-
---
--- Name: jobs_history jobs_history_user_id; Type: FK CONSTRAINT; Schema: public; Owner: -
---
-
-ALTER TABLE ONLY public.jobs_history
-    ADD CONSTRAINT jobs_history_user_id FOREIGN KEY (user_id) REFERENCES public.users(id);
-
-
 --
 -- Name: jobs_packages jobs_packaged_job_id; Type: FK CONSTRAINT; Schema: public; Owner: -
 --
@@ -2190,22 +1934,6 @@ ALTER TABLE ONLY public.mirrors_checks
     ADD CONSTRAINT mirrors_checks_mirror_id FOREIGN KEY (mirror_id) REFERENCES public.mirrors(id);
 
 
---
--- Name: mirrors_history mirrors_history_mirror_id; Type: FK CONSTRAINT; Schema: public; Owner: -
---
-
-ALTER TABLE ONLY public.mirrors_history
-    ADD CONSTRAINT mirrors_history_mirror_id FOREIGN KEY (mirror_id) REFERENCES public.mirrors(id);
-
-
---
--- Name: mirrors_history mirrors_history_user_id; Type: FK CONSTRAINT; Schema: public; Owner: -
---
-
-ALTER TABLE ONLY public.mirrors_history
-    ADD CONSTRAINT mirrors_history_user_id FOREIGN KEY (user_id) REFERENCES public.users(id);
-
-
 --
 -- Name: packages packages_commit_id; Type: FK CONSTRAINT; Schema: public; Owner: -
 --
@@ -2270,38 +1998,6 @@ ALTER TABLE ONLY public.repositories
     ADD CONSTRAINT repositories_distro_id FOREIGN KEY (distro_id) REFERENCES public.distributions(id);
 
 
---
--- Name: repositories_history repositories_history_build_id; Type: FK CONSTRAINT; Schema: public; Owner: -
---
-
-ALTER TABLE ONLY public.repositories_history
-    ADD CONSTRAINT repositories_history_build_id FOREIGN KEY (build_id) REFERENCES public.builds(id);
-
-
---
--- Name: repositories_history repositories_history_from_repo_id; Type: FK CONSTRAINT; Schema: public; Owner: -
---
-
-ALTER TABLE ONLY public.repositories_history
-    ADD CONSTRAINT repositories_history_from_repo_id FOREIGN KEY (from_repo_id) REFERENCES public.repositories(id);
-
-
---
--- Name: repositories_history repositories_history_to_repo_id; Type: FK CONSTRAINT; Schema: public; Owner: -
---
-
-ALTER TABLE ONLY public.repositories_history
-    ADD CONSTRAINT repositories_history_to_repo_id FOREIGN KEY (to_repo_id) REFERENCES public.repositories(id);
-
-
---
--- Name: repositories_history repositories_history_user_id; Type: FK CONSTRAINT; Schema: public; Owner: -
---
-
-ALTER TABLE ONLY public.repositories_history
-    ADD CONSTRAINT repositories_history_user_id FOREIGN KEY (user_id) REFERENCES public.users(id);
-
-
 --
 -- Name: repositories repositories_key_id; Type: FK CONSTRAINT; Schema: public; Owner: -
 --
index f829b4e7dd54567d6d020116e3b0b83a0c512a50..ac4f70ff3d7350d738d88d6b7efd60e7742f04ea 100644 (file)
 
                {% module JobsList(builder.jobs) %}
        {% end %}
-
-       {% if log %}
-               <div class="row">
-                       <div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
-                               <h3>{{ _("Log") }}</h3>
-                               {% module Log(log) %}
-                       </div>
-               </div>
-       {% end %}
 {% end block %}
index 072feb597a3e8f2db2683bbbd8e9bc5ba8609822..40c632c3808e63d041b67c4c640425677bc0c107 100644 (file)
                        </div>
                </div>
        </div>
-
-       {% if log %}
-               <div class="row">
-                       <div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
-                               <h3>{{ _("Log") }}</h3>
-                               {% module Log(log) %}
-                       </div>
-               </div>
-       {% end %}
-
 {% end block %}
index a9a51492b79b6421dff8ddd625b81c859c584d05..27e4161af0fc76e477c966ef3fa66b0c6249920c 100644 (file)
                        </div>
                </div>
        {% end %}
-
-       {% if log %}
-               <div class="row">
-                       <div class="col-12 col-sm-12 col-md-12 col-lg-12 col-xl-12">
-                               <h2>{{ _("Log") }}</h2>
-                               {% module Log(log) %}
-                       </div>
-               </div>
-       {% end %}
 {% end block %}
index c3654e4a384e80aff9533cf86a5df2d72e074bd0..4581eefa9534750e4df4e937cd30ba4920d3c335 100644 (file)
@@ -15,10 +15,7 @@ class BuilderDetailHandler(base.BaseHandler):
                if not builder:
                        raise tornado.web.HTTPError(404, "Could not find builder %s" % hostname)
 
-               # Get log.
-               log = builder.get_history(limit=5)
-
-               self.render("builders/detail.html", builder=builder, log=log)
+               self.render("builders/detail.html", builder=builder)
 
 
 class BuilderNewHandler(base.BaseHandler):
index 570b8becb05376b38c85aadb5388f7d805fa74f2..602d1b498865a99761478391b45bd0d4a213791f 100644 (file)
@@ -6,8 +6,7 @@ from . import base
 
 class MirrorListHandler(base.BaseHandler):
        def get(self):
-               self.render("mirrors/list.html", mirrors=self.backend.mirrors,
-                       log=self.backend.mirrors.get_history(limit=5))
+               self.render("mirrors/list.html", mirrors=self.backend.mirrors)
 
 
 class MirrorDetailHandler(base.BaseHandler):
@@ -16,9 +15,7 @@ class MirrorDetailHandler(base.BaseHandler):
                if not mirror:
                        raise tornado.web.HTTPError(404, "Could not find mirror: %s" % hostname)
 
-               log = self.backend.mirrors.get_history(mirror=mirror, limit=10)
-
-               self.render("mirrors/detail.html", mirror=mirror, log=log)
+               self.render("mirrors/detail.html", mirror=mirror)
 
 
 class MirrorNewHandler(base.BaseHandler):