-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In prevision of the development of a vscode extension, the code in the viewer-prototype has been mostly moved to 2 new packages: * @trace-viewer/base: Queries the trace server for traces, experiments and possible outputs * @trace-viewer/react-components: Contains the various types of visualization for trace data, queries the trace server for output data to display Those 2 packages can eventually be published to npm. In the viewer-prototype directory only remains the theia specific module contributions. So the application still works as before using theia, it's just that most of the classes used by the trace-viewer have been moved to new npm packages. Signed-off-by: Geneviève Bastien <gbastien@versatic.net>
- Loading branch information
Showing
70 changed files
with
481 additions
and
293 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,6 @@ | |
], | ||
"env": { | ||
"browser": true, | ||
"mocha": true, | ||
"node": true | ||
}, | ||
"ignorePatterns": [ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/** @type {import('eslint').Linter.Config} */ | ||
module.exports = { | ||
root: true, | ||
parser: "@typescript-eslint/parser", // Specifies the ESLint parser | ||
parserOptions: { | ||
ecmaVersion: 2020, // Allows for the parsing of modern ECMAScript features | ||
sourceType: "module", // Allows for the use of imports | ||
tsconfigRootDir: __dirname, | ||
project: 'tsconfig.json', | ||
projectFolderIgnoreList: [ | ||
'/lib/' | ||
] | ||
}, | ||
extends: [ | ||
'plugin:@typescript-eslint/recommended', | ||
'../../configs/base.eslintrc.json', | ||
'../../configs/warnings.eslintrc.json', | ||
'../../configs/errors.eslintrc.json' | ||
], | ||
ignorePatterns: [ | ||
'node_modules', | ||
'lib', | ||
'.eslintrc.js', | ||
'plugins' | ||
] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"name": "@trace-viewer/base", | ||
"version": "0.0.0", | ||
"description": "Trace Compass base package, contains trace management utilities", | ||
"license": "MIT", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/theia-ide/theia-trace-extension" | ||
}, | ||
"files": [ | ||
"lib", | ||
"src" | ||
], | ||
"dependencies": { | ||
"tsp-typescript-client": "next" | ||
}, | ||
"devDependencies": { | ||
"@typescript-eslint/eslint-plugin": "^3.4.0", | ||
"@typescript-eslint/parser": "^3.4.0", | ||
"eslint": "^7.3.0", | ||
"eslint-plugin-import": "^2.21.2", | ||
"eslint-plugin-no-null": "^1.0.2", | ||
"eslint-plugin-react": "^7.20.0", | ||
"rimraf": "latest", | ||
"typescript": "latest" | ||
}, | ||
"scripts": { | ||
"build": "tsc", | ||
"clean": "rimraf lib", | ||
"lint": "eslint .", | ||
"prepare": "yarn clean && yarn build", | ||
"test": "echo 'test'", | ||
"watch": "tsc -w" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
export enum MessageCategory { | ||
TRACE_CONTEXT, | ||
SERVER_MESSAGE, | ||
SERVER_STATUS, | ||
} | ||
|
||
export enum MessageSeverity { | ||
ERROR, | ||
WARNING, | ||
INFO, | ||
DEBUG | ||
} | ||
|
||
export interface StatusMessage { | ||
text: string; | ||
category?: MessageCategory; | ||
severity?: MessageSeverity; | ||
} | ||
|
||
export declare interface MessageManager { | ||
|
||
addStatusMessage(messageKey: string, message: StatusMessage): void; | ||
removeStatusMessage(messageKey: string): void; | ||
|
||
} | ||
|
||
export class MessageManager implements MessageManager { | ||
|
||
addStatusMessage(messageKey: string, {text, | ||
category = MessageCategory.SERVER_MESSAGE, | ||
severity = MessageSeverity.INFO }: StatusMessage): void { | ||
console.log('New status message', messageKey, text, category, severity); | ||
} | ||
|
||
removeStatusMessage(messageKey: string): void { | ||
console.log('Removing status message status message', messageKey); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { EventEmitter } from 'events'; | ||
|
||
export declare interface SignalManager { | ||
|
||
fireTooltipSignal(tooltip: { [key: string]: string }): void; | ||
|
||
} | ||
|
||
export const Signals = { | ||
TRACE_OPENED : 'trace opened', | ||
TRACE_CLOSED : 'trace closed', | ||
EXPERIMENT_OPENED: 'experiment opened', | ||
EXPERIMENT_CLOSED: 'experiment closed', | ||
EXPERIMENT_SELECTED: 'experiment selected', | ||
TOOLTIP_UPDATED: 'tooltip updated' | ||
}; | ||
|
||
export class SignalManager extends EventEmitter implements SignalManager { | ||
|
||
fireTooltipSignal(tooltip: { [key: string]: string; }): void { | ||
this.emit(Signals.TOOLTIP_UPDATED, {tooltip}); | ||
} | ||
|
||
} | ||
|
||
let instance: SignalManager = new SignalManager(); | ||
|
||
export const setSignalManagerInstance = (sm: SignalManager) => { | ||
instance = sm; | ||
}; | ||
|
||
export const signalManager = (): SignalManager => instance; |
Oops, something went wrong.