Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Docs: use proper XCP release names in API docs

Consider XCP 0.5/midnight-ride to be the first release of XCP, and the one in
which all API elements were introduced.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
  • Loading branch information...
commit 419d9d5a65dc8d26c8e9d811a679d050ed81fcd8 1 parent db08f15
@robhoes robhoes authored
View
1  ocaml/doc/apidoc.js
@@ -328,6 +328,7 @@ function release_list()
{
html = '<h2>Release notes</h2>';
+ releases = releases.slice(releases.indexOf(first_release))
for (i in releases) {
r = releases[i];
html += '<a href="?r=' + r + '">' + get_release_name(r) + '</a><br>';
View
23 ocaml/doc/branding.js
@@ -31,8 +31,29 @@ function make_header(t) {
document.getElementById('header').innerHTML = html;
}
+first_release = 'midnight-ride';
+
function get_release_name(s)
{
- return s;
+ switch (s) {
+ case 'rio':
+ case 'miami':
+ case 'symc':
+ case 'orlando':
+ case 'orlando-update-1':
+ case 'george':
+ case 'midnight-ride':
+ return 'XCP 0.5';
+ break;
+ case 'cowley':
+ return 'XCP 1.0';
+ break;
+ case 'boston':
+ return 'XCP 1.5';
+ break;
+ default:
+ return 'Unreleased';
+ break;
+ }
}
View
7 ocaml/doc/citrix/branding.js
@@ -22,6 +22,8 @@ function make_header(t) {
document.getElementById('header').innerHTML = html;
}
+first_release = 'rio';
+
function get_release_name(s)
{
switch (s) {
@@ -52,11 +54,8 @@ function get_release_name(s)
case 'boston':
return 'XenServer 6.0';
break;
- case 'tampa':
- return 'Unreleased';
- break;
default:
- return s;
+ return 'Unreleased';
break;
}
}
View
15 ocaml/doc/index.html
@@ -12,8 +12,19 @@
make_title();
if (cls != "")
document.write('<script src="api/', cls, '.json" type="text/JavaScript"><\/script>');
- if (rel != "")
- document.write('<script src="api/', rel, '.json" type="text/JavaScript"><\/script>');
+ if (rel != "") {
+ if (rel == first_release)
+ rels = releases.slice(0, releases.indexOf(first_release) + 1);
+ else
+ rels = [rel];
+ function ld(info) {
+ if (rels.length > 0)
+ load_script('api/' + rels.pop() + '.json', function(){return ld(info.concat(release_info));});
+ else
+ release_info = info;
+ }
+ ld([]);
+ }
</script>
<link rel="stylesheet" href="style.css" />
</head>
View
12 ocaml/doc/main.js
@@ -84,3 +84,15 @@ function compare(a, b)
return 0;
}
+// include a JS script
+function load_script(url, callback)
+{
+ var head= document.getElementsByTagName('head')[0];
+ var script= document.createElement('script');
+ script.type= 'text/javascript';
+ script.src= url;
+ script.onreadystatechange = callback;
+ script.onload = callback
+ head.appendChild(script);
+}
+
Please sign in to comment.
Something went wrong with that request. Please try again.