From: Michael Tremer Date: Thu, 13 Oct 2022 08:36:07 +0000 (+0000) Subject: Drop all all history stuff X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4636790667b94c4c55be5bd7174a8dd6340eaee7;p=pbs.git Drop all all history stuff This is too complicated to maintain Signed-off-by: Michael Tremer --- diff --git a/po/pakfire-build-service.pot b/po/pakfire-build-service.pot index 8cf688d1..fba31489 100644 --- a/po/pakfire-build-service.pot +++ b/po/pakfire-build-service.pot @@ -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 \n" "Language-Team: LANGUAGE \n" diff --git a/src/buildservice/__init__.py b/src/buildservice/__init__.py index de14cf44..ed096999 100644 --- a/src/buildservice/__init__.py +++ b/src/buildservice/__init__.py @@ -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 diff --git a/src/buildservice/builders.py b/src/buildservice/builders.py index 93260c5f..415e053d 100644 --- a/src/buildservice/builders.py +++ b/src/buildservice/builders.py @@ -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: diff --git a/src/buildservice/builds.py b/src/buildservice/builds.py index c673cf8b..602451fd 100644 --- a/src/buildservice/builds.py +++ b/src/buildservice/builds.py @@ -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): """ diff --git a/src/buildservice/jobs.py b/src/buildservice/jobs.py index 5d5d984c..f11914da 100644 --- a/src/buildservice/jobs.py +++ b/src/buildservice/jobs.py @@ -11,7 +11,6 @@ import pakfire import pakfire.config from . import base -from . import logs from . import users from .constants import * diff --git a/src/buildservice/mirrors.py b/src/buildservice/mirrors.py index 4447f365..fe713def 100644 --- a/src/buildservice/mirrors.py +++ b/src/buildservice/mirrors.py @@ -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) diff --git a/src/buildservice/repository.py b/src/buildservice/repository.py index 51ae287a..23f4c502 100644 --- a/src/buildservice/repository.py +++ b/src/buildservice/repository.py @@ -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): diff --git a/src/database.sql b/src/database.sql index 97a7c17e..f5a2a4e9 100644 --- a/src/database.sql +++ b/src/database.sql @@ -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: - -- diff --git a/src/templates/builders/detail.html b/src/templates/builders/detail.html index f829b4e7..ac4f70ff 100644 --- a/src/templates/builders/detail.html +++ b/src/templates/builders/detail.html @@ -99,13 +99,4 @@ {% module JobsList(builder.jobs) %} {% end %} - - {% if log %} -
-
-

{{ _("Log") }}

- {% module Log(log) %} -
-
- {% end %} {% end block %} diff --git a/src/templates/mirrors/detail.html b/src/templates/mirrors/detail.html index 072feb59..40c632c3 100644 --- a/src/templates/mirrors/detail.html +++ b/src/templates/mirrors/detail.html @@ -133,14 +133,4 @@ - - {% if log %} -
-
-

{{ _("Log") }}

- {% module Log(log) %} -
-
- {% end %} - {% end block %} diff --git a/src/templates/mirrors/list.html b/src/templates/mirrors/list.html index a9a51492..27e4161a 100644 --- a/src/templates/mirrors/list.html +++ b/src/templates/mirrors/list.html @@ -104,13 +104,4 @@ {% end %} - - {% if log %} -
-
-

{{ _("Log") }}

- {% module Log(log) %} -
-
- {% end %} {% end block %} diff --git a/src/web/builders.py b/src/web/builders.py index c3654e4a..4581eefa 100644 --- a/src/web/builders.py +++ b/src/web/builders.py @@ -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): diff --git a/src/web/mirrors.py b/src/web/mirrors.py index 570b8bec..602d1b49 100644 --- a/src/web/mirrors.py +++ b/src/web/mirrors.py @@ -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):