Skip to content

Commit 1bc9aa7

Browse files
Wrouddariamarutkinakseniaguzeevayagudin10
authored andcommitted
CB-5020 feat: wait till domain available (#2567)
* CB-5020 feat: wait till domain available * CB-5020 fix: group styles * CB-5020 add header to status endpoint --------- Co-authored-by: Daria Marutkina <[email protected]> Co-authored-by: kseniaguzeeva <[email protected]> Co-authored-by: Ainur <[email protected]>
1 parent e40541a commit 1bc9aa7

File tree

6 files changed

+56
-6
lines changed

6 files changed

+56
-6
lines changed

server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/server/graphql/GraphQLConstants.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
/*
2+
* DBeaver - Universal Database Manager
3+
* Copyright (C) 2010-2024 DBeaver Corp and others
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
118
package io.cloudbeaver.server.graphql;
219

320
public class GraphQLConstants {

server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/server/servlets/CBStatusServlet.java

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,32 @@
1+
/*
2+
* DBeaver - Universal Database Manager
3+
* Copyright (C) 2010-2024 DBeaver Corp and others
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
117
package io.cloudbeaver.server.servlets;
218

319
import com.google.gson.stream.JsonWriter;
420
import io.cloudbeaver.server.CBConstants;
21+
import jakarta.servlet.ServletException;
22+
import jakarta.servlet.annotation.WebServlet;
23+
import jakarta.servlet.http.HttpServletRequest;
24+
import jakarta.servlet.http.HttpServletResponse;
525
import org.eclipse.jetty.servlet.DefaultServlet;
626
import org.jkiss.dbeaver.Log;
727
import org.jkiss.dbeaver.model.data.json.JSONUtils;
828
import org.jkiss.dbeaver.utils.GeneralUtils;
929

10-
import jakarta.servlet.ServletException;
11-
import jakarta.servlet.annotation.WebServlet;
12-
import jakarta.servlet.http.HttpServletRequest;
13-
import jakarta.servlet.http.HttpServletResponse;
1430
import java.io.IOException;
1531
import java.util.LinkedHashMap;
1632
import java.util.Map;
@@ -23,6 +39,7 @@ public class CBStatusServlet extends DefaultServlet {
2339
@Override
2440
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
2541
response.setContentType(CBConstants.APPLICATION_JSON);
42+
response.setHeader("Access-Control-Allow-Origin", "*");
2643
Map<String, Object> infoMap = new LinkedHashMap<>();
2744
infoMap.put("health", "ok");
2845
infoMap.put("product.name", GeneralUtils.getProductName());

webapp/packages/core-blocks/src/Containers/Group.m.css

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
3131
margin: -8px 0;
3232

3333
& > .groupClose {
34-
top: 2px;
34+
right: 0px;
35+
top: 8px;
3536
}
3637
}
3738
}
@@ -48,6 +49,14 @@
4849
right: 24px;
4950
}
5051
}
52+
&.box.dense > .groupTitle {
53+
padding: 8px;
54+
margin: 0;
55+
56+
& > .groupClose {
57+
right: 8px;
58+
}
59+
}
5160

5261
&.box,
5362
&.box.dense,

webapp/packages/core-blocks/src/Containers/GroupClose.m.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@
1010
display: flex;
1111
position: absolute;
1212
right: 0;
13-
top: 18px;
13+
top: 24px;
1414
margin-right: 0 !important;
1515
}

webapp/packages/core-blocks/src/FormControls/FormFieldDescription.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,14 @@ import style from './FormFieldDescription.m.css';
1717
interface Props extends ILayoutSizeProps {
1818
label?: string;
1919
title?: string;
20+
content?: React.ReactNode;
2021
className?: string;
2122
}
2223

2324
export const FormFieldDescription: React.FC<React.PropsWithChildren<Props>> = function FormFieldDescription({
2425
label,
2526
title,
27+
content,
2628
children,
2729
className,
2830
...rest
@@ -34,6 +36,7 @@ export const FormFieldDescription: React.FC<React.PropsWithChildren<Props>> = fu
3436
return (
3537
<Field title={title} className={className} {...rest} {...layoutProps}>
3638
{label && <FieldLabel className={s(styles, { fieldLabel: true })}>{label}</FieldLabel>}
39+
{content}
3740
<FieldDescription className={s(styles, { fieldDescription: true })}>{children}</FieldDescription>
3841
</Field>
3942
);

webapp/packages/core-utils/src/GlobalConstants.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ export const GlobalConstants = {
5252
return pathJoin(this.rootURI, 'api');
5353
},
5454

55+
getHealthCheckUrl(host: string): string {
56+
return `${host}/status`;
57+
},
58+
5559
absoluteRootUrl(...parts: string[]): string {
5660
return pathJoin(this.rootURI, ...parts);
5761
},

0 commit comments

Comments
 (0)