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

#feat16 : Added command graph (browser based). #45

Open
wants to merge 35 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
050a25b
added graph command
harshtech123 Dec 9, 2024
c5a5fe6
Delete permit-graph.html
harshtech123 Dec 9, 2024
9f55326
prettiefy
harshtech123 Dec 10, 2024
5e1feb9
fixed styling plus fonts
harshtech123 Dec 27, 2024
2b0246f
updates styles and themes
harshtech123 Jan 6, 2025
ddf29ec
Merge remote-tracking branch 'upstream/main'
harshtech123 Jan 6, 2025
1f50d3f
resolved conflit
harshtech123 Jan 6, 2025
b385524
centered edge labels .
harshtech123 Jan 6, 2025
d32d491
fixed functionalities
harshtech123 Jan 7, 2025
335d7a7
fixed more functionalities issues
harshtech123 Jan 11, 2025
abc2c67
Merge branch 'permitio:main' into main
harshtech123 Jan 11, 2025
f38fbe2
updated main logic for rendering graph labels
harshtech123 Jan 12, 2025
0491062
Merge branch 'main' of https://github.com/harshtech123/permit-cli
harshtech123 Jan 12, 2025
47990fd
Merge branch 'permitio:main' into main
harshtech123 Jan 12, 2025
96e4174
Ensure that for every target ID in the edges array there is a corresp…
harshtech123 Jan 12, 2025
fe50237
Merge branch 'main' of https://github.com/harshtech123/permit-cli
harshtech123 Jan 12, 2025
189727e
added full pagination support
harshtech123 Jan 12, 2025
31e3680
dynamic pagination support
harshtech123 Jan 13, 2025
0babf0e
removed console.logs
harshtech123 Jan 13, 2025
81fa833
final updates
harshtech123 Jan 13, 2025
dcfdeac
prettiefy
harshtech123 Jan 13, 2025
deb06cd
ensure every target has its node
harshtech123 Jan 13, 2025
c5075cf
Merge branch 'permitio:main' into main
harshtech123 Jan 28, 2025
37a6696
updates regarding functionality and styling
harshtech123 Jan 29, 2025
20a3f17
changed graph library , using d3 for better control and ensuring cons…
harshtech123 Feb 13, 2025
952878c
Merge branch 'permitio:main' into main
harshtech123 Feb 13, 2025
722e804
advance de algorithms has been added
harshtech123 Feb 17, 2025
930ff90
Merge branch 'main' of https://github.com/harshtech123/permit-cli
harshtech123 Feb 17, 2025
3a2af2b
added a minimap for user navigation
harshtech123 Feb 20, 2025
91c36ae
Merge branch 'permitio:main' into main
harshtech123 Mar 3, 2025
16b2673
Merge branch 'permitio:main' into main
harshtech123 Mar 9, 2025
abda79c
updates in logic to handle each type of cases
harshtech123 Mar 9, 2025
0a3ac68
added unit tests and fixed lint issues
harshtech123 Mar 9, 2025
d7ef4f3
fixed scaling so user can easily navigate
harshtech123 Mar 10, 2025
153ea1e
adjust the user icon and fixed the broken user icon
harshtech123 Mar 10, 2025
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
27 changes: 27 additions & 0 deletions source/commands/graph.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import React from 'react';
import { AuthProvider } from '../components/AuthProvider.js';
import Graph from '../components/graphCommand.js';
import { type infer as zInfer, object, string } from 'zod';
import { option } from 'pastel';

export const options = object({
apiKey: string()
.optional()
.describe(
option({
description: 'The API key for the Permit env, project or Workspace',
}),
),
});

type Props = {
options: zInfer<typeof options>;
};

export default function graph({ options }: Props) {
return (
<AuthProvider permit_key={options.apiKey} scope="environment">
<Graph options={options} />
</AuthProvider>
);
}
Loading