Skip to content

Commit

Permalink
bugfix + new netapp collection 22.8.2
Browse files Browse the repository at this point in the history
  • Loading branch information
vcmirko committed Nov 10, 2023
1 parent 0e9f346 commit 426baff
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 8 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed

- javascript replace error with defaults
- Newer Netapp collection 22.8.2

## [4.0.17] - 2023-11-07

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ansible_forms_vue",
"version": "4.0.17",
"version": "4.0.18",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
Expand Down
10 changes: 5 additions & 5 deletions client/src/components/Form.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1088,7 +1088,7 @@
}else{
// console.log("found no in " + foundfield + " in " + field)
}
foundfield=foundfield.replace(/\[[0-9]*\]/,'') // xxx[y] => xxx
foundfield=foundfield?.replace(/\[[0-9]*\]/,'') // xxx[y] => xxx
if(fields.includes(foundfield)){ // does field xxx exist in our form ?
//console.log(foundfield + " is a real field")
if(foundfield in ref.dynamicFieldDependencies){ // did we declare it before ?
Expand Down Expand Up @@ -1270,7 +1270,7 @@
// console.log("item = " + value)
// console.log(typeof value)
// console.log(testRegex)
value = value.replace(/\n+/g, '') // put everything in 1 line.
value = value?.replace(/\n+/g, ' ') // put everything in 1 line.
matches=[...value.matchAll(testRegex)] // force match array
for(match of matches){
// console.log("-> match : " + match[0] + "->" + match[1])
Expand All @@ -1286,7 +1286,7 @@
column=ref.fieldOptions[foundfield].placeholderColumn||"" // get placeholder column
}
}
foundfield=foundfield.replace(/\[[0-9]*\]/,'') // make xxx[y] => xxx
foundfield=foundfield?.replace(/\[[0-9]*\]/,'') // make xxx[y] => xxx
fieldvalue = undefined
targetflag = undefined
// mark the field as a dependent field
Expand All @@ -1302,7 +1302,7 @@
fieldvalue=JSON.stringify(Helpers.replacePlaceholders(match[1],ref.form)) // allow full object reference
// drop wrapping quotes
if(typeof fieldvalue=="string"){ // drop quotes if string
fieldvalue=fieldvalue.replace(/^\"+/, '').replace(/\"+$/, ''); // eslint-disable-line
fieldvalue=fieldvalue?.replace(/^\"+/, '').replace(/\"+$/, ''); // eslint-disable-line
}else{
// console.log(typeof fieldvalue)
}
Expand Down Expand Up @@ -1332,7 +1332,7 @@
}
fieldvalue=ref.stringifyValue(fieldvalue)
// console.log("replacing placeholder")
value=value.replace(foundmatch,fieldvalue); // replace the placeholder with the value
value=value?.replace(foundmatch,fieldvalue); // replace the placeholder with the value
// console.log("replaced")
// console.log(foundmatch + " -> " + fieldvalue)
}else{
Expand Down
2 changes: 1 addition & 1 deletion server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ansible_forms",
"version": "4.0.17",
"version": "4.0.18",
"repository": {
"type": "git",
"url": "git://github.com/ansibleguy76/ansibleforms.git"
Expand Down
2 changes: 1 addition & 1 deletion server/src/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"swagger": "2.0",
"info": {
"description": "This is the swagger interface for AnsibleForms.\r\nUse the `/auth/login` api with basic authentication to obtain a JWT token.\r\nThen use the access token, prefixed with the word '**Bearer**' to use all other api's.\r\nNote that the access token is limited in time. You can then either login again and get a new set of tokens or use the `/token` api and the refresh token to obtain a new set (preferred).",
"version": "4.0.17",
"version": "4.0.18",
"title": "AnsibleForms",
"contact": {
"email": "[email protected]"
Expand Down

0 comments on commit 426baff

Please sign in to comment.