Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Imad/switch wording to egress #918

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes
3 changes: 2 additions & 1 deletion src/components/modals/add-acl-modal/RessourcesForm.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React, { useState, useCallback, useMemo, useEffect } from 'react';
import { Switch, Button, notification } from 'antd';

Check warning on line 2 in src/components/modals/add-acl-modal/RessourcesForm.tsx

View workflow job for this annotation

GitHub Actions / Lint

'notification' is defined but never used
import { useForm, Controller } from 'react-hook-form';
import {
ComputerDesktopIcon,

Check warning on line 5 in src/components/modals/add-acl-modal/RessourcesForm.tsx

View workflow job for this annotation

GitHub Actions / Lint

'ComputerDesktopIcon' is defined but never used
WrenchIcon,

Check warning on line 6 in src/components/modals/add-acl-modal/RessourcesForm.tsx

View workflow job for this annotation

GitHub Actions / Lint

'WrenchIcon' is defined but never used
XMarkIcon,
MagnifyingGlassIcon,
ChevronDownIcon,
Expand All @@ -16,6 +16,7 @@
import { extractErrorMsg } from '@/utils/ServiceUtils';
import { Tag } from '@/models/Tags';
import { NotificationInstance } from 'antd/es/notification/interface';
import arrowBidirectional from '@/assets/arrow-bidirectional.svg';

interface Item {
id: string;
Expand Down Expand Up @@ -367,7 +368,7 @@

<div className="flex flex-col items-center justify-center w-2/3 gap-2">
<img
src="/arrow-bidirectional.svg"
src={arrowBidirectional}
className="w-full px-4 py-2 text-sm border rounded-lg bg-bg-default border-stroke-default"
alt="Bidirectional arrow"
/>
Expand Down
3 changes: 2 additions & 1 deletion src/components/modals/add-acl-modal/UsersForm.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useState, useCallback, useMemo, useEffect } from 'react';
import { notification, Switch, Button } from 'antd';

Check warning on line 2 in src/components/modals/add-acl-modal/UsersForm.tsx

View workflow job for this annotation

GitHub Actions / Lint

'notification' is defined but never used
import { useForm, Controller } from 'react-hook-form';
import {
UsersIcon,
Expand All @@ -21,6 +21,7 @@
import { NotificationInstance } from 'antd/es/notification/interface';
import { Link } from 'react-router-dom';
import { useServerLicense } from '@/utils/Utils';
import arrowBidirectional from '@/assets/arrow-bidirectional.svg';

interface Item {
id: string;
Expand Down Expand Up @@ -545,7 +546,7 @@

<div className="flex flex-col items-center justify-center w-2/3 gap-2">
<img
src="/arrow-bidirectional.svg"
src={arrowBidirectional}
className="w-full px-4 py-2 text-sm border rounded-lg bg-bg-default border-stroke-default"
alt="Bidirectional arrow"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { Network } from '@/models/Network';
import { extractErrorMsg } from '@/utils/ServiceUtils';
import { Tag } from '@/models/Tags';
import { NotificationInstance } from 'antd/es/notification/interface';
import arrowBidirectional from '@/assets/arrow-bidirectional.svg';

interface Item {
id: string;
Expand Down Expand Up @@ -377,7 +378,7 @@ const UpdateResourcesForm: React.FC<UpdateResourcesFormProps> = ({

<div className="flex flex-col items-center justify-center w-2/3 gap-2">
<img
src="/arrow-bidirectional.svg"
src={arrowBidirectional}
className="w-full px-4 py-2 text-sm border rounded-lg bg-bg-default border-stroke-default"
alt="Bidirectional arrow"
/>
Expand Down
3 changes: 2 additions & 1 deletion src/components/modals/update-acl-modal/UpdateUsersForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { extractErrorMsg } from '@/utils/ServiceUtils';
import { NotificationInstance } from 'antd/es/notification/interface';
import { Link } from 'react-router-dom';
import { useServerLicense } from '@/utils/Utils';
import arrowBidirectional from '@/assets/arrow-bidirectional.svg';

interface Item {
id: string;
Expand Down Expand Up @@ -610,7 +611,7 @@ const UpdateUsersForm: React.FC<UpdateUsersFormProps> = ({

<div className="flex flex-col items-center justify-center w-2/3 gap-2">
<img
src="/arrow-bidirectional.svg"
src={arrowBidirectional}
className="w-full px-4 py-2 text-sm border rounded-lg bg-bg-default border-stroke-default"
alt="Bidirectional arrow"
/>
Expand Down
38 changes: 20 additions & 18 deletions src/components/shadcn/MultiSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -265,24 +265,26 @@ export const MultiSelect = React.forwardRef<HTMLButtonElement, MultiSelectProps>
{selectedValues.length === options.length && <CheckIcon className="inline w-4 h-4" />}
</div>
</CommandItem>
{options.map((option) => {
const isSelected = selectedValues.includes(option.value);
return (
<CommandItem
key={option.value}
onSelect={() => toggleOption(option.value)}
className="cursor-pointer"
>
<div className="flex justify-between" style={{ width: '100%' }}>
<span>
{option.icon && <option.icon className="inline w-4 h-4 mr-2 text-muted-foreground" />}
<span className="mr-2">{option.label}</span>
</span>
{isSelected && <CheckIcon className="w-4 h-4" />}
</div>
</CommandItem>
);
})}
<div className="h-40 overflow-y-auto">
{options.map((option) => {
const isSelected = selectedValues.includes(option.value);
return (
<CommandItem
key={option.value}
onSelect={() => toggleOption(option.value)}
className="cursor-pointer"
>
<div className="flex justify-between w-full">
<span>
{option.icon && <option.icon className="inline w-4 h-4 mr-2 text-muted-foreground" />}
<span className="mr-2">{option.label}</span>
</span>
{isSelected && <CheckIcon className="w-4 h-4" />}
</div>
</CommandItem>
);
})}
</div>{' '}
</CommandGroup>
<CommandSeparator />
<CommandGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/networks/NetworkDetailsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2450,7 +2450,7 @@ export default function NetworkDetailsPage(props: PageProps) {
},
},
{
title: 'External Routes',
title: 'Egress',
render(_, node) {
const extendedNode = getExtendedNode(node, store.hostsCommonDetails);
if (extendedNode.is_static && extendedNode.static_node) {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/networks/acl/ACLPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { AxiosError } from 'axios';
import { ACLRule, DestinationTypeValue, SourceTypeValue } from '@/services/dtos/ACLDtos';
import { ACLService } from '@/services/ACLService';
import { extractErrorMsg } from '@/utils/ServiceUtils';
import arrowBidirectional from '../../../../public/arrow-bidirectional.svg';
import arrowBidirectional from '@/assets/arrow-bidirectional.svg';
import UpdateACLModal from '@/components/modals/update-acl-modal/UpdateACLModal';
import AddACLModal from '@/components/modals/add-acl-modal/AddACLModal';
import { UsersService } from '@/services/UsersService';
Expand Down
Loading