Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/fernandezvara/semaphore
Browse files Browse the repository at this point in the history
…into fernandezvara-develop
  • Loading branch information
matejkramny committed Aug 19, 2017
2 parents b9c2dbe + 703f152 commit cccc0b6
Show file tree
Hide file tree
Showing 7 changed files with 345 additions and 262 deletions.
6 changes: 3 additions & 3 deletions make.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ if [ "$1" == "watch" ]; then

nodemon -w js -i bundle.js -e js bundler.js &
nodemon -w css -e less --exec "lessc css/semaphore.less > css/semaphore.css" &
pug -w -P $(find ./html/ -name "*.pug") &
pug -w -P --doctype html $(find ./html/ -name "*.pug") &

cd -
reflex -r '\.go$' -R '^public/vendor/' -R '^node_modules/' -s -d none -- sh -c 'go build -i -o /tmp/semaphore_bin cli/main.go && /tmp/semaphore_bin'

exit 0
fi

Expand All @@ -96,4 +96,4 @@ if [ "$1" == "release" ]; then
VERSION=$2 find . -name "semaphore_*" -exec sh -c 'github-release upload -u ansible-semaphore -r semaphore -t "v$VERSION" -n "${1/.\/}" -f "$1"' _ {} \;
echo "Done"
rm -f semaphore_*
fi
fi
3 changes: 2 additions & 1 deletion public/bundle.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"/vendor/angular-loading-bar/loading-bar",
"/vendor/moment/moment.min",
"/vendor/sweetalert/sweetalert.min",
"/vendor/scrollglue",

"app",
"routes/router",
Expand All @@ -16,4 +17,4 @@

"/vendor/require.min",
"../require_config"
]
]
14 changes: 14 additions & 0 deletions public/css/semaphore.less
Original file line number Diff line number Diff line change
Expand Up @@ -184,3 +184,17 @@ pre {
background-color: #DD6B55;
color: #fff;
}

textarea.scroll {
resize: none;
width: 100%;
height: 100%;
padding: 10px;
display: block;
height: ~"calc(100vh - 350px)";
overflow-y: auto;
font-family: @font-family-monospace;
font-size: 12px;
border: 1px solid #ccc;
border-radius: @border-radius-base;
}
4 changes: 2 additions & 2 deletions public/html/projects/taskModal.pug
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
dt Raw output
dd: input(type="checkbox" ng-model="raw" title="show logs unbesmirched")

pre: code {{ output_formatted }}
textarea.scroll(scroll-glue) {{ output_formatted }}

.modal-footer
button.btn.btn-default.pull-left(ng-click="$dismiss()") Dismiss
button.btn.btn-danger(ng-click="remove()") delete
//- button.btn.btn-success(ng-click="restart(task)") Re-Run
//- button.btn.btn-success(ng-click="restart(task)") Re-Run
4 changes: 2 additions & 2 deletions public/js/app.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var app = angular.module('semaphore', ['scs.couch-potato', 'ui.router', 'ui.bootstrap', 'angular-loading-bar']);
var app = angular.module('semaphore', ['scs.couch-potato', 'ui.router', 'ui.bootstrap', 'angular-loading-bar', 'luegg.directives']);

couchPotato.configureApp(app);

Expand Down Expand Up @@ -99,4 +99,4 @@ app.run(['$rootScope', '$window', '$couchPotato', '$injector', '$state', '$http'
}

$rootScope.refreshUser();
}]);
}]);
7 changes: 6 additions & 1 deletion public/js/controllers/projects/taskRunner.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ define(function () {

app.registerController('TaskCtrl', ['$scope', '$http', function ($scope, $http) {
$scope.raw = false;
$scope.task = $scope.task;
var logData = [];
var onDestroy = [];

Expand All @@ -30,6 +31,10 @@ define(function () {
o = d.format('HH:mm:ss') + ': ' + o;
}

if ($scope.task.id !== data.task_id) {
return;
}

for (var i = 0; i < logData.length; i++) {
if (d.isAfter(logData[i].time)) {
// too far -- no point scanning rest of data as its in chronological order
Expand Down Expand Up @@ -95,4 +100,4 @@ define(function () {
});
});
}]);
});
});
Loading

0 comments on commit cccc0b6

Please sign in to comment.