Skip to content

Commit

Permalink
Safari fixes (gravitational#192)
Browse files Browse the repository at this point in the history
* Safari fixes
  • Loading branch information
alex-kovoy authored Nov 12, 2020
1 parent 161d678 commit d6ad36c
Show file tree
Hide file tree
Showing 11 changed files with 42 additions and 40 deletions.
4 changes: 2 additions & 2 deletions web/packages/teleport/src/Audit/Audit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ export function Audit(props: ReturnType<typeof useAuditEvents>) {
onChange={setRange}
/>
</FeatureHeader>
<Flex mb={4} alignItems="center" justifyContent="flex-start">
<InputSearch height="30px" mr="3" onChange={setSearchValue} />
<Flex mb={4} alignItems="center" flex="0 0 auto" justifyContent="flex-start">
<InputSearch mr="3" onChange={setSearchValue} />
</Flex>
{overflow && (
<Danger>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ exports[`loaded 1`] = `
.c6 {
box-sizing: border-box;
margin-bottom: 24px;
flex: 0 0 auto;
display: flex;
align-items: center;
justify-content: flex-start;
Expand Down Expand Up @@ -377,7 +378,6 @@ exports[`loaded 1`] = `
padding-left: 16px;
padding-right: 16px;
color: rgba(255,255,255,0.87);
height: 30px;
}
.c7:hover {
Expand Down Expand Up @@ -413,7 +413,7 @@ exports[`loaded 1`] = `
width="auto"
>
<span>
Today
7 days
<span
class="c4 c5 icon icon-caret-down "
color="text.primary"
Expand All @@ -428,7 +428,6 @@ exports[`loaded 1`] = `
<input
class="c7"
color="text.primary"
height="30px"
placeholder="SEARCH..."
value=""
/>
Expand Down Expand Up @@ -526,12 +525,12 @@ exports[`loaded 1`] = `
<td
style="word-break: break-word;"
>
User [alex] made a request to kubernetes cluster [clusterOne]
User [alex] made a request to kubernetes cluster [gke_teleport-a]
</td>
<td
style="min-width: 120px;"
>
2020-10-30 17:28:14
2020-11-12 20:35:44
</td>
<td
align="right"
Expand Down Expand Up @@ -1919,6 +1918,7 @@ exports[`overflow 1`] = `
.c6 {
box-sizing: border-box;
margin-bottom: 24px;
flex: 0 0 auto;
display: flex;
align-items: center;
justify-content: flex-start;
Expand Down Expand Up @@ -2103,7 +2103,6 @@ exports[`overflow 1`] = `
padding-left: 16px;
padding-right: 16px;
color: rgba(255,255,255,0.87);
height: 30px;
}
.c7:hover {
Expand Down Expand Up @@ -2139,7 +2138,7 @@ exports[`overflow 1`] = `
width="auto"
>
<span>
Today
7 days
<span
class="c4 c5 icon icon-caret-down "
color="text.primary"
Expand All @@ -2154,7 +2153,6 @@ exports[`overflow 1`] = `
<input
class="c7"
color="text.primary"
height="30px"
placeholder="SEARCH..."
value=""
/>
Expand Down
23 changes: 16 additions & 7 deletions web/packages/teleport/src/Audit/fixtures/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -433,16 +433,25 @@ export const events = [
user: 'alex',
},
{
'addr.local': '127.0.0.1:3027',
'addr.remote': '[::1]:43026',
code: 'T3009I',
kubernetes_cluster: 'clusterOne',
ei: 0,
'addr.local': '172.31.28.130:3022',
'addr.remote': '151.181.228.114:51752',
event: 'exec',
event: 'kube.request',
kubernetes_cluster: 'gke_teleport-a',
login: 'awly',
namespace: 'default',
sid: '8d57a9d5-3848-5ce2-a326-85eb4a6d2eed',
time: '2020-10-30T17:28:14.705Z',
uid: '8ea5be3d-07b1-4308-8e0d-2d2ec57cbb20',
proto: 'kube',
request_path: '/api/v1/namespaces/teletest/pods/test-pod',
resource_api_group: 'core/v1',
resource_kind: 'pods',
resource_name: 'test-pod',
resource_namespace: 'teletest',
response_code: 200,
server_id: '9b67377e-d61e-4865-96d6-fa71989fd9e9',
time: '2020-11-12T20:35:44.978Z',
uid: '8c1459a8-9199-4d25-bc5d-38e000ddd9ab',
user: 'alex',
verb: 'GET',
},
].map(makeEvent);
4 changes: 2 additions & 2 deletions web/packages/teleport/src/Nodes/Nodes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ export function Nodes(props: State) {
onClick={showAddNode}
/>
</FeatureHeader>
<Flex mb={4} alignItems="center" justifyContent="space-between">
<InputSearch height="30px" mr="3" onChange={setSearchValue} />
<Flex mb={4} alignItems="center" flex="0 0 auto" justifyContent="space-between">
<InputSearch mr="3" onChange={setSearchValue} />
<QuickLaunch width="280px" onPress={onSshEnter} />
</Flex>
{attempt.isFailed && <Danger>{attempt.message} </Danger>}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ exports[`failed 1`] = `
.c4 {
box-sizing: border-box;
margin-bottom: 24px;
flex: 0 0 auto;
display: flex;
align-items: center;
justify-content: space-between;
Expand Down Expand Up @@ -187,7 +188,6 @@ exports[`failed 1`] = `
padding-left: 16px;
padding-right: 16px;
color: rgba(255,255,255,0.87);
height: 30px;
}
.c5:hover {
Expand Down Expand Up @@ -231,7 +231,6 @@ exports[`failed 1`] = `
<input
class="c5"
color="text.primary"
height="30px"
placeholder="SEARCH..."
value=""
/>
Expand Down Expand Up @@ -408,6 +407,7 @@ exports[`loaded 1`] = `
.c4 {
box-sizing: border-box;
margin-bottom: 24px;
flex: 0 0 auto;
display: flex;
align-items: center;
justify-content: space-between;
Expand Down Expand Up @@ -525,7 +525,6 @@ exports[`loaded 1`] = `
padding-left: 16px;
padding-right: 16px;
color: rgba(255,255,255,0.87);
height: 30px;
}
.c5:hover {
Expand Down Expand Up @@ -697,7 +696,6 @@ exports[`loaded 1`] = `
<input
class="c5"
color="text.primary"
height="30px"
placeholder="SEARCH..."
value=""
/>
Expand Down
4 changes: 2 additions & 2 deletions web/packages/teleport/src/Recordings/Recordings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ export function Recordings(props: ReturnType<typeof useAuditEvents>) {
onChange={setRange}
/>
</FeatureHeader>
<Flex mb={4} alignItems="center" justifyContent="flex-start">
<InputSearch height="30px" mr="3" onChange={setSearchValue} />
<Flex mb={4} alignItems="center" flex="0 0 auto" justifyContent="flex-start">
<InputSearch mr="3" onChange={setSearchValue} />
</Flex>
{overflow && (
<Danger>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ exports[`rendering of Session Recordings 1`] = `
.c6 {
box-sizing: border-box;
margin-bottom: 24px;
flex: 0 0 auto;
display: flex;
align-items: center;
justify-content: flex-start;
Expand Down Expand Up @@ -327,7 +328,6 @@ exports[`rendering of Session Recordings 1`] = `
padding-left: 16px;
padding-right: 16px;
color: rgba(255,255,255,0.87);
height: 30px;
}
.c7:hover {
Expand Down Expand Up @@ -363,7 +363,7 @@ exports[`rendering of Session Recordings 1`] = `
width="auto"
>
<span>
Today
7 days
<span
class="c4 c5 icon icon-caret-down "
color="text.primary"
Expand All @@ -378,7 +378,6 @@ exports[`rendering of Session Recordings 1`] = `
<input
class="c7"
color="text.primary"
height="30px"
placeholder="SEARCH..."
value=""
/>
Expand Down Expand Up @@ -705,6 +704,7 @@ exports[`rendering of Session Recordings 2`] = `
.c6 {
box-sizing: border-box;
margin-bottom: 24px;
flex: 0 0 auto;
display: flex;
align-items: center;
justify-content: flex-start;
Expand Down Expand Up @@ -889,7 +889,6 @@ exports[`rendering of Session Recordings 2`] = `
padding-left: 16px;
padding-right: 16px;
color: rgba(255,255,255,0.87);
height: 30px;
}
.c7:hover {
Expand Down Expand Up @@ -926,7 +925,7 @@ exports[`rendering of Session Recordings 2`] = `
width="auto"
>
<span>
Today
7 days
<span
class="c4 c5 icon icon-caret-down "
color="text.primary"
Expand All @@ -941,7 +940,6 @@ exports[`rendering of Session Recordings 2`] = `
<input
class="c7"
color="text.primary"
height="30px"
placeholder="SEARCH..."
value=""
/>
Expand Down
4 changes: 2 additions & 2 deletions web/packages/teleport/src/Users/UserList/UserList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ export default function UserList({

return (
<>
<Flex mb={4}>
<InputSearch height="30px" mr="3" onChange={onSearchChange} />
<Flex flex="0 0 auto" mb={4}>
<InputSearch onChange={onSearchChange} />
</Flex>
<StyledTable {...tableProps}>
<Column
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ exports[`success state 1`] = `
.c4 {
box-sizing: border-box;
margin-bottom: 24px;
flex: 0 0 auto;
display: flex;
}
Expand Down Expand Up @@ -325,11 +326,9 @@ exports[`success state 1`] = `
height: 32px;
transition: all .2s;
background: #222C59;
margin-right: 16px;
padding-left: 16px;
padding-right: 16px;
color: rgba(255,255,255,0.87);
height: 30px;
}
.c5:hover {
Expand Down Expand Up @@ -378,7 +377,6 @@ exports[`success state 1`] = `
<input
class="c5"
color="text.primary"
height="30px"
placeholder="SEARCH..."
value=""
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ export default function ResourceEditor(props) {

return (
<Dialog open={true} dialogCss={dialogCss} onClose={onClose}>
<Flex flex="1" m={-5}>
<Flex flex="1" height="100%" p="5" flexDirection="column">
<Flex flex="1">
<Flex flex="1" m={5} flexDirection="column">
<DialogHeader>
<DialogTitle typography="body1" bold>
{title}
Expand Down Expand Up @@ -90,7 +90,7 @@ export default function ResourceEditor(props) {
justifyContent="space-between"
height="100%"
width="300px"
p="5"
p={5}
bg="primary.light"
>
<Box>
Expand Down Expand Up @@ -134,6 +134,7 @@ const dialogCss = () => `
height: 80%;
width: calc(100% - 20%);
max-width: 1400px;
padding: 0;
`;

function useEditor(initial) {
Expand Down
2 changes: 1 addition & 1 deletion web/packages/teleport/src/useAuditEvents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import Ctx from 'teleport/teleportContext';
export default function useEvents(ctx: Ctx, clusterId: string) {
const rangeOptions = useMemo(() => getRangeOptions(), []);
const [searchValue, setSearchValue] = React.useState('');
const [range, setRange] = useState(rangeOptions[0]);
const [range, setRange] = useState(rangeOptions[1]);
const [attempt, attemptActions] = useAttempt({ isProcessing: true });
const [results, setResults] = useState({
events: [],
Expand Down

0 comments on commit d6ad36c

Please sign in to comment.