Skip to content
This repository was archived by the owner on Aug 18, 2020. It is now read-only.

Commit 881b0c4

Browse files
committed
Updated the gui to deal with plugin log messages containing a message and a timestamp.
1 parent f391f47 commit 881b0c4

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"@angular/platform-browser-dynamic": "7.2.1",
3636
"@angular/router": "7.2.1",
3737
"@types/crypto-js": "^3.1.43",
38-
"chatoverflow-api": "^0.2.4",
38+
"chatoverflow-api": "^0.2.5",
3939
"classlist.js": "1.1.20150312",
4040
"core-js": "2.5.6",
4141
"crypto-js": "^3.1.9-1",

src/app/pages/betterrepl/betterrepl.component.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ import {
1818
PluginInstance,
1919
PluginInstanceRef,
2020
Requirement,
21-
RequirementInfo
21+
RequirementInfo,
22+
PluginLogMessageDTO
2223
} from "chatoverflow-api";
2324
import {CryptoService} from "../../../crypto.service";
2425

@@ -239,9 +240,9 @@ export class BetterREPLComponent extends UpgradableComponent {
239240
}
240241

241242
getLog(instanceName: string) {
242-
this.instanceService.getLog(instanceName, this.authKey).subscribe((response: Array<string>) => {
243+
this.instanceService.getLog(instanceName, this.authKey).subscribe((response: Array<PluginLogMessageDTO>) => {
243244
this.logRequest("getLog", true, JSON.stringify(response));
244-
this.instanceLogOutput = response;
245+
this.instanceLogOutput = response.map(entry => `${entry.message} (${entry.timestamp})`);
245246
}, error => this.logGenericError("getLog"));
246247
}
247248

0 commit comments

Comments
 (0)