Skip to content

Commit

Permalink
Merge pull request #54 from ansibleguy76/release/v3.0.6
Browse files Browse the repository at this point in the history
v3.0.6 into main
  • Loading branch information
ansibleguy76 authored Aug 10, 2022
2 parents 93aba0c + 6f1487d commit cc11a9d
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 22 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [3.0.6] - 2022-08-10

### Fixed

- Fixed multiselect bug

## [3.0.5] - 2022-07-06

### Added
Expand Down Expand Up @@ -297,7 +303,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Allow change password for current local user
- Start tracking versions

[Unreleased]: https://github.com/ansibleguy76/ansibleforms/compare/3.0.5...HEAD
[Unreleased]: https://github.com/ansibleguy76/ansibleforms/compare/3.0.6...HEAD

[3.0.6]: https://github.com/ansibleguy76/ansibleforms/compare/3.0.5...3.0.6

[3.0.5]: https://github.com/ansibleguy76/ansibleforms/compare/3.0.4...3.0.5

Expand Down
4 changes: 2 additions & 2 deletions app_versions.gradle
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
ext.version_code = 30005
ext.version_name = "3.0.5"
ext.version_code = 30006
ext.version_name = "3.0.6"
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": "3.0.5",
"version": "3.0.6",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
Expand Down
7 changes: 5 additions & 2 deletions client/src/components/BulmaAdvancedTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@
selectedItems(){
return this.values.filter((v,i) => this.selected[i])
},
test(){
return this.selected[0]
},
checkAll(){
var ref=this
var all=true
Expand Down Expand Up @@ -224,11 +227,11 @@
},
select(i){
if(this.multiple){
this.selected[i]=!this.selected[i];
Vue.set(this.selected,i,!this.selected[i]);
}else{
var temp = !this.selected[i] // if single just clear and invert selection
this.selected=[]
this.selected[i]=temp;
Vue.set(this.selected,i,temp);
this.$emit('isSelected');
}
this.recalc()
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": "3.0.5",
"version": "3.0.6",
"repository": {
"type": "git",
"url": "git://github.com/ansibleguy76/ansibleforms.git"
Expand Down
34 changes: 20 additions & 14 deletions server/src/models/repo.model.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ Repo.color = function(t){

Repo.findAll = function () {
return new Promise((resolve,reject)=>{
var directory = config.repoPath
var repos
try{
var directory = config.repoPath
var repos
try{
fs.accessSync(directory)
}catch(e){
Expand All @@ -27,32 +27,31 @@ Repo.findAll = function () {
}catch(err){
logger.error(err)
reject(err)
return;
}
}
repos = fs.readdirSync(directory, { withFileTypes: true })
.filter(dir => dir.isDirectory())
.map(dir => dir.name)
resolve(repos)
}catch(e){
logger.error(e)
reject(e)
}catch(err){
logger.error(err)
reject(err)
return;
}
resolve(repos)
})

}
Repo.delete = function (name) {
return new Promise((resolve,reject)=>{
logger.notice("Deleting repository " + name)
var directory = config.repoPath
try{
logger.notice("Deleting repository " + name)
var directory = config.repoPath
try{
fs.accessSync(path.join(directory,name))
}catch(e){
reject(e)
}
fs.accessSync(path.join(directory,name))
// if found and access continue with delete
fs.rmSync(path.join(directory,name),{force:true,recursive:true})
resolve()
}catch(e){
// not found - we don't fail and don't delete
logger.error(e)
reject(e)
}
Expand All @@ -68,6 +67,7 @@ Repo.findByName = function (name,text){
fs.accessSync(directory)
}catch(e){
reject(e)
return;
}
var info = exec(`git remote show origin && git log -n 1`,{cwd:directory})
var output=[]
Expand Down Expand Up @@ -121,6 +121,7 @@ Repo.create = function (uri,command,username,email) {
}catch(err){
logger.error(err)
reject(err)
return;
}
}
var clone
Expand All @@ -131,6 +132,7 @@ Repo.create = function (uri,command,username,email) {
cmd = command
}else{
reject("No uri or command given")
return;
}
var repoNameRegex = new RegExp(".*/([^\.]+)\.git.*", "g");
var match = repoNameRegex.exec(uri);
Expand Down Expand Up @@ -190,6 +192,7 @@ Repo.addKnownHosts = function (hosts) {
try{
if(!hosts){
reject("No hosts given")
return;
}else{
logger.notice(`Adding keys for hosts ${hosts}`)
var cmd = `ssh-keyscan ${hosts} >> ~/.ssh/known_hosts`
Expand All @@ -205,8 +208,10 @@ Repo.addKnownHosts = function (hosts) {
logger.debug('exit')
if(code==0){
resolve(`Adding keys ran succesfully\n${output.join("\n")}`)
return;
}else{
reject(`\nAdding keys failed with code ${code}\n${output.join("\n")}`)
return;
}
});

Expand All @@ -218,6 +223,7 @@ Repo.addKnownHosts = function (hosts) {
}catch(e){
logger.error(e)
reject(e)
return;
}
})
};
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": "3.0.5",
"version": "3.0.6",
"title": "AnsibleForms",
"contact": {
"email": "[email protected]"
Expand Down

0 comments on commit cc11a9d

Please sign in to comment.