Skip to content

Commit

Permalink
Merged in bugfix/shibui-2257 (pull request #578)
Browse files Browse the repository at this point in the history
Bugfix/shibui 2257

Approved-by: Ryan Mathis
Approved-by: Dmitriy Kopylenko
  • Loading branch information
chasegawa authored and rmathis committed Jun 28, 2022
2 parents cbd7e85 + e94159e commit dd00fd2
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion backend/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ dependencies {
compile group: 'org.jadira.usertype', name: 'usertype.core', version: '6.0.1.GA'

//For easy data mocking capabilities
compile 'net.andreinc.mockneat:mockneat:0.1.4'
compile 'net.andreinc:mockneat:0.4.7'

//So it works on Java 9 without explicitly requiring to load that module (needed by Hibernate)
runtimeOnly 'javax.xml.bind:jaxb-api:2.3.0'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ class JsonSchemaBuilderService {
result.addAll(customPropertiesConfiguration.getAttributes().collect {
it['name']
})
resultNames.addAll(customPropertiesConfiguration.getAttributes().collect {
it['displayName']
})

json['enum'] = result
json['enumNames'] = resultNames
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ const AttributeReleaseWidget = ({
enumDisabled && (enumDisabled).indexOf(option.value) !== -1;
return (
<tr key={index} className={`${bundle?.indexOf(option.value) > -1 ? 'text-light bg-info' : ''}`}>
<td className="align-middle"><Translate value={`label.attribute-${option.label}`}>{option.label}</Translate></td>
<td className="align-middle"><Translate value={`${option.label}`}>{option.label}</Translate></td>
<td className="">
<fieldset className="d-flex justify-content-end">
<div className="custom-control custom-checkbox bordered-custom-checkbox pe-2">
Expand Down
4 changes: 2 additions & 2 deletions ui/src/app/metadata/hooks/utility.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,9 @@ export const assignValueToProperties = (models, properties, definition, schema)

const items = prop.type === 'array' && prop.items?.enum ? ({
...prop.items,
enum: prop.items.enum.map(item => ({
enum: prop.items.enum.map((item, index) => ({
key: item,
label: `label.attribute-${item}`,
label: `${prop?.items?.enumNames[index] || item}`,
differences: models
.map((model) => {
const value = model[prop.id];
Expand Down

0 comments on commit dd00fd2

Please sign in to comment.