Skip to content

Commit 17d1b91

Browse files
committed
Update db import/export
1 parent b4349c1 commit 17d1b91

3 files changed

Lines changed: 52 additions & 47 deletions

File tree

openapi.d.ts

Lines changed: 47 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -719,12 +719,12 @@ declare namespace Components {
719719
*/
720720
export type BanStatus = "ACTIVE" | "UNBANNED";
721721
/**
722-
* Body_db_import_import_db_import_post
722+
* Body_import_vyhub_import_vyhub_import_post
723723
*/
724-
export interface BodyDbImportImportDbImportPost {
724+
export interface BodyImportVyhubImportVyhubImportPost {
725725
/**
726726
* Dump
727-
* Archive produced by GET /import/db/export
727+
* Archive produced by GET /import/vyhub/export
728728
*/
729729
dump: string; // binary
730730
}
@@ -8224,32 +8224,11 @@ declare namespace Paths {
82248224
export type $200 = /* PropertyModelShortWithDescription */ Components.Schemas.PropertyModelShortWithDescription[];
82258225
}
82268226
}
8227-
namespace ImportDbExport {
8227+
namespace ImportExportVyhub {
82288228
namespace Responses {
82298229
export type $200 = any;
82308230
}
82318231
}
8232-
namespace ImportDbImport {
8233-
namespace Parameters {
8234-
/**
8235-
* Restart Process
8236-
*/
8237-
export type RestartProcess = boolean;
8238-
/**
8239-
* Skip Alembic Check
8240-
*/
8241-
export type SkipAlembicCheck = boolean;
8242-
}
8243-
export interface QueryParameters {
8244-
skip_alembic_check?: /* Skip Alembic Check */ Parameters.SkipAlembicCheck;
8245-
restart_process?: /* Restart Process */ Parameters.RestartProcess;
8246-
}
8247-
export type RequestBody = /* Body_db_import_import_db_import_post */ Components.Schemas.BodyDbImportImportDbImportPost;
8248-
namespace Responses {
8249-
export type $200 = /* DBImportResult */ Components.Schemas.DBImportResult;
8250-
export type $422 = /* HTTPValidationError */ Components.Schemas.HTTPValidationError;
8251-
}
8252-
}
82538232
namespace ImportGetGextensionPackets {
82548233
namespace Parameters {
82558234
/**
@@ -8284,6 +8263,32 @@ declare namespace Paths {
82848263
export type $422 = /* HTTPValidationError */ Components.Schemas.HTTPValidationError;
82858264
}
82868265
}
8266+
namespace ImportImportVyhub {
8267+
namespace Parameters {
8268+
/**
8269+
* Dry Run
8270+
*/
8271+
export type DryRun = boolean;
8272+
/**
8273+
* Restart Process
8274+
*/
8275+
export type RestartProcess = boolean;
8276+
/**
8277+
* Skip Alembic Check
8278+
*/
8279+
export type SkipAlembicCheck = boolean;
8280+
}
8281+
export interface QueryParameters {
8282+
skip_alembic_check?: /* Skip Alembic Check */ Parameters.SkipAlembicCheck;
8283+
dry_run?: /* Dry Run */ Parameters.DryRun;
8284+
restart_process?: /* Restart Process */ Parameters.RestartProcess;
8285+
}
8286+
export type RequestBody = /* Body_import_vyhub_import_vyhub_import_post */ Components.Schemas.BodyImportVyhubImportVyhubImportPost;
8287+
namespace Responses {
8288+
export type $200 = /* DBImportResult */ Components.Schemas.DBImportResult;
8289+
export type $422 = /* HTTPValidationError */ Components.Schemas.HTTPValidationError;
8290+
}
8291+
}
82878292
namespace LogGetLabels {
82888293
namespace Parameters {
82898294
/**
@@ -14132,25 +14137,25 @@ export interface OperationMethods {
1413214137
config?: AxiosRequestConfig
1413314138
): OperationResponse<Paths.ImportGetGextensionPackets.Responses.$200>
1413414139
/**
14135-
* import_dbExport - Db Export
14140+
* import_exportVyhub - Export Vyhub
1413614141
*
1413714142
* Export all data from the configured database schema as a gzipped tar archive (manifest.json + dump.sql). Admin only.
1413814143
*/
14139-
'import_dbExport'(
14144+
'import_exportVyhub'(
1414014145
parameters?: Parameters<UnknownParamsObject> | null,
1414114146
data?: any,
1414214147
config?: AxiosRequestConfig
14143-
): OperationResponse<Paths.ImportDbExport.Responses.$200>
14148+
): OperationResponse<Paths.ImportExportVyhub.Responses.$200>
1414414149
/**
14145-
* import_dbImport - Db Import
14150+
* import_importVyhub - Import Vyhub
1414614151
*
1414714152
* Replace all data in the configured database schema with the contents of the uploaded archive. Destructive. The target schema must already be migrated to the same alembic revision as the source dump. Admin only.
1414814153
*/
14149-
'import_dbImport'(
14150-
parameters?: Parameters<Paths.ImportDbImport.QueryParameters> | null,
14151-
data?: Paths.ImportDbImport.RequestBody,
14154+
'import_importVyhub'(
14155+
parameters?: Parameters<Paths.ImportImportVyhub.QueryParameters> | null,
14156+
data?: Paths.ImportImportVyhub.RequestBody,
1415214157
config?: AxiosRequestConfig
14153-
): OperationResponse<Paths.ImportDbImport.Responses.$200>
14158+
): OperationResponse<Paths.ImportImportVyhub.Responses.$200>
1415414159
/**
1415514160
* import_importGextension - Import Gextension
1415614161
*/
@@ -16893,29 +16898,29 @@ export interface PathsDictionary {
1689316898
config?: AxiosRequestConfig
1689416899
): OperationResponse<Paths.ImportGetGextensionPackets.Responses.$200>
1689516900
}
16896-
['/import/db/export']: {
16901+
['/import/vyhub/export']: {
1689716902
/**
16898-
* import_dbExport - Db Export
16903+
* import_exportVyhub - Export Vyhub
1689916904
*
1690016905
* Export all data from the configured database schema as a gzipped tar archive (manifest.json + dump.sql). Admin only.
1690116906
*/
1690216907
'get'(
1690316908
parameters?: Parameters<UnknownParamsObject> | null,
1690416909
data?: any,
1690516910
config?: AxiosRequestConfig
16906-
): OperationResponse<Paths.ImportDbExport.Responses.$200>
16911+
): OperationResponse<Paths.ImportExportVyhub.Responses.$200>
1690716912
}
16908-
['/import/db/import']: {
16913+
['/import/vyhub/import']: {
1690916914
/**
16910-
* import_dbImport - Db Import
16915+
* import_importVyhub - Import Vyhub
1691116916
*
1691216917
* Replace all data in the configured database schema with the contents of the uploaded archive. Destructive. The target schema must already be migrated to the same alembic revision as the source dump. Admin only.
1691316918
*/
1691416919
'post'(
16915-
parameters?: Parameters<Paths.ImportDbImport.QueryParameters> | null,
16916-
data?: Paths.ImportDbImport.RequestBody,
16920+
parameters?: Parameters<Paths.ImportImportVyhub.QueryParameters> | null,
16921+
data?: Paths.ImportImportVyhub.RequestBody,
1691716922
config?: AxiosRequestConfig
16918-
): OperationResponse<Paths.ImportDbImport.Responses.$200>
16923+
): OperationResponse<Paths.ImportImportVyhub.Responses.$200>
1691916924
}
1692016925
['/import/gextension']: {
1692116926
/**
@@ -17111,7 +17116,7 @@ export type BanModelReduced = Components.Schemas.BanModelReduced;
1711117116
export type BanModelShort = Components.Schemas.BanModelShort;
1711217117
export type BanProtestModelExtraShort = Components.Schemas.BanProtestModelExtraShort;
1711317118
export type BanStatus = Components.Schemas.BanStatus;
17114-
export type Body_db_import_import_db_import_post = Components.Schemas.BodyDbImportImportDbImportPost;
17119+
export type Body_import_vyhub_import_vyhub_import_post = Components.Schemas.BodyImportVyhubImportVyhubImportPost;
1711517120
export type Body_start_checkout_shop_cart_checkout_post = Components.Schemas.BodyStartCheckoutShopCartCheckoutPost;
1711617121
export type Body_start_payment_shop_checkout__post = Components.Schemas.BodyStartPaymentShopCheckoutPost;
1711717122
export type Body_upload_image_general_image_put = Components.Schemas.BodyUploadImageGeneralImagePut;

src/components/SettingComponents/ImportSettingsView.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@
250250
type="success"
251251
variant="tonal"
252252
>
253-
<div>Database import finished successfully.</div>
253+
<div>VyHub import finished successfully.</div>
254254
<div>The instance is being restarted now. This may take a short while.</div>
255255
<div>Source schema: {{ dbImportResult.source_schema }}</div>
256256
<div>Target schema: {{ dbImportResult.target_schema }}</div>
@@ -328,7 +328,7 @@ export default {
328328
methods: {
329329
getSystemLabel(item) {
330330
if (item === 'Database') {
331-
return this.$t('_import.database.title');
331+
return 'VyHub';
332332
}
333333
return item;
334334
},
@@ -349,7 +349,7 @@ export default {
349349
async exportDatabase() {
350350
this.dbExportLoading = true;
351351
try {
352-
const rsp = await (await openapi).import_dbExport(
352+
const rsp = await (await openapi).import_exportVyhub(
353353
null,
354354
null,
355355
{ responseType: 'blob' },
@@ -391,7 +391,7 @@ export default {
391391
formData.append('dump', this.dbDumpFile);
392392
393393
try {
394-
const rsp = await (await openapi).import_dbImport(
394+
const rsp = await (await openapi).import_importVyhub(
395395
{
396396
skip_alembic_check: false,
397397
restart_process: true,

src/lang

0 commit comments

Comments
 (0)