-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* client: reports page redesigned * client: reports page redesigned * client: fixes * client: fixes * client: fixes * client: fixes * client: fixes * client: fixes * client: fixes
- Loading branch information
Showing
44 changed files
with
526 additions
and
251 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
90 changes: 50 additions & 40 deletions
90
client/src/components/EntriesSelector/NodesEntriesSelector/NodesEntriesSelector.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 |
---|---|---|
@@ -1,55 +1,65 @@ | ||
import React from 'react'; | ||
import EntriesSelector from 'components/EntriesSelector/EntriesSelector'; | ||
import LinkComponent from 'components/LinkComponent/LinkComponent.tsx'; | ||
import { NodeDataRow } from 'pages/Report/NodesSection/NodesSection.tsx'; | ||
import {NodeDataRow} from 'pages/Report/NodesSection/NodesSection.tsx'; | ||
import KindTag from 'components/KindTag/KindTag.tsx'; | ||
|
||
interface NodesEntriesSelectorProps { | ||
selectedNodes: NodeDataRow[]; | ||
setSelectedNodes: React.Dispatch<React.SetStateAction<NodeDataRow[]>>; | ||
nodesToExclude: NodeDataRow[]; | ||
onAdd: () => void; | ||
onClose: () => void; | ||
availableNodes: NodeDataRow[]; | ||
selectedNodes: NodeDataRow[]; | ||
setSelectedNodes: React.Dispatch<React.SetStateAction<NodeDataRow[]>>; | ||
nodesToExclude: NodeDataRow[]; | ||
onAdd: () => void; | ||
onClose: () => void; | ||
availableNodes: NodeDataRow[]; | ||
} | ||
|
||
const NodesEntriesSelector: React.FC<NodesEntriesSelectorProps> = ({ | ||
selectedNodes, | ||
setSelectedNodes, | ||
nodesToExclude, | ||
onAdd, | ||
onClose, | ||
availableNodes | ||
selectedNodes, | ||
setSelectedNodes, | ||
nodesToExclude, | ||
onAdd, | ||
onClose, | ||
availableNodes | ||
}) => { | ||
|
||
const getUniqueKey = (node: NodeDataRow) => node.name; | ||
const getUniqueKey = (node: NodeDataRow) => node.name; | ||
|
||
const columns = [ | ||
{ | ||
header: 'Name', | ||
columnKey: 'name', | ||
customComponent: (row: NodeDataRow) => ( | ||
<LinkComponent to="" isRunning={row.running}> | ||
{row.name} | ||
</LinkComponent> | ||
), | ||
}, | ||
]; | ||
|
||
return ( | ||
<EntriesSelector<NodeDataRow> | ||
selectedItems={selectedNodes} | ||
setSelectedItems={setSelectedNodes} | ||
itemsToExclude={nodesToExclude} | ||
onAdd={onAdd} | ||
onClose={onClose} | ||
columns={columns} | ||
items={availableNodes} | ||
getKey={getUniqueKey} | ||
entityLabel="node" | ||
noEntriesMessage={<p>There is no node to add.</p>} | ||
title="Select Nodes" | ||
const columns = [ | ||
{ | ||
header: 'Name', | ||
columnKey: 'name', | ||
customComponent: (row: NodeDataRow) => ( | ||
<LinkComponent isRunning={row.running}> | ||
{row.name} | ||
</LinkComponent> | ||
), | ||
}, | ||
{ | ||
header: 'Kind', | ||
columnKey: '', | ||
customComponent: () => ( | ||
<KindTag | ||
name={'Node'} | ||
/> | ||
); | ||
), | ||
}, | ||
]; | ||
|
||
return ( | ||
<EntriesSelector<NodeDataRow> | ||
selectedItems={selectedNodes} | ||
setSelectedItems={setSelectedNodes} | ||
itemsToExclude={nodesToExclude} | ||
onAdd={onAdd} | ||
onClose={onClose} | ||
columns={columns} | ||
items={availableNodes} | ||
getKey={getUniqueKey} | ||
entityLabel="node" | ||
noEntriesMessage={<p>There is no node to add.</p>} | ||
title="Select Nodes" | ||
/> | ||
); | ||
}; | ||
|
||
export default NodesEntriesSelector; |
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 |
---|---|---|
@@ -1,23 +1,64 @@ | ||
@keyframes flip { | ||
0%, 50% { | ||
transform: rotate(0deg) scale(1); | ||
.hourglass { | ||
position: relative; | ||
width: 30px; | ||
height: 30px; | ||
animation: spinHourglass 4s linear infinite; | ||
|
||
&__frame-top, | ||
&__frame-middle, | ||
&__frame-bottom { | ||
position: absolute; | ||
visibility: hidden; | ||
} | ||
15% { | ||
transform: rotate(10deg) scale(1.05); | ||
|
||
&__frame-top { | ||
animation: cycleTop 4s linear infinite; | ||
} | ||
30% { | ||
transform: rotate(-10deg) scale(1.05); | ||
|
||
&__frame-middle { | ||
animation: cycleMiddle 4s linear infinite; | ||
} | ||
100% { | ||
transform: rotate(180deg) scale(1); | ||
|
||
&__frame-bottom { | ||
animation: cycleBottom 4s linear infinite; | ||
} | ||
} | ||
|
||
.hourglass { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
animation: flip 2s infinite ease-in-out; | ||
transform-origin: center; | ||
transition: transform 0.5s; | ||
@keyframes cycleTop { | ||
0%, 25% { | ||
visibility: visible; | ||
} | ||
25.01%, 100% { | ||
visibility: hidden; | ||
} | ||
} | ||
|
||
@keyframes cycleMiddle { | ||
0%, 25% { | ||
visibility: hidden; | ||
} | ||
25.01%, 50% { | ||
visibility: visible; | ||
} | ||
50.01%, 100% { | ||
visibility: hidden; | ||
} | ||
} | ||
|
||
@keyframes cycleBottom { | ||
0%, 50% { | ||
visibility: hidden; | ||
} | ||
50.01%, 100% { | ||
visibility: visible; | ||
} | ||
} | ||
|
||
@keyframes spinHourglass { | ||
0%, 75% { | ||
transform: rotate(0deg); | ||
} | ||
100% { | ||
transform: rotate(180deg); | ||
} | ||
} |
Oops, something went wrong.