Преглед изворни кода

Merge branch 'belanger/agent-v3-integration' of https://github.com/porter-dev/porter into belanger/agent-v3-integration

Alexander Belanger пре 3 година
родитељ
комит
9e54f069a5

+ 1 - 0
api/types/incident.go

@@ -111,6 +111,7 @@ type GetPodValuesRequest struct {
 	StartRange  *time.Time `schema:"start_range"`
 	EndRange    *time.Time `schema:"end_range"`
 	MatchPrefix string     `schema:"match_prefix"`
+	Revision    string     `schema:"revision"`
 }
 
 type GetRevisionValuesRequest struct {

+ 2 - 1
dashboard/src/main/home/cluster-dashboard/expanded-chart/logs-section/LogsSection.tsx

@@ -116,7 +116,7 @@ const LogsSection: React.FC<Props> = ({
     currentChart.namespace,
     enteredSearchText,
     currentChart,
-    selectedDate,
+    selectedDate
   );
 
   useEffect(() => {
@@ -124,6 +124,7 @@ const LogsSection: React.FC<Props> = ({
       .getLogPodValues(
         "<TOKEN>",
         {
+          revision: currentChart.version.toString(),
           match_prefix: currentChart.name,
         },
         {

+ 1 - 0
dashboard/src/shared/api.tsx

@@ -1952,6 +1952,7 @@ const getGitlabFolderContent = baseApi<
 
 const getLogPodValues = baseApi<
   {
+    revision?: string;
     match_prefix?: string;
     start_range?: string;
     end_range?: string;

+ 1 - 0
internal/kubernetes/porter_agent/v2/agent_server.go

@@ -233,6 +233,7 @@ func GetPodValues(
 	}
 
 	vals["match_prefix"] = req.MatchPrefix
+	vals["revision"] = req.Revision
 
 	resp := clientset.CoreV1().Services(service.Namespace).ProxyGet(
 		"http",