| 121 | } |
| 122 | |
| 123 | private getStatus(result: string): string { |
| 124 | let status |
| 125 | switch (result) { |
| 126 | case statusLevel.warn: { |
| 127 | status = `${chalk.yellow( |
| 128 | String.fromCodePoint(0x26a0) // warning symbol |
| 129 | )} unable to make some connections` |
| 130 | if (this.internalTable.status !== statusLevel.fail) { |
| 131 | this.internalTable.status = statusLevel.warn |
| 132 | } |
| 133 | break |
| 134 | } |
| 135 | case statusLevel.fail: { |
| 136 | status = `${chalk.red( |
| 137 | String.fromCodePoint(0x1f6ab) // failure symbol |
| 138 | )} unable to store data in Dgraph` |
| 139 | this.internalTable.status = statusLevel.fail |
| 140 | break |
| 141 | } |
| 142 | default: { |
| 143 | status = chalk.green(String.fromCodePoint(0x2714)) // checkmark symbol |
| 144 | } |
| 145 | } |
| 146 | return status |
| 147 | } |
| 148 | |
| 149 | print(): void { |
| 150 | logger.info('Printing scan report...') |