mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-04-20 23:56:34 -04:00
replace jobs page with home page which also lists services
This commit is contained in:
parent
343b5c0f82
commit
998c3975b2
@ -3,7 +3,9 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
||||
<title>Brozzler Console</title>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.5/css/bootstrap.css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.5/css/bootstrap-theme.css">
|
||||
|
@ -12,10 +12,6 @@ brozzlerConsoleApp.config(["$routeProvider", "$locationProvider",
|
||||
templateUrl: "/static/partials/workers.html",
|
||||
controller: "WorkersListController"
|
||||
}).
|
||||
when("/jobs", {
|
||||
templateUrl: "/static/partials/jobs.html",
|
||||
controller: "JobsListController"
|
||||
}).
|
||||
when("/jobs/:id", {
|
||||
templateUrl: "/static/partials/job.html",
|
||||
controller: "JobController"
|
||||
@ -25,7 +21,8 @@ brozzlerConsoleApp.config(["$routeProvider", "$locationProvider",
|
||||
controller: "SiteController"
|
||||
}).
|
||||
when("/", {
|
||||
redirectTo: "/jobs"
|
||||
templateUrl: "/static/partials/home.html",
|
||||
controller: "HomeController"
|
||||
}).
|
||||
otherwise({
|
||||
template: '<div> <div class="page-header"> <h1>Not Found</h1> </div> <div class="row"> <div class="col-sm-12"> How the heck did you get here? </div> </div> </div> ',
|
||||
@ -53,11 +50,14 @@ brozzlerConsoleApp.filter("byteformat", function() {
|
||||
|
||||
var brozzlerControllers = angular.module("brozzlerControllers", []);
|
||||
|
||||
brozzlerControllers.controller("JobsListController", ["$scope", "$http",
|
||||
brozzlerControllers.controller("HomeController", ["$scope", "$http",
|
||||
function($scope, $http) {
|
||||
$http.get("/api/jobs").success(function(data) {
|
||||
$scope.jobs = data.jobs;
|
||||
});
|
||||
$http.get("/api/services").success(function(data) {
|
||||
$scope.services = data.services;
|
||||
});
|
||||
}]);
|
||||
|
||||
brozzlerControllers.controller("WorkersListController", ["$scope", "$http",
|
||||
|
@ -1,5 +1,5 @@
|
||||
<ol class="breadcrumb">
|
||||
<li class="active">Jobs</li>
|
||||
<li class="active">Home</li>
|
||||
</ol>
|
||||
|
||||
<div class="page-header">
|
||||
@ -9,6 +9,37 @@
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h2>Services</h2>
|
||||
|
||||
<p><a href="/workers">Brozzler Workers</a></p>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>role</th>
|
||||
<th>host</th>
|
||||
<th>pid</th>
|
||||
<th>load</th>
|
||||
<th>first heartbeat</th>
|
||||
<th>last heartbeat</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="service in services">
|
||||
<td>{{service.role}}</td>
|
||||
<td>{{service.host}}</td>
|
||||
<td>{{service.pid}}</td>
|
||||
<td>{{service.load}}</td>
|
||||
<td>{{service.first_heartbeat}}</td>
|
||||
<td>{{service.last_heartbeat}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2>Jobs</h2>
|
||||
|
||||
<div class="row">
|
@ -1,6 +1,6 @@
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="/jobs">Jobs</a></li>
|
||||
<li class="active">{{job.id}}</li>
|
||||
<li><a href="/">Home</a></li>
|
||||
<li class="active">Job {{job.id}}</li>
|
||||
</ol>
|
||||
|
||||
<div class="page-header">
|
||||
|
@ -1,6 +1,6 @@
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="/jobs">Jobs</a></li>
|
||||
<li><a href="/jobs/{{site.job_id}}">{{site.job_id}}</a></li>
|
||||
<li><a href="/">Home</a></li>
|
||||
<li><a href="/jobs/{{site.job_id}}">Job {{site.job_id}}</a></li>
|
||||
<li class="active">{{site.seed}}</li>
|
||||
</ol>
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="/">Home</a></li>
|
||||
<li class="active">Workers</li>
|
||||
</ol>
|
||||
|
||||
@ -13,10 +14,11 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-6 col-lg-6" ng-repeat="worker in workers">
|
||||
{{worker.host}}
|
||||
<div>{{worker.host}}</div>
|
||||
<iframe style="width:45rem;height:32rem;"
|
||||
ng-src="{{'/static/noVNC/vnc.html?host=' + worker.host + '&port=' + worker.vnc_websocket_port + '&autoconnect=1&resize=downscale'}}">
|
||||
ng-src="{{'/static/noVNC/vnc.html?host=' + worker.host + '&port=8901&autoconnect=1&resize=downscale'}}">
|
||||
</iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user