-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d0ffbbe
commit 6a7b396
Showing
7 changed files
with
94 additions
and
19 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
45 changes: 45 additions & 0 deletions
45
ui/src/turing/components/configuration/StandardEnsemblerConfigDetails.js
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,45 @@ | ||
import React from "react"; | ||
import { ConfigProvider, useConfig } from "../../../config"; | ||
import { EuiFlexGroup, EuiFlexItem } from "@elastic/eui"; | ||
import { ConfigSectionPanel } from "../../../components/config_section/ConfigSectionPanel"; | ||
import { AffectedRoutesTable } from "../form/standard_ensembler/AffectedRoutesTable"; | ||
import { RouteNamePathConfigGroup } from "./standard_ensembler_config/RouteNamePathConfigGroup"; | ||
import { ProjectContextProvider } from "../../../providers/project/context"; | ||
|
||
const StandardEnsemblerConfigDetailsComponent = ({ projectId, routes, routeNamePath }) => { | ||
const { appConfig: { routeNamePathPrefix } } = useConfig(); | ||
|
||
return ( | ||
<ConfigProvider> | ||
<EuiFlexGroup direction="row" wrap> | ||
<EuiFlexItem grow={1} className="euiFlexItem--smallPanel"> | ||
<ConfigSectionPanel title="Route Selection" className="experimentSummaryPanel"> | ||
<RouteNamePathConfigGroup routeNamePath={routeNamePath} /> | ||
</ConfigSectionPanel> | ||
</EuiFlexItem> | ||
|
||
<EuiFlexItem grow={2} className="euiFlexItem--smallPanel"> | ||
<ConfigSectionPanel title="Affected Routes" className="affectedRoutesPanel"> | ||
<AffectedRoutesTable | ||
projectId={projectId} | ||
routes={routes} | ||
treatmentConfigRouteNamePath={routeNamePath.slice(routeNamePathPrefix.length)} | ||
/> | ||
</ConfigSectionPanel> | ||
</EuiFlexItem> | ||
</EuiFlexGroup> | ||
</ConfigProvider> | ||
); | ||
}; | ||
|
||
const StandardEnsemblerConfigDetails = (props) => { | ||
return ( | ||
<ConfigProvider> | ||
<ProjectContextProvider> | ||
<StandardEnsemblerConfigDetailsComponent {...props} /> | ||
</ProjectContextProvider> | ||
</ConfigProvider> | ||
) | ||
}; | ||
|
||
export default StandardEnsemblerConfigDetails; |
29 changes: 29 additions & 0 deletions
29
ui/src/turing/components/configuration/standard_ensembler_config/RouteNamePathConfigGroup.js
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,29 @@ | ||
import React from "react"; | ||
|
||
import { | ||
EuiDescriptionList, | ||
EuiDescriptionListDescription, | ||
EuiDescriptionListTitle, | ||
EuiTextColor, | ||
EuiTitle, | ||
} from "@elastic/eui"; | ||
|
||
export const RouteNamePathConfigGroup = ({ routeNamePath }) => { | ||
return ( | ||
<EuiTitle size="xs"> | ||
<EuiTextColor> | ||
<EuiDescriptionList | ||
textStyle="reverse" | ||
type="responsiveColumn" | ||
compressed> | ||
<EuiDescriptionListTitle> | ||
Route Name Path | ||
</EuiDescriptionListTitle> | ||
<EuiDescriptionListDescription> | ||
{routeNamePath} | ||
</EuiDescriptionListDescription> | ||
</EuiDescriptionList> | ||
</EuiTextColor> | ||
</EuiTitle> | ||
); | ||
}; |
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