Skip to content

Commit

Permalink
CB-5020 feat: wait till domain available (#2567)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
4 people authored and DenisSinelnikov committed Apr 29, 2024
1 parent e40541a commit 1bc9aa7
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2024 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package io.cloudbeaver.server.graphql;

public class GraphQLConstants {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,32 @@
/*
* DBeaver - Universal Database Manager
* Copyright (C) 2010-2024 DBeaver Corp and others
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.cloudbeaver.server.servlets;

import com.google.gson.stream.JsonWriter;
import io.cloudbeaver.server.CBConstants;
import jakarta.servlet.ServletException;
import jakarta.servlet.annotation.WebServlet;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import org.eclipse.jetty.servlet.DefaultServlet;
import org.jkiss.dbeaver.Log;
import org.jkiss.dbeaver.model.data.json.JSONUtils;
import org.jkiss.dbeaver.utils.GeneralUtils;

import jakarta.servlet.ServletException;
import jakarta.servlet.annotation.WebServlet;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.LinkedHashMap;
import java.util.Map;
Expand All @@ -23,6 +39,7 @@ public class CBStatusServlet extends DefaultServlet {
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
response.setContentType(CBConstants.APPLICATION_JSON);
response.setHeader("Access-Control-Allow-Origin", "*");
Map<String, Object> infoMap = new LinkedHashMap<>();
infoMap.put("health", "ok");
infoMap.put("product.name", GeneralUtils.getProductName());
Expand Down
11 changes: 10 additions & 1 deletion webapp/packages/core-blocks/src/Containers/Group.m.css
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
margin: -8px 0;

& > .groupClose {
top: 2px;
right: 0px;
top: 8px;
}
}
}
Expand All @@ -48,6 +49,14 @@
right: 24px;
}
}
&.box.dense > .groupTitle {
padding: 8px;
margin: 0;

& > .groupClose {
right: 8px;
}
}

&.box,
&.box.dense,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
display: flex;
position: absolute;
right: 0;
top: 18px;
top: 24px;
margin-right: 0 !important;
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@ import style from './FormFieldDescription.m.css';
interface Props extends ILayoutSizeProps {
label?: string;
title?: string;
content?: React.ReactNode;
className?: string;
}

export const FormFieldDescription: React.FC<React.PropsWithChildren<Props>> = function FormFieldDescription({
label,
title,
content,
children,
className,
...rest
Expand All @@ -34,6 +36,7 @@ export const FormFieldDescription: React.FC<React.PropsWithChildren<Props>> = fu
return (
<Field title={title} className={className} {...rest} {...layoutProps}>
{label && <FieldLabel className={s(styles, { fieldLabel: true })}>{label}</FieldLabel>}
{content}
<FieldDescription className={s(styles, { fieldDescription: true })}>{children}</FieldDescription>
</Field>
);
Expand Down
4 changes: 4 additions & 0 deletions webapp/packages/core-utils/src/GlobalConstants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ export const GlobalConstants = {
return pathJoin(this.rootURI, 'api');
},

getHealthCheckUrl(host: string): string {
return `${host}/status`;
},

absoluteRootUrl(...parts: string[]): string {
return pathJoin(this.rootURI, ...parts);
},
Expand Down

0 comments on commit 1bc9aa7

Please sign in to comment.