diff --git a/app/models.py b/app/models.py
index 5c6966dd..5aeb8f17 100644
--- a/app/models.py
+++ b/app/models.py
@@ -246,9 +246,6 @@ class JobInput(db.Model):
filename = db.Column(db.String(255))
dir = db.Column(db.String(255))
job_id = db.Column(db.Integer, db.ForeignKey('jobs.id'))
- # Relationships
- results = db.relationship('JobResult', backref='job_input', lazy='dynamic',
- cascade='save-update, merge, delete')
def __repr__(self):
"""
@@ -260,8 +257,7 @@ class JobInput(db.Model):
return {'id': self.id,
'dir': self.dir,
'filename': self.filename,
- 'job_id': self.job_id,
- 'results': [result.to_dict() for result in self.results]}
+ 'job_id': self.job_id}
class JobResult(db.Model):
@@ -274,7 +270,6 @@ class JobResult(db.Model):
filename = db.Column(db.String(255))
dir = db.Column(db.String(255))
job_id = db.Column(db.Integer, db.ForeignKey('jobs.id'))
- job_input_id = db.Column(db.Integer, db.ForeignKey('job_inputs.id'))
def __repr__(self):
"""
@@ -286,8 +281,7 @@ class JobResult(db.Model):
return {'id': self.id,
'dir': self.dir,
'filename': self.filename,
- 'job_id': self.job_id,
- 'job_input_id': self.job_input_id}
+ 'job_id': self.job_id}
class Job(db.Model):
diff --git a/app/static/js/nopaque.lists.js b/app/static/js/nopaque.lists.js
index 52961951..dad86535 100644
--- a/app/static/js/nopaque.lists.js
+++ b/app/static/js/nopaque.lists.js
@@ -243,6 +243,22 @@ class JobList extends List {
return rowElement;
}
}
+JobList.DEFAULT_OPTIONS = {item: "
",
+ page: 4,
+ pagination: {innerWindow: 8, outerWindow: 1},
+ valueNames: ["description", "service", "status", "title", {data: ["id"]}]};
+JobList.SERVICE_ICONS = {"merge_images": "burst_mode",
+ "nlp": "format_textdirection_l_to_r",
+ "ocr": "find_in_page",
+ "default": "help"};
+JobList.STATUS_COLORS = {"submitted": "blue",
+ "preparing": "light-blue",
+ "pending": "orange",
+ "running": "amber",
+ "complete": "green",
+ "stopping": "orange",
+ "removing": "deep-orange",
+ "default": "red"};
class ResultList extends List {
@@ -311,22 +327,3 @@ class ResultList extends List {
return matchRowElement
}
}
-
-
-
-JobList.DEFAULT_OPTIONS = {item: "
",
- page: 4,
- pagination: {innerWindow: 8, outerWindow: 1},
- valueNames: ["description", "service", "status", "title", {data: ["id"]}]};
-JobList.SERVICE_ICONS = {"merge_images": "burst_mode",
- "nlp": "format_textdirection_l_to_r",
- "ocr": "find_in_page",
- "default": "help"};
-JobList.STATUS_COLORS = {"submitted": "blue",
- "preparing": "light-blue",
- "pending": "orange",
- "running": "amber",
- "complete": "green",
- "stopping": "orange",
- "removing": "deep-orange",
- "default": "red"};
diff --git a/app/templates/jobs/job.html.j2 b/app/templates/jobs/job.html.j2
index c1f881b7..d6931dc4 100644
--- a/app/templates/jobs/job.html.j2
+++ b/app/templates/jobs/job.html.j2
@@ -76,7 +76,7 @@