Skip to content

Commit 522c2f1

Browse files
tweaking the macOS project settings page, dialogs, and docs (#84)
1 parent bdc222d commit 522c2f1

File tree

7 files changed

+58
-28
lines changed

7 files changed

+58
-28
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
*#
33
.#*
44

5+
# Hugo-related files
6+
**/.hugo_build.lock
7+
58
# Dependency directories
69
**/node_modules/
710
**/bower_components/

documentation/1.1/content/navigate/project-settings.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ PATH environment variable and restarting the application. On macOS, things are a
2020

2121
When running the application on macOS, the application inherits the environment of a daemon process called `launchd` instead
2222
of your environment. By default, the `launchd` environment contains only a few core directories on the `PATH`
23-
(that is, `/usr/bin`, `/bin`, `/usr/sbin`, and `/sbin`). This will cause `kubectl` invocations requiring access to one of
24-
the cloud providers' command-line tooling to fail if the tool is not found in one of those locations. While it is
25-
possible for an administrative user to change the environment that `launchd` uses to address this issue, the WKT UI application
26-
provides the `Extra Path Directories` field to explicitly add the directory where the cloud providers'
27-
command-line tooling is installed, to the `PATH` that the application uses to invoke `kubectl`. Also, use the
28-
`Extra Environment Variable Names/Extra Environment Variable Values` fields to define extra environment variables as
29-
needed. Note that this extra environment configuration is used _only_ when invoking Docker/Podman, kubectl, and Helm.
30-
This section is visible only when running the application on macOS.
23+
(that is, `/usr/bin`, `/bin`, `/usr/sbin`, and `/sbin`). This will, for example, cause `kubectl` invocations requiring
24+
access to one of the cloud providers' command-line tooling to fail if the tool is not found in one of those locations.
25+
While it is possible for an administrative user to change the environment that `launchd` uses to address this issue, the
26+
WKT UI application provides the `Extra Path Directory` table to explicitly add the directory where the cloud providers'
27+
command-line tooling is installed, to the `PATH` that the application uses to invoke `docker`, `podman`, `kubectl`, and
28+
`helm`. Also, use the `Extra Environment Variable Name/Extra Environment Variable Value` table to define extra
29+
environment variables as needed. Note that this extra environment configuration is used _only_ when invoking
30+
Docker/Podman, kubectl, and Helm. This section is visible only when running the application on macOS.
3131

3232

3333
#### Choosing a Credential Storage Scheme

electron/app/locales/en/webui.json

+8-7
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,13 @@
8484
"project-settings-add-path-row-icon-text": "Add Extra Path Directory",
8585
"project-settings-choose-path-icon-text": "Choose Extra Path Directory",
8686
"project-settings-delete-path-row-icon-text": "Remove Extra Path Directory",
87-
"project-settings-extra-path-directory-header": "Extra Path Directories",
87+
"project-settings-extra-path-directory-header": "Extra Path Directory",
8888
"project-settings-hints-macos-path-directories": "Show System Path Directories",
8989
"project-settings-button-macos-path-directories": "Show System Path",
9090
"project-settings-add-env-var-row-icon-text": "Add Extra Environment Variable",
9191
"project-settings-delete-env-var-row-icon-text": "Remove Extra Environment Variable",
92-
"project-settings-extra-environment-variable-name-header": "Extra Environment Variable Names",
93-
"project-settings-extra-environment-variable-value-header": "Extra Environment Variable Values",
92+
"project-settings-extra-environment-variable-name-header": "Extra Environment Variable Name",
93+
"project-settings-extra-environment-variable-value-header": "Extra Environment Variable Value",
9494
"project-settings-hints-macos-environment-variables": "Show System Environment Variables",
9595
"project-settings-button-macos-environment-variables": "Show System Environment",
9696
"project-settings-mac-environment-answer-message": "On macOS, applications started from the Launchpad, Dock, Finder, and Spotlight do not inherit the user's environment. As such, this application may not have the environment necessary to invoke Docker/Podman, kubectl, and Helm. Use this section to add extra directories to the PATH and define the extra environment variables needed. Please note that this extra environment configuration is only used when invoking Docker/Podman, kubectl, and Helm.",
@@ -143,11 +143,12 @@
143143
"project-settings-credential-store-none-label": "Not Stored",
144144
"project-settings-credential-store-policy-answer-message": "The Credential Store Policy controls how credentials are handled when the project is saved and loaded. The options are to store them in the machine's native credential store, store them in the project file encrypted with a passphrase, or not store them at all.",
145145

146-
"macos-path-directories-dialog-title": "Inherited PATH Environment Variable Directories",
146+
"macos-path-directories-dialog-title": "System Path",
147+
"macos-path-directories-dialog-name-header": "Path Directory",
147148

148-
"macos-environment-variables-dialog-title": "Inherited Environment Variables",
149-
"macos-environment-variables-dialog-name-header": "Name",
150-
"macos-environment-variables-dialog-value-header": "Value",
149+
"macos-environment-variables-dialog-title": "System Environment Variables",
150+
"macos-environment-variables-dialog-name-header": "Environment Variable Name",
151+
"macos-environment-variables-dialog-value-header": "Environment Variable Value",
151152

152153
"user-settings-dialog-log-level-error": "Error",
153154
"user-settings-dialog-log-level-warn": "Warning",

webui/src/css/app.css

+6-1
Original file line numberDiff line numberDiff line change
@@ -250,11 +250,16 @@
250250
z-index: 2;
251251
}
252252

253-
.wkt-env-vars-table, .wkt-paths-table, .wkt-domain-properties-table,
253+
.wkt-env-vars-table, .wkt-domain-properties-table,
254254
.wkt-domain-clusters-table, .wkt-domain-secrets-table {
255255
border: 1px solid var(--oj-collection-border-color);
256256
}
257257

258+
.wkt-paths-table {
259+
.wkt-env-vars-table;
260+
width: 100%;
261+
}
262+
258263
.wkt-domain-clusters-table,
259264
.wkt-domain-properties-table,
260265
.wkt-domain-secrets-table {

webui/src/js/viewModels/macos-environment-variables-dialog.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,16 @@ function(accUtils, ko, i18n, viewHelper, ArrayDataProvider, ListDataProviderView
5555
'headerClassName': 'wkt-table-env-vars-header',
5656
'headerText': this.labelMapper('name-header'),
5757
'field': 'name',
58-
'resizable': 'enabled'
58+
'resizable': 'enabled',
59+
'weight': 30
5960
},
6061
{
6162
'className': 'wkt-table-env-vars-cell',
6263
'headerClassName': 'wkt-table-env-vars-header',
6364
'headerText': this.labelMapper('value-header'),
6465
'field': 'value',
65-
'resizable': 'enabled'
66+
'resizable': 'enabled',
67+
'weight': 70
6668
}
6769
];
6870

webui/src/js/viewModels/macos-path-directories-dialog.js

+12-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
define(['accUtils', 'knockout', 'utils/i18n', 'utils/view-helper', 'ojs/ojarraydataprovider', 'ojs/ojknockout',
99
'ojs/ojinputtext', 'ojs/ojlabel', 'ojs/ojbutton', 'ojs/ojdialog', 'ojs/ojformlayout' ],
10-
function(accUtils, ko, i18n, viewHelper) {
10+
function(accUtils, ko, i18n, viewHelper, ArrayDataProvider) {
1111
function PathDirectoriesDialogModel(config) {
1212
const DIALOG_SELECTOR = '#wktMacosPathDirectoriesDialog';
1313

@@ -41,6 +41,17 @@ function(accUtils, ko, i18n, viewHelper) {
4141

4242
this.i18n = i18n;
4343
this.pathDirectories = this.formatPathDirectoriesData();
44+
this.pathDirectoriesDataProvider = new ArrayDataProvider(this.pathDirectories, { keyAttributes: 'value' })
45+
46+
this.pathDirectoriesColumnData = [
47+
{
48+
'className': 'wkt-table-env-vars-cell',
49+
'headerClassName': 'wkt-table-env-vars-header',
50+
'headerText': this.labelMapper('name-header'),
51+
'field': 'value',
52+
'sortable': 'disable'
53+
}
54+
];
4455

4556
this.dismissDialog = () => {
4657
const dialog = this.dialogContainer;

webui/src/js/views/macos-path-directories-dialog.html

+17-9
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,23 @@
99

1010
<div slot="body">
1111
<div class="oj-panel wkt-notop wkt-full-height">
12-
<div>
13-
<ol>
14-
<oj-bind-for-each data="[[pathDirectories]]">
15-
<template data-oj-as="pathDirectory">
16-
<li><oj-bind-text value="[[pathDirectory.data.value]]"></oj-bind-text></li>
17-
</template>
18-
</oj-bind-for-each>
19-
</ol>
20-
</div>
12+
<oj-table id="macos-path-variable-table"
13+
class="wkt-paths-table"
14+
aria-label="Inherited PATH Environment Variable Table"
15+
data="[[pathDirectoriesDataProvider]]"
16+
display="grid"
17+
horizontal-grid-visible="enabled"
18+
vertical-grid-visible="enabled"
19+
edit-mode="none"
20+
columns='[[pathDirectoriesColumnData]]'>
21+
<template slot="rowTemplate" data-oj-as="row">
22+
<tr>
23+
<td>
24+
<oj-bind-text value="[[row.data.value]]"></oj-bind-text>
25+
</td>
26+
</tr>
27+
</template>
28+
</oj-table>
2129
</div>
2230
</div>
2331

0 commit comments

Comments
 (0)