-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Action service, QAN service API changes * PMM-12710 Update actions endpoints * PMM-12710 fix lint issue * PMM-12710 Update settings endpoint * PMM-12710 Update api request body * PMM-12710 fix api paths * PMM-12710 fix actions according to updated response * PMM-12710 Update mysql api functions * PMM-12710 Update method names --------- Co-authored-by: Yash Sartanpara <[email protected]> Co-authored-by: Yash Sartanpara <[email protected]> Co-authored-by: Matej Kubinec <[email protected]>
- Loading branch information
1 parent
7d7d299
commit 50ca07e
Showing
19 changed files
with
61 additions
and
49 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
6 changes: 4 additions & 2 deletions
6
pmm-app/src/pmm-qan/panel/components/Details/database-models/mongodb/service.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 |
---|---|---|
@@ -1,7 +1,9 @@ | ||
import { apiRequestManagement } from 'shared/components/helpers/api'; | ||
import { apiRequest } from 'shared/components/helpers/api'; | ||
|
||
export default { | ||
getTraditionalExplainJSONMongo(body) { | ||
return apiRequestManagement.post<any, any>('/Actions/StartMongoDBExplain', body); | ||
const requestBody = { mongodb_explain: body }; | ||
|
||
return apiRequest.post<any, any>('/v1/actions:startServiceAction', requestBody); | ||
}, | ||
}; |
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
26 changes: 18 additions & 8 deletions
26
pmm-app/src/pmm-qan/panel/components/Details/database-models/mysql/service.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 |
---|---|---|
@@ -1,23 +1,33 @@ | ||
import { apiRequestManagement } from 'shared/components/helpers/api'; | ||
import { apiRequest } from 'shared/components/helpers/api'; | ||
|
||
export default { | ||
getShowCreateTableMySQL(body) { | ||
return apiRequestManagement.post<any, any>('/Actions/StartMySQLShowCreateTable', body); | ||
const requestBody = { mysql_show_create_table: body }; | ||
|
||
return apiRequest.post<any, any>('/v1/actions:startServiceAction', requestBody); | ||
}, | ||
|
||
getMysqlTableStatus(body) { | ||
return apiRequestManagement.post<any, any>('/Actions/StartMySQLShowTableStatus', body); | ||
const requestBody = { mysql_show_table_status: body }; | ||
|
||
return apiRequest.post<any, any>('/v1/actions:startServiceAction', requestBody); | ||
}, | ||
|
||
getMysqlIndex(body) { | ||
return apiRequestManagement.post<any, any>('/Actions/StartMySQLShowIndex', body); | ||
const requestBody = { mysql_show_index: body }; | ||
|
||
return apiRequest.post<any, any>('/v1/actions:startServiceAction', requestBody); | ||
}, | ||
|
||
getTraditionalExplainJSONMysql(body) { | ||
return apiRequestManagement.post<any, any>('/Actions/StartMySQLExplainJSON', body); | ||
getExplainJSON(body) { | ||
const requestBody = { mysql_explain_json: body }; | ||
|
||
return apiRequest.post<any, any>('/v1/actions:startServiceAction', requestBody); | ||
}, | ||
|
||
getTraditionalExplainMysql(body) { | ||
return apiRequestManagement.post<any, any>('/Actions/StartMySQLExplain', body); | ||
getExplain(body) { | ||
const requestBody = { mysql_explain: body }; | ||
|
||
return apiRequest.post<any, any>('/v1/actions:startServiceAction', requestBody); | ||
}, | ||
}; |
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
10 changes: 7 additions & 3 deletions
10
pmm-app/src/pmm-qan/panel/components/Details/database-models/postgresql/service.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 |
---|---|---|
@@ -1,10 +1,14 @@ | ||
import { apiRequestManagement } from 'shared/components/helpers/api'; | ||
import { apiRequest } from 'shared/components/helpers/api'; | ||
|
||
export default { | ||
getPostgreSQLIndex(body) { | ||
return apiRequestManagement.post<any, any>('/Actions/StartPostgreSQLShowIndex', body); | ||
const requestBody = { postgres_show_index: body }; | ||
|
||
return apiRequest.post<any, any>('/v1/actions:startServiceAction', requestBody); | ||
}, | ||
getShowCreateTablePostgreSQL(body) { | ||
return apiRequestManagement.post<any, any>('/Actions/StartPostgreSQLShowCreateTable', body); | ||
const requestBody = { postgres_show_create_table: body }; | ||
|
||
return apiRequest.post<any, any>('/v1/actions:startServiceAction', requestBody); | ||
}, | ||
}; |
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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import { apiRequestManagement } from '../helpers/api'; | ||
import { apiRequest } from '../helpers/api'; | ||
import { ActionRequest, ActionResponse } from './Actions.types'; | ||
|
||
export const ActionsService = { | ||
getActionResult(body: ActionRequest): Promise<ActionResponse> { | ||
return apiRequestManagement.post<any, any>('/Actions/Get', body); | ||
return apiRequest.get<any, any>(`/v1/actions/${body.action_id}`); | ||
}, | ||
}; |
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