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

release v0.25.0 fixes to develop #823

Merged
merged 22 commits into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
872282f
Merge pull request #766 from gravitl/kwesi/acc-690-nmui-v-0-25-0-post…
Aceix Sep 12, 2024
35e3b1f
fix: for profile icon sticking out when sidebar is collapsed
pwilson77 Sep 16, 2024
08649c0
Merge pull request #773 from gravitl/sidebar-fix
Aceix Sep 16, 2024
e6d7e46
fix(ACC-701): ui enhancements for user mgmt flows
Aceix Sep 18, 2024
43d2c7f
Merge pull request #777 from gravitl/kwesi/acc-701-nmui-v-0-25-0-user…
Aceix Sep 19, 2024
2f493e7
patch: remove user_id from intercom boot function
pwilson77 Oct 3, 2024
899a8f5
Merge pull request #793 from gravitl/release-v0.25.0-patch
pwilson77 Oct 3, 2024
4a67e05
fix: encode username payload in network call
Aceix Oct 6, 2024
bcbacff
feat(NET-1648): add tenant ID to sidebar
pwilson77 Oct 6, 2024
ef8e48d
Merge pull request #806 from gravitl/NET-1644-C
imadtassaoui Oct 7, 2024
0f7fea5
Merge pull request #807 from gravitl/feature/welcome-modal-new-tenant…
pwilson77 Oct 7, 2024
8d99ab9
Merge pull request #798 from gravitl/release-v0.25.0-patch-2
Aceix Oct 8, 2024
10b7dd1
Merge pull request #797 from gravitl/hotfix/release-v0.25.0/invite-email
Aceix Oct 8, 2024
c35aa83
Hotfix/release-v0.25.0/ux-improvements (#810)
Aceix Oct 10, 2024
b317ab4
fix: tanant id copying
Aceix Oct 10, 2024
fdf5486
feat: move tenant properties to the bottom of sidebar (#816)
pwilson77 Oct 10, 2024
8ed06d7
fix: sidebar scroll issue
pwilson77 Oct 11, 2024
81893ad
Merge pull request #818 from gravitl/release-v025.0-patch-4
pwilson77 Oct 11, 2024
e67e5ca
docs: use new links (#819)
Aceix Oct 13, 2024
305dd1f
feat: add intercomId to baseservice.ts (#824)
Aceix Oct 16, 2024
f906461
Revert "feat: add intercomId to baseservice.ts (#824)" (#826)
pwilson77 Oct 16, 2024
64fbf22
Merge branch 'develop' into release-v0.25.0
Aceix Oct 18, 2024
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
2 changes: 1 addition & 1 deletion Dockerfile.saas
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ ENV [email protected]
# Other vars

ENV VITE_NETCLIENT_BIN_URL_TEMPLATE=https://fileserver.netmaker.io/releases/download/:version/:fileName
ENV VITE_NETMAKER_TRIAL_PERIOD_DOCS_URL=https://docs.netmaker.io/install.html#after-trial-period-ends
ENV VITE_NETMAKER_TRIAL_PERIOD_DOCS_URL=https://docs.netmaker.io/docs/server-installation/quick-install#after-trial-period-ends

RUN npm ci
RUN npm audit fix || echo "ATTENTION!!! Failed to automatically patch vulnerabilities" >&2
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.standalone
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ ENV VITE_TENANT_PRIMARY_COLOR=
# Other vars

ENV VITE_NETCLIENT_BIN_URL_TEMPLATE=https://fileserver.netmaker.io/releases/download/:version/:fileName
ENV VITE_NETMAKER_TRIAL_PERIOD_DOCS_URL=https://docs.netmaker.io/install.html#after-trial-period-ends
ENV VITE_NETMAKER_TRIAL_PERIOD_DOCS_URL=https://docs.netmaker.io/docs/server-installation/quick-install#after-trial-period-ends

RUN npm ci
RUN npm audit fix || echo "ATTENTION!!! Failed to automatically patch vulnerabilities" >&2
Expand Down
13 changes: 13 additions & 0 deletions src/App.scss
Original file line number Diff line number Diff line change
Expand Up @@ -186,4 +186,17 @@
td.ant-table-column-sort {
background-color: transparent;
}
}

.bottom-sidebar-menu-open {
border-right: none;
position: absolute;
bottom: 0;
}

.bottom-sidebar-menu-close {
border-right: none;
position: absolute;
bottom: 0;
width: 80px !important;
}
2 changes: 1 addition & 1 deletion src/components/RacDownloadBanner.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState, useEffect } from 'react';
import { useState, useEffect } from 'react';
import { ExternalLinks } from '@/constants/LinkAndImageConstants';
import { CloseCircleFilled, DownloadOutlined } from '@ant-design/icons';
import { Button } from 'antd';
Expand Down
39 changes: 27 additions & 12 deletions src/components/modals/add-user-modal/AddUserModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export default function AddUserModal({
const [activeTab, setActiveTab] = useState(defaultTabKey);
const [isLoadingPlatformRoles, setIsLoadingPlatformRoles] = useState(true);

const palVal = Form.useWatch('platform_role_id', form);
const palVal: UserRoleId = Form.useWatch('platform_role_id', form);

const networkRolesTableData = useMemo<NetworkRolesTableData[]>(() => {
const roles = networkRoles
Expand Down Expand Up @@ -287,6 +287,31 @@ export default function AddUserModal({
[getGroupsContent, getCustomRolesContent],
);

const getPalDesc = useCallback((pal: UserRoleId) => {
switch (pal) {
case 'admin':
return <Typography.Text type="secondary">Admins can access all features and manage all users.</Typography.Text>;
case 'platform-user':
return (
<Typography.Text type="secondary">
Platform users can log into the dashboard and access the networks they are assigned to.
</Typography.Text>
);
case 'service-user':
return (
<Typography.Text type="secondary">
Service users cannot log into the dashboard; they use{' '}
<Typography.Link href={ExternalLinks.RAC_DOWNLOAD_DOCS_LINK} target="_blank">
RAC
</Typography.Link>{' '}
to access their assigned networks.
</Typography.Text>
);
default:
return '';
}
}, []);

return (
<Modal
title={<span style={{ fontSize: '1.25rem', fontWeight: 'bold', minWidth: '60vw' }}>Create a User</span>}
Expand Down Expand Up @@ -352,17 +377,7 @@ export default function AddUserModal({
tooltip="This specifies the server-wide permissions this user will have"
rules={[{ required: true }]}
initialValue={isServerEE ? undefined : 'admin'}
extra={
<Typography.Text type="secondary">
Admins can access all features and manage all users. Platform users can log into the dashboard
and access the networks they are assigned to. Service users cannot log into the dashboard;
they use{' '}
<Typography.Link href={ExternalLinks.RAC_DOWNLOAD_DOCS_LINK} target="_blank">
RAC
</Typography.Link>{' '}
to access their assigned networks.
</Typography.Text>
}
extra={getPalDesc(palVal)}
>
<Radio.Group>
{platformRoles.map((role) => (
Expand Down
37 changes: 26 additions & 11 deletions src/components/modals/invite-user-modal/InviteUserModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,31 @@ export default function InviteUserModal({
[getGroupsContent, getCustomRolesContent],
);

const getPalDesc = useCallback((pal: UserRoleId) => {
switch (pal) {
case 'admin':
return <Typography.Text type="secondary">Admins can access all features and manage all users.</Typography.Text>;
case 'platform-user':
return (
<Typography.Text type="secondary">
Platform users can log into the dashboard and access the networks they are assigned to.
</Typography.Text>
);
case 'service-user':
return (
<Typography.Text type="secondary">
Service users cannot log into the dashboard; they use{' '}
<Typography.Link href={ExternalLinks.RAC_DOWNLOAD_DOCS_LINK} target="_blank">
RAC
</Typography.Link>{' '}
to access their assigned networks.
</Typography.Text>
);
default:
return '';
}
}, []);

return (
<Modal
title={<span style={{ fontSize: '1.25rem', fontWeight: 'bold', minWidth: '60vw' }}>Invite users</span>}
Expand Down Expand Up @@ -405,17 +430,7 @@ export default function InviteUserModal({
tooltip="This specifies the server-wide permissions this user will have"
rules={[{ required: true }]}
initialValue={isServerEE ? undefined : 'admin'}
extra={
<Typography.Text type="secondary">
Admins can access all features and manage all users. Platform users can log into the
dashboard and access the networks they are assigned to. Service users cannot log into the
dashboard; they use{' '}
<Typography.Link href={ExternalLinks.RAC_DOWNLOAD_DOCS_LINK} target="_blank">
RAC
</Typography.Link>{' '}
to access their assigned networks.
</Typography.Text>
}
extra={getPalDesc(palVal)}
>
<Radio.Group>
{platformRoles.map((role) => (
Expand Down
22 changes: 15 additions & 7 deletions src/components/modals/new-host-modal/NewHostModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,11 @@ export default function NewHostModal({
<>
We recommend using the remote access client for Windows. Go to remote access tab and you
can follow the instructions for setup
<a href="https://docs.netmaker.io/pro/rac.html" target="_blank" rel="noreferrer">
<a
href="https://docs.netmaker.io/docs/remote-access-client-rac"
target="_blank"
rel="noreferrer"
>
{' '}
here.
</a>
Expand Down Expand Up @@ -482,7 +486,11 @@ export default function NewHostModal({
<>
We recommend using the remote access client for Mac. Go to remote access tab and you can
follow the instructions for setup
<a href="https://docs.netmaker.io/pro/rac.html" target="_blank" rel="noreferrer">
<a
href="https://docs.netmaker.io/docs/remote-access-client-rac"
target="_blank"
rel="noreferrer"
>
{' '}
here.
</a>
Expand Down Expand Up @@ -552,7 +560,7 @@ export default function NewHostModal({
<div className="" style={{ marginTop: '1rem', textAlign: 'center' }}>
<Button
type="link"
href="https://docs.netmaker.io/netclient.html#linux"
href="https://docs.netmaker.io/docs/netclient#linux"
target="_blank"
rel="noreferrer"
>
Expand Down Expand Up @@ -666,7 +674,7 @@ export default function NewHostModal({
<ul>
<li>
<a
href="https://docs.netmaker.io/external-clients.html#remote-access"
href="https://docs.netmaker.io/docs/remote-access-client-rac#remote-access"
target="_blank"
rel="noreferrer"
>
Expand All @@ -675,7 +683,7 @@ export default function NewHostModal({
</li>
<li>
<a
href="https://docs.netmaker.io/integrating-non-native-devices.html"
href="https://docs.netmaker.io/docs/how-to-guides/integrating-non-native-devices"
target="_blank"
rel="noreferrer"
>
Expand All @@ -701,14 +709,14 @@ export default function NewHostModal({
<Typography.Text>
Visit the docs on how to{' '}
<a
href="https://docs.netmaker.io/pro/pro-users.html#attaching-or-removing-user-from-a-remote-access-gateway"
href="https://docs.netmaker.io/docs/features/users-management-pro#attaching-or-removing-user-from-a-remote-access-gateway"
target="_blank"
rel="noreferrer"
>
attach a user to a remote access gateway
</a>{' '}
or how to connect your mobile device to the network with the{' '}
<a href="https://docs.netmaker.io/pro/rac.html" target="_blank" rel="noreferrer">
<a href="https://docs.netmaker.io/docs/remote-access-client-rac" target="_blank" rel="noreferrer">
Remote Access Client (RAC)
</a>
.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ interface DownloadRemoteAccessClientModalProps {
page?: PageType;
}

const RAC_DOCS_URL = 'https://docs.netmaker.io/pro/rac.html';
const RAC_DOCS_URL = 'https://docs.netmaker.io/docs/remote-access-client-rac';

export default function DownloadRemotesAccessClientModal({ isOpen, onCancel }: DownloadRemoteAccessClientModalProps) {
const store = useStore();
Expand Down
37 changes: 26 additions & 11 deletions src/components/modals/user-details-modal/UserDetailsModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,31 @@ export default function UserDetailsModal({
[getGroupsContent, getCustomRolesContent],
);

const getPalDesc = useCallback((pal: UserRoleId) => {
switch (pal) {
case 'admin':
return <Typography.Text type="secondary">Admins can access all features and manage all users.</Typography.Text>;
case 'platform-user':
return (
<Typography.Text type="secondary">
Platform users can log into the dashboard and access the networks they are assigned to.
</Typography.Text>
);
case 'service-user':
return (
<Typography.Text type="secondary">
Service users cannot log into the dashboard; they use{' '}
<Typography.Link href={ExternalLinks.RAC_DOWNLOAD_DOCS_LINK} target="_blank">
RAC
</Typography.Link>{' '}
to access their assigned networks.
</Typography.Text>
);
default:
return '';
}
}, []);

useEffect(() => {
if (isServerEE && isOpen) {
loadGroups();
Expand Down Expand Up @@ -398,17 +423,7 @@ export default function UserDetailsModal({
tooltip="This specifies the server-wide permissions this user will have"
initialValue={user.platform_role_id}
required
extra={
<Typography.Text type="secondary">
Admins can access all features and manage all users. Platform users can log into the dashboard
and access the networks they are assigned to. Service users cannot log into the dashboard; they
use{' '}
<Typography.Link href={ExternalLinks.RAC_DOWNLOAD_DOCS_LINK} target="_blank">
RAC
</Typography.Link>{' '}
to access their assigned networks.
</Typography.Text>
}
extra={getPalDesc(palVal)}
>
<Select
placeholder="Select a platform access level for the user"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { CloudSyncOutlined } from '@ant-design/icons';
import { useStore } from '@/store/store';
import { isSaasBuild } from '@/services/BaseService';

const UPGRADE_DOCS_LINK = 'https://docs.netmaker.io/upgrades.html';
const UPGRADE_DOCS_LINK = 'https://docs.netmaker.io/docs/upgrades';

interface VersionUpgradeModalProps {
isOpen: boolean;
Expand Down
22 changes: 10 additions & 12 deletions src/constants/LinkAndImageConstants.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
const RAC_LINK = 'https://docs.netmaker.io/pro/rac.html';
const WIREGUARD_LINK = 'https://docs.netmaker.io/integrating-non-native-devices.html';
const PRO_UPGRADE_DOCS_LINK = 'https://docs.netmaker.io/pro/pro-setup.html';
const RAC_DOWNLOAD_DOCS_LINK = 'https://docs.netmaker.io/pro/rac.html#download-installation';
const CORE_DNS_SETUP_LINK = 'https://docs.netmaker.io/architecture.html#components__coredns';
const RAC_LINK = 'https://docs.netmaker.io/docs/remote-access-client-rac';
const WIREGUARD_LINK = 'https://docs.netmaker.io/docs/how-to-guides/integrating-non-native-devices';
const PRO_UPGRADE_DOCS_LINK = 'https://docs.netmaker.io/docs/server-installation/netmaker-professional-setup';
const RAC_DOWNLOAD_DOCS_LINK = 'https://docs.netmaker.io/docs/remote-access-client-rac#download-installation';
const CORE_DNS_SETUP_LINK = 'https://docs.netmaker.io/docs/about/architecture#components__coredns';
const NFTABLES_DOCS_LINK = 'https://www.linode.com/docs/guides/how-to-use-nftables/';
const IPTABLES_DOCS_LINK = 'https://ioflood.com/blog/install-iptables-command-linux/';
const INTEGRATING_NON_NATIVE_DEVICES_LINK =
'https://docs.netmaker.io/integrating-non-native-devices.html#integrating-non-native-devices--page-root';
'https://docs.netmaker.io/docs/how-to-guides/integrating-non-native-devices#integrating-non-native-devices--page-root';
const ROUTE_LOCAL_NETWORK_TRAFFIC_LINK = 'https://docs.netmaker.io/'; /// NEED TO ADD LINK
const HOW_TO_ADD_USERS_TO_NETWORK = 'https://www.netmaker.io/resources/how-to-add-users-to-netmaker-saas';
const USER_MGMT_DOCS_URL = 'https://docs.netmaker.io/#';
const UI_DOCS_URL = 'https://docs.v2.netmaker.io/guide/references/user-interface';
const USER_MGMT_DOCS_NETWORK_ROLES_URL =
'https://docs.v2.netmaker.io/guide/netmaker-professional/users-in-netmaker-professional#network-roles';
const USER_MGMT_DOCS_USER_GROUPS_URL =
'https://docs.v2.netmaker.io/guide/netmaker-professional/users-in-netmaker-professional#user-groups';
const UI_DOCS_URL = 'https://docs.netmaker.io/docs/references/user-interface';
const USER_MGMT_DOCS_NETWORK_ROLES_URL = 'https://docs.netmaker.io/docs/features/users-management-pro#network-roles';
const USER_MGMT_DOCS_USER_GROUPS_URL = 'https://docs.netmaker.io/docs/features/users-management-pro#user-groups';
const USER_MGMT_DOCS_INVITES_URL =
'https://docs.v2.netmaker.io/guide/netmaker-professional/users-in-netmaker-professional#adding-users__user-invite';
'https://docs.netmaker.io/docs/features/users-management-pro#user-groups#adding-users__user-invite';

const EGRESS_IMG = '/egress.webp';
const RAG_IMG = '/rag.webp';
Expand Down
4 changes: 1 addition & 3 deletions src/layouts/MainLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
BookOutlined,
DownloadOutlined,
} from '@ant-design/icons';
import { Alert, Button, Col, Divider, MenuProps, Row, Select, Switch, Typography } from 'antd';
import { Alert, Col, Divider, MenuProps, Row, Select, Switch, Typography } from 'antd';
import { Layout, Menu, theme } from 'antd';
import { Link, Outlet, useLocation, useNavigate } from 'react-router-dom';
import {
Expand All @@ -34,8 +34,6 @@ import VersionUpgradeModal from '@/components/modals/version-upgrade-modal/Versi
import { lt } from 'semver';
import { isAdminUserOrRole } from '@/utils/UserMgmtUtils';
import { ExternalLinks } from '@/constants/LinkAndImageConstants';
import WelcomeModal from '@/components/modals/welcome-modal/WelcomeModal';
import { Divide } from 'lucide-react';

const { Content, Sider } = Layout;

Expand Down
1 change: 1 addition & 0 deletions src/pages/auth/ContinueInvitePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ export default function ContinueInvitePage(props: ContinueInvitePageProps) {
const payload: any = { ...formData };
delete payload['login-method'];
delete payload['confirm-password'];
payload.username = encodeURIComponent(payload.username || '');
await UsersService.userInviteSignup(inviteCode, payload);
login(formData);
} catch (err) {
Expand Down
6 changes: 5 additions & 1 deletion src/pages/auth/LoginPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,11 @@ export default function LoginPage(props: LoginPageProps) {
<>
User not authorized for dashboard access. Only admins can access the dashboard. Users should use the
remote access client.{' '}
<a href="https://docs.netmaker.io/pro/rac.html" target="_blank" rel="noopener noreferrer">
<a
href="https://docs.netmaker.io/docs/remote-access-client-rac"
target="_blank"
rel="noopener noreferrer"
>
Click here for more details.
</a>
</>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/hosts/HostsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ import { lt } from 'semver';
import { ExtendedNode } from '@/models/Node';
import { HOST_HEALTH_STATUS } from '@/models/NodeConnectivityStatus';

const HOST_DOCS_URL = 'https://docs.netmaker.io/ui-reference.html#hosts';
const HOST_DOCS_URL = 'https://docs.netmaker.io/docs/references/user-interface#hosts';

export default function HostsPage(props: PageProps) {
const [notify, notifyCtx] = notification.useNotification();
Expand Down
4 changes: 2 additions & 2 deletions src/pages/hosts/NewHostPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ export default function NewHostPage(props: PageProps) {
<Button
style={{ width: '100%' }}
type="primary"
href="https://docs.netmaker.io/netclient.html#docker"
href="https://docs.netmaker.io/docs/netclient#docker"
target="_blank"
>
Go to Docs
Expand All @@ -276,7 +276,7 @@ export default function NewHostPage(props: PageProps) {
<Button
style={{ width: '100%' }}
type="primary"
href="https://docs.netmaker.io/netclient.html#linux"
href="https://docs.netmaker.io/docs/netclient#linux"
target="_blank"
>
Go to Docs
Expand Down
Loading
Loading