mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) add a python3 button
Summary: This adds a dropdown to the document settings model in staging/dev to set the python engine to Python2 or Python3. The setting is saved in `_grist_DocInfo.documentSettings.engine`. Test Plan: tested manually for now - separate diff needed to add runsc to jenkins setup and make this testable Reviewers: dsagal, alexmojaki Reviewed By: alexmojaki Differential Revision: https://phab.getgrist.com/D3014
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
* On failure, the result is cleared, so that subsequent calls attempt the creation again.
|
||||
*
|
||||
* Usage:
|
||||
* this._obj = AsyncCreate<MyObject>(asyncCreateFunc);
|
||||
* this._obj = new AsyncCreate<MyObject>(asyncCreateFunc);
|
||||
* obj = await this._obj.get(); // calls asyncCreateFunc
|
||||
* obj = await this._obj.get(); // uses cached object if asyncCreateFunc succeeded, else calls it again.
|
||||
*
|
||||
|
||||
@@ -1,4 +1,11 @@
|
||||
export interface DocumentSettings {
|
||||
locale: string;
|
||||
currency?: string;
|
||||
engine?: EngineCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* The back-end will for now support at most two engines, a pynbox-backed python2 and
|
||||
* a gvisor-backed python3.
|
||||
*/
|
||||
export type EngineCode = 'python2' | 'python3';
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import {BillingPage, BillingSubPage, BillingTask} from 'app/common/BillingAPI';
|
||||
import {OpenDocMode} from 'app/common/DocListAPI';
|
||||
import {EngineCode} from 'app/common/DocumentSettings';
|
||||
import {encodeQueryParams, isAffirmative} from 'app/common/gutil';
|
||||
import {localhostRegex} from 'app/common/LoginState';
|
||||
import {LocalPlugin} from 'app/common/plugin';
|
||||
@@ -426,6 +427,10 @@ export interface GristLoadConfig {
|
||||
// If set, enable anonymous sharing UI elements.
|
||||
supportAnon?: boolean;
|
||||
|
||||
// If set, allow selection of the specified engines.
|
||||
// TODO: move this list to a separate endpoint.
|
||||
supportEngines?: EngineCode[];
|
||||
|
||||
// Max upload allowed for imports (except .grist files), in bytes; 0 or omitted for unlimited.
|
||||
maxUploadSizeImport?: number;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user