Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion js/app_api-adminSettings.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/app_api-adminSettings.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/components/DaemonConfig/ManageDaemonConfigModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
id="deploy-config-haproxy-password"
v-model="deployConfig.haproxy_password"
:label="isHarp ? t('app_api', 'HaRP shared key') : t('app_api', 'HaProxy password')"
:error="isHaProxyPasswordValid === false"
:error="!!deployConfig.haproxy_password && isHaProxyPasswordValid === false"
:disabled="isEdit && isK8s"
:placeholder="haProxyPasswordHelperText"
:aria-label="haProxyPasswordHelperText"
Expand Down
12 changes: 6 additions & 6 deletions src/constants/__snapshots__/daemonTemplates.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ exports[`DAEMON_TEMPLATES > matches snapshot 1`] = `
"label": "CPU",
},
"gpu": false,
"haproxy_password": "some_very_secure_password",
"haproxy_password": "",
"harp": {
"docker_socket_port": 24000,
"exapp_direct": false,
Expand Down Expand Up @@ -39,7 +39,7 @@ exports[`DAEMON_TEMPLATES > matches snapshot 1`] = `
"label": "CPU",
},
"gpu": false,
"haproxy_password": "some_very_secure_password",
"haproxy_password": "",
"harp": {
"docker_socket_port": 24000,
"exapp_direct": false,
Expand Down Expand Up @@ -67,7 +67,7 @@ exports[`DAEMON_TEMPLATES > matches snapshot 1`] = `
"label": "CPU",
},
"gpu": false,
"haproxy_password": "some_very_secure_password",
"haproxy_password": "",
"harp": {
"docker_socket_port": 24000,
"exapp_direct": true,
Expand Down Expand Up @@ -95,7 +95,7 @@ exports[`DAEMON_TEMPLATES > matches snapshot 1`] = `
"label": "CPU",
},
"gpu": false,
"haproxy_password": "some_very_secure_password",
"haproxy_password": "",
"harp": {
"docker_socket_port": 24000,
"exapp_direct": false,
Expand Down Expand Up @@ -123,7 +123,7 @@ exports[`DAEMON_TEMPLATES > matches snapshot 1`] = `
"label": "CPU",
},
"gpu": false,
"haproxy_password": "enter_haproxy_password",
"haproxy_password": "",
"harp": null,
"net": "host",
"resourceLimits": {
Expand All @@ -148,7 +148,7 @@ exports[`DAEMON_TEMPLATES > matches snapshot 1`] = `
"label": "CPU",
},
"gpu": false,
"haproxy_password": "some_secure_password",
"haproxy_password": "",
"harp": null,
"net": "host",
"resourceLimits": {
Expand Down
12 changes: 6 additions & 6 deletions src/constants/daemonTemplates.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const DAEMON_TEMPLATES = [
nextcloud_url: null,
deployConfig: {
net: 'host',
haproxy_password: 'some_very_secure_password',
haproxy_password: '',
gpu: false,
computeDevice: {
id: 'cpu',
Expand Down Expand Up @@ -41,7 +41,7 @@ export const DAEMON_TEMPLATES = [
nextcloud_url: null,
deployConfig: {
net: '',
haproxy_password: 'some_very_secure_password',
haproxy_password: '',
gpu: false,
computeDevice: {
id: 'cpu',
Expand Down Expand Up @@ -69,7 +69,7 @@ export const DAEMON_TEMPLATES = [
nextcloud_url: null,
deployConfig: {
net: 'nextcloud-aio',
haproxy_password: 'some_very_secure_password',
haproxy_password: '',
gpu: false,
computeDevice: {
id: 'cpu',
Expand Down Expand Up @@ -97,7 +97,7 @@ export const DAEMON_TEMPLATES = [
nextcloud_url: null,
deployConfig: {
net: 'host',
haproxy_password: 'some_very_secure_password',
haproxy_password: '',
gpu: false,
computeDevice: {
id: 'cpu',
Expand Down Expand Up @@ -126,7 +126,7 @@ export const DAEMON_TEMPLATES = [
nextcloud_url: null,
deployConfig: {
net: 'host',
haproxy_password: 'enter_haproxy_password',
haproxy_password: '',
gpu: false,
computeDevice: {
id: 'cpu',
Expand All @@ -151,7 +151,7 @@ export const DAEMON_TEMPLATES = [
nextcloud_url: null,
deployConfig: {
net: 'host',
haproxy_password: 'some_secure_password',
haproxy_password: '',
gpu: false,
computeDevice: {
id: 'cpu',
Expand Down
6 changes: 6 additions & 0 deletions src/constants/daemonTemplates.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ describe('DAEMON_TEMPLATES', () => {
}
})

it('does not prefill the HaRP shared key or HaProxy password', () => {
for (const template of DAEMON_TEMPLATES) {
expect(template.deployConfig.haproxy_password, `template "${template.name}" prefills a key`).toBe('')
}
})

it('matches snapshot', () => {
expect(DAEMON_TEMPLATES).toMatchSnapshot()
})
Expand Down
Loading