-
Notifications
You must be signed in to change notification settings - Fork 59
web_terminal_front #207
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
base: main
Are you sure you want to change the base?
web_terminal_front #207
Conversation
Welcome @MdSayemkhan! It looks like this is your first PR to karmada-io/dashboard 🎉 |
f54a650
to
cb63771
Compare
/assign |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Signed-off-by: MdSayemkhan <sayemkhan4604@gmail.com>
Signed-off-by: MdSayemkhan <sayemkhan4604@gmail.com>
Signed-off-by: MdSayemkhan <sayemkhan4604@gmail.com>
9e137dd
to
fa3403c
Compare
/assign @warjiang |
Signed-off-by: MdSayemkhan <sayemkhan4604@gmail.com>
Signed-off-by: MdSayemkhan <sayemkhan4604@gmail.com>
artifacts/dashboard/kubeconfig.yaml
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kubeconfig file should not be submitted
namespace: karmada-system | ||
spec: | ||
containers: | ||
- image: docker.io/sayem4604/ttyd:latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you provide with the original Dockerfile for building docker.io/sayem4604/ttyd:latest
image, it will help our customer to clarify what we add in the image, also we can make some customization to to ttyd image, make it more convenient for karmada community.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we will not use the pod file directly, we can integrate the pod file with golang, like followoing:
pod := &v1.Pod{
ObjectMeta: metav1.ObjectMeta{
Name: "ttyd-cbf14e3f-f53a-4e0c-99e2-b39ebc0d221d",
Namespace: "karmada-system",
},
Spec: v1.PodSpec{
Containers: []v1.Container{
{
Name: "ttyd-cbf14e3f-f53a-4e0c-99e2-b39ebc0d221d",
Image: "docker.io/sayem4604/ttyd:latest",
Ports: []v1.ContainerPort{
{
ContainerPort: 7681,
},
},
},
},
},
}
podsClient := clientset.CoreV1().Pods("karmada-system")
result, err := podsClient.Create(context.TODO(), pod, metav1.CreateOptions{})
if err != nil {
panic(err.Error())
}
!!! Above is just an example, don't use it directly in your programe.
cmd/api/app/api.go
Outdated
// Call the web_terminal function from the main entry point | ||
func main() { | ||
web_terminal() // Ensure this is called to initialize the terminal setup | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add extra line at the end of the file
cmd/api/app/api.go
Outdated
terminal_setup.Init()// Call the init function if it exists | ||
} | ||
|
||
// Call the web_terminal function from the main entry point |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the main file is useless, i seems that it just for testing, testing code expect UT code should not be submitted.
@@ -52,6 +55,16 @@ export const MainLayout: FC = () => { | |||
<Outlet /> | |||
</AntdContent> | |||
</AntdLayout> | |||
<Navigation onTerminalClick={() => setIsTerminalOpen(true)} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -52,7 +52,9 @@ export default defineConfig(({ mode }) => { | |||
}), | |||
], | |||
resolve: { | |||
alias: [{ find: '@', replacement: path.resolve(__dirname, 'src') }], | |||
alias: [{ find: '@', replacement: path.resolve(__dirname, 'src') }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
format the code
@@ -8,10 +8,9 @@ | |||
|
|||
/* Bundler mode */ | |||
"moduleResolution": "bundler", | |||
"allowImportingTsExtensions": true, | |||
/*"allowImportingTsExtensions": true,*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any explanation for the change
@@ -18,6 +18,7 @@ import type { ITerminalOptions } from '@xterm/xterm'; | |||
import { addEventListener, getDebugger } from './utils'; | |||
import BaseTerminal from './base.ts'; | |||
import { BaseTerminalOptions, ClientOptions } from './typing'; | |||
//import ZmodemAddon from '@karmada/xterm-addon-zmodem'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
plz recheckt the code, when submit PR, I think you can clean your code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
kind of the golang code should be move to api
module under the cmd
folder
Signed-off-by: MdSayemkhan <sayemkhan4604@gmail.com>
Signed-off-by: MdSayemkhan <sayemkhan4604@gmail.com>
Signed-off-by: MdSayemkhan <sayemkhan4604@gmail.com>
What type of PR is this?
What this PR does / why we need it:
/kind feature
Which issue(s) this PR fixes:
Fixes #57
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
yes