Skip to content

Commit

Permalink
add mongodb datax reader support
Browse files Browse the repository at this point in the history
  • Loading branch information
baisui1981 committed Sep 13, 2023
1 parent 4806070 commit e8d5649
Show file tree
Hide file tree
Showing 8 changed files with 724 additions and 628 deletions.
218 changes: 109 additions & 109 deletions .idea/workspace.xml

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions src/base/datax.add.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,16 +162,16 @@ export class DataxAddComponent extends AppFormComponent implements AfterViewInit
/**=====================================================
* <<<<<<<<<for test
=======================================================*/
DataxAddStep2Component.getDataXReaderWriterEnum(this,new AddStep2ComponentCfg()).then((rwEnum: DataXReaderWriterEnum) => {
let dto = new DataxDTO();
dto.dataxPipeName = "mongo_mysql";
dto.processMeta = {readerRDBMS: true, explicitTable: true, writerRDBMS: true, writerSupportMultiTab: false};
// dto.readerDescriptor = rwEnum.readerDescs.find((r) => "OSS" === r.displayName);
// dto.writerDescriptor = rwEnum.writerDescs.find((r) => "Elasticsearch" === r.displayName);
dto.readerDescriptor = rwEnum.readerDescs.find((r) => "MongoDB" === r.displayName);
dto.writerDescriptor = rwEnum.writerDescs.find((r) => "MySQL" === r.displayName);
this.multiViewDAG.loadComponent(DataxAddStep4Component, dto);
});
// DataxAddStep2Component.getDataXReaderWriterEnum(this,new AddStep2ComponentCfg()).then((rwEnum: DataXReaderWriterEnum) => {
// let dto = new DataxDTO();
// dto.dataxPipeName = "mongo_mysql";
// dto.processMeta = {readerRDBMS: true, explicitTable: true, writerRDBMS: true, writerSupportMultiTab: false};
// // dto.readerDescriptor = rwEnum.readerDescs.find((r) => "OSS" === r.displayName);
// // dto.writerDescriptor = rwEnum.writerDescs.find((r) => "Elasticsearch" === r.displayName);
// dto.readerDescriptor = rwEnum.readerDescs.find((r) => "MongoDB" === r.displayName);
// dto.writerDescriptor = rwEnum.writerDescs.find((r) => "MySQL" === r.displayName);
// this.multiViewDAG.loadComponent(DataxAddStep4Component, dto);
// });
/**=====================================================
* for test end>>>>>>>>
=======================================================*/
Expand Down
285 changes: 168 additions & 117 deletions src/base/datax.add.step4.component.ts

Large diffs are not rendered by default.

62 changes: 43 additions & 19 deletions src/base/datax.add.step7.confirm.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,28 +104,52 @@ export enum ExecModel {
</ng-container>
<ng-container *ngIf=" dto.supportBatch">
<h3>DataX脚本文件</h3>
<ul class="item-block child-block script-block">
<li *ngFor="let f of genCfgFileList">
<button (click)="viewDataXCfg(f)" nz-button nzType="link" nzSize="large">
<i nz-icon nzType="file-text" nzTheme="outline"></i>{{f.fileName}}
</button>
</li>
<i style="color:#777777;font-size: 10px">生成时间:{{lastestGenFileTime | date : "yyyy/MM/dd HH:mm:ss"}}</i>
</ul>
<nz-page-header [nzGhost]="true">
<nz-page-header-title>DataX脚本</nz-page-header-title>
<nz-page-header-extra>
<nz-space>
<button *nzSpaceItem nz-button nzSize="small" (click)="reGenerate()">重新生成</button>
</nz-space>
</nz-page-header-extra>
<nz-page-header-content class="item-block child-block script-block">
<ul >
<li *ngFor="let f of genCfgFileList">
<button (click)="viewDataXCfg(f)" nz-button nzType="link" nzSize="large">
<i nz-icon nzType="file-text" nzTheme="outline"></i>{{f.fileName}}
</button>
</li>
<i style="color:#777777;font-size: 10px">生成时间:{{lastestGenFileTime | date : "yyyy/MM/dd HH:mm:ss"}}</i>
</ul>
</nz-page-header-content>
</nz-page-header>
</ng-container>
<ng-container *ngIf="createDDLFileList.length > 0">
<h3>Create Table DDL</h3>
<ul class="child-block item-block script-block">
<li *ngFor="let f of createDDLFileList">
<button (click)="viewCreateDDLFile(f)" nz-button nzType="link" nzSize="large"><i nz-icon
nzType="console-sql"
nzTheme="outline"></i>{{f}}
</button>
</li>
<i style="color:#777777;font-size: 10px">生成时间:{{lastestGenFileTime | date : "yyyy/MM/dd HH:mm:ss"}}</i>
</ul>
<nz-page-header [nzGhost]="true">
<nz-page-header-title>Table DDL Script</nz-page-header-title>
<nz-page-header-extra>
<nz-space>
<button *nzSpaceItem nz-button nzSize="small" (click)="reGenerateSqlDDL()">重新生成</button>
</nz-space>
</nz-page-header-extra>
<nz-page-header-content class="item-block child-block script-block">
<ul>
<li *ngFor="let f of createDDLFileList">
<button (click)="viewCreateDDLFile(f)" nz-button nzType="link" nzSize="large"><i nz-icon
nzType="console-sql"
nzTheme="outline"></i>{{f}}
</button>
</li>
<i style="color:#777777;font-size: 10px">生成时间:{{lastestGenFileTime | date : "yyyy/MM/dd HH:mm:ss"}}</i>
</ul>
</nz-page-header-content>
</nz-page-header>
</ng-container>
<h3>基本信息</h3>
<div class="item-block">
Expand Down
2 changes: 1 addition & 1 deletion src/common/pagination.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ export class TdContentDirective implements OnInit {
[nzSize]="this.tabSize"
[nzShowPagination]="showPagination" [nzLoading]="isSpinning" [(nzPageIndex)]="pager.page"
(nzPageIndexChange)="searchData()"
[nzFrontPagination]="false" [nzTotal]="pager.totalCount" [nzPageSize]="pager.pageSize">
[nzFrontPagination]="false" [nzTotal]="pager.totalCount" [nzPageSize]="pager.pageSize" >
<thead>
<tr>
<th *ngFor="let k of cls" tis-th [key-meta]='k' [nzCustomFilter]="k.searchable">{{k.title}}
Expand Down
Loading

0 comments on commit e8d5649

Please sign in to comment.