You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ma...@apache.org on 2023/01/11 03:33:34 UTC
[camel-karavan] 01/03: Align Create buttons
This is an automated email from the ASF dual-hosted git repository.
marat pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-karavan.git
commit 152c11fefc4d587713fab7d8a0903227e13bf9d4
Author: Marat Gubaidullin <ma...@gmail.com>
AuthorDate: Tue Jan 10 22:23:32 2023 -0500
Align Create buttons
---
karavan-designer/src/designer/beans/BeansDesigner.tsx | 2 +-
karavan-designer/src/designer/rest/RestDesigner.tsx | 16 ++++++++--------
karavan-designer/src/designer/route/RouteDesigner.tsx | 6 ++----
3 files changed, 11 insertions(+), 13 deletions(-)
diff --git a/karavan-designer/src/designer/beans/BeansDesigner.tsx b/karavan-designer/src/designer/beans/BeansDesigner.tsx
index d48ea68..037df83 100644
--- a/karavan-designer/src/designer/beans/BeansDesigner.tsx
+++ b/karavan-designer/src/designer/beans/BeansDesigner.tsx
@@ -148,7 +148,7 @@ export class BeansDesigner extends React.Component<Props, State> {
variant={beans?.length === 0 ? "primary" : "secondary"}
data-click="ADD_REST"
icon={<PlusIcon/>}
- onClick={e => this.createBean()}>Create new bean
+ onClick={e => this.createBean()}>Create bean
</Button>
</div>
</div>
diff --git a/karavan-designer/src/designer/rest/RestDesigner.tsx b/karavan-designer/src/designer/rest/RestDesigner.tsx
index 13fd96a..f91c512 100644
--- a/karavan-designer/src/designer/rest/RestDesigner.tsx
+++ b/karavan-designer/src/designer/rest/RestDesigner.tsx
@@ -263,20 +263,20 @@ export class RestDesigner extends React.Component<Props, State> {
{config && this.getRestConfigurationCard(config)}
{data && this.getRestCards(data)}
<div className="add-rest">
+ <Button
+ variant={data?.length === 0 ? "primary" : "secondary"}
+ data-click="ADD_REST"
+ icon={<PlusIcon/>}
+ onClick={e => this.createRest()}>Create service
+ </Button>
{config === undefined &&
<Button
- variant="primary"
+ variant="secondary"
data-click="ADD_REST_REST_CONFIG"
icon={<PlusIcon/>}
- onClick={e => this.createRestConfiguration()}>Create REST Configuration
+ onClick={e => this.createRestConfiguration()}>Create configuration
</Button>
}
- <Button
- variant={data?.length === 0 ? "primary" : "secondary"}
- data-click="ADD_REST"
- icon={<PlusIcon/>}
- onClick={e => this.createRest()}>Create REST Service
- </Button>
</div>
</div>
</div>
diff --git a/karavan-designer/src/designer/route/RouteDesigner.tsx b/karavan-designer/src/designer/route/RouteDesigner.tsx
index d8495d8..949295e 100644
--- a/karavan-designer/src/designer/route/RouteDesigner.tsx
+++ b/karavan-designer/src/designer/route/RouteDesigner.tsx
@@ -259,9 +259,7 @@ export class RouteDesigner extends React.Component<Props, State> {
addStep = (step: CamelElement, parentId: string, position?: number | undefined) => {
const i = CamelDefinitionApiExt.addStepToIntegration(this.state.integration, step, parentId, position);
- console.log(i)
const clone = CamelUtil.cloneIntegration(i);
- console.log(clone)
this.setState({
integration: clone,
key: Math.random().toString(),
@@ -412,12 +410,12 @@ export class RouteDesigner extends React.Component<Props, State> {
<Button
variant={routes.length === 0 ? "primary" : "secondary"}
icon={<PlusIcon/>}
- onClick={e => this.openSelector(undefined, undefined)}>Create new route
+ onClick={e => this.openSelector(undefined, undefined)}>Create route
</Button>
<Button
variant="secondary"
icon={<PlusIcon/>}
- onClick={e => this.createRouteConfiguration()}>Create new configuration
+ onClick={e => this.createRouteConfiguration()}>Create configuration
</Button>
</div>
</div>