-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
208 additions
and
86 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,4 @@ src/_d/ | |
untitled.* | ||
Untitled.* | ||
examples/**/*.tar.gz | ||
examples/**/_pyinstrument*/ |
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
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,2 @@ | ||
export * from './json'; | ||
export * from './flamegraph'; |
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,42 @@ | ||
import { NAME, STYLE, VERSION, WIDGET_DEFAULTS } from '../tokens'; | ||
|
||
import { DOMWidgetModel, DOMWidgetView } from '@jupyter-widgets/base'; | ||
|
||
export class ProfileJSONModel extends DOMWidgetModel { | ||
static model_name = 'ProfileJSONModel'; | ||
static model_module = NAME; | ||
static model_module_version = VERSION; | ||
static view_name = 'ProfileJSONView'; | ||
static view_module = NAME; | ||
static view_module_version = VERSION; | ||
|
||
defaults() { | ||
return { | ||
...super.defaults, | ||
...WIDGET_DEFAULTS, | ||
value: null, | ||
_model_name: ProfileJSONModel.model_name, | ||
_view_name: ProfileJSONModel.view_name, | ||
}; | ||
} | ||
} | ||
|
||
export class ProfileJSONView extends DOMWidgetView { | ||
protected _pre: HTMLPreElement | null = null; | ||
|
||
initialize(parameters: any) { | ||
super.initialize(parameters); | ||
this.el.classList.add(STYLE.widgetFileView); | ||
this.update(); | ||
} | ||
|
||
update() { | ||
let { _pre } = this; | ||
if (_pre == null) { | ||
_pre = this._pre = document.createElement('pre'); | ||
this.el.appendChild(this._pre); | ||
} | ||
|
||
_pre.innerHTML = this.model.get('value') || 'None'; | ||
} | ||
} |
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
Oops, something went wrong.