Skip to content

Commit

Permalink
fix duplicate icons (#3846)
Browse files Browse the repository at this point in the history
* fix duplicate icons

* policy icon size

* fix audit icon size

* update icon

* refactor: refactor away from deprecated wait.Poll calls

With the update, some other calls had to be updated:
- `NewDiscoveryRESTMapper` expects an extra `HTTPClient` argument
- `client` does not have `NewDelegatingClient` anymore, instead we can
  create the same resource with `client.New(...)`

Resolves #3812

References:
- #3812
- kubernetes-sigs/controller-runtime#2150
- https://github.com/kubernetes-sigs/controller-runtime/releases/tag/v0.15.0

Signed-off-by: Balazs Nadasdi <[email protected]>

* try to update github.com/fluxcd/pkg/runtime to the earliest version with updated controller-runtime

Signed-off-by: Balazs Nadasdi <[email protected]>

* Cleanup datatable (#4091)

* cleanup datatable

* sort filtered items by `sortValue || value`

* Update pkg/run/session/connect/connect.go

Co-authored-by: Yiannis Triantafyllopoulos <[email protected]>

* Refactoring Status column  (#4098)

* fix: Remove GitOps Run CLI commands

* Replace the Sync/Suspend/Resume controls, used in the `SyncActions` and `CheckboxActions` components, with the new Sync/Suspend/Resume controls (the `SyncControl` component) (#4080)

* Create the new `SyncControls` component for Sync/Suspend/Resume controls.

* Move all components, related to syncing and suspending objects (existing `SyncActions` and `CheckboxActions` and new `SyncControls` and `ResumeIcon`), to the `Sync` folder.

* Update the related UI snapshot.

* Add `SyncControls` to exports.

* Move custom actions to the start (left) of `SyncControls` buttons.

* Re-arrange icons in `IconType` alphabetically.

* add new svg icon as CLusterDiscovery icon

* fix typo

* update import order

* build(deps): Bump google.golang.org/grpc from 1.51.0 to 1.56.3

Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.51.0 to 1.56.3.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](grpc/grpc-go@v1.51.0...v1.56.3)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* build(deps): Bump github.com/weaveworks/tf-controller/api version

* build(deps): Bump postcss from 8.4.21 to 8.4.31 in /website

Bumps [postcss](https://github.com/postcss/postcss) from 8.4.21 to 8.4.31.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](postcss/postcss@8.4.21...8.4.31)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

* chore: Remove GitOps Run components

* build(deps): Remove gitops bucket server from build

* chore: Remove unused code previously used for GitOps Run

* build(deps): Bump @babel/traverse from 7.20.13 to 7.23.2 in /website

Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.20.13 to 7.23.2.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse)

---
updated-dependencies:
- dependency-name: "@babel/traverse"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

* fix duplicate icons

* remove extra space

---------

Signed-off-by: Balazs Nadasdi <[email protected]>
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Joshua Israel <[email protected]>
Co-authored-by: Balazs Nadasdi <[email protected]>
Co-authored-by: a.shabaan <[email protected]>
Co-authored-by: Yiannis Triantafyllopoulos <[email protected]>
Co-authored-by: Luiz Filho <[email protected]>
Co-authored-by: yiannis <[email protected]>
Co-authored-by: opudrovs <[email protected]>
Co-authored-by: ahussein3 <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
10 people authored Nov 7, 2023
1 parent c6725bb commit 7cc50c4
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 22 deletions.
5 changes: 2 additions & 3 deletions ui/components/Icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import NavigateNextIcon from "@material-ui/icons/NavigateNext";
import PauseIcon from "@material-ui/icons/Pause";
import PersonIcon from "@material-ui/icons/Person";
import PlayIcon from "@material-ui/icons/PlayArrow";
import Policy from "@material-ui/icons/Policy";
import Remove from "@material-ui/icons/Remove";
import RemoveCircleIcon from "@material-ui/icons/RemoveCircle";
import SaveAltIcon from "@material-ui/icons/SaveAlt";
Expand Down Expand Up @@ -266,10 +265,10 @@ function getIcon(i: IconType) {
return PlayIcon;

case IconType.PoliciesIcon:
return PoliciesIcon;
return () => <PoliciesIcon filled={false} />;

case IconType.Policy:
return Policy;
return () => <PoliciesIcon filled />;

case IconType.PolicyConfigsIcon:
return PolicyConfigsIcon;
Expand Down
39 changes: 22 additions & 17 deletions ui/components/NavIcons/PoliciesIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,31 +1,36 @@
import * as React from "react";

function PoliciesIcon() {
import { useTheme } from "styled-components";
function PoliciesIcon({ filled }) {
const theme = useTheme();
return (
<svg
width="24"
height="24"
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
strokeLinecap="round"
strokeMiterlimit={10}
>
<g>
<g opacity={filled ? "0" : "100"}>
<path
className="path-fill"
d="m12,4.09l6,2.58v4.56c-.54,6.18-4.84,8.25-6,8.7-1.16-.45-5.46-2.52-6-8.7v-4.56s6-2.58,6-2.58m0-1.09h0s-7,3.02-7,3.02v5.26c.66,7.85,7,9.71,7,9.71h0s6.34-1.86,7-9.71v-5.26s-7-3.01-7-3.01h0Z"
d="M12 4.09L18 6.67V11.23C17.46 17.41 13.16 19.48 12 19.93C10.84 19.48 6.54 17.41 6 11.23V6.67L12 4.09ZM12 3L5 6.02V11.28C5.66 19.13 12 20.99 12 20.99C12 20.99 18.34 19.13 19 11.28V6.02L12 3.01V3Z"
fill={theme.colors.neutral30}
/>
<path
d="M11.98 10.0601C12.51 10.0601 13.01 10.2701 13.38 10.6401C14.15 11.4101 14.15 12.6701 13.38 13.4401C13.01 13.8101 12.51 14.0201 11.98 14.0201C11.45 14.0201 10.95 13.8101 10.58 13.4401C9.81 12.6701 9.81 11.4101 10.58 10.6401C10.95 10.2701 11.45 10.0601 11.98 10.0601ZM11.98 9.06006C11.22 9.06006 10.45 9.35006 9.87 9.93006C8.71 11.0901 8.71 12.9801 9.87 14.1401C10.45 14.7201 11.21 15.0101 11.98 15.0101C12.75 15.0101 13.51 14.7201 14.09 14.1401C15.25 12.9801 15.25 11.0901 14.09 9.93006C13.51 9.35006 12.75 9.06006 11.98 9.06006Z"
fill={theme.colors.neutral30}
/>
</g>
<g id="explorer">
<path
className="path-fill"
d="m11.98,10.06c.53,0,1.03.21,1.4.58.77.77.77,2.03,0,2.8-.37.37-.87.58-1.4.58s-1.03-.21-1.4-.58c-.77-.77-.77-2.03,0-2.8.37-.37.87-.58,1.4-.58m0-1c-.76,0-1.53.29-2.11.87-1.16,1.16-1.16,3.05,0,4.21.58.58,1.34.87,2.11.87s1.53-.29,2.11-.87c1.16-1.16,1.16-3.05,0-4.21-.58-.58-1.34-.87-2.11-.87h0Z"
d="M14 14.0601L16.71 16.7701"
stroke={theme.colors.neutral30}
stroke-miterlimit="10"
/>
<line
className="stroke-fill"
x1="14"
y1="14.06"
x2="16.71"
y2="16.77"
</g>
<g opacity={filled ? "100" : "0"}>
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M12 3L5 6.02V11.28C5.66 19.13 12 20.99 12 20.99C12 20.99 15.1702 20.0599 17.2605 16.7395L16.6464 17.3536L13.7359 14.443C13.2168 14.821 12.6016 15.0101 11.98 15.0101C11.21 15.0101 10.45 14.7201 9.87 14.1401C8.71 12.9801 8.71 11.0901 9.87 9.93006C10.45 9.35006 11.22 9.06006 11.98 9.06006C12.75 9.06006 13.51 9.35006 14.09 9.93006C15.1208 10.9609 15.2356 12.5681 14.4344 13.7273L17.3318 16.6247C18.1634 15.2653 18.812 13.5156 19 11.28V6.02L12 3.01V3ZM11.98 10.0601C12.51 10.0601 13.01 10.2701 13.38 10.6401C14.15 11.4101 14.15 12.6701 13.38 13.4401C13.01 13.8101 12.51 14.0201 11.98 14.0201C11.45 14.0201 10.95 13.8101 10.58 13.4401C9.81 12.6701 9.81 11.4101 10.58 10.6401C10.95 10.2701 11.45 10.0601 11.98 10.0601Z"
fill={theme.colors.neutral30}
/>
</g>
</svg>
Expand Down
4 changes: 2 additions & 2 deletions ui/components/Policies/Utils/PolicyMode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ const PolicyMode = ({ modeName, showName = false }: Props) => {
case "audit":
mode = {
name: "audit",
icon: <Icon type={IconType.Policy} color="neutral30" size="base" />,
icon: <Icon type={IconType.Policy} color="neutral30" size="large" />,
};
break;
case "admission":
mode = {
name: "enforce",
icon: (
<Icon type={IconType.VerifiedUser} color="neutral30" size="base" />
<Icon type={IconType.VerifiedUser} color="neutral30" size="medium" />
),
};
break;
Expand Down

0 comments on commit 7cc50c4

Please sign in to comment.