Skip to content

Commit

Permalink
refactor(besu): fix linting problems
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin O'Donnell <kevin@blockchaintp.com>
  • Loading branch information
scealiontach committed Aug 26, 2020
1 parent 87d5c8e commit 1280c22
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 44 deletions.
2 changes: 1 addition & 1 deletion charts/besu/Chart.yaml
Expand Up @@ -14,7 +14,7 @@ type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 0.0.5
version: 0.0.6

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
Expand Down
34 changes: 17 additions & 17 deletions charts/besu/sextant/form.js
Expand Up @@ -24,9 +24,9 @@ const form = [
methods: [
['required', 'Required'],
[
'matches', [`^[a-z]([-a-z0-9]*[a-z0-9])*$`],
'a DNS-1123 label must consist of lower case alphanumeric characters or \'-\', and must start and end with an alphanumeric character'
]
'matches', ['^[a-z]([-a-z0-9]*[a-z0-9])*$'],
'a DNS-1123 label must consist of lower case alphanumeric characters or \'-\', and must start and end with an alphanumeric character',
],
],
},
},
Expand All @@ -43,9 +43,9 @@ const form = [
methods: [
['required', 'Required'],
[
'matches', [`^[a-z]([-a-z0-9]*[a-z0-9])*$`],
'a DNS-1123 label must consist of lower case alphanumeric characters or \'-\', and must start and end with an alphanumeric character'
]
'matches', ['^[a-z]([-a-z0-9]*[a-z0-9])*$'],
'a DNS-1123 label must consist of lower case alphanumeric characters or \'-\', and must start and end with an alphanumeric character',
],
],
},
},
Expand Down Expand Up @@ -98,9 +98,9 @@ const form = [
type: 'string',
methods: [
[
'matches', [`^[a-z]([-a-z0-9]*[a-z0-9])*$`],
'a DNS-1123 label must consist of lower case alphanumeric characters or \'-\', and must start and end with an alphanumeric character'
]
'matches', ['^[a-z]([-a-z0-9]*[a-z0-9])*$'],
'a DNS-1123 label must consist of lower case alphanumeric characters or \'-\', and must start and end with an alphanumeric character',
],
],
},
},
Expand Down Expand Up @@ -130,7 +130,7 @@ const form = [
linked: {
linkedId: 'imagePullSecrets.enabled',
visibilityParameter:
'true' // for what value of linkedId, will this component be visible
'true', // for what value of linkedId, will this component be visible
},
list: {
mainField: 'name',
Expand All @@ -144,24 +144,24 @@ const form = [
methods: [
['required', 'Required'],
[
'matches', [`^[a-z]([-a-z0-9]*[a-z0-9])*$`],
'a DNS-1123 label must consist of lower case alphanumeric characters or \'-\', and must start and end with an alphanumeric character'
]
'matches', ['^[a-z]([-a-z0-9]*[a-z0-9])*$'],
'a DNS-1123 label must consist of lower case alphanumeric characters or \'-\', and must start and end with an alphanumeric character',
],
],
},
}],
table: [{
title: 'Name',
name: 'name',
}]
}
}],
},
},

'Advanced Options',

[
'' // Emptry string acts as space in UI
]
'', // Emptry string acts as space in UI
],

]

Expand Down
30 changes: 15 additions & 15 deletions charts/besu/sextant/options.js
Expand Up @@ -6,45 +6,45 @@

const activated = [{
value: true,
title: 'Enabled'
},{
title: 'Enabled',
}, {
value: false,
title: 'Disabled'
title: 'Disabled',
}]

const yesNo = [{
value: true,
title: 'Yes'
},{
title: 'Yes',
}, {
value: false,
title: 'No'
title: 'No',
}]

const consensus = [{
value: 100,
title: 'DevMode',
blurb: 'DevMode is useful for development purposes only. This mechanism useful only on single node networks which provide no real consensus guarantees.'
},{
blurb: 'DevMode is useful for development purposes only. This mechanism useful only on single node networks which provide no real consensus guarantees.',
}, {
value: 400,
title: 'PBFT',
blurb: 'PBFT is a byzantine fault tolerant consensus mechanism offering good scale, and performance. It is tolerant of up to f=(n-1)/3 byzantine or other faults on the network. PBFT is a non-forking algorithm.'
},{
blurb: 'PBFT is a byzantine fault tolerant consensus mechanism offering good scale, and performance. It is tolerant of up to f=(n-1)/3 byzantine or other faults on the network. PBFT is a non-forking algorithm.',
}, {
value: 300,
title: 'Raft',
blurb: 'Raft is a consensus mechanism based on an elected leader. It offers good performance, but is not tolerant of Byzantine failures. It works best with low latency networks, and is tolerant of f=(n-1)/2 non-byzantine failures. Raft is a non-forking algorithm.'
blurb: 'Raft is a consensus mechanism based on an elected leader. It offers good performance, but is not tolerant of Byzantine failures. It works best with low latency networks, and is tolerant of f=(n-1)/2 non-byzantine failures. Raft is a non-forking algorithm.',
}]

const peering = [{
value: true,
title: 'Dynamic'
},{
title: 'Dynamic',
}, {
value: false,
title: 'Static'
title: 'Static',
}]

module.exports = {
activated,
consensus,
peering,
yesNo
yesNo,
}
12 changes: 1 addition & 11 deletions charts/besu/sextant/summary.js
Expand Up @@ -4,18 +4,8 @@
* License: Product
*/

const options = require('./options')

const getConsensusTitle =
(value) => {
const option = options.consensus.find(o => o.value == value)
return option ? option.title : 'unknown'
}

const summary = (values) => {
const {
daml,
besu,
deployment,
} = values

Expand All @@ -27,7 +17,7 @@ const summary = (values) => {
{
title: 'Namespace',
value: deployment.namespace,
}
},
]
};

Expand Down

0 comments on commit 1280c22

Please sign in to comment.