Add getVersion method
This commit is contained in:
parent
f9bb0bb976
commit
6f0a369038
|
@ -271,6 +271,10 @@ export default {
|
|||
|
||||
getApplicationType (application) {
|
||||
return this.getTypes()[application.type]
|
||||
},
|
||||
|
||||
getVersion (type, environment) {
|
||||
return _(environment).get(`versions.${type}`)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ export default {
|
|||
return null
|
||||
}
|
||||
|
||||
return _.get(this.getEnvironment(this.application.id, 'prod'), 'versions.php')
|
||||
return this.getVersion('php', this.getEnvironment(this.application.id, 'prod'))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -171,7 +171,7 @@ export default {
|
|||
},
|
||||
|
||||
phpVersion: function () {
|
||||
return _(this.environment).get('versions.php')
|
||||
return this.getVersion('php', this.environment)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue