-
Notifications
You must be signed in to change notification settings - Fork 8.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: add variables db models and migrations * feat: variables api endpoints * feat: add $variables to expressions * test: fix ActiveWorkflowRunner tests failing * test: a different fix for the tests broken by $variables * feat: variables licensing * fix: could create one extra variable than licensed for * feat: Add Variables UI page and $vars global property (#5750) * feat: add support for row slot to datatable * feat: add variables create, read, update, delete * feat: add vars autocomplete * chore: remove alert * feat: add variables autocomplete for code and expressions * feat: add tests for variable components * feat: add variables search and sort * test: update tests for variables view * chore: fix test and linting issue * refactor: review changes * feat: add variable creation telemetry * fix: Improve variables listing and disabled case, fix resource sorting (no-changelog) (#5903) * fix: Improve variables disabled experience and fix sorting * fix: update action box margin * test: update tests for variables row and datatable * fix: Add ee controller to base controller * fix: variables.ee routes not being added * feat: add variables validation * fix: fix vue-fragment bug that breaks everything * chore: Update lock * feat: Add variables input validation and permissions (no-changelog) (#5910) * feat: add input validation * feat: handle variables view for non-instance-owner users * test: update variables tests * fix: fix data-testid pattern * feat: improve overflow styles * test: fix variables row snapshot * feat: update sorting to take newly created variables into account * fix: fix list layout overflow * fix: fix adding variables on page other than 1. fix validation * feat: add docs link * fix: fix default displayName function for resource-list-layout * feat: improve vars expressions ux, cm-tooltip * test: fix datatable test * feat: add MATCH_REGEX validation rule * fix: overhaul how datatable pagination selector works * feat: update completer description * fix: conditionally update usage syntax based on key validation * test: update datatable snapshot * fix: fix variables-row button margins * fix: fix pagination overflow * test: Fix broken test * test: Update snapshot * fix: Remove duplicate declaration * feat: add custom variables icon --------- Co-authored-by: Alex Grozav <[email protected]> Co-authored-by: Omar Ajoue <[email protected]>
- Loading branch information
1 parent
1555387
commit 1bb9871
Showing
94 changed files
with
2,925 additions
and
200 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
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,16 @@ | ||
import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm'; | ||
|
||
@Entity() | ||
export class Variables { | ||
@PrimaryGeneratedColumn() | ||
id: number; | ||
|
||
@Column('text') | ||
key: string; | ||
|
||
@Column('text', { default: 'string' }) | ||
type: string; | ||
|
||
@Column('text') | ||
value: string; | ||
} |
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
33 changes: 33 additions & 0 deletions
33
packages/cli/src/databases/migrations/mysqldb/1677501636753-CreateVariables.ts
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,33 @@ | ||
import { MigrationInterface, QueryRunner } from 'typeorm'; | ||
import { logMigrationEnd, logMigrationStart, getTablePrefix } from '@db/utils/migrationHelpers'; | ||
import config from '@/config'; | ||
|
||
export class CreateVariables1677501636753 implements MigrationInterface { | ||
name = 'CreateVariables1677501636753'; | ||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
logMigrationStart(this.name); | ||
const tablePrefix = getTablePrefix(); | ||
|
||
await queryRunner.query(` | ||
CREATE TABLE ${tablePrefix}variables ( | ||
id int(11) auto_increment NOT NULL PRIMARY KEY, | ||
\`key\` VARCHAR(50) NOT NULL, | ||
\`type\` VARCHAR(50) DEFAULT 'string' NOT NULL, | ||
value VARCHAR(255) NULL, | ||
UNIQUE (\`key\`) | ||
) | ||
ENGINE=InnoDB; | ||
`); | ||
|
||
logMigrationEnd(this.name); | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
logMigrationStart(this.name); | ||
const tablePrefix = getTablePrefix(); | ||
|
||
await queryRunner.query(`DROP TABLE ${tablePrefix}variables;`); | ||
|
||
logMigrationEnd(this.name); | ||
} | ||
} |
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
32 changes: 32 additions & 0 deletions
32
packages/cli/src/databases/migrations/postgresdb/1677501636754-CreateVariables.ts
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 { MigrationInterface, QueryRunner } from 'typeorm'; | ||
import { logMigrationEnd, logMigrationStart, getTablePrefix } from '@db/utils/migrationHelpers'; | ||
import config from '@/config'; | ||
|
||
export class CreateVariables1677501636754 implements MigrationInterface { | ||
name = 'CreateVariables1677501636754'; | ||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
logMigrationStart(this.name); | ||
const tablePrefix = getTablePrefix(); | ||
|
||
await queryRunner.query(` | ||
CREATE TABLE public.variables ( | ||
id serial4 NOT NULL PRIMARY KEY, | ||
"key" varchar(50) NOT NULL, | ||
"type" varchar(50) NOT NULL DEFAULT 'string', | ||
value varchar(255) NULL, | ||
UNIQUE ("key") | ||
); | ||
`); | ||
|
||
logMigrationEnd(this.name); | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
logMigrationStart(this.name); | ||
const tablePrefix = getTablePrefix(); | ||
|
||
await queryRunner.query(`DROP TABLE ${tablePrefix}variables;`); | ||
|
||
logMigrationEnd(this.name); | ||
} | ||
} |
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
32 changes: 32 additions & 0 deletions
32
packages/cli/src/databases/migrations/sqlite/1677501636752-CreateVariables.ts
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 { MigrationInterface, QueryRunner } from 'typeorm'; | ||
import { logMigrationEnd, logMigrationStart, getTablePrefix } from '@db/utils/migrationHelpers'; | ||
import config from '@/config'; | ||
|
||
export class CreateVariables1677501636752 implements MigrationInterface { | ||
name = 'CreateVariables1677501636752'; | ||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
logMigrationStart(this.name); | ||
const tablePrefix = getTablePrefix(); | ||
|
||
await queryRunner.query(` | ||
CREATE TABLE ${tablePrefix}variables ( | ||
id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, | ||
"key" TEXT NOT NULL, | ||
"type" TEXT NOT NULL DEFAULT ('string'), | ||
value TEXT, | ||
UNIQUE("key") | ||
); | ||
`); | ||
|
||
logMigrationEnd(this.name); | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
logMigrationStart(this.name); | ||
const tablePrefix = getTablePrefix(); | ||
|
||
await queryRunner.query(`DROP TABLE ${tablePrefix}variables;`); | ||
|
||
logMigrationEnd(this.name); | ||
} | ||
} |
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.