-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
68429: [CRDB-8149] Add CES survey link r=Santamaura a=Santamaura The goal of this PR is to create a basic component that can open a link to the CES feedback survey. The current query parameters that are passed through are `clusterId` and `clusterVersion`. If there are any more query parameters that need to be included feel free to comment what they might be. The component will render empty (not able to open the survey) if for some reason we are unable to get the clusterId or clusterVersion values. Below are some screenshots showcasing the feedback survey link and what the url looks like when opened in a local dev environment: ![image](https://user-images.githubusercontent.com/17861665/128223481-2e6b5e6d-77de-4e3e-8a8e-125171f42500.png) ![image](https://user-images.githubusercontent.com/17861665/128223593-c0350d3e-0104-4e1a-ab73-4f4baa939554.png) This PR is in response to [this github issue](#66615) 68486: sql: fix accidental FK check skips r=RaduBerinde a=RaduBerinde This change fixes a bug in the insert fast path where we accidentally skip subsequent FK checks when a FK check can be skipped due to NULL value. Note that this bug does not manifest when optbuilder can determine that the check can be elided entirely; notably, this is always the case for non-prepared statements which insert a single row. Fixes #68307. Release note (bug fix): fixed missing foreign key checks in some cases when there are multiple checks and the inserted data contains a NULL for one of the checks. Co-authored-by: Santamaura <[email protected]> Co-authored-by: Radu Berinde <[email protected]>
- Loading branch information
Showing
7 changed files
with
101 additions
and
2 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
|
@@ -21,4 +21,5 @@ | |
order 1 | ||
|
||
.right-side-panel | ||
display flex | ||
order 2 |
29 changes: 29 additions & 0 deletions
29
pkg/ui/src/views/app/components/feedbackSurveyLink/feedbackSurveyLink.styl
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 @@ | ||
// Copyright 2019 The Cockroach Authors. | ||
// | ||
// Use of this software is governed by the Business Source License | ||
// included in the file licenses/BSL.txt. | ||
// | ||
// As of the Change Date specified in that file, in accordance with | ||
// the Business Source License, use of this software will be governed | ||
// by the Apache License, Version 2.0, included in the file | ||
// licenses/APL.txt. | ||
|
||
@require '~src/components/core/index.styl' | ||
|
||
.feedback-survey-link | ||
display flex | ||
flex-direction row | ||
font-family $font-family--base | ||
align-items center | ||
border-right 1px solid #C0C6D9 | ||
margin-right $spacing-smaller | ||
cursor pointer | ||
&__title | ||
margin-right $spacing-x-small | ||
.image-container | ||
width 32px | ||
height 32px | ||
display flex | ||
justify-content center | ||
align-items center | ||
border-radius 16px |
46 changes: 46 additions & 0 deletions
46
pkg/ui/src/views/app/components/feedbackSurveyLink/feedbackSurveyLink.tsx
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,46 @@ | ||
// Copyright 2021 The Cockroach Authors. | ||
// | ||
// Use of this software is governed by the Business Source License | ||
// included in the file licenses/BSL.txt. | ||
// | ||
// As of the Change Date specified in that file, in accordance with | ||
// the Business Source License, use of this software will be governed | ||
// by the Apache License, Version 2.0, included in the file | ||
// licenses/APL.txt. | ||
|
||
import React from "react"; | ||
import { useSelector } from "react-redux"; | ||
|
||
import externalLinkIcon from "!!raw-loader!assets/external-link.svg"; | ||
import { trustIcon } from "src/util/trust"; | ||
import { | ||
singleVersionSelector, | ||
clusterIdSelector, | ||
} from "../../../../redux/nodes"; | ||
import "./feedbackSurveyLink.styl"; | ||
|
||
const FeedBackSurveyLink = () => { | ||
const singleVersion = useSelector(singleVersionSelector); | ||
const clusterId = useSelector(clusterIdSelector); | ||
const feedbackLink = new URL("https://www.cockroachlabs.com/survey/"); | ||
feedbackLink.searchParams.append("clusterId", clusterId); | ||
feedbackLink.searchParams.append("clusterVersion", singleVersion); | ||
if (!clusterId || !singleVersion) { | ||
return <></>; | ||
} | ||
return ( | ||
<div | ||
className="feedback-survey-link" | ||
onClick={() => window.open(feedbackLink.toString())} | ||
> | ||
<div | ||
className="image-container" | ||
title="Share Feedback" | ||
dangerouslySetInnerHTML={trustIcon(externalLinkIcon)} | ||
/> | ||
<div className="feedback-survey-link__title">Share feedback</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default FeedBackSurveyLink; |
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