Skip to content

Commit

Permalink
feat: extend links feature for custom workflow views (#10677)
Browse files Browse the repository at this point in the history
Signed-off-by: Jiacheng Xu <xjcmaxwellcjx@gmail.com>
  • Loading branch information
jiachengxu authored Mar 15, 2023
1 parent 05e1318 commit 94f66a2
Show file tree
Hide file tree
Showing 14 changed files with 26 additions and 9 deletions.
2 changes: 1 addition & 1 deletion api/jsonschema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -5225,7 +5225,7 @@
"type": "string"
},
"scope": {
"description": "\"workflow\", \"pod\", \"pod-logs\", \"event-source-logs\", \"sensor-logs\" or \"chat\"",
"description": "\"workflow\", \"pod\", \"pod-logs\", \"event-source-logs\", \"sensor-logs\", \"workflow-list\" or \"chat\"",
"type": "string"
},
"url": {
Expand Down
2 changes: 1 addition & 1 deletion api/openapi-spec/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -9161,7 +9161,7 @@
"type": "string"
},
"scope": {
"description": "\"workflow\", \"pod\", \"pod-logs\", \"event-source-logs\", \"sensor-logs\" or \"chat\"",
"description": "\"workflow\", \"pod\", \"pod-logs\", \"event-source-logs\", \"sensor-logs\", \"workflow-list\" or \"chat\"",
"type": "string"
},
"url": {
Expand Down
1 change: 1 addition & 0 deletions docs/links.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ You can configure Argo Server to show custom links:

* A "Get Help" button in the bottom right of the window linking to you organization help pages or chat room.
* Deep-links to your facilities (e.g. logging facility) in the UI for both the workflow and each workflow pod.
* Adds a button to the top of workflow view to navigate to customized views.

Links can contain placeholder variables. Placeholder variables are indicated by the dollar sign and curly braces: `${variable}`.

Expand Down
4 changes: 4 additions & 0 deletions docs/workflow-controller-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ data:
- name: Get help
scope: chat
url: http://my-chat
# Adds a button to the top of workflow view to navigate to customized views.
- name: Completed Workflows
scope: workflow-list
url: http://workflows?label=workflows.argoproj.io/completed=true
# uncomment following lines if you want to change navigation bar background color
# navColor: red
Expand Down
3 changes: 3 additions & 0 deletions manifests/quick-start-minimal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1420,6 +1420,9 @@ data:
- name: Sensor Logs Link
scope: sensor-logs
url: http://logging-facility?namespace=${metadata.namespace}&podName=${metadata.name}&startedAt=${status.startedAt}&finishedAt=${status.finishedAt}
- name: Completed Workflows
scope: workflow-list
url: http://workflows?label=workflows.argoproj.io/completed=true
metricsConfig: |
enabled: true
path: /metrics
Expand Down
3 changes: 3 additions & 0 deletions manifests/quick-start-mysql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1420,6 +1420,9 @@ data:
- name: Sensor Logs Link
scope: sensor-logs
url: http://logging-facility?namespace=${metadata.namespace}&podName=${metadata.name}&startedAt=${status.startedAt}&finishedAt=${status.finishedAt}
- name: Completed Workflows
scope: workflow-list
url: http://workflows?label=workflows.argoproj.io/completed=true
metricsConfig: |
enabled: true
path: /metrics
Expand Down
3 changes: 3 additions & 0 deletions manifests/quick-start-postgres.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1420,6 +1420,9 @@ data:
- name: Sensor Logs Link
scope: sensor-logs
url: http://logging-facility?namespace=${metadata.namespace}&podName=${metadata.name}&startedAt=${status.startedAt}&finishedAt=${status.finishedAt}
- name: Completed Workflows
scope: workflow-list
url: http://workflows?label=workflows.argoproj.io/completed=true
metricsConfig: |
enabled: true
path: /metrics
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ data:
- name: Sensor Logs Link
scope: sensor-logs
url: http://logging-facility?namespace=${metadata.namespace}&podName=${metadata.name}&startedAt=${status.startedAt}&finishedAt=${status.finishedAt}
- name: Completed Workflows
scope: workflow-list
url: http://workflows?label=workflows.argoproj.io/completed=true
kind: ConfigMap
metadata:
name: workflow-controller-configmap
2 changes: 1 addition & 1 deletion pkg/apis/workflow/v1alpha1/generated.proto

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/apis/workflow/v1alpha1/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package v1alpha1
type Link struct {
// The name of the link, E.g. "Workflow Logs" or "Pod Logs"
Name string `json:"name" protobuf:"bytes,1,opt,name=name"`
// "workflow", "pod", "pod-logs", "event-source-logs", "sensor-logs" or "chat"
// "workflow", "pod", "pod-logs", "event-source-logs", "sensor-logs", "workflow-list" or "chat"
Scope string `json:"scope" protobuf:"bytes,2,opt,name=scope"`
// The URL. Can contain "${metadata.namespace}", "${metadata.name}", "${status.startedAt}", "${status.finishedAt}" or any other element in workflow yaml, e.g. "${workflow.metadata.annotations.userDefinedKey}"
URL string `json:"url" protobuf:"bytes,3,opt,name=url"`
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/workflow/v1alpha1/openapi_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion sdks/java/client/docs/IoArgoprojWorkflowV1alpha1Link.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ A link to another app.
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **String** | The name of the link, E.g. \&quot;Workflow Logs\&quot; or \&quot;Pod Logs\&quot; |
**scope** | **String** | \&quot;workflow\&quot;, \&quot;pod\&quot;, \&quot;pod-logs\&quot;, \&quot;event-source-logs\&quot;, \&quot;sensor-logs\&quot; or \&quot;chat\&quot; |
**scope** | **String** | \&quot;workflow\&quot;, \&quot;pod\&quot;, \&quot;pod-logs\&quot;, \&quot;event-source-logs\&quot;, \&quot;sensor-logs\&quot;, \&quot;workflow-list\&quot; or \&quot;chat\&quot; |
**url** | **String** | The URL. Can contain \&quot;${metadata.namespace}\&quot;, \&quot;${metadata.name}\&quot;, \&quot;${status.startedAt}\&quot;, \&quot;${status.finishedAt}\&quot; or any other element in workflow yaml, e.g. \&quot;${io.argoproj.workflow.v1alpha1.metadata.annotations.userDefinedKey}\&quot; |


Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion sdks/python/client/docs/IoArgoprojWorkflowV1alpha1Link.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 94f66a2

Please sign in to comment.