Skip to content

Commit

Permalink
Merge pull request #39 from ansibleguy76/release/v3.0.1
Browse files Browse the repository at this point in the history
v3.0.1 into main
  • Loading branch information
ansibleguy76 authored Apr 1, 2022
2 parents 4d48582 + 925edc4 commit 3dbef26
Show file tree
Hide file tree
Showing 88 changed files with 3,596 additions and 2,227 deletions.
32 changes: 31 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,34 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [3.0.1] - 2022-04-01

### Added

- Syslog integration (use env variables to tune)
- Relaunch and abort from joblog
- Override repo clone command
- Add log filtering and auto refresh
- Approvals and rejections (using new approval property)

### Changed

- Logger levels changed (error, warning, notice, info, debug) / debug is lowest (silly is deprecated)
- Completely reworked job launch process (neater code and more reusable)
- Swagger job launch is now at job level

### Fixed

- Allow non rsa ssh key
- Add job access to own jobs in joblog
- Repo runs silent

### Removed

- Ansible launch api (see job post now)
- Awx launch api (see job post now)
- Multistep launch api (see job post now)

## [3.0.0] - 2022-03-09

### Added
Expand Down Expand Up @@ -217,7 +245,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.0...HEAD
[Unreleased]: https://github.com/ansibleguy76/ansibleforms/compare/3.0.1...HEAD

[3.0.1]: https://github.com/ansibleguy76/ansibleforms/compare/3.0.0...3.0.1

[3.0.0]: https://github.com/ansibleguy76/ansibleforms/compare/2.2.4...3.0.0

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 = 30000
ext.version_name = "3.0.0"
ext.version_code = 30001
ext.version_name = "3.0.1"
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.0",
"version": "3.0.1",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
Expand Down
Binary file added client/public/assets/img/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 32 additions & 4 deletions client/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
<span class="tag is-warning">{{ thanks.join(', ')}}</span>
</div>
</BulmaModal>
<BulmaNav :isAdmin="isAdmin" @about="showAbout=true" :authenticated="authenticated" :profile="profile" @logout="logout()" :version="version" />
<router-view :isAdmin="isAdmin" :authenticated="authenticated" :errorMessage="errorMessage" :errorData="errorData" @authenticated="login()" @logout="logout()" />
<BulmaNav :isAdmin="isAdmin" @about="showAbout=true" :approvals="approvals" :authenticated="authenticated" :profile="profile" @logout="logout()" :version="version" />
<router-view :isAdmin="isAdmin" :profile="profile" :authenticated="authenticated" :errorMessage="errorMessage" :errorData="errorData" @authenticated="login()" @logout="logout()" @refreshApprovals="loadApprovals()" />
</div>
</template>
<script>
Expand All @@ -56,6 +56,7 @@
authenticated:false,
isAdmin:false,
version:"unknown",
approvals:0,
showAbout:false,
showEasterEgg:false,
thanks:[
Expand Down Expand Up @@ -96,6 +97,18 @@
// silent fail
});
},
loadApprovals(){
var ref=this;
axios.get('/api/v1/job/approvals',TokenStorage.getAuthentication()) // check database
.then((result)=>{
if(result.data.status=="success"){
ref.approvals=result.data.data.output || 0
}
})
.catch(function(err){
// silent fail
});
},
checkDatabase(){
var ref=this;
Expand Down Expand Up @@ -136,11 +149,26 @@
var ref= this;
if(!TokenStorage.isAuthenticated()){
//this.$toast.error("You need to authenticate")
this.$router.replace({ name: "Login" }).catch(err => {}); // no token found, logout
if(this.$route.name!="Login"){
this.$router.replace({ name: "Login", query: {from: this.$route.fullPath} }).catch(err => {}); // no token found, logout
}
}else{
this.$router.push({name:"Home"}).catch(err => {});
if(this.$route.query.from){
this.$router.push({path:this.$route.query.from}).catch(err => {});
}else{
if(this.$route.name){
if(this.$route.name=="Login"){
this.$router.push({name:"Home"}).catch(err => {});
}else{
this.$router.push(this.$route.fullPath).catch(err => {});
}
}else{
this.$router.push({name:"Home"}).catch(err => {});
}
}
this.refreshAuthenticated()
this.loadProfile()
this.loadApprovals()
}
},
logout() {
Expand Down
20 changes: 16 additions & 4 deletions client/src/components/BulmaAdvancedSelect.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div>
<p v-if="queryfilter" class="has-text-info"><span class="icon is-size-7"><font-awesome-icon icon="search" /></span> <span>{{ queryfilter}}</span></p>
<div v-if="!sticky" class="dropdown is-fullwidth" :class="{'is-active':isActive && !isLoading}">
<div v-if="!sticky" class="dropdown is-fullwidth" :class="{'is-active':isActive && !isLoading,'is-up':isUp}">
<div class="dropdown-trigger">
<p class="control has-icons-right" :class="{'has-icons-left':icon!=undefined}">
<input
Expand Down Expand Up @@ -31,7 +31,7 @@
</span>
</p>
</div>
<div class="dropdown-menu" id="dropdown-menu" role="menu">
<div ref="dd" class="dropdown-menu" id="dropdown-menu" role="menu">
<div class="dropdown-content" ref="content" tabindex="0" @keydown.esc="close()" @keydown.tab="close()" @blur="close()" @keydown="doFilter">
<BulmaAdvancedTable
:defaultValue="defaultValue"
Expand Down Expand Up @@ -111,7 +111,8 @@
previewLabel:"",
preview:"",
focus:"",
queryfilter:""
queryfilter:"",
isUp:false
}
},
computed: {
Expand All @@ -126,6 +127,9 @@
}
},
methods:{
testUp(){
},
close(){
this.isActive=false
this.$refs.input.focus({ preventScroll: true })
Expand All @@ -134,9 +138,17 @@
toggle(){
if(this.disabled)return
var ref=this
this.isUp=false
this.isActive=!this.isActive
if(this.isActive){
this.$nextTick(()=>{ref.focus="content"})
this.$nextTick(()=>{
ref.focus="content";
// calculate if we need to do a dropup
var dim = ref.$refs["dd"].getBoundingClientRect()
var wh = window.innerHeight
// if dropdown is out out of view AND there is space for dropup, do dropup
ref.isUp=((dim.bottom>wh) && (dim.top>dim.height))
})
}
},
doFilter(event){
Expand Down
9 changes: 7 additions & 2 deletions client/src/components/BulmaNav.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<div id="navbarAnsibleForms" class="navbar-menu" v-bind:class="{ 'is-active' : showNav }">
<div class="navbar-end">
<router-link class="navbar-item" to="/jobs" v-if="authenticated">
<span class="icon"><font-awesome-icon icon="history" /></span><span>Job history</span>
<span class="icon"><font-awesome-icon icon="history" /></span><span>Job log </span><span v-if="approvals" class="ml-1 is-warning tag">{{approvals}} {{(approvals==1)?"approval":"approvals"}} waiting</span>
</router-link>
<router-link class="navbar-item" to="/designer" v-if="isAdmin && authenticated">
<span class="icon"><font-awesome-icon icon="edit" /></span><span>Designer</span>
Expand All @@ -25,6 +25,9 @@
<div class="navbar-item has-dropdown is-hoverable" v-if="isAdmin && authenticated" >
<a class="navbar-link"><span class="icon"><font-awesome-icon icon="cog" /></span></a>
<div class="navbar-dropdown">
<router-link class="navbar-item" to="/settings">
<span class="icon"><font-awesome-icon icon="cogs" /></span><span>Settings</span>
</router-link>
<router-link class="navbar-item" to="/groups">
<span class="icon"><font-awesome-icon icon="users" /></span><span>Groups</span>
</router-link>
Expand All @@ -34,6 +37,7 @@
<router-link class="navbar-item" to="/ldap">
<span class="icon"><font-awesome-icon icon="id-card" /></span><span>Ldap Connection</span>
</router-link>

<router-link class="navbar-item" to="/awx">
<span class="icon"><font-awesome-icon icon="star" /></span><span>Awx Connection</span>
</router-link>
Expand Down Expand Up @@ -89,7 +93,8 @@
authenticated:{type:Boolean},
isAdmin:{type:Boolean},
profile:{type:Object},
version:{type:String}
version:{type:String},
approvals:{type:Number}
},
data(){
return {
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/BulmaTextArea.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
}
})
export default{
name:"BulmaInput",
name:"BulmaTextArea",
props:{
focus:{type:String,default:""},
value:{type:[String,Number],default:""},
Expand Down
Loading

0 comments on commit 3dbef26

Please sign in to comment.