-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed PR reviews, added transformation store
- Loading branch information
1 parent
d741df1
commit 9edaa3e
Showing
10 changed files
with
13,613 additions
and
295 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { RStore } from "gena-app"; | ||
import { SERVER } from "../../env"; | ||
import {TransformationTable} from "./TransformationTable"; | ||
import axios from "axios"; | ||
|
||
|
||
export class TPayload { | ||
public type?: string; | ||
public mode?: string; | ||
public datapath?: string[]; | ||
public code?: string | undefined; | ||
public outputpath?: string[] | undefined; | ||
public tolerance?: number; | ||
public rows?: number; | ||
} | ||
|
||
const filterErrorMessage = (errorMessage: string) => { | ||
return errorMessage.split(':').splice(1).join(':').trim(); | ||
} | ||
|
||
export async function postData(id : number, payload: TPayload) : Promise<TransformationTable[]|undefined> { | ||
let resp: any = await axios | ||
.post(`${SERVER}/api/transform/1/transformations`, payload) | ||
.then((res) => res.data) | ||
.catch((error) => filterErrorMessage(error.response.data.message)); | ||
return resp; | ||
}; |
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,8 @@ | ||
import { Record } from "gena-app"; | ||
|
||
export interface TransformationTable extends Record<number> { | ||
path: number; | ||
value: string; | ||
ok: string; | ||
error: 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export * from "./TransformationStore"; | ||
export * from "./TransformationTable" | ||
|
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.