-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1427 from Oneirocom/jakobs/agent-deploy-ui
Jakobs/agent deploy UI
- Loading branch information
Showing
62 changed files
with
1,994 additions
and
826 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
18 |
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 |
---|---|---|
@@ -1,11 +1,15 @@ | ||
{ | ||
"typescript.tsserver.experimental.enableProjectDiagnostics": true, | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": true | ||
}, | ||
"editor.formatOnType": false, | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"[typescriptreact]": { | ||
"editor.defaultFormatter": "vscode.typescript-language-features" | ||
}, | ||
"source.fixAll.eslint": "explicit" | ||
}, | ||
"editor.formatOnType": false, | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"[typescriptreact]": { | ||
"editor.defaultFormatter": "vscode.typescript-language-features" | ||
}, | ||
"search.exclude": { | ||
"**/node_modules": true, | ||
"**/build": true | ||
} | ||
} |
51 changes: 51 additions & 0 deletions
51
apps/server/migrations/20231130232851_add-spellReleases-table.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,51 @@ | ||
import { Knex } from 'knex' | ||
|
||
export async function up(knex: Knex): Promise<void> { | ||
// Create 'spellReleases' table | ||
await knex.schema.createTable('spellReleases', function (table) { | ||
table.uuid('id').primary() | ||
table.string('description').nullable() | ||
table.uuid('agentId').notNullable() | ||
table.uuid('spellId').nullable() | ||
table.text('projectId').nullable() | ||
table.timestamp('createdAt').defaultTo(knex.fn.now()) | ||
table.foreign('agentId').references('id').inTable('agents') | ||
}) | ||
|
||
// Alter 'agents' table to include 'createdAt', 'updatedAt', and 'currentSpellReleaseId' fields | ||
await knex.schema.alterTable('agents', (table) => { | ||
table.timestamp('createdAt').defaultTo(knex.fn.now()) | ||
table.timestamp('updatedAt').defaultTo(knex.fn.now()) | ||
table.uuid('currentSpellReleaseId') | ||
table.foreign('currentSpellReleaseId').references('id').inTable('spellReleases') | ||
}) | ||
|
||
// Alter 'spells' table to include 'spellReleaseId' field | ||
await knex.schema.alterTable('spells', (table) => { | ||
table.uuid('spellReleaseId').nullable() | ||
table.foreign('spellReleaseId').references('id').inTable('spellReleases') | ||
}) | ||
} | ||
|
||
export async function down(knex: Knex): Promise<void> { | ||
// Remove foreign key constraints and columns from 'agents' table | ||
await knex.schema.table('agents', (table) => { | ||
table.dropForeign(['currentSpellReleaseId']) | ||
table.dropColumn('currentSpellReleaseId') | ||
if (knex.schema.hasColumn('agents', 'createdAt')) { | ||
table.dropColumn('createdAt') | ||
} | ||
if (knex.schema.hasColumn('agents', 'updatedAt')) { | ||
table.dropColumn('updatedAt') | ||
} | ||
}) | ||
|
||
// Remove foreign key constraints and column from 'spells' table | ||
await knex.schema.table('spells', (table) => { | ||
table.dropForeign(['spellReleaseId']) | ||
table.dropColumn('spellReleaseId') | ||
}) | ||
|
||
// Drop the 'spellReleases' table | ||
await knex.schema.dropTableIfExists('spellReleases') | ||
} |
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,39 @@ | ||
meta { | ||
name: Create Release | ||
type: http | ||
seq: 3 | ||
} | ||
|
||
post { | ||
url: {{baseUrl}}/agents/createRelease/d9289fe5-71ad-4472-bcbe-f692ecd7d733?projectId=clp77m6sc0003ffjuezrwphn7 | ||
body: json | ||
auth: none | ||
} | ||
|
||
query { | ||
projectId: clp77m6sc0003ffjuezrwphn7 | ||
} | ||
|
||
headers { | ||
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/119.0 | ||
Accept: */* | ||
Accept-Language: en-US,en;q=0.5 | ||
Accept-Encoding: gzip, deflate, br | ||
Referer: http://localhost:4200/ | ||
authorization: Bearer {{authToken}} | ||
Origin: http://localhost:4200 | ||
Connection: keep-alive | ||
Sec-Fetch-Dest: empty | ||
Sec-Fetch-Mode: cors | ||
Sec-Fetch-Site: same-site | ||
DNT: 1 | ||
Sec-GPC: 1 | ||
} | ||
|
||
body:json { | ||
{ | ||
"agentId": "d9289fe5-71ad-4472-bcbe-f692ecd7d733", | ||
"versionTag": "Test", | ||
"projectId": "clp77m6sc0003ffjuezrwphn7" | ||
} | ||
} |
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,31 @@ | ||
meta { | ||
name: Get Agents | ||
type: http | ||
seq: 3 | ||
} | ||
|
||
get { | ||
url: {{baseUrl}}/agents?projectId=clp77m6sc0003ffjuezrwphn7 | ||
body: none | ||
auth: none | ||
} | ||
|
||
query { | ||
projectId: clp77m6sc0003ffjuezrwphn7 | ||
} | ||
|
||
headers { | ||
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/119.0 | ||
Accept: */* | ||
Accept-Language: en-US,en;q=0.5 | ||
Accept-Encoding: gzip, deflate, br | ||
Referer: http://localhost:4200/ | ||
authorization: Bearer {{authToken}} | ||
Origin: http://localhost:4200 | ||
Connection: keep-alive | ||
Sec-Fetch-Dest: empty | ||
Sec-Fetch-Mode: cors | ||
Sec-Fetch-Site: same-site | ||
DNT: 1 | ||
Sec-GPC: 1 | ||
} |
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,31 @@ | ||
meta { | ||
name: Get One Agent | ||
type: http | ||
seq: 2 | ||
} | ||
|
||
get { | ||
url: {{baseUrl}}/agents/d9289fe5-71ad-4472-bcbe-f692ecd7d733?projectId=clp77m6sc0003ffjuezrwphn7 | ||
body: none | ||
auth: none | ||
} | ||
|
||
query { | ||
projectId: clp77m6sc0003ffjuezrwphn7 | ||
} | ||
|
||
headers { | ||
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/119.0 | ||
Accept: */* | ||
Accept-Language: en-US,en;q=0.5 | ||
Accept-Encoding: gzip, deflate, br | ||
Referer: http://localhost:4200/ | ||
authorization: Bearer eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2R0NNIn0..69iUxpF7UvHXdMGi.qd9RrgVcsmGGc8jBVVdiKe-aPRuH6S8yv2ng5O8oB2LLMTj9nlXlwAsmHDk86IeSKMp2u5JvYHuHixjRgx8D5NgUn3SgZFrxS8ovcWY0eAwxMauvp17g80i0IgyOEX5EfiCBXDrYkC11twOvhEn3nL0-cRN_c2mrZ_C_2s9bFxtwrw0_zyAImenE7mF9B541-QHGNhAg_1sLcD3O4xMOx7GkMOQa29YRlENjlsN-efRAUuSLcFOIikvv82V-DgtFGcxNjR9Td3nGWPdgJ_zzMQU42AbosEE3DlopyKGyS6y6q742A7nnPWf_EpxgGz5WIoi9zmTsMrX8a_-ERIypXS0rEovl6P8hkKgHI3ytaGng7bwVKVWdCub8N2IUZgfKfIZlG3N7h2opPUI2BwvfV-yluuFqEnLKSIomdpcR6mKuIWVgnAkc_zpPDEVMll5nl44ZiMi2roDhLjgEdUVqOoGQ7agY3RIrOvXulKeWnX3nswum883DNeQPN09Y547bVoV7Qn6zlUS2BqrwW6XhOM9BMIj08Ew52N53EdcVzHetKMGfOp5xK5BWEXZajrASosPoAo2UyopG1aQIHMygy2DNxvcmPghmlD2rZfqcQZWnt-3JRP6ecKeXmStxEiMgbpM_sSR332HzenbPMtMBgeQjio6mUrebg6OR3IjUCzTFb7Ob4AryyF-vUb6WAs92DpJckfnL8ZyUSFyvAH84Jhz3RbDluDeR6hKQd7d0Ie546n6TViI8nSYpFcBjnnymYVYLfORw_9_A_St1c6t8.wdgZei2lnX_enT4ibTJHOg | ||
Origin: http://localhost:4200 | ||
Connection: keep-alive | ||
Sec-Fetch-Dest: empty | ||
Sec-Fetch-Mode: cors | ||
Sec-Fetch-Site: same-site | ||
DNT: 1 | ||
Sec-GPC: 1 | ||
} |
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,5 @@ | ||
{ | ||
"version": "1", | ||
"name": "Magick", | ||
"type": "collection" | ||
} |
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,3 @@ | ||
vars { | ||
baseUrl: http://localhost:3030 | ||
} |
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,6 @@ | ||
vars { | ||
baseUrl: http://localhost:3030 | ||
} | ||
vars:secret [ | ||
authToken | ||
] |
Oops, something went wrong.