From cfba84bdfee74407b9dcbe80505f527ddb4b0433 Mon Sep 17 00:00:00 2001 From: Sam Wilkins Date: Fri, 10 Jan 2020 14:14:05 -0500 Subject: new folder --- src/server/DashSession/DashSessionAgent.ts | 4 ++-- src/server/DashSession/crash_instructions.txt | 14 -------------- src/server/DashSession/remote_debug_instructions.txt | 16 ---------------- src/server/DashSession/templates/crash_instructions.txt | 14 ++++++++++++++ .../DashSession/templates/remote_debug_instructions.txt | 16 ++++++++++++++++ 5 files changed, 32 insertions(+), 32 deletions(-) delete mode 100644 src/server/DashSession/crash_instructions.txt delete mode 100644 src/server/DashSession/remote_debug_instructions.txt create mode 100644 src/server/DashSession/templates/crash_instructions.txt create mode 100644 src/server/DashSession/templates/remote_debug_instructions.txt (limited to 'src') diff --git a/src/server/DashSession/DashSessionAgent.ts b/src/server/DashSession/DashSessionAgent.ts index b031c177e..8061da1ca 100644 --- a/src/server/DashSession/DashSessionAgent.ts +++ b/src/server/DashSession/DashSessionAgent.ts @@ -54,7 +54,7 @@ export class DashSessionAgent extends AppliedSessionAgent { private _remoteDebugInstructions: string | undefined; private generateDebugInstructions = (zipName: string, target: string) => { if (!this._remoteDebugInstructions) { - this._remoteDebugInstructions = readFileSync(resolve(__dirname, "./remote_debug_instructions.txt"), { encoding: "utf8" }); + this._remoteDebugInstructions = readFileSync(resolve(__dirname, "./templates/remote_debug_instructions.txt"), { encoding: "utf8" }); } return this._remoteDebugInstructions .replace(/__zipname__/, zipName) @@ -68,7 +68,7 @@ export class DashSessionAgent extends AppliedSessionAgent { private _crashInstructions: string | undefined; private generateCrashInstructions({ name, message, stack }: Error) { if (!this._crashInstructions) { - this._crashInstructions = readFileSync(resolve(__dirname, "./crash_instructions.txt"), { encoding: "utf8" }); + this._crashInstructions = readFileSync(resolve(__dirname, "./templates/crash_instructions.txt"), { encoding: "utf8" }); } return this._crashInstructions .replace(/__name__/, name || "[no error name found]") diff --git a/src/server/DashSession/crash_instructions.txt b/src/server/DashSession/crash_instructions.txt deleted file mode 100644 index 65417919d..000000000 --- a/src/server/DashSession/crash_instructions.txt +++ /dev/null @@ -1,14 +0,0 @@ -You, as a Dash Administrator, are being notified of a server crash event. Here's what we know: - -name: -__name__ - -message: -__message__ - -stack: -__stack__ - -The server is already restarting itself, but if you're concerned, use the Remote Desktop Connection to monitor progress. - -__signature__ \ No newline at end of file diff --git a/src/server/DashSession/remote_debug_instructions.txt b/src/server/DashSession/remote_debug_instructions.txt deleted file mode 100644 index c279c460a..000000000 --- a/src/server/DashSession/remote_debug_instructions.txt +++ /dev/null @@ -1,16 +0,0 @@ -Instructions: - -Download this attachment, open your downloads folder and find this file (__zipname__). -Right click on the zip file and select 'Extract to __target__\'. -Open up the command line, and remember that you can get the path to any file or directory by literally dragging it from the file system and dropping it onto the terminal. -Unless it's in your path, you'll want to navigate to the MongoDB bin directory, given for Windows: - -cd '/c/Program Files/MongoDB/Server/[your version, i.e. 4.0, goes here]/bin' - -Then run the following command (if you're in the bin folder, make that ./mongorestore ...): - -mongorestore --gzip [/path/to/directory/you/just/unzipped] --db Dash - -Assuming everything runs well, this will mirror your local database with that of the server. Now, just start the server locally and debug. - -__signature__ \ No newline at end of file diff --git a/src/server/DashSession/templates/crash_instructions.txt b/src/server/DashSession/templates/crash_instructions.txt new file mode 100644 index 000000000..65417919d --- /dev/null +++ b/src/server/DashSession/templates/crash_instructions.txt @@ -0,0 +1,14 @@ +You, as a Dash Administrator, are being notified of a server crash event. Here's what we know: + +name: +__name__ + +message: +__message__ + +stack: +__stack__ + +The server is already restarting itself, but if you're concerned, use the Remote Desktop Connection to monitor progress. + +__signature__ \ No newline at end of file diff --git a/src/server/DashSession/templates/remote_debug_instructions.txt b/src/server/DashSession/templates/remote_debug_instructions.txt new file mode 100644 index 000000000..c279c460a --- /dev/null +++ b/src/server/DashSession/templates/remote_debug_instructions.txt @@ -0,0 +1,16 @@ +Instructions: + +Download this attachment, open your downloads folder and find this file (__zipname__). +Right click on the zip file and select 'Extract to __target__\'. +Open up the command line, and remember that you can get the path to any file or directory by literally dragging it from the file system and dropping it onto the terminal. +Unless it's in your path, you'll want to navigate to the MongoDB bin directory, given for Windows: + +cd '/c/Program Files/MongoDB/Server/[your version, i.e. 4.0, goes here]/bin' + +Then run the following command (if you're in the bin folder, make that ./mongorestore ...): + +mongorestore --gzip [/path/to/directory/you/just/unzipped] --db Dash + +Assuming everything runs well, this will mirror your local database with that of the server. Now, just start the server locally and debug. + +__signature__ \ No newline at end of file -- cgit v1.2.3-70-g09d2