diff --git a/client/src/app/features/changelog/changelog.component.html b/client/src/app/features/changelog/changelog.component.html index 1b83c69..c085c6d 100644 --- a/client/src/app/features/changelog/changelog.component.html +++ b/client/src/app/features/changelog/changelog.component.html @@ -1,21 +1,36 @@ -
+
- -
-
-
-

{{logfile}}

- +
+
+
+ +
+
+
+
+ + +
+ +
+ +
+
+
+

{{logfile}}

+ +
-
-

+ +
+
diff --git a/client/src/app/features/changelog/changelog.component.ts b/client/src/app/features/changelog/changelog.component.ts index f6bd28e..2e160d9 100644 --- a/client/src/app/features/changelog/changelog.component.ts +++ b/client/src/app/features/changelog/changelog.component.ts @@ -15,6 +15,7 @@ import { FetchLogService } from 'src/app/shared/services/fetch-log.service'; export class ChangelogComponent { public displayableLogs: string[] = []; + showLogModal:boolean = false; constructor( private httpClient: HttpClient, @@ -67,6 +68,13 @@ export class ChangelogComponent { } viewLog(name:string){ - new FetchLogService(this.httpClient).fetchLogsToDisplay("", true, false, name); + let cli = new FetchLogService(this.httpClient); + this.showLogModal = !this.showLogModal; + cli.fetchLogsToDisplay("", true, false, name); + cli.fetchLogsToDisplay("", false, false, name); + } + + toggleLogModal(){ + this.showLogModal = !this.showLogModal; } } diff --git a/client/src/app/shared/services/fetch-log.service.ts b/client/src/app/shared/services/fetch-log.service.ts index 260f139..59decf9 100644 --- a/client/src/app/shared/services/fetch-log.service.ts +++ b/client/src/app/shared/services/fetch-log.service.ts @@ -7,6 +7,8 @@ import { environment } from 'src/environments/environment.development'; }) export class FetchLogService { + showModal: boolean = false + constructor( private httpClient: HttpClient ) {} @@ -54,9 +56,10 @@ export class FetchLogService { const url = window.URL.createObjectURL(blob); const a = document.createElement('a'); a.href = url; - a.download = 'logfile.log'; - a.innerText = "Click here to download as `.log` file"; + a.download = filename+'.log'; + a.innerText = "Download "+filename+".log"; if(isDisplayOnly){ + this.showModal = !this.showModal; blob.text().then(v => document.getElementById("log-disp-texts")!.innerHTML = v); } else { diff --git a/server/python_api/merge_recipe.py b/server/python_api/merge_recipe.py index 6b74d3c..bb39ae4 100644 --- a/server/python_api/merge_recipe.py +++ b/server/python_api/merge_recipe.py @@ -102,6 +102,27 @@ def create_map(events_action: str, log: str, additional=[]) -> str: # 3 - changefile = track log # 4 - debug = enable debug def merge(args): + """ + Merge the 2 json files together with input of target paths, output path and changefile + + :param args: A list of arguments. list[] + :type args: list + where each element position; + 0 - master_path = master.json / to be merged + + 1 - dev_path = dev.json / to merge into another + + 2 - outfile = merged json output + + 3 - changefile = track log (json) --- generate by merge to html,log,json + + 4 - debug = enable debug + + 5 - requester = requester's name sent by client + + :return: None + :rtype: None + """ print("ARGS: => ",args) master_path = args[0]; dev_path = args[1]; outfile_path = args[2]; changefile_path = args[3]; @@ -225,7 +246,7 @@ def merge(args): for event in events: # Create div # print("Log as list: ",str(event).split("\t")) - html_string = "\t
\n" + html_string = "\t
\n" event_fraction = str(event).split("\t") for i in event_fraction: if i != "" and i != "\n" and i != "---":