mirror of
https://github.com/ansible/awx.git
synced 2024-11-04 12:51:18 +03:00
Latest UI changes
This commit is contained in:
parent
69ac7404c3
commit
567605cc59
@ -12,18 +12,27 @@
|
||||
|
||||
function Home ($routeParams, $scope, $rootScope, $location, Wait, ObjectCount, ClearScope)
|
||||
{
|
||||
//ClearScope('htmlTemplate'); //Garbage collection. Don't leave behind any listeners/watchers from the prior
|
||||
//scope.
|
||||
if (!$routeParams['login']) {
|
||||
Wait('start');
|
||||
}
|
||||
|
||||
ObjectCount({ target: 'container1' });
|
||||
ClearScope('home'); //Garbage collection. Don't leave behind any listeners/watchers from the prior
|
||||
//scope.
|
||||
|
||||
if (!$routeParams['login']) {
|
||||
Wait('stop');
|
||||
}
|
||||
var waitCount = 1;
|
||||
var loadedCount = 0;
|
||||
|
||||
if (!$routeParams['login']) {
|
||||
// If we're not logging in, start the Wait widget. Otherwise, it's already running.
|
||||
Wait('start');
|
||||
}
|
||||
|
||||
ObjectCount({ target: 'container1' });
|
||||
|
||||
$rootScope.$on('WidgetLoaded', function() {
|
||||
// Once all the widget report back 'loaded', turn off Wait widget
|
||||
console.log('got here!');
|
||||
loadedCount++;
|
||||
if ( loadedCount == waitCount ) {
|
||||
Wait('stop');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Home.$inject=[ '$routeParams', '$scope', '$rootScope', '$location', 'Wait', 'ObjectCount', 'ClearScope'];
|
@ -83,6 +83,7 @@ angular.module('ObjectCountWidget', ['RestServices', 'Utilities'])
|
||||
//scope = element.scope(); // Set scope specific to the element we're compiling, avoids circular reference
|
||||
// From here use 'scope' to manipulate the form, as the form is not in '$scope'
|
||||
$compile(element)(scope);
|
||||
$rootScope.$emit('WidgetLoaded');
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user