Skip to content

Commit b1c10ad

Browse files
authored
Merge pull request #157 from onepanelio/docs/env-var-notes
docs: Update notes about environment variables
2 parents 96b8e21 + 6154ace commit b1c10ad

File tree

7 files changed

+39
-2
lines changed

7 files changed

+39
-2
lines changed

src/app/cron-workflow/cron-workflow-edit-dialog/cron-workflow-edit-dialog.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<div class="font-roboto-bold font-weight-bold font-size-regular">Environment variables</div>
1111
<div class="mt-1 font-roboto font-size-regular color-black">
1212
<div>
13-
Any environment variables you have created will be mounted on workflow execution.
13+
Any environment variables you have created will be automatically mounted to this Workflow execution.
1414
</div>
1515
<div class="color-primary underline pointer-hover mt-1" (click)="goToEnvironmentVariables()">
1616
Add or manage environment variables

src/app/secrets/secrets.component.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@
66

77
<div class="page-body mt-8">
88
<div class="page-title-text">Manage environment variables</div>
9+
<div class="environment bg-primary-light op-rounded-regular mt-5">
10+
<div class="mt-1 font-roboto font-size-regular color-black">
11+
<div>
12+
<p>These environment variables are automatically added to any Workspace or Workflow execution.</p>
13+
<p>They are also available in <strong>onepanel-default-env</strong> secret in the current namespace if you need to access them in other resources.</p>
14+
</div>
15+
</div>
16+
</div>
917
<app-secret-list class="mt-8" [namespace]="this.namespace"></app-secret-list>
1018

1119
<button mat-stroked-button color="primary" class="font-roboto-bold mt-8 font-weight-bold font-size-regular add-environment-variable vertical-align-icon op-rounded" (click)="createEnvironmentVariable()">

src/app/secrets/secrets.component.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,8 @@
1919
display: block;
2020
}
2121
}
22+
23+
.environment {
24+
padding: 20px;
25+
}
26+

src/app/workflow/workflow-execute-dialog/workflow-execute-dialog.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<div class="font-roboto-bold font-weight-bold font-size-regular">Environment variables</div>
1111
<div class="mt-1 font-roboto font-size-regular color-black">
1212
<div>
13-
Any environment variables you have created will be mounted on workflow execution.
13+
Any environment variables you have created will be automatically mounted to this Workflow execution.
1414
</div>
1515
<div class="color-primary underline pointer-hover mt-1" (click)="goToEnvironmentVariables()">
1616
Add or manage environment variables

src/app/workspace/workspace-execute-dialog/workspace-execute-dialog.component.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,17 @@
2323
[errors]="errors"
2424
class="parameters mb-3 d-block">
2525
</app-form>
26+
<div class="environment bg-primary-light op-rounded-regular mt-5">
27+
<div class="font-roboto-bold font-weight-bold font-size-regular">Environment variables</div>
28+
<div class="mt-1 font-roboto font-size-regular color-black">
29+
<div>
30+
Any environment variables you have created will be automatically mounted to this Workspace.
31+
</div>
32+
<div class="color-primary underline pointer-hover mt-1" (click)="goToEnvironmentVariables()">
33+
Add or manage environment variables
34+
</div>
35+
</div>
36+
</div>
2637
</div>
2738

2839

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.environment {
2+
padding: 20px;
3+
}

src/app/workspace/workspace-execute-dialog/workspace-execute-dialog.component.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { Component, Inject, OnInit } from '@angular/core';
2+
import { Router } from "@angular/router";
23
import {
34
CreateWorkspaceBody,
45
KeyValue,
@@ -49,6 +50,7 @@ export class WorkspaceExecuteDialogComponent implements OnInit {
4950
public dialogRef: MatDialogRef<WorkspaceExecuteDialogComponent>,
5051
public namespaceTracker: NamespaceTracker,
5152
private appRouter: AppRouter,
53+
private router: Router,
5254
private formBuilder: FormBuilder,
5355
private workspaceService: WorkspaceServiceService,
5456
private workspaceTemplateService: WorkspaceTemplateServiceService,
@@ -143,4 +145,12 @@ export class WorkspaceExecuteDialogComponent implements OnInit {
143145
this.dialogRef.close();
144146
this.appRouter.navigateToWorkspaceTemplates(this.namespaceTracker.activeNamespace);
145147
}
148+
149+
goToEnvironmentVariables() {
150+
this.dialogRef.afterClosed().subscribe(res => {
151+
this.router.navigate(['/', this.namespaceTracker.activeNamespace, 'secrets']);
152+
});
153+
154+
this.dialogRef.close();
155+
}
146156
}

0 commit comments

Comments
 (0)