open-consul/ui/index.html

393 lines
12 KiB
HTML
Raw Normal View History

2014-04-21 20:36:50 +00:00
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Consul</title>
<link rel="stylesheet" href="static/bootstrap.min.css">
2014-04-22 18:11:54 +00:00
<link rel="stylesheet" href="static/base.css">
2014-04-21 20:36:50 +00:00
</head>
<body>
2014-04-23 18:01:42 +00:00
<div class="container">
<div class="col-md-12">
<div id="app">
</div>
</div>
</div>
2014-04-21 20:36:50 +00:00
<script type="text/x-handlebars">
{{outlet}}
</script>
<script type="text/x-handlebars" data-template-name="error">
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12">
<div class="text-center">
uh oh! This is an error page.
</div>
</div>
</div>
</script>
<script type="text/x-handlebars" data-template-name="dc">
2014-04-23 18:01:42 +00:00
<div class="row">
2014-04-28 15:56:07 +00:00
<div class="col-md-12 col-sm-12 col-xs-12 topbar">
2014-04-23 18:01:42 +00:00
2014-04-28 15:56:07 +00:00
<div class="col-md-1 col-sm-2 col-xs-12">
2014-04-23 18:01:42 +00:00
<a href="#"><div class="top-brand"></div></a>
</div>
2014-04-28 15:56:07 +00:00
<div class="col-md-2 col-sm-3 col-xs-12">
{{#link-to 'services' class='btn btn-default col-xs-12'}}Services{{/link-to}}
2014-04-23 18:01:42 +00:00
</div>
2014-04-28 15:56:07 +00:00
<div class="col-md-2 col-sm-3 col-xs-12">
{{#link-to 'nodes' class='btn btn-default col-xs-12'}}Nodes{{/link-to}}
2014-04-23 18:01:42 +00:00
</div>
2014-04-28 15:56:07 +00:00
<div class="col-md-2 col-sm-3 col-xs-12">
{{#link-to 'kv' class='btn btn-default col-xs-12'}}Key/Value{{/link-to}}
2014-04-23 18:01:42 +00:00
</div>
2014-04-28 15:56:07 +00:00
<div class="col-md-2 col-md-offset-1 col-sm-3 col-sm-offset-5 col-xs-6">
{{#link-to 'services'}}<button {{bind-attr class=":col-xs-12 :btn hasFailingChecks:btn-warning:btn-success"}}>{{ checkMessage }}</button>{{/link-to}}
2014-04-23 18:01:42 +00:00
</div>
2014-04-28 15:56:07 +00:00
<div class="col-md-2 col-sm-3 col-xs-6">
<button type="button" {{bind-attr class=":col-xs-12 :btn isDropDownVisible:btn-primary:btn-default"}} {{action "toggle"}}> {{model}} <span class="caret"></span> </button>
2014-04-25 20:24:36 +00:00
{{#if isDropdownVisible}}
2014-04-28 15:56:07 +00:00
<ul class="dropdown-menu col-xs-12" style="display:block;">
2014-04-25 20:24:36 +00:00
{{#each dc in dcs}}
<li {{action "toggle"}}>{{#link-to 'services' dc}}{{dc}}{{/link-to}}</li>
{{/each}}
</ul>
{{/if}}
2014-04-23 18:01:42 +00:00
</div>
</div>
</div>
{{outlet}}
2014-04-23 18:01:42 +00:00
</script>
2014-04-29 17:06:26 +00:00
<script type="text/x-handlebars" data-template-name="kv/show">
2014-04-29 18:49:07 +00:00
<div class="row">
2014-04-30 21:37:05 +00:00
<h5><a class="subtle" href="" {{action 'linkToKey' grandParentKey }}>{{parentKey}}</a></h5>
2014-04-29 18:49:07 +00:00
</div>
2014-04-29 17:06:26 +00:00
2014-04-29 18:49:07 +00:00
<div class="row">
2014-04-29 17:34:13 +00:00
<div class="col-md-5">
<div class="row">
2014-04-28 22:23:01 +00:00
2014-04-29 17:06:26 +00:00
{{#each item in model }}
2014-04-29 20:32:38 +00:00
{{#link-to item.linkToRoute item.urlSafeKey href=false tagName="div" class="panel panel-link panel-short"}}
2014-04-29 17:06:26 +00:00
<div {{bind-attr class=":panel-bar item.isFolder:bg-gray:bg-light-gray" }}></div>
<div class="panel-heading">
<h3 class="panel-title">
2014-04-30 19:02:31 +00:00
{{item.keyWithoutParent}}
2014-04-29 17:06:26 +00:00
</h3>
</div>
2014-04-29 20:32:38 +00:00
{{/link-to}}
2014-04-28 22:23:01 +00:00
{{/each}}
2014-04-29 17:06:26 +00:00
2014-04-28 22:23:01 +00:00
</div>
2014-04-29 17:06:26 +00:00
</div>
2014-04-28 22:23:01 +00:00
2014-04-30 14:49:07 +00:00
<div class="col-md-1">
<div class="border-left hidden-xs hidden-sm">
<div class="line"></div>
</div>
</div>
2014-04-30 14:49:07 +00:00
<div class="col-md-6">
<div class="row">
<div class="panel">
<div {{ bind-attr class=":panel-bar newKey.isValid:bg-green:bg-light-gray" }}></div>
<div class="panel-heading">
<h3 class="panel-title">
Create Key
</h3>
</div>
<div class="panel-body">
<form class="form">
2014-04-30 14:10:46 +00:00
2014-04-30 16:15:54 +00:00
<div {{ bind-attr class=":form-group newKey.keyValid:valid" }}>
<div class="input-group">
2014-04-30 21:37:05 +00:00
<span class="input-group-addon">{{parentKey}}</span>
2014-04-30 19:02:31 +00:00
{{ input value=newKey.Key class="form-control" required=true }}
</div>
</div>
2014-04-30 14:10:46 +00:00
2014-04-30 16:15:54 +00:00
<div {{ bind-attr class=":form-group newKey.valueValid:valid" }}>
2014-04-30 20:30:14 +00:00
{{ textarea value=newKey.Value class="form-control"}}
</div>
2014-04-30 14:10:46 +00:00
<button {{ action "createKey"}} {{bind-attr disabled=newKey.isInvalid }} {{ bind-attr class=":btn newKey.isValid:btn-success:btn-default" }}>Create</button>
</form>
</div>
</div>
</div>
2014-04-29 17:06:26 +00:00
</div>
2014-04-29 18:49:07 +00:00
</div>
2014-04-29 17:06:26 +00:00
</script>
<script type="text/x-handlebars" data-template-name="kv/edit">
2014-04-29 18:49:07 +00:00
<div class="row">
2014-04-29 20:32:38 +00:00
<h5><a class="subtle" href="" {{action 'linkToKey' model.grandParentKey }}>{{model.parentKey}}</a></h5>
2014-04-29 18:49:07 +00:00
</div>
2014-04-29 17:06:26 +00:00
2014-04-29 18:49:07 +00:00
<div class="row">
2014-04-29 17:34:13 +00:00
<div class="col-md-5">
<div class="row">
{{#each item in siblings }}
2014-04-29 20:32:38 +00:00
{{#link-to item.linkToRoute item.urlSafeKey href=false tagName="div" class="panel panel-link panel-short"}}
2014-04-29 17:34:13 +00:00
<div {{bind-attr class=":panel-bar item.isFolder:bg-gray:bg-light-gray" }}></div>
<div class="panel-heading">
<h3 class="panel-title">
2014-04-30 19:02:31 +00:00
{{item.keyWithoutParent}}
2014-04-29 17:34:13 +00:00
</h3>
</div>
2014-04-29 20:32:38 +00:00
{{/link-to}}
2014-04-29 17:34:13 +00:00
{{/each}}
2014-04-29 17:06:26 +00:00
2014-04-29 17:34:13 +00:00
</div>
2014-04-29 17:06:26 +00:00
</div>
2014-04-30 14:49:07 +00:00
<div class="col-md-1">
<div class="border-left hidden-xs hidden-sm">
<div class="line"></div>
</div>
</div>
2014-04-29 17:34:13 +00:00
2014-04-30 14:49:07 +00:00
<div class="col-md-6">
<div class="row">
<div class="panel">
<div {{ bind-attr class=":panel-bar isLoading:bg-orange:bg-green" }}></div>
<div class="panel-heading">
<h3 class="panel-title">
2014-04-30 19:02:31 +00:00
{{model.Key}}
</h3>
</div>
2014-04-29 19:24:32 +00:00
<div class="panel-body">
2014-04-30 20:30:14 +00:00
<div class="form-group">
{{errorMessage}}
</div>
<form class="form">
<div class="form-group">
2014-04-30 20:30:14 +00:00
{{ textarea value=model.valueDecoded class="form-control"}}
</div>
<button {{ action "updateKey"}} {{bind-attr disabled=isLoading }} {{ bind-attr class=":btn isLoading:btn-warning:btn-success" }}>Update</button>
<button {{ action "deleteKey"}} {{bind-attr disabled=isLoading }} {{ bind-attr class=":btn :pull-right isLoading:btn-warning:btn-danger" }}>Delete</button>
</form>
</div>
2014-04-29 19:24:32 +00:00
</div>
</div>
2014-04-28 22:23:01 +00:00
</div>
2014-04-29 18:49:07 +00:00
</div>
2014-04-28 22:23:01 +00:00
</script>
2014-04-23 18:01:42 +00:00
<script type="text/x-handlebars" id="services">
2014-04-28 15:56:07 +00:00
<div {{ bind-attr class=":col-md-5 hasChild:hidden" }}>
{{#each service in services}}
2014-04-28 15:56:07 +00:00
2014-04-24 19:18:11 +00:00
<div class="row">
2014-04-28 15:56:07 +00:00
{{#link-to 'services.show' service.Name tagName="div" href=false class="list-group-item list-link" }}
<div {{bind-attr class="service.hasFailingChecks:bg-orange:bg-green :list-bar"}}></div>
<h4 class="list-group-item-heading">
{{#link-to 'services.show' service.Name class='subtle'}}{{service.Name}}{{/link-to}}
<div class="heading-helper">
<a class="subtle" href="#">{{service.checkMessage}}</a>
</div>
</h4>
<ul class="list-inline">
{{#each node in service.Nodes }}
2014-04-30 18:02:20 +00:00
<li>{{node}}</li>
2014-04-28 15:56:07 +00:00
{{/each}}
</ul>
{{/link-to}}
</div>
2014-04-23 18:01:42 +00:00
{{/each}}
</div>
2014-04-30 14:49:07 +00:00
<div class="col-md-1">
<div class="border-left hidden-xs hidden-sm">
<div class="line"></div>
</div>
</div>
<div class="col-md-6">
<div class="row">
{{outlet}}
</div>
</div>
</script>
<script type="text/x-handlebars" id="service">
2014-04-30 18:02:20 +00:00
<h2 class="no-margin">{{ model.0.Service.Service }}</h2>
<hr>
<h5>Nodes</h5>
{{#each node in model }}
2014-04-30 18:02:20 +00:00
{{#link-to 'nodes.show' node.Node.Node tagName="div" href=false class="panel panel-link" }}
2014-04-25 17:52:52 +00:00
<div {{ bind-attr class=":panel-bar node.hasFailingChecks:bg-orange:bg-green" }}></div>
<div class="panel-heading">
<h3 class="panel-title">
2014-04-30 18:02:20 +00:00
{{node.Node.Node}}
<small>{{node.Node.Address}}</small>
<span class="panel-note">{{node.checkMessage}}</span>
</h3>
</div>
<div class="panel-body">
<ul class="list-unstyled list-broken">
{{#each check in node.Checks }}
<li>
<h4>{{ check.Name }} <small>{{ check.CheckID }}</small> <span class="pull-right"><small>{{check.Status}}</small></h4>
</li>
{{/each}}
</ul>
</div>
2014-04-25 17:52:52 +00:00
{{/link-to}}
{{/each}}
2014-04-28 15:56:07 +00:00
{{#link-to "services" class="btn btn-default col-xs-12 visible-xs" }}All Services{{/link-to}}
2014-04-23 18:01:42 +00:00
</script>
2014-04-24 19:18:11 +00:00
<script type="text/x-handlebars" id="nodes">
<div class="col-md-5">
{{#each node in nodes}}
<div class="row">
2014-04-30 18:02:20 +00:00
{{#link-to 'nodes.show' node.Node tagName="div" href=false class="list-group-item list-link" }}
2014-04-24 19:18:11 +00:00
<div {{bind-attr class="node.hasFailingChecks:bg-orange:bg-green :list-bar"}}></div>
<h4 class="list-group-item-heading">
2014-04-30 18:02:20 +00:00
{{node.Node}}
2014-04-28 22:23:01 +00:00
<small>{{node.Address}}</small>
2014-04-24 19:18:11 +00:00
<div class="heading-helper">
<a class="subtle" href="#">{{node.checkMessage}}</a>
</div>
</h4>
<ul class="list-inline">
{{#each service in node.Services }}
2014-04-30 18:02:20 +00:00
<li>{{service.Service}}</li>
2014-04-24 19:18:11 +00:00
{{/each}}
</ul>
</div>
{{/link-to}}
2014-04-24 19:18:11 +00:00
{{/each}}
</div>
2014-04-30 14:49:07 +00:00
<div class="col-md-1">
<div class="border-left hidden-xs hidden-sm">
<div class="line"></div>
</div>
</div>
<div class="col-md-6">
2014-04-24 19:18:11 +00:00
<div class="row">
{{outlet}}
2014-04-24 19:18:11 +00:00
</div>
</div>
</script>
<script type="text/x-handlebars" id="node">
2014-04-30 18:02:20 +00:00
<h2 class="no-margin">{{ model.Node }} <small> {{ model.Address }}</small></h2>
<hr>
<h5>Checks</h5>
{{#each check in model.Checks }}
2014-04-25 17:52:52 +00:00
<div class="panel">
<div {{bind-attr class=":panel-bar model.hasFailingChecks:bg-orange:bg-green"}} ></div>
<div class="panel-heading">
<h3 class="panel-title">
{{check.Name}}
<small>{{check.CheckID}}</small>
<span class="panel-note">{{check.Status}}</span>
</h3>
</div>
<div class="panel-body">
<h5>Notes</h5>
<p>{{ check.Notes }}</p>
<h5>Output</h5>
<pre>
{{check.Output}}
</pre>
</div>
</div>
{{/each}}
<h5>Services</h5>
{{#each service in model.Services }}
{{#link-to 'services.show' service.Service }}
2014-04-25 17:52:52 +00:00
<div class="panel panel-link panel-short">
<div class="panel-bar bg-light-gray"></div>
<div class="panel-heading">
<h3 class="panel-title">
{{service.Service}}
<small>{{sevice.ID}}</small>
<span class="panel-note">:{{service.Port}}</span>
</h3>
</div>
</div>
{{/link-to}}
{{/each}}
2014-04-28 15:56:07 +00:00
{{#link-to "nodes" class="btn btn-default col-xs-12 visible-xs" }}All Nodes{{/link-to}}
</script>
2014-04-21 20:36:50 +00:00
<script type="text/x-handlebars" id="index">
2014-04-23 18:01:42 +00:00
<div class="col-md-8 col-md-offset-2 vertical-center">
{{errorMessage}}
2014-04-23 18:01:42 +00:00
{{#each item in model}}
2014-04-25 20:24:36 +00:00
{{#link-to 'services' item }}
<div class="panel panel-link panel-short">
<div class="panel-bar bg-green"></div>
2014-04-23 18:01:42 +00:00
<div class="panel-heading">
<h3 class="panel-title">
{{item}}
<small>{{item}}</small>
<span class="panel-note">all checks passing</span>
</h3>
</div>
</div>
{{/link-to}}
2014-04-23 18:01:42 +00:00
{{/each}}
</div>
2014-04-21 20:36:50 +00:00
</script>
2014-04-23 20:19:33 +00:00
<script src="javascripts/libs/jquery-1.10.2.js"></script>
<script src="javascripts/libs/handlebars-1.1.2.js"></script>
<script src="javascripts/libs/ember-1.5.0.js"></script>
<script src="javascripts/libs/ember-validations.js"></script>
2014-04-23 18:01:42 +00:00
<script src="javascripts/fixtures.js"></script>
2014-04-25 17:49:36 +00:00
<script src="javascripts/app/router.js"></script>
<script src="javascripts/app/routes.js"></script>
<script src="javascripts/app/models.js"></script>
<script src="javascripts/app/views.js"></script>
<script src="javascripts/app/controllers.js"></script>
2014-04-21 20:36:50 +00:00
<!-- to activate the test runner, add the "?test" query string parameter -->
<script src="tests/runner.js"></script>
</body>
</html>