Handle stringified json response and fix alignment issue (#12886)
This commit is contained in:
parent
0b4741f3ce
commit
a4d22b3d13
|
|
@ -240,7 +240,7 @@ export const responseTabComponent = (
|
|||
folding
|
||||
height={"100%"}
|
||||
input={{
|
||||
value: output ? JSON.stringify(output, null, 2) : "",
|
||||
value: isString(output) ? output : JSON.stringify(output, null, 2),
|
||||
}}
|
||||
isReadOnly
|
||||
/>
|
||||
|
|
@ -253,7 +253,7 @@ export const responseTabComponent = (
|
|||
folding
|
||||
height={"100%"}
|
||||
input={{
|
||||
value: output ? JSON.stringify(output, null, 2) : "",
|
||||
value: isString(output) ? output : JSON.stringify(output, null, 2),
|
||||
}}
|
||||
isRawView
|
||||
isReadOnly
|
||||
|
|
@ -390,7 +390,7 @@ function ApiResponseView(props: Props) {
|
|||
</NoResponseContainer>
|
||||
) : (
|
||||
<ResponseBodyContainer>
|
||||
{isString(response.body) && isHtml(response.body) && (
|
||||
{isString(response.body) && isHtml(response.body) ? (
|
||||
<ReadOnlyEditor
|
||||
folding
|
||||
height={"100%"}
|
||||
|
|
@ -399,11 +399,9 @@ function ApiResponseView(props: Props) {
|
|||
}}
|
||||
isReadOnly
|
||||
/>
|
||||
)}
|
||||
{!isString(response.body) &&
|
||||
responseTabs &&
|
||||
responseTabs.length > 0 &&
|
||||
selectedTabIndex !== -1 ? (
|
||||
) : responseTabs &&
|
||||
responseTabs.length > 0 &&
|
||||
selectedTabIndex !== -1 ? (
|
||||
<EntityBottomTabs
|
||||
defaultIndex={selectedTabIndex}
|
||||
onSelect={onResponseTabSelect}
|
||||
|
|
|
|||
|
|
@ -30,10 +30,12 @@ const EmptyDatasourceContainer = styled.div`
|
|||
`;
|
||||
|
||||
const DatasourceContainer = styled.div`
|
||||
.react-tabs__tab-list {
|
||||
&&&&&&&&&&& .react-tabs__tab-list {
|
||||
padding: 0 16px !important;
|
||||
border-bottom: none;
|
||||
border-left: 2px solid #e8e8e8;
|
||||
margin-left: 0px;
|
||||
margin-right: 0px;
|
||||
.cs-icon {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user