You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by ri...@apache.org on 2017/05/18 12:37:52 UTC
svn commit: r1795513 [45/45] - in /brooklyn/site: ./ community/
community/security/ contributing/ developers/ developers/code/
developers/committers/ developers/committers/release-process/
documentation/ download/ learnmore/ learnmore/catalog/ learnmor...
Modified: brooklyn/site/style/js/catalog/items.js
URL: http://svn.apache.org/viewvc/brooklyn/site/style/js/catalog/items.js?rev=1795513&r1=1795512&r2=1795513&view=diff
==============================================================================
--- brooklyn/site/style/js/catalog/items.js (original)
+++ brooklyn/site/style/js/catalog/items.js Thu May 18 12:37:51 2017
@@ -1321,13 +1321,6 @@ var items = {
"pinned" : false,
"constraints" : [ ]
}, {
- "name" : "dynamicfabric.factory",
- "type" : "org.apache.brooklyn.core.entity.factory.EntityFactory",
- "description" : "factory for creating new cluster members",
- "reconfigurable" : false,
- "pinned" : false,
- "constraints" : [ ]
- }, {
"name" : "enricher.service_state.children_and_members.quorum.running",
"type" : "org.apache.brooklyn.util.collections.QuorumCheck",
"description" : "Problems check from children actual states (lifecycle), applied by default to members and children, not checking upness, but requiring by default that none are on-fire",
@@ -1592,13 +1585,6 @@ var items = {
"pinned" : false,
"constraints" : [ ]
}, {
- "name" : "dynamiccluster.factory",
- "type" : "org.apache.brooklyn.core.entity.factory.EntityFactory",
- "description" : "factory for creating new cluster members",
- "reconfigurable" : false,
- "pinned" : false,
- "constraints" : [ ]
- }, {
"name" : "dynamiccluster.firstmemberspec",
"type" : "org.apache.brooklyn.api.entity.EntitySpec",
"description" : "entity spec for creating new cluster members, used for the very first member if different",
@@ -5301,7 +5287,7 @@ var items = {
"effectors" : [ ]
}, {
"type" : "org.apache.brooklyn.entity.brooklynnode.BrooklynNode",
- "defaultVersion" : "0.10.0",
+ "defaultVersion" : "0.11.0",
"name" : "Brooklyn Node",
"description" : "Deploys a Brooklyn management server",
"iconUrl" : "",
@@ -5440,7 +5426,7 @@ var items = {
}, {
"name" : "brooklynnode.download.archive.subpath",
"type" : "java.lang.String",
- "description" : "Path to the main directory in the archive being supplied for installation; to use the root of an archive, specify '.'; default value taken based on download URL (e.g. 'name' for 'http://path/name.tgz' or 'http://path/name-dist.tgz') falling back to an appropriate value for brooklyn, e.g. 'brooklyn-0.10.0'",
+ "description" : "Path to the main directory in the archive being supplied for installation; to use the root of an archive, specify '.'; default value taken based on download URL (e.g. 'name' for 'http://path/name.tgz' or 'http://path/name-dist.tgz') falling back to an appropriate value for brooklyn, e.g. 'brooklyn-0.11.0'",
"reconfigurable" : false,
"pinned" : false,
"constraints" : [ ]
@@ -5726,7 +5712,7 @@ var items = {
"name" : "install.version",
"type" : "java.lang.String",
"description" : "Suggested version",
- "defaultValue" : "0.10.0",
+ "defaultValue" : "0.11.0",
"reconfigurable" : false,
"pinned" : false,
"constraints" : [ ]
@@ -6280,13 +6266,6 @@ var items = {
"pinned" : false,
"constraints" : [ ]
}, {
- "name" : "dynamiccluster.factory",
- "type" : "org.apache.brooklyn.core.entity.factory.ConfigurableEntityFactory",
- "description" : "factory (or closure) to create the web server",
- "reconfigurable" : false,
- "pinned" : false,
- "constraints" : [ ]
- }, {
"name" : "dynamiccluster.memberspec",
"type" : "org.apache.brooklyn.api.entity.EntitySpec",
"description" : "Spec for web server entiites to be created",
@@ -6453,11 +6432,6 @@ var items = {
"description" : "Spec for creating the cluster; if null a DynamicWebAppCluster will be created",
"links" : { }
}, {
- "name" : "dynamiccluster.factory",
- "type" : "org.apache.brooklyn.core.entity.factory.ConfigurableEntityFactory",
- "description" : "factory (or closure) to create the web server",
- "links" : { }
- }, {
"name" : "dynamiccluster.memberspec",
"type" : "org.apache.brooklyn.api.entity.EntitySpec",
"description" : "Spec for web server entiites to be created",
@@ -6769,13 +6743,6 @@ var items = {
"pinned" : false,
"constraints" : [ ]
}, {
- "name" : "dynamiccluster.factory",
- "type" : "org.apache.brooklyn.core.entity.factory.EntityFactory",
- "description" : "factory for creating new cluster members",
- "reconfigurable" : false,
- "pinned" : false,
- "constraints" : [ ]
- }, {
"name" : "dynamiccluster.firstmemberspec",
"type" : "org.apache.brooklyn.api.entity.EntitySpec",
"description" : "entity spec for creating new cluster members, used for the very first member if different",
@@ -8653,13 +8620,6 @@ var items = {
"pinned" : false,
"constraints" : [ ]
}, {
- "name" : "dynamiccluster.factory",
- "type" : "org.apache.brooklyn.core.entity.factory.EntityFactory",
- "description" : "factory for creating new cluster members",
- "reconfigurable" : false,
- "pinned" : false,
- "constraints" : [ ]
- }, {
"name" : "dynamiccluster.firstmemberspec",
"type" : "org.apache.brooklyn.api.entity.EntitySpec",
"description" : "entity spec for creating new cluster members, used for the very first member if different",
@@ -9175,13 +9135,6 @@ var items = {
"pinned" : false,
"constraints" : [ ]
}, {
- "name" : "dynamiccluster.factory",
- "type" : "org.apache.brooklyn.core.entity.factory.EntityFactory",
- "description" : "factory for creating new cluster members",
- "reconfigurable" : false,
- "pinned" : false,
- "constraints" : [ ]
- }, {
"name" : "dynamiccluster.firstmemberspec",
"type" : "org.apache.brooklyn.api.entity.EntitySpec",
"description" : "entity spec for creating new cluster members, used for the very first member if different",
@@ -10112,13 +10065,6 @@ var items = {
"pinned" : false,
"constraints" : [ ]
}, {
- "name" : "dynamiccluster.factory",
- "type" : "org.apache.brooklyn.core.entity.factory.EntityFactory",
- "description" : "factory for creating new cluster members",
- "reconfigurable" : false,
- "pinned" : false,
- "constraints" : [ ]
- }, {
"name" : "dynamiccluster.firstmemberspec",
"type" : "org.apache.brooklyn.api.entity.EntitySpec",
"description" : "entity spec for creating new cluster members, used for the very first member if different",
@@ -14988,7 +14934,7 @@ var items = {
} ]
}, {
"type" : "org.apache.brooklyn.entity.database.mariadb.MariaDbNode",
- "defaultVersion" : "5.5.40",
+ "defaultVersion" : "5.5.53",
"name" : "MariaDB Node",
"description" : "MariaDB is an open source relational database management system (RDBMS)",
"iconUrl" : "classpath:///mariadb-logo-180x119.png",
@@ -15183,7 +15129,7 @@ var items = {
"name" : "install.version",
"type" : "java.lang.String",
"description" : "Suggested version",
- "defaultValue" : "5.5.40",
+ "defaultValue" : "5.5.53",
"reconfigurable" : false,
"pinned" : false,
"constraints" : [ ]
@@ -15205,7 +15151,7 @@ var items = {
"name" : "mariadb.install.mirror.url",
"type" : "java.lang.String",
"description" : "URL of mirror",
- "defaultValue" : "http://mirrors.coreix.net/mariadb/",
+ "defaultValue" : "http://mirrors.coreix.net/mariadb",
"reconfigurable" : false,
"pinned" : false,
"constraints" : [ ]
@@ -17516,13 +17462,6 @@ var items = {
"pinned" : false,
"constraints" : [ ]
}, {
- "name" : "dynamiccluster.factory",
- "type" : "org.apache.brooklyn.core.entity.factory.EntityFactory",
- "description" : "factory for creating new cluster members",
- "reconfigurable" : false,
- "pinned" : false,
- "constraints" : [ ]
- }, {
"name" : "dynamiccluster.firstmemberspec",
"type" : "org.apache.brooklyn.api.entity.EntitySpec",
"description" : "entity spec for creating new cluster members, used for the very first member if different",
@@ -22450,13 +22389,6 @@ var items = {
"pinned" : false,
"constraints" : [ ]
}, {
- "name" : "dynamiccluster.factory",
- "type" : "org.apache.brooklyn.core.entity.factory.EntityFactory",
- "description" : "factory for creating new cluster members",
- "reconfigurable" : false,
- "pinned" : false,
- "constraints" : [ ]
- }, {
"name" : "dynamiccluster.firstmemberspec",
"type" : "org.apache.brooklyn.api.entity.EntitySpec",
"description" : "entity spec for creating new cluster members, used for the very first member if different",
@@ -24911,13 +24843,6 @@ var items = {
"pinned" : false,
"constraints" : [ ]
}, {
- "name" : "dynamiccluster.factory",
- "type" : "org.apache.brooklyn.core.entity.factory.EntityFactory",
- "description" : "factory for creating new cluster members",
- "reconfigurable" : false,
- "pinned" : false,
- "constraints" : [ ]
- }, {
"name" : "dynamiccluster.firstmemberspec",
"type" : "org.apache.brooklyn.api.entity.EntitySpec",
"description" : "entity spec for creating new cluster members, used for the very first member if different",
@@ -28991,7 +28916,7 @@ var items = {
"name" : "download.url",
"type" : "java.lang.String",
"description" : "URL pattern for downloading the installer (will substitute things like ${version} automatically)",
- "defaultValue" : "http://apache.fastbull.org/zookeeper/zookeeper-${version}/zookeeper-${version}.tar.gz",
+ "defaultValue" : "http://apache.org/dyn/closer.cgi?action=download&filename=zookeeper/zookeeper-${version}/zookeeper-${version}.tar.gz",
"reconfigurable" : false,
"pinned" : false,
"constraints" : [ ]
@@ -29527,13 +29452,6 @@ var items = {
"pinned" : false,
"constraints" : [ ]
}, {
- "name" : "dynamiccluster.factory",
- "type" : "org.apache.brooklyn.core.entity.factory.EntityFactory",
- "description" : "factory for creating new cluster members",
- "reconfigurable" : false,
- "pinned" : false,
- "constraints" : [ ]
- }, {
"name" : "dynamiccluster.firstmemberspec",
"type" : "org.apache.brooklyn.api.entity.EntitySpec",
"description" : "entity spec for creating new cluster members, used for the very first member if different",
@@ -29659,7 +29577,7 @@ var items = {
"name" : "zookeeper.nodeId.supplier",
"type" : "com.google.common.base.Supplier",
"description" : "Supplies values for members id in zoo.cfg",
- "defaultValue" : "org.apache.brooklyn.util.guava.Suppliers$IncrementingSupplier@2787e051",
+ "defaultValue" : "org.apache.brooklyn.util.guava.Suppliers$IncrementingSupplier@63b440bd",
"reconfigurable" : false,
"pinned" : false,
"constraints" : [ "Predicates.notNull()" ]
@@ -29819,7 +29737,7 @@ var items = {
"config" : [ {
"name" : "autoscaler.currentSizeOperator",
"type" : "com.google.common.base.Function",
- "defaultValue" : "org.apache.brooklyn.policy.autoscaling.AutoScalerPolicy$4@70bbb286",
+ "defaultValue" : "org.apache.brooklyn.policy.autoscaling.AutoScalerPolicy$4@70028d75",
"reconfigurable" : false,
"pinned" : false,
"constraints" : [ ]
@@ -29939,7 +29857,7 @@ var items = {
}, {
"name" : "autoscaler.resizeOperator",
"type" : "org.apache.brooklyn.policy.autoscaling.ResizeOperator",
- "defaultValue" : "org.apache.brooklyn.policy.autoscaling.AutoScalerPolicy$3@7ea95d85",
+ "defaultValue" : "org.apache.brooklyn.policy.autoscaling.AutoScalerPolicy$3@8fa0f22",
"reconfigurable" : false,
"pinned" : false,
"constraints" : [ ]
@@ -30568,6 +30486,13 @@ var items = {
"pinned" : false,
"constraints" : [ ]
}, {
+ "name" : "oauth.endpoint",
+ "type" : "java.lang.String",
+ "description" : "oauth.endpoint",
+ "reconfigurable" : false,
+ "pinned" : false,
+ "constraints" : [ ]
+ }, {
"name" : "os64Bit",
"type" : "java.lang.Boolean",
"description" : "Whether to require 64-bit OS images (true), 32-bit images (false), or either (null)",
@@ -30591,7 +30516,7 @@ var items = {
}, {
"name" : "pollForFirstReachableAddress",
"type" : "java.lang.String",
- "description" : "Whether and how long to wait for reaching the VM's ip:port; if 'false', will default to the node's first public IP (or privae if no public IPs); if 'true' uses default duration; otherwise accepts a time string e.g. '5m' (the default) or a number of milliseconds",
+ "description" : "Whether and how long to wait for reaching the VM's ip:port to be accessible over SSH or WinRM; if 'false', the location will will choose a public or private IP as appropriate; if 'true' uses default duration; otherwise accepts a time string e.g. '5m' (the default) or a number of milliseconds",
"defaultValue" : "5m",
"reconfigurable" : false,
"pinned" : false,
@@ -30599,7 +30524,7 @@ var items = {
}, {
"name" : "pollForFirstReachableAddress.predicate",
"type" : "com.google.common.base.Predicate",
- "description" : "Predicate<HostAndPort> implementation which checks whether machine is up or not.",
+ "description" : "Predicate<HostAndPort> implementation which checks whether an ip:port is reachable.",
"reconfigurable" : false,
"pinned" : false,
"constraints" : [ ]
@@ -30622,7 +30547,7 @@ var items = {
"name" : "private-key-file",
"type" : "java.lang.String",
"description" : "a ':' separated list of ssh private key files; uses first in list that can be read",
- "defaultValue" : "/home/ubuntu/.ssh/id_rsa:/home/ubuntu/.ssh/id_dsa",
+ "defaultValue" : "/Users/richard/.ssh/id_rsa:/Users/richard/.ssh/id_dsa",
"reconfigurable" : false,
"pinned" : false,
"constraints" : [ ]
@@ -30644,7 +30569,7 @@ var items = {
"name" : "privateKeyFile",
"type" : "java.lang.String",
"description" : "a ':' separated list of ssh private key files; uses first in list that can be read",
- "defaultValue" : "/home/ubuntu/.ssh/id_rsa:/home/ubuntu/.ssh/id_dsa",
+ "defaultValue" : "/Users/richard/.ssh/id_rsa:/Users/richard/.ssh/id_dsa",
"reconfigurable" : false,
"pinned" : false,
"constraints" : [ ]
@@ -30730,7 +30655,15 @@ var items = {
"name" : "user",
"type" : "java.lang.String",
"description" : "user account for normal access to the remote machine, defaulting to local user",
- "defaultValue" : "ubuntu",
+ "defaultValue" : "richard",
+ "reconfigurable" : false,
+ "pinned" : false,
+ "constraints" : [ ]
+ }, {
+ "name" : "vmNameAllowedChars",
+ "type" : "java.lang.String",
+ "description" : "The characters allowed in a VM name",
+ "defaultValue" : "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890-_",
"reconfigurable" : false,
"pinned" : false,
"constraints" : [ ]
@@ -31076,7 +31009,7 @@ var items = {
"name" : "localTempDir",
"type" : "java.lang.String",
"description" : "The directory on the local machine (i.e. running brooklyn) for writing temp files",
- "defaultValue" : "/tmp/brooklyn-ubuntu-ssh-tmp",
+ "defaultValue" : "/tmp/brooklyn-richard-ssh-tmp",
"reconfigurable" : false,
"pinned" : false,
"constraints" : [ ]
@@ -31127,7 +31060,7 @@ var items = {
}, {
"name" : "password",
"type" : "java.lang.String",
- "description" : "Password to use to connect",
+ "description" : "Password to use (e.g. for authSudo, or for ssh to connect)",
"reconfigurable" : false,
"pinned" : false,
"constraints" : [ ]
@@ -31274,6 +31207,13 @@ var items = {
"pinned" : false,
"constraints" : [ ]
}, {
+ "name" : "connectivityResolver",
+ "type" : "org.apache.brooklyn.location.jclouds.ConnectivityResolver",
+ "description" : "Optional instance of a ConnectivityResolver that the location will use in favour of DefaultConnectivityResolver",
+ "reconfigurable" : false,
+ "pinned" : false,
+ "constraints" : [ ]
+ }, {
"name" : "credential",
"type" : "java.lang.String",
"description" : "credential",
@@ -31524,7 +31464,7 @@ var items = {
"name" : "localTempDir",
"type" : "java.lang.String",
"description" : "The directory on the local machine (i.e. running brooklyn) for writing temp files",
- "defaultValue" : "/tmp/brooklyn-ubuntu-ssh-tmp",
+ "defaultValue" : "/tmp/brooklyn-richard-ssh-tmp",
"reconfigurable" : false,
"pinned" : false,
"constraints" : [ ]
@@ -31576,7 +31516,7 @@ var items = {
"name" : "machineCreateAttempts",
"type" : "java.lang.Integer",
"description" : "Number of times to retry if jclouds fails to create a VM",
- "defaultValue" : 1,
+ "defaultValue" : 2,
"reconfigurable" : false,
"pinned" : false,
"constraints" : [ ]
@@ -31632,6 +31572,13 @@ var items = {
"pinned" : false,
"constraints" : [ ]
}, {
+ "name" : "oauth.endpoint",
+ "type" : "java.lang.String",
+ "description" : "oauth.endpoint",
+ "reconfigurable" : false,
+ "pinned" : false,
+ "constraints" : [ ]
+ }, {
"name" : "openIptables",
"type" : "java.lang.Boolean",
"description" : "[DEPRECATED - use openIptables on SoftwareProcess entity] Whether to open the INBOUND_PORTS via iptables rules; if true then ssh in to run iptables commands, as part of machine provisioning",
@@ -31873,7 +31820,7 @@ var items = {
}, {
"name" : "pollForFirstReachableAddress",
"type" : "java.lang.String",
- "description" : "Whether and how long to wait for reaching the VM's ip:port; if 'false', will default to the node's first public IP (or privae if no public IPs); if 'true' uses default duration; otherwise accepts a time string e.g. '5m' (the default) or a number of milliseconds",
+ "description" : "Whether and how long to wait for reaching the VM's ip:port to be accessible over SSH or WinRM; if 'false', the location will will choose a public or private IP as appropriate; if 'true' uses default duration; otherwise accepts a time string e.g. '5m' (the default) or a number of milliseconds",
"defaultValue" : "5m",
"reconfigurable" : false,
"pinned" : false,
@@ -31881,7 +31828,7 @@ var items = {
}, {
"name" : "pollForFirstReachableAddress.predicate",
"type" : "com.google.common.base.Predicate",
- "description" : "Predicate<HostAndPort> implementation which checks whether machine is up or not.",
+ "description" : "Predicate<HostAndPort> implementation which checks whether an ip:port is reachable.",
"reconfigurable" : false,
"pinned" : false,
"constraints" : [ ]
@@ -31919,7 +31866,7 @@ var items = {
"name" : "private-key-file",
"type" : "java.lang.String",
"description" : "a ':' separated list of ssh private key files; uses first in list that can be read",
- "defaultValue" : "/home/ubuntu/.ssh/id_rsa:/home/ubuntu/.ssh/id_dsa",
+ "defaultValue" : "/Users/richard/.ssh/id_rsa:/Users/richard/.ssh/id_dsa",
"reconfigurable" : false,
"pinned" : false,
"constraints" : [ ]
@@ -31941,7 +31888,7 @@ var items = {
"name" : "privateKeyFile",
"type" : "java.lang.String",
"description" : "a ':' separated list of ssh private key files; uses first in list that can be read",
- "defaultValue" : "/home/ubuntu/.ssh/id_rsa:/home/ubuntu/.ssh/id_dsa",
+ "defaultValue" : "/Users/richard/.ssh/id_rsa:/Users/richard/.ssh/id_dsa",
"reconfigurable" : false,
"pinned" : false,
"constraints" : [ ]
@@ -32121,7 +32068,7 @@ var items = {
"name" : "user",
"type" : "java.lang.String",
"description" : "user account for normal access to the remote machine, defaulting to local user",
- "defaultValue" : "ubuntu",
+ "defaultValue" : "richard",
"reconfigurable" : false,
"pinned" : false,
"constraints" : [ ]
@@ -32154,6 +32101,14 @@ var items = {
"pinned" : false,
"constraints" : [ ]
}, {
+ "name" : "vmNameAllowedChars",
+ "type" : "java.lang.String",
+ "description" : "The characters allowed in a VM name",
+ "defaultValue" : "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890-_",
+ "reconfigurable" : false,
+ "pinned" : false,
+ "constraints" : [ ]
+ }, {
"name" : "vmNameMaxLength",
"type" : "java.lang.Integer",
"description" : "Maximum length of VM name",
@@ -32256,7 +32211,7 @@ var items = {
"name" : "localTempDir",
"type" : "java.lang.String",
"description" : "The directory on the local machine (i.e. running brooklyn) for writing temp files",
- "defaultValue" : "/tmp/brooklyn-ubuntu-ssh-tmp",
+ "defaultValue" : "/tmp/brooklyn-richard-ssh-tmp",
"reconfigurable" : false,
"pinned" : false,
"constraints" : [ ]
@@ -32307,7 +32262,7 @@ var items = {
}, {
"name" : "password",
"type" : "java.lang.String",
- "description" : "Password to use to connect",
+ "description" : "Password to use (e.g. for authSudo, or for ssh to connect)",
"reconfigurable" : false,
"pinned" : false,
"constraints" : [ ]
@@ -32718,7 +32673,7 @@ var items = {
"name" : "localTempDir",
"type" : "java.lang.String",
"description" : "The directory on the local machine (i.e. running brooklyn) for writing temp files",
- "defaultValue" : "/tmp/brooklyn-ubuntu-ssh-tmp",
+ "defaultValue" : "/tmp/brooklyn-richard-ssh-tmp",
"reconfigurable" : false,
"pinned" : false,
"constraints" : [ ]
@@ -32777,7 +32732,7 @@ var items = {
}, {
"name" : "password",
"type" : "java.lang.String",
- "description" : "Password to use to connect",
+ "description" : "Password to use (e.g. for authSudo, or for ssh to connect)",
"reconfigurable" : false,
"pinned" : false,
"constraints" : [ ]
@@ -33016,7 +32971,7 @@ var items = {
"name" : "localTempDir",
"type" : "java.lang.String",
"description" : "The directory on the local machine (i.e. running brooklyn) for writing temp files",
- "defaultValue" : "/tmp/brooklyn-ubuntu-ssh-tmp",
+ "defaultValue" : "/tmp/brooklyn-richard-ssh-tmp",
"reconfigurable" : false,
"pinned" : false,
"constraints" : [ ]
@@ -33067,7 +33022,7 @@ var items = {
}, {
"name" : "password",
"type" : "java.lang.String",
- "description" : "Password to use to connect",
+ "description" : "Password to use (e.g. for authSudo, or for ssh to connect)",
"reconfigurable" : false,
"pinned" : false,
"constraints" : [ ]
Added: brooklyn/site/style/js/public.js
URL: http://svn.apache.org/viewvc/brooklyn/site/style/js/public.js?rev=1795513&view=auto
==============================================================================
--- brooklyn/site/style/js/public.js (added)
+++ brooklyn/site/style/js/public.js Thu May 18 12:37:51 2017
@@ -0,0 +1,167 @@
+/*
+ * 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.
+ */
+
+(function($, ZeroClipboard) {
+ $('[data-toggle="tooltip"]').tooltip({
+ delay: {
+ show: 600,
+ hide: 100
+ }
+ });
+
+ $('.page .content').find('h1, h2, h3, h4 ,h5, h6').each(function() {
+ var id = $(this).attr('id');
+ if (id !== '') {
+ $(this).append($('<a>')
+ .attr('href', '#' + id)
+ .addClass('header-link')
+ .html('<i class="fa fa-link"></i>')
+ );
+ }
+ });
+
+ <!-- Copying and clipboard support -->
+
+ // first make the $% line starts not selectable
+ $('div.highlight')
+ .attr('oncopy', 'handleHideCopy(this)')
+ .each(function(index,target) {
+ if ($(target).find('code.bash')) {
+ // Mark bash prompts from the start of each line (i.e. '$' or '%' characters
+ // at the very start, or immediately following any newline) as not-selectable.
+ // Handle continuation lines where a leading '$' or '%' is *not* a prompt character.
+ // (If example wants to exclude output, it can manually use class="nocopy".)
+ target.innerHTML = target.innerHTML.replace(/(^\s*|[^\\]\n)(<.*>)?([$%]|>) /g, '$1$2<span class="nocopy bash_prompt">$3 </span>');
+ }
+ }).prepend(
+ $('<div class="clipboard_container" title="Copy to Clipboard">'+
+ '<div class="fa clipboard_button">'+
+ '<div class="on-active"><div>Copied to Clipboard</div></div>'+
+ '</div></div>')
+ );
+
+ $('div.clipboard_container').each(function(index) {
+ var clipboard = new ZeroClipboard();
+ clipboard.clip( $(this).find(":first")[0], $(this)[0] );
+ var target0 = $(this).next();
+ var target = target0.clone();
+ target.find('.nocopy').remove();
+ var txt = target.text();
+ clipboard.on( 'dataRequested', function (client, args) {
+ handleHideCopy( target0.closest('div.highlight') ); //not necessary but nicer feedback
+ client.setText( txt );
+ });
+ });
+
+ // normal cmd-C (non-icon) copying
+ function handleHideCopy(el) {
+ // var origHtml = $(el).clone();
+ console.log("handling copy", el);
+ $(el).addClass('copying');
+ $(el).find('.nocopy').hide();
+ $(el).find('.clipboard_button').addClass('manual-clipboard-is-active');
+ setTimeout(function(){
+ $(el).removeClass('copying');
+ $(el).find('.clipboard_button').removeClass('manual-clipboard-is-active');
+ $(el).find('.nocopy').show();
+ // $(el).html(origHtml);
+ }, 600);
+ }
+
+ <!-- search -->
+ $(function() {
+ $('#simple_google')
+ .submit(function() {
+ $('input[name="q"]').val("site:" + document.location.hostname + " " + $('input[name="brooklyn-search"]').val());
+ return true;
+ });
+ $('input[name="brooklyn-search"]').focus(function() {
+ if ($(this).val() === $(this).attr('placeholder')) {
+ $(this).val('');
+ }
+ })
+ .blur(function() {
+ if ($(this).val() === '') {
+ $(this).val($(this).attr('placeholder'));
+ }
+ })
+ .blur();
+ });
+
+
+ <!-- analytics -->
+ var _gaq = _gaq || [];
+ _gaq.push(['_setAccount', 'UA-30530918-1']);
+ _gaq.push(['_trackPageview']);
+
+ (function() {
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+ })();
+
+ <!-- page warning (for archive pages) -->
+ if (document.location.pathname.indexOf('guide/') > -1) {
+ if (document.location.pathname.replace(/^\/([^\/]*).*$/, '$1') === "v"){
+ var thisversion = document.location.pathname.split("/")[2],
+ msg = "";
+ if (thisversion != 'latest' && (!$.cookie('brooklyn_versions') ||
+ (($.inArray('ALL', $.cookie('brooklyn_versions').split(",")) === -1) &&
+ ($.inArray(thisversion, $.cookie('brooklyn_versions').split(",")) === -1))) ){
+ msg += "<div class='warning_banner_image'><img src='{{ site.path.style }}/img/warning.png'/></div>";
+ msg += "<p>You are browsing the archive site for version <strong>"+thisversion+"</strong>.</p>";
+ if (thisversion.indexOf("SNAPSHOT") >= 0) {
+ msg += "<p>Note that SNAPSHOT versions have not been voted on and are not endorsed by the Apache Software Foundation.</p>";
+ msg += "<p>Do you understand and accept the risks?</p>";
+ } else {
+ msg += "<p>Is this deliberate?</p>";
+ }
+ msg += "<center><p class='warning_banner_buttons'>";
+ msg += "<a href = 'javascript:void(0);' onclick=\"set_user_version('"+thisversion+"');\">Yes, hide this warning</a>";
+ msg += "<a href = '{{ site.path.v }}/latest/'>No, take me to the latest version guide</a>";
+ msg += "<a href = '{{ site.path.website }}/meta/versions.html'>Show all versions</a>";
+ msg += "</p></center>"
+
+ $('#page_notes').html(msg).fadeIn('slow');
+ }
+ }
+ }
+ function get_user_versions() {
+ return $.cookie("brooklyn_versions") ? $.cookie("brooklyn_versions").split(",") : [];
+ }
+ function set_user_version(version) {
+ var version_cookie = get_user_versions();
+ version_cookie.push(version);
+ $.cookie('brooklyn_versions', version_cookie, { expires: 365, path: '/' });
+ $('#page_notes').fadeOut();
+ event.preventDefault ? event.preventDefault() : event.returnValue = false;
+ }
+ function set_user_versions_all() {
+ var version_cookie = get_user_versions();
+ version_cookie.push("ALL");
+ $.cookie('brooklyn_versions', version_cookie, { expires: 365, path: '/' });
+ $('#page_notes').fadeOut();
+ event.preventDefault ? event.preventDefault() : event.returnValue = false;
+ }
+ function clear_user_versions() {
+ $.removeCookie('brooklyn_versions', { path: '/' });
+ $('#page_notes').fadeIn('slow');
+ event.preventDefault ? event.preventDefault() : event.returnValue = false;
+ }
+})(jQuery, ZeroClipboard);
\ No newline at end of file