-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8170 from tinyspeck/sarabee-vtadmin-web-tablet-vars
[vtadmin-web] The hastiest Tablet view (+ experimental debug vars)
- Loading branch information
Showing
12 changed files
with
316 additions
and
15 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/** | ||
* Copyright 2021 The Vitess Authors. | ||
* | ||
* 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. | ||
*/ | ||
|
||
interface Props { | ||
className?: string; | ||
fqdn?: string | null | undefined; | ||
} | ||
|
||
export const ExternalTabletLink: React.FunctionComponent<Props> = ({ children, className, fqdn }) => { | ||
if (!fqdn) { | ||
return <span className={className}>{children}</span>; | ||
} | ||
|
||
return ( | ||
<a className={className} href={`//${fqdn}`} rel="noreferrer" target="_blank"> | ||
{children} | ||
</a> | ||
); | ||
}; |
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,37 @@ | ||
/** | ||
* Copyright 2021 The Vitess Authors. | ||
* | ||
* 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. | ||
*/ | ||
import React from 'react'; | ||
import { Link } from 'react-router-dom'; | ||
|
||
interface Props { | ||
alias: string | null | undefined; | ||
className?: string; | ||
clusterID: string | null | undefined; | ||
} | ||
|
||
export const TabletLink: React.FunctionComponent<Props> = ({ alias, children, className, clusterID }) => { | ||
if (!clusterID || !alias) { | ||
return <span className={className}>{children}</span>; | ||
} | ||
|
||
const to = { pathname: `/tablet/${clusterID}/${alias}` }; | ||
|
||
return ( | ||
<Link className={className} to={to}> | ||
{children} | ||
</Link> | ||
); | ||
}; |
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
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
54 changes: 54 additions & 0 deletions
54
web/vtadmin/src/components/routes/tablet/Tablet.module.scss
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,54 @@ | ||
/** | ||
* Copyright 2021 The Vitess Authors. | ||
* | ||
* 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. | ||
*/ | ||
.headingMeta { | ||
display: flex; | ||
} | ||
|
||
.headingMeta span { | ||
display: inline-block; | ||
line-height: 2; | ||
|
||
&::after { | ||
color: var(--colorScaffoldingHighlight); | ||
content: '/'; | ||
display: inline-block; | ||
margin: 0 1.2rem; | ||
} | ||
|
||
&:last-child::after { | ||
content: none; | ||
} | ||
} | ||
|
||
.placeholder { | ||
align-items: center; | ||
display: flex; | ||
flex-direction: column; | ||
font-size: var(--fontSizeLarge); | ||
justify-content: center; | ||
margin: 25vh auto; | ||
max-width: 720px; | ||
text-align: center; | ||
|
||
h1 { | ||
margin: 1.6rem 0; | ||
} | ||
} | ||
|
||
.errorEmoji { | ||
display: block; | ||
font-size: 5.6rem; | ||
} |
Oops, something went wrong.