|
|
@@ -42,95 +42,3 @@ export const notebookToContextJSON = notebook =>
|
|
|
type: notebook.type(),
|
|
|
uuid: notebook.uuid()
|
|
|
});
|
|
|
-
|
|
|
-export const notebookToJSON = notebook =>
|
|
|
- JSON.stringify({
|
|
|
- coordinatorUuid: notebook.coordinatorUuid(),
|
|
|
- description: notebook.description(),
|
|
|
- directoryUuid: notebook.directoryUuid(),
|
|
|
- executingAllIndex: notebook.executingAllIndex(),
|
|
|
- id: notebook.id(),
|
|
|
- isExecutingAll: notebook.isExecutingAll(),
|
|
|
- isHidingCode: notebook.isHidingCode(),
|
|
|
- isHistory: notebook.isHistory(),
|
|
|
- isManaged: notebook.isManaged(),
|
|
|
- isPresentationModeDefault: notebook.isPresentationModeDefault(),
|
|
|
- isSaved: notebook.isSaved(),
|
|
|
- name: notebook.name(),
|
|
|
- onSuccessUrl: notebook.onSuccessUrl(),
|
|
|
- parentSavedQueryUuid: notebook.parentSavedQueryUuid(),
|
|
|
- presentationSnippets: notebook.presentationSnippets(),
|
|
|
- pubSubUrl: notebook.pubSubUrl(),
|
|
|
- result: {}, // TODO: Moved to executor but backend requires it
|
|
|
- sessions: [], // TODO: Moved to executor but backend requires it
|
|
|
- snippets: notebook.snippets().map(snippet => ({
|
|
|
- aceCursorPosition: snippet.aceCursorPosition(),
|
|
|
- aceSize: snippet.aceSize(),
|
|
|
- associatedDocumentUuid: snippet.associatedDocumentUuid(),
|
|
|
- // chartLimit: snippet.chartLimit(), // TODO: Move somewhere else
|
|
|
- // chartMapHeat: snippet.chartMapHeat(), // TODO: Move somewhere else
|
|
|
- // chartMapLabel: snippet.chartMapLabel(), // TODO: Move somewhere else
|
|
|
- // chartMapType: snippet.chartMapType(), // TODO: Move somewhere else
|
|
|
- // chartScatterGroup: snippet.chartScatterGroup(), // TODO: Move somewhere else
|
|
|
- // chartScatterSize: snippet.chartScatterSize(), // TODO: Move somewhere else
|
|
|
- // chartScope: snippet.chartScope(), // TODO: Move somewhere else
|
|
|
- // chartSorting: snippet.chartSorting(), // TODO: Move somewhere else
|
|
|
- // chartTimelineType: snippet.chartTimelineType(), // TODO: Move somewhere else
|
|
|
- //
|
|
|
- // $.extend(
|
|
|
- // snippet,
|
|
|
- // snippet.chartType === 'lines' && {
|
|
|
- // // Retire line chart
|
|
|
- // chartType: 'bars',
|
|
|
- // chartTimelineType: 'line'
|
|
|
- // }
|
|
|
- // );
|
|
|
- //
|
|
|
- // chartType: snippet.chartType(), // TODO: Move somewhere else
|
|
|
- // chartX: snippet.chartX(), // TODO: Move somewhere else
|
|
|
- // chartXPivot: snippet.chartXPivot(), // TODO: Move somewhere else
|
|
|
- // chartYMulti: snippet.chartYMulti(), // TODO: Move somewhere else
|
|
|
- // chartYSingle: snippet.chartYSingle(), // TODO: Move somewhere else
|
|
|
- compute: snippet.compute(),
|
|
|
- currentQueryTab: snippet.currentQueryTab(),
|
|
|
- database: snippet.database(),
|
|
|
- id: snippet.id(),
|
|
|
- is_redacted: snippet.is_redacted(),
|
|
|
- //isResultSettingsVisible: snippet.isResultSettingsVisible(), // TODO: Move somewhere else
|
|
|
- lastAceSelectionRowOffset: snippet.lastAceSelectionRowOffset(),
|
|
|
- lastExecuted: snippet.lastExecuted(),
|
|
|
- name: snippet.name(),
|
|
|
- namespace: snippet.namespace(),
|
|
|
- pinnedContextTabs: snippet.pinnedContextTabs(),
|
|
|
- properties: komapping.toJS(snippet.properties), // TODO: Drop komapping
|
|
|
- // result: ...,
|
|
|
- settingsVisible: snippet.settingsVisible(),
|
|
|
- // schedulerViewModel: ?
|
|
|
- // showChart: snippet.showChart(), // TODO: Move somewhere else
|
|
|
- // showGrid: snippet.showGrid(), // TODO: Move somewhere else
|
|
|
- showLogs: snippet.showLogs(),
|
|
|
- statement_raw: snippet.statement_raw(),
|
|
|
- statementPath: snippet.statementPath(),
|
|
|
- statementType: snippet.statementType(),
|
|
|
- status: snippet.status(),
|
|
|
- type: snippet.type(),
|
|
|
- variables: snippet.variables().map(variable => ({
|
|
|
- meta: variable.meta && {
|
|
|
- options: variable.meta.options && variable.meta.options(), // TODO: Map?
|
|
|
- placeHolder: variable.meta.placeHolder && variable.meta.placeHolder(),
|
|
|
- type: variable.meta.type && variable.meta.type()
|
|
|
- },
|
|
|
- name: variable.name(),
|
|
|
- path: variable.path(),
|
|
|
- sample: variable.sample(),
|
|
|
- sampleUser: variable.sampleUser(),
|
|
|
- step: variable.step(),
|
|
|
- type: variable.type(),
|
|
|
- value: variable.value()
|
|
|
- })),
|
|
|
- wasBatchExecuted: snippet.wasBatchExecuted()
|
|
|
- })),
|
|
|
- type: notebook.type(),
|
|
|
- uuid: notebook.uuid(),
|
|
|
- viewSchedulerId: notebook.viewSchedulerId()
|
|
|
- });
|