Rename the loading page for catalog items
Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/ab6abfaa Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/ab6abfaa Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/ab6abfaa Branch: refs/heads/master Commit: ab6abfaa06141dadf758ae5a6d50c5773197f9d7 Parents: 192601b Author: Valentin Aitken <[email protected]> Authored: Mon Feb 23 11:48:52 2015 +0200 Committer: Valentin Aitken <[email protected]> Committed: Mon Feb 23 11:48:52 2015 +0200 ---------------------------------------------------------------------- docs/style/js/catalog/common.js | 6 +- .../learnmore/catalog/brooklyn-node.html | 90 -------------------- .../website/learnmore/catalog/catalog-item.html | 90 ++++++++++++++++++++ 3 files changed, 93 insertions(+), 93 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/ab6abfaa/docs/style/js/catalog/common.js ---------------------------------------------------------------------- diff --git a/docs/style/js/catalog/common.js b/docs/style/js/catalog/common.js index 3b95313..d99508f 100644 --- a/docs/style/js/catalog/common.js +++ b/docs/style/js/catalog/common.js @@ -25,7 +25,7 @@ var brooklyn = (function ($, _) { }, entityCard: _.template( - "<a class='plain' data-type='<%= type %>' href='brooklyn-node.html#entities/<%= type %>'>" + + "<a class='plain' data-type='<%= type %>' href='catalog-item.html#!entities/<%= type %>'>" + "<div class='card'>" + "<span class='glyphicon glyphicon-chevron-right'/>" + "<div class='name'><%=name%></div>" + @@ -35,7 +35,7 @@ var brooklyn = (function ($, _) { "</a>" ), policyCard: _.template( - "<a class='plain' data-type='<%= type %>' href='brooklyn-node.html#policies/<%= type %>'>" + + "<a class='plain' data-type='<%= type %>' href='catalog-item.html#!policies/<%= type %>'>" + "<div class='card'>" + "<span class='glyphicon glyphicon-chevron-right'/>" + "<div class='name'><%=name%></div>" + @@ -45,7 +45,7 @@ var brooklyn = (function ($, _) { "</a>" ), enricherCard: _.template( - "<a class='plain' data-type='<%= type %>' href='brooklyn-node.html#enrichers/<%= type %>'>" + + "<a class='plain' data-type='<%= type %>' href='catalog-item.html#!enrichers/<%= type %>'>" + "<div class='card'>" + "<span class='glyphicon glyphicon-chevron-right'/>" + "<div class='name'><%=name%></div>" + http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/ab6abfaa/docs/website/learnmore/catalog/brooklyn-node.html ---------------------------------------------------------------------- diff --git a/docs/website/learnmore/catalog/brooklyn-node.html b/docs/website/learnmore/catalog/brooklyn-node.html deleted file mode 100644 index 3b07cf6..0000000 --- a/docs/website/learnmore/catalog/brooklyn-node.html +++ /dev/null @@ -1,90 +0,0 @@ ---- -title: Catalog ---- -<!-- -Licensed to the Apache Software Foundation (ASF) under one -or more contributor license agreements. See the NOTICE file -distributed with this work for additional information -regarding copyright ownership. The ASF licenses this file -to you under the Apache License, Version 2.0 (the -"License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, -software distributed under the License is distributed on an -"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, either express or implied. See the License for the -specific language governing permissions and limitations -under the License. ---> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> -<head> - <title>Brooklyn Entity - Brooklyn Node</title> - {% include base-head.html %} - <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"/> - <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"> - <link rel="stylesheet" href="{{site.path.style}}/css/catalog_items.css" type="text/css" media="screen"/> -</head> -<body> -{% include topmenu.html %} -<div id="container"> - <div id="header"> - <div id="identity"> - <a href="http://brooklyncentral.github.com/" rel="home">Brooklyn</a> - </div> - </div> - - <div id="summary"></div> - - <ul class="nav nav-tabs"> - <li class="active"><a href="#configKeys" data-toggle="tab">Config Keys</a></li> - <li><a href="#sensors" data-toggle="tab">Sensors</a></li> - <li><a href="#effectors" data-toggle="tab">Effectors</a></li> - </ul> - - <div class="tab-content"> - <div class="tab-pane active" id="configKeys"></div> - <div class="tab-pane" id="sensors"></div> - <div class="tab-pane" id="effectors"></div> - </div> -</div> - -<script src="{{site.path.style}}/js/underscore-min.js" type="text/javascript"></script> -<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js" type="text/javascript"></script> -<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script> -<script src="{{site.path.style}}/js/catalog/common.js" type="text/javascript"></script> -<script src="{{site.path.style}}/js/catalog/items.js" type="text/javascript"></script> -<script type="text/javascript"> - $(document).ready(function () { - updateItems(); - - $(window).on('hashchange', updateItems); - - function updateItems() { - var args; - var hash = window.location.hash; - if(!hash) { - alert('No class selected'); - return; - } - args = hash.substring(1).split('/'); - if(args.length!=2) { - alert('bad entity format') - return; - } - - // entities/brooklyn.entity.brooklynnode.BrooklynNode - var item = brooklyn.findItemOfType(items[args[0]], args[1]); - $("#summary").html(brooklyn.typeSummary(item)); - item.config.forEach(function (element) { $("#configKeys").append(brooklyn.configKeyCard(element)); }); - item.sensors.forEach(function (element) { $("#sensors").append(brooklyn.sensorCard(element)); }); - if (item.effectors != undefined) { - item.effectors.forEach(function (element) { $("#effectors").append(brooklyn.effectorCard(element)); }); - } - } - }); -</script> -</body> -</html> http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/ab6abfaa/docs/website/learnmore/catalog/catalog-item.html ---------------------------------------------------------------------- diff --git a/docs/website/learnmore/catalog/catalog-item.html b/docs/website/learnmore/catalog/catalog-item.html new file mode 100644 index 0000000..82512a9 --- /dev/null +++ b/docs/website/learnmore/catalog/catalog-item.html @@ -0,0 +1,90 @@ +--- +title: Catalog +--- +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> +<head> + <title>Brooklyn Entity - Brooklyn Node</title> + {% include base-head.html %} + <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"/> + <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"> + <link rel="stylesheet" href="{{site.path.style}}/css/catalog_items.css" type="text/css" media="screen"/> +</head> +<body> +{% include topmenu.html %} +<div id="container"> + <div id="header"> + <div id="identity"> + <a href="http://brooklyncentral.github.com/" rel="home">Brooklyn</a> + </div> + </div> + + <div id="summary"></div> + + <ul class="nav nav-tabs"> + <li class="active"><a href="#configKeys" data-toggle="tab">Config Keys</a></li> + <li><a href="#sensors" data-toggle="tab">Sensors</a></li> + <li><a href="#effectors" data-toggle="tab">Effectors</a></li> + </ul> + + <div class="tab-content"> + <div class="tab-pane active" id="configKeys"></div> + <div class="tab-pane" id="sensors"></div> + <div class="tab-pane" id="effectors"></div> + </div> +</div> + +<script src="{{site.path.style}}/js/underscore-min.js" type="text/javascript"></script> +<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js" type="text/javascript"></script> +<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script> +<script src="{{site.path.style}}/js/catalog/common.js" type="text/javascript"></script> +<script src="{{site.path.style}}/js/catalog/items.js" type="text/javascript"></script> +<script type="text/javascript"> + $(document).ready(function () { + updateItems(); + + $(window).on('hashchange', updateItems); + + function updateItems() { + var args; + var hash = window.location.hash; + if(!hash || hash.length <= 2) { + alert('No such catalog item'); + return; + } + args = hash.substring(2).split('/'); + if(args.length!=2) { + alert('bad entity format') + return; + } + + // entities/brooklyn.entity.brooklynnode.BrooklynNode + var item = brooklyn.findItemOfType(items[args[0]], args[1]); + $("#summary").html(brooklyn.typeSummary(item)); + item.config.forEach(function (element) { $("#configKeys").append(brooklyn.configKeyCard(element)); }); + item.sensors.forEach(function (element) { $("#sensors").append(brooklyn.sensorCard(element)); }); + if (item.effectors != undefined) { + item.effectors.forEach(function (element) { $("#effectors").append(brooklyn.effectorCard(element)); }); + } + } + }); +</script> +</body> +</html>
