Skip to content

Commit

Permalink
Rearrange WA Integration seq
Browse files Browse the repository at this point in the history
  • Loading branch information
kuettai committed Nov 8, 2024
1 parent 65aabfd commit 60764f0
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 4 deletions.
5 changes: 4 additions & 1 deletion frameworks/Framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,4 +162,7 @@ def formatCheckAndLinks(self, packedData):
checks.append(c)
checks.append("</dl>")

return ["".join(checks), "<br>".join(links), comp]
return ["".join(checks), "<br>".join(links), comp]

def _hookPostBuildContentDetail(self):
pass
4 changes: 3 additions & 1 deletion frameworks/FrameworkPageBuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,13 +149,15 @@ def buildContentDetail(self):
items.append([item, ''])

outp.append(self.generateRowWithCol(size=12, items=items, rowHtmlAttr="data-context=detail"))

self.framework._hookPostBuildContentDetail()

return (outp)

# To be overwrite by custom class
def _hookPreBuildContentDetail(self):
pass

def customBuildTableHTML(self):
outp = []

Expand Down
4 changes: 3 additions & 1 deletion frameworks/WAFS/WAFS.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ def __init__(self, data):
self.WATools = waTools
self.WATools.init(tmpParams)
self.WATools.createReportIfNotExists()
self.WATools.createMilestoneIfNotExists()
self.WATools.listAnswers()
# print(self.WATools.answerSets)

Expand Down Expand Up @@ -89,3 +88,6 @@ def getDescription(self, titleNum, paired):
titleStr = self.WATools.answerSets.get(titleNum, [None])[1]
sectStr = self.WATools.answerSets.get(paired, [None])[1]
return f"{titleStr} - {sectStr}"

def _hookPostBuildContentDetail(self):
self.WATools.createMilestoneIfNotExists()
2 changes: 1 addition & 1 deletion frameworks/helper/WATools.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def createMilestoneIfNotExists(self):
break # No more pages, exit the loop

if not all_milestones:
print(f"No milestones found for workload {workload_id}... creating milestone...")
print("No milestones found for workload {}... creating milestone...".format(self.waInfo['WorkloadId']))
self.createMilestone()
return None

Expand Down
20 changes: 20 additions & 0 deletions services/PageBuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,19 @@ def getHtmlId(self, el=''):
el = el or o[0:11]
return self.idPrefix + el

def _prebuildContentSummary(self):
pass

def _postbuildContentSummary(self):
pass

def _preBuildContentDetail(self):
pass

def _postBuildContentDetail(self):
pass


def buildPage(self):
self.init()
self.htmlFolder = Config.get('HTML_ACCOUNT_FOLDER_FULLPATH')
Expand All @@ -76,8 +89,15 @@ def buildPage(self):
output.append(self.buildHeader())
output.append(self.buildNav())
output.append(self.buildBreadcrumb())

self._prebuildContentSummary()
output.append(self.buildContentSummary())
self._postbuildContentSummary()

self._preBuildContentDetail()
output.append(self.buildContentDetail())
self._postBuildContentDetail()

output.append(self.buildFooter())

finalHTML = ""
Expand Down

0 comments on commit 60764f0

Please sign in to comment.