Skip to content

Commit 015e197

Browse files
committed
path fix
1 parent 2ee9663 commit 015e197

File tree

3 files changed

+3
-18
lines changed

3 files changed

+3
-18
lines changed

cmd/api/app/routes/config/handler.go

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,6 @@ import (
99

1010
)
1111

12-
func handleGetconfig(c *gin.Context) {
13-
message, err := SendMessage()
14-
if err != nil {
15-
common.Fail(c, err)
16-
return
17-
}
18-
c.JSON(200, gin.H{"message": message})
19-
}
2012
func handleGetRunningapps(c *gin.Context) {
2113
podLabels, err := GetRunningapps()
2214
if err != nil {
@@ -81,10 +73,9 @@ func handleGetPodLogs(c *gin.Context) {
8173
func init() {
8274
r := router.V1()
8375
r.GET("/config/running-apps", handleGetRunningapps)
84-
r.GET("/config/pods/:appLabel", handleGetMetaData)
76+
r.GET("/config/apps/:appLabel", handleGetMetaData)
8577
r.GET("/config/status/:podName", handleCheckDeploymentStatus)
8678
r.GET("/config/restart/:podName", handleRestartDeployment)
87-
r.GET("/config", handleGetconfig)
8879
r.GET("/config/reinstall/:podName", handleReinstallPod)
8980
r.GET("/config/log/:podName", handleGetPodLogs)
9081
}

cmd/api/app/routes/config/misc.go

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,6 @@ import (
1111
"io"
1212
corev1 "k8s.io/api/core/v1"
1313
)
14-
func SendMessage() (string, error) {
15-
message := "hello"
16-
fmt.Printf("Message sent: %s\n", message)
17-
return message, nil
18-
}
19-
2014
const (
2115
namespace = "karmada-system"
2216
)
@@ -34,7 +28,7 @@ func GetRunningapps() ([]string, error) {
3428
if appLabel, exists := pod.Labels["app"]; exists {
3529
podLabels = append(podLabels, appLabel)
3630
}
37-
}
31+
}
3832

3933
if len(podLabels) == 0 {
4034
return nil, fmt.Errorf("no pods found")

ui/apps/dashboard/src/services/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ interface PodDetailsResponse {
2929
}
3030

3131
export async function GetPodDetails(podName: string): Promise<PodDetailsResponse> {
32-
const response = await karmadaClient.get<PodDetailsResponse>(`config/pods/${podName}`);
32+
const response = await karmadaClient.get<PodDetailsResponse>(`config/apps/${podName}`);
3333
return response.data;
3434
}
3535

0 commit comments

Comments
 (0)