1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-02 20:35:25 +02:00

feat(ui): replace ViewSpinner with JQuery animations

This commit is contained in:
Anthony Lapenna 2016-07-07 12:44:58 +12:00
parent d227bdfc75
commit 3a6e326e5e
23 changed files with 119 additions and 107 deletions

View file

@ -1,6 +1,6 @@
angular.module('containerLogs', [])
.controller('ContainerLogsController', ['$scope', '$stateParams', '$anchorScroll', 'ContainerLogs', 'Container', 'ViewSpinner',
function ($scope, $stateParams, $anchorScroll, ContainerLogs, Container, ViewSpinner) {
.controller('ContainerLogsController', ['$scope', '$stateParams', '$anchorScroll', 'ContainerLogs', 'Container',
function ($scope, $stateParams, $anchorScroll, ContainerLogs, Container) {
$scope.state = {};
$scope.state.displayTimestampsOut = false;
$scope.state.displayTimestampsErr = false;
@ -8,24 +8,24 @@ function ($scope, $stateParams, $anchorScroll, ContainerLogs, Container, ViewSpi
$scope.stderr = '';
$scope.tailLines = 2000;
ViewSpinner.spin();
$('#loadingViewSpinner').show();
Container.get({id: $stateParams.id}, function (d) {
$scope.container = d;
ViewSpinner.stop();
$('#loadingViewSpinner').hide();
}, function (e) {
if (e.status === 404) {
Messages.error("Not found", "Container not found.");
} else {
Messages.error("Failure", e.data);
}
ViewSpinner.stop();
$('#loadingViewSpinner').hide();
});
function getLogs() {
ViewSpinner.spin();
$('#loadingViewSpinner').show();
getLogsStdout();
getLogsStderr();
ViewSpinner.stop();
$('#loadingViewSpinner').hide();
}
function getLogsStderr() {

View file

@ -1,5 +1,7 @@
<rd-header>
<rd-header-title title="Container logs"></rd-header-title>
<rd-header-title title="Container logs">
<i id="loadingViewSpinner" class="fa fa-cog fa-spin"></i>
</rd-header-title>
<rd-header-content>
Containers > <a ui-sref="container({id: container.Id})">{{ container.Name|trimcontainername }}</a> > Logs
</rd-header-content>