File tree Expand file tree Collapse file tree 3 files changed +3
-18
lines changed
cmd/api/app/routes/config
ui/apps/dashboard/src/services Expand file tree Collapse file tree 3 files changed +3
-18
lines changed Original file line number Diff line number Diff line change @@ -9,14 +9,6 @@ import (
9
9
10
10
)
11
11
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
- }
20
12
func handleGetRunningapps (c * gin.Context ) {
21
13
podLabels , err := GetRunningapps ()
22
14
if err != nil {
@@ -81,10 +73,9 @@ func handleGetPodLogs(c *gin.Context) {
81
73
func init () {
82
74
r := router .V1 ()
83
75
r .GET ("/config/running-apps" , handleGetRunningapps )
84
- r .GET ("/config/pods /:appLabel" , handleGetMetaData )
76
+ r .GET ("/config/apps /:appLabel" , handleGetMetaData )
85
77
r .GET ("/config/status/:podName" , handleCheckDeploymentStatus )
86
78
r .GET ("/config/restart/:podName" , handleRestartDeployment )
87
- r .GET ("/config" , handleGetconfig )
88
79
r .GET ("/config/reinstall/:podName" , handleReinstallPod )
89
80
r .GET ("/config/log/:podName" , handleGetPodLogs )
90
81
}
Original file line number Diff line number Diff line change @@ -11,12 +11,6 @@ import (
11
11
"io"
12
12
corev1 "k8s.io/api/core/v1"
13
13
)
14
- func SendMessage () (string , error ) {
15
- message := "hello"
16
- fmt .Printf ("Message sent: %s\n " , message )
17
- return message , nil
18
- }
19
-
20
14
const (
21
15
namespace = "karmada-system"
22
16
)
@@ -34,7 +28,7 @@ func GetRunningapps() ([]string, error) {
34
28
if appLabel , exists := pod .Labels ["app" ]; exists {
35
29
podLabels = append (podLabels , appLabel )
36
30
}
37
- }
31
+ }
38
32
39
33
if len (podLabels ) == 0 {
40
34
return nil , fmt .Errorf ("no pods found" )
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ interface PodDetailsResponse {
29
29
}
30
30
31
31
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 } ` ) ;
33
33
return response . data ;
34
34
}
35
35
You can’t perform that action at this time.
0 commit comments