explain route target
@@ -30,6 +30,7 @@ import { Caption } from "widgets/Label";
import { Prompt } from "widgets/Prompt";
import { RenderHttpRouteConditions } from "./conditions";
import { RenderHttpRouteDestinations } from "./destinations";
+import { Targets } from "widgets/Targets";
const mapStateToProps = (state: RootState) => {
const form = ROUTE_FORM_ID;
@@ -242,6 +243,8 @@ class RouteFormRaw extends React.PureComponent<Props, State> {
}
return (
<Box p={2}>
+ <Grid container>
+ <Grid item xs={8}>
<Caption>You can add extra targets and assign weights to them.</Caption>
<Box mt={2} mr={2} mb={2}>
<Button
@@ -277,6 +280,18 @@ class RouteFormRaw extends React.PureComponent<Props, State> {
rerenderOnEveryChange
validate={ValidatorAtLeastOneHttpRouteDestination}
/>
+ </Grid>
+ <Grid item xs={4}>
+ <Targets
+ activeNamespaceName={"activeNamespaceName"}
+ destinations={Immutable.fromJS([
+ { host: "web-v1-production", weight: 1 },
+ { host: "web-v2-dark-theme", weight: 1 },
+ { host: "web-v2-ligh-theme", weight: 1 },
+ ])}
+ />
+ </Grid>
+ </Grid>
</Box>
);
};
