major refactoring of the api
This commit is contained in:
1 parent
d4f7dc57fc
commit
f0628e4682
38 files changed
+821
-367
No files matched your search
@@ -18,7 +18,6 @@
|
||||
"angular-mocks": "~1.2.1",
|
||||
"requirejs": "~2.1.9",
|
||||
"requirejs-text": "~2.0.10",
|
||||
"foundation": "zurb/bower-foundation",
|
||||
"html5-boilerplate": "~4.3.0",
|
||||
"angularAMD": "~0.2.1",
|
||||
"angular-foundation": "~0.5.1"
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
define [
|
||||
"angularAMD"
|
||||
"angular-route"
|
||||
@@ -9,6 +10,10 @@ define [
|
||||
templateUrl: "partials/home.html"
|
||||
controller: "HomeCtrl"
|
||||
controllerUrl: "controllers/homeCtrl"
|
||||
)).when("/serverspec", angularAMD.route(
|
||||
templateUrl: "partials/serverspec.html"
|
||||
controller: "ServerspecCtrl"
|
||||
controllerUrl: "controllers/serverspecCtrl"
|
||||
)).when("/apispec", angularAMD.route(
|
||||
templateUrl: "partials/apispec.html"
|
||||
controller: "ApispecCtrl"
|
||||
@@ -32,4 +37,6 @@ define [
|
||||
)).otherwise redirectTo: "/"
|
||||
return
|
||||
|
||||
serverspec
|
||||
|
||||
angularAMD.bootstrap(app)
|
||||
@@ -0,0 +1,7 @@
|
||||
define ["app"], (app) ->
|
||||
app.controller "ServerspecCtrl",["$scope", "$http", ($scope, $http) ->
|
||||
$scope.server = {}
|
||||
$http.get("/api/server").then (res) -> $scope.server = res.data
|
||||
return
|
||||
]
|
||||
return
|
||||
+2
-1
@@ -5,6 +5,7 @@ var help = require('gulp-task-listing');
|
||||
var clean = require('gulp-clean');
|
||||
var sass = require('gulp-sass');
|
||||
var rjs = require("gulp-rjs");
|
||||
var gutil = require('gulp-util');
|
||||
|
||||
|
||||
gulp.task('help', help);
|
||||
@@ -22,7 +23,7 @@ gulp.task('sass', ['bower'], function () {
|
||||
|
||||
gulp.task('coffee', ['bower'], function() {
|
||||
return gulp.src('coffee/**/*.coffee')
|
||||
.pipe(coffee({bare: true}))
|
||||
.pipe(coffee({bare: true}).on('error', gutil.log))
|
||||
.pipe(gulp.dest('js/'))
|
||||
});
|
||||
|
||||
|
||||
+27
-29
@@ -8,37 +8,35 @@
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="off-canvas-wrap">
|
||||
<div class="inner-wrap">
|
||||
|
||||
<nav class="tab-bar">
|
||||
<section class="middle tab-bar-section">
|
||||
<h1 class="title">Doorman</h1>
|
||||
</section>
|
||||
|
||||
<section class="right-small">
|
||||
<a class="right-off-canvas-toggle menu-icon" ><span></span></a>
|
||||
</section>
|
||||
</nav>
|
||||
|
||||
<aside class="right-off-canvas-menu">
|
||||
<ul class="off-canvas-list">
|
||||
<li><a></a></li>
|
||||
<li><a href="#/doormen">doormen</a></li>
|
||||
<li><a href="#/newdoorman">new doorman</a></li>
|
||||
<li><a href="#/apispec">api specification</a></li>
|
||||
<li><a href="#/serverspec">server specification</a></li>
|
||||
</ul>
|
||||
</aside>
|
||||
|
||||
<section class="main-section">
|
||||
<div class="large-12 small-12 columns" ng-view>
|
||||
</section>
|
||||
|
||||
|
||||
<a class="exit-off-canvas"></a>
|
||||
</div>
|
||||
</div>
|
||||
<top-bar>
|
||||
<ul class="title-area">
|
||||
<li class="name">
|
||||
<h1><a href="#">Doorman</a></h1>
|
||||
</li>
|
||||
<li toggle-top-bar class="menu-icon"><a href="#">Menu</a></li>
|
||||
</ul>
|
||||
|
||||
<top-bar-section>
|
||||
<!-- Right Nav Section -->
|
||||
<ul class="right">
|
||||
<li has-dropdown>
|
||||
<a href="#">Dropdown</a>
|
||||
<ul top-bar-dropdown>
|
||||
<li><a href="#/doormen">doormen</a></li>
|
||||
<li><a href="#/newdoorman">new doorman</a></li>
|
||||
<li><a href="#/apispec">api specification</a></li>
|
||||
<li><a href="#/serverspec">server specification</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</top-bar-section>
|
||||
</top-bar>
|
||||
|
||||
<div class="large-12 small-12 columns" ng-view></div>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -1,6 +1,6 @@
|
||||
<div class="row wab-apispect">
|
||||
<div class="row">
|
||||
<div class="columns large-12">
|
||||
<h2>Api specification</h2>
|
||||
<h1>Api specification</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -15,6 +15,11 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><wab-api endpoint="/server"></wab-api></td>
|
||||
<td><wab-method method="get"></wab-method></td>
|
||||
<td>Get the server specification</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><wab-api endpoint="/doormen"></wab-api></td>
|
||||
<td><wab-method method="get"></wab-method></td>
|
||||
@@ -40,6 +45,16 @@
|
||||
<td><wab-method method="delete"></wab-method></td>
|
||||
<td>Delete the doorman</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><wab-api endpoint="/doormen/:id/status"></wab-api></td>
|
||||
<td><wab-method method="get"></wab-method></td>
|
||||
<td>Return the state of the doormen as expected by the client</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><wab-api endpoint="/doormen/:id/result?data=<base64>"></wab-api></td>
|
||||
<td><wab-method method="get"></wab-method></td>
|
||||
<td>Return the state of the doormen as expected by the client</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="columns large-12">
|
||||
<h2>{{ doorman.name }} </h2>
|
||||
<h1>{{ doorman.name }} </h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -19,11 +20,27 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="row">
|
||||
<div class="columns large-12 small-12">
|
||||
<h3>try it!</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<textarea class="large-offset-1 small-offset-1 large-10 small-10 columns">
|
||||
</textarea>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="large-offset-1 small-offset-1 large-10 small-10 columns">
|
||||
<a href="#" class="button tiny">try</a>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div class="row">
|
||||
<div class="large-12 small-12 columns">
|
||||
<ul class="button-group">
|
||||
<li><a ng-click="updateDoorman()" class="small button" ng-class="{disabled: !validate()}">Update</a></li>
|
||||
<li><a ng-click="deleteDoorman()" class="small button">Delete</a></li>
|
||||
<li><a ng-click="updateDoorman()" class="small button" ng-class="{disabled: !validate()}">Update</a></li>
|
||||
<li><a ng-click="deleteDoorman()" class="small button">Delete</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,3 +1,8 @@
|
||||
<div class="row">
|
||||
<div class="columns large-12">
|
||||
<h1>error page</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="columns large-12">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<div class="row">
|
||||
<div class="columns large-12">
|
||||
<h2>doormen</h2>
|
||||
<h1>doormen</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
<h2>Welcome to the world best a/b testing library</h2>
|
||||
<div class="row">
|
||||
<div class="columns large-12">
|
||||
<h1>Welcome to the world best a/b testing library</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="large-12 columns">
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
|
||||
<h2>New Doorman</h2>
|
||||
<div class="row">
|
||||
<div class="columns large-12">
|
||||
<h1>new doorman</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form>
|
||||
<div class="row">
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
<div class="row">
|
||||
<div class="columns large-12">
|
||||
<h1>server specification</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" ng-show="server.message_queue == 'nanomsg'">
|
||||
<div class="columns large-12">
|
||||
<h3>general</h3>
|
||||
<table style="width:100%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th >value</th>
|
||||
<th>key</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>hostname</td>
|
||||
<td><code>{{server.hostname}}</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>port</td>
|
||||
<td><code>{{server.port}}</code></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>go version</td>
|
||||
<td><code>{{server.go_version}}</code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row" ng-show="server.message_queue == 'nanomsg'">
|
||||
<div class="columns large-12">
|
||||
<h3>nano msg</h3>
|
||||
<table style="width:100%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th >value</th>
|
||||
<th>key</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>url</td>
|
||||
<td><code>{{server.nano_msg.url}}</code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
Reference in new issue
Block a user