mirror of
https://github.com/ansible/awx.git
synced 2026-03-02 17:28:51 -03:30
Latest UI changes
This commit is contained in:
@@ -12,18 +12,27 @@
|
|||||||
|
|
||||||
function Home ($routeParams, $scope, $rootScope, $location, Wait, ObjectCount, ClearScope)
|
function Home ($routeParams, $scope, $rootScope, $location, Wait, ObjectCount, ClearScope)
|
||||||
{
|
{
|
||||||
//ClearScope('htmlTemplate'); //Garbage collection. Don't leave behind any listeners/watchers from the prior
|
ClearScope('home'); //Garbage collection. Don't leave behind any listeners/watchers from the prior
|
||||||
//scope.
|
//scope.
|
||||||
if (!$routeParams['login']) {
|
|
||||||
Wait('start');
|
|
||||||
}
|
|
||||||
|
|
||||||
ObjectCount({ target: 'container1' });
|
|
||||||
|
|
||||||
if (!$routeParams['login']) {
|
var waitCount = 1;
|
||||||
Wait('stop');
|
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'];
|
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
|
//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'
|
// From here use 'scope' to manipulate the form, as the form is not in '$scope'
|
||||||
$compile(element)(scope);
|
$compile(element)(scope);
|
||||||
|
$rootScope.$emit('WidgetLoaded');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user