-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #52 from ansibleguy76/release/v3.0.5
v3.0.5 into main
- Loading branch information
Showing
23 changed files
with
521 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
ext.version_code = 030004 | ||
ext.version_name = "3.0.4" | ||
ext.version_code = 30005 | ||
ext.version_name = "3.0.5" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,13 +7,13 @@ | |
<nav class="level"> | ||
<!-- Left side --> | ||
<div class="level-left"> | ||
<p class="level-item"><BulmaButton icon="plus" label="New Repo" @click="repoItem=-1;loadRepo()"></BulmaButton></p> | ||
<p class="level-item"><BulmaButton icon="plus" label="New Repo" @click="reset();loadRepo()"></BulmaButton></p> | ||
<p class="level-item"><BulmaButton icon="server" label="Add known hosts" @click="reset();known_hosts=1"></BulmaButton></p> | ||
</div> | ||
</nav> | ||
<div class="columns"> | ||
<div class="column"> | ||
<div class="column" v-if="repoList && repoList.length>0"> | ||
<BulmaAdminTable | ||
v-if="repoList && repoList.length>0" | ||
:dataList="repoList" | ||
:labels="['Name']" | ||
:columns="['']" | ||
|
@@ -25,17 +25,25 @@ | |
/> | ||
</div> | ||
<transition name="add-column" appear> | ||
<div class="column is-two-thirds" v-if="repoItem!==undefined && !showDelete"> | ||
<div class="column is-two-thirds" v-if="repoItem!==undefined && known_hosts!==1 && !showDelete"> | ||
<div v-if="repoStatus || loading" class="box is-family-monospace enable-line-break is-size-7"> | ||
<span v-if="loading" class="icon"><font-awesome-icon icon="spinner" spin /></span> | ||
<div v-html="repoStatus"></div> | ||
</div> | ||
<BulmaCheckbox v-if="!repoStatus && !loading" checktype="checkbox" v-model="repo.isAdvanced" label="Advanced" /> | ||
<BulmaInput v-if="!repoStatus && !loading && !repo.isAdvanced" :icon="['fab','git-square']" v-model="repo.uri" label="Repository Uri" placeholder="[email protected]:myrepo" :required="true" :hasError="$v.repo.uri.$invalid" :errors="[]" /> | ||
<BulmaInput v-if="!repoStatus && !loading && repo.isAdvanced" :icon="['fab','git-square']" v-model="repo.command" label="Repository Clone Command" placeholder="git clone --quite --verbose [email protected]:myrepo" :required="true" :hasError="$v.repo.command.$invalid" :errors="[]" /> | ||
<BulmaInput v-if="!repoStatus && !loading" icon="user" v-model="repo.username" label="Repository Username" placeholder="Ansibleforms" :required="true" :hasError="$v.repo.username.$invalid" :errors="[]" /> | ||
<BulmaInput v-if="!repoStatus && !loading" icon="envelope" v-model="repo.email" label="Repository Email" placeholder="[email protected]" :required="true" :hasError="$v.repo.email.$invalid" :errors="[]" /> | ||
<BulmaButton v-if="repoItem==-1 && !loading" icon="save" label="Create Repository" @click="newRepo()"></BulmaButton> | ||
</div> | ||
</transition> | ||
<transition name="add-column" appear> | ||
<div class="column is-two-thirds" v-if="known_hosts==1 && !showDelete"> | ||
<BulmaInput icon="server" v-model="hosts" label="Known hosts" placeholder="github.com,bitbucket.com" :required="true" :hasError="$v.hosts.$invalid" :errors="[]" /> | ||
<BulmaButton v-if="known_hosts==1 && !loading" icon="server" label="Add to known hosts" @click="addKnownHosts()"></BulmaButton> | ||
</div> | ||
</transition> | ||
</div> | ||
</div> | ||
</section> | ||
|
@@ -67,10 +75,14 @@ | |
repo:{ | ||
uri:"", | ||
isAdvanced:false, | ||
command:"" | ||
command:"", | ||
username:"Ansibleforms", | ||
email:"[email protected]" | ||
}, | ||
showDelete:false, | ||
repoItem:undefined, | ||
known_hosts:undefined, | ||
hosts:"", | ||
repoList:[], | ||
alert:{ | ||
timeout:undefined, | ||
|
@@ -97,6 +109,14 @@ | |
ref.$toast.error(error.message); | ||
}; | ||
}, | ||
reset(){ | ||
this.repoItem=-1 | ||
this.known_hosts=-1 | ||
this.repo.uri="" | ||
this.repo.command="" | ||
this.repo.username="Ansibleforms" | ||
this.repo.email="[email protected]" | ||
}, | ||
selectItem(value){ | ||
this.repoItem=value | ||
this.loadRepo() | ||
|
@@ -124,9 +144,7 @@ | |
}; | ||
}else{ | ||
console.log("No item selected") | ||
this.repo = { | ||
name:"" | ||
} | ||
this.reset() | ||
this.repoStatus=undefined | ||
} | ||
},deleteRepo(){ | ||
|
@@ -153,7 +171,7 @@ | |
if(result.data.status=="error"){ | ||
ref.$toast.error(result.data.message + ", " + result.data.data.error); | ||
}else{ | ||
ref.repo.uri="" | ||
ref.reset() | ||
ref.$toast.success("Created repository"); | ||
ref.loadAll(); | ||
} | ||
|
@@ -162,7 +180,29 @@ | |
ref.$toast.error(error.message); | ||
}; | ||
} | ||
},showAlert(type,message){ | ||
}, | ||
addKnownHosts(){ | ||
var ref= this; | ||
if (!this.$v.hosts.$invalid) { | ||
this.loading=true | ||
axios.post('/api/v1/repo/known_hosts',{hosts:this.hosts},TokenStorage.getAuthentication()) | ||
.then((result)=>{ | ||
ref.loading=false | ||
if(result.data.status=="error"){ | ||
ref.$toast.error(result.data.message + ", " + result.data.data.error); | ||
}else{ | ||
ref.hosts="" | ||
ref.reset() | ||
ref.$toast.success("Added keys of hosts\n"+result.data.data.output.replaceAll('\n\n','\n')); | ||
ref.loadAll(); | ||
} | ||
}),function(error){ | ||
ref.loading=false | ||
ref.$toast.error(error.message); | ||
}; | ||
} | ||
} | ||
,showAlert(type,message){ | ||
var ref=this; | ||
this.alert.message=message; | ||
if(type){ | ||
|
@@ -186,8 +226,17 @@ | |
return repo.isAdvanced | ||
}), | ||
gitclone | ||
}, | ||
email:{ | ||
required, | ||
}, | ||
username:{ | ||
required | ||
} | ||
}, | ||
hosts:{ | ||
required | ||
} | ||
}, | ||
mounted() { // when the Vue app is booted up, this is run automatically. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.