diff --git a/.DS_Store b/.DS_Store
index 9389dda..25a1ba3 100644
Binary files a/.DS_Store and b/.DS_Store differ
diff --git a/Praktikum3/.DS_Store b/Praktikum3/.DS_Store
index 77b5a8e..08cdf65 100644
Binary files a/Praktikum3/.DS_Store and b/Praktikum3/.DS_Store differ
diff --git a/Praktikum3/bt/.DS_Store b/Praktikum3/bt/.DS_Store
index 651c2d1..b0e8eb5 100644
Binary files a/Praktikum3/bt/.DS_Store and b/Praktikum3/bt/.DS_Store differ
diff --git a/Praktikum3/bt/app/__pycache__/error.cpython-36.pyc b/Praktikum3/bt/app/__pycache__/error.cpython-36.pyc
index ba6700d..4a2e475 100644
Binary files a/Praktikum3/bt/app/__pycache__/error.cpython-36.pyc and b/Praktikum3/bt/app/__pycache__/error.cpython-36.pyc differ
diff --git a/Praktikum3/bt/app/__pycache__/eval.cpython-36.pyc b/Praktikum3/bt/app/__pycache__/eval.cpython-36.pyc
index 819f619..a00997d 100644
Binary files a/Praktikum3/bt/app/__pycache__/eval.cpython-36.pyc and b/Praktikum3/bt/app/__pycache__/eval.cpython-36.pyc differ
diff --git a/Praktikum3/bt/app/__pycache__/navigation.cpython-36.pyc b/Praktikum3/bt/app/__pycache__/navigation.cpython-36.pyc
index 6c15a3a..05e0fff 100644
Binary files a/Praktikum3/bt/app/__pycache__/navigation.cpython-36.pyc and b/Praktikum3/bt/app/__pycache__/navigation.cpython-36.pyc differ
diff --git a/Praktikum3/bt/app/error.py b/Praktikum3/bt/app/error.py
index 1d02958..6fa757f 100644
--- a/Praktikum3/bt/app/error.py
+++ b/Praktikum3/bt/app/error.py
@@ -261,8 +261,6 @@ class Fehler_cl(object):
#-------------------------------------------------------
def GET(self, id=None, type=None):
#-------------------------------------------------------
- print(type)
- print(id)
retVal_o = {
'data': None
}
@@ -270,7 +268,6 @@ class Fehler_cl(object):
# Anforderung der Liste
print('true')
if type == 'erkannt':
- print('true')
retVal_o['data'] = self.db_o.readErkannt_px()
elif type == 'behoben':
retVal_o['data'] = self.db_o.readBehoben_px()
@@ -287,7 +284,6 @@ class Fehler_cl(object):
retVal_o['katfehler'] = self.dbKatFehler_o.read_px()
retVal_o['katursache'] = self.dbKatUrsache_o.read_px()
- print(retVal_o)
return retVal_o
#-------------------------------------------------------
diff --git a/Praktikum3/bt/app/eval.py b/Praktikum3/bt/app/eval.py
index 99d3b1b..66521be 100644
--- a/Praktikum3/bt/app/eval.py
+++ b/Praktikum3/bt/app/eval.py
@@ -3,7 +3,7 @@
import json
import cherrypy
-#from .database import SourceDatabase_cl, EvaluatedDatabase_cl
+from .database import FehlerDatabase_cl, ProjektDatabase_cl, KomponenteDatabase_cl, KatfehlerDatabase_cl
# Method-Dispatching!
# Übersicht Anforderungen / Methoden
@@ -28,12 +28,43 @@ class ProList_cl(object):
#-------------------------------------------------------
def __init__(self):
#-------------------------------------------------------
- pass
+ self.dbFehler_o = FehlerDatabase_cl()
+ self.dbProjekt_o = ProjektDatabase_cl()
+ self.dbKomponente_o = KomponenteDatabase_cl()
#-------------------------------------------------------
- def GET(self):
+ def GET(self, id=None):
#-------------------------------------------------------
- return json.dumps(retVal_o)
+ data_o = {}
+ retVal_o = {}
+ retVal_o['data'] = {}
+ data_o['Fehler'] = self.dbFehler_o.read_px()
+ data_o['Projekt'] = self.dbProjekt_o.read_px()
+ data_o['Komponente'] = self.dbKomponente_o.read_px()
+
+ for projektid in data_o['Projekt']:
+ projekt = data_o['Projekt'][projektid]['name']
+ retVal_o['data'][projekt] = 'None'
+ for komponente in data_o['Komponente']:
+ if retVal_o['data'][projekt] == 'None':
+ retVal_o['data'][projekt] = {}
+ if data_o['Komponente'][komponente]['projektid'] == projektid:
+ for fehler in data_o['Fehler']:
+ retVal_o['data'][projekt][fehler] = 'None'
+ if data_o['Fehler'][fehler]['komponenteid'] == komponente:
+ if retVal_o['data'][projekt][fehler] == 'None':
+ retVal_o['data'][projekt][fehler] = {}
+ retVal_o['data'][projekt][fehler]['fehlername'] = data_o['Fehler'][fehler]['name']
+ retVal_o['data'][projekt][fehler]['projektname'] = data_o['Projekt'][projektid]['name']
+ retVal_o['data'][projekt][fehler]['komponentename'] = data_o['Komponente'][komponente]['name']
+ if data_o['Fehler'][fehler]['status'] != 'geprueft':
+ retVal_o['data'][projekt][fehler]['fehlerstatus'] = 'erkannt'
+ else:
+ retVal_o['data'][projekt][fehler]['fehlerstatus'] = 'beseitigt'
+ return retVal_o
+
+
+
@@ -49,16 +80,39 @@ class KatList_cl(object):
#----------------------------------------------------------
exposed = True # gilt für alle Methoden
-
#-------------------------------------------------------
def __init__(self):
#-------------------------------------------------------
- pass
+ self.dbFehler_o = FehlerDatabase_cl()
+ self.dbKatFehler_o = KatfehlerDatabase_cl()
#-------------------------------------------------------
- def GET(self):
+ def GET(self, id=None):
#-------------------------------------------------------
- return json.dumps(retVal_o)
+ data_o = {}
+ retVal_o = {}
+ retVal_o['data'] = {}
+ data_o['Fehler'] = self.dbFehler_o.read_px()
+ data_o['Kategorie'] = self.dbKatFehler_o.read_px()
+
+ print(data_o)
+
+ for kategorieid in data_o['Kategorie']:
+ kategorie = data_o['Kategorie'][kategorieid]['name']
+ retVal_o['data'][kategorie] = 'None'
+ for fehler in data_o['Fehler']:
+ if retVal_o['data'][kategorie] == 'None':
+ retVal_o['data'][kategorie] = {}
+ retVal_o['data'][kategorie][fehler] = 'None'
+ if data_o['Fehler'][fehler]['katfehlerid'] == kategorieid:
+ if retVal_o['data'][kategorie][fehler] == 'None':
+ retVal_o['data'][kategorie][fehler] = {}
+ retVal_o['data'][kategorie][fehler]['fehlername'] = data_o['Fehler'][fehler]['name']
+ if data_o['Fehler'][fehler]['status'] != 'geprueft':
+ retVal_o['data'][kategorie][fehler]['fehlerstatus'] = 'erkannt'
+ else:
+ retVal_o['data'][kategorie][fehler]['fehlerstatus'] = 'beseitigt'
+ return retVal_o
# EOF
\ No newline at end of file
diff --git a/Praktikum3/bt/app/navigation.py b/Praktikum3/bt/app/navigation.py
index 0e30ed9..b93dbac 100755
--- a/Praktikum3/bt/app/navigation.py
+++ b/Praktikum3/bt/app/navigation.py
@@ -41,7 +41,7 @@ class Navigation_cl(object):
{'action': 'katfehler' , 'text': 'Pflege Fehler-Kategorien'},
{'action': 'katursache' , 'text': 'Pflege Fehlerursachen-Kategorien'},
{'action': 'prolist' , 'text': 'Auswertung Projekte/Fehler'},
- {'action': 'catlist' , 'text': 'Auswertung Kategorien/Fehler'}
+ {'action': 'katlist' , 'text': 'Auswertung Kategorien/Fehler'}
]
return json.dumps(retVal_o)
diff --git a/Praktikum3/bt/static/css/main.css b/Praktikum3/bt/static/css/main.css
index 9cc1266..47a7c6d 100755
--- a/Praktikum3/bt/static/css/main.css
+++ b/Praktikum3/bt/static/css/main.css
@@ -135,6 +135,7 @@ body {
border: 1px solid;
border-collapse: collapse;
margin:auto;
+ margin-bottom: 50px;
}
#idList th {
diff --git a/Praktikum3/bt/static/js/app.js b/Praktikum3/bt/static/js/app.js
index cc3fbc8..048bdd0 100755
--- a/Praktikum3/bt/static/js/app.js
+++ b/Praktikum3/bt/static/js/app.js
@@ -45,6 +45,9 @@ APP.Application_cl = class {
this.detailFehlerSw_o = new APP.DetailView_cl('fehler', '/fehler/', 'fehlerswdetail.tpl');
this.detailFehlerQsp_o = new APP.DetailView_cl('fehler', '/fehler/', 'fehlerqspdetail.tpl');
+ this.listPro_o = new APP.ListView_cl('prolist', '/prolist/', 'prolist.tpl');
+ this.listKat_o = new APP.ListView_cl('katlist', '/katlist/', 'katlist.tpl');
+
// this.listSources_o = new APP.ListView_cl('source', '/source/', 'sourceslist.tpl');
// this.detailSources_o = new APP.SourceDetailView_cl('source', '/source/', 'sourcedetail.tpl');
// this.listEvaluated_o = new APP.ListView_cl('evaluated', '/evaluated/', 'evaluatedlist.tpl');
@@ -154,6 +157,12 @@ APP.Application_cl = class {
// Detailformular im Content-Bereich anzeigen
self_opl.setContent_p(self_opl.detailFehlerQsp_o, data_apl[1]);
break;
+ case 'prolist':
+ self_opl.setContent_p(self_opl.listPro_o, data_apl[1]);
+ break;
+ case 'katlist':
+ self_opl.setContent_p(self_opl.listKat_o, data_apl[1]);
+ break;
default:
console.warn('[Application_cl] unbekannte app-Notification: '+data_apl[0]);
break;
diff --git a/Praktikum3/bt/templates/.DS_Store b/Praktikum3/bt/templates/.DS_Store
index 018f4b6..9da351f 100644
Binary files a/Praktikum3/bt/templates/.DS_Store and b/Praktikum3/bt/templates/.DS_Store differ
diff --git a/Praktikum3/bt/templates/katlist.tpl b/Praktikum3/bt/templates/katlist.tpl
new file mode 100755
index 0000000..7f86a50
--- /dev/null
+++ b/Praktikum3/bt/templates/katlist.tpl
@@ -0,0 +1,25 @@
+
+
+
+
+ @var rowsKategorie_o = context['data'];@
+ @for var keyKategorie_s in rowsKategorie_o@
+ @var rowsFehler_o = context['data'][keyKategorie_s];@
+
+ #keyKategorie_s#
+
+
+ @for var keyFehler_s in rowsFehler_o@
+ @if rowsFehler_o[keyFehler_s] != 'None'@
+ #rowsFehler_o[keyFehler_s]['fehlername']# |
+ #rowsFehler_o[keyFehler_s]['fehlerstatus']# |
+ @endif@
+ @endfor@
+
+ @endfor@
+
+
+
+
\ No newline at end of file
diff --git a/Praktikum3/bt/templates/prolist.tpl b/Praktikum3/bt/templates/prolist.tpl
new file mode 100755
index 0000000..988e4b0
--- /dev/null
+++ b/Praktikum3/bt/templates/prolist.tpl
@@ -0,0 +1,26 @@
+
+
+
+
+ @var rowsProjekt_o = context['data'];@
+ @for var keyProjekt_s in rowsProjekt_o@
+ @var rowsFehler_o = context['data'][keyProjekt_s];@
+
+ #keyProjekt_s#
+
+
+ @for var keyFehler_s in rowsFehler_o@
+ @if rowsFehler_o[keyFehler_s] != 'None'@
+ #rowsFehler_o[keyFehler_s]['fehlername']# |
+ #rowsFehler_o[keyFehler_s]['komponentename']# |
+ #rowsFehler_o[keyFehler_s]['fehlerstatus']# |
+ @endif@
+ @endfor@
+
+ @endfor@
+
+
+
+
\ No newline at end of file