File: urls.xml

package info (click to toggle)
cockpit 239-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 67,268 kB
  • sloc: javascript: 245,474; ansic: 72,273; python: 23,634; xml: 6,155; sh: 2,919; makefile: 923; sed: 5
file content (76 lines) | stat: -rw-r--r-- 3,721 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<?xml version="1.0"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
	"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
<chapter id="urls">
  <title>Cockpit URLs</title>

  <para>Cockpit URLs follow a specific structure, related to the components they are
    loading. Various components are loaded in <code>&lt;iframe&gt;</code> tags. The
    URLs for these components are described first. Further down below you can
    find information about the top level bookmarkable Cockpit address URLs.</para>

  <section id="urls-components">
    <title>Component URLs</title>

    <para>Cockpit components are HTML documents. They are organized into
      <link linkend="packages">packages</link>. Each package contains information about
      which HTML components are available in that package. Components should always use
      relative URLs to access resources, such as images, scripts or CSS files, even
      if they refer to a resource in another package.</para>

    <para>The following are valid component URLs, each bit will be discussed
      below:</para>

<programlisting>
/cockpit/@localhost/package/component.html#/hash
/cockpit/$checksum/package/component.html#/hash
/cockpit/@server.example.com/package/component.html#/hash
/cockpit+embedder/@localhost/package/component.html#/hash
</programlisting>

    <para>All resource URLs are under the <code>/cockpit</code> namespace. In cases
      where a Cockpit component is being <link linkend="embedding">embedded</link>
      the <code>/cockpit</code> may be followed by a plus sign and another
      <code>embedder</code> specific identifier.</para>

    <para>What follows is either a <code>@host</code> or <code>$checksum</code> which
      tells cockpit where to <link linkend="packages">find the package</link>.
      Checksums are used when more than one host has identical packages and the resources
      can be cached.</para>

    <para>The <code>package</code> name is next, followed by the <code>component</code>
      HTML path inside that package. And lastly a hash allows for navigation within a
      single component. The hash should follow a URL path and/or query string form.</para>

    <warning>
      <para>Never assume that the <code>@host</code> or <code>$checksum</code> portion
        is predictable. Only refer to resources in packages on the same host.</para>
    </warning>
  </section>

  <section id="urls-visible">
    <title>Visible URLs</title>

    <para>The above Component URLs are usually not visible to the user. Instead the
      Cockpit Web Service wraps the components in a shell which allows navigation, and
      provides bookmarkable clean URLs to the component. These URLs do not affect
      <link linkend="embedding">embedders</link> or
      <link linkend="packages">components</link> directly.</para>

    <para>If no path is present then the Cockpit will redirect to the default page for the server.</para>

    <para>If the first segment of the path begins with an <code>@</code> sign, then
      the component is being shown from a non-local host.</para>

    <para>The next segment of the path, (or first if the component is being shown on
      the local host) is the <link linkend="packages">package name</link>.
      The remainder of the path is a component file in the package. If no further path
      segments are present, a default <code>index.html</code> component in the package
      is loaded. An extension of <filename>.html</filename> is automatically
      appended.</para>

    <para>The hash portion of the path is automatically transferred to the component
      as the hash of its <link linkend="urls-components">resource URL</link>.</para>
  </section>

</chapter>