Skip to main content

Project

Defined in: js-api/src/entities/project.ts:22

Represents a project

Extends​

Constructors​

Constructor​

new Project(dart): Project

Defined in: js-api/src/entities/project.ts:23

Parameters​

ParameterType
dartany

Returns​

Project

Overrides​

Entity.constructor

Properties​

PropertyModifierTypeDescriptionInherited fromDefined in
dartpublicany-Entity.dartjs-api/src/entities/entity.ts:19
metapublicobjectProject metadata (metaParams) — user-facing key:value bag, e.g. demoPath.-js-api/src/entities/project.ts:34
optionspublicanyProject options as key-value pairs (a MapBag: indexed access plus the map methods; typed any so it can be cast to a package's own shape).-js-api/src/entities/project.ts:31

Accessors​

author​

Get Signature​

get author(): any

Defined in: js-api/src/entities/entity.ts:57

Who created entity *

Returns​

any

Inherited from​

Entity.author


children​

Get Signature​

get children(): Entity[]

Defined in: js-api/src/entities/project.ts:127

Entities owned by the project.

Returns​

Entity[]


createdOn​

Get Signature​

get createdOn(): Dayjs

Defined in: js-api/src/entities/entity.ts:48

Time when entity was created *

Returns​

Dayjs

Inherited from​

Entity.createdOn


description​

Get Signature​

get description(): string

Defined in: js-api/src/entities/project.ts:72

Project description

Returns​

string

Set Signature​

set description(s): void

Defined in: js-api/src/entities/project.ts:76

Parameters​
ParameterType
sstring
Returns​

void


entityType​

Get Signature​

get entityType(): string

Defined in: js-api/src/entities/entity.ts:64

Entity type name *

Returns​

string

Inherited from​

Entity.entityType


friendlyName​

Get Signature​

get friendlyName(): string

Defined in: js-api/src/entities/entity.ts:34

Entity friendly name

Returns​

string

Set Signature​

set friendlyName(x): void

Defined in: js-api/src/entities/entity.ts:35

Parameters​
ParameterType
xstring
Returns​

void

Inherited from​

Entity.friendlyName


id​

Get Signature​

get id(): string

Defined in: js-api/src/entities/entity.ts:27

Entity ID (GUID)

Returns​

string

Set Signature​

set id(x): void

Defined in: js-api/src/entities/entity.ts:28

Parameters​
ParameterType
xstring
Returns​

void

Inherited from​

Entity.id


isDashboard​

Get Signature​

get isDashboard(): boolean

Defined in: js-api/src/entities/project.ts:91

Whether the project is a dashboard.

Returns​

boolean


isDirty​

Get Signature​

get isDirty(): boolean

Defined in: js-api/src/entities/project.ts:81

Project changes flag

Returns​

boolean


isEmpty​

Get Signature​

get isEmpty(): boolean

Defined in: js-api/src/entities/project.ts:86

Project is empty flag

Returns​

boolean


isLocal​

Get Signature​

get isLocal(): string

Defined in: js-api/src/entities/project.ts:67

Whether the project exists only in this session.

Returns​

string


isOnServer​

Get Signature​

get isOnServer(): string

Defined in: js-api/src/entities/project.ts:62

Whether the project has been saved to the server.

Returns​

string


isPackage​

Get Signature​

get isPackage(): boolean

Defined in: js-api/src/entities/project.ts:96

Whether the project belongs to a package.

Returns​

boolean


isSpace​

Get Signature​

get isSpace(): boolean

Defined in: js-api/src/entities/project.ts:101

True for Spaces — hierarchical containers with their own storage. See grok.dapi.spaces.

Returns​

boolean


Get Signature​

get links(): Entity[]

Defined in: js-api/src/entities/project.ts:122

Entities linked to the project (shared, not owned).

Returns​

Entity[]


name​

Get Signature​

get name(): string

Defined in: js-api/src/entities/entity.ts:38

Entity short name

Returns​

string

Set Signature​

set name(x): void

Defined in: js-api/src/entities/entity.ts:39

Parameters​
ParameterType
xstring
Returns​

void

Inherited from​

Entity.name


nqName​

Get Signature​

get nqName(): string

Defined in: js-api/src/entities/entity.ts:42

Entity full-qualified name

Returns​

string

Inherited from​

Entity.nqName


path​

Get Signature​

get path(): string

Defined in: js-api/src/entities/project.ts:57

Entity path

Returns​

string

Overrides​

Entity.path


pictureUrl​

Get Signature​

get pictureUrl(): string

Defined in: js-api/src/entities/project.ts:53

URL of the project picture.

Returns​

string


updatedOn​

Get Signature​

get updatedOn(): Dayjs | null

Defined in: js-api/src/entities/entity.ts:51

Time when entity was updated *

Returns​

Dayjs | null

Inherited from​

Entity.updatedOn

Methods​

addChild()​

addChild(entity): void

Defined in: js-api/src/entities/project.ts:139

Adds an entity (or the table info of a DataFrame) as a child of the project.

Parameters​

ParameterType
entityEntity | DataFrame

Returns​

void


addLink(entity): void

Defined in: js-api/src/entities/project.ts:132

Links an entity (or the table info of a DataFrame) to the project.

Parameters​

ParameterType
entityEntity | DataFrame

Returns​

void


addTableView()​

addTableView(table): TableView

Defined in: js-api/src/entities/project.ts:156

Adds a table to this project and opens it as a view

Parameters​

ParameterType
tableDataFrame

Returns​

TableView


close()​

close(): void

Defined in: js-api/src/entities/project.ts:117

Closes the project: removes its tables and views from the workspace.

Returns​

void


getProperties()​

getProperties(): Promise<{[index: string]: any; }>

Defined in: js-api/src/entities/entity.ts:67

Gets entity properties

Returns​

Promise<{[index: string]: any; }>

Inherited from​

Entity.getProperties


hasTag()​

hasTag(tag): boolean

Defined in: js-api/src/entities/entity.ts:79

Parameters​

ParameterType
tagstring

Returns​

boolean

Inherited from​

Entity.hasTag


newId()​

newId(): void

Defined in: js-api/src/entities/entity.ts:31

Generates new id for this entity.

Returns​

void

Inherited from​

Entity.newId


open()​

open(options?): Promise<Project>

Defined in: js-api/src/entities/project.ts:111

Opens the project in workspace

Parameters​

ParameterType
options?ProjectOpenOptions

Returns​

Promise<Project>


removeChild()​

removeChild(entity): void

Defined in: js-api/src/entities/project.ts:151

Removes a child.

Parameters​

ParameterType
entityEntity

Returns​

void


removeLink(entity): void

Defined in: js-api/src/entities/project.ts:146

Removes a link.

Parameters​

ParameterType
entityEntity

Returns​

void


setProperties()​

setProperties(props): Promise<any>

Defined in: js-api/src/entities/entity.ts:72

Sets entity properties

Parameters​

ParameterType
props{[index: string]: any; }

Returns​

Promise<any>

Inherited from​

Entity.setProperties


tag()​

tag(tag): boolean

Defined in: js-api/src/entities/entity.ts:82

Adds a specified tag

Parameters​

ParameterType
tagstring

Returns​

boolean

Inherited from​

Entity.tag


toMarkup()​

toMarkup(): string

Defined in: js-api/src/entities/project.ts:106

The markup that references this project.

Returns​

string


toString()​

toString(): string

Defined in: js-api/src/entities/entity.ts:77

Returns a string representing the object

Returns​

string

Inherited from​

Entity.toString


unTag()​

unTag(tag): boolean

Defined in: js-api/src/entities/entity.ts:85

Removes a specified tag

Parameters​

ParameterType
tagstring

Returns​

boolean

Inherited from​

Entity.unTag


create()​

static create(): Project

Defined in: js-api/src/entities/project.ts:37

Creates a new, unsaved project.

Returns​

Project


showSaveDialog()​

static showSaveDialog(options): Promise<Project | null>

Defined in: js-api/src/entities/project.ts:41

Opens the "Save project" dialog for the given tables only (no workspace scan), with views[i] or layouts[i] as the layout. Pass project to re-publish into it.

Parameters​

ParameterType
options{ description?: string; layouts?: (string | null)[]; name?: string; project?: string | Project; tables: DataFrame[]; views?: (TableView | null)[]; }
options.description?string
options.layouts?(string | null)[]
options.name?string
options.project?string | Project
options.tablesDataFrame[]
options.views?(TableView | null)[]

Returns​

Promise<Project | null>