Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space DOC and version 8.0.0

...

Getting Started

Table of Contents

 


Adding a Portable Gadget to a Web Page

...

In this example, "https://cloud.6connectexample.com/6c_123" is the root folder of a 6connect installation, so replace that with your own 6connect instance URL.

Code Block
languagexml
<script type='text/javascript' src="https://cloud.6connectexample.com/6c_123/portable/init.js"></script>
<link rel="stylesheet" type="text/css" href="https://cloud.6connectexample.com/6c_123/portable/css/provision-portable.css">

...

  • search -- does a search with the global search API
  • dhcp -- does a search with the DHCP API
  • ipam -- does a search with the IPAM API
  • pv-logs – details actions taken in ProVision.

 


Here is an example for a search gadget, loading with the search term "6connecttest". By default it will load up to five results per type.

Code Block
languagejs
<script type='text/javascript'>
var settings = {
provision_location: "https://cloud.6connectexample.com/6c_123",
provision_api_key: "00-ABCDEFGHIJKLMN00",
provision_secret_key: "00abcd11ef22ghij3300klmno123",

search: "6connecttest",
};
</script>


Here is an example to load as an IPAM gadget, with an option to limit results to 10 records:

Code Block
languagejs
<script type='text/javascript'>
var settings = {
provision_location: "https://cloud.6connectexample.com/6c_123",
provision_api_key: "00-ABCDEFGHIJKLMN00",
provision_secret_key: "00abcd11ef22ghij3300klmno123",

ipam: "6connecttest",
limit: 10
};
</script>

 


An example with the DHCP gadget:

Code Block
languagejs
<script type='text/javascript'>
var settings = {
provision_location: "https://cloud.6connectexample.com/6c_123",
provision_api_key: "00-ABCDEFGHIJKLMN00",
provision_secret_key: "00abcd11ef22ghij3300klmno123",

dhcp: "Test",
};
</script>

...


b) Initialize the gadget HTML element

...

The first parameter targets the html element that is the gadget, using jQuery's selector format. In this case, it is an element with the ID "gadget".

 


Basic Page Example

Here is a simple example html page with a search gadget. In this example, a default search term of "6connecttest" is included, and the return limited 10 records. 

Code Block
languagexml
<html>
	<head>
		<script type='text/javascript' src="https://cloud.6connectexample.com/6c_123/portable/init.js"></script>
		<link rel="stylesheet" type="text/css" href="https://cloud.6connectexample.com/6c_123/portable/css/provision-portable.css">
		<script type='text/javascript'>
			var settings = {
				provision_location: "https://cloud.6connectexample.com/6c_123",
				provision_api_key: "00-ABCDEFGHIJKLMN00",
				provision_secret_key: "00abcd11ef22ghij3300klmno123",

				search: "6connecttest",
				limit: 10
			};
			provision('#search_gadget', settings);
		</script>
	</head>
	<body>
		<div id="search_gadget"></div>
	</body>
</html>