mirror of
https://github.com/ZwareBear/awx.git
synced 2026-04-18 14:01:49 -05:00
Add Config model
* Add ability to configurably cache API responses per model * Fix general error display on credentials * Add current version from API to the documentation link
This commit is contained in:
@@ -1,14 +1,19 @@
|
||||
export default ['$stateParams', '$scope', '$state', 'GetBasePath', 'QuerySet', 'SmartSearchService', 'i18n',
|
||||
function($stateParams, $scope, $state, GetBasePath, qs, SmartSearchService, i18n) {
|
||||
export default ['$stateParams', '$scope', '$state', 'GetBasePath', 'QuerySet', 'SmartSearchService', 'i18n', 'ConfigModel',
|
||||
function($stateParams, $scope, $state, GetBasePath, qs, SmartSearchService, i18n, ConfigModel) {
|
||||
|
||||
let path,
|
||||
defaults,
|
||||
queryset,
|
||||
stateChangeSuccessListener;
|
||||
stateChangeSuccessListener,
|
||||
configModel = new ConfigModel();
|
||||
|
||||
init();
|
||||
configModel.request('get')
|
||||
.then(() => init());
|
||||
|
||||
function init() {
|
||||
let version = configModel.getTruncatedVersion() || 'latest';
|
||||
|
||||
$scope.documentationLink = `http://docs.ansible.com/ansible-tower/${version}/html/userguide/search_sort.html`;
|
||||
|
||||
if($scope.defaultParams) {
|
||||
defaults = $scope.defaultParams;
|
||||
|
||||
Reference in New Issue
Block a user