Remove site/ replaces by docs/ (#2803)
Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
2
.github/workflows/style_check.yaml
vendored
@@ -4,7 +4,7 @@ on:
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- '.3rd-party/**'
|
||||
- 'site/**'
|
||||
- 'docs/**'
|
||||
- '**.md'
|
||||
workflow_dispatch:
|
||||
|
||||
|
||||
2
.github/workflows/verify-hibernate.yaml
vendored
@@ -7,13 +7,11 @@ on:
|
||||
paths-ignore:
|
||||
- '.3rd-party/**'
|
||||
- 'docs/**'
|
||||
- 'site/**'
|
||||
- '**.md'
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- '.3rd-party/**'
|
||||
- 'docs/**'
|
||||
- 'site/**'
|
||||
- '**.md'
|
||||
workflow_dispatch:
|
||||
|
||||
|
||||
2
.github/workflows/verify.yaml
vendored
@@ -7,13 +7,11 @@ on:
|
||||
paths-ignore:
|
||||
- '.3rd-party/**'
|
||||
- 'docs/**'
|
||||
- 'site/**'
|
||||
- '**.md'
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- '.3rd-party/**'
|
||||
- 'docs/**'
|
||||
- 'site/**'
|
||||
- '**.md'
|
||||
workflow_dispatch:
|
||||
|
||||
|
||||
3
.gitmodules
vendored
@@ -1,3 +0,0 @@
|
||||
[submodule "site/themes/hugo-material-docs"]
|
||||
path = site/themes/hugo-material-docs
|
||||
url = https://github.com/digitalcraftsman/hugo-material-docs.git
|
||||
@@ -26,4 +26,4 @@ The root url http://localhost:8081 will redirect directly to the Swagger Managem
|
||||
|
||||
# Clustering (Experimental!!!)
|
||||
## Remote Events between micro-services
|
||||
[See more information](../../site/content/guides/clustering.md)
|
||||
[See more information](../../docs/content/guides/clustering.md)
|
||||
@@ -16,4 +16,4 @@ run org.eclipse.hawkbit.app.dmf.DMFStart
|
||||
```
|
||||
# Clustering (Experimental!!!)
|
||||
## Remote Events between micro-services
|
||||
[See more information](../../site/content/guides/clustering.md)
|
||||
[See more information](../../docs/content/guides/clustering.md)
|
||||
23
pom.xml
@@ -81,7 +81,6 @@
|
||||
<!-- Maven Plugin versions - START -->
|
||||
<maven.enforcer.plugin.version>3.6.2</maven.enforcer.plugin.version>
|
||||
<flatten.maven.plugin.version>1.7.3</flatten.maven.plugin.version>
|
||||
<maven.site.plugin.version>3.21.0</maven.site.plugin.version>
|
||||
|
||||
<maven.surefire.plugin.version>3.5.4</maven.surefire.plugin.version>
|
||||
<jacoco.maven.plugin.version>0.8.14</jacoco.maven.plugin.version>
|
||||
@@ -475,16 +474,6 @@
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-site-plugin</artifactId>
|
||||
<version>${maven.site.plugin.version}</version>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
<skipDeploy>true</skipDeploy>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.jacoco</groupId>
|
||||
<artifactId>jacoco-maven-plugin</artifactId>
|
||||
@@ -579,13 +568,10 @@
|
||||
<excludes>
|
||||
<exclude>docker/**</exclude>
|
||||
<exclude>licenses/LICENSE*</exclude>
|
||||
<exclude>**/*.sql</exclude>
|
||||
<exclude>docs/**</exclude>
|
||||
<exclude>/docs/rest-api/**</exclude>
|
||||
<exclude>/docs/images/**</exclude>
|
||||
<exclude>**/application-local.properties</exclude>
|
||||
<exclude>eclipse_codeformatter.xml</exclude>
|
||||
<exclude>intellij_codeformatter.xml</exclude>
|
||||
<exclude>**/*.sql</exclude>
|
||||
<!-- hawkbit-simple-ui - start-->
|
||||
<exclude>**/banner.txt</exclude>
|
||||
<exclude>**/robots.txt</exclude>
|
||||
@@ -596,11 +582,8 @@
|
||||
<exclude>**/vite.config.ts</exclude>
|
||||
<exclude>**/vite.generated.ts</exclude>
|
||||
<!-- hawkbit-simple-ui - end -->
|
||||
<!-- site - start -->
|
||||
<exclude>site/layouts/**</exclude>
|
||||
<exclude>site/static/**</exclude>
|
||||
<exclude>site/*.toml</exclude>
|
||||
<!-- site - end -->
|
||||
<!-- development files -->
|
||||
<exclude>**/application-local.properties</exclude>
|
||||
</excludes>
|
||||
</licenseSet>
|
||||
</licenseSets>
|
||||
|
||||
15
site/.gitignore
vendored
@@ -1,15 +0,0 @@
|
||||
# rest api doc
|
||||
content/rest-api/*.json
|
||||
content/rest-api/*.html
|
||||
content/rest-api/*.yaml
|
||||
static/rest-api/*.html
|
||||
# npm leftover
|
||||
node_modules
|
||||
package.json
|
||||
package-lock.json
|
||||
# themes
|
||||
themes
|
||||
themes/hugo-material-docs
|
||||
# hugo
|
||||
public
|
||||
.hugo_build.lock
|
||||
@@ -1,34 +0,0 @@
|
||||
# Eclipse hawkBit Documentation
|
||||
|
||||
The hawkBit documentation is built with [Hugo](https://www.gohugo.io/) using
|
||||
the [Material](http://github.com/digitalcraftsman/hugo-material-docs)
|
||||
theme. Compiling the documentation is not included within the regular Maven build.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
1. **Install Hugo**: see [installing Hugo](https://gohugo.io/getting-started/installing/) documentation on how to
|
||||
install Hugo.
|
||||
2. **Install NODE.js and npm**
|
||||
see [installing Node.js and npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) documentation on
|
||||
how to install Node.js and npm
|
||||
3. **Install Redocly CLI** see [installing Redocly CLI](https://redocly.com/docs/cli/installation/) documentation on how
|
||||
to install Redocly CLI
|
||||
4. **Install hawkBit**: run `mvn install` in the parent directory to generate the latest REST docs for hawkBit.
|
||||
|
||||
## Build and Serve documentation
|
||||
|
||||
The following Maven targets are available in order to build and serve the documentation:
|
||||
|
||||
* `mvn install`: _i._ Copies the generated REST docs to `content/rest-api/` and _ii._ downloads the required Hugo theme
|
||||
* `mvn site`: Serve the documentation on [localhost:1313/hawkbit/](http://localhost:1313/hawkbit/)
|
||||
|
||||
_Note_: the local port could be different. Please, look at the _mvn site_ command output.
|
||||
* `mvn clean`: Delete generated artifacts (REST docs, Hugo theme)
|
||||
|
||||
## Generate /public folder
|
||||
|
||||
In order to generate the `/public` folder, which can be put on a web-server, run the following command:
|
||||
|
||||
```bash
|
||||
$ hugo
|
||||
```
|
||||
@@ -1,38 +0,0 @@
|
||||
@echo off
|
||||
@REM
|
||||
@REM Copyright (c) 2023 Bosch.IO GmbH and others
|
||||
@REM
|
||||
@REM This program and the accompanying materials are made
|
||||
@REM available under the terms of the Eclipse Public License 2.0
|
||||
@REM which is available at https://www.eclipse.org/legal/epl-2.0/
|
||||
@REM
|
||||
@REM SPDX-License-Identifier: EPL-2.0
|
||||
@REM
|
||||
|
||||
rem Checking for Redoc CLI and npm
|
||||
call npx @redocly/cli --version 1> nul 2> nul
|
||||
|
||||
if ERRORLEVEL 1 (
|
||||
echo [ERROR] Redoc CLI is not installed! Please make suer to install it before trying again.
|
||||
exit 1
|
||||
)
|
||||
|
||||
rem Execute the npx command
|
||||
call npx @redocly/cli build-docs %cd%\content\rest-api\mgmt.yaml -o %cd%\content\rest-api\mgmt.html
|
||||
|
||||
if ERRORLEVEL 1 (
|
||||
echo [ERROR] Failed to execute the Redoc CLI command form MGMT API.
|
||||
exit 1
|
||||
) else (
|
||||
echo [INFO] Successfully executed the Redoc CLI command for MGMT API.
|
||||
)
|
||||
|
||||
rem Execute the npx command
|
||||
call npx @redocly/cli build-docs %cd%\content\rest-api\ddi.yaml -o %cd%\content\rest-api\ddi.html
|
||||
|
||||
if ERRORLEVEL 1 (
|
||||
echo [ERROR] Failed to execute the Redoc CLI command form DDI API.
|
||||
exit 1
|
||||
) else (
|
||||
echo [INFO] Successfully executed the Redoc CLI command for DDI API.
|
||||
)
|
||||
@@ -1,41 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2018 Bosch Software Innovations GmbH and others
|
||||
#
|
||||
# This program and the accompanying materials are made
|
||||
# available under the terms of the Eclipse Public License 2.0
|
||||
# which is available at https://www.eclipse.org/legal/epl-2.0/
|
||||
#
|
||||
# SPDX-License-Identifier: EPL-2.0
|
||||
#
|
||||
|
||||
#!/bin/bash
|
||||
|
||||
CURRENT_DIR=$(pwd)
|
||||
|
||||
# Checking for Redoc CLI and npm
|
||||
npx @redocly/cli --version > /dev/null 2>&1
|
||||
|
||||
if [ $? != 0 ]; then
|
||||
echo "[ERROR] Redoc CLI is not installed! Please make suer to install it before trying again."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Execute the npx command
|
||||
npx @redocly/cli build-docs ${CURRENT_DIR}/content/rest-api/mgmt.yaml -o ${CURRENT_DIR}/static/rest-api/mgmt.html
|
||||
|
||||
if [ $? != 0 ]; then
|
||||
echo "[ERROR] Failed to execute the Redoc CLI command form MGMT API."
|
||||
exit 1
|
||||
else
|
||||
echo "[INFO] Successfully executed the Redoc CLI command for MGMT API."
|
||||
fi
|
||||
|
||||
# Execute the npx command
|
||||
npx @redocly/cli build-docs ${CURRENT_DIR}/content/rest-api/ddi.yaml -o ${CURRENT_DIR}/static/rest-api/ddi.html
|
||||
|
||||
if [ $? != 0 ]; then
|
||||
echo "[ERROR] Failed to execute the Redoc CLI command form DDI API."
|
||||
exit 1
|
||||
else
|
||||
echo "[INFO] Successfully executed the Redoc CLI command for DDI API."
|
||||
fi
|
||||
@@ -1,22 +0,0 @@
|
||||
@echo off
|
||||
@REM
|
||||
@REM Copyright (c) 2023 Bosch.IO GmbH and others
|
||||
@REM
|
||||
@REM This program and the accompanying materials are made
|
||||
@REM available under the terms of the Eclipse Public License 2.0
|
||||
@REM which is available at https://www.eclipse.org/legal/epl-2.0/
|
||||
@REM
|
||||
@REM SPDX-License-Identifier: EPL-2.0
|
||||
@REM
|
||||
|
||||
rem This script is used to clean up the previously generated or downloaded files.
|
||||
|
||||
echo [INFO] Remove Hugo Theme
|
||||
rmdir /Q /S themes resources public
|
||||
echo [INFO] ... done
|
||||
|
||||
echo [INFO]
|
||||
|
||||
echo [INFO] Remove generated REST docs
|
||||
del /Q content\rest-api\*.html
|
||||
echo [INFO] ... done
|
||||
@@ -1,27 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2018 Bosch Software Innovations GmbH and others
|
||||
#
|
||||
# This program and the accompanying materials are made
|
||||
# available under the terms of the Eclipse Public License 2.0
|
||||
# which is available at https://www.eclipse.org/legal/epl-2.0/
|
||||
#
|
||||
# SPDX-License-Identifier: EPL-2.0
|
||||
#
|
||||
|
||||
# This script is used to clean up the previously generated or downloaded files.
|
||||
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
echo "[INFO] Remove Hugo Theme"
|
||||
rm -rf themes resources public
|
||||
echo "[INFO] ... done"
|
||||
|
||||
echo "[INFO] "
|
||||
|
||||
echo "[INFO] Remove generated REST docs"
|
||||
rm -f content/rest-api/*.json
|
||||
rm -f content/rest-api/*.html
|
||||
echo "[INFO] ... done"
|
||||
|
||||
|
||||
110
site/config.toml
@@ -1,110 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2018 Bosch Software Innovations GmbH and others
|
||||
#
|
||||
# This program and the accompanying materials are made
|
||||
# available under the terms of the Eclipse Public License 2.0
|
||||
# which is available at https://www.eclipse.org/legal/epl-2.0/
|
||||
#
|
||||
# SPDX-License-Identifier: EPL-2.0
|
||||
#
|
||||
|
||||
baseurl = "https://eclipse.dev/hawkbit/"
|
||||
languageCode = "en-us"
|
||||
title = "Eclipse hawkBit"
|
||||
theme = "hugo-material-docs"
|
||||
metadataformat = "toml"
|
||||
canonifyurls = false
|
||||
|
||||
[markup]
|
||||
[markup.goldmark]
|
||||
[markup.goldmark.extensions]
|
||||
typographer = true
|
||||
[markup.goldmark.renderer]
|
||||
unsafe = true
|
||||
|
||||
[markup.highlight]
|
||||
codeFences = false
|
||||
|
||||
[params]
|
||||
# General information
|
||||
author = "The Eclipse hawkBit Project"
|
||||
description = "IoT. Update. Device."
|
||||
copyright = "The Eclipse hawkBit Project"
|
||||
logo = "images/hawkbit_icon.png"
|
||||
favicon = "images/favicon.ico"
|
||||
|
||||
# Repository
|
||||
provider = "GitHub"
|
||||
repo_url = "https://github.com/eclipse-hawkbit/hawkbit"
|
||||
|
||||
permalink = "#"
|
||||
|
||||
# Custom assets
|
||||
custom_css = ["css/hawkbit.css","//www.eclipse.org/eclipse.org-common/themes/solstice/public/stylesheets/vendor/cookieconsent/cookieconsent.min.css"]
|
||||
custom_js = []
|
||||
|
||||
# Syntax highlighting theme
|
||||
highlight_css = ""
|
||||
|
||||
[params.palette]
|
||||
primary = "deep-purple"
|
||||
accent = "light-green"
|
||||
|
||||
[params.font]
|
||||
text = "Ubuntu"
|
||||
code = "Ubuntu Mono"
|
||||
|
||||
[social]
|
||||
github = "eclipse/hawkbit"
|
||||
gitter = "eclipse/hawkbit"
|
||||
docker = "hawkbit"
|
||||
|
||||
[[menu.main]]
|
||||
name = "What is hawkBit"
|
||||
url = "/whatishawkbit/"
|
||||
weight = 10
|
||||
|
||||
[[menu.main]]
|
||||
name = "Getting started"
|
||||
url = "/gettingstarted/"
|
||||
weight = 20
|
||||
|
||||
[[menu.main]]
|
||||
name = "Guides"
|
||||
url = "/guides/"
|
||||
weight = 30
|
||||
|
||||
[[menu.main]]
|
||||
name = "Features"
|
||||
url = "/features/"
|
||||
weight = 40
|
||||
|
||||
[[menu.main]]
|
||||
name = "Concepts"
|
||||
url = "/concepts/"
|
||||
weight = 50
|
||||
|
||||
[[menu.main]]
|
||||
name = "Architecture"
|
||||
url = "/architecture/"
|
||||
weight = 60
|
||||
|
||||
[[menu.main]]
|
||||
name = "APIs"
|
||||
url = "/apis/"
|
||||
weight = 80
|
||||
|
||||
[[menu.main]]
|
||||
name = "Release notes"
|
||||
url = "/release-notes/"
|
||||
weight = 90
|
||||
|
||||
[[menu.main]]
|
||||
name = "Blog"
|
||||
url = "/blog/"
|
||||
weight = 100
|
||||
|
||||
[[menu.main]]
|
||||
name = "Community"
|
||||
url = "/community/"
|
||||
weight = 110
|
||||
@@ -1,44 +0,0 @@
|
||||
---
|
||||
title: Direct Device Integration API
|
||||
parent: APIs
|
||||
weight: 82
|
||||
---
|
||||
|
||||
The hawkBit [update server](https://github.com/eclipse-hawkbit/hawkbit) provides REST resources which are consumed by
|
||||
the device to retrieve software update tasks.
|
||||
This API is based on HTTP standards and a polling mechanism.
|
||||
<!--more-->
|
||||
|
||||
{{% note %}}
|
||||
In DDI the target is identified using a **controllerId**. Controller is used as a term for the actual service/client on
|
||||
the device. That allows users to have in some cases even multiple clients on the same target for different tasks, e.g.
|
||||
Firmware update and App management.
|
||||
{{% /note %}}
|
||||
|
||||
## State Machine Mapping
|
||||
|
||||
For historical reasons the DDI has a different state machine and status messages than
|
||||
the [Target State Machine](../../concepts/targetstate/) of the hawkBit update server.
|
||||
|
||||
This is kept in order to ensure that _DDI_ stays compatible for devices out there in the field. A future version "2" of
|
||||
_DDI_ might change that. _DDI_ also defines more states than the update server, e.g. multiple DDI states are currently
|
||||
mapped by the _DDI_ implementation to _RUNNING_ state. It is possible that in the future hawkBit will fully leverage
|
||||
these additional states.
|
||||
|
||||
The _DDI_ API allows the device to provide the following feedback messages:
|
||||
|
||||
DDI `status.execution` type | handling by update server | Mapped ActionStatus type
|
||||
-----------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------
|
||||
CANCELED | This is send by the target as confirmation of a cancellation request by the update server. | CANCELED
|
||||
REJECTED | This is send by the target in case an update of a cancellation is rejected, i.e. cannot be fulfilled at this point in time. Note: the target should send a CLOSED->ERROR if it believes it will not be able to proceed the action at all. | WARNING
|
||||
CLOSED | Target completes the action either with `status.result.finished` SUCCESS or FAILURE as result. Note: DDI defines also a status NONE which will not be interpreted by the update server and handled like SUCCESS. | ERROR (DDI FAILURE) or FINISHED (DDI SUCCESS or NONE)
|
||||
DOWNLOAD | This can be used by the target to inform that it is downloading artifacts of the action. | DOWNLOAD
|
||||
DOWNLOADED | This can be used by the target to inform that it has downloaded artifacts of the action. | DOWNLOADED
|
||||
PROCEEDING | This can be used by the target to inform that it is working on the action. | RUNNING
|
||||
SCHEDULED | This can be used by the target to inform that it scheduled on the action. | RUNNING
|
||||
RESUMED | This can be used by the target to inform that it continued to work on the action. | RUNNING
|
||||
|
||||
See this [issue](https://github.com/eclipse-hawkbit/hawkbit/issues/952) for additional information, concerning the cancellation of updates. To finally accept a cancellation, you must send a "closed" status.exection type.
|
||||
## DDI APIs
|
||||
|
||||
<iframe style="padding-top: 20px;" width="100%" height="900px" frameborder="0" src="../../rest-api/ddi.html"></iframe>
|
||||
@@ -1,617 +0,0 @@
|
||||
---
|
||||
title: Device Management Federation API
|
||||
parent: API
|
||||
weight: 83
|
||||
---
|
||||
|
||||
The DMF API provides Java classes which allows that the message body can be deserialized at runtime into a Java object.
|
||||
Also Java classes can be used to serialize Java objects into JSON bodies to send a message to hawkBit.
|
||||
Currently, bodies of messages are based on JSON.
|
||||
|
||||
<!--more-->
|
||||
|
||||
## Basics
|
||||
|
||||
There are three basic concepts of AMQP:
|
||||
|
||||
- Exchanges - what you publish to.
|
||||
- Queues - what you consume from.
|
||||
- Bindings - configuration that maps an exchange to a queue.
|
||||
|
||||
**Queues** are just a place for receiving messages.
|
||||
Bindings determine how messages get put in this place
|
||||
Queues can also be bound to multiple exchanges.
|
||||
|
||||
**Exchanges** are just publish messages.
|
||||
The user decides who can produce on an exchange and who can create bindings on that exchange for delivery to a specific
|
||||
queue.
|
||||
|
||||
hawkBit will create all necessary queues, exchanges and bindings for the user, making it easy to get started.
|
||||
The exchange name for outgoing messages is **dmf.exchange**.
|
||||
|
||||
The user has to set a `reply_to` header (see chapter below), in order to specify the exchange to which hawkBit should
|
||||
reply to.
|
||||
|
||||
The following chapter describes the message body, header and properties.
|
||||
|
||||
Note: the DMF protocol was intended to be compatible to other use cases by design. As a result, DMF uses the term *
|
||||
*thing** and not **target** but they are actually synonyms in this case.
|
||||
|
||||
## Messages sent to hawkBit (Client -> hawkBit)
|
||||
|
||||
### THING_CREATED
|
||||
|
||||
Message to register and update a provisioning target.
|
||||
|
||||
| Header | Description | Type | Mandatory |
|
||||
|---------|------------------------------------------------|------------------------------|-----------|
|
||||
| type | Type of the message | Fixed string "THING_CREATED" | true |
|
||||
| thingId | The ID of the registered provisioning target | String | true |
|
||||
| tenant | The tenant this provisioning target belongs to | String | true |
|
||||
| sender | Name of the message sender | String | false |
|
||||
|
||||
| Message Properties | Description | Type | Mandatory |
|
||||
|--------------------|---------------------------------|--------|-----------|
|
||||
| content_type | The content type of the payload | String | true |
|
||||
| reply_to | Exchange to reply to | String | true |
|
||||
|
||||
Example headers and payload:
|
||||
|
||||
| Header | MessageProperties |
|
||||
|--------------------------------------------------------------------------------------|--------------------------------------------------------------------|
|
||||
| type=THING\_CREATED <br /> tenant=default <br /> thingId=abc <br /> sender=myClient | content\_type=application/json <br /> reply_to=myExchangeToReplyTo |
|
||||
|
||||
Payload Template (optional):
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "String",
|
||||
"type": "String",
|
||||
"attributeUpdate": {
|
||||
"attributes": {
|
||||
"exampleKey1" : "exampleValue1",
|
||||
"exampleKey2" : "exampleValue2"
|
||||
},
|
||||
"mode": "String"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
The "name" property specifies the name of the thing, which by default is the thing ID. This property is optional.<br />
|
||||
<br />
|
||||
The "type" property specifies name of a target type which should be assigned to the created/updated target. The
|
||||
target type with the specified name should be created in advance, otherwise it can't be assigned to the target,
|
||||
resulting in:
|
||||
|
||||
* error is logged
|
||||
* if the target does not exist then it is created without any target type assigned
|
||||
* if it exists already then no changes to its target type assignment are made.
|
||||
|
||||
If the "type" property is set to a blank string while updating an existing target then any eventual target type
|
||||
assignment is removed from the target. This property is optional and if omitted then no changes to the target type
|
||||
assignment are made.<br />
|
||||
<br />
|
||||
The "attributeUpdate" property provides the attributes of the thing, for details see UPDATE_ATTRIBUTES message. This
|
||||
property is optional.
|
||||
|
||||
### THING_REMOVED
|
||||
|
||||
Message to request the deletion of a provisioning target.
|
||||
|
||||
| Header | Description | Type | Mandatory |
|
||||
|---------|------------------------------------------------|------------------------------|-----------|
|
||||
| type | Type of the message | Fixed string "THING_REMOVED" | true |
|
||||
| thingId | The ID of the registered provisioning target | String | true |
|
||||
| tenant | The tenant this provisioning target belongs to | String | false |
|
||||
|
||||
| Message Properties | Description | Type | Mandatory |
|
||||
|--------------------|---------------------------------|--------|-----------|
|
||||
| content_type | The content type of the payload | String | true |
|
||||
|
||||
Example headers
|
||||
|
||||
| Header | MessageProperties |
|
||||
|--------------------------------------------------------------|--------------------------------|
|
||||
| type=THING\_REMOVED <br /> tenant=default <br /> thingId=abc | content\_type=application/json |
|
||||
|
||||
### UPDATE_ATTRIBUTES
|
||||
|
||||
Message to update target attributes. This message can be send in response to a REQUEST_ATTRIBUTES_UPDATE event, sent by
|
||||
hawkBit.
|
||||
|
||||
| Header | Description | Type | Mandatory |
|
||||
|---------|----------------------------------|----------------------------------|-----------|
|
||||
| type | Type of the message | Fixed string "EVENT" | true |
|
||||
| topic | Topic name identifying the event | Fixed string "UPDATE_ATTRIBUTES" | true |
|
||||
| thingId | The ID of the registered thing | String | true |
|
||||
| tenant | The tenant this thing belongs to | String | false |
|
||||
|
||||
| Message Properties | Description | Type | Mandatory |
|
||||
|--------------------|---------------------------------|--------|-----------|
|
||||
| content_type | The content type of the payload | String | true |
|
||||
|
||||
Example header and payload:
|
||||
|
||||
| Header | MessageProperties |
|
||||
|--------------------------------------------------------------------------------------|---------------------------------------|
|
||||
| type=EVENT <br /> tenant=default <br /> thingId=abc <br /> topic=UPDATE\_ATTRIBUTES | content\_type=application/json <br /> |
|
||||
|
||||
Payload Template:
|
||||
|
||||
```json
|
||||
{
|
||||
"attributes": {
|
||||
"exampleKey1" : "exampleValue1",
|
||||
"exampleKey2" : "exampleValue2"
|
||||
},
|
||||
"mode": "String"
|
||||
}
|
||||
```
|
||||
|
||||
The "mode" property specifies the update mode that should be applied. This property is optional.
|
||||
Possible [mode](https://github.com/eclipse-hawkbit/hawkbit/tree/master/hawkbit-dmf/hawkbit-dmf-api/src/main/java/org/eclipse/hawkbit/dmf/json/model/DmfUpdateMode.java)
|
||||
values:
|
||||
|
||||
| Value | Description |
|
||||
|---------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| MERGE | The target attributes specified in the payload are merged into the existing attributes. This is the default mode that is applied if no "mode" property is specified in the payload. |
|
||||
| REPLACE | The existing attributes are replaced with the target attributes specified in the payload. |
|
||||
| REMOVE | The target attributes specified in the payload are removed from the existing attributes. |
|
||||
|
||||
### UPDATE_ACTION_STATUS
|
||||
|
||||
Message to send an action status event to hawkBit.
|
||||
|
||||
| Header | Description | Type | Mandatory |
|
||||
|--------|----------------------------------|-------------------------------------|-----------|
|
||||
| type | Type of the message | Fixed string "EVENT" | true |
|
||||
| topic | Topic name identifying the event | Fixed string "UPDATE_ACTION_STATUS" | true |
|
||||
| tenant | The tenant this thing belongs to | String | false |
|
||||
|
||||
| Message Properties | Description | Type | Mandatory |
|
||||
|--------------------|---------------------------------|--------|-----------|
|
||||
| content_type | The content type of the payload | String | true |
|
||||
|
||||
Payload Template (the Java representation
|
||||
is [ActionUpdateStatus](https://github.com/eclipse-hawkbit/hawkbit/tree/master/hawkbit-dmf/hawkbit-dmf-api/src/main/java/org/eclipse/hawkbit/dmf/json/model/DmfActionUpdateStatus.java)):
|
||||
|
||||
```json
|
||||
{
|
||||
"actionId": long,
|
||||
"softwareModuleId": long,
|
||||
"actionStatus":"String",
|
||||
"message":["String"],
|
||||
"timestamp": long
|
||||
}
|
||||
```
|
||||
|
||||
Possible [actionStatus](https://github.com/eclipse-hawkbit/hawkbit/tree/master/hawkbit-dmf/hawkbit-dmf-api/src/main/java/org/eclipse/hawkbit/dmf/json/model/DmfActionStatus.java)
|
||||
values:
|
||||
|
||||
| Value | Description |
|
||||
|-----------------|-----------------------------------------|
|
||||
| DOWNLOAD | Device is downloading |
|
||||
| DOWNLOADED | Device completed download |
|
||||
| RETRIEVED | Device has retrieved the artifact |
|
||||
| RUNNING | Update is running |
|
||||
| FINISHED | Update process finished successful |
|
||||
| ERROR | Error during update process |
|
||||
| WARNING | Warning during update process |
|
||||
| CANCELED | Cancel update process successful |
|
||||
| CANCEL_REJECTED | Cancel update process has been rejected |
|
||||
|
||||
Example header and payload:
|
||||
|
||||
| Header | MessageProperties |
|
||||
|-----------------------------------------------------------------------|-------------------------------|
|
||||
| type=EVENT <br /> tenant=default <br /> topic=UPDATE\_ACTION\_STATUS | content_type=application/json |
|
||||
|
||||
```json
|
||||
{
|
||||
"actionId":137,
|
||||
"softwareModuleId":17,
|
||||
"actionStatus":"DOWNLOAD",
|
||||
"message":["The download has started"],
|
||||
"timestamp": 1704070800000
|
||||
}
|
||||
```
|
||||
|
||||
### PING
|
||||
|
||||
hawkBit allows DMF clients to check the availability of the DMF service. For this scenario DMF specifies a PING message
|
||||
that can be sent by the client:
|
||||
|
||||
| Header | Description | Type | Mandatory |
|
||||
|--------|--------------------------------|---------------------|-----------|
|
||||
| type | Type of the message | Fixed string "PING" | true |
|
||||
| tenant | The tenant the PING belongs to | String | false |
|
||||
|
||||
| Message Properties | Description | Type | Mandatory |
|
||||
|--------------------|-----------------------------------------------------------------------------|--------|-----------|
|
||||
| correlationId | CorrelationId that allows the client to map a PING request to PING_RESPONSE | String | true |
|
||||
|
||||
## Messages sent by hawkBit (hawkBit -> Client)
|
||||
|
||||
### CANCEL_DOWNLOAD
|
||||
|
||||
Message to cancel an update task.
|
||||
|
||||
| Header | Description | Type | Mandatory |
|
||||
|---------|------------------------------------------------|--------------------------------|-----------|
|
||||
| type | Type of the message | Fixed string "Event" | true |
|
||||
| thingId | The ID of the registered provisioning target | String | true |
|
||||
| topic | Topic name identifying the event | Fixed string "CANCEL_DOWNLOAD" | true |
|
||||
| tenant | The tenant this provisioning target belongs to | String | false |
|
||||
|
||||
| Message Properties | Description | Type | Mandatory |
|
||||
|--------------------|---------------------------------|--------|-----------|
|
||||
| content_type | The content type of the payload | String | true |
|
||||
|
||||
Payload template:
|
||||
|
||||
```json
|
||||
{
|
||||
"actionId": long
|
||||
}
|
||||
```
|
||||
|
||||
Example Headers and Payload:
|
||||
|
||||
| Header | MessageProperties |
|
||||
|------------------------------------------------------------------------------------|-------------------------------|
|
||||
| type=EVENT <br /> tenant=default <br /> thingId=abc <br /> topic=CANCEL\_DOWNLOAD | content_type=application/json |
|
||||
|
||||
```json
|
||||
{
|
||||
"actionId":137
|
||||
}
|
||||
```
|
||||
|
||||
After sending this message, an action status event with either actionStatus=CANCELED or actionStatus=CANCEL_REJECTED has
|
||||
to be returned.
|
||||
|
||||
Example header and payload when cancellation is successful:
|
||||
|
||||
| Header | MessageProperties |
|
||||
|-----------------------------------------------------------------------|-------------------------------|
|
||||
| type=EVENT <br /> tenant=default <br /> topic=UPDATE\_ACTION\_STATUS | content_type=application/json |
|
||||
|
||||
```json
|
||||
{
|
||||
"actionId":137,
|
||||
"softwareModuleId":17,
|
||||
"actionStatus":"CANCELED",
|
||||
"message":["The update was canceled."],
|
||||
"timestamp": 1704070800000
|
||||
}
|
||||
```
|
||||
|
||||
Example header and payload when cancellation is rejected:
|
||||
|
||||
| Header | MessageProperties |
|
||||
|-----------------------------------------------------------------------|-------------------------------|
|
||||
| type=EVENT <br /> tenant=default <br /> topic=UPDATE\_ACTION\_STATUS | content_type=application/json |
|
||||
|
||||
```json
|
||||
{
|
||||
"actionId":137,
|
||||
"softwareModuleId":17,
|
||||
"actionStatus":"CANCEL_REJECTED",
|
||||
"message":["The cancellation was not possible since the target sent an unexpected response."],
|
||||
"timestamp": 1704070800000
|
||||
}
|
||||
```
|
||||
|
||||
### DOWNLOAD_AND_INSTALL or DOWNLOAD
|
||||
|
||||
Message sent by hawkBit to initialize an update or download task. Note: in case of a maintenance window configured but
|
||||
not yet active the message will have the topic _DOWNLOAD_ instead of _DOWNLOAD_AND_INSTALL_.
|
||||
|
||||
| Header | Description | Type | Mandatory |
|
||||
|---------|------------------------------------------------|---------------------------------------------------|-----------|
|
||||
| type | Type of the message | Fixed string "EVENT" | true |
|
||||
| thingId | The ID of the registered provisioning target | String | true |
|
||||
| topic | Topic name identifying the event | Fixed string "DOWNLOAD_AND_INSTALL" or "DOWNLOAD" | true |
|
||||
| tenant | The tenant this provisioning target belongs to | String | false |
|
||||
|
||||
| Message Properties | Description | Type | Mandatory |
|
||||
|--------------------|---------------------------------|--------|-----------|
|
||||
| content_type | The content type of the payload | String | true |
|
||||
|
||||
Payload Template (the Java representation
|
||||
is [DmfDownloadAndUpdateRequest](https://github.com/eclipse-hawkbit/hawkbit/tree/master/hawkbit-dmf/hawkbit-dmf-api/src/main/java/org/eclipse/hawkbit/dmf/json/model/DmfDownloadAndUpdateRequest.java)):
|
||||
|
||||
```json
|
||||
{
|
||||
"actionId": long,
|
||||
"targetSecurityToken": "String",
|
||||
"softwareModules":[
|
||||
{
|
||||
"moduleId": long,
|
||||
"moduleType":"String",
|
||||
"moduleVersion":"String",
|
||||
"artifacts":[
|
||||
{
|
||||
"filename":"String",
|
||||
"urls":{
|
||||
"HTTP":"String",
|
||||
"HTTPS":"String"
|
||||
},
|
||||
"hashes":{
|
||||
"md5":"String",
|
||||
"sha1":"String"
|
||||
},
|
||||
"size":long
|
||||
}],
|
||||
"metadata":[
|
||||
{
|
||||
"key":"String",
|
||||
"value":"String"
|
||||
}
|
||||
]
|
||||
}]
|
||||
}
|
||||
```
|
||||
|
||||
Example header and payload:
|
||||
|
||||
| Header | MessageProperties |
|
||||
|-------------------------------------------------------------------------------------------|-------------------------------|
|
||||
| type=EVENT <br /> tenant=default <br /> thingId=abc <br /> topic=DOWNLOAD\_AND\_INSTALL | content_type=application/json |
|
||||
|
||||
```json
|
||||
{
|
||||
"actionId":137,
|
||||
"targetSecurityToken":"bH7XXAprK1ChnLfKSdtlsp7NOlPnZAYY",
|
||||
"softwareModules":[
|
||||
{
|
||||
"moduleId":7,
|
||||
"moduleType":"firmware",
|
||||
"moduleVersion":"7.7.7",
|
||||
"artifacts":[
|
||||
{
|
||||
"filename":"artifact.zip",
|
||||
"urls":{
|
||||
"HTTP":"http://download-from-url.com",
|
||||
"HTTPS":"https://download-from-url.com"
|
||||
},
|
||||
"hashes":{
|
||||
"md5":"<md5 hash>",
|
||||
"sha1":"<sha1 hash>"
|
||||
},
|
||||
"size":512
|
||||
}],
|
||||
"metadata":[
|
||||
{
|
||||
"key":"installationType",
|
||||
"value":"5784K#"
|
||||
}
|
||||
]
|
||||
}]
|
||||
}
|
||||
```
|
||||
|
||||
### MULTI_ACTION
|
||||
|
||||
If `multi.assignments.enabled` is enabled, this message is sent instead of DOWNLOAD_AND_INSTALL, DOWNLOAD, or
|
||||
CANCEL_DOWNLOAD
|
||||
by hawkBit to initialize update, download, or cancel task(s).
|
||||
|
||||
With weight, one can set the priority to the action. The higher the weight, the higher is the priority of an action.
|
||||
|
||||
| Header | Description | Type | Mandatory |
|
||||
|---------|------------------------------------------------|-----------------------------|-----------|
|
||||
| type | Type of the message | Fixed string "EVENT" | true |
|
||||
| thingId | The ID of the registered provisioning target | String | true |
|
||||
| topic | Topic name identifying the event | Fixed string "MULTI_ACTION" | true |
|
||||
| tenant | The tenant this provisioning target belongs to | String | false |
|
||||
|
||||
| Message Properties | Description | Type | Mandatory |
|
||||
|--------------------|---------------------------------|--------|-----------|
|
||||
| content_type | The content type of the payload | String | true |
|
||||
|
||||
Payload Template (the Java representation
|
||||
is [DmfMultiActionRequest](https://github.com/eclipse-hawkbit/hawkbit/tree/master/hawkbit-dmf/hawkbit-dmf-api/src/main/java/org/eclipse/hawkbit/dmf/json/model/DmfMultiActionRequest.java)):
|
||||
|
||||
```json
|
||||
[{
|
||||
"topic": "String",
|
||||
"weight": long,
|
||||
"action": {
|
||||
"actionId": long,
|
||||
"targetSecurityToken": "String",
|
||||
"softwareModules":[
|
||||
{
|
||||
"moduleId": long,
|
||||
"moduleType":"String",
|
||||
"moduleVersion":"String",
|
||||
"artifacts":[
|
||||
{
|
||||
"filename":"String",
|
||||
"urls":{
|
||||
"HTTP":"String",
|
||||
"HTTPS":"String"
|
||||
},
|
||||
"hashes":{
|
||||
"md5":"String",
|
||||
"sha1":"String"
|
||||
},
|
||||
"size":long
|
||||
}],
|
||||
"metadata":[
|
||||
{
|
||||
"key":"String",
|
||||
"value":"String"
|
||||
}
|
||||
]
|
||||
}]
|
||||
}
|
||||
},
|
||||
{
|
||||
"topic": "String",
|
||||
"weight": long,
|
||||
"action": {
|
||||
"actionId": long,
|
||||
"targetSecurityToken": "String",
|
||||
"softwareModules":[
|
||||
{
|
||||
"moduleId": long,
|
||||
"moduleType":"String",
|
||||
"moduleVersion":"String",
|
||||
"artifacts":[
|
||||
{
|
||||
"filename":"String",
|
||||
"urls":{
|
||||
"HTTP":"String",
|
||||
"HTTPS":"String"
|
||||
},
|
||||
"hashes":{
|
||||
"md5":"String",
|
||||
"sha1":"String"
|
||||
},
|
||||
"size":long
|
||||
}],
|
||||
"metadata":[
|
||||
{
|
||||
"key":"String",
|
||||
"value":"String"
|
||||
}
|
||||
]
|
||||
}]
|
||||
}
|
||||
}]
|
||||
```
|
||||
|
||||
Example header and payload:
|
||||
|
||||
| Header | MessageProperties |
|
||||
|----------------------------------------------------------------------------------|-------------------------------|
|
||||
| type=EVENT <br /> tenant=default <br /> thingId=abc <br /> topic=MULTI\_ACTION | content_type=application/json |
|
||||
|
||||
```json
|
||||
[{
|
||||
"topic": "DOWNLOAD_AND_INSTALL",
|
||||
"weight": 600,
|
||||
"action": {
|
||||
"actionId":137,
|
||||
"targetSecurityToken":"bH7XXAprK1ChnLfKSdtlsp7NOlPnZAYY",
|
||||
"softwareModules":[
|
||||
{
|
||||
"moduleId":7,
|
||||
"moduleType":"firmware",
|
||||
"moduleVersion":"7.7.7",
|
||||
"artifacts":[
|
||||
{
|
||||
"filename":"artifact.zip",
|
||||
"urls":{
|
||||
"HTTP":"http://download-from-url.com",
|
||||
"HTTPS":"https://download-from-url.com"
|
||||
},
|
||||
"hashes":{
|
||||
"md5":"<md5 hash>",
|
||||
"sha1":"<sha1 hash>"
|
||||
},
|
||||
"size":512
|
||||
}],
|
||||
"metadata":[
|
||||
{
|
||||
"key":"installationType",
|
||||
"value":"5784K#"
|
||||
}
|
||||
]
|
||||
}]
|
||||
}
|
||||
},
|
||||
{
|
||||
"topic": "DOWNLOAD",
|
||||
"weight": 500,
|
||||
"action": {
|
||||
"actionId":138,
|
||||
"targetSecurityToken":"bH7XXAprK1ChnLfKSdtlsp7NOlPnZAYY",
|
||||
"softwareModules":[
|
||||
{
|
||||
"moduleId":4,
|
||||
"moduleType":"firmware",
|
||||
"moduleVersion":"7.7.9",
|
||||
"artifacts":[
|
||||
{
|
||||
"filename":"artifact.zip",
|
||||
"urls":{
|
||||
"HTTP":"http://download-from-url.com",
|
||||
"HTTPS":"https://download-from-url.com"
|
||||
},
|
||||
"hashes":{
|
||||
"md5":"<md5 hash>",
|
||||
"sha1":"<sha1 hash>"
|
||||
},
|
||||
"size":512
|
||||
}],
|
||||
"metadata":[
|
||||
{
|
||||
"key":"installationType",
|
||||
"value":"5784K#"
|
||||
}
|
||||
]
|
||||
}]
|
||||
}
|
||||
}]
|
||||
```
|
||||
|
||||
### THING_DELETED
|
||||
|
||||
Message sent by hawkBit when a target has been deleted.
|
||||
|
||||
| Header | Description | Type | Mandatory |
|
||||
|---------|------------------------------------------------|------------------------------|-----------|
|
||||
| type | Type of the message | Fixed string "THING_DELETED" | true |
|
||||
| thingId | The ID of the registered provisioning target | String | true |
|
||||
| tenant | The tenant this provisioning target belongs to | String | true |
|
||||
|
||||
Example header:
|
||||
|
||||
| Header | MessageProperties |
|
||||
|--------------------------------------------------------------|-------------------|
|
||||
| type=THING\_DELETED <br /> tenant=default <br /> thingId=abc | |
|
||||
|
||||
### REQUEST_ATTRIBUTES_UPDATE
|
||||
|
||||
Message sent by Eclipse hawkBit when a re-transmission of target attributes is requested.
|
||||
|
||||
| Header | Description | Type | Mandatory |
|
||||
|---------|------------------------------------------------|------------------------------------------|-----------|
|
||||
| type | Type of the message | Fixed string "EVENT" | true |
|
||||
| thingId | The ID of the registered provisioning target | String | true |
|
||||
| topic | Topic name identifying the event | Fixed string "REQUEST_ATTRIBUTES_UPDATE" | true |
|
||||
| tenant | The tenant this provisioning target belongs to | String | true |
|
||||
|
||||
Example headers:
|
||||
|
||||
| Header | MessageProperties |
|
||||
|----------------------------------------------------------------------------------------------|-------------------|
|
||||
| type=EVENT <br /> tenant=default <br /> thingId=abc <br /> topic=REQUEST\_ATTRIBUTES\_UPDATE | |
|
||||
|
||||
### PING_RESPONSE
|
||||
|
||||
_hawkBit_ will respond to the PING message with a PING_RESPONSE type message that has the same correlationId as the
|
||||
original PING message:
|
||||
|
||||
| Header | Description | Type | Mandatory |
|
||||
|--------|--------------------------------|------------------------------|-----------|
|
||||
| type | Type of the message | Fixed string "PING_RESPONSE" | true |
|
||||
| tenant | The tenant the PING belongs to | String | false |
|
||||
|
||||
| Message Properties | Description | Type | Mandatory |
|
||||
|--------------------|--------------------------------------------|--------|-----------|
|
||||
| correlationId | CorrelationId of the original PING request | String | true |
|
||||
| content_type | The content type of the payload | String | true |
|
||||
|
||||
The PING_RESPONSE also contains a timestamp (i.e. the difference, measured in milliseconds, between the current time and
|
||||
midnight, January 1, 1970 UTC) as plain text. It is not guaranteed that this timestamp is completely accurate.
|
||||
|
||||
| Header | MessageProperties |
|
||||
|-------------------------------------------|-------------------------|
|
||||
| type=PING_RESPONSE <br /> tenant=default | content_type=text/plain |
|
||||
|
||||
```text
|
||||
1505215891247
|
||||
```
|
||||
@@ -1,73 +0,0 @@
|
||||
---
|
||||
title: Management API
|
||||
parent: API
|
||||
weight: 81
|
||||
---
|
||||
|
||||
The Management API is a RESTful API that enables to perform Create/Read/Update/Delete operations for provisioning
|
||||
targets (i.e. devices) and repository content (i.e. software).
|
||||
<!--more-->
|
||||
|
||||
Based on the Management API you can manage and monitor software update operations via HTTP/HTTPS. The _Management API_
|
||||
supports JSON payload with hypermedia as well as filtering, sorting and paging. Furthermore the Management API provides
|
||||
permission based access control and standard roles as well as custom role creation.
|
||||
|
||||
The API is protected and needs authentication and authorization based on the security concept.
|
||||
|
||||
## API Version
|
||||
|
||||
hawkBit provides an consistent Management API interface that guarantees backwards compatibility for future releases by
|
||||
version control.
|
||||
|
||||
The current version of the Management API is `version 1 (v1)` with the URI http://localhost:8080/rest/v1/
|
||||
|
||||
## API Resources
|
||||
|
||||
Supported HTTP-methods are:
|
||||
|
||||
- GET
|
||||
- POST
|
||||
- PUT
|
||||
- DELETE
|
||||
|
||||
## Headers
|
||||
|
||||
For all requests an `Authorization` header has to be set.
|
||||
|
||||
* Username: `username`
|
||||
* Password: `password`
|
||||
|
||||
Also have a look to the [Security](../../concepts/authentication/) chapter.
|
||||
|
||||
In addition, for POST and PUT requests the `Content-Type` header has to be set. Accepted content-types are.
|
||||
|
||||
* `application/json`
|
||||
* `application/hal+json`
|
||||
|
||||
## Request Body
|
||||
|
||||
Besides the relevant data (name, description, createdBy etc.) of a resource entity, a resource entity also has
|
||||
URIs (`_links`) to linked resource entities.
|
||||
|
||||
A _Distribution Set_ entity may have for example URIs to artifacts, _Software Modules_, _Software Module Types_ and
|
||||
metadata.
|
||||
|
||||
```json
|
||||
"_links": {
|
||||
"artifacts": {
|
||||
"href": "http://localhost:8080/rest/v1/softwaremodules/83/artifacts"
|
||||
},
|
||||
"self": {
|
||||
"href": "http://localhost:8080/rest/v1/softwaremodules/83"
|
||||
},
|
||||
"type": {
|
||||
"href": "http://localhost:8080/rest/v1/softwaremoduletypes/43"
|
||||
},
|
||||
"metadata": {
|
||||
"href": "http://localhost:8080/rest/v1/softwaremodules/83/metadata?offset=0&limit=50"
|
||||
}
|
||||
```
|
||||
|
||||
## Management APIs
|
||||
|
||||
<iframe style="padding-top: 20px;" width="100%" height="900px" frameborder="0" src="../../rest-api/mgmt.html"></iframe>
|
||||
@@ -1,7 +0,0 @@
|
||||
---
|
||||
title: Architecture
|
||||
weight: 60
|
||||
---
|
||||
|
||||
Overview of hawkBit modules and used 3rd party technology:
|
||||

|
||||
@@ -1,124 +0,0 @@
|
||||
---
|
||||
title: Eclipse hawkBit 0.2.0 - First Release
|
||||
parent: Blog
|
||||
weight: 200
|
||||
---
|
||||
|
||||
hawkBit is a domain-independent back-end framework for rolling out software updates to constrained edge devices as well
|
||||
as more powerful controllers and gateways connected to IP based networking infrastructure. It is part of the Eclipse IoT
|
||||
since 2015 and with version _0.2.0_ a first release is available.
|
||||
|
||||
In this article, we want to give an overview of the latest highlights of hawkBit and let you know how you can get
|
||||
started in seconds.
|
||||
|
||||
## Finally, it is here!
|
||||
|
||||
After being around in the Eclipse IoT realm for quite some time now, we are more than happy to announce our first
|
||||
release:
|
||||
[_Eclipse hawkBit 0.2.0_](https://projects.eclipse.org/projects/iot.hawkbit/releases/0.2.0). The release can be found
|
||||
on [Maven Central](https://mvnrepository.com/artifact/org.eclipse.hawkbit)
|
||||
and [Docker Hub](https://hub.docker.com/r/hawkbit/hawkbit-update-server/). It includes the following core features:
|
||||
|
||||
* Device and Software Repository
|
||||
* Update Management
|
||||
* Artifact Content Delivery
|
||||
* Rollout Management
|
||||
|
||||
The features are accessible via the following interfaces:
|
||||
|
||||
* Management UI
|
||||
* Management API
|
||||
* Direct Device Integration (DDI) API
|
||||
* Device Management Federation (DMF) API
|
||||
|
||||

|
||||
|
||||
## What's new?
|
||||
|
||||
Whenever there is a new release, the first question that comes to mind is: What's new? Since this is our first release,
|
||||
one could argue that everything is new. However, most of the features are already well-established. This holds true, for
|
||||
example, for our APIs or the Rollout Management. Nevertheless, there have been some recent updates to hawkBit, which we
|
||||
do not want to leave unmentioned:
|
||||
|
||||
### Streamlined UI
|
||||
|
||||
The probably most noticeable change has been the removal of the two buttons (`Drop here to delete` and `Actions`) at the
|
||||
bottom of the _Deployment_, _Distributions_, and _Upload_ view. This is a major usability improvement! For example,
|
||||
deleting an item required (1) dragging an item onto the delete button, (2) opening the delete pop-up, and (3) confirming
|
||||
the deletion. Now, an item can be easily removed by clicking on its remove icon and confirming the action. Moreover,
|
||||
multiple (or all `CTRL` + `A`) items can be selected and removed at once using the same mechanism. This is not only
|
||||
faster and more intuitive, it also saves a lot of display real estate which can now be used to focus on what is
|
||||
important.
|
||||
We hope you like this change as much as we do! _(Requires: hawkBit > 0.2.2)_
|
||||
|
||||

|
||||
|
||||
### MS SQL Server
|
||||
|
||||
Eclipse hawkBit supports a range of different SQL databases. Up to now, these have been the internal H2 database (which
|
||||
can be
|
||||
used for testing, development, or trial) and MySQL/MariaDB for production-grade usage. This list is now extended by
|
||||
Microsoft's SQL Server which is also available in production grade, as well as, IBM's DB2 for testing and development.
|
||||
|
||||
### Open Sourced REST docs
|
||||
|
||||
A huge benefit for the community is the recently open sourced REST docs of hawkBit. This has been
|
||||
an [open request](https://github.com/eclipse-hawkbit/hawkbit/issues/480)
|
||||
for some time, which we were happy to meet. The documentation is generated
|
||||
using [Spring REST docs](https://spring.io/projects/spring-restdocs), based on unit-tests. These tests, with the
|
||||
respective documentation, are now available in the [code base](https://github.com/eclipse-hawkbit/hawkbit/pull/688).
|
||||
Furthermore, the API documentation will be hosted on our new [website](https://www.eclipse.org/hawkbit/) (coming soon).
|
||||
|
||||
### Docker Images
|
||||
|
||||
In order to enable interested parties to get started with hawkBit conveniently, we decided to provide the
|
||||
[Update Server as a Docker image](https://hub.docker.com/r/hawkbit/hawkbit-update-server/) on Docker Hub. The image
|
||||
comes
|
||||
in two flavors: The default image uses the internal H2 database, while the images with a `-mysql` suffix contain the
|
||||
MySQL
|
||||
driver to allow connecting a MySQL database. In addition to the Docker image, the hawkBit repository contains a
|
||||
[docker-compose.yml](https://github.com/eclipse-hawkbit/hawkbit/blob/master/hawkbit-runtime/hawkbit-update-server/docker/docker-compose.yml)
|
||||
that not only starts the Update Server, but further includes a MySQL database and a RabbitMQ message broker so you're
|
||||
able to use Device Management Federation (DMF) as well.
|
||||
|
||||
To start the hawkBit Update Server image, open a terminal and run:
|
||||
|
||||
```
|
||||
$ docker run -d -p 8080:8080 hawkbit/hawkbit-update-server
|
||||
```
|
||||
|
||||
{{% note %}}
|
||||
_Note: This requires a running [Docker deamon](https://docs.docker.com/install/) on your system._
|
||||
{{% /note %}}
|
||||
|
||||
Now, browse to [http://localhost:8080](http://localhost:8080) and log-in with `admin:admin`. There you go!
|
||||
|
||||
## Community Updates
|
||||
|
||||
Although features and functionality play a major role in the hawkBit project, there is also some interesting news from
|
||||
the community. As of July 2018, there have been:
|
||||
|
||||
* Pull Requests: 587
|
||||
* Forks: 54
|
||||
* Stars: 137
|
||||
* Contributors: 25
|
||||
* Gitter Chat members: 119
|
||||
|
||||
### New Project Lead and Committers
|
||||
|
||||
We are happy to announce that the hawkBit project got a new project lead. In addition to
|
||||
[Kai Zimmermann](https://projects.eclipse.org/user/6364), project lead from the first hour,
|
||||
[Jeroen Laverman](https://projects.eclipse.org/user/10982) joined the lead to support him in this responsibility.
|
||||
Moreover, with [Stefan Behl](https://projects.eclipse.org/user/10842) and Jeroen Laverman, two new committers are
|
||||
aboard.
|
||||
|
||||
## What's next?
|
||||
|
||||
Looking ahead, there are two major topics that we want to tackle next: First, there is the migration of our UI from
|
||||
Vaadin
|
||||
7 to Vaadin 8, since Vaadin announced the end-of-life for our current version. Another big topic will be the update
|
||||
to Spring Boot 2. On the community side, we are in the final stage of updating
|
||||
our [website](https://www.eclipse.org/hawkbit/)
|
||||
with a new design, so make sure you stop by in a couple of days to check it out. Finally, the hawkBit team will be
|
||||
present at EclipseCon Europe 2018, so if you are interested in meeting us, that is the place to be.
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
---
|
||||
title: Eclipse hawkBit upgrade to Eclipse Public License - v 2.0
|
||||
parent: Blog
|
||||
weight: 100
|
||||
---
|
||||
|
||||
hawkBit is a domain-independent back-end framework for rolling out software updates to constrained edge devices as well
|
||||
as more powerful controllers and gateways connected to IP based networking infrastructure. It is part of the Eclipse IoT
|
||||
since 2015.
|
||||
|
||||
In this article, we want to give an overview of the latest highlights of hawkBit license changes.
|
||||
|
||||
## hawkBit license upgraded to Eclipse Public License - v 2.0
|
||||
|
||||
Based on the issues
|
||||
[Switch to EPL 2.0 License](https://github.com/eclipse-hawkbit/hawkbit/issues/1393) and
|
||||
[Update hawkBit's license to EPL 2.0](https://github.com/eclipse-hawkbit/hawkbit/issues/1008)
|
||||
the hawkBit license is upgraded
|
||||
from [Eclipse Public License - Version 1.0](http://www.eclipse.org/org/documents/epl-v10.php) to
|
||||
[Eclipse Public License - v 2.0](https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt).
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
---
|
||||
title: Vaadin 8 UI discontinuation
|
||||
parent: Blog
|
||||
weight: 99
|
||||
---
|
||||
|
||||
In this article, we want to give an overview of the future of the hawkBit UI
|
||||
|
||||
## hawkBit Vaadin 8 UI discontinuation
|
||||
|
||||
The hawkBit UI uses Vaadin as a web UI framework. It uses Vaadin 8 (8.14.3). This major version,
|
||||
according [Vaadin Roadmap](https://vaadin.com/roadmap), has no free support since 21st Feb 2022. There are some version
|
||||
releases after that date (8.15.0 - 8.16.0) that are Apache 2.0 licensed. However, since
|
||||
8.16.1 ([see here](https://mvnrepository.com/artifact/com.vaadin/vaadin-server)) the license
|
||||
is [Commercial Vaadin Developer License 4.0](https://vaadin.com/license/cvdl-4.0), so they could not be used in hawkBit.
|
||||
|
||||
We believe it is not a good practice to keep an out of free support library in an open source project like hawkBit. And
|
||||
moreover, even if we keep it, if a security vulnerability is discovered - all users shall opt for commercial support or
|
||||
to drop UI.
|
||||
|
||||
There is another critical obstacle with keeping Vaadin 8 UI. At the moment hawkBit uses Spring Boot 2.7. According
|
||||
to [Spring Boot EOL](https://endoflife.date/spring-boot) Spring Boot 2.7 stream will reach end of support 24th Nov 2023.
|
||||
So, hawkBit shall be migrated to Spring Boot 3.0+. Since Vaadin 8 seem to be incompatible with Spring Boot 3 (they added
|
||||
support for Spring Boot 3 in Vaadin
|
||||
24 ([Vaadin 24 pre release](https://vaadin.com/blog/vaadin-24-pre-release-available-for-spring-boot-3.0)) we shall drop
|
||||
Vaadin UI 8 anyway.
|
||||
|
||||
Many months ago we asked for community help to migrate hawkBit UI to newer Vaadin
|
||||
versions - [Urgent migration needed to a newer Vaadin version
|
||||
](https://github.com/eclipse-hawkbit/hawkbit/issues/1376) and gitter channel. However, there was no volunteer found to
|
||||
do the migration.
|
||||
|
||||
All this being said, unfortunately, we've come to the decision to drop the Vaadin 8 UI from the Eclipse hawkBit and the
|
||||
latest hawkBit release 0.3.0 is the last version of hawkBit that includes it. For the next 0.4.0 release we plan to
|
||||
remove this Vaadin 8 UI. Thus the hawkBit may become an UI-less project.
|
||||
|
||||
There were steps taken to mitigate the problem:
|
||||
|
||||
* extending the REST API
|
||||
* introducing Swagger UI which allow easier use of the REST API
|
||||
|
||||
however, the user experience will become much worse.
|
||||
|
||||
We hope to see future contributions with migration of the UI or, why not, even new generation UI!
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
---
|
||||
title: 0.4.1 Release
|
||||
parent: Blog
|
||||
weight: 98
|
||||
---
|
||||
|
||||
In this article, we want to give an overview of the 0.4.1 hawkBit release (Friday, January 12, 2024)
|
||||
|
||||
## hawkBit [0.4.1](https://github.com/eclipse-hawkbit/hawkbit/releases/tag/0.4.1) release
|
||||
|
||||
### Steps towards removal of the legacy Vaadin8-based UI
|
||||
|
||||
As announced at [Vaadin 8 UI discontinuation](2023-11-22-vaadin8_ui_discontinuation.md) the current Vaadin 8 based UI
|
||||
will be removed. This release will likely be the last one including it. Some steps are taken to mitigate this.
|
||||
|
||||
* First of all, this release
|
||||
introduces [Simple UI](https://github.com/eclipse-hawkbit/hawkbit/tree/0.4.1/hawkbit-runtime/hawkbit-simple-ui) - a
|
||||
demo/PoC level UI. It includes the most essential functionality allowing you to play around with hawkBit. It could not
|
||||
be compared to legacy UI in features and maturity in any case. Some notes for it:
|
||||
* *Status* - as already said - low maturity and very feature-limited, *EXPERIMENTAL*
|
||||
* Intended for demo/play-around purposes. It could become an initial version of a new hawkBit UI but currently,
|
||||
there are no resources for further development. Any contribution to this UI in the direction of making it a
|
||||
full-fledged mature UI is welcome!
|
||||
* It provides features like - create software modules & distribution sets, targets, and rollouts
|
||||
* In contrast with legacy UI the new UI is a standalone application and uses only REST API to provide functionality
|
||||
to the user.
|
||||
* To the legacy monolith update server application there is added a new microservice-based application. As part of this
|
||||
effort, there was introduced an example
|
||||
of [legacy Vaadin 8 UI standalone application](https://github.com/eclipse-hawkbit/hawkbit/tree/0.4.1/hawkbit-runtime/hawkbit-vv8-ui).
|
||||
This legacy UI standalone application could be used together with future hawkBit update server versions as long as it
|
||||
is compatible and on the user's responsibility. Some notes for it:
|
||||
* *NOT RECOMMENDED* - it might contain security vulnerabilities and bugs. It could be hard to verify its
|
||||
compatibility with the new hawkBit versions.
|
||||
* *ON USER's RESPONSIBILITY* - no guarantees of any kind are provided for that application. It is entirely the
|
||||
user's responsibility to test, scan for vulnerabilities, and use it.
|
||||
* Provides an option to use the legacy Vaadin 8 UI with the new hawkBit versions under the conditions above
|
||||
* It uses directly the database and legacy update server code
|
||||
* It includes the outdated Spring Boot 2.7 which is after its end of support
|
||||
* It will not be developed any further and new features won't be available
|
||||
* No bugfixes would be provided for it
|
||||
|
||||
### Extended access control management - entity-based
|
||||
|
||||
There is a new feature implemented in access control management. Up until now, permissions (e.g. CREATE_TARGET) were
|
||||
assigned to the users, and based on that users were able to execute some action or not. Now there is added a pluggable
|
||||
mechanism
|
||||
via [AccessController](https://github.com/eclipse-hawkbit/hawkbit/blob/0.4.1/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/acm/AccessController.java)
|
||||
that allows to further restrict the access based on the entity. For instance, a developer could implement its custom
|
||||
access controller for targets that, depending on the user, could grant or reject permissions for accessing targets of
|
||||
certain target types.
|
||||
@@ -1,63 +0,0 @@
|
||||
---
|
||||
title: Community
|
||||
weight: 90
|
||||
---
|
||||
|
||||
## Presentations
|
||||
|
||||
Here you can find links to arbitrary material covering Eclipse hawkBit which has been presented at events, conferences
|
||||
and meet-ups.
|
||||
|
||||
- 09/23/2015 - Eclipse IoT Working Group
|
||||
meeting - [slides](https://docs.bosch-iot-rollouts.com/slides/hawkBitProposal20150923.html)
|
||||
- 04/11/2015 - EclipseCon Europe 2015 - [slides](https://docs.bosch-iot-rollouts.com/slides/eclipseCon2015.html)
|
||||
- 03/09/2016 - EclipseCon North America
|
||||
2016 - [slides](https://docs.bosch-iot-rollouts.com/slides/eclipseConNA2016.html)
|
||||
- 05/16/2016 - Eclipse Virtual IoT
|
||||
Meetup - [video](https://www.youtube.com/watch?v=g-dhKMaaanE) - [slides](https://docs.bosch-iot-rollouts.com/slides/virtualIoTMeetup2016.html)
|
||||
- 03/20/2017 - Eclipse IoT Day SanJose,
|
||||
CA - [video](https://www.youtube.com/watch?v=x5OfBgnYW44) - [slides](https://docs.bosch-iot-rollouts.com/slides/iotDaySanJose2017.pdf)
|
||||
- 09/12/2017 - Eclipse IoT Day ThingMonk 2017 - [video](https://www.youtube.com/watch?v=7hK-kiQjKGA)
|
||||
- 01/10/2018 - Eclipse Virtual IoT
|
||||
Meetup - [video](https://www.youtube.com/watch?v=8vcLXs9lc-4) - [slides](https://docs.bosch-iot-rollouts.com/slides/hawkBitIntroduction.html)
|
||||
- 10/22/2018 - Community Day EclipseCon Europe
|
||||
2018 - [slides](https://www.eclipse.org/hawkbit/slides/community-day-2018.html)
|
||||
- 10/21/2019 - Community Day EclipseCon Europe
|
||||
2019 - [slides](https://www.eclipse.org/hawkbit/slides/community-day-2019.html)
|
||||
- 10/19/2020 - Community Day EclipseCon Europe
|
||||
2020 - [slides](https://www.eclipse.org/hawkbit/slides/community-day-2020.html)
|
||||
|
||||
## Articles
|
||||
|
||||
- 10/27/2015 - Why software provisioning goes open
|
||||
source - [article](http://blog.bosch-si.com/categories/technology/2015/10/software-provisioning-goes-open-source-find/)
|
||||
- 05/25/2016 - jaxenter: Eclipse
|
||||
hawkBit - [english](https://jaxenter.com/eclipse-hawkbit-126445.html) - [german](https://jaxenter.de/eclipse-hawkbit-46372)
|
||||
- 09/27/2016 - Eclipse Newsletter - 'IoT is the new
|
||||
black' - [article](http://www.eclipse.org/community/eclipse_newsletter/2016/september/article2.php)
|
||||
|
||||
## Ask a question
|
||||
|
||||
Visit [stackoverflow.com](https://stackoverflow.com/questions/tagged/eclipse-hawkbit) to find questions or raise your
|
||||
own tagged with `eclipse-hawkbit`.
|
||||
|
||||
## Chat
|
||||
|
||||
Searching for a quick response from the team behind hawkBit and the hawkBit community, join
|
||||
the [Gitter Chat](https://gitter.im/eclipse/hawkbit).
|
||||
|
||||
## Mailing List
|
||||
|
||||
A great way to stay up to date with hawkBit activity is to subscribe to the Mailing list provided by Eclipse. Sign up
|
||||
for the mailing list [here](https://dev.eclipse.org/mailman/listinfo/hawkbit-dev).
|
||||
|
||||
## Issue Tracker
|
||||
|
||||
Issues and bugs related to hawkBit are tracked with the Github Issue tracking system. If you find any issues, please
|
||||
report them [here](https://github.com/eclipse-hawkbit/hawkbit/issues).
|
||||
|
||||
## Contributing
|
||||
|
||||
An overview of the contribution process is [here](https://wiki.eclipse.org/Development_Resources/Contributing_via_Git).
|
||||
Checkout the [Contribution Guidelines](https://github.com/eclipse-hawkbit/hawkbit/blob/master/CONTRIBUTING.md) on the
|
||||
Eclipse hawkBit GitHub Repository.
|
||||
@@ -1,293 +0,0 @@
|
||||
---
|
||||
title: Authentication
|
||||
parent: Concepts
|
||||
weight: 51
|
||||
---
|
||||
|
||||
A hawkBit update server can be accessed in four different ways:
|
||||
|
||||
- _Direct Device Integration (DDI) API_ by **targets**.
|
||||
- _Management API_ by 3rd party **applications**.
|
||||
- _Device Management Federation (DMF) API_ by 3rd party **applications** through AMQP.
|
||||
|
||||
<!--more-->
|
||||
|
||||
## DDI API Authentication Modes
|
||||
|
||||
### Security Token
|
||||
|
||||
hawkBit supports multiple ways to authenticate a target against the server. The different authentication modes can be
|
||||
individual enabled and disabled within hawkBit. Both on system level (with Spring Boot properties) as per individual
|
||||
tenant.
|
||||
|
||||
#### Target Security Token Authentication
|
||||
|
||||
There is a 32 alphanumeric character security-token for each created target within IoT hawkBit. This token can be used
|
||||
to authenticate the target at hawkBit through the HTTP-Authorization header with the custom scheme _TargetToken_.
|
||||
|
||||
```
|
||||
GET /DEFAULT/controller/v1/0e945f95-9117-4500-9b0a-9c6d72fa6c07 HTTP/1.1
|
||||
Host: your.hawkBit.server
|
||||
Authorization: TargetToken bH7XXAprK1ChnLfKSdtlsp7NOlPnZAYY
|
||||
```
|
||||
|
||||
The target security token is provided in [DMF API](../../apis/dmf_api/) as part of the update message in order to allow
|
||||
DMF clients to leverage the feature or can it be manually retrieved per target
|
||||
by [Management API](../../apis/management_api/) or in the [Management UI](../../ui) in the target details.
|
||||
|
||||
Note: needs to be enabled in your hawkBit installation (See [DdiSecurityProperties](https://github.com/eclipse-hawkbit/hawkbit/blob/master/hawkbit-security-core/src/main/java/org/eclipse/hawkbit/security/DdiSecurityProperties.java)
|
||||
for system-wide enablement) **and** in the tenant configuration (set [TenantConfigurationProperties](https://github.com/eclipse-hawkbit/hawkbit/blob/master/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/tenancy/configuration/TenantConfigurationProperties.java)#TenantConfigurationKey.AUTHENTICATION_MODE_TARGET_SECURITY_TOKEN_ENABLED, _authentication.targettoken.enabled_ to true). That allows both the
|
||||
operator and the individual customer (if run in a multi-tenant setup) to enable this access method.
|
||||
|
||||
#### Gateway Security Token Authentication
|
||||
|
||||
Often the targets are connected through a gateway which manages the targets directly and as a result are indirectly
|
||||
connected to the hawkBit update server.
|
||||
|
||||
To authenticate this gateway and allow it to manage all target instances under its tenant there is a _GatewayToken_ to
|
||||
authenticate this gateway through the HTTP-Authorization header with a custom scheme _GatewayToken_. This is of course
|
||||
also handy during development or for testing purposes. However, we generally recommend to use this token with care as it
|
||||
allows to act _in the name of_ any device.
|
||||
|
||||
```
|
||||
GET /DEVICE/controller/v1/0e945f95-9117-4500-9b0a-9c6d72fa6c07 HTTP/1.1
|
||||
Host: your.hawkBit.server
|
||||
Authorization: GatewayToken 3nkswAZhX81oDtktq0FF9Pn0Tc0UGXPW
|
||||
```
|
||||
|
||||
Note: needs to be enabled in your hawkBit installation (See [DdiSecurityProperties](https://github.com/eclipse-hawkbit/hawkbit/blob/master/hawkbit-security-core/src/main/java/org/eclipse/hawkbit/security/DdiSecurityProperties.java)
|
||||
for system-wide enablement) **and** in the tenant configuration (set [TenantConfigurationProperties](https://github.com/eclipse-hawkbit/hawkbit/blob/master/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/tenancy/configuration/TenantConfigurationProperties.java)#TenantConfigurationKey.AUTHENTICATION_MODE_GATEWAY_SECURITY_TOKEN_ENABLED, _authentication.gatewaytoken.enabled_ to true). That allows both the
|
||||
operator and the individual customer (if run in a multi-tenant setup) to enable this access method.
|
||||
|
||||
### Certificate Authentication by Reverse Proxy
|
||||
|
||||
hawkBit offers a certificate-based authentication mechanism, also known as mutual TLS (mTLS), which eliminates the need
|
||||
to share a security token with the server. To implement this, you'll require a reverse proxy deployed in front of the
|
||||
hawkBit server to handle authentication. This process involves obtaining certificates (and keys) for both the client and
|
||||
the reverse proxy and configuring hawkBit accordingly.
|
||||
|
||||
Initially, you'll need to obtain certificates (and keys) for these components from the same or different Certificate
|
||||
Authorities (CAs). Once you have acquired certificates you have to set them up to both the client and the hawkBit
|
||||
server.
|
||||
|
||||
Then you shall enable *Allow targets to authenticate via a certificate authenticated by a reverse proxy* and set the
|
||||
fingerprint of the client certificate issuer(s) (as a comma separated list).
|
||||
|
||||
To authenticate the request to hawBit the following condition shall be met:
|
||||
|
||||
- the common name of the client certificate shall match the controller/client id
|
||||
- the TLS Issuer(s) hash of the presented client certificate shall be set for the tenant.
|
||||
|
||||
For that you shall:
|
||||
- enable header authentication in the tenant configuration - set [TenantConfigurationProperties](https://github.com/eclipse-hawkbit/hawkbit/blob/master/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/tenancy/configuration/TenantConfigurationProperties.java)#TenantConfigurationKey.AUTHENTICATION_MODE_HEADER_ENABLED, _authentication.header.enabled_ to true.
|
||||
- set / configure the issuer, for the tenant, in the tenant configuration - set [TenantConfigurationProperties](https://github.com/eclipse-hawkbit/hawkbit/blob/master/hawkbit-repository/hawkbit-repository-api/src/main/java/org/eclipse/hawkbit/tenancy/configuration/TenantConfigurationProperties.java)#AUTHENTICATION_MODE_HEADER_AUTHORITY_NAME.AUTHENTICATION_MODE_HEADER_ENABLED, _aauthentication.header.authority_ to issuer hash.
|
||||
|
||||
You can use the following command to get the issuer hash
|
||||
```shell
|
||||
openssl x509 -in client_certificate.crt -issuer_hash -noout`
|
||||
```
|
||||
|
||||
Here is an example diagram that shows all the communication between the hawkBit, reverse proxy and client. For the sake
|
||||
of simplification we assume that there are not intermediate certificates and the certificate and key are as follows:
|
||||
|
||||
- client_ca.crt signs client.crt
|
||||
- server_ca.crt signs server.crt
|
||||
|
||||
- client has the client.crt, client.key and server_ca.crt
|
||||
- server (in this case reverse proxy) has the server.crt, server.key and client_ca.crt
|
||||
|
||||

|
||||
|
||||
#### Example - Nginx Reverse Proxy Configurations
|
||||
|
||||
Nginx doesn't support obtaining the issuer hash without addons. Therefore, in this example we bypass sending real SSL
|
||||
Issuer hash to hawhBit but do certificate issuer validation at Nginx and then supply shared (between Nginx and hawkBit)
|
||||
fixed hash "Hawkbit". You could use any value here as long as it is matched with the *Allow targets to authenticate via
|
||||
a certificate authenticated by a reverse proxy* setting in the hawkBit UI. Note that for multi-tenant scenarios with
|
||||
different trusted CAs this example won't work.
|
||||
|
||||
1. Hawkbit Configurations
|
||||
|
||||
There are also some configurations that you need update when you deployed your hawkbit service.
|
||||
|
||||
You need to add the given setting to your hawkBit configurations so that hawkBit can generate the URLs according to
|
||||
the https that the client will use to download. If you're deploying hawkBit as a Docker container, add these
|
||||
configurations as environmental values in the docker-compose.yml file.
|
||||
|
||||
```
|
||||
server.forward-headers-strategy=NATIVE
|
||||
```
|
||||
|
||||
2. In Hawkbit's UI section, under system configuration, make sure to select *Allow targets to authenticate via a
|
||||
certificate authenticated by a reverse proxy* and input the fixed issuer hash as "Hawkbit". This can be whetever you
|
||||
have configured in the nginx configuration in `proxy_set_header X-Ssl-Issuer-Hash-1` below.
|
||||
|
||||
3. After placing your certificates and keys, you need to deploy your proxy server and apply the provided configurations.
|
||||
You can apply mutual TLS specifically to the URL given below to implement the process only for devices using the
|
||||
Device Integration API:
|
||||
|
||||
`hawkbit.dev.example.com/default/controller/`
|
||||
|
||||
This ensures that other clients, like UI users, can connect to hawkBit without requiring client certificates. They
|
||||
can use Username and Password in the Management API, eliminating the need for authentication and making it more
|
||||
user-friendly.
|
||||
|
||||
```nginx
|
||||
# Nginx Hawkbit Configurations
|
||||
|
||||
# Gets the Common Name of the certificate from the client certificate.
|
||||
map $ssl_client_s_dn $ssl_client_s_dn_cn {
|
||||
default "";
|
||||
~CN=(?<CN>[^,]+) $CN;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
|
||||
server_name hawkbit.dev.example.com www.hawkbit.dev.example.com;
|
||||
server_tokens off;
|
||||
|
||||
location /.well-known/acme-challenge/ {
|
||||
root /var/www/certbot;
|
||||
}
|
||||
|
||||
location / {
|
||||
return 301 https://hawkbit.dev.example.com$request_uri;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl;
|
||||
listen [::]:443 ssl;
|
||||
|
||||
server_name hawkbit.dev.example.com;
|
||||
|
||||
ssl_certificate /etc/nginx/ssl/live/hawkbit.dev.example.com/server.crt;
|
||||
ssl_certificate_key /etc/nginx/ssl/live/hawkbit.dev.example.com/server.key;
|
||||
|
||||
ssl_client_certificate /etc/nginx/client-cer/client_ca.crt;
|
||||
ssl_verify_client optional;
|
||||
ssl_verify_depth 3;
|
||||
|
||||
|
||||
# For devices that is using device integration API,
|
||||
# Mutual TLS is required.
|
||||
location ~*/.*/controller/ {
|
||||
if ($ssl_client_verify != SUCCESS) {
|
||||
return 403;
|
||||
}
|
||||
|
||||
proxy_pass http://hawkbit.dev.example.com:8080;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
|
||||
# Client certificate Common Name and Issuer Hash is required
|
||||
# for auth in hawkbit.
|
||||
proxy_set_header X-Ssl-Client-Cn $ssl_client_s_dn_cn;
|
||||
proxy_set_header X-Ssl-Issuer-Hash-1 Hawkbit;
|
||||
|
||||
# These are required for clients to upload and download software.
|
||||
proxy_request_buffering off;
|
||||
client_max_body_size 1000m;
|
||||
}
|
||||
|
||||
# For clients that is using UI or Management API
|
||||
location / {
|
||||
proxy_pass http://hawkbit.dev.example.com:8080;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_request_buffering off;
|
||||
client_max_body_size 1000m;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
4. To deploy Nginx, you could use a `.yml` file. Here's an example `docker-compose.yml` file for Nginx Docker.
|
||||
|
||||
```yml
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
webserver:
|
||||
image: nginx:latest
|
||||
ports:
|
||||
- 80:80
|
||||
- 443:443
|
||||
restart: always
|
||||
volumes:
|
||||
- ./nginx/conf/:/etc/nginx/conf.d/:ro
|
||||
- ./certbot/www:/var/www/certbot/:ro
|
||||
- ./certbot/conf/:/etc/nginx/ssl/:ro
|
||||
- ./client-cer/:/etc/nginx/client-cer/
|
||||
- ./landing-page/:/etc/webserver/landing-page
|
||||
certbot:
|
||||
image: certbot/certbot:latest
|
||||
volumes:
|
||||
- ./certbot/www/:/var/www/certbot/:rw
|
||||
- ./certbot/conf/:/etc/letsencrypt/:rw
|
||||
```
|
||||
|
||||
`/client-cer/:/etc/nginx/client-cer/` is the designated location for the certificate authority that has signed the
|
||||
client certificate. The presented client certificate will be verified against this CA.
|
||||
|
||||
5. After successfully generating your certificates with the correct chain, deploying your Nginx and Hawkbit services
|
||||
with appropriate configurations, and updating the settings on the device side, you will be able to establish a
|
||||
certificate-based authentication mechanism. This will eliminate the necessity of sharing a security token with the
|
||||
server.
|
||||
|
||||
|
||||
|
||||
##### Swupdate Suricatta Configurations
|
||||
|
||||
If the client is utilizing the SWUpdate Suricatta service, the configurations on the device or client side should also
|
||||
be adjusted as follows. Remember to change id, url and certificate names to your needs.
|
||||
|
||||
The location of the config file is `/etc/swupdate/swupdate.conf`
|
||||
|
||||
```yml
|
||||
suricatta :
|
||||
{
|
||||
tenant = "default";
|
||||
id = "device_id";
|
||||
url = "https://hawkbit.dev.example.com";
|
||||
nocheckcert = false;
|
||||
cafile = "server_ca.crt";
|
||||
sslkey = "/etc/ssl/certs/client.key";
|
||||
sslcert = "/etc/ssl/certs/client.crt";
|
||||
};
|
||||
```
|
||||
|
||||
If your client service is a linux, you can use the command bellow to see the logs produced by the swupdate.
|
||||
|
||||
```shell
|
||||
journalctl --follow -u swupdate
|
||||
```
|
||||
|
||||
|
||||
|
||||
##### Testing
|
||||
|
||||
You can test the communication by using the Curl command below to see if you successfully implemented mutual TLS:
|
||||
|
||||
```shell
|
||||
curl -L -v --cert client.crt --key client.key --cacert server_ca.crt https://hawkbit.dev.example.com/default/controller/v1/{device-id}
|
||||
```
|
||||
|
||||
In the UI, after uploading an SWU package and requesting a firmware update, you can use the link below to attempt to
|
||||
install the software package.
|
||||
|
||||
```
|
||||
curl -L -v --cert client.crt --key client.key --cacert server_ca.crt https://hawkbit.dev.example.com/default/controller/v1/{device-id}/softwaremodules/{artifact-id}/artifacts/hawkbit_updated_5.swu --output outputfile
|
||||
```
|
||||
|
||||
## DMF API
|
||||
|
||||
Authentication is provided by _RabbitMQ_ [vhost and user credentials](https://www.rabbitmq.com/access-control.html) that
|
||||
is used for the integration.
|
||||
|
||||
## Management API
|
||||
|
||||
- Basic Auth
|
||||
@@ -1,117 +0,0 @@
|
||||
---
|
||||
title: Authorization
|
||||
parent: Concepts
|
||||
weight: 52
|
||||
---
|
||||
|
||||
Authorization is handled separately for _Direct Device Integration (DDI) API_ and _Device Management Federation (DMF)
|
||||
API_ (where successful authentication includes full authorization) and _Management API_ and _UI_ which is based on
|
||||
Spring
|
||||
security [authorities](https://github.com/eclipse-hawkbit/hawkbit/blob/master/hawkbit-security-core/src/main/java/org/eclipse/hawkbit/im/authentication/SpPermission.java).
|
||||
<!--more-->
|
||||
|
||||
However, keep in mind that hawkBit does not offer an off the shelf authentication provider to leverage these permissions
|
||||
and the underlying multi user/tenant capabilities of hawkBit but it supports authentication providers offering an OpenID
|
||||
Connect interface. Check out [Spring security documentation](http://projects.spring.io/spring-security/) for further
|
||||
information. In
|
||||
hawkBit [SecurityAutoConfiguration](https://github.com/eclipse-hawkbit/hawkbit/blob/master/hawkbit-autoconfigure/src/main/java/org/eclipse/hawkbit/autoconfigure/security/SecurityAutoConfiguration.java)
|
||||
is a good starting point for integration.
|
||||
|
||||
The default implementation is single user/tenant with basic auth and the logged in user is provided with all
|
||||
permissions. Additionally, the application properties may be configured for multiple static users;
|
||||
see [Multiple Users](#multiple-users) for details.
|
||||
|
||||
## DDI API
|
||||
|
||||
An authenticated target is permitted to:
|
||||
|
||||
- retrieve commands from the server
|
||||
- provide feedback to the the server
|
||||
- download artifacts that are assigned to it
|
||||
|
||||
A target might be permitted to download artifacts without authentication (if enabled, see above). Only the download can
|
||||
be permitted to disable the authentication. This can be used in scenarios where the artifacts itself are e.g. signed and
|
||||
secured.
|
||||
|
||||
## Management API and UI
|
||||
|
||||
### Multiple Users
|
||||
|
||||
hawkBit optionally supports configuring multiple static users through the application properties. In this case, the user
|
||||
and password Spring security properties are ignored.
|
||||
An example configuration is given below.
|
||||
|
||||
hawkbit.security.user.admin.password={noop}admin
|
||||
hawkbit.security.user.admin.firstname=Test
|
||||
hawkbit.security.user.admin.lastname=Admin
|
||||
hawkbit.security.user.admin.email=admin@test.de
|
||||
hawkbit.security.user.admin.permissions=ALL
|
||||
|
||||
hawkbit.security.user.test.password={noop}test
|
||||
hawkbit.security.user.test.firstname=Test
|
||||
hawkbit.security.user.test.lastname=Tester
|
||||
hawkbit.security.user.test.email=test@tester.com
|
||||
hawkbit.security.user.test.permissions=READ_TARGET,UPDATE_TARGET,CREATE_TARGET,DELETE_TARGET
|
||||
|
||||
A permissions value of `ALL` will provide that user with all possible permissions. Passwords need to be specified with
|
||||
the used password encoder in brackets. In this example, `noop` is used as the plaintext encoder. For production use, it
|
||||
is recommended to use a hash function designed for passwords such as *bcrypt*. See
|
||||
this [blog post](https://spring.io/blog/2017/11/01/spring-security-5-0-0-rc1-released#password-storage-format) for more
|
||||
information on password encoders in Spring Security.
|
||||
|
||||
### OpenID Connect
|
||||
|
||||
hawkbit supports authentication providers which use the OpenID Connect standard, an authentication layer built on top of
|
||||
the OAuth 2.0 protocol.
|
||||
An example configuration is given below.
|
||||
|
||||
spring.security.oauth2.client.registration.oidc.client-id=clientID
|
||||
spring.security.oauth2.client.provider.oidc.issuer-uri=https://oidc-provider/issuer-uri
|
||||
spring.security.oauth2.client.provider.oidc.jwk-set-uri=https://oidc-provider/jwk-set-uri
|
||||
|
||||
Note: at the moment only DEFAULT tenant is supported. By default the resource_access/<client id>/roles claim is mapped
|
||||
to hawkBit permissions.
|
||||
|
||||
### Delivered Permissions
|
||||
|
||||
- READ_/UPDATE_/CREATE_/DELETE_TARGET for:
|
||||
- Target entities including metadata (that includes also the installed and assigned distribution sets)
|
||||
- Target tags
|
||||
- Target actions
|
||||
- Target registration rules
|
||||
- Bulk operations
|
||||
- Target filters
|
||||
|
||||
- READ_/UPDATE_/CREATE_/DELETE_REPOSITORY for:
|
||||
- Distribution sets
|
||||
- Software Modules
|
||||
- Artifacts
|
||||
- DS tags
|
||||
|
||||
- SOFTWARE_MODULE_DOWNLOAD
|
||||
- Permission to download artifacts of a software module (Note: READ_REPOSITORY allows only to read the metadata).
|
||||
|
||||
- READ_TARGET_SECURITY_TOKEN
|
||||
- Permission to read the target security token. The security token is security concerned and should be protected.
|
||||
|
||||
- READ_TENANT_CONFIGURATION/TENANT_CONFIGURATION
|
||||
- Permission to read/administrate the tenant settings.
|
||||
|
||||
- READ_/UPDATE_/CREATE_/DELETE_/HANDLE_/APPROVE_ROLLOUT for:
|
||||
- Managing rollouts and provision targets through a rollout.
|
||||
|
||||
### Permission Matrix for example uses cases that need more than one permission
|
||||
|
||||
| Use Case | Needed permissions |
|
||||
|----------------------------------------------------------------------------|----------------------------------------------------------------------------|
|
||||
| Search _targets_ by installed or assigned _distribution set_ | READ_REPOSITORY, READ_TARGET |
|
||||
| Assign _DS_ to a _target_ | READ_REPOSITORY, UPDATE_TARGET |
|
||||
| Assign DS to target through a _Rollout_, i.e. _Rollout_ creation and start | READ_REPOSITORY, READ_TARGET, READ_ROLLOUT, CREATE_ROLLOUT, HANDLE_ROLLOUT |
|
||||
| Read _Rollout_ status including its _deployment groups_ | READ_REPOSITORY, READ_ROLLOUT |
|
||||
| Checks _targets_ inside _Rollout deployment group_ | READ_REPOSITORY, READ_TARGET, READ_ROLLOUT |
|
||||
|
||||
## Device Management Federation API
|
||||
|
||||
The provided _RabbitMQ_ [vhost and user](https://www.rabbitmq.com/access-control.html) should be provided with the
|
||||
necessary permissions to send messages to hawkBit through the exchange and receive messages from it through the
|
||||
specified queue.
|
||||
@@ -1,72 +0,0 @@
|
||||
---
|
||||
title: Data Model
|
||||
parent: Concepts
|
||||
weight: 53
|
||||
---
|
||||
|
||||
The hawkBit data model was designed to have enough flexibility to define complex software structures (e.g. operating
|
||||
system, runtimes, apps, different kind of artifacts) on one side and simplicity compared to the capabilities of a full
|
||||
blown configuration management on the other.
|
||||
<!--more-->
|
||||
|
||||
It does define a hierarchy of software that starts with a distribution, which can have (sub-)modules and these may have
|
||||
multiple artifacts. However, it does not consider any kind of dependency definitions between modules or artifacts. As a
|
||||
result, dependency checks - if necessary - have to be done outside hawkBit, i.e. on the device itself or before the
|
||||
entity creation in hawkBit by the origin.
|
||||
|
||||
## Provisioning Target Definition
|
||||
|
||||
A Provisioning Target is a neutral definition that may be an actual real device (e.g. gateway, embedded sensor) or a
|
||||
virtual device (e.g. vehicle, smart home).
|
||||
|
||||
The definition in hawkBit might reflect the transactional behavior if necessary on the device side. A vehicle might be
|
||||
updated device by device or as a whole. As a result one way of defining a vehicle in hawkBit could be to have one all
|
||||
inclusive Software Module or one module per (sub-) device.
|
||||
|
||||
A Target can have, next to its defined properties (e.g. controller ID, target type, name, description, security token),
|
||||
a generic set of attributes and meta data, both in key:value format. Target attributes are owned and managed by the
|
||||
device whereas target meta data are managed by the operator. If a target is defined to be of a certain target type, then
|
||||
during the assignment of a distribution set, a compatibility check will be performed between the target type and
|
||||
distribution set type.
|
||||
|
||||
## Software Structure Definition
|
||||
|
||||
The structure defines the model of the supported software by the provisioning target
|
||||
|
||||
- Distribution Set Type:defines a package structure that is supported by certain devices
|
||||
- Consists of Software Module Types both for
|
||||
- Firmware - device can have only one module of that type (e.g. the operating system)
|
||||
- Software - device can have multiple modules of that type (e.g. "Apps")
|
||||
|
||||
Software Content Definition:
|
||||
|
||||
- Distribution Set: can be deployed to a provisioning target
|
||||
- Software Module: is a sub element of the distribution, e.g. OS, application, firmware X, firmware Y
|
||||
- Artifact: binaries for a software module. Note: the decision which artifacts have to be downloaded are done on the
|
||||
device side, e.g. Full package, signatures, binary deltas
|
||||
|
||||
## Entity Relationships
|
||||
|
||||
The public defined entities and their relation which are reflected by the Management API.
|
||||
|
||||
## Deleting and Archiving Software Modules
|
||||
|
||||
When a user deletes a Software Module, the update server cannot simply remove all the corresponding data. Because when
|
||||
the Software Module is already assigned to a Distribution Set or was assigned to a Target in the past, the hawkBit
|
||||
server has to make sure that remains a clean and full update history for every target. The history contains all
|
||||
information (e.g. name, version) of the software, which was assigned to a specific Target. Obviously storing the binary
|
||||
data of the artifacts is not necessary for the history purpose.
|
||||
|
||||
The delete process which is performed, when there are historical connections to targets is called SoftDelete. This
|
||||
process marks the Software Module as deleted and removes the artifact, but it won't delete the meta data, which
|
||||
describes the SoftwareModule and the associated Artifacts. SoftwareModules, which are marked as delete won't be visible
|
||||
for the user, when he is requesting all SoftwareModules.
|
||||
|
||||
Just in case there are no connections to Distribution Sets and targets the server will perform a HardDelete. This
|
||||
process deletes all stored data, including all meta information.
|
||||
|
||||
{{% note %}}
|
||||
In case of a SoftDelete the unique constraints are still in place, i.e. you cannot create an entity with the same
|
||||
name/key. This constraint might be removed in future versions because of the impact on the user experience (i.e. he does
|
||||
not see the soft deleted module but cannot create a new one).
|
||||
{{% /note %}}
|
||||
@@ -1,94 +0,0 @@
|
||||
---
|
||||
title: Rollout Management
|
||||
parent: Concepts
|
||||
weight: 54
|
||||
---
|
||||
|
||||
Software update operations in large scale IoT scenarios with hundreds of thousands of devices require special handling.
|
||||
<!--more-->
|
||||
|
||||
That includes:
|
||||
|
||||
- _Technical Scalability_ by means of horizontal scale of the hawkBit server cluster in the cloud.
|
||||
- _Global_ artifact _content delivery_ capacities.
|
||||
- _Functional Scalability_ by means of:
|
||||
- Secure handling of large volumes of devices at rollout creation time.
|
||||
- Monitoring of the rollout progress.
|
||||
- Emergency rollout shutdown in case of problems on to many devices.
|
||||
|
||||
- Reporting capabilities for a complete understanding of the rollout progress at each point in time.
|
||||
|
||||
Eclipse hawkBit sees these capabilities under the term Rollout Management.
|
||||
|
||||
The following capabilities are currently supported by the _Rollout Management_:
|
||||
|
||||
- Create, update and start of rollouts.
|
||||
- Selection of targets as input for the rollout based on _target filter_ functionality.
|
||||
- Selection of a _DistributionSet_.
|
||||
- Auto-splitting of the input target list into a defined number deployment groups.
|
||||
- Approval workflow
|
||||
- Has to be enabled explicitly in configuration.
|
||||
- Enables a workflow that requires a user with adequate permissions to review any new or updated rollout before it
|
||||
can be started.
|
||||
- Allows integration with 3rd party workflow engines.
|
||||
|
||||
- Cascading start of the deployment groups based on installation status of the previous group.
|
||||
- Emergency shutdown of the rollout in case a group exceeds the defined error threshold.
|
||||
- Rollout progress monitoring for the entire rollout and the individual groups.
|
||||
|
||||
## Cascading Deployment Group Execution
|
||||
|
||||
The cascading execution of the deployment groups is based on two thresholds that can be defined by the rollout creator.
|
||||
|
||||
- success condition by means of percentage of successfully installed targets in the current groups triggers.
|
||||
- error condition by means of absolute or percentage of failed installations which triggers an emergency shutdown of the
|
||||
entire rollout.
|
||||
|
||||
## Rollout state machine
|
||||
|
||||
### State Machine on Rollout
|
||||
|
||||

|
||||
|
||||
### State Machine on Rollout Deployment Group
|
||||
|
||||

|
||||
|
||||
## Multi-Assignments (beta)
|
||||
|
||||
One of the main paradigms of Eclipse hawkBit is, that a Distribution Set represents the currently installed software of
|
||||
a device. Hence, a device can have only one Distribution Set assigned/installed at a time. With _Multi-Assignments_
|
||||
enabled, this paradigm shifts. Multi-Assignments allows to assign multiple Distribution Sets to a device simultaneously,
|
||||
without cancelling each other. As a consequence, an operator can trigger multiple campaigns addressing the same devices
|
||||
in parallel.
|
||||
|
||||
### Action weight
|
||||
|
||||
To differentiate between important and less important updates a property called _weight_ is used. When multi-assignments
|
||||
is enabled every action has a weight value between (and including) 0 and 1000. The higher the weight the more important
|
||||
is the assignment represented by the action. Also when defining a _rollout_ or an _auto-assignment_ and
|
||||
multi-assignments is enabled a weight value has to be provided. This value is passed to the actions created during the
|
||||
execution of these _rollouts_ and _auto-assignments_. If no weight was provided the highest value of 1000 is used
|
||||
instead.
|
||||
|
||||
### Consequences
|
||||
|
||||
While this feature provides more flexibility to the user and enables new use-cases, there are also some consequences one
|
||||
should be aware of:
|
||||
|
||||
**Critical**
|
||||
|
||||
* This feature is in beta and may change unannounced.
|
||||
* For now, this feature is **opt-in only**. Once activated, it cannot be deactivated.
|
||||
|
||||
**Minor**
|
||||
|
||||
* While on DMF-API a MULTI_ACTION request is sent, DDI-API only exposes the next action which has the highest priority
|
||||
in the list of open actions(according to their weight property).
|
||||
* All information regarding the currently assigned or installed Distribution Set does only respect the last assignment,
|
||||
as well as the last successfully installed Distribution set. This also affects:
|
||||
* Pinning a target or Distribution Set in Deployment View.
|
||||
* Statistics about installed or assigned Distribution Sets.
|
||||
* Auto close running actions, when a new Distribution Set is assigned (`repository.actions.autoclose.enabled`) is
|
||||
deactivated.
|
||||
* Marking a Distribution Set to be a *Required Migration Step* is deactivated.
|
||||
@@ -1,25 +0,0 @@
|
||||
---
|
||||
title: Target State Machine
|
||||
parent: Concepts
|
||||
weight: 55
|
||||
---
|
||||
|
||||
A target has a current state which reflects the provisioning status of the device at this point in time. State changes
|
||||
are driven either by the update server by means of starting an update or by the controller on the provisioning target
|
||||
that gives feedback to the update server, e.g. "I am here", "I am working on a provisioning", "I have finished a
|
||||
provisioning".
|
||||
<!--more-->
|
||||
|
||||
## Defined states
|
||||
|
||||
| State | Description |
|
||||
|------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| UNKNOWN | Set by default for a pre-commissioned target until first status update received from the target. Is the initial starting point for targets created by UI or management API. |
|
||||
| IN_SYNC | Assigned _Distribution Set_ is installed. |
|
||||
| PENDING | Installation of assigned _Distribution Set_ is not yet confirmed. |
|
||||
| ERROR | Installation of assigned _Distribution Set_ has failed. |
|
||||
| REGISTERED | Target registered at the update server but no _Distribution Set_ assigned. Is the initial starting point for plug-and-play devices. |
|
||||
|
||||
## Transitions
|
||||
|
||||

|
||||
@@ -1,66 +0,0 @@
|
||||
---
|
||||
title: Features
|
||||
weight: 40
|
||||
---
|
||||
|
||||
## Device and Software Repository
|
||||
|
||||
- Repository that holds the provisioning targets and assignable software distributions.
|
||||
- Targets to be logically grouped by Target Types.
|
||||
- That includes a full software update history for every device.
|
||||
- Support for pre-commission devices in the repository and plug and play, i.e. device is created if it is authenticated
|
||||
for the first time.
|
||||
|
||||
## Update Management
|
||||
|
||||
- Directly deploy a defined software distribution to a device (by Management API).
|
||||
- Update handling is independent of the device type, integration approach or connectivity.
|
||||
- Optional user consent flow, download and install updates only after respective end user has confirmed it.
|
||||
- Mass cancel the distribution of an update by invalidating the distribution set.
|
||||
- Use action status codes for easier analysis.
|
||||
|
||||
## Artifact Content Delivery
|
||||
|
||||
- Partial downloads supported.
|
||||
- Download resume supported (RFC7233).
|
||||
- Content management by RESTful API and UI (see above).
|
||||
- Authorization based on software assignment, i.e. a device can only download what has been assigned to it in the first
|
||||
place.
|
||||
- Delta artifact hosting supported.
|
||||
- Artifact signature hosting supported.
|
||||
- Plug-point for artifact encryption allowing to encrypt artifacts on upload.
|
||||
|
||||
## Rollout/Campaign Management
|
||||
|
||||
- Secure handling of large volumes of devices at rollout creation time.
|
||||
- Flexible deployment group definition as part of a rollout.
|
||||
- Monitoring of the rollout progress.
|
||||
- Emergency rollout shutdown in case of update failures.
|
||||
- Manually trigger next rollout group.
|
||||
|
||||
## Interfaces
|
||||
|
||||
### Management API
|
||||
|
||||
- RESTful API
|
||||
- Create/Read/Update/Delete operations for provisioning targets (i.e. devices) and repository content (i.e. software).
|
||||
- Manage and monitor software update operations.
|
||||
- Online API documentation.
|
||||
- JSON payload with Hypermedia support.
|
||||
- Supports filtering, sorting and paging.
|
||||
|
||||
### Direct Device Integration API
|
||||
|
||||
- RESTful HTTP based API for direct device integration
|
||||
- JSON payload.
|
||||
- Traffic optimized (content based Etag generation, not modified).
|
||||
- Feedback channel from device.
|
||||
- TLS encryption.
|
||||
|
||||
### Device Management Federation API
|
||||
|
||||
- Indirect device integration through a device management service or application into hawkBit.
|
||||
- Optimized for high service to service throughput with [AMQP](https://www.rabbitmq.com/amqp-0-9-1-reference.html)
|
||||
messaging interface.
|
||||
- Separate AMQP vHost per tenant for maximum security.
|
||||
|
||||
@@ -1,139 +0,0 @@
|
||||
---
|
||||
title: Getting Started
|
||||
weight: 20
|
||||
---
|
||||
|
||||
## From Docker Image
|
||||
|
||||
### Overview
|
||||
|
||||
HawkBit Update Server default user has _admin/admin_ as default credentials. See below how the user can be changed.
|
||||
|
||||
It supports two configurations:
|
||||
|
||||
* monolith - hawkbit-update-server
|
||||
* micro-service - hawkbit-mgmt-server, hawkbit-ddi-server, hawkbit-dmf-server.
|
||||
|
||||
For more hawkBit Docker related info see [Docker run info](https://github.com/eclipse-hawkbit/hawkbit/blob/master/docker/README.md) and [Docker build info](https://github.com/eclipse-hawkbit/hawkbit/blob/master/docker/build/README.md)
|
||||
|
||||
### A: Run hawkBit Update Server (Monolith) as Docker Container
|
||||
|
||||
Start the hawkBit Update Server as a single container
|
||||
|
||||
```bash
|
||||
$ docker run -p 8080:8080 hawkbit/hawkbit-update-server:latest
|
||||
```
|
||||
This will start hawkBit update server with embedded H2 database for evaluation purposes.
|
||||
|
||||
### B: Run hawkBit Update Server (Monolith) with services as Docker Compose
|
||||
Start the hawkBit Update Server together with an PostgreSQL and RabbitMQ instance as containers
|
||||
|
||||
```bash
|
||||
$ git clone https://github.com/eclipse-hawkbit/hawkbit.git
|
||||
$ cd hawkbit/docker
|
||||
$ docker-compose -f docker-compose-monolith-postgres.yml up -d
|
||||
```
|
||||
or with MySQL
|
||||
```bash
|
||||
$ git clone https://github.com/eclipse-hawkbit/hawkbit.git
|
||||
$ cd hawkbit/docker
|
||||
$ docker-compose -f docker-compose-monolith-mysql.yml up -d
|
||||
```
|
||||
|
||||
If you want to start also the Simple UI, you can use, for PostgreSQL:
|
||||
```bash
|
||||
$ git clone https://github.com/eclipse-hawkbit/hawkbit.git
|
||||
$ cd hawkbit/docker
|
||||
$ docker-compose -f docker-compose-monolith-with-simple-ui-postgres.yml up -d
|
||||
```
|
||||
or with MySQL
|
||||
```bash
|
||||
$ git clone https://github.com/eclipse-hawkbit/hawkbit.git
|
||||
$ cd hawkbit/docker
|
||||
$ docker-compose -f docker-compose-monolith-with-simple-ui-mysql.yml up -d
|
||||
```
|
||||
|
||||
Note: _-d_ flag is used to run the containers in detached mode. If you want to see the logs, you can remove the flag.
|
||||
|
||||
### C: Run hawkBit Update Server (Micro-Service) with services as Docker Compose
|
||||
Start the hawkBit Update Server together with an PostgreSQL and RabbitMQ instance as containers
|
||||
|
||||
```bash
|
||||
$ git clone https://github.com/eclipse-hawkbit/hawkbit.git
|
||||
$ cd hawkbit/docker
|
||||
$ docker-compose -f docker-compose-micro-services-postgres.yml up -d
|
||||
```
|
||||
or with MySQL
|
||||
```bash
|
||||
$ git clone https://github.com/eclipse-hawkbit/hawkbit.git
|
||||
$ cd hawkbit/docker
|
||||
$ docker-compose -f docker-compose-micro-services-mysql.yml up -d
|
||||
```
|
||||
|
||||
If you want to start also the Simple UI, you can use, for PostgreSQL:
|
||||
```bash
|
||||
$ git clone https://github.com/eclipse-hawkbit/hawkbit.git
|
||||
$ cd hawkbit/docker
|
||||
$ docker-compose -f docker-compose-micro-services-with-simple-ui-postgres.yml up -d
|
||||
```
|
||||
or with MySQL
|
||||
```bash
|
||||
$ git clone https://github.com/eclipse-hawkbit/hawkbit.git
|
||||
$ cd hawkbit/docker
|
||||
$ docker-compose -f docker-compose-micro-services-with-simple-ui-mysql.yml up -d
|
||||
```
|
||||
|
||||
Note: _-d_ flag is used to run the containers in detached mode. If you want to see the logs, you can remove the flag.
|
||||
|
||||
## From Sources
|
||||
|
||||
### 1: Clone and build hawkBit
|
||||
|
||||
```sh
|
||||
$ git clone https://github.com/eclipse-hawkbit/hawkbit.git
|
||||
$ cd hawkbit
|
||||
$ mvn clean install -DskipTests
|
||||
```
|
||||
|
||||
### 2: Start hawkBit [update server](https://github.com/eclipse-hawkbit/hawkbit/tree/master/hawkbit-monolith/hawkbit-update-server) (Monolith)
|
||||
|
||||
```sh
|
||||
$ java -jar ./hawkbit-monolith/hawkbit-update-server/target/hawkbit-update-server-0-SNAPSHOT.jar
|
||||
```
|
||||
|
||||
Note: you could start it also in microservices mode by:
|
||||
```sh
|
||||
$ java -jar ./hawkbit-mgmt/hawkbit-mgmt-server/target/hawkbit-mgmt-server-0-SNAPSHOT.jar
|
||||
```
|
||||
```sh
|
||||
$ java -jar ./hawkbit-ddi/hawkbit-ddi-server/target/hawkbit-ddi-server-0-SNAPSHOT.jar
|
||||
```
|
||||
and (only if you want to use the DMF feature):
|
||||
|
||||
```sh
|
||||
$ java -jar ./hawkbit-dmf/hawkbit-dmf-server/target/hawkbit-dmf-server-0-SNAPSHOT.jar
|
||||
```
|
||||
|
||||
Note: you could start the Simple UI by:
|
||||
```sh
|
||||
$ java -jar ./hawkbit-simple-ui/target/hawkbit-simple-ui-0-SNAPSHOT.jar
|
||||
```
|
||||
|
||||
## Configuration
|
||||
### Change credentials
|
||||
As stated before the default user is _admin/admin_. It could be overridden by changing the [TenantAwareUserProperties](https://github.com/eclipse-hawkbit/hawkbit/blob/master/hawkbit-core/src/main/java/org/eclipse/hawkbit/tenancy/TenantAwareUserProperties.java) configuration using Spring ways. For instance, using a properties file like:
|
||||
```properties
|
||||
# should remove the admin/admin user
|
||||
hawkbit.security.user.admin.tenant=#{null}
|
||||
hawkbit.security.user.admin.password=#{null}
|
||||
hawkbit.security.user.admin.roles=#{null}
|
||||
# should add a hawkbit/isAwesome! user
|
||||
hawkbit.security.user.hawkbit.tenant=DEFAULT
|
||||
hawkbit.security.user.hawkbit.password={noop}isAwesome!
|
||||
hawkbit.security.user.hawkbit.roles=TENANT_ADMIN
|
||||
```
|
||||
which should remove the default _admin/admin_ user and add a hawkbit user _hawkbit_ with password _isAwesome!_ and a role _TENANT_ADMIN_.
|
||||
|
||||
You could create multiple users with specified roles.
|
||||
|
||||
For details how to configure docker compose based setup see the [Docker run info](https://github.com/eclipse-hawkbit/hawkbit/blob/master/docker/README.md) -> Configuration
|
||||
@@ -1,100 +0,0 @@
|
||||
---
|
||||
title: Clustering
|
||||
parent: Guides
|
||||
weight: 33
|
||||
---
|
||||
|
||||
hawkBit is able to run in a cluster. This guide provides insights in the basic concepts and how to
|
||||
setup your own cluster. You can find additional information in
|
||||
the [hawkBit runtimes's README](https://github.com/eclipse-hawkbit/hawkbit/blob/master/hawkbit-monolith/hawkbit-update-server/README.md).
|
||||
<!--more-->
|
||||
|
||||
## Big picture
|
||||
|
||||

|
||||
|
||||
## Events
|
||||
|
||||
Event communication between nodes is based on [Spring Cloud Stream](http://docs.spring.io/spring-cloud-stream/docs/current/reference/htmlsingle/).
|
||||
There are different [binder implementations](http://docs.spring.io/spring-cloud-stream/docs/current/reference/htmlsingle/#_binders)
|
||||
available. The _hawkbit Update Server_ uses RabbitMQ binder.
|
||||
|
||||
You can run multiple instances of any micro-service, including those consuming events.
|
||||
However, the `hawkbit-mgmt-server` should typically be run as a single instance, as it schedules time-sensitive jobs such as auto-assignment checking and rollout execution.
|
||||
If multiple management server instances are needed, you must extend hawkBit to ensure that scheduled tasks do not run concurrently.
|
||||
Alternatively, configure all but one instance to disable scheduler execution.
|
||||
|
||||
## Event Channel Types in Spring Cloud Stream
|
||||
|
||||
Remote events in hawkBit are distributed through **two distinct types of channels**:
|
||||
|
||||
### 1. Fanout Event Channel
|
||||
|
||||
- Every service instance listening to `fanoutEventChannel` receives **a copy of every message**, regardless of instance count.
|
||||
- Common for events that should be processed by each consumer independently
|
||||
- In-memory cache updates
|
||||
- Internal state propagation
|
||||
- Logging or auditing
|
||||
- Not recommended for scenarios where only one consumer should process an event (see `serviceEventChannel` for that).
|
||||
|
||||
**Note**: Every instance bound to this channel will get its own copy of the message.
|
||||
|
||||
### 2. Service Event Channel
|
||||
|
||||
The `serviceEventChannel` is used to **ensure exclusive consumption of events** across service instances.
|
||||
Only **one instance per consumer group** receives and processes each message, which is critical for non-idempotent or resource-sensitive operations.
|
||||
|
||||
- Only one instance in a consumer group receives each message.
|
||||
- Ideal for external integrations, third-party API calls, or any task that must not be duplicated.
|
||||
- Load-balanced across instances within the same group.
|
||||
|
||||
|
||||
### Optional Protostuff for Spring cloud stream
|
||||
|
||||
The micro-service instances are configured to communicate via Spring Cloud Stream. Optionally, you could
|
||||
use [Protostuff](https://github.com/protostuff/protostuff) based message payload serialization for improved performance.
|
||||
|
||||
**Note**: If Protostuff is enabled it shall be enabled on all microservices!
|
||||
|
||||
Add/Uncomment to/in your `application.properties` :
|
||||
|
||||
```properties
|
||||
spring.cloud.stream.default.content-type=application/binary+protostuff
|
||||
```
|
||||
|
||||
Add to your `pom.xml` :
|
||||
|
||||
```xml
|
||||
<dependency>
|
||||
<groupId>io.protostuff</groupId>
|
||||
<artifactId>protostuff-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.protostuff</groupId>
|
||||
<artifactId>protostuff-runtime</artifactId>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
## Caching
|
||||
|
||||
Every node is maintaining its own caches independent of the other nodes. So there is no globally shared/synchronized cache
|
||||
instance within the cluster. In order to keep nodes in sync a TTL (time to live) can be set for all caches to ensure
|
||||
that after some time the cache is refreshed from the database. To enable the TTL just set the property "
|
||||
hawkbit.cache.ttl" (value in format dDhHmMsS).
|
||||
|
||||
## Schedulers
|
||||
|
||||
Every node has multiple schedulers which run after a defined period of time. All schedulers always run on every node.
|
||||
This has to be kept in mind e.g. if the scheduler executes critical code which has to be executed only once. This is implemented via using, by default, distributed database based lock.
|
||||
|
||||
## Known constraints
|
||||
|
||||
### Denial-of-Service (DoS) filter
|
||||
|
||||
hawkBit owns the feature of guarding itself from DoS attacks,
|
||||
a [DoS filter](https://github.com/eclipse-hawkbit/hawkbit/blob/master/hawkbit-rest-core/src/main/java/org/eclipse/hawkbit/rest/security/DosFilter.java).
|
||||
It reduces the maximum number of requests per seconds which can be configured for read and write requests.
|
||||
This mechanism is only working for every node separately, i.e. in a cluster environment the worst-case behaviour would
|
||||
be that the maximum number of requests per seconds will be increased to its product if every request is handled by a
|
||||
different node.
|
||||
The same constraint exists with the validator to check if a user tried too many logins within a defined period of time.
|
||||
@@ -1,46 +0,0 @@
|
||||
---
|
||||
title: Multi-tenancy
|
||||
parent: Guides
|
||||
weight: 32
|
||||
---
|
||||
|
||||
hawkBit is able to support with multiple tenants with some constraints. This guide provides insights in the basic concepts and how to setup your multiple tenants.
|
||||
<!--more-->
|
||||
|
||||
## Big picture
|
||||
|
||||
Multi-tenancy is a core concept of hawkBit. It is supported by providing hawkBit authentication system supporting tenants as well as by using EclipseLink and Hibernate native multi-tenant support.
|
||||
|
||||
The tenant and user management, however, is only static. This means you shall configure all tenants and users into spring configurations.
|
||||
|
||||
The tenant and user management could be extended to be more flexible - e.g. dynamic management, OAuth and so on. This however is left for integrators for specific use cases.
|
||||
|
||||
## Constraints
|
||||
* static tenant and user management
|
||||
* configuration only via TenantAwareUserProperties#user configuration (i.e. hawkbit.security.user properties), hence
|
||||
* username is unique for the whole system - there could not be same username for different tenants
|
||||
* in order to create dynamically tenants when user is logged in you shall set hawkbit.server.repository.implicitTenantCreateAllowed=true,
|
||||
|
||||
## Example
|
||||
|
||||
```properties
|
||||
# allow to auto/implicit create DEFAULT tenant (on mgmt api call)
|
||||
hawkbit.server.repository.implicitTenantCreateAllowed=true
|
||||
# setup foo tenant with two users john and smith_on_foo
|
||||
hawkbit.security.user.john.tenant=foo
|
||||
hawkbit.security.user.john.password={noop}john_password
|
||||
hawkbit.security.user.john.roles=TENANT_ADMIN
|
||||
hawkbit.security.user.smith_on_foo.tenant=foo
|
||||
hawkbit.security.user.smith_on_foo.password={noop}smith_password
|
||||
hawkbit.security.user.smith_on_foo.roles=TENANT_ADMIN
|
||||
# setup bar tenant with single user smith_on_bar
|
||||
hawkbit.security.user.smith_on_bar.tenant=bar
|
||||
hawkbit.security.user.smith_on_bar.password={noop}smith_password
|
||||
hawkbit.security.user.smith_on_bar.roles=TENANT_ADMIN
|
||||
```
|
||||
This example creates two tenants foo and bar:
|
||||
* foo has two users john and smith_on_foo
|
||||
* john/john_password
|
||||
* smith_on_foo/smith_password
|
||||
* bar has single user smith_on_bar (it is again smith but since the user smith user could not be used for both tenants foo we need to use different username)
|
||||
* smith_on_bar/smith_password
|
||||
@@ -1,91 +0,0 @@
|
||||
---
|
||||
title: Run hawkBit
|
||||
parent: Guides
|
||||
weight: 31
|
||||
---
|
||||
|
||||
In this guide we describe how to run a full-featured hawkBit setup based on a production ready infrastructure. It is
|
||||
based on the hawkBit example modules and update server.
|
||||
|
||||
<!--more-->
|
||||
|
||||
{{% note %}}
|
||||
The update server can in fact be run stand alone. However, only with an embedded H2, no Device Management Federation API
|
||||
and no artifact storage.
|
||||
{{% /note %}}
|
||||
|
||||
## System Architecture
|
||||
|
||||
This guide describes a target architecture that you will probably expect in a production system.
|
||||
|
||||
- hawkBit [Update Server](https://github.com/eclipse-hawkbit/hawkbit/tree/master/hawkbit-monolith/hawkbit-update-server).
|
||||
- [MariaDB](https://mariadb.org) for the repository.
|
||||
- [RabbitMQ](https://www.rabbitmq.com) for DMF communication (optional for monolith / single host deployment).
|
||||
|
||||
For testing, demonstration or integrations purposes you could also use hawkBit SDK:
|
||||
- [hawkBit SDK Management API client](https://github.com/eclipse-hawkbit/hawkbit/blob/master/hawkbit-sdk/hawkbit-sdk-commons/src/main/java/org/eclipse/hawkbit/sdk/HawkbitClient.java).
|
||||
- [hawkBit SDK / Simulator Device](https://github.com/eclipse-hawkbit/hawkbit/tree/master/hawkbit-sdk/hawkbit-sdk-device).
|
||||
- [hawkBit SDK / Simulator for DMF integration](https://github.com/eclipse-hawkbit/hawkbit/tree/master/hawkbit-sdk/hawkbit-sdk-dmf)
|
||||
- [hawkBit SDK Demo Devices](https://github.com/eclipse-hawkbit/hawkbit/tree/master/hawkbit-sdk/hawkbit-sdk-demo)
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- You have a working [hawkBit core build](https://github.com/eclipse-hawkbit/hawkbit).
|
||||
|
||||
## Adapt hawkBit Update Server and Device Simulator to your environment.
|
||||
|
||||
As mentioned you can create your own application with hawkBit inside or adapt the existing example app. The second
|
||||
option will be shown here.
|
||||
|
||||
### Configure MariaDB/MySQL connection settings.
|
||||
|
||||
For this you can either edit the existing _application.properties_ or create
|
||||
a [new profile](http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#boot-features-external-config-profile-specific-properties).
|
||||
|
||||
```properties
|
||||
spring.jpa.database=MYSQL
|
||||
spring.datasource.driverClassName=org.mariadb.jdbc.Driver
|
||||
spring.datasource.url=jdbc:mariadb://localhost:3306/<YOUR_SCHEMA>
|
||||
spring.datasource.username=<YOUR_USER>
|
||||
spring.datasource.password=<YOUR_PWD>
|
||||
```
|
||||
|
||||
### Configure RabbitMQ connection settings for services (optional for monolith single host deployments).
|
||||
|
||||
We provide already defaults that should work with a standard Rabbit installation (spring boot RabbitProperties defaults).
|
||||
Otherwise, configure the following in the `application.properties` of the services:
|
||||
|
||||
```properties
|
||||
spring.rabbitmq.host=<Rabbit MQ host>
|
||||
spring.rabbitmq.port=<Rabbit MQ port>
|
||||
spring.rabbitmq.virtualHost=<virtual host to be used>
|
||||
spring.rabbitmq.username=<YOUR_USER>
|
||||
spring.rabbitmq.password=<YOUR_PWD>
|
||||
```
|
||||
|
||||
### Adapt hostnames of demo simulator
|
||||
|
||||
Should only be necessary if your system does not run on localhost or uses a different port than the example app.
|
||||
|
||||
Adapt `application.properties` or pass system / env variables for Spring properties:
|
||||
|
||||
```properties
|
||||
hawkbit.server.mgmtUrl=<MGMT server host:MGMT port>
|
||||
hawkbit.server.ddiUrl=<DDI server host:DDI port>
|
||||
```
|
||||
|
||||
## Compile & Run
|
||||
|
||||
### Compile & Run your _"production ready"_ app
|
||||
|
||||
see [update server](https://github.com/eclipse-hawkbit/hawkbit/tree/master/hawkbit-monolith/hawkbit-update-server)
|
||||
|
||||
Note: you have to log into update server (e.g. via UI) before starting device / device simulator. Then hawkBit creates the mandatory tenant metadata.
|
||||
|
||||
### Compile & Run demo simulator (optional)
|
||||
|
||||
see [demo simulator](https://github.com/eclipse-hawkbit/hawkbit/tree/master/hawkbit-sdk/hawkbit-sdk-demo)
|
||||
|
||||
login into either Management API (which is done by this client).
|
||||
|
||||
## Enjoy hawkBit with a real database, artifact storage and all [interfaces](../../apis/) available
|
||||
@@ -1,152 +0,0 @@
|
||||
---
|
||||
title: Release notes
|
||||
weight: 100
|
||||
---
|
||||
|
||||
## 0.8.0
|
||||
|
||||
**Release Date:** Tuesday, March 11, 2025 <br />
|
||||
Hawkbit: [Tag](https://github.com/eclipse-hawkbit/hawkbit/releases/tag/0.8.0) /
|
||||
[Release](https://github.com/eclipse-hawkbit/hawkbit/milestone/29) <br />
|
||||
|
||||
## 0.7.0
|
||||
|
||||
**Release Date:** Thursday, January 16, 2025 <br />
|
||||
Hawkbit: [Tag](https://github.com/eclipse-hawkbit/hawkbit/releases/tag/0.7.0) /
|
||||
[Release](https://github.com/eclipse-hawkbit/hawkbit/milestone/28) <br />
|
||||
|
||||
|
||||
## 0.6.1
|
||||
|
||||
**Release Date:** Wednesday, October 30, 2024 <br />
|
||||
Hawkbit: [Tag](https://github.com/eclipse-hawkbit/hawkbit/releases/tag/0.6.1) /
|
||||
[Release](https://github.com/eclipse-hawkbit/hawkbit/milestone/27) <br />
|
||||
|
||||
## 0.5.0
|
||||
|
||||
**Release Date:** Friday, March 22, 2024 <br />
|
||||
Hawkbit: [Tag](https://github.com/eclipse-hawkbit/hawkbit/releases/tag/0.5.0) /
|
||||
[Release](https://github.com/eclipse-hawkbit/hawkbit/milestone/26) <br />
|
||||
Extensions: [Tag](https://github.com/eclipse-hawkbit/hawkbit-extensions/releases/tag/0.5.0)
|
||||
|
||||
## 0.4.1
|
||||
|
||||
**Release Date:** Friday, January 12, 2024 <br />
|
||||
Hawkbit: [Tag](https://github.com/eclipse-hawkbit/hawkbit/releases/tag/0.4.1) /
|
||||
[Release](https://github.com/eclipse-hawkbit/hawkbit/milestone/25) <br />
|
||||
Extensions: [Tag](https://github.com/eclipse-hawkbit/hawkbit-extensions/releases/tag/0.4.1)
|
||||
|
||||
## 0.3.0
|
||||
|
||||
**Release Date:** Friday, November 17, 2023 <br />
|
||||
Hawkbit: [Tag](https://github.com/eclipse-hawkbit/hawkbit/releases/tag/0.3.0) /
|
||||
[Release](https://github.com/eclipse-hawkbit/hawkbit/milestone/11) <br />
|
||||
Extensions: [Tag](https://github.com/eclipse-hawkbit/hawkbit-extensions/releases/tag/0.3.0)
|
||||
|
||||
## 0.3.0M9
|
||||
|
||||
**Release Date:** Thursday, August 24, 2023 <br />
|
||||
Hawkbit: [Tag](https://github.com/eclipse-hawkbit/hawkbit/releases/tag/0.3.0M9) /
|
||||
[Release](https://github.com/eclipse-hawkbit/hawkbit/milestone/24) <br />
|
||||
Extensions: [Tag](https://github.com/eclipse-hawkbit/hawkbit-extensions/releases/tag/0.3.0M9)
|
||||
|
||||
## 0.3.0M8
|
||||
|
||||
**Release Date:** Friday, April 21, 2023 <br />
|
||||
Hawkbit: [Tag](https://github.com/eclipse-hawkbit/hawkbit/releases/tag/0.3.0M8) /
|
||||
[Release](https://github.com/eclipse-hawkbit/hawkbit/milestone/23) <br />
|
||||
Extensions: [Tag](https://github.com/eclipse-hawkbit/hawkbit-extensions/releases/tag/0.3.0M8) /
|
||||
[Release](https://github.com/eclipse-hawkbit/hawkbit-extensions/milestone/2)
|
||||
|
||||
## 0.3.0M7
|
||||
|
||||
**Release Date:** Monday, February 15, 2021 <br />
|
||||
Hawkbit: [Tag](https://github.com/eclipse-hawkbit/hawkbit/releases/tag/0.3.0M7) /
|
||||
[Release](https://github.com/eclipse-hawkbit/hawkbit/milestone/22?closed=1) <br />
|
||||
Extensions: [Tag](https://github.com/eclipse-hawkbit/hawkbit-extensions/releases/tag/0.3.0M7) /
|
||||
[Release](https://github.com/eclipse-hawkbit/hawkbit-extensions/milestone/1?closed=1)
|
||||
|
||||
## 0.3.0M6
|
||||
|
||||
**Release Date:** Friday, January 17, 2020 <br />
|
||||
[Tag](https://github.com/eclipse-hawkbit/hawkbit/releases/tag/0.3.0M6) /
|
||||
[Release](https://github.com/eclipse-hawkbit/hawkbit/milestone/21?closed=1)
|
||||
|
||||
## 0.3.0M5
|
||||
|
||||
**Release Date:** Tuesday, July 29, 2019 <br />
|
||||
[Tag](https://github.com/eclipse-hawkbit/hawkbit/releases/tag/0.3.0M5) /
|
||||
[Release](https://github.com/eclipse-hawkbit/hawkbit/milestone/20?closed=1)
|
||||
|
||||
## 0.3.0M4
|
||||
|
||||
**Release Date:** Thursday, June 6, 2019 <br />
|
||||
[Tag](https://github.com/eclipse-hawkbit/hawkbit/releases/tag/0.3.0M4) /
|
||||
[Release](https://github.com/eclipse-hawkbit/hawkbit/milestone/19?closed=1)
|
||||
|
||||
## 0.3.0M3
|
||||
|
||||
**Release Date:** Tuesday, May 21, 2019 <br />
|
||||
[Tag](https://github.com/eclipse-hawkbit/hawkbit/releases/tag/0.3.0M3) /
|
||||
[Release](https://github.com/eclipse-hawkbit/hawkbit/milestone/18?closed=1)
|
||||
|
||||
## 0.3.0M2
|
||||
|
||||
**Release Date:** Tuesday, April 2, 2019 <br />
|
||||
[Tag](https://github.com/eclipse-hawkbit/hawkbit/releases/tag/0.3.0M2) /
|
||||
[Release](https://github.com/eclipse-hawkbit/hawkbit/milestone/17?closed=1)
|
||||
|
||||
## 0.3.0M1
|
||||
|
||||
**Release Date:** Saturday, February 2, 2019 <br />
|
||||
[Tag](https://github.com/eclipse-hawkbit/hawkbit/releases/tag/0.3.0M1) /
|
||||
[Release](https://github.com/eclipse-hawkbit/hawkbit/milestone/16?closed=1)
|
||||
|
||||
## 0.2.5
|
||||
|
||||
**Release Date:** Friday, November 30, 2018 <br />
|
||||
[Tag](https://github.com/eclipse-hawkbit/hawkbit/releases/tag/0.2.5) /
|
||||
[Release](https://github.com/eclipse-hawkbit/hawkbit/milestone/14?closed=1)
|
||||
|
||||
## 0.2.4
|
||||
|
||||
**Release Date:** Friday, October 26, 2018 <br />
|
||||
[Tag](https://github.com/eclipse-hawkbit/hawkbit/releases/tag/0.2.4) /
|
||||
[Release](https://github.com/eclipse-hawkbit/hawkbit/milestone/13?closed=1)
|
||||
|
||||
## 0.2.3
|
||||
|
||||
**Release Date:** Monday, October 1, 2018 <br />
|
||||
[Tag](https://github.com/eclipse-hawkbit/hawkbit/releases/tag/0.2.3) /
|
||||
[Release](https://github.com/eclipse-hawkbit/hawkbit/milestone/12?closed=1)
|
||||
|
||||
## 0.2.2
|
||||
|
||||
**Release Date:** Thursday, September 21, 2018 <br />
|
||||
[Tag](https://github.com/eclipse-hawkbit/hawkbit/releases/tag/0.2.2) /
|
||||
[Release](https://github.com/eclipse-hawkbit/hawkbit/milestone/10?closed=1)
|
||||
|
||||
## 0.2.1
|
||||
|
||||
**Release Date:** Friday, July 6, 2018 <br />
|
||||
[Tag](https://github.com/eclipse-hawkbit/hawkbit/releases/tag/0.2.1) /
|
||||
[Release](https://github.com/eclipse-hawkbit/hawkbit/milestone/9?closed=1)
|
||||
|
||||
## 0.2.0
|
||||
|
||||
First Eclipse hawkBit release including:
|
||||
|
||||
* **Core features:**
|
||||
* Device and Software Repository
|
||||
* Artifact Content Delivery
|
||||
* Rollout/Campaign Management
|
||||
|
||||
* **Interfaces:**
|
||||
* Management API
|
||||
* Direct Device Integration (DDI) API
|
||||
* Device Management Federation (DMF) API
|
||||
|
||||
**Release Date:** Friday, June 15, 2018 <br />
|
||||
[Tag](https://github.com/eclipse-hawkbit/hawkbit/releases/tag/0.2.0) /
|
||||
[Release](https://github.com/eclipse-hawkbit/hawkbit/milestone/1?closed=1) /
|
||||
[Eclipse](https://projects.eclipse.org/projects/iot.hawkbit/releases/0.2.0)
|
||||
@@ -1,80 +0,0 @@
|
||||
---
|
||||
title: What is hawkBit?
|
||||
weight: 10
|
||||
---
|
||||
|
||||
Eclipse hawkBit™ is a domain-independent back-end framework for rolling out software updates to constrained edge
|
||||
devices as well as more powerful controllers and gateways connected to IP based networking infrastructure.
|
||||
|
||||

|
||||
|
||||
## Why Software Updates in IoT?
|
||||
|
||||
Having software update capabilities ensures a secure IoT by means that it gives IoT projects a fighting chance against
|
||||
pandora's box that they opened the moment their devices got connected. From that moment on devices are at the forefront
|
||||
of IT security threats many embedded software developers historically never had to face. Shipping for instance a Linux
|
||||
powered device connected to the Internet without any security updates ever applied during its lifetime is kind of a
|
||||
suicidal act these days.
|
||||
|
||||
A more charming argument for software update is that it enables agile development for hardware and hardware near
|
||||
development. Concepts like a minimum viable product can be applied for devices as not all features need to be ready at
|
||||
manufacturing time. Changes on the cloud side of the IoT project can be applied to the devices at runtime as well.
|
||||
|
||||
Sometimes Software Update is a business model on its own as it makes devices much more attractive to the customer if
|
||||
they are updatable, i.e. they do not only buy a product because of its current feature set but make also a bet on its
|
||||
future capabilities. In addition new revenue streams may arise from the fact that feature extensions can potentially be
|
||||
monetized (e.g. Apps) without the need to design, manufacture and ship a new device (revision).
|
||||
|
||||
## Why hawkBit?
|
||||
|
||||
**Updating software** (components) on constrained edge devices as well as more powerful controllers and gateways is as
|
||||
mentioned before a **common requirement** in most IoT scenarios.
|
||||
|
||||
At the time being, this process is **usually handled by the IoT solution itself**, sometimes backed by a full fledged
|
||||
device management system. We believe that this approach generates unnecessary **duplicate work** in the IoT space, in
|
||||
particular when considering the challenges of implementing a safe and reliable remote software update process: the
|
||||
software update process must never fail and also must never be compromised as, at the one hand, it can be used to fix
|
||||
almost any issue/problem on the device but at the same time also poses the greatest security threat if mis-used to
|
||||
introduce malicious code to the device.
|
||||
|
||||
In addition we believe the software update process to be relatively **independent from particular application domains**
|
||||
when seen from the back-end (cloud) perspective. Updating the software for an entire car may differ from updating the
|
||||
firmware of a single sensor with regard to the connectivity of the device to the cloud and also to the complexity of the
|
||||
software package update process on the device. However, the process of rolling out the software, e.g. uploading an
|
||||
artifact to the repository, assigning it to eligible devices, managing the roll out campaign for a large number of
|
||||
devices, orchestrating content delivery networks to distribute the package, monitoring and reporting the progress of the
|
||||
roll-out and last but not least requirements regarding security and reliability are quite similar.
|
||||
|
||||
Software update itself is often seen as a sub process of general device management. In fact, most device management
|
||||
systems include functionality for triggering groups of devices to perform an update, usually accompanied by an artifact
|
||||
repository and basic reporting and monitoring capabilities. This is true for both systems specifically targeting IoT as
|
||||
well as systems originating from the mobile area.
|
||||
|
||||
Existing **device management systems** usually **lack** the capability to **efficiently organize roll outs at IoT scale
|
||||
**, e.g. splitting the roll out into sub groups, cascading them, automatically stopping the roll out after a defined
|
||||
error threshold etc. They are also usually restricted to a single device management protocol, either a proprietary one
|
||||
or one of the existing standard protocols like LWM2M, OMA-DM or TR-069. Even if they support more than one such
|
||||
protocol, they are often a result of the device management protocol they started with and restricted in their adoption
|
||||
capabilities to others.
|
||||
|
||||
At the same time the wide functional scope of a full fledged **device management system introduces unnecessary (and
|
||||
unwanted) complexity** to many IoT projects. This is particularly true for IoT solutions working with constrained
|
||||
devices where requirements regarding generic device management are often very limited only but a secure & reliable
|
||||
software update process is still mandatory.
|
||||
|
||||
As a result we have the need for a domain independent solution
|
||||
|
||||
* that works for the majority of IoT projects
|
||||
* that goes beyond the pure update and handles more complex **roll out strategies** needed by large scale IoT projects.
|
||||
* that at the same time is **focused on software updates** in the IoT space
|
||||
* and that is able to work on its own for simple scenarios while having the capability to integrate with existing device
|
||||
management systems and protocols.
|
||||
|
||||
## Cloud Ready
|
||||
|
||||
* **Technical Scalability**: connect millions of devices and ship terabytes of software on a global scale.
|
||||
* **Functional Scalability**: rollouts with hundreds of thousands of individual devices in it.
|
||||
* **Reliability**: software update as the last line of defense against device faults and vulnerabilities.
|
||||
* **Managed device complexity**: device topologies inside each individual provisioning target.
|
||||
* **Integration flexibility**: connect and integrate through various (non-)standardized device management protocols
|
||||
directly or through federated device managements.
|
||||
@@ -1,40 +0,0 @@
|
||||
@echo off
|
||||
@REM
|
||||
@REM Copyright (c) 2023 Bosch.IO GmbH and others
|
||||
@REM
|
||||
@REM This program and the accompanying materials are made
|
||||
@REM available under the terms of the Eclipse Public License 2.0
|
||||
@REM which is available at https://www.eclipse.org/legal/epl-2.0/
|
||||
@REM
|
||||
@REM SPDX-License-Identifier: EPL-2.0
|
||||
@REM
|
||||
|
||||
rem This script checks if 'hugo' is installed. Afterwards, the Hugo theme is downloaded.
|
||||
hugo version
|
||||
if ERRORLEVEL 1 (
|
||||
echo [ERROR] Please install Hugo first before proceeding.
|
||||
exit 1
|
||||
)
|
||||
|
||||
echo [INFO]
|
||||
echo [INFO] Install Hugo Theme
|
||||
set HUGO_THEMES=themes\hugo-material-docs
|
||||
set CSS_FILE=themes\hugo-material-docs\static\stylesheets\application.css
|
||||
|
||||
if not exist %HUGO_THEMES%\ (
|
||||
git submodule add --force https://github.com/digitalcraftsman/hugo-material-docs.git %HUGO_THEMES%
|
||||
echo [INFO] ... done
|
||||
) else echo [INFO] ... theme already installed in: %HUGO_THEMES%
|
||||
|
||||
rem This script uses 'awk' to replace 1200px with 1500px in the application.css file from 'hugo'
|
||||
if exist %CSS_FILE% (
|
||||
then
|
||||
powershell -Command "(gc %CSS_FILE%) -replace 'max-width:1200px', 'max-width:1500px' | Out-File -encoding ASCII %CSS_FILE%"
|
||||
echo [INFO] CSS updated content successfully!
|
||||
else
|
||||
echo [WARN] CSS file not found!
|
||||
fi
|
||||
|
||||
echo [INFO]
|
||||
echo [INFO] Launch the documentation locally by running 'mvn site' (or 'hugo server' in the docs directory),
|
||||
echo [INFO] and browse to 'http://localhost:{port}/hawkbit/'.
|
||||
@@ -1,45 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2018 Bosch Software Innovations GmbH and others
|
||||
#
|
||||
# This program and the accompanying materials are made
|
||||
# available under the terms of the Eclipse Public License 2.0
|
||||
# which is available at https://www.eclipse.org/legal/epl-2.0/
|
||||
#
|
||||
# SPDX-License-Identifier: EPL-2.0
|
||||
#
|
||||
|
||||
#!/bin/bash
|
||||
|
||||
# This script checks if 'hugo' is installed. Afterwards, the Hugo theme is downloaded.
|
||||
hugo version
|
||||
if [ $? != 0 ]
|
||||
then
|
||||
echo "[ERROR] Please install Hugo first before proceeding."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "[INFO] "
|
||||
echo "[INFO] Install Hugo Theme"
|
||||
HUGO_THEMES=themes/hugo-material-docs
|
||||
CSS_FILE=themes/hugo-material-docs/static/stylesheets/application.css
|
||||
|
||||
if [ ! -d ${HUGO_THEMES} ]
|
||||
then
|
||||
git submodule add --force https://github.com/digitalcraftsman/hugo-material-docs.git ${HUGO_THEMES}
|
||||
echo "[INFO] ... done"
|
||||
else
|
||||
echo "[INFO] ... theme already installed in: ${HUGO_THEMES}"
|
||||
fi
|
||||
|
||||
# This script uses 'awk' to replace 1200px with 1500px in the application.css file from 'hugo'
|
||||
if [ -f ${CSS_FILE} ]
|
||||
then
|
||||
awk '{gsub(/max-width:1200px/, "max-width:1500px"); print}' "${CSS_FILE}" > tmp_hawkbit_doc && mv tmp_hawkbit_doc "${CSS_FILE}"
|
||||
echo "[INFO] CSS updated content successfully!"
|
||||
else
|
||||
echo "[WARN] CSS file not found!"
|
||||
fi
|
||||
|
||||
echo "[INFO] "
|
||||
echo "[INFO] Launch the documentation locally by running 'mvn site' (or 'hugo server' in the docs directory),"
|
||||
echo "[INFO] and browse to 'http://localhost:1313/hawkbit/'. "
|
||||
@@ -1,54 +0,0 @@
|
||||
{{ partial "head" . }}
|
||||
|
||||
{{ if (eq (trim .Site.Params.provider " " | lower) "github") | and (isset .Site.Params "repo_url") }}
|
||||
{{ $repo_id := replace .Site.Params.repo_url "https://github.com/" ""}}
|
||||
{{ .Scratch.Set "repo_id" $repo_id }}
|
||||
{{ end }}
|
||||
|
||||
<div class="backdrop">
|
||||
<div class="backdrop-paper"></div>
|
||||
</div>
|
||||
|
||||
<input class="toggle" type="checkbox" id="toggle-drawer">
|
||||
<input class="toggle" type="checkbox" id="toggle-search">
|
||||
<label class="toggle-button overlay" for="toggle-drawer"></label>
|
||||
|
||||
<header class="header">
|
||||
{{ partial "header" . }}
|
||||
</header>
|
||||
|
||||
<main class="main">
|
||||
<div class="drawer">
|
||||
{{ partial "drawer" . }}
|
||||
</div>
|
||||
|
||||
<article class="article">
|
||||
<div class="wrapper">
|
||||
<h1>Pages in {{ .Title }}</h1>
|
||||
|
||||
{{ range .Data.Pages }}
|
||||
<a href="{{ .Permalink }}" title="{{ .Title }}">
|
||||
<h2>{{ .Title }}</h2>
|
||||
</a>
|
||||
|
||||
<br>
|
||||
{{ printf "%s" .Summary | markdownify }} <br><a href="{{ .Permalink }}">[...]</a>
|
||||
|
||||
<hr>
|
||||
{{ end }}
|
||||
|
||||
{{ partial "copyright.html" . }}
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<div class="results" role="status" aria-live="polite">
|
||||
<div class="scrollable">
|
||||
<div class="wrapper">
|
||||
<div class="meta"></div>
|
||||
<div class="list"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
{{ partial "footer_js" . }}
|
||||
@@ -1,49 +0,0 @@
|
||||
{{ partial "head" . }}
|
||||
|
||||
{{ if (eq (trim .Site.Params.provider " " | lower) "github") | and (isset .Site.Params "repo_url") }}
|
||||
{{ $repo_id := replace .Site.Params.repo_url "https://github.com/" ""}}
|
||||
{{ .Scratch.Set "repo_id" $repo_id }}
|
||||
{{ end }}
|
||||
|
||||
<div class="backdrop">
|
||||
<div class="backdrop-paper"></div>
|
||||
</div>
|
||||
|
||||
<input class="toggle" type="checkbox" id="toggle-drawer">
|
||||
<input class="toggle" type="checkbox" id="toggle-search">
|
||||
<label class="toggle-button overlay" for="toggle-drawer"></label>
|
||||
|
||||
<header class="header">
|
||||
{{ partial "header" . }}
|
||||
</header>
|
||||
|
||||
<main class="main">
|
||||
<div class="drawer">
|
||||
{{ partial "drawer" . }}
|
||||
</div>
|
||||
|
||||
<article class="article">
|
||||
<div class="wrapper">
|
||||
<h1>{{ .Title }} {{ if .Draft }} (Draft){{ end }}</h1>
|
||||
|
||||
{{ .Content }}
|
||||
|
||||
{{ partial "copyright.html" . }}
|
||||
|
||||
<footer class="footer">
|
||||
{{ partial "footer" . }}
|
||||
</footer>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<div class="results" role="status" aria-live="polite">
|
||||
<div class="scrollable">
|
||||
<div class="wrapper">
|
||||
<div class="meta"></div>
|
||||
<div class="list"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
{{ partial "footer_js" . }}
|
||||
@@ -1,101 +0,0 @@
|
||||
{{ partial "head" . }}
|
||||
|
||||
{{ if (eq (trim .Site.Params.provider " " | lower) "github") | and (isset .Site.Params "repo_url") }}
|
||||
{{ $repo_id := replace .Site.Params.repo_url "https://github.com/" ""}}
|
||||
{{ .Scratch.Set "repo_id" $repo_id }}
|
||||
{{ end }}
|
||||
|
||||
<div class="backdrop">
|
||||
<div class="backdrop-paper"></div>
|
||||
</div>
|
||||
|
||||
<input class="toggle" type="checkbox" id="toggle-drawer">
|
||||
<input class="toggle" type="checkbox" id="toggle-search">
|
||||
<label class="toggle-button overlay" for="toggle-drawer"></label>
|
||||
|
||||
<header class="header">
|
||||
{{ partial "header" . }}
|
||||
</header>
|
||||
|
||||
<main class="main">
|
||||
<div class="drawer">
|
||||
{{ partial "drawer" . }}
|
||||
</div>
|
||||
|
||||
<article class="article">
|
||||
<div class="wrapper">
|
||||
|
||||
<div class="jumbotron">IoT. Update. Device.</div>
|
||||
|
||||
<div>
|
||||
<p>
|
||||
Eclipse hawkBit™ is a domain independent back-end framework for rolling out software updates
|
||||
to constrained
|
||||
edge devices as well as more powerful controllers and gateways connected to IP based networking
|
||||
infrastructure.
|
||||
</p>
|
||||
<img src="images/hawkBit_overview.jpeg" />
|
||||
<h2>Interfaces</h2>
|
||||
<p>
|
||||
hawkBit offers a direct device integration via HTTP or a device management federation API
|
||||
which allows to connect devices with different protocol adapter. Users can make use of the graphical
|
||||
user interface
|
||||
and other service can interact with hawkBit through the RESTful management API.
|
||||
</p>
|
||||
|
||||
<h2>Rollout</h2>
|
||||
<div style="width: 100%; overflow: hidden;">
|
||||
<div style="width: 50%; float: left;">
|
||||
<p>
|
||||
hawkBit supports an easy and flexible rollout management which allows you to update a large
|
||||
amount of devices in separated groups.
|
||||
</p>
|
||||
<ul>
|
||||
<li>Cascading start of the deployment groups based on installation status of the previous
|
||||
group.
|
||||
</li>
|
||||
<li>Emergency shutdown of the rollout in case a group exceeds the defined error threshold.
|
||||
</li>
|
||||
<li>Rollout progress monitoring for the entire rollout and the individual groups.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div style="margin-left: 50%;">
|
||||
<br/>
|
||||
<br/>
|
||||
<img src="images/rollout.png" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2>Package Model</h2>
|
||||
<div style="width: 100%; overflow: hidden;">
|
||||
<div style="width: 50%; float: left;">
|
||||
<br/>
|
||||
<img src="images/packagemodel.png" />
|
||||
</div>
|
||||
|
||||
<div style="margin-left: 55%;">
|
||||
<p>
|
||||
A software update does not always contain only a single file. The hawkBit meta model allows
|
||||
you to configure your files in virtual software and distribution packages.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ partial "copyright.html" . }}
|
||||
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<div class="results" role="status" aria-live="polite">
|
||||
<div class="scrollable">
|
||||
<div class="wrapper">
|
||||
<div class="meta"></div>
|
||||
<div class="list"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
{{ partial "footer_js" . }}
|
||||
@@ -1,33 +0,0 @@
|
||||
<aside class="copyright" role="note">
|
||||
<div class="logo">
|
||||
<a href="https://www.eclipse.org" target="_blank">
|
||||
<img src="/hawkbit/images/eclipse_foundation_logo.png" />
|
||||
</a>
|
||||
</div>
|
||||
<p class="notice">
|
||||
{{ with .Site.Params.copyright }}
|
||||
© {{ now.Year }} {{ . }} –
|
||||
{{ end }}
|
||||
Documentation built with
|
||||
<a href="https://www.gohugo.io" target="_blank">Hugo</a>
|
||||
using the
|
||||
<a href="http://github.com/digitalcraftsman/hugo-material-docs" target="_blank">Material</a> theme.
|
||||
</p>
|
||||
<p class="quickLinks">
|
||||
<a href="http://www.eclipse.org/legal/privacy.php" target="_blank">
|
||||
> Privacy Policy
|
||||
</a>
|
||||
<a href="http://www.eclipse.org/legal/termsofuse.php" target="_blank">
|
||||
> Terms of Use
|
||||
</a>
|
||||
<a href="http://www.eclipse.org/legal/copyright.php" target="_blank">
|
||||
> Copyright Agent
|
||||
</a>
|
||||
<a href="http://www.eclipse.org/legal" target="_blank">
|
||||
> Legal
|
||||
</a>
|
||||
<a href="https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt" target="_blank">
|
||||
> License
|
||||
</a>
|
||||
</p>
|
||||
</aside>
|
||||
@@ -1,77 +0,0 @@
|
||||
<nav aria-label="Navigation">
|
||||
<a href="{{ with .Site.BaseURL }}{{ . }}{{ else }}{{ .Site.BaseURL }}{{ end }}" class="project">
|
||||
<div class="banner">
|
||||
{{ with .Site.Params.logo }}
|
||||
<div class="logo">
|
||||
<img src="{{ $.Site.BaseURL }}{{ . }}">
|
||||
</div>
|
||||
{{ end }}
|
||||
<div class="name">
|
||||
<strong>{{ .Site.Title }}™ {{ with .Site.Params.version }}<span class="version">{{ . }}</span>{{ end }}</strong>
|
||||
{{ with .Scratch.Get "repo_id" }}
|
||||
<br>
|
||||
{{ . }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<div class="scrollable">
|
||||
<div class="wrapper">
|
||||
{{ if (eq (trim .Site.Params.provider " " | lower) "github") | and (isset .Site.Params "repo_url") }}
|
||||
<ul class="repo" style="text-align: left; ; padding-left: 2em;">
|
||||
<li class="repo-stars">
|
||||
<a href="{{ .Site.Params.repo_url }}/stargazers" target="_blank" title="Stargazers" data-action="star">
|
||||
<i class="icon icon-star"></i> Stars
|
||||
<span class="count">–</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<hr>
|
||||
{{ end }}
|
||||
|
||||
<div class="toc">
|
||||
{{ if gt (len .Site.Menus.main) 0 }}
|
||||
<ul>
|
||||
{{ partial "nav" . }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
|
||||
{{ if isset .Site.Params "author" }}
|
||||
<hr>
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<a href="https://opensource.org/licenses/EPL-2.0" title="License" target="_blank">
|
||||
<img src="https://img.shields.io/badge/License-EPL%202.0-green.svg" />
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="https://github.com/eclipse-hawkbit/hawkbit/actions/workflows/verify.yml" title="License" target="_blank">
|
||||
<img src="https://github.com/eclipse-hawkbit/hawkbit/actions/workflows/verify.yml/badge.svg?branch=master" />
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://sonarcloud.io/summary/new_code?id=eclipse-hawkbit_hawkbit" title="Sonarcloud Status" target="_blank">
|
||||
<img src="https://sonarcloud.io/api/project_badges/measure?project=eclipse-hawkbit_hawkbit&metric=alert_status" />
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="https://search.maven.org/search?q=g:org.eclipse.hawkbit" title="Maven Central Status" target="_blank">
|
||||
<img src="https://img.shields.io/maven-central/v/org.eclipse.hawkbit/hawkbit-parent?label=maven-central&color=blue" />
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="https://gitter.im/eclipse/hawkbit?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge" title="Chat on Gitter" target="_blank">
|
||||
<img src="https://badges.gitter.im/eclipse/hawkbit.svg" />
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -1,60 +0,0 @@
|
||||
<script>
|
||||
{{ with .Scratch.Get "repo_id" }}
|
||||
var base_url = '{{ (printf "%s" $.Site.BaseURL) | safeJS }}';
|
||||
var repo_id = '{{ . | safeJS }}';
|
||||
{{ else }}
|
||||
var base_url = '';
|
||||
var repo_id = '';
|
||||
{{ end }}
|
||||
</script>
|
||||
|
||||
<script src="{{ "javascripts/application.js" | absURL }}"></script>
|
||||
{{ range .Site.Params.custom_js }}
|
||||
<script src="{{ . | absURL }}"></script>
|
||||
{{ end }}
|
||||
|
||||
<script>
|
||||
{{ "/* Add headers to scrollspy */" | safeJS }}
|
||||
var headers = document.getElementsByTagName("h2");
|
||||
var scrollspy = document.getElementById('scrollspy');
|
||||
|
||||
if(scrollspy) {
|
||||
if(headers.length > 0) {
|
||||
for(var i = 0; i < headers.length; i++) {
|
||||
var li = document.createElement("li");
|
||||
li.setAttribute("class", "anchor");
|
||||
|
||||
var a = document.createElement("a");
|
||||
if(!headers[i].id)
|
||||
a.setAttribute("href", headers[i].parentNode.href);
|
||||
else
|
||||
a.setAttribute("href", "#" + headers[i].id);
|
||||
a.setAttribute("title", headers[i].innerHTML);
|
||||
a.innerHTML = headers[i].innerHTML;
|
||||
|
||||
li.appendChild(a);
|
||||
scrollspy.appendChild(li);
|
||||
}
|
||||
} else {
|
||||
scrollspy.parentElement.removeChild(scrollspy)
|
||||
}
|
||||
|
||||
|
||||
{{ "/* Add permanent link next to the headers */" | safeJS }}
|
||||
var headers = document.querySelectorAll("h1, h2, h3, h4, h5, h6");
|
||||
|
||||
for(var i = 0; i < headers.length; i++) {
|
||||
var a = document.createElement("a");
|
||||
a.setAttribute("class", "headerlink");
|
||||
a.setAttribute("href", "#" + headers[i].id);
|
||||
a.setAttribute("title", "Permanent link");
|
||||
a.innerHTML = {{ or .Site.Params.permalink "¶" }};
|
||||
headers[i].appendChild(a);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.8.0/highlight.min.js"></script>
|
||||
<script>hljs.initHighlightingOnLoad();</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,83 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<!--[if lt IE 7 ]><html class="no-js ie6"><![endif]-->
|
||||
<!--[if IE 7 ]><html class="no-js ie7"><![endif]-->
|
||||
<!--[if IE 8 ]><html class="no-js ie8"><![endif]-->
|
||||
<!--[if IE 9 ]><html class="no-js ie9"><![endif]-->
|
||||
<!--[if (gt IE 9)|!(IE)]><!--> <html class="no-js"> <!--<![endif]-->
|
||||
|
||||
<head {{ with .Site.LanguageCode }}lang="{{ . }}"{{ end }}>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=10" />
|
||||
<title>{{ .Title }}{{ if not .IsHome }} - {{ .Site.Title }}{{ end }}</title>
|
||||
{{ hugo.Generator }}
|
||||
|
||||
{{ with .Site.Params.description }}
|
||||
<meta name="description" content="{{ . }}">
|
||||
{{ end }}
|
||||
<link rel="canonical" href="{{ .Permalink }}">
|
||||
{{ with .Site.Params.author }}
|
||||
<meta name="author" content="{{ . }}">
|
||||
{{ end }}
|
||||
|
||||
<meta property="og:url" content="{{ .Permalink }}">
|
||||
{{ with .Site.Title }}<meta property="og:title" content="{{ . }}">{{ end }}
|
||||
{{ with .Site.Params.logo }}<meta property="og:image" content="{{ . | absURL }}">{{ end }}
|
||||
{{ with .Site.Title }}<meta name="apple-mobile-web-app-title" content="{{ . }}">{{ end }}
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
||||
|
||||
{{ if .Params.redirectURL }}<meta http-equiv="refresh" content="1; url={{ .Params.redirectURL }}"/>{{ end }}
|
||||
|
||||
<link rel="shortcut icon" type="image/x-icon" href="{{ with .Site.Params.favicon }}{{ . | absURL }}{{ else }}{{ "images/favicon.ico" | absURL }}{{ end }}">
|
||||
<link rel="icon" type="image/x-icon" href="{{ with .Site.Params.favicon }}{{ . | absURL }}{{ else }}{{ "images/favicon.ico" | absURL }}{{ end }}">
|
||||
|
||||
<style>
|
||||
@font-face {
|
||||
font-family: 'Icon';
|
||||
src: url('{{ "fonts/icon.eot?52m981" | absURL }}');
|
||||
src: url('{{ "fonts/icon.eot?#iefix52m981" | absURL }}')
|
||||
format('embedded-opentype'),
|
||||
url('{{ "fonts/icon.woff?52m981" | absURL }}')
|
||||
format('woff'),
|
||||
url('{{ "fonts/icon.ttf?52m981" | absURL }}')
|
||||
format('truetype'),
|
||||
url('{{ "fonts/icon.svg?52m981#icon" | absURL }}')
|
||||
format('svg');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
</style>
|
||||
|
||||
<link rel="stylesheet" href="{{ "stylesheets/application.css" | absURL }}">
|
||||
<link rel="stylesheet" href="{{ "stylesheets/temporary.css" | absURL }}">
|
||||
<link rel="stylesheet" href="{{ "stylesheets/palettes.css" | absURL }}">
|
||||
<link rel="stylesheet" href="{{ with .Site.Params.highlight_css }}{{ . | absURL }}{{ else }}{{ "stylesheets/highlight/highlight.css" | absURL }}{{ end }}">
|
||||
|
||||
{{/* set default values if no custom ones are defined */}}
|
||||
{{ $text := or .Site.Params.font.text "Roboto" }}
|
||||
{{ $code := or .Site.Params.font.code "Roboto Mono" }}
|
||||
<link rel="stylesheet" href="//fonts.googleapis.com/css?family={{ $text }}:400,700|{{ replace $code " " "+" | safeURL }}">
|
||||
<style>
|
||||
body, input {
|
||||
font-family: '{{ $text }}', Helvetica, Arial, sans-serif;
|
||||
}
|
||||
pre, code {
|
||||
font-family: '{{ $code }}', 'Courier New', 'Courier', monospace;
|
||||
}
|
||||
</style>
|
||||
|
||||
{{ range .Site.Params.custom_css }}
|
||||
<link rel="stylesheet" href="{{ . | absURL }}">
|
||||
{{ end }}
|
||||
<script src="{{ "javascripts/modernizr.js" | absURL }}"></script>
|
||||
<script src="//www.eclipse.org/eclipse.org-common/themes/solstice/public/javascript/vendor/cookieconsent/default.min.js"></script>
|
||||
|
||||
{{ with .OutputFormats.Get "RSS" }}
|
||||
<link href="{{ . }}" rel="alternate" type="application/rss+xml" title="{{ $.Site.Title }}" />
|
||||
<link href="{{ . }}" rel="feed" type="application/rss+xml" title="{{ $.Site.Title }}" />
|
||||
{{ end }}
|
||||
|
||||
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.1.0/css/all.css" integrity="sha384-lKuwvrZot6UHsBSfcMvOkWwlCMgc0TaWr+30HWe3a4ltaBwTZhyTEggF5tJv8tbt" crossorigin="anonymous">
|
||||
</head>
|
||||
<body class="{{ with .Site.Params.palette.primary }}palette-primary-{{ . }}{{end }} {{ with .Site.Params.palette.accent }}palette-accent-{{ . }}{{ end }}">
|
||||
@@ -1,57 +0,0 @@
|
||||
<nav aria-label="Header">
|
||||
<div class="bar default">
|
||||
<div class="button button-menu" role="button" aria-label="Menu">
|
||||
<label class="toggle-button icon icon-menu" for="toggle-drawer">
|
||||
<span></span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="stretch">
|
||||
<div class="title">
|
||||
{{ .Title | safeHTML }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ with .Site.Params.Social.twitter }}
|
||||
<div class="button button-twitter" role="button" aria-label="Twitter">
|
||||
<a href="https://twitter.com/{{ . }}" title="@{{ . }} on Twitter" target="_blank" class="toggle-button icon icon-twitter"></a>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ with .Site.Params.Social.github }}
|
||||
<div class="button button-github" role="button" aria-label="GitHub">
|
||||
<a href="https://github.com/{{ . }}" title="@{{ . }} on GitHub" target="_blank" class="toggle-button icon icon-github"></a>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ with .Site.Params.Social.gitter }}
|
||||
<div class="button button-github" role="button" aria-label="Gitter">
|
||||
<a href="https://gitter.im/{{ . }}" title="@{{ . }} on Gitter" target="_blank" class="toggle-button icon fab fa-gitter"></a>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ with .Site.Params.Social.docker }}
|
||||
<div class="button button-github" role="button" aria-label="Docker">
|
||||
<a href="https://hub.docker.com/u/{{ . }}" title="{{ . }} on Docker Hub" target="_blank" class="toggle-button icon fab fa-docker"></a>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
<!-- TODO: disabled until Hugo supports the generation of a content index natively
|
||||
<div class="button button-search" role="button" aria-label="Search">
|
||||
<label class="toggle-button icon icon-search" title="Search" for="toggle-search"></label>
|
||||
</div>
|
||||
-->
|
||||
</div>
|
||||
<div class="bar search">
|
||||
<div class="button button-close" role="button" aria-label="Close">
|
||||
<label class="toggle-button icon icon-back" for="toggle-search"></label>
|
||||
</div>
|
||||
<div class="stretch">
|
||||
<div class="field">
|
||||
<input class="query" type="text" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck>
|
||||
</div>
|
||||
</div>
|
||||
<div class="button button-reset" role="button" aria-label="Search">
|
||||
<button class="toggle-button icon icon-close" id="reset-search"></button>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -1,13 +0,0 @@
|
||||
{{ $currentMenuEntry := .Scratch.Get "currentMenuEntry" }}
|
||||
{{ $isCurrent := eq .Permalink ($currentMenuEntry.URL | absURL | printf "%s") }}
|
||||
|
||||
|
||||
<a {{ if $isCurrent }}class="current"{{ end }} title="{{ $currentMenuEntry.Name }}" href="{{ $currentMenuEntry.URL }}">
|
||||
{{ $currentMenuEntry.Pre }}
|
||||
{{ $currentMenuEntry.Name }}
|
||||
</a>
|
||||
|
||||
{{ if $isCurrent }}
|
||||
<ul id="scrollspy">
|
||||
</ul>
|
||||
{{ end }}
|
||||
149
site/pom.xml
@@ -1,149 +0,0 @@
|
||||
<!--
|
||||
|
||||
Copyright (c) 2023 Bosch.IO GmbH and others
|
||||
|
||||
This program and the accompanying materials are made
|
||||
available under the terms of the Eclipse Public License 2.0
|
||||
which is available at https://www.eclipse.org/legal/epl-2.0/
|
||||
|
||||
SPDX-License-Identifier: EPL-2.0
|
||||
|
||||
-->
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.eclipse.hawkbit</groupId>
|
||||
<artifactId>hawkbit-parent</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>site</artifactId>
|
||||
<name>hawkBit :: Documentation</name>
|
||||
<description>Documentation for hawkBit</description>
|
||||
|
||||
<properties>
|
||||
<exec-maven-plugin.version>1.6.0</exec-maven-plugin.version>
|
||||
</properties>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>unix</id>
|
||||
<activation>
|
||||
<os>
|
||||
<family>!windows</family>
|
||||
</os>
|
||||
</activation>
|
||||
<properties>
|
||||
<shell>/bin/bash</shell>
|
||||
<shell.option/>
|
||||
<batch.ext>sh</batch.ext>
|
||||
</properties>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>windows</id>
|
||||
<activation>
|
||||
<os>
|
||||
<family>windows</family>
|
||||
</os>
|
||||
</activation>
|
||||
<properties>
|
||||
<shell>cmd</shell>
|
||||
<shell.option>/c</shell.option>
|
||||
<batch.ext>bat</batch.ext>
|
||||
</properties>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>exec-maven-plugin</artifactId>
|
||||
<version>${exec-maven-plugin.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>build-htmls</id>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
<phase>install</phase>
|
||||
<configuration>
|
||||
<executable>${shell}</executable>
|
||||
<workingDirectory>${project.basedir}</workingDirectory>
|
||||
<arguments>
|
||||
<argument>${shell.option}</argument>
|
||||
<argument>build-htmls.${batch.ext}</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>install-hugo-theme</id>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
<phase>install</phase>
|
||||
<configuration>
|
||||
<executable>${shell}</executable>
|
||||
<workingDirectory>${project.basedir}</workingDirectory>
|
||||
<arguments>
|
||||
<argument>${shell.option}</argument>
|
||||
<argument>install-theme.${batch.ext}</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>serve</id>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
<phase>site</phase>
|
||||
<configuration>
|
||||
<executable>hugo</executable>
|
||||
<workingDirectory>${project.basedir}</workingDirectory>
|
||||
<arguments>
|
||||
<argument>server</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>cleanup</id>
|
||||
<goals>
|
||||
<goal>exec</goal>
|
||||
</goals>
|
||||
<phase>clean</phase>
|
||||
<configuration>
|
||||
<executable>${shell}</executable>
|
||||
<workingDirectory>${project.basedir}</workingDirectory>
|
||||
<arguments>
|
||||
<argument>${shell.option}</argument>
|
||||
<argument>cleanup.${batch.ext}</argument>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.hawkbit</groupId>
|
||||
<artifactId>hawkbit-ddi-starter</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.hawkbit</groupId>
|
||||
<artifactId>hawkbit-mgmt-starter</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Test -->
|
||||
<dependency>
|
||||
<groupId>org.eclipse.hawkbit</groupId>
|
||||
<artifactId>hawkbit-repository-test</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -1,34 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) 2023 Bosch.IO GmbH and others
|
||||
*
|
||||
* This program and the accompanying materials are made
|
||||
* available under the terms of the Eclipse Public License 2.0
|
||||
* which is available at https://www.eclipse.org/legal/epl-2.0/
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.eclipse.hawkbit.doc;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
/**
|
||||
* A {@link SpringBootApplication} annotated class with a main method to start.
|
||||
* The minimal configuration for the stand alone hawkBit server.
|
||||
*/
|
||||
@SpringBootApplication
|
||||
// Exception squid:S1118 - Spring boot standard behavior
|
||||
@SuppressWarnings({ "squid:S1118" })
|
||||
public class Start {
|
||||
|
||||
/**
|
||||
* Main method to start the spring-boot application.
|
||||
*
|
||||
* @param args the VM arguments.
|
||||
*/
|
||||
// Exception squid:S2095 - Spring boot standard behavior
|
||||
@SuppressWarnings({ "squid:S2095" })
|
||||
public static void main(final String[] args) {
|
||||
SpringApplication.run(Start.class, args);
|
||||
}
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2023 Bosch.IO GmbH and others
|
||||
#
|
||||
# This program and the accompanying materials are made
|
||||
# available under the terms of the Eclipse Public License 2.0
|
||||
# which is available at https://www.eclipse.org/legal/epl-2.0/
|
||||
#
|
||||
# SPDX-License-Identifier: EPL-2.0
|
||||
#
|
||||
|
||||
# Spring configuration
|
||||
spring.main.allow-bean-definition-overriding=true
|
||||
|
||||
# User Security
|
||||
spring.security.user.name=admin
|
||||
spring.security.user.password={noop}admin
|
||||
|
||||
# Http Encoding
|
||||
server.servlet.encoding.charset=UTF-8
|
||||
server.servlet.encoding.enabled=true
|
||||
server.servlet.encoding.force=true
|
||||
|
||||
# DDI authentication configuration
|
||||
hawkbit.server.ddi.security.authentication.targettoken.enabled=false
|
||||
hawkbit.server.ddi.security.authentication.gatewaytoken.enabled=false
|
||||
|
||||
# Optional events
|
||||
hawkbit.server.repository.publish-target-poll-event=false
|
||||
|
||||
# Swagger Configuration
|
||||
springdoc.api-docs.version=openapi_3_0
|
||||
springdoc.show-oauth2-endpoints=true
|
||||
springdoc.show-login-endpoint=true
|
||||
springdoc.packages-to-scan=org.eclipse.hawkbit.mgmt,org.eclipse.hawkbit.ddi
|
||||
springdoc.paths-to-exclude=/system/**
|
||||
@@ -1,14 +0,0 @@
|
||||
______ _ _ _ _ ____ _ _
|
||||
| ____| | (_) | | | | | _ \(_) |
|
||||
| |__ ___| |_ _ __ ___ ___ | |__ __ ___ _| | _| |_) |_| |_
|
||||
| __| / __| | | '_ \/ __|/ _ \ | '_ \ / _` \ \ /\ / / |/ / _ <| | __|
|
||||
| |___| (__| | | |_) \__ \ __/ | | | | (_| |\ V V /| <| |_) | | |_
|
||||
|______\___|_|_| .__/|___/\___| |_| |_|\__,_| \_/\_/ |_|\_\____/|_|\__|
|
||||
| |
|
||||
|_|
|
||||
|
||||
Eclipse hawkBit Update Server ${application.formatted-version}
|
||||
using Spring Boot ${spring-boot.formatted-version}
|
||||
|
||||
Go to https://www.eclipse.org/hawkbit for more information.
|
||||
|
||||
@@ -1,157 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) 2023 Bosch.IO GmbH and others
|
||||
*
|
||||
* This program and the accompanying materials are made
|
||||
* available under the terms of the Eclipse Public License 2.0
|
||||
* which is available at https://www.eclipse.org/legal/epl-2.0/
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
|
||||
package org.eclipse.hawkbit.doc;
|
||||
|
||||
import com.fasterxml.jackson.databind.node.ArrayNode;
|
||||
import com.fasterxml.jackson.dataformat.yaml.YAMLMapper;
|
||||
import org.eclipse.hawkbit.repository.test.util.SharedSqlTestDatabaseExtension;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.boot.test.web.client.TestRestTemplate;
|
||||
import org.springframework.boot.test.web.server.LocalServerPort;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
|
||||
@ExtendWith({ SharedSqlTestDatabaseExtension.class })
|
||||
class RestApiDocTest {
|
||||
|
||||
private static final String MANAGEMENT_PREFIX = "mgmt";
|
||||
private static final String DDI_PREFIX = "ddi";
|
||||
private static final String TARGET_DIRECTORY = "content/rest-api/";
|
||||
|
||||
private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper();
|
||||
|
||||
@LocalServerPort
|
||||
private int port;
|
||||
|
||||
@Autowired
|
||||
private TestRestTemplate restTemplate;
|
||||
|
||||
@Test
|
||||
void openapiJson() throws IOException {
|
||||
final ResponseEntity<String> response =
|
||||
restTemplate.getForEntity("http://localhost:" + port + "/v3/api-docs", String.class);
|
||||
final String openapiDoc = response.getBody();
|
||||
assertThat(openapiDoc).isNotNull();
|
||||
splitDocumentation(openapiDoc);
|
||||
}
|
||||
|
||||
private static void splitDocumentation(final String json) throws IOException {
|
||||
processDocumentation(json, true);
|
||||
processDocumentation(json, false);
|
||||
}
|
||||
|
||||
private static void processDocumentation(final String json, final boolean isMgmt) throws IOException {
|
||||
final JsonNode rootNode = OBJECT_MAPPER.readTree(json);
|
||||
updateJsonNodeForApi(rootNode, isMgmt);
|
||||
saveDocumentation(rootNode, isMgmt);
|
||||
}
|
||||
|
||||
private static void updateJsonNodeForApi(final JsonNode rootNode, final boolean isMgmt) {
|
||||
removeTags(rootNode, isMgmt);
|
||||
removePaths(rootNode, isMgmt);
|
||||
removeComponents(rootNode, isMgmt);
|
||||
}
|
||||
|
||||
private static void removeTags(final JsonNode rootNode, final boolean isMgmt) {
|
||||
final ArrayNode tagsNode = (ArrayNode) rootNode.get("tags");
|
||||
final ArrayNode modifiedTagsNode = OBJECT_MAPPER.createArrayNode();
|
||||
|
||||
for (final JsonNode tagNode : tagsNode) {
|
||||
String tagName = tagNode.get("name").asText();
|
||||
if (isMgmt != tagName.startsWith("DDI")) {
|
||||
modifiedTagsNode.add(tagNode);
|
||||
}
|
||||
}
|
||||
|
||||
((ObjectNode) rootNode).set("tags", modifiedTagsNode);
|
||||
}
|
||||
|
||||
private static void removePaths(final JsonNode rootNode, final boolean isMgmt) {
|
||||
final ObjectNode pathsNode = (ObjectNode) rootNode.get("paths");
|
||||
final List<String> fieldsToRemove = new ArrayList<>();
|
||||
pathsNode.fieldNames().forEachRemaining(fieldName -> {
|
||||
final JsonNode pathNode = pathsNode.get(fieldName);
|
||||
pathNode.fieldNames().forEachRemaining(path -> {
|
||||
final JsonNode methodNode = pathNode.get(path);
|
||||
final JsonNode tagsNode = methodNode.get("tags");
|
||||
if (tagsNode != null) {
|
||||
for (JsonNode tagNode : tagsNode) {
|
||||
final String tag = tagNode.asText();
|
||||
if (isMgmt == tag.startsWith("DDI")) {
|
||||
fieldsToRemove.add(fieldName);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
fieldsToRemove.forEach(pathsNode::remove);
|
||||
}
|
||||
|
||||
private static void removeComponents(final JsonNode rootNode, final boolean isMgmt) {
|
||||
final ObjectNode schemasNode = (ObjectNode) rootNode.get("components").get("schemas");
|
||||
|
||||
List<String> fieldsToRemove = new ArrayList<>();
|
||||
schemasNode.fieldNames().forEachRemaining(fieldName -> {
|
||||
if (shouldDeleteComponent(fieldName, isMgmt)) {
|
||||
fieldsToRemove.add(fieldName);
|
||||
}
|
||||
});
|
||||
fieldsToRemove.forEach(schemasNode::remove);
|
||||
}
|
||||
|
||||
private static boolean shouldDeleteComponent(final String fieldName, final boolean isMgmt) {
|
||||
if (isMgmt) {
|
||||
return fieldName.startsWith("Ddi");
|
||||
}
|
||||
return !(fieldName.startsWith("Ddi") || fieldName.equals("Link") || fieldName.equals("Links") || fieldName.equals("ExceptionInfo"));
|
||||
|
||||
}
|
||||
|
||||
private static void saveDocumentation(final JsonNode rootNode, final boolean isMgmt) throws IOException {
|
||||
final String prefix = isMgmt ? MANAGEMENT_PREFIX : DDI_PREFIX;
|
||||
saveAsJson(rootNode, prefix);
|
||||
saveAsYaml(rootNode, prefix);
|
||||
}
|
||||
|
||||
private static void saveAsJson(final JsonNode rootNode, final String prefix) throws IOException {
|
||||
final Path targetPath = getTargetPath(prefix, ".json");
|
||||
Files.writeString(targetPath, OBJECT_MAPPER.writerWithDefaultPrettyPrinter().writeValueAsString(rootNode));
|
||||
}
|
||||
|
||||
private static void saveAsYaml(final JsonNode rootNode, final String prefix) throws IOException {
|
||||
final YAMLMapper yamlMapper = new YAMLMapper();
|
||||
final Path targetPath = getTargetPath(prefix, ".yaml");
|
||||
Files.writeString(targetPath, yamlMapper.writeValueAsString(rootNode));
|
||||
}
|
||||
|
||||
private static Path getTargetPath(final String prefix, final String extension) throws IOException {
|
||||
final Path targetPath = Paths.get(TARGET_DIRECTORY + prefix + extension);
|
||||
Files.createDirectories(targetPath.getParent());
|
||||
return targetPath;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
|
||||
.copyright {
|
||||
margin-top: 5em;
|
||||
margin-bottom: 1em;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.copyright a {
|
||||
border-bottom-style: none;
|
||||
}
|
||||
|
||||
.copyright p {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.copyright p.notice {
|
||||
margin-top: 27px;
|
||||
}
|
||||
|
||||
.copyright div.logo {
|
||||
float: right;
|
||||
width: 20%;
|
||||
padding-bottom: 2%;
|
||||
}
|
||||
|
||||
.copyright .quickLinks a {
|
||||
float: left;
|
||||
padding-right: 2em;
|
||||
}
|
||||
|
||||
.jumbotron {
|
||||
padding-bottom: 1em;
|
||||
padding-top: 2em;
|
||||
text-align: center;
|
||||
font-size: xx-large;
|
||||
color: #734dba;
|
||||
}
|
||||
|
||||
.banner div.drawerlogo {
|
||||
background: white;
|
||||
border-radius: 100%;
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
transition: box-shadow .4s;
|
||||
}
|
||||
|
||||
.banner div.drawerlogo:hover {
|
||||
box-shadow: 0 4px 7px rgba(0, 0, 0, .23), 0 8px 25px rgba(0, 0, 0, .05);
|
||||
}
|
||||
|
||||
.banner .drawerlogo img {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
padding: 15%;
|
||||
position: relative;
|
||||
top: -3px
|
||||
}
|
||||
|
Before Width: | Height: | Size: 404 KiB |
|
Before Width: | Height: | Size: 44 KiB |
|
Before Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 206 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 118 KiB |
|
Before Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 8.6 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 916 KiB |
@@ -1,286 +0,0 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<title>Eclipse hawkBit</title>
|
||||
|
||||
<meta content="Eclipse hawkBit - Community Day 2018" name="description">
|
||||
|
||||
<meta content="yes" name="apple-mobile-web-app-capable"/>
|
||||
<meta content="black-translucent" name="apple-mobile-web-app-status-bar-style"/>
|
||||
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui"
|
||||
name="viewport">
|
||||
|
||||
<link href="css/reveal.css" rel="stylesheet">
|
||||
<link href="css/theme/hawkBit.css" id="theme" rel="stylesheet">
|
||||
<link crossorigin="anonymous" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css"
|
||||
integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU"
|
||||
rel="stylesheet">
|
||||
|
||||
<body>
|
||||
<div class="reveal">
|
||||
<div class="header">
|
||||
<img align="right" src="resources/images/hawkbit_logo.png" width="120px"/>
|
||||
</div>
|
||||
<div class="slides">
|
||||
<section>
|
||||
<div class="intro">
|
||||
<h1>Community Day - Eclipse hawkBit</h1>
|
||||
<h6>EclipseCon Europe 2018</h6>
|
||||
</div>
|
||||
</section>
|
||||
<section>
|
||||
<h1>Welcome...</h1>
|
||||
<div style="font-size: 1.5em; position:absolute; left:2em; width: 100%;">
|
||||
<div style="display: inline-block;">
|
||||
<a href="https://github.com/laverman"><img
|
||||
align="left"
|
||||
src="https://avatars3.githubusercontent.com/u/9153035?s=120&v=4"
|
||||
style="border-radius: 50%;"></a>
|
||||
<p style="margin-left: 5em; margin-top: 0.5em;">Kai Zimmermann</p>
|
||||
<i style="margin-left: 4em; margin-top: 0.5em; font-size: 0.5em;">Project Lead - Microsoft</i>
|
||||
</div>
|
||||
<br>
|
||||
<div style="display: inline-block;">
|
||||
<a href="https://github.com/schabdo"><img
|
||||
align="left"
|
||||
src="https://avatars1.githubusercontent.com/u/18215905?s=120&v=4"
|
||||
style="border-radius: 50%;"></a>
|
||||
<p style="margin-left: 5em; margin-top: 0.5em;">Dominic Schabel</p>
|
||||
<i style="margin-left: 4em; margin-top: 0.5em; font-size: 0.5em;">Committer - Bosch</i>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section>
|
||||
<h1>About</h1>
|
||||
<p>
|
||||
Eclipse hawkBit aims to create a <b>domain independent</b> back end solution for rolling out <b>software
|
||||
updates</b>
|
||||
to constrained edge devices as well as more powerful controllers and gateways connected to IP based
|
||||
networking infrastructure
|
||||
</p>
|
||||
</section>
|
||||
<section>
|
||||
<h1>Big picture</h1>
|
||||
<img src="resources/images/hawkBit_overview.jpg">
|
||||
</section>
|
||||
<section>
|
||||
<h1>Project update...</h1>
|
||||
</section>
|
||||
<section>
|
||||
<h1>New team members</h1>
|
||||
<div style="font-size: 1.5em; position:absolute; left:2em; width: 100%;">
|
||||
<div style="display: inline-block;">
|
||||
<a href="https://github.com/laverman"><img
|
||||
align="left"
|
||||
src="https://avatars3.githubusercontent.com/u/19288577?s=120&v=4"
|
||||
style="border-radius: 50%;"></a>
|
||||
<p style="margin-left: 5em; margin-top: 0.5em;">Jeroen Laverman</p>
|
||||
<i style="margin-left: 4em; margin-top: 0.5em; font-size: 0.5em;">Project Lead - Bosch</i>
|
||||
</div>
|
||||
<br>
|
||||
<div style="display: inline-block;">
|
||||
<a href="https://github.com/stefbehl"><img
|
||||
align="left"
|
||||
src="https://avatars2.githubusercontent.com/u/16321153?s=120&v=4"
|
||||
style="border-radius: 50%;"></a>
|
||||
<p style="margin-left: 5em; margin-top: 0.5em;">Stefan Behl</p>
|
||||
<i style="margin-left: 4em; margin-top: 0.5em; font-size: 0.5em;">Committer - Bosch</i>
|
||||
</div>
|
||||
<br>
|
||||
<div style="display: inline-block;">
|
||||
<a href="https://github.com/schabdo"><img
|
||||
align="left"
|
||||
src="https://avatars1.githubusercontent.com/u/18215905?s=120&v=4"
|
||||
style="border-radius: 50%;"></a>
|
||||
<p style="margin-left: 5em; margin-top: 0.5em;">Dominic Schabel</p>
|
||||
<i style="margin-left: 4em; margin-top: 0.5em; font-size: 0.5em;">Committer - Bosch</i>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section>
|
||||
<h1>Statistics (10/2018)</h1>
|
||||
<ul style="position:absolute; left:2em;">
|
||||
<li style="margin-bottom: 0.5em"><a href="https://github.com/eclipse-hawkbit/hawkbit">hawkbit Core</a>:
|
||||
149
|
||||
stars, 622 PRs, 134 issues
|
||||
</li>
|
||||
<li style="margin-bottom: 0.5em"><a href="https://github.com/eclipse-hawkbit/hawkbit-extensions">hawkbit
|
||||
Extensions</a>: 30 PRs
|
||||
</li>
|
||||
<li style="margin-bottom: 0.5em"><a href="https://github.com/eclipse-hawkbit/hawkbit-examples">hawkbit
|
||||
Examples</a>: 25 PRs
|
||||
</li>
|
||||
<li style="margin-bottom: 0.5em"><a href="https://hub.docker.com/u/hawkbit/">Docker Hub</a>: 3.4K
|
||||
PULLS
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section>
|
||||
<h1>We have been busy</h1>
|
||||
<ul style="position:absolute; left:2em;">
|
||||
<li style="margin-bottom: 0.5em"><a
|
||||
href="https://search.maven.org/search?q=g:org.eclipse.hawkbit%20AND%20v:0.2.0">First
|
||||
Release<a></li>
|
||||
<li style="margin-bottom: 0.5em"><a href="https://hawkbit.eclipseprojects.io">New sandbox</a></li>
|
||||
<li style="margin-bottom: 0.5em"><a href="https://www.eclipse.org/hawkbit">New homepage</a></li>
|
||||
<li style="margin-bottom: 0.5em">Circle CI 2.0 (incl. <a
|
||||
href="https://github.com/eclipse-hawkbit/hawkbit-examples">examples</a>
|
||||
& <a href="https://github.com/eclipse-hawkbit/hawkbit-extensions">extensions</a>)
|
||||
</li>
|
||||
<li style="margin-bottom: 0.5em"><a href="https://hub.docker.com/u/hawkbit">Docker Hub setup</a></li>
|
||||
<li style="margin-bottom: 0.5em"><a href="https://github.com/eclipse-hawkbit/hawkbit/pull/688">Open
|
||||
sourced
|
||||
REST docs</a></li>
|
||||
</ul>
|
||||
</section>
|
||||
<section>
|
||||
<h1>Roadmap...</h1>
|
||||
</section>
|
||||
<section>
|
||||
<h1>Upgrades, upgrades</h1>
|
||||
<ul style="position:absolute; left:2em;">
|
||||
<li style="margin-bottom: 0.5em">Support JDK 11</li>
|
||||
<li style="margin-bottom: 0.5em">Vaadin 8</li>
|
||||
<li style="margin-bottom: 0.5em">JUnit 5, Java >= 9</li>
|
||||
<li style="margin-bottom: 0.5em"><a href="https://github.com/eclipse-hawkbit/hawkbit/pull/721">Spring
|
||||
Boot
|
||||
2</a></li>
|
||||
</ul>
|
||||
</section>
|
||||
<section>
|
||||
<h1>Version overview</h1>
|
||||
<div style="display: grid; grid-template-columns: 8em 5em 8em; grid-template-rows: 1.5em auto 1.5em;
|
||||
grid-gap: 15px 0px; font-size: 1.5em; margin-left: 1.0em; margin-top: 1em;">
|
||||
|
||||
<div style="place-self: center; font-weight:bold;">hawkBit</div>
|
||||
<div> </div>
|
||||
<div style="place-self: center; font-weight:bold;">Spring Boot</div>
|
||||
<div style="place-self: center;">0.2.x</div>
|
||||
<div style="place-self: center;"><i class="fas fa-long-arrow-alt-right"></i></div>
|
||||
<div style="place-self: center;">1.4</div>
|
||||
<div style="place-self: center;">0.3.0</div>
|
||||
<div style="place-self: center;"><i class="fas fa-long-arrow-alt-right"></i></div>
|
||||
<div style="place-self: center;">2.0</div>
|
||||
</div>
|
||||
</section>
|
||||
<section>
|
||||
<h1>A few features as well</h1>
|
||||
<ul style="position:absolute; left:2em;">
|
||||
<li style="margin-bottom: 0.5em">Custom key/value pairs for targets (<a
|
||||
href="https://github.com/eclipse-hawkbit/hawkbit/issues/737">#737</a>)
|
||||
</li>
|
||||
<li style="margin-bottom: 0.5em">Small improvements of rollout management</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section>
|
||||
<h1>Cloud PaaS extensions...</h1>
|
||||
<ul style="position:absolute; left:2em;">
|
||||
<li style="margin-bottom: 0.5em">Inner cluster messaging (<a
|
||||
href="https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-about">Azure
|
||||
Event Hubs</a>)
|
||||
</li>
|
||||
<li style="margin-bottom: 0.5em">Multi-user support and role based access with OAuth2 (<a
|
||||
href="https://docs.microsoft.com/en-us/azure/active-directory/fundamentals/active-directory-whatis">Azure
|
||||
Active Directory</a>)
|
||||
</li>
|
||||
<li style="margin-bottom: 0.5em">More storage providers (e.g. <a
|
||||
href="https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blobs-introduction">Azure
|
||||
Blob Storage</a>)
|
||||
</li>
|
||||
<li style="margin-bottom: 0.5em">Example k8s deployments (potentially <a
|
||||
href="https://github.com/helm/helm">helm</a>
|
||||
templates)
|
||||
</li>
|
||||
<li style="margin-bottom: 0.5em">IoT platform integration (e.g. <a
|
||||
href="https://docs.microsoft.com/en-us/azure/iot-hub/about-iot-hub">Azure
|
||||
IoT Hub</a>)
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section>
|
||||
<h1>Deprecations</h1>
|
||||
<div style="position:absolute; left:2em;">We'll drop UAA extension support</div>
|
||||
</section>
|
||||
<section>
|
||||
<h1>Thank you</h1>
|
||||
<div style="font-size: 1.5em; position:absolute; left:2em;">
|
||||
<p><i class="fa fa-bullhorn fa-fw"></i> <a
|
||||
href="https://www.eclipsecon.org/europe2018/sessions/eclipse-hawkbit-101">101
|
||||
tutorial</a></p>
|
||||
<p><i class="fab fa-docker fa-fw"></i> <a href="https://hub.docker.com/u/hawkbit">hawkbit</a></p>
|
||||
<p><i class="fab fa-gitter fa-fw"></i> <a
|
||||
href="https://gitter.im/eclipse/hawkbit">eclipse/hawkbit</a></p>
|
||||
<p><i class="fab fa-github fa-fw"></i> <a href="https://github.com/eclipse-hawkbit/hawkbit">eclipse/hawkbit</a>
|
||||
</p>
|
||||
<p><i class="fa fa-book-open fa-fw"></i> <a href="http://www.eclipse.org/hawkbit">eclipse.org/hawkbit</a>
|
||||
</p>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<a href="http://www.eclipse.org" target="_blank">Eclipse Foundation</a> |
|
||||
<a href="http://www.eclipse.org/legal/privacy.php" target="_blank">Privacy Policy</a> |
|
||||
<a href="http://www.eclipse.org/legal/termsofuse.php" target="_blank">Terms of Use</a> |
|
||||
<a href="http://www.eclipse.org/legal/copyright.php" target="_blank">Copyright Agent</a> |
|
||||
<a href="http://www.eclipse.org/legal" target="_blank">Legal</a>
|
||||
</div>
|
||||
<script src="lib/js/head.min.js"></script>
|
||||
<script src="js/reveal.js"></script>
|
||||
|
||||
<script>
|
||||
// Full list of configuration options available at:
|
||||
// https://github.com/hakimel/reveal.js#configuration
|
||||
Reveal.initialize({
|
||||
controls: false,
|
||||
progress: true,
|
||||
history: true,
|
||||
center: true,
|
||||
|
||||
transition: 'convex', // none/fade/slide/convex/concave/zoom
|
||||
|
||||
// Optional reveal.js plugins
|
||||
dependencies: [{
|
||||
src: 'lib/js/classList.js',
|
||||
condition: function () {
|
||||
return !document.body.classList;
|
||||
}
|
||||
}, {
|
||||
src: 'plugin/markdown/marked.js',
|
||||
condition: function () {
|
||||
return !!document.querySelector('[data-markdown]');
|
||||
}
|
||||
}, {
|
||||
src: 'plugin/markdown/markdown.js',
|
||||
condition: function () {
|
||||
return !!document.querySelector('[data-markdown]');
|
||||
}
|
||||
}, {
|
||||
src: 'plugin/highlight/highlight.js',
|
||||
async: true,
|
||||
condition: function () {
|
||||
return !!document.querySelector('pre code');
|
||||
},
|
||||
callback: function () {
|
||||
hljs.initHighlightingOnLoad();
|
||||
}
|
||||
}, {
|
||||
src: 'plugin/zoom-js/zoom.js',
|
||||
async: true
|
||||
}, {
|
||||
src: 'plugin/notes/notes.js',
|
||||
async: true
|
||||
}]
|
||||
});
|
||||
|
||||
Reveal.configure({
|
||||
slideNumber: true
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -1,259 +0,0 @@
|
||||
<!--
|
||||
~ Copyright (c) 2019 Bosch Software Innovations GmbH and others
|
||||
~
|
||||
~ This program and the accompanying materials are made
|
||||
~ available under the terms of the Eclipse Public License 2.0
|
||||
~ which is available at https://www.eclipse.org/legal/epl-2.0/
|
||||
~
|
||||
~ SPDX-License-Identifier: EPL-2.0
|
||||
-->
|
||||
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<title>Eclipse hawkBit</title>
|
||||
|
||||
<meta content="Eclipse hawkBit - Community Day 2018" name="description">
|
||||
|
||||
<meta content="yes" name="apple-mobile-web-app-capable"/>
|
||||
<meta content="black-translucent" name="apple-mobile-web-app-status-bar-style"/>
|
||||
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui"
|
||||
name="viewport">
|
||||
|
||||
<link href="css/reveal.css" rel="stylesheet">
|
||||
<link href="css/theme/hawkBit.css" id="theme" rel="stylesheet">
|
||||
<link crossorigin="anonymous" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css"
|
||||
integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" rel="stylesheet">
|
||||
|
||||
<body>
|
||||
<div class="reveal">
|
||||
<div class="header">
|
||||
<img align="right" src="resources/images/hawkbit_logo.png" width="120px"/>
|
||||
</div>
|
||||
<div class="slides">
|
||||
<section>
|
||||
<div class="intro">
|
||||
<h1>Community Day - Eclipse hawkBit</h1>
|
||||
<h6>EclipseCon Europe 2019</h6>
|
||||
</div>
|
||||
</section>
|
||||
<section>
|
||||
<h1>Welcome...</h1>
|
||||
<div style="font-size: 1.5em; position:absolute; left:2em; width: 100%;">
|
||||
<div style="display: inline-block;">
|
||||
<a href="https://github.com/laverman"><img
|
||||
align="left"
|
||||
src="https://avatars3.githubusercontent.com/u/9153035?s=120&v=4"
|
||||
style="border-radius: 50%;"></a>
|
||||
<p style="margin-left: 5em; margin-top: 0.5em;">Kai Zimmermann</p>
|
||||
<i style="margin-left: 4em; margin-top: 0.5em; font-size: 0.5em;">Project Lead - Microsoft</i>
|
||||
</div>
|
||||
<br>
|
||||
<div style="display: inline-block;">
|
||||
<a href="https://github.com/laverman"><img
|
||||
align="left"
|
||||
src="https://avatars3.githubusercontent.com/u/19288577?s=120&v=4"
|
||||
style="border-radius: 50%;"></a>
|
||||
<p style="margin-left: 5em; margin-top: 0.5em;">Jeroen Laverman</p>
|
||||
<i style="margin-left: 4em; margin-top: 0.5em; font-size: 0.5em;">Project Lead - Bosch</i>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section>
|
||||
<h1>About</h1>
|
||||
<p>
|
||||
Eclipse hawkBit aims to create a <b>domain independent</b> back end solution for rolling out
|
||||
<b>software
|
||||
updates</b>
|
||||
to constrained edge devices as well as more powerful controllers and gateways connected to IP based
|
||||
networking infrastructure
|
||||
</p>
|
||||
</section>
|
||||
<section>
|
||||
<h1>Big picture</h1>
|
||||
<img src="resources/images/hawkBit_overview.jpg">
|
||||
</section>
|
||||
<section>
|
||||
<h1>Project update...</h1>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h1>Statistics (10/2019)</h1>
|
||||
<ul style="position:absolute; left:2em;">
|
||||
<li style="margin-bottom: 0.5em"><a href="https://github.com/eclipse-hawkbit/hawkbit">hawkbit Core</a>:
|
||||
207
|
||||
(+58)
|
||||
stars, 717 (+95) PRs, 172 (+35) issues
|
||||
</li>
|
||||
<li style="margin-bottom: 0.5em"><a href="https://github.com/eclipse-hawkbit/hawkbit-extensions">hawkbit
|
||||
Extensions</a>: 41 (+11) PRs
|
||||
</li>
|
||||
<li style="margin-bottom: 0.5em"><a href="https://github.com/eclipse-hawkbit/hawkbit-examples">hawkbit
|
||||
Examples</a>: 35 (+10) PRs
|
||||
</li>
|
||||
<li style="margin-bottom: 0.5em"><a href="https://hub.docker.com/u/hawkbit/">Docker Hub</a>: 50K+
|
||||
(+47K)
|
||||
PULLS
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section>
|
||||
<h1>We have been busy</h1>
|
||||
<ul style="position:absolute; left:2em;">
|
||||
<li style="margin-bottom: 0.5em">Add Multi-User support (<a
|
||||
href="https://github.com/eclipse-hawkbit/hawkbit/pull/829">#829</a>)
|
||||
</li>
|
||||
<li style="margin-bottom: 0.5em">Introduce Multi-Assignments (<a
|
||||
href="https://github.com/eclipse-hawkbit/hawkbit/pull/833">#833</a>)
|
||||
</li>
|
||||
<li style="margin-bottom: 0.5em">Introduce new action-type DOWNLOAD_ONLY (<a
|
||||
href="https://github.com/eclipse-hawkbit/hawkbit/pull/810">#810</a>)
|
||||
</li>
|
||||
<li style="margin-bottom: 0.5em">Execute Auto-Assignments with different action-types (<a
|
||||
href="https://github.com/eclipse-hawkbit/hawkbit/pull/789">#789</a>)
|
||||
</li>
|
||||
<li style="margin-bottom: 0.5em">Introduce THING_REMOVED message on DMF-API (<a
|
||||
href="https://github.com/eclipse-hawkbit/hawkbit/pull/891">#891</a>)
|
||||
</li>
|
||||
<li style="margin-bottom: 0.5em">DDI-API supports SHA256 signature for artifacts (<a
|
||||
href="https://github.com/eclipse-hawkbit/hawkbit/pull/869">#869</a>)
|
||||
</li>
|
||||
<li style="margin-bottom: 0.5em">... and <a
|
||||
href="https://github.com/eclipse-hawkbit/hawkbit/pulls?utf8=✓&q=created%3A%3E%3D2018-10-25">many
|
||||
smaller enhancements and bug fixes </a></li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h1>Cloud support updates...</h1>
|
||||
<ul style="position:absolute; left:2em;">
|
||||
<li style="margin-bottom: 0.5em">Azure: inner cluster messaging (<a
|
||||
href="https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-about">with Event
|
||||
Hubs</a>)
|
||||
</li>
|
||||
<li style="margin-bottom: 0.5em">Azure: deployment guidance and <a
|
||||
href="https://github.com/helm/helm">k8s helm</a>
|
||||
as well as <a
|
||||
href="https://docs.microsoft.com/en-us/azure/azure-resource-manager/template-deployment-overview">Azure
|
||||
Resource Manager</a> templates
|
||||
</li>
|
||||
<li style="margin-bottom: 0.5em">More storage providers: <a
|
||||
href="https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blobs-introduction">Azure
|
||||
Blob Storage</a>, <a href="https://cloud.google.com/storage/docs/">Google Cloud Storage</a>
|
||||
</li>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h1>Roadmap...</h1>
|
||||
</section>
|
||||
<section>
|
||||
<h1>Outlook</h1>
|
||||
<ul style="position:absolute; left:2em;">
|
||||
<li style="margin-bottom: 0.5em">Vaadin 8 (<a
|
||||
href="https://github.com/eclipse-hawkbit/hawkbit/issues/880">#880</a>)
|
||||
</li>
|
||||
<li style="margin-bottom: 0.5em">Release 0.3.0 (<a
|
||||
href="https://github.com/eclipse-hawkbit/hawkbit/issues/784">#784</a>)
|
||||
</li>
|
||||
<li style="margin-bottom: 0.5em">Prioritization of updates (<a
|
||||
href="https://github.com/eclipse-hawkbit/hawkbit/issues/863">#863</a>)
|
||||
</li>
|
||||
<li style="margin-bottom: 0.5em">Integration with other device inventories (<a
|
||||
href="https://github.com/eclipse-hawkbit/hawkbit/issues/796">#796</a>)
|
||||
</li>
|
||||
<li style="margin-bottom: 0.5em">Support of new <a
|
||||
href="https://projects.eclipse.org/projects/iot.packages">Eclipse IoT Packages</a> project
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
|
||||
<section>
|
||||
<h1>Thank you</h1>
|
||||
<div style="font-size: 1.5em; position:absolute; left:2em;">
|
||||
<p><i class="fa fa-bullhorn fa-fw"></i> <a
|
||||
href="https://www.eclipsecon.org/europe2019/sessions/eclipse-hawkbit-101">101
|
||||
tutorial</a></p>
|
||||
<p><i class="fa fa-bullhorn fa-fw"></i> <a
|
||||
href="https://www.eclipsecon.org/europe2019/sessions/eclipse-hawkbit-update-factory-how-take-open-platform-production-sponsored-bosch">From
|
||||
Eclipse hawkBit to Update Factory</a></p>
|
||||
<p><i class="fab fa-docker fa-fw"></i> <a href="https://hub.docker.com/u/hawkbit">hawkbit</a>
|
||||
</p>
|
||||
<p><i class="fab fa-gitter fa-fw"></i> <a
|
||||
href="https://gitter.im/eclipse/hawkbit">eclipse/hawkbit</a></p>
|
||||
<p><i class="fab fa-github fa-fw"></i> <a
|
||||
href="https://github.com/eclipse-hawkbit/hawkbit">eclipse/hawkbit</a></p>
|
||||
<p><i class="fa fa-book-open fa-fw"></i> <a
|
||||
href="http://www.eclipse.org/hawkbit">eclipse.org/hawkbit</a></p>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<a href="http://www.eclipse.org" target="_blank">Eclipse Foundation</a> |
|
||||
<a href="http://www.eclipse.org/legal/privacy.php" target="_blank">Privacy Policy</a> |
|
||||
<a href="http://www.eclipse.org/legal/termsofuse.php" target="_blank">Terms of Use</a> |
|
||||
<a href="http://www.eclipse.org/legal/copyright.php" target="_blank">Copyright Agent</a> |
|
||||
<a href="http://www.eclipse.org/legal" target="_blank">Legal</a>
|
||||
</div>
|
||||
<script src="lib/js/head.min.js"></script>
|
||||
<script src="js/reveal.js"></script>
|
||||
|
||||
<script>
|
||||
// Full list of configuration options available at:
|
||||
// https://github.com/hakimel/reveal.js#configuration
|
||||
Reveal.initialize({
|
||||
controls: false,
|
||||
progress: true,
|
||||
history: true,
|
||||
center: true,
|
||||
|
||||
transition: 'convex', // none/fade/slide/convex/concave/zoom
|
||||
|
||||
// Optional reveal.js plugins
|
||||
dependencies: [{
|
||||
src: 'lib/js/classList.js',
|
||||
condition: function () {
|
||||
return !document.body.classList;
|
||||
}
|
||||
}, {
|
||||
src: 'plugin/markdown/marked.js',
|
||||
condition: function () {
|
||||
return !!document.querySelector('[data-markdown]');
|
||||
}
|
||||
}, {
|
||||
src: 'plugin/markdown/markdown.js',
|
||||
condition: function () {
|
||||
return !!document.querySelector('[data-markdown]');
|
||||
}
|
||||
}, {
|
||||
src: 'plugin/highlight/highlight.js',
|
||||
async: true,
|
||||
condition: function () {
|
||||
return !!document.querySelector('pre code');
|
||||
},
|
||||
callback: function () {
|
||||
hljs.initHighlightingOnLoad();
|
||||
}
|
||||
}, {
|
||||
src: 'plugin/zoom-js/zoom.js',
|
||||
async: true
|
||||
}, {
|
||||
src: 'plugin/notes/notes.js',
|
||||
async: true
|
||||
}]
|
||||
});
|
||||
|
||||
Reveal.configure({
|
||||
slideNumber: true
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -1,201 +0,0 @@
|
||||
<!--
|
||||
~ Copyright (c) 2020 Bosch.IO GmbH and others
|
||||
~
|
||||
~ This program and the accompanying materials are made
|
||||
~ available under the terms of the Eclipse Public License 2.0
|
||||
~ which is available at https://www.eclipse.org/legal/epl-2.0/
|
||||
~
|
||||
~ SPDX-License-Identifier: EPL-2.0
|
||||
-->
|
||||
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<title>Eclipse hawkBit</title>
|
||||
|
||||
<meta content="Eclipse hawkBit - Community Day 2020" name="description">
|
||||
|
||||
<meta content="yes" name="apple-mobile-web-app-capable"/>
|
||||
<meta content="black-translucent" name="apple-mobile-web-app-status-bar-style"/>
|
||||
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui"
|
||||
name="viewport">
|
||||
|
||||
<link href="css/reveal.css" rel="stylesheet">
|
||||
<link href="css/theme/hawkBit.css" id="theme" rel="stylesheet">
|
||||
<link crossorigin="anonymous" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css"
|
||||
integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" rel="stylesheet">
|
||||
|
||||
<body>
|
||||
<div class="reveal">
|
||||
<div class="header">
|
||||
<img align="right" src="resources/images/hawkbit_logo.png" width="120px"/>
|
||||
</div>
|
||||
<div class="slides">
|
||||
<section>
|
||||
<div class="intro">
|
||||
<h1>Community Day - Eclipse hawkBit</h1>
|
||||
<h6>EclipseCon Europe 2020</h6>
|
||||
</div>
|
||||
</section>
|
||||
<section>
|
||||
<h1>About</h1>
|
||||
<p>
|
||||
Eclipse hawkBit aims to create a <b>domain independent</b> back end solution for rolling out
|
||||
<b>software
|
||||
updates</b>
|
||||
to constrained edge devices as well as more powerful controllers and gateways connected to IP based
|
||||
networking infrastructure
|
||||
</p>
|
||||
</section>
|
||||
<section>
|
||||
<h1>Big picture</h1>
|
||||
<img src="resources/images/hawkBit_overview.jpg">
|
||||
</section>
|
||||
<section>
|
||||
<h1>Statistics (10/2020)</h1>
|
||||
<ul style="position:absolute; left:2em;">
|
||||
<li style="margin-bottom: 0.5em"><a href="https://github.com/eclipse-hawkbit/hawkbit">hawkbit Core</a>:
|
||||
261
|
||||
(+54)
|
||||
stars, 797 (+80) PRs, 185 (+13) issues
|
||||
</li>
|
||||
<li style="margin-bottom: 0.5em"><a href="https://github.com/eclipse-hawkbit/hawkbit-extensions">hawkbit
|
||||
Extensions</a>: 46 (+5) PRs
|
||||
</li>
|
||||
<li style="margin-bottom: 0.5em"><a href="https://github.com/eclipse-hawkbit/hawkbit-examples">hawkbit
|
||||
Examples</a>: 39 (+4) PRs
|
||||
</li>
|
||||
<li style="margin-bottom: 0.5em"><a href="https://hub.docker.com/u/hawkbit/">Docker Hub</a>: 100K+
|
||||
(+50K)
|
||||
PULLS
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section>
|
||||
<h1>We have been busy</h1>
|
||||
<ul style="position:absolute; left:2em;">
|
||||
<li style="margin-bottom: 0.5em">Migrate hawkBit UI to VAADIN 8 (<a
|
||||
href="https://github.com/eclipse-hawkbit/hawkbit/pull/980">#980</a>)
|
||||
</li>
|
||||
<li style="margin-bottom: 0.5em">Support PostgreSQL (<a
|
||||
href="https://github.com/eclipse-hawkbit/hawkbit/pull/932">#932</a>)
|
||||
</li>
|
||||
<li style="margin-bottom: 0.5em">Allowing artifact download from within the UI (<a
|
||||
href="https://github.com/eclipse-hawkbit/hawkbit/pull/944">#944</a>)
|
||||
</li>
|
||||
<li style="margin-bottom: 0.5em">Fix XSS Vulnerability (<a
|
||||
href="https://github.com/eclipse-hawkbit/hawkbit/pull/924">#924</a>)
|
||||
</li>
|
||||
<li style="margin-bottom: 0.5em">Management API supports SHA256 file hashes of artifacts (<a
|
||||
href="https://github.com/eclipse-hawkbit/hawkbit/pull/918">#918</a>)
|
||||
</li>
|
||||
<li style="margin-bottom: 0.5em">Add Stackoverflow tag for hawkBit (<a
|
||||
href="https://github.com/eclipse-hawkbit/hawkbit/issues/923">#923</a>)
|
||||
</li>
|
||||
<li style="margin-bottom: 0.5em">... and <a
|
||||
href="https://github.com/eclipse-hawkbit/hawkbit/pulls?utf8=✓&q=created%3A%3E%3D2019-10-25">many
|
||||
smaller enhancements and bug fixes </a></li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h1>Current challenges and next steps</h1>
|
||||
<ul style="position:absolute; left:2em;">
|
||||
|
||||
<li style="margin-bottom: 0.5em">Release 0.3.0 (<a
|
||||
href="https://github.com/eclipse-hawkbit/hawkbit/issues/784">#784</a>)
|
||||
</li>
|
||||
<li style="margin-bottom: 0.5em">Update from EPL-1.0 to EPL-2.0 (<a
|
||||
href="https://github.com/eclipse-hawkbit/hawkbit/issues/1008">#1008</a>)
|
||||
</li>
|
||||
<li style="margin-bottom: 0.5em">Migrate hawkBit to Spring Boot 2.3.x (<a
|
||||
href="https://github.com/eclipse-hawkbit/hawkbit/issues/999">#999</a>)
|
||||
</li>
|
||||
<li style="margin-bottom: 0.5em">Integration with other device inventories (<a
|
||||
href="https://github.com/eclipse-hawkbit/hawkbit/issues/796">#796</a>)
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
|
||||
<section>
|
||||
<h1>Thank you</h1>
|
||||
<div style="font-size: 1.5em; position:absolute; left:2em;">
|
||||
<p><i class="fab fa-gitter fa-fw"></i> <a
|
||||
href="https://gitter.im/eclipse/hawkbit">eclipse/hawkbit</a></p>
|
||||
<p><i class="fab fa-github fa-fw"></i> <a
|
||||
href="https://github.com/eclipse-hawkbit/hawkbit">eclipse/hawkbit</a></p>
|
||||
<p><i class="fa fa-book-open fa-fw"></i> <a
|
||||
href="http://www.eclipse.org/hawkbit">eclipse.org/hawkbit</a></p>
|
||||
<p><i class="fab fa-stack-overflow fa-fw"></i> <a
|
||||
href="https://stackoverflow.com/questions/tagged/eclipse-hawkbit">eclipse-hawkbit</a></p>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<a href="http://www.eclipse.org" target="_blank">Eclipse Foundation</a> |
|
||||
<a href="http://www.eclipse.org/legal/privacy.php" target="_blank">Privacy Policy</a> |
|
||||
<a href="http://www.eclipse.org/legal/termsofuse.php" target="_blank">Terms of Use</a> |
|
||||
<a href="http://www.eclipse.org/legal/copyright.php" target="_blank">Copyright Agent</a> |
|
||||
<a href="http://www.eclipse.org/legal" target="_blank">Legal</a>
|
||||
</div>
|
||||
<script src="lib/js/head.min.js"></script>
|
||||
<script src="js/reveal.js"></script>
|
||||
|
||||
<script>
|
||||
// Full list of configuration options available at:
|
||||
// https://github.com/hakimel/reveal.js#configuration
|
||||
Reveal.initialize({
|
||||
controls: false,
|
||||
progress: true,
|
||||
history: true,
|
||||
center: true,
|
||||
|
||||
transition: 'convex', // none/fade/slide/convex/concave/zoom
|
||||
|
||||
// Optional reveal.js plugins
|
||||
dependencies: [{
|
||||
src: 'lib/js/classList.js',
|
||||
condition: function () {
|
||||
return !document.body.classList;
|
||||
}
|
||||
}, {
|
||||
src: 'plugin/markdown/marked.js',
|
||||
condition: function () {
|
||||
return !!document.querySelector('[data-markdown]');
|
||||
}
|
||||
}, {
|
||||
src: 'plugin/markdown/markdown.js',
|
||||
condition: function () {
|
||||
return !!document.querySelector('[data-markdown]');
|
||||
}
|
||||
}, {
|
||||
src: 'plugin/highlight/highlight.js',
|
||||
async: true,
|
||||
condition: function () {
|
||||
return !!document.querySelector('pre code');
|
||||
},
|
||||
callback: function () {
|
||||
hljs.initHighlightingOnLoad();
|
||||
}
|
||||
}, {
|
||||
src: 'plugin/zoom-js/zoom.js',
|
||||
async: true
|
||||
}, {
|
||||
src: 'plugin/notes/notes.js',
|
||||
async: true
|
||||
}]
|
||||
});
|
||||
|
||||
Reveal.configure({
|
||||
slideNumber: true
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -1,377 +0,0 @@
|
||||
/*********************************************
|
||||
* GLOBAL STYLES
|
||||
*********************************************/
|
||||
body {
|
||||
border-left: 0px solid #ffffff;
|
||||
overflow: auto;
|
||||
background-color: white;
|
||||
background-position: center bottom;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 17px;
|
||||
font-family: Helvetica, Arial, sans-serif;
|
||||
font-weight: normal;
|
||||
color: #2e3032
|
||||
}
|
||||
|
||||
.header {
|
||||
position: relative;
|
||||
top: 5px;
|
||||
right: 20px;
|
||||
}
|
||||
|
||||
.footer {
|
||||
font-size: 10px !Important;
|
||||
font-family: Helvetica, Arial, sans-serif;
|
||||
color: #687175;
|
||||
position: absolute;
|
||||
bottom: 20px;
|
||||
left: 15px;
|
||||
margin-bottom: 10px
|
||||
}
|
||||
|
||||
.footer a {
|
||||
color: #003b6a;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.reveal {
|
||||
font-family: Helvetica, Arial, sans-serif;
|
||||
font-size: 25px;
|
||||
font-weight: normal;
|
||||
color: #551f62;
|
||||
d
|
||||
}
|
||||
|
||||
.reveal .controls {
|
||||
margin-bottom: 10px
|
||||
}
|
||||
|
||||
.reveal .slide-number {
|
||||
margin-bottom: 10px
|
||||
}
|
||||
|
||||
::selection {
|
||||
color: #fff;
|
||||
background: #98bdef;
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
.reveal .slides > section, .reveal .slides > section > section {
|
||||
line-height: 1.1;
|
||||
font-weight: inherit;
|
||||
text-align: left;
|
||||
/* padding-bottom: 25px; */
|
||||
}
|
||||
|
||||
/*********************************************
|
||||
* HEADERS
|
||||
*********************************************/
|
||||
.reveal h1, .reveal h2, .reveal h3, .reveal h4, .reveal h5, .reveal h6 {
|
||||
margin: 0 0 20px 0;
|
||||
font-family: Helvetica, Arial, sans-serif;
|
||||
font-weight: 100;
|
||||
line-height: 1.0;
|
||||
padding-bottom: 15px;
|
||||
letter-spacing: normal;
|
||||
text-shadow: none;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
.reveal h1 {
|
||||
font-size: 3.1em;
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
.reveal h2 {
|
||||
margin-top: 15px;
|
||||
font-size: 1.6em;
|
||||
}
|
||||
|
||||
.reveal h3 {
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
.reveal h4 {
|
||||
font-size: 1.0em;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
/*********************************************
|
||||
* OTHER
|
||||
*********************************************/
|
||||
|
||||
|
||||
.reveal .intro {
|
||||
color: #551f62;
|
||||
}
|
||||
|
||||
.noborder img {
|
||||
border: none !Important;
|
||||
box-shadow: none !Important;
|
||||
background: none !Important;
|
||||
}
|
||||
|
||||
.intro {
|
||||
color: #551f62;
|
||||
position: relative;
|
||||
top: 250px;
|
||||
left: 0px;
|
||||
}
|
||||
|
||||
.reveal p {
|
||||
margin: 20px 0;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
/* Ensure certain elements are never larger than the slide itself */
|
||||
.reveal img, .reveal video, .reveal iframe {
|
||||
max-width: 80%;
|
||||
max-height: 80%
|
||||
}
|
||||
|
||||
.reveal strong, .reveal b {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.reveal em {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.reveal ol, .reveal dl, .reveal ul {
|
||||
display: inline-block;
|
||||
text-align: left;
|
||||
margin: 0 0 0 1em;
|
||||
}
|
||||
|
||||
.reveal ol {
|
||||
list-style-type: decimal;
|
||||
}
|
||||
|
||||
.reveal ul {
|
||||
list-style-type: disc;
|
||||
/* margin-top: -15px;
|
||||
margin-bottom: 20px; */
|
||||
}
|
||||
|
||||
.reveal ul ul {
|
||||
list-style-type: disc;
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
.reveal ul ul ul {
|
||||
list-style-type: disc;
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
.reveal ul ul, .reveal ul ol, .reveal ol ol, .reveal ol ul {
|
||||
display: block;
|
||||
margin-left: 40px;
|
||||
}
|
||||
|
||||
.reveal dt {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.reveal dd {
|
||||
margin-left: 40px;
|
||||
}
|
||||
|
||||
.reveal q, .reveal blockquote {
|
||||
quotes: none;
|
||||
}
|
||||
|
||||
.reveal blockquote {
|
||||
display: block;
|
||||
position: relative;
|
||||
width: 70%;
|
||||
margin: 20px auto;
|
||||
padding: 5px;
|
||||
font-style: italic;
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
.reveal blockquote p:first-child, .reveal blockquote p:last-child {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.reveal q {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.reveal pre {
|
||||
display: block;
|
||||
position: relative;
|
||||
width: 90%;
|
||||
margin: 20px auto;
|
||||
text-align: left;
|
||||
font-size: 0.55em;
|
||||
font-family: monospace;
|
||||
line-height: 1.2em;
|
||||
word-wrap: break-word;
|
||||
box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
.reveal code {
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
.reveal pre code {
|
||||
display: block;
|
||||
padding: 5px;
|
||||
overflow: auto;
|
||||
max-height: 400px;
|
||||
word-wrap: normal;
|
||||
background: #3F3F3F;
|
||||
color: #DCDCDC;
|
||||
}
|
||||
|
||||
.reveal table {
|
||||
margin: auto;
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
}
|
||||
|
||||
.reveal table th {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.reveal table th, .reveal table td {
|
||||
text-align: left;
|
||||
padding: 0.2em 0.5em 0.2em 0.5em;
|
||||
border-bottom: 1px solid;
|
||||
}
|
||||
|
||||
.reveal table th[align="center"], .reveal table td[align="center"] {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.reveal table th[align="right"], .reveal table td[align="right"] {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.reveal table tr:last-child td {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.reveal sup {
|
||||
vertical-align: super;
|
||||
}
|
||||
|
||||
.reveal sub {
|
||||
vertical-align: sub;
|
||||
}
|
||||
|
||||
.reveal small {
|
||||
display: inline-block;
|
||||
font-size: 0.6em;
|
||||
line-height: 1.2em;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.reveal small * {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
/*********************************************
|
||||
* LINKS
|
||||
*********************************************/
|
||||
.reveal a {
|
||||
color: #6eb553;
|
||||
text-decoration: none;
|
||||
-webkit-transition: color 0.15s ease;
|
||||
-moz-transition: color 0.15s ease;
|
||||
transition: color 0.15s ease;
|
||||
}
|
||||
|
||||
.reveal a:hover {
|
||||
color: #6eb553;
|
||||
text-shadow: none;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.reveal .roll span:after {
|
||||
color: #fff;
|
||||
background: #1a54a1;
|
||||
}
|
||||
|
||||
/*********************************************
|
||||
* IMAGES
|
||||
*********************************************/
|
||||
.reveal section img {
|
||||
margin: 15px 0px;
|
||||
background: rgba(255, 255, 255, 0.12);
|
||||
border: 1px solid #fff;
|
||||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.reveal a img {
|
||||
-webkit-transition: all 0.15s linear;
|
||||
-moz-transition: all 0.15s linear;
|
||||
transition: all 0.15s linear;
|
||||
}
|
||||
|
||||
.reveal a:hover img {
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
border-color: #6eb553;
|
||||
box-shadow: 0 0 20px rgba(0, 0, 0, 0.55);
|
||||
}
|
||||
|
||||
/*********************************************
|
||||
* NAVIGATION CONTROLS
|
||||
*********************************************/
|
||||
.reveal .controls div.navigate-left, .reveal .controls div.navigate-left.enabled {
|
||||
border-right-color: #6eb553;
|
||||
}
|
||||
|
||||
.reveal .controls div.navigate-right, .reveal .controls div.navigate-right.enabled {
|
||||
border-left-color: #6eb553;
|
||||
}
|
||||
|
||||
.reveal .controls div.navigate-up, .reveal .controls div.navigate-up.enabled {
|
||||
border-bottom-color: #6eb553;
|
||||
}
|
||||
|
||||
.reveal .controls div.navigate-down, .reveal .controls div.navigate-down.enabled {
|
||||
border-top-color: #6eb553;
|
||||
}
|
||||
|
||||
.reveal .controls div.navigate-left.enabled:hover {
|
||||
border-right-color: #6eb553;
|
||||
}
|
||||
|
||||
.reveal .controls div.navigate-right.enabled:hover {
|
||||
border-left-color: #6eb553;
|
||||
}
|
||||
|
||||
.reveal .controls div.navigate-up.enabled:hover {
|
||||
border-bottom-color: #6eb553;
|
||||
}
|
||||
|
||||
.reveal .controls div.navigate-down.enabled:hover {
|
||||
border-top-color: #6eb553;
|
||||
}
|
||||
|
||||
/*********************************************
|
||||
* PROGRESS BAR
|
||||
*********************************************/
|
||||
.reveal .progress {
|
||||
background: rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
.reveal .progress span {
|
||||
background: #003b6a;
|
||||
-webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
||||
-moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
||||
transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985);
|
||||
}
|
||||
|
||||
/*********************************************
|
||||
* SLIDE NUMBER
|
||||
*********************************************/
|
||||
.reveal .slide-number {
|
||||
color: #003b6a;
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
/*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js*/
|
||||
if(typeof document!=="undefined"&&!("classList" in document.createElement("a"))){(function(j){var a="classList",f="prototype",m=(j.HTMLElement||j.Element)[f],b=Object,k=String[f].trim||function(){return this.replace(/^\s+|\s+$/g,"")},c=Array[f].indexOf||function(q){var p=0,o=this.length;for(;p<o;p++){if(p in this&&this[p]===q){return p}}return -1},n=function(o,p){this.name=o;this.code=DOMException[o];this.message=p},g=function(p,o){if(o===""){throw new n("SYNTAX_ERR","An invalid or illegal string was specified")}if(/\s/.test(o)){throw new n("INVALID_CHARACTER_ERR","String contains an invalid character")}return c.call(p,o)},d=function(s){var r=k.call(s.className),q=r?r.split(/\s+/):[],p=0,o=q.length;for(;p<o;p++){this.push(q[p])}this._updateClassName=function(){s.className=this.toString()}},e=d[f]=[],i=function(){return new d(this)};n[f]=Error[f];e.item=function(o){return this[o]||null};e.contains=function(o){o+="";return g(this,o)!==-1};e.add=function(o){o+="";if(g(this,o)===-1){this.push(o);this._updateClassName()}};e.remove=function(p){p+="";var o=g(this,p);if(o!==-1){this.splice(o,1);this._updateClassName()}};e.toggle=function(o){o+="";if(g(this,o)===-1){this.add(o)}else{this.remove(o)}};e.toString=function(){return this.join(" ")};if(b.defineProperty){var l={get:i,enumerable:true,configurable:true};try{b.defineProperty(m,a,l)}catch(h){if(h.number===-2146823252){l.enumerable=false;b.defineProperty(m,a,l)}}}else{if(b[f].__defineGetter__){m.__defineGetter__(a,i)}}}(self))};
|
||||
9
site/static/slides/lib/js/head.min.js
vendored
@@ -1,9 +0,0 @@
|
||||
/*! head.core - v1.0.2 */
|
||||
(function(n,t){"use strict";function r(n){a[a.length]=n}function k(n){var t=new RegExp(" ?\\b"+n+"\\b");c.className=c.className.replace(t,"")}function p(n,t){for(var i=0,r=n.length;i<r;i++)t.call(n,n[i],i)}function tt(){var t,e,f,o;c.className=c.className.replace(/ (w-|eq-|gt-|gte-|lt-|lte-|portrait|no-portrait|landscape|no-landscape)\d+/g,"");t=n.innerWidth||c.clientWidth;e=n.outerWidth||n.screen.width;u.screen.innerWidth=t;u.screen.outerWidth=e;r("w-"+t);p(i.screens,function(n){t>n?(i.screensCss.gt&&r("gt-"+n),i.screensCss.gte&&r("gte-"+n)):t<n?(i.screensCss.lt&&r("lt-"+n),i.screensCss.lte&&r("lte-"+n)):t===n&&(i.screensCss.lte&&r("lte-"+n),i.screensCss.eq&&r("e-q"+n),i.screensCss.gte&&r("gte-"+n))});f=n.innerHeight||c.clientHeight;o=n.outerHeight||n.screen.height;u.screen.innerHeight=f;u.screen.outerHeight=o;u.feature("portrait",f>t);u.feature("landscape",f<t)}function it(){n.clearTimeout(b);b=n.setTimeout(tt,50)}var y=n.document,rt=n.navigator,ut=n.location,c=y.documentElement,a=[],i={screens:[240,320,480,640,768,800,1024,1280,1440,1680,1920],screensCss:{gt:!0,gte:!1,lt:!0,lte:!1,eq:!1},browsers:[{ie:{min:6,max:11}}],browserCss:{gt:!0,gte:!1,lt:!0,lte:!1,eq:!0},html5:!0,page:"-page",section:"-section",head:"head"},v,u,s,w,o,h,l,d,f,g,nt,e,b;if(n.head_conf)for(v in n.head_conf)n.head_conf[v]!==t&&(i[v]=n.head_conf[v]);u=n[i.head]=function(){u.ready.apply(null,arguments)};u.feature=function(n,t,i){return n?(Object.prototype.toString.call(t)==="[object Function]"&&(t=t.call()),r((t?"":"no-")+n),u[n]=!!t,i||(k("no-"+n),k(n),u.feature()),u):(c.className+=" "+a.join(" "),a=[],u)};u.feature("js",!0);s=rt.userAgent.toLowerCase();w=/mobile|android|kindle|silk|midp|phone|(windows .+arm|touch)/.test(s);u.feature("mobile",w,!0);u.feature("desktop",!w,!0);s=/(chrome|firefox)[ \/]([\w.]+)/.exec(s)||/(iphone|ipad|ipod)(?:.*version)?[ \/]([\w.]+)/.exec(s)||/(android)(?:.*version)?[ \/]([\w.]+)/.exec(s)||/(webkit|opera)(?:.*version)?[ \/]([\w.]+)/.exec(s)||/(msie) ([\w.]+)/.exec(s)||/(trident).+rv:(\w.)+/.exec(s)||[];o=s[1];h=parseFloat(s[2]);switch(o){case"msie":case"trident":o="ie";h=y.documentMode||h;break;case"firefox":o="ff";break;case"ipod":case"ipad":case"iphone":o="ios";break;case"webkit":o="safari"}for(u.browser={name:o,version:h},u.browser[o]=!0,l=0,d=i.browsers.length;l<d;l++)for(f in i.browsers[l])if(o===f)for(r(f),g=i.browsers[l][f].min,nt=i.browsers[l][f].max,e=g;e<=nt;e++)h>e?(i.browserCss.gt&&r("gt-"+f+e),i.browserCss.gte&&r("gte-"+f+e)):h<e?(i.browserCss.lt&&r("lt-"+f+e),i.browserCss.lte&&r("lte-"+f+e)):h===e&&(i.browserCss.lte&&r("lte-"+f+e),i.browserCss.eq&&r("eq-"+f+e),i.browserCss.gte&&r("gte-"+f+e));else r("no-"+f);r(o);r(o+parseInt(h,10));i.html5&&o==="ie"&&h<9&&p("abbr|article|aside|audio|canvas|details|figcaption|figure|footer|header|hgroup|main|mark|meter|nav|output|progress|section|summary|time|video".split("|"),function(n){y.createElement(n)});p(ut.pathname.split("/"),function(n,u){if(this.length>2&&this[u+1]!==t)u&&r(this.slice(u,u+1).join("-").toLowerCase()+i.section);else{var f=n||"index",e=f.indexOf(".");e>0&&(f=f.substring(0,e));c.id=f.toLowerCase()+i.page;u||r("root"+i.section)}});u.screen={height:n.screen.height,width:n.screen.width};tt();b=0;n.addEventListener?n.addEventListener("resize",it,!1):n.attachEvent("onresize",it)})(window);
|
||||
/*! head.css3 - v1.0.0 */
|
||||
(function(n,t){"use strict";function a(n){for(var r in n)if(i[n[r]]!==t)return!0;return!1}function r(n){var t=n.charAt(0).toUpperCase()+n.substr(1),i=(n+" "+c.join(t+" ")+t).split(" ");return!!a(i)}var h=n.document,o=h.createElement("i"),i=o.style,s=" -o- -moz- -ms- -webkit- -khtml- ".split(" "),c="Webkit Moz O ms Khtml".split(" "),l=n.head_conf&&n.head_conf.head||"head",u=n[l],f={gradient:function(){var n="background-image:";return i.cssText=(n+s.join("gradient(linear,left top,right bottom,from(#9f9),to(#fff));"+n)+s.join("linear-gradient(left top,#eee,#fff);"+n)).slice(0,-n.length),!!i.backgroundImage},rgba:function(){return i.cssText="background-color:rgba(0,0,0,0.5)",!!i.backgroundColor},opacity:function(){return o.style.opacity===""},textshadow:function(){return i.textShadow===""},multiplebgs:function(){i.cssText="background:url(https://),url(https://),red url(https://)";var n=(i.background||"").match(/url/g);return Object.prototype.toString.call(n)==="[object Array]"&&n.length===3},boxshadow:function(){return r("boxShadow")},borderimage:function(){return r("borderImage")},borderradius:function(){return r("borderRadius")},cssreflections:function(){return r("boxReflect")},csstransforms:function(){return r("transform")},csstransitions:function(){return r("transition")},touch:function(){return"ontouchstart"in n},retina:function(){return n.devicePixelRatio>1},fontface:function(){var t=u.browser.name,n=u.browser.version;switch(t){case"ie":return n>=9;case"chrome":return n>=13;case"ff":return n>=6;case"ios":return n>=5;case"android":return!1;case"webkit":return n>=5.1;case"opera":return n>=10;default:return!1}}};for(var e in f)f[e]&&u.feature(e,f[e].call(),!0);u.feature()})(window);
|
||||
/*! head.load - v1.0.3 */
|
||||
(function(n,t){"use strict";function w(){}function u(n,t){if(n){typeof n=="object"&&(n=[].slice.call(n));for(var i=0,r=n.length;i<r;i++)t.call(n,n[i],i)}}function it(n,i){var r=Object.prototype.toString.call(i).slice(8,-1);return i!==t&&i!==null&&r===n}function s(n){return it("Function",n)}function a(n){return it("Array",n)}function et(n){var i=n.split("/"),t=i[i.length-1],r=t.indexOf("?");return r!==-1?t.substring(0,r):t}function f(n){(n=n||w,n._done)||(n(),n._done=1)}function ot(n,t,r,u){var f=typeof n=="object"?n:{test:n,success:!t?!1:a(t)?t:[t],failure:!r?!1:a(r)?r:[r],callback:u||w},e=!!f.test;return e&&!!f.success?(f.success.push(f.callback),i.load.apply(null,f.success)):e||!f.failure?u():(f.failure.push(f.callback),i.load.apply(null,f.failure)),i}function v(n){var t={},i,r;if(typeof n=="object")for(i in n)!n[i]||(t={name:i,url:n[i]});else t={name:et(n),url:n};return(r=c[t.name],r&&r.url===t.url)?r:(c[t.name]=t,t)}function y(n){n=n||c;for(var t in n)if(n.hasOwnProperty(t)&&n[t].state!==l)return!1;return!0}function st(n){n.state=ft;u(n.onpreload,function(n){n.call()})}function ht(n){n.state===t&&(n.state=nt,n.onpreload=[],rt({url:n.url,type:"cache"},function(){st(n)}))}function ct(){var n=arguments,t=n[n.length-1],r=[].slice.call(n,1),f=r[0];return(s(t)||(t=null),a(n[0]))?(n[0].push(t),i.load.apply(null,n[0]),i):(f?(u(r,function(n){s(n)||!n||ht(v(n))}),b(v(n[0]),s(f)?f:function(){i.load.apply(null,r)})):b(v(n[0])),i)}function lt(){var n=arguments,t=n[n.length-1],r={};return(s(t)||(t=null),a(n[0]))?(n[0].push(t),i.load.apply(null,n[0]),i):(u(n,function(n){n!==t&&(n=v(n),r[n.name]=n)}),u(n,function(n){n!==t&&(n=v(n),b(n,function(){y(r)&&f(t)}))}),i)}function b(n,t){if(t=t||w,n.state===l){t();return}if(n.state===tt){i.ready(n.name,t);return}if(n.state===nt){n.onpreload.push(function(){b(n,t)});return}n.state=tt;rt(n,function(){n.state=l;t();u(h[n.name],function(n){f(n)});o&&y()&&u(h.ALL,function(n){f(n)})})}function at(n){n=n||"";var t=n.split("?")[0].split(".");return t[t.length-1].toLowerCase()}function rt(t,i){function e(t){t=t||n.event;u.onload=u.onreadystatechange=u.onerror=null;i()}function o(f){f=f||n.event;(f.type==="load"||/loaded|complete/.test(u.readyState)&&(!r.documentMode||r.documentMode<9))&&(n.clearTimeout(t.errorTimeout),n.clearTimeout(t.cssTimeout),u.onload=u.onreadystatechange=u.onerror=null,i())}function s(){if(t.state!==l&&t.cssRetries<=20){for(var i=0,f=r.styleSheets.length;i<f;i++)if(r.styleSheets[i].href===u.href){o({type:"load"});return}t.cssRetries++;t.cssTimeout=n.setTimeout(s,250)}}var u,h,f;i=i||w;h=at(t.url);h==="css"?(u=r.createElement("link"),u.type="text/"+(t.type||"css"),u.rel="stylesheet",u.href=t.url,t.cssRetries=0,t.cssTimeout=n.setTimeout(s,500)):(u=r.createElement("script"),u.type="text/"+(t.type||"javascript"),u.src=t.url);u.onload=u.onreadystatechange=o;u.onerror=e;u.async=!1;u.defer=!1;t.errorTimeout=n.setTimeout(function(){e({type:"timeout"})},7e3);f=r.head||r.getElementsByTagName("head")[0];f.insertBefore(u,f.lastChild)}function vt(){for(var t,u=r.getElementsByTagName("script"),n=0,f=u.length;n<f;n++)if(t=u[n].getAttribute("data-headjs-load"),!!t){i.load(t);return}}function yt(n,t){var v,p,e;return n===r?(o?f(t):d.push(t),i):(s(n)&&(t=n,n="ALL"),a(n))?(v={},u(n,function(n){v[n]=c[n];i.ready(n,function(){y(v)&&f(t)})}),i):typeof n!="string"||!s(t)?i:(p=c[n],p&&p.state===l||n==="ALL"&&y()&&o)?(f(t),i):(e=h[n],e?e.push(t):e=h[n]=[t],i)}function e(){if(!r.body){n.clearTimeout(i.readyTimeout);i.readyTimeout=n.setTimeout(e,50);return}o||(o=!0,vt(),u(d,function(n){f(n)}))}function k(){r.addEventListener?(r.removeEventListener("DOMContentLoaded",k,!1),e()):r.readyState==="complete"&&(r.detachEvent("onreadystatechange",k),e())}var r=n.document,d=[],h={},c={},ut="async"in r.createElement("script")||"MozAppearance"in r.documentElement.style||n.opera,o,g=n.head_conf&&n.head_conf.head||"head",i=n[g]=n[g]||function(){i.ready.apply(null,arguments)},nt=1,ft=2,tt=3,l=4,p;if(r.readyState==="complete")e();else if(r.addEventListener)r.addEventListener("DOMContentLoaded",k,!1),n.addEventListener("load",e,!1);else{r.attachEvent("onreadystatechange",k);n.attachEvent("onload",e);p=!1;try{p=!n.frameElement&&r.documentElement}catch(wt){}p&&p.doScroll&&function pt(){if(!o){try{p.doScroll("left")}catch(t){n.clearTimeout(i.readyTimeout);i.readyTimeout=n.setTimeout(pt,50);return}e()}}()}i.load=i.js=ut?lt:ct;i.test=ot;i.ready=yt;i.ready(r,function(){y()&&u(h.ALL,function(n){f(n)});i.feature&&i.feature("domloaded",!0)})})(window);
|
||||
/*
|
||||
//# sourceMappingURL=head.min.js.map
|
||||
*/
|
||||
@@ -1,404 +0,0 @@
|
||||
/**
|
||||
* The reveal.js markdown plugin. Handles parsing of
|
||||
* markdown inside of presentations as well as loading
|
||||
* of external markdown documents.
|
||||
*/
|
||||
(function (root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
root.marked = require('./marked');
|
||||
root.RevealMarkdown = factory(root.marked);
|
||||
root.RevealMarkdown.initialize();
|
||||
} else if (typeof exports === 'object') {
|
||||
module.exports = factory(require('./marked'));
|
||||
} else {
|
||||
// Browser globals (root is window)
|
||||
root.RevealMarkdown = factory(root.marked);
|
||||
root.RevealMarkdown.initialize();
|
||||
}
|
||||
}(this, function (marked) {
|
||||
|
||||
var DEFAULT_SLIDE_SEPARATOR = '^\r?\n---\r?\n$',
|
||||
DEFAULT_NOTES_SEPARATOR = 'notes?:',
|
||||
DEFAULT_ELEMENT_ATTRIBUTES_SEPARATOR = '\\\.element\\\s*?(.+?)$',
|
||||
DEFAULT_SLIDE_ATTRIBUTES_SEPARATOR = '\\\.slide:\\\s*?(\\\S.+?)$';
|
||||
|
||||
var SCRIPT_END_PLACEHOLDER = '__SCRIPT_END__';
|
||||
|
||||
|
||||
/**
|
||||
* Retrieves the markdown contents of a slide section
|
||||
* element. Normalizes leading tabs/whitespace.
|
||||
*/
|
||||
function getMarkdownFromSlide(section) {
|
||||
|
||||
// look for a <script> or <textarea data-template> wrapper
|
||||
var template = section.querySelector('[data-template]') || section.querySelector('script');
|
||||
|
||||
// strip leading whitespace so it isn't evaluated as code
|
||||
var text = (template || section).textContent;
|
||||
|
||||
// restore script end tags
|
||||
text = text.replace(new RegExp(SCRIPT_END_PLACEHOLDER, 'g'), '</script>');
|
||||
|
||||
var leadingWs = text.match(/^\n?(\s*)/)[1].length,
|
||||
leadingTabs = text.match(/^\n?(\t*)/)[1].length;
|
||||
|
||||
if (leadingTabs > 0) {
|
||||
text = text.replace(new RegExp('\\n?\\t{' + leadingTabs + '}', 'g'), '\n');
|
||||
} else if (leadingWs > 1) {
|
||||
text = text.replace(new RegExp('\\n? {' + leadingWs + '}', 'g'), '\n');
|
||||
}
|
||||
|
||||
return text;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Given a markdown slide section element, this will
|
||||
* return all arguments that aren't related to markdown
|
||||
* parsing. Used to forward any other user-defined arguments
|
||||
* to the output markdown slide.
|
||||
*/
|
||||
function getForwardedAttributes(section) {
|
||||
|
||||
var attributes = section.attributes;
|
||||
var result = [];
|
||||
|
||||
for (var i = 0, len = attributes.length; i < len; i++) {
|
||||
var name = attributes[i].name,
|
||||
value = attributes[i].value;
|
||||
|
||||
// disregard attributes that are used for markdown loading/parsing
|
||||
if (/data\-(markdown|separator|vertical|notes)/gi.test(name)) continue;
|
||||
|
||||
if (value) {
|
||||
result.push(name + '="' + value + '"');
|
||||
} else {
|
||||
result.push(name);
|
||||
}
|
||||
}
|
||||
|
||||
return result.join(' ');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Inspects the given options and fills out default
|
||||
* values for what's not defined.
|
||||
*/
|
||||
function getSlidifyOptions(options) {
|
||||
|
||||
options = options || {};
|
||||
options.separator = options.separator || DEFAULT_SLIDE_SEPARATOR;
|
||||
options.notesSeparator = options.notesSeparator || DEFAULT_NOTES_SEPARATOR;
|
||||
options.attributes = options.attributes || '';
|
||||
|
||||
return options;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper function for constructing a markdown slide.
|
||||
*/
|
||||
function createMarkdownSlide(content, options) {
|
||||
|
||||
options = getSlidifyOptions(options);
|
||||
|
||||
var notesMatch = content.split(new RegExp(options.notesSeparator, 'mgi'));
|
||||
|
||||
if (notesMatch.length === 2) {
|
||||
content = notesMatch[0] + '<aside class="notes">' + marked(notesMatch[1].trim()) + '</aside>';
|
||||
}
|
||||
|
||||
// prevent script end tags in the content from interfering
|
||||
// with parsing
|
||||
content = content.replace(/<\/script>/g, SCRIPT_END_PLACEHOLDER);
|
||||
|
||||
return '<script type="text/template">' + content + '</script>';
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses a data string into multiple slides based
|
||||
* on the passed in separator arguments.
|
||||
*/
|
||||
function slidify(markdown, options) {
|
||||
|
||||
options = getSlidifyOptions(options);
|
||||
|
||||
var separatorRegex = new RegExp(options.separator + (options.verticalSeparator ? '|' + options.verticalSeparator : ''), 'mg'),
|
||||
horizontalSeparatorRegex = new RegExp(options.separator);
|
||||
|
||||
var matches,
|
||||
lastIndex = 0,
|
||||
isHorizontal,
|
||||
wasHorizontal = true,
|
||||
content,
|
||||
sectionStack = [];
|
||||
|
||||
// iterate until all blocks between separators are stacked up
|
||||
while (matches = separatorRegex.exec(markdown)) {
|
||||
notes = null;
|
||||
|
||||
// determine direction (horizontal by default)
|
||||
isHorizontal = horizontalSeparatorRegex.test(matches[0]);
|
||||
|
||||
if (!isHorizontal && wasHorizontal) {
|
||||
// create vertical stack
|
||||
sectionStack.push([]);
|
||||
}
|
||||
|
||||
// pluck slide content from markdown input
|
||||
content = markdown.substring(lastIndex, matches.index);
|
||||
|
||||
if (isHorizontal && wasHorizontal) {
|
||||
// add to horizontal stack
|
||||
sectionStack.push(content);
|
||||
} else {
|
||||
// add to vertical stack
|
||||
sectionStack[sectionStack.length - 1].push(content);
|
||||
}
|
||||
|
||||
lastIndex = separatorRegex.lastIndex;
|
||||
wasHorizontal = isHorizontal;
|
||||
}
|
||||
|
||||
// add the remaining slide
|
||||
(wasHorizontal ? sectionStack : sectionStack[sectionStack.length - 1]).push(markdown.substring(lastIndex));
|
||||
|
||||
var markdownSections = '';
|
||||
|
||||
// flatten the hierarchical stack, and insert <section data-markdown> tags
|
||||
for (var i = 0, len = sectionStack.length; i < len; i++) {
|
||||
// vertical
|
||||
if (sectionStack[i] instanceof Array) {
|
||||
markdownSections += '<section ' + options.attributes + '>';
|
||||
|
||||
sectionStack[i].forEach(function (child) {
|
||||
markdownSections += '<section data-markdown>' + createMarkdownSlide(child, options) + '</section>';
|
||||
});
|
||||
|
||||
markdownSections += '</section>';
|
||||
} else {
|
||||
markdownSections += '<section ' + options.attributes + ' data-markdown>' + createMarkdownSlide(sectionStack[i], options) + '</section>';
|
||||
}
|
||||
}
|
||||
|
||||
return markdownSections;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses any current data-markdown slides, splits
|
||||
* multi-slide markdown into separate sections and
|
||||
* handles loading of external markdown.
|
||||
*/
|
||||
function processSlides() {
|
||||
|
||||
var sections = document.querySelectorAll('[data-markdown]'),
|
||||
section;
|
||||
|
||||
for (var i = 0, len = sections.length; i < len; i++) {
|
||||
|
||||
section = sections[i];
|
||||
|
||||
if (section.getAttribute('data-markdown').length) {
|
||||
|
||||
var xhr = new XMLHttpRequest(),
|
||||
url = section.getAttribute('data-markdown');
|
||||
|
||||
datacharset = section.getAttribute('data-charset');
|
||||
|
||||
// see https://developer.mozilla.org/en-US/docs/Web/API/element.getAttribute#Notes
|
||||
if (datacharset != null && datacharset != '') {
|
||||
xhr.overrideMimeType('text/html; charset=' + datacharset);
|
||||
}
|
||||
|
||||
xhr.onreadystatechange = function () {
|
||||
if (xhr.readyState === 4) {
|
||||
// file protocol yields status code 0 (useful for local debug, mobile applications etc.)
|
||||
if ((xhr.status >= 200 && xhr.status < 300) || xhr.status === 0) {
|
||||
|
||||
section.outerHTML = slidify(xhr.responseText, {
|
||||
separator: section.getAttribute('data-separator'),
|
||||
verticalSeparator: section.getAttribute('data-separator-vertical'),
|
||||
notesSeparator: section.getAttribute('data-separator-notes'),
|
||||
attributes: getForwardedAttributes(section)
|
||||
});
|
||||
|
||||
} else {
|
||||
|
||||
section.outerHTML = '<section data-state="alert">' +
|
||||
'ERROR: The attempt to fetch ' + url + ' failed with HTTP status ' + xhr.status + '.' +
|
||||
'Check your browser\'s JavaScript console for more details.' +
|
||||
'<p>Remember that you need to serve the presentation HTML from a HTTP server.</p>' +
|
||||
'</section>';
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
xhr.open('GET', url, false);
|
||||
|
||||
try {
|
||||
xhr.send();
|
||||
} catch (e) {
|
||||
alert('Failed to get the Markdown file ' + url + '. Make sure that the presentation and the file are served by a HTTP server and the file can be found there. ' + e);
|
||||
}
|
||||
|
||||
} else if (section.getAttribute('data-separator') || section.getAttribute('data-separator-vertical') || section.getAttribute('data-separator-notes')) {
|
||||
|
||||
section.outerHTML = slidify(getMarkdownFromSlide(section), {
|
||||
separator: section.getAttribute('data-separator'),
|
||||
verticalSeparator: section.getAttribute('data-separator-vertical'),
|
||||
notesSeparator: section.getAttribute('data-separator-notes'),
|
||||
attributes: getForwardedAttributes(section)
|
||||
});
|
||||
|
||||
} else {
|
||||
section.innerHTML = createMarkdownSlide(getMarkdownFromSlide(section));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a node value has the attributes pattern.
|
||||
* If yes, extract it and add that value as one or several attributes
|
||||
* the the terget element.
|
||||
*
|
||||
* You need Cache Killer on Chrome to see the effect on any FOM transformation
|
||||
* directly on refresh (F5)
|
||||
* http://stackoverflow.com/questions/5690269/disabling-chrome-cache-for-website-development/7000899#answer-11786277
|
||||
*/
|
||||
function addAttributeInElement(node, elementTarget, separator) {
|
||||
|
||||
var mardownClassesInElementsRegex = new RegExp(separator, 'mg');
|
||||
var mardownClassRegex = new RegExp("([^\"= ]+?)=\"([^\"=]+?)\"", 'mg');
|
||||
var nodeValue = node.nodeValue;
|
||||
if (matches = mardownClassesInElementsRegex.exec(nodeValue)) {
|
||||
|
||||
var classes = matches[1];
|
||||
nodeValue = nodeValue.substring(0, matches.index) + nodeValue.substring(mardownClassesInElementsRegex.lastIndex);
|
||||
node.nodeValue = nodeValue;
|
||||
while (matchesClass = mardownClassRegex.exec(classes)) {
|
||||
elementTarget.setAttribute(matchesClass[1], matchesClass[2]);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add attributes to the parent element of a text node,
|
||||
* or the element of an attribute node.
|
||||
*/
|
||||
function addAttributes(section, element, previousElement, separatorElementAttributes, separatorSectionAttributes) {
|
||||
|
||||
if (element != null && element.childNodes != undefined && element.childNodes.length > 0) {
|
||||
previousParentElement = element;
|
||||
for (var i = 0; i < element.childNodes.length; i++) {
|
||||
childElement = element.childNodes[i];
|
||||
if (i > 0) {
|
||||
j = i - 1;
|
||||
while (j >= 0) {
|
||||
aPreviousChildElement = element.childNodes[j];
|
||||
if (typeof aPreviousChildElement.setAttribute == 'function' && aPreviousChildElement.tagName != "BR") {
|
||||
previousParentElement = aPreviousChildElement;
|
||||
break;
|
||||
}
|
||||
j = j - 1;
|
||||
}
|
||||
}
|
||||
parentSection = section;
|
||||
if (childElement.nodeName == "section") {
|
||||
parentSection = childElement;
|
||||
previousParentElement = childElement;
|
||||
}
|
||||
if (typeof childElement.setAttribute == 'function' || childElement.nodeType == Node.COMMENT_NODE) {
|
||||
addAttributes(parentSection, childElement, previousParentElement, separatorElementAttributes, separatorSectionAttributes);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (element.nodeType == Node.COMMENT_NODE) {
|
||||
if (addAttributeInElement(element, previousElement, separatorElementAttributes) == false) {
|
||||
addAttributeInElement(element, section, separatorSectionAttributes);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts any current data-markdown slides in the
|
||||
* DOM to HTML.
|
||||
*/
|
||||
function convertSlides() {
|
||||
|
||||
var sections = document.querySelectorAll('[data-markdown]');
|
||||
|
||||
for (var i = 0, len = sections.length; i < len; i++) {
|
||||
|
||||
var section = sections[i];
|
||||
|
||||
// Only parse the same slide once
|
||||
if (!section.getAttribute('data-markdown-parsed')) {
|
||||
|
||||
section.setAttribute('data-markdown-parsed', true)
|
||||
|
||||
var notes = section.querySelector('aside.notes');
|
||||
var markdown = getMarkdownFromSlide(section);
|
||||
|
||||
section.innerHTML = marked(markdown);
|
||||
addAttributes(section, section, null, section.getAttribute('data-element-attributes') ||
|
||||
section.parentNode.getAttribute('data-element-attributes') ||
|
||||
DEFAULT_ELEMENT_ATTRIBUTES_SEPARATOR,
|
||||
section.getAttribute('data-attributes') ||
|
||||
section.parentNode.getAttribute('data-attributes') ||
|
||||
DEFAULT_SLIDE_ATTRIBUTES_SEPARATOR);
|
||||
|
||||
// If there were notes, we need to re-add them after
|
||||
// having overwritten the section's HTML
|
||||
if (notes) {
|
||||
section.appendChild(notes);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// API
|
||||
return {
|
||||
|
||||
initialize: function () {
|
||||
if (typeof marked === 'undefined') {
|
||||
throw 'The reveal.js Markdown plugin requires marked to be loaded';
|
||||
}
|
||||
|
||||
if (typeof hljs !== 'undefined') {
|
||||
marked.setOptions({
|
||||
highlight: function (code, lang) {
|
||||
return hljs.highlightAuto(code, [lang]).value;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
var options = Reveal.getConfig().markdown;
|
||||
|
||||
if (options) {
|
||||
marked.setOptions(options);
|
||||
}
|
||||
|
||||
processSlides();
|
||||
convertSlides();
|
||||
},
|
||||
|
||||
// TODO: Do these belong in the API?
|
||||
processSlides: processSlides,
|
||||
convertSlides: convertSlides,
|
||||
slidify: slidify
|
||||
|
||||
};
|
||||
|
||||
}));
|
||||
@@ -1,67 +0,0 @@
|
||||
/**
|
||||
* A plugin which enables rendering of math equations inside
|
||||
* of reveal.js slides. Essentially a thin wrapper for MathJax.
|
||||
*
|
||||
* @author Hakim El Hattab
|
||||
*/
|
||||
var RevealMath = window.RevealMath || (function () {
|
||||
|
||||
var options = Reveal.getConfig().math || {};
|
||||
options.mathjax = options.mathjax || 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js';
|
||||
options.config = options.config || 'TeX-AMS_HTML-full';
|
||||
|
||||
loadScript(options.mathjax + '?config=' + options.config, function () {
|
||||
|
||||
MathJax.Hub.Config({
|
||||
messageStyle: 'none',
|
||||
tex2jax: {
|
||||
inlineMath: [['$', '$'], ['\\(', '\\)']],
|
||||
skipTags: ['script', 'noscript', 'style', 'textarea', 'pre']
|
||||
},
|
||||
skipStartupTypeset: true
|
||||
});
|
||||
|
||||
// Typeset followed by an immediate reveal.js layout since
|
||||
// the typesetting process could affect slide height
|
||||
MathJax.Hub.Queue(['Typeset', MathJax.Hub]);
|
||||
MathJax.Hub.Queue(Reveal.layout);
|
||||
|
||||
// Reprocess equations in slides when they turn visible
|
||||
Reveal.addEventListener('slidechanged', function (event) {
|
||||
|
||||
MathJax.Hub.Queue(['Typeset', MathJax.Hub, event.currentSlide]);
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
function loadScript(url, callback) {
|
||||
|
||||
var head = document.querySelector('head');
|
||||
var script = document.createElement('script');
|
||||
script.type = 'text/javascript';
|
||||
script.src = url;
|
||||
|
||||
// Wrapper for callback to make sure it only fires once
|
||||
var finish = function () {
|
||||
if (typeof callback === 'function') {
|
||||
callback.call();
|
||||
callback = null;
|
||||
}
|
||||
}
|
||||
|
||||
script.onload = finish;
|
||||
|
||||
// IE
|
||||
script.onreadystatechange = function () {
|
||||
if (this.readyState === 'loaded') {
|
||||
finish();
|
||||
}
|
||||
}
|
||||
|
||||
// Normal browsers
|
||||
head.appendChild(script);
|
||||
|
||||
}
|
||||
|
||||
})();
|
||||
@@ -1,15 +0,0 @@
|
||||
(function () {
|
||||
var multiplex = Reveal.getConfig().multiplex;
|
||||
var socketId = multiplex.id;
|
||||
var socket = io.connect(multiplex.url);
|
||||
|
||||
socket.on(multiplex.id, function (data) {
|
||||
// ignore data from sockets that aren't ours
|
||||
if (data.socketId !== socketId) {
|
||||
return;
|
||||
}
|
||||
if (window.location.host === 'localhost:1947') return;
|
||||
|
||||
Reveal.setState(data.state);
|
||||
});
|
||||
}());
|
||||
@@ -1,65 +0,0 @@
|
||||
var http = require('http');
|
||||
var express = require('express');
|
||||
var fs = require('fs');
|
||||
var io = require('socket.io');
|
||||
var crypto = require('crypto');
|
||||
|
||||
var app = express();
|
||||
var staticDir = express.static;
|
||||
var server = http.createServer(app);
|
||||
|
||||
io = io(server);
|
||||
|
||||
var opts = {
|
||||
port: process.env.PORT || 1948,
|
||||
baseDir: __dirname + '/../../'
|
||||
};
|
||||
|
||||
io.on('connection', function (socket) {
|
||||
socket.on('multiplex-statechanged', function (data) {
|
||||
if (typeof data.secret == 'undefined' || data.secret == null || data.secret === '') return;
|
||||
if (createHash(data.secret) === data.socketId) {
|
||||
data.secret = null;
|
||||
socket.broadcast.emit(data.socketId, data);
|
||||
}
|
||||
;
|
||||
});
|
||||
});
|
||||
|
||||
['css', 'js', 'plugin', 'lib'].forEach(function (dir) {
|
||||
app.use('/' + dir, staticDir(opts.baseDir + dir));
|
||||
});
|
||||
|
||||
app.get("/", function (req, res) {
|
||||
res.writeHead(200, {'Content-Type': 'text/html'});
|
||||
|
||||
var stream = fs.createReadStream(opts.baseDir + '/index.html');
|
||||
stream.on('error', function (error) {
|
||||
res.write('<style>body{font-family: sans-serif;}</style><h2>reveal.js multiplex server.</h2><a href="/token">Generate token</a>');
|
||||
res.end();
|
||||
});
|
||||
stream.on('readable', function () {
|
||||
stream.pipe(res);
|
||||
});
|
||||
});
|
||||
|
||||
app.get("/token", function (req, res) {
|
||||
var ts = new Date().getTime();
|
||||
var rand = Math.floor(Math.random() * 9999999);
|
||||
var secret = ts.toString() + rand.toString();
|
||||
res.send({secret: secret, socketId: createHash(secret)});
|
||||
});
|
||||
|
||||
var createHash = function (secret) {
|
||||
var cipher = crypto.createCipher('blowfish', secret);
|
||||
return (cipher.final('hex'));
|
||||
};
|
||||
|
||||
// Actually listen
|
||||
server.listen(opts.port || null);
|
||||
|
||||
var brown = '\033[33m',
|
||||
green = '\033[32m',
|
||||
reset = '\033[0m';
|
||||
|
||||
console.log(brown + "reveal.js:" + reset + " Multiplex running on port " + green + opts.port + reset);
|
||||
@@ -1,36 +0,0 @@
|
||||
(function () {
|
||||
|
||||
// Don't emit events from inside of notes windows
|
||||
if (window.location.search.match(/receiver/gi)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var multiplex = Reveal.getConfig().multiplex;
|
||||
|
||||
var socket = io.connect(multiplex.url);
|
||||
|
||||
function post() {
|
||||
|
||||
var messageData = {
|
||||
state: Reveal.getState(),
|
||||
secret: multiplex.secret,
|
||||
socketId: multiplex.id
|
||||
};
|
||||
|
||||
socket.emit('multiplex-statechanged', messageData);
|
||||
|
||||
};
|
||||
|
||||
// post once the page is loaded, so the client follows also on "open URL".
|
||||
window.addEventListener('load', post);
|
||||
|
||||
// Monitor events that trigger a change in state
|
||||
Reveal.addEventListener('slidechanged', post);
|
||||
Reveal.addEventListener('fragmentshown', post);
|
||||
Reveal.addEventListener('fragmenthidden', post);
|
||||
Reveal.addEventListener('overviewhidden', post);
|
||||
Reveal.addEventListener('overviewshown', post);
|
||||
Reveal.addEventListener('paused', post);
|
||||
Reveal.addEventListener('resumed', post);
|
||||
|
||||
}());
|
||||
@@ -1,67 +0,0 @@
|
||||
(function () {
|
||||
|
||||
// don't emit events from inside the previews themselves
|
||||
if (window.location.search.match(/receiver/gi)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var socket = io.connect(window.location.origin),
|
||||
socketId = Math.random().toString().slice(2);
|
||||
|
||||
console.log('View slide notes at ' + window.location.origin + '/notes/' + socketId);
|
||||
|
||||
window.open(window.location.origin + '/notes/' + socketId, 'notes-' + socketId);
|
||||
|
||||
/**
|
||||
* Posts the current slide data to the notes window
|
||||
*/
|
||||
function post() {
|
||||
|
||||
var slideElement = Reveal.getCurrentSlide(),
|
||||
notesElement = slideElement.querySelector('aside.notes');
|
||||
|
||||
var messageData = {
|
||||
notes: '',
|
||||
markdown: false,
|
||||
socketId: socketId,
|
||||
state: Reveal.getState()
|
||||
};
|
||||
|
||||
// Look for notes defined in a slide attribute
|
||||
if (slideElement.hasAttribute('data-notes')) {
|
||||
messageData.notes = slideElement.getAttribute('data-notes');
|
||||
}
|
||||
|
||||
// Look for notes defined in an aside element
|
||||
if (notesElement) {
|
||||
messageData.notes = notesElement.innerHTML;
|
||||
messageData.markdown = typeof notesElement.getAttribute('data-markdown') === 'string';
|
||||
}
|
||||
|
||||
socket.emit('statechanged', messageData);
|
||||
|
||||
}
|
||||
|
||||
// When a new notes window connects, post our current state
|
||||
socket.on('new-subscriber', function (data) {
|
||||
post();
|
||||
});
|
||||
|
||||
// When the state changes from inside of the speaker view
|
||||
socket.on('statechanged-speaker', function (data) {
|
||||
Reveal.setState(data.state);
|
||||
});
|
||||
|
||||
// Monitor events that trigger a change in state
|
||||
Reveal.addEventListener('slidechanged', post);
|
||||
Reveal.addEventListener('fragmentshown', post);
|
||||
Reveal.addEventListener('fragmenthidden', post);
|
||||
Reveal.addEventListener('overviewhidden', post);
|
||||
Reveal.addEventListener('overviewshown', post);
|
||||
Reveal.addEventListener('paused', post);
|
||||
Reveal.addEventListener('resumed', post);
|
||||
|
||||
// Post the initial state
|
||||
post();
|
||||
|
||||
}());
|
||||
@@ -1,69 +0,0 @@
|
||||
var http = require('http');
|
||||
var express = require('express');
|
||||
var fs = require('fs');
|
||||
var io = require('socket.io');
|
||||
var Mustache = require('mustache');
|
||||
|
||||
var app = express();
|
||||
var staticDir = express.static;
|
||||
var server = http.createServer(app);
|
||||
|
||||
io = io(server);
|
||||
|
||||
var opts = {
|
||||
port: 1947,
|
||||
baseDir: __dirname + '/../../'
|
||||
};
|
||||
|
||||
io.on('connection', function (socket) {
|
||||
|
||||
socket.on('new-subscriber', function (data) {
|
||||
socket.broadcast.emit('new-subscriber', data);
|
||||
});
|
||||
|
||||
socket.on('statechanged', function (data) {
|
||||
delete data.state.overview;
|
||||
socket.broadcast.emit('statechanged', data);
|
||||
});
|
||||
|
||||
socket.on('statechanged-speaker', function (data) {
|
||||
delete data.state.overview;
|
||||
socket.broadcast.emit('statechanged-speaker', data);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
['css', 'js', 'images', 'plugin', 'lib'].forEach(function (dir) {
|
||||
app.use('/' + dir, staticDir(opts.baseDir + dir));
|
||||
});
|
||||
|
||||
app.get('/', function (req, res) {
|
||||
|
||||
res.writeHead(200, {'Content-Type': 'text/html'});
|
||||
fs.createReadStream(opts.baseDir + '/index.html').pipe(res);
|
||||
|
||||
});
|
||||
|
||||
app.get('/notes/:socketId', function (req, res) {
|
||||
|
||||
fs.readFile(opts.baseDir + 'plugin/notes-server/notes.html', function (err, data) {
|
||||
res.send(Mustache.to_html(data.toString(), {
|
||||
socketId: req.params.socketId
|
||||
}));
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
// Actually listen
|
||||
server.listen(opts.port || null);
|
||||
|
||||
var brown = '\033[33m',
|
||||
green = '\033[32m',
|
||||
reset = '\033[0m';
|
||||
|
||||
var slidesLocation = 'http://localhost' + (opts.port ? (':' + opts.port) : '');
|
||||
|
||||
console.log(brown + 'reveal.js - Speaker Notes' + reset);
|
||||
console.log('1. Open the slides at ' + green + slidesLocation + reset);
|
||||
console.log('2. Click on the link in your JS console to go to the notes page');
|
||||
console.log('3. Advance through your slides and your notes will advance automatically');
|
||||
@@ -1,590 +0,0 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<title>reveal.js - Slide Notes</title>
|
||||
|
||||
<style>
|
||||
body {
|
||||
font-family: Helvetica;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
#current-slide,
|
||||
#upcoming-slide,
|
||||
#speaker-controls {
|
||||
padding: 6px;
|
||||
box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
}
|
||||
|
||||
#current-slide iframe,
|
||||
#upcoming-slide iframe {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
|
||||
#current-slide .label,
|
||||
#upcoming-slide .label {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
left: 10px;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.overlay-element {
|
||||
height: 34px;
|
||||
line-height: 34px;
|
||||
padding: 0 10px;
|
||||
text-shadow: none;
|
||||
background: rgba(220, 220, 220, 0.8);
|
||||
color: #222;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.overlay-element.interactive:hover {
|
||||
background: rgba(220, 220, 220, 1);
|
||||
}
|
||||
|
||||
#current-slide {
|
||||
position: absolute;
|
||||
width: 60%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
#upcoming-slide {
|
||||
position: absolute;
|
||||
width: 40%;
|
||||
height: 40%;
|
||||
right: 0;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
/* Speaker controls */
|
||||
#speaker-controls {
|
||||
position: absolute;
|
||||
top: 40%;
|
||||
right: 0;
|
||||
width: 40%;
|
||||
height: 60%;
|
||||
overflow: auto;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.speaker-controls-time.hidden,
|
||||
.speaker-controls-notes.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.speaker-controls-time .label,
|
||||
.speaker-controls-notes .label {
|
||||
text-transform: uppercase;
|
||||
font-weight: normal;
|
||||
font-size: 0.66em;
|
||||
color: #666;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.speaker-controls-time {
|
||||
border-bottom: 1px solid rgba(200, 200, 200, 0.5);
|
||||
margin-bottom: 10px;
|
||||
padding: 10px 16px;
|
||||
padding-bottom: 20px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.speaker-controls-time .reset-button {
|
||||
opacity: 0;
|
||||
float: right;
|
||||
color: #666;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.speaker-controls-time:hover .reset-button {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.speaker-controls-time .timer,
|
||||
.speaker-controls-time .clock {
|
||||
width: 50%;
|
||||
font-size: 1.9em;
|
||||
}
|
||||
|
||||
.speaker-controls-time .timer {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.speaker-controls-time .clock {
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.speaker-controls-time span.mute {
|
||||
color: #bbb;
|
||||
}
|
||||
|
||||
.speaker-controls-notes {
|
||||
padding: 10px 16px;
|
||||
}
|
||||
|
||||
.speaker-controls-notes .value {
|
||||
margin-top: 5px;
|
||||
line-height: 1.4;
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
/* Layout selector */
|
||||
#speaker-layout {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
color: #222;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
#speaker-layout select {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
border: 0;
|
||||
box-shadow: 0;
|
||||
cursor: pointer;
|
||||
opacity: 0;
|
||||
|
||||
font-size: 1em;
|
||||
background-color: transparent;
|
||||
|
||||
-moz-appearance: none;
|
||||
-webkit-appearance: none;
|
||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
#speaker-layout select:focus {
|
||||
outline: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.clear {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
/* Speaker layout: Wide */
|
||||
body[data-speaker-layout="wide"] #current-slide,
|
||||
body[data-speaker-layout="wide"] #upcoming-slide {
|
||||
width: 50%;
|
||||
height: 45%;
|
||||
padding: 6px;
|
||||
}
|
||||
|
||||
body[data-speaker-layout="wide"] #current-slide {
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
body[data-speaker-layout="wide"] #upcoming-slide {
|
||||
top: 0;
|
||||
left: 50%;
|
||||
}
|
||||
|
||||
body[data-speaker-layout="wide"] #speaker-controls {
|
||||
top: 45%;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 50%;
|
||||
font-size: 1.25em;
|
||||
}
|
||||
|
||||
/* Speaker layout: Tall */
|
||||
body[data-speaker-layout="tall"] #current-slide,
|
||||
body[data-speaker-layout="tall"] #upcoming-slide {
|
||||
width: 45%;
|
||||
height: 50%;
|
||||
padding: 6px;
|
||||
}
|
||||
|
||||
body[data-speaker-layout="tall"] #current-slide {
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
body[data-speaker-layout="tall"] #upcoming-slide {
|
||||
top: 50%;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
body[data-speaker-layout="tall"] #speaker-controls {
|
||||
padding-top: 40px;
|
||||
top: 0;
|
||||
left: 45%;
|
||||
width: 55%;
|
||||
height: 100%;
|
||||
font-size: 1.25em;
|
||||
}
|
||||
|
||||
/* Speaker layout: Notes only */
|
||||
body[data-speaker-layout="notes-only"] #current-slide,
|
||||
body[data-speaker-layout="notes-only"] #upcoming-slide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
body[data-speaker-layout="notes-only"] #speaker-controls {
|
||||
padding-top: 40px;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
font-size: 1.25em;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="current-slide"></div>
|
||||
<div id="upcoming-slide"><span class="overlay-element label">Upcoming</span></div>
|
||||
<div id="speaker-controls">
|
||||
<div class="speaker-controls-time">
|
||||
<h4 class="label">Time <span class="reset-button">Click to Reset</span></h4>
|
||||
<div class="clock">
|
||||
<span class="clock-value">0:00 AM</span>
|
||||
</div>
|
||||
<div class="timer">
|
||||
<span class="hours-value">00</span><span class="minutes-value">:00</span><span
|
||||
class="seconds-value">:00</span>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<div class="speaker-controls-notes hidden">
|
||||
<h4 class="label">Notes</h4>
|
||||
<div class="value"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="overlay-element interactive" id="speaker-layout">
|
||||
<span class="speaker-layout-label"></span>
|
||||
<select class="speaker-layout-dropdown"></select>
|
||||
</div>
|
||||
|
||||
<script src="/socket.io/socket.io.js"></script>
|
||||
<script src="/plugin/markdown/marked.js"></script>
|
||||
|
||||
<script>
|
||||
(function () {
|
||||
|
||||
var notes,
|
||||
notesValue,
|
||||
currentState,
|
||||
currentSlide,
|
||||
upcomingSlide,
|
||||
layoutLabel,
|
||||
layoutDropdown,
|
||||
connected = false;
|
||||
|
||||
var socket = io.connect(window.location.origin),
|
||||
socketId = '{{socketId}}';
|
||||
|
||||
var SPEAKER_LAYOUTS = {
|
||||
'default': 'Default',
|
||||
'wide': 'Wide',
|
||||
'tall': 'Tall',
|
||||
'notes-only': 'Notes only'
|
||||
};
|
||||
|
||||
socket.on('statechanged', function (data) {
|
||||
|
||||
// ignore data from sockets that aren't ours
|
||||
if (data.socketId !== socketId) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (connected === false) {
|
||||
connected = true;
|
||||
|
||||
setupKeyboard();
|
||||
setupNotes();
|
||||
setupTimer();
|
||||
|
||||
}
|
||||
|
||||
handleStateMessage(data);
|
||||
|
||||
});
|
||||
|
||||
setupLayout();
|
||||
|
||||
// Load our presentation iframes
|
||||
setupIframes();
|
||||
|
||||
// Once the iframes have loaded, emit a signal saying there's
|
||||
// a new subscriber which will trigger a 'statechanged'
|
||||
// message to be sent back
|
||||
window.addEventListener('message', function (event) {
|
||||
|
||||
var data = JSON.parse(event.data);
|
||||
|
||||
if (data && data.namespace === 'reveal') {
|
||||
if (/ready/.test(data.eventName)) {
|
||||
socket.emit('new-subscriber', {socketId: socketId});
|
||||
}
|
||||
}
|
||||
|
||||
// Messages sent by reveal.js inside of the current slide preview
|
||||
if (data && data.namespace === 'reveal') {
|
||||
if (/slidechanged|fragmentshown|fragmenthidden|overviewshown|overviewhidden|paused|resumed/.test(data.eventName) && currentState !== JSON.stringify(data.state)) {
|
||||
socket.emit('statechanged-speaker', {state: data.state});
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
/**
|
||||
* Called when the main window sends an updated state.
|
||||
*/
|
||||
function handleStateMessage(data) {
|
||||
|
||||
// Store the most recently set state to avoid circular loops
|
||||
// applying the same state
|
||||
currentState = JSON.stringify(data.state);
|
||||
|
||||
// No need for updating the notes in case of fragment changes
|
||||
if (data.notes) {
|
||||
notes.classList.remove('hidden');
|
||||
if (data.markdown) {
|
||||
notesValue.innerHTML = marked(data.notes);
|
||||
} else {
|
||||
notesValue.innerHTML = data.notes;
|
||||
}
|
||||
} else {
|
||||
notes.classList.add('hidden');
|
||||
}
|
||||
|
||||
// Update the note slides
|
||||
currentSlide.contentWindow.postMessage(JSON.stringify({method: 'setState', args: [data.state]}), '*');
|
||||
upcomingSlide.contentWindow.postMessage(JSON.stringify({method: 'setState', args: [data.state]}), '*');
|
||||
upcomingSlide.contentWindow.postMessage(JSON.stringify({method: 'next'}), '*');
|
||||
|
||||
}
|
||||
|
||||
// Limit to max one state update per X ms
|
||||
handleStateMessage = debounce(handleStateMessage, 200);
|
||||
|
||||
/**
|
||||
* Forward keyboard events to the current slide window.
|
||||
* This enables keyboard events to work even if focus
|
||||
* isn't set on the current slide iframe.
|
||||
*/
|
||||
function setupKeyboard() {
|
||||
|
||||
document.addEventListener('keydown', function (event) {
|
||||
currentSlide.contentWindow.postMessage(JSON.stringify({
|
||||
method: 'triggerKey',
|
||||
args: [event.keyCode]
|
||||
}), '*');
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates the preview iframes.
|
||||
*/
|
||||
function setupIframes() {
|
||||
|
||||
var params = [
|
||||
'receiver',
|
||||
'progress=false',
|
||||
'history=false',
|
||||
'transition=none',
|
||||
'backgroundTransition=none'
|
||||
].join('&');
|
||||
|
||||
var currentURL = '/?' + params + '&postMessageEvents=true';
|
||||
var upcomingURL = '/?' + params + '&controls=false';
|
||||
|
||||
currentSlide = document.createElement('iframe');
|
||||
currentSlide.setAttribute('width', 1280);
|
||||
currentSlide.setAttribute('height', 1024);
|
||||
currentSlide.setAttribute('src', currentURL);
|
||||
document.querySelector('#current-slide').appendChild(currentSlide);
|
||||
|
||||
upcomingSlide = document.createElement('iframe');
|
||||
upcomingSlide.setAttribute('width', 640);
|
||||
upcomingSlide.setAttribute('height', 512);
|
||||
upcomingSlide.setAttribute('src', upcomingURL);
|
||||
document.querySelector('#upcoming-slide').appendChild(upcomingSlide);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Setup the notes UI.
|
||||
*/
|
||||
function setupNotes() {
|
||||
|
||||
notes = document.querySelector('.speaker-controls-notes');
|
||||
notesValue = document.querySelector('.speaker-controls-notes .value');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Create the timer and clock and start updating them
|
||||
* at an interval.
|
||||
*/
|
||||
function setupTimer() {
|
||||
|
||||
var start = new Date(),
|
||||
timeEl = document.querySelector('.speaker-controls-time'),
|
||||
clockEl = timeEl.querySelector('.clock-value'),
|
||||
hoursEl = timeEl.querySelector('.hours-value'),
|
||||
minutesEl = timeEl.querySelector('.minutes-value'),
|
||||
secondsEl = timeEl.querySelector('.seconds-value');
|
||||
|
||||
function _updateTimer() {
|
||||
|
||||
var diff, hours, minutes, seconds,
|
||||
now = new Date();
|
||||
|
||||
diff = now.getTime() - start.getTime();
|
||||
hours = Math.floor(diff / (1000 * 60 * 60));
|
||||
minutes = Math.floor((diff / (1000 * 60)) % 60);
|
||||
seconds = Math.floor((diff / 1000) % 60);
|
||||
|
||||
clockEl.innerHTML = now.toLocaleTimeString('en-US', {hour12: true, hour: '2-digit', minute: '2-digit'});
|
||||
hoursEl.innerHTML = zeroPadInteger(hours);
|
||||
hoursEl.className = hours > 0 ? '' : 'mute';
|
||||
minutesEl.innerHTML = ':' + zeroPadInteger(minutes);
|
||||
minutesEl.className = minutes > 0 ? '' : 'mute';
|
||||
secondsEl.innerHTML = ':' + zeroPadInteger(seconds);
|
||||
|
||||
}
|
||||
|
||||
// Update once directly
|
||||
_updateTimer();
|
||||
|
||||
// Then update every second
|
||||
setInterval(_updateTimer, 1000);
|
||||
|
||||
timeEl.addEventListener('click', function () {
|
||||
start = new Date();
|
||||
_updateTimer();
|
||||
return false;
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets up the speaker view layout and layout selector.
|
||||
*/
|
||||
function setupLayout() {
|
||||
|
||||
layoutDropdown = document.querySelector('.speaker-layout-dropdown');
|
||||
layoutLabel = document.querySelector('.speaker-layout-label');
|
||||
|
||||
// Render the list of available layouts
|
||||
for (var id in SPEAKER_LAYOUTS) {
|
||||
var option = document.createElement('option');
|
||||
option.setAttribute('value', id);
|
||||
option.textContent = SPEAKER_LAYOUTS[id];
|
||||
layoutDropdown.appendChild(option);
|
||||
}
|
||||
|
||||
// Monitor the dropdown for changes
|
||||
layoutDropdown.addEventListener('change', function (event) {
|
||||
|
||||
setLayout(layoutDropdown.value);
|
||||
|
||||
}, false);
|
||||
|
||||
// Restore any currently persisted layout
|
||||
setLayout(getLayout());
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new speaker view layout. The layout is persisted
|
||||
* in local storage.
|
||||
*/
|
||||
function setLayout(value) {
|
||||
|
||||
var title = SPEAKER_LAYOUTS[value];
|
||||
|
||||
layoutLabel.innerHTML = 'Layout' + (title ? (': ' + title) : '');
|
||||
layoutDropdown.value = value;
|
||||
|
||||
document.body.setAttribute('data-speaker-layout', value);
|
||||
|
||||
// Persist locally
|
||||
if (window.localStorage) {
|
||||
window.localStorage.setItem('reveal-speaker-layout', value);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the ID of the most recently set speaker layout
|
||||
* or our default layout if none has been set.
|
||||
*/
|
||||
function getLayout() {
|
||||
|
||||
if (window.localStorage) {
|
||||
var layout = window.localStorage.getItem('reveal-speaker-layout');
|
||||
if (layout) {
|
||||
return layout;
|
||||
}
|
||||
}
|
||||
|
||||
// Default to the first record in the layouts hash
|
||||
for (var id in SPEAKER_LAYOUTS) {
|
||||
return id;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function zeroPadInteger(num) {
|
||||
|
||||
var str = '00' + parseInt(num);
|
||||
return str.substring(str.length - 2);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Limits the frequency at which a function can be called.
|
||||
*/
|
||||
function debounce(fn, ms) {
|
||||
|
||||
var lastTime = 0,
|
||||
timeout;
|
||||
|
||||
return function () {
|
||||
|
||||
var args = arguments;
|
||||
var context = this;
|
||||
|
||||
clearTimeout(timeout);
|
||||
|
||||
var timeSinceLastCall = Date.now() - lastTime;
|
||||
if (timeSinceLastCall > ms) {
|
||||
fn.apply(context, args);
|
||||
lastTime = Date.now();
|
||||
} else {
|
||||
timeout = setTimeout(function () {
|
||||
fn.apply(context, args);
|
||||
lastTime = Date.now();
|
||||
}, ms - timeSinceLastCall);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
})();
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,755 +0,0 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<title>reveal.js - Slide Notes</title>
|
||||
|
||||
<style>
|
||||
body {
|
||||
font-family: Helvetica;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
#current-slide,
|
||||
#upcoming-slide,
|
||||
#speaker-controls {
|
||||
padding: 6px;
|
||||
box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
}
|
||||
|
||||
#current-slide iframe,
|
||||
#upcoming-slide iframe {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
|
||||
#current-slide .label,
|
||||
#upcoming-slide .label {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
left: 10px;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.overlay-element {
|
||||
height: 34px;
|
||||
line-height: 34px;
|
||||
padding: 0 10px;
|
||||
text-shadow: none;
|
||||
background: rgba(220, 220, 220, 0.8);
|
||||
color: #222;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.overlay-element.interactive:hover {
|
||||
background: rgba(220, 220, 220, 1);
|
||||
}
|
||||
|
||||
#current-slide {
|
||||
position: absolute;
|
||||
width: 60%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
|
||||
#upcoming-slide {
|
||||
position: absolute;
|
||||
width: 40%;
|
||||
height: 40%;
|
||||
right: 0;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
/* Speaker controls */
|
||||
#speaker-controls {
|
||||
position: absolute;
|
||||
top: 40%;
|
||||
right: 0;
|
||||
width: 40%;
|
||||
height: 60%;
|
||||
overflow: auto;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.speaker-controls-time.hidden,
|
||||
.speaker-controls-notes.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.speaker-controls-time .label,
|
||||
.speaker-controls-pace .label,
|
||||
.speaker-controls-notes .label {
|
||||
text-transform: uppercase;
|
||||
font-weight: normal;
|
||||
font-size: 0.66em;
|
||||
color: #666;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.speaker-controls-time, .speaker-controls-pace {
|
||||
border-bottom: 1px solid rgba(200, 200, 200, 0.5);
|
||||
margin-bottom: 10px;
|
||||
padding: 10px 16px;
|
||||
padding-bottom: 20px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.speaker-controls-time .reset-button {
|
||||
opacity: 0;
|
||||
float: right;
|
||||
color: #666;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.speaker-controls-time:hover .reset-button {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.speaker-controls-time .timer,
|
||||
.speaker-controls-time .clock {
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.speaker-controls-time .timer,
|
||||
.speaker-controls-time .clock,
|
||||
.speaker-controls-time .pacing .hours-value,
|
||||
.speaker-controls-time .pacing .minutes-value,
|
||||
.speaker-controls-time .pacing .seconds-value {
|
||||
font-size: 1.9em;
|
||||
}
|
||||
|
||||
.speaker-controls-time .timer {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.speaker-controls-time .clock {
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.speaker-controls-time span.mute {
|
||||
opacity: 0.3;
|
||||
}
|
||||
|
||||
.speaker-controls-time .pacing-title {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.speaker-controls-time .pacing.ahead {
|
||||
color: blue;
|
||||
}
|
||||
|
||||
.speaker-controls-time .pacing.on-track {
|
||||
color: green;
|
||||
}
|
||||
|
||||
.speaker-controls-time .pacing.behind {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.speaker-controls-notes {
|
||||
padding: 10px 16px;
|
||||
}
|
||||
|
||||
.speaker-controls-notes .value {
|
||||
margin-top: 5px;
|
||||
line-height: 1.4;
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
/* Layout selector */
|
||||
#speaker-layout {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
color: #222;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
#speaker-layout select {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
border: 0;
|
||||
box-shadow: 0;
|
||||
cursor: pointer;
|
||||
opacity: 0;
|
||||
|
||||
font-size: 1em;
|
||||
background-color: transparent;
|
||||
|
||||
-moz-appearance: none;
|
||||
-webkit-appearance: none;
|
||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
#speaker-layout select:focus {
|
||||
outline: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.clear {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
/* Speaker layout: Wide */
|
||||
body[data-speaker-layout="wide"] #current-slide,
|
||||
body[data-speaker-layout="wide"] #upcoming-slide {
|
||||
width: 50%;
|
||||
height: 45%;
|
||||
padding: 6px;
|
||||
}
|
||||
|
||||
body[data-speaker-layout="wide"] #current-slide {
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
body[data-speaker-layout="wide"] #upcoming-slide {
|
||||
top: 0;
|
||||
left: 50%;
|
||||
}
|
||||
|
||||
body[data-speaker-layout="wide"] #speaker-controls {
|
||||
top: 45%;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 50%;
|
||||
font-size: 1.25em;
|
||||
}
|
||||
|
||||
/* Speaker layout: Tall */
|
||||
body[data-speaker-layout="tall"] #current-slide,
|
||||
body[data-speaker-layout="tall"] #upcoming-slide {
|
||||
width: 45%;
|
||||
height: 50%;
|
||||
padding: 6px;
|
||||
}
|
||||
|
||||
body[data-speaker-layout="tall"] #current-slide {
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
body[data-speaker-layout="tall"] #upcoming-slide {
|
||||
top: 50%;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
body[data-speaker-layout="tall"] #speaker-controls {
|
||||
padding-top: 40px;
|
||||
top: 0;
|
||||
left: 45%;
|
||||
width: 55%;
|
||||
height: 100%;
|
||||
font-size: 1.25em;
|
||||
}
|
||||
|
||||
/* Speaker layout: Notes only */
|
||||
body[data-speaker-layout="notes-only"] #current-slide,
|
||||
body[data-speaker-layout="notes-only"] #upcoming-slide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
body[data-speaker-layout="notes-only"] #speaker-controls {
|
||||
padding-top: 40px;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
font-size: 1.25em;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 1080px) {
|
||||
body[data-speaker-layout="default"] #speaker-controls {
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 900px) {
|
||||
body[data-speaker-layout="default"] #speaker-controls {
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 800px) {
|
||||
body[data-speaker-layout="default"] #speaker-controls {
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="current-slide"></div>
|
||||
<div id="upcoming-slide"><span class="overlay-element label">Upcoming</span></div>
|
||||
<div id="speaker-controls">
|
||||
<div class="speaker-controls-time">
|
||||
<h4 class="label">Time <span class="reset-button">Click to Reset</span></h4>
|
||||
<div class="clock">
|
||||
<span class="clock-value">0:00 AM</span>
|
||||
</div>
|
||||
<div class="timer">
|
||||
<span class="hours-value">00</span><span class="minutes-value">:00</span><span
|
||||
class="seconds-value">:00</span>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
|
||||
<h4 class="label pacing-title" style="display: none">Pacing – Time to finish current slide</h4>
|
||||
<div class="pacing" style="display: none">
|
||||
<span class="hours-value">00</span><span class="minutes-value">:00</span><span
|
||||
class="seconds-value">:00</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="speaker-controls-notes hidden">
|
||||
<h4 class="label">Notes</h4>
|
||||
<div class="value"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="overlay-element interactive" id="speaker-layout">
|
||||
<span class="speaker-layout-label"></span>
|
||||
<select class="speaker-layout-dropdown"></select>
|
||||
</div>
|
||||
|
||||
<script src="../../plugin/markdown/marked.js"></script>
|
||||
<script>
|
||||
|
||||
(function () {
|
||||
|
||||
var notes,
|
||||
notesValue,
|
||||
currentState,
|
||||
currentSlide,
|
||||
upcomingSlide,
|
||||
layoutLabel,
|
||||
layoutDropdown,
|
||||
connected = false;
|
||||
|
||||
var SPEAKER_LAYOUTS = {
|
||||
'default': 'Default',
|
||||
'wide': 'Wide',
|
||||
'tall': 'Tall',
|
||||
'notes-only': 'Notes only'
|
||||
};
|
||||
|
||||
setupLayout();
|
||||
|
||||
window.addEventListener('message', function (event) {
|
||||
|
||||
var data = JSON.parse(event.data);
|
||||
|
||||
// The overview mode is only useful to the reveal.js instance
|
||||
// where navigation occurs so we don't sync it
|
||||
if (data.state) delete data.state.overview;
|
||||
|
||||
// Messages sent by the notes plugin inside of the main window
|
||||
if (data && data.namespace === 'reveal-notes') {
|
||||
if (data.type === 'connect') {
|
||||
handleConnectMessage(data);
|
||||
} else if (data.type === 'state') {
|
||||
handleStateMessage(data);
|
||||
}
|
||||
}
|
||||
// Messages sent by the reveal.js inside of the current slide preview
|
||||
else if (data && data.namespace === 'reveal') {
|
||||
if (/ready/.test(data.eventName)) {
|
||||
// Send a message back to notify that the handshake is complete
|
||||
window.opener.postMessage(JSON.stringify({namespace: 'reveal-notes', type: 'connected'}), '*');
|
||||
} else if (/slidechanged|fragmentshown|fragmenthidden|paused|resumed/.test(data.eventName) && currentState !== JSON.stringify(data.state)) {
|
||||
|
||||
window.opener.postMessage(JSON.stringify({method: 'setState', args: [data.state]}), '*');
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
/**
|
||||
* Called when the main window is trying to establish a
|
||||
* connection.
|
||||
*/
|
||||
function handleConnectMessage(data) {
|
||||
|
||||
if (connected === false) {
|
||||
connected = true;
|
||||
|
||||
setupIframes(data);
|
||||
setupKeyboard();
|
||||
setupNotes();
|
||||
setupTimer();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when the main window sends an updated state.
|
||||
*/
|
||||
function handleStateMessage(data) {
|
||||
|
||||
// Store the most recently set state to avoid circular loops
|
||||
// applying the same state
|
||||
currentState = JSON.stringify(data.state);
|
||||
|
||||
// No need for updating the notes in case of fragment changes
|
||||
if (data.notes) {
|
||||
notes.classList.remove('hidden');
|
||||
notesValue.style.whiteSpace = data.whitespace;
|
||||
if (data.markdown) {
|
||||
notesValue.innerHTML = marked(data.notes);
|
||||
} else {
|
||||
notesValue.innerHTML = data.notes;
|
||||
}
|
||||
} else {
|
||||
notes.classList.add('hidden');
|
||||
}
|
||||
|
||||
// Update the note slides
|
||||
currentSlide.contentWindow.postMessage(JSON.stringify({method: 'setState', args: [data.state]}), '*');
|
||||
upcomingSlide.contentWindow.postMessage(JSON.stringify({method: 'setState', args: [data.state]}), '*');
|
||||
upcomingSlide.contentWindow.postMessage(JSON.stringify({method: 'next'}), '*');
|
||||
|
||||
}
|
||||
|
||||
// Limit to max one state update per X ms
|
||||
handleStateMessage = debounce(handleStateMessage, 200);
|
||||
|
||||
/**
|
||||
* Forward keyboard events to the current slide window.
|
||||
* This enables keyboard events to work even if focus
|
||||
* isn't set on the current slide iframe.
|
||||
*/
|
||||
function setupKeyboard() {
|
||||
|
||||
document.addEventListener('keydown', function (event) {
|
||||
currentSlide.contentWindow.postMessage(JSON.stringify({
|
||||
method: 'triggerKey',
|
||||
args: [event.keyCode]
|
||||
}), '*');
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates the preview iframes.
|
||||
*/
|
||||
function setupIframes(data) {
|
||||
|
||||
var params = [
|
||||
'receiver',
|
||||
'progress=false',
|
||||
'history=false',
|
||||
'transition=none',
|
||||
'autoSlide=0',
|
||||
'backgroundTransition=none'
|
||||
].join('&');
|
||||
|
||||
var urlSeparator = /\?/.test(data.url) ? '&' : '?';
|
||||
var hash = '#/' + data.state.indexh + '/' + data.state.indexv;
|
||||
var currentURL = data.url + urlSeparator + params + '&postMessageEvents=true' + hash;
|
||||
var upcomingURL = data.url + urlSeparator + params + '&controls=false' + hash;
|
||||
|
||||
currentSlide = document.createElement('iframe');
|
||||
currentSlide.setAttribute('width', 1280);
|
||||
currentSlide.setAttribute('height', 1024);
|
||||
currentSlide.setAttribute('src', currentURL);
|
||||
document.querySelector('#current-slide').appendChild(currentSlide);
|
||||
|
||||
upcomingSlide = document.createElement('iframe');
|
||||
upcomingSlide.setAttribute('width', 640);
|
||||
upcomingSlide.setAttribute('height', 512);
|
||||
upcomingSlide.setAttribute('src', upcomingURL);
|
||||
document.querySelector('#upcoming-slide').appendChild(upcomingSlide);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Setup the notes UI.
|
||||
*/
|
||||
function setupNotes() {
|
||||
|
||||
notes = document.querySelector('.speaker-controls-notes');
|
||||
notesValue = document.querySelector('.speaker-controls-notes .value');
|
||||
|
||||
}
|
||||
|
||||
function getTimings() {
|
||||
|
||||
var slides = Reveal.getSlides();
|
||||
var defaultTiming = Reveal.getConfig().defaultTiming;
|
||||
if (defaultTiming == null) {
|
||||
return null;
|
||||
}
|
||||
var timings = [];
|
||||
for (var i in slides) {
|
||||
var slide = slides[i];
|
||||
var timing = defaultTiming;
|
||||
if (slide.hasAttribute('data-timing')) {
|
||||
var t = slide.getAttribute('data-timing');
|
||||
timing = parseInt(t);
|
||||
if (isNaN(timing)) {
|
||||
console.warn("Could not parse timing '" + t + "' of slide " + i + "; using default of " + defaultTiming);
|
||||
timing = defaultTiming;
|
||||
}
|
||||
}
|
||||
timings.push(timing);
|
||||
}
|
||||
return timings;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the number of seconds allocated for presenting
|
||||
* all slides up to and including this one.
|
||||
*/
|
||||
function getTimeAllocated(timings) {
|
||||
|
||||
var slides = Reveal.getSlides();
|
||||
var allocated = 0;
|
||||
var currentSlide = Reveal.getSlidePastCount();
|
||||
for (var i in slides.slice(0, currentSlide + 1)) {
|
||||
allocated += timings[i];
|
||||
}
|
||||
return allocated;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Create the timer and clock and start updating them
|
||||
* at an interval.
|
||||
*/
|
||||
function setupTimer() {
|
||||
|
||||
var start = new Date(),
|
||||
timeEl = document.querySelector('.speaker-controls-time'),
|
||||
clockEl = timeEl.querySelector('.clock-value'),
|
||||
hoursEl = timeEl.querySelector('.hours-value'),
|
||||
minutesEl = timeEl.querySelector('.minutes-value'),
|
||||
secondsEl = timeEl.querySelector('.seconds-value'),
|
||||
pacingTitleEl = timeEl.querySelector('.pacing-title'),
|
||||
pacingEl = timeEl.querySelector('.pacing'),
|
||||
pacingHoursEl = pacingEl.querySelector('.hours-value'),
|
||||
pacingMinutesEl = pacingEl.querySelector('.minutes-value'),
|
||||
pacingSecondsEl = pacingEl.querySelector('.seconds-value');
|
||||
|
||||
var timings = getTimings();
|
||||
if (timings !== null) {
|
||||
pacingTitleEl.style.removeProperty('display');
|
||||
pacingEl.style.removeProperty('display');
|
||||
}
|
||||
|
||||
function _displayTime(hrEl, minEl, secEl, time) {
|
||||
|
||||
var sign = Math.sign(time) == -1 ? "-" : "";
|
||||
time = Math.abs(Math.round(time / 1000));
|
||||
var seconds = time % 60;
|
||||
var minutes = Math.floor(time / 60) % 60;
|
||||
var hours = Math.floor(time / (60 * 60));
|
||||
hrEl.innerHTML = sign + zeroPadInteger(hours);
|
||||
if (hours == 0) {
|
||||
hrEl.classList.add('mute');
|
||||
} else {
|
||||
hrEl.classList.remove('mute');
|
||||
}
|
||||
minEl.innerHTML = ':' + zeroPadInteger(minutes);
|
||||
if (hours == 0 && minutes == 0) {
|
||||
minEl.classList.add('mute');
|
||||
} else {
|
||||
minEl.classList.remove('mute');
|
||||
}
|
||||
secEl.innerHTML = ':' + zeroPadInteger(seconds);
|
||||
}
|
||||
|
||||
function _updateTimer() {
|
||||
|
||||
var diff, hours, minutes, seconds,
|
||||
now = new Date();
|
||||
|
||||
diff = now.getTime() - start.getTime();
|
||||
|
||||
clockEl.innerHTML = now.toLocaleTimeString('en-US', {hour12: true, hour: '2-digit', minute: '2-digit'});
|
||||
_displayTime(hoursEl, minutesEl, secondsEl, diff);
|
||||
if (timings !== null) {
|
||||
_updatePacing(diff);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function _updatePacing(diff) {
|
||||
|
||||
var slideEndTiming = getTimeAllocated(timings) * 1000;
|
||||
var currentSlide = Reveal.getSlidePastCount();
|
||||
var currentSlideTiming = timings[currentSlide] * 1000;
|
||||
var timeLeftCurrentSlide = slideEndTiming - diff;
|
||||
if (timeLeftCurrentSlide < 0) {
|
||||
pacingEl.className = 'pacing behind';
|
||||
} else if (timeLeftCurrentSlide < currentSlideTiming) {
|
||||
pacingEl.className = 'pacing on-track';
|
||||
} else {
|
||||
pacingEl.className = 'pacing ahead';
|
||||
}
|
||||
_displayTime(pacingHoursEl, pacingMinutesEl, pacingSecondsEl, timeLeftCurrentSlide);
|
||||
|
||||
}
|
||||
|
||||
// Update once directly
|
||||
_updateTimer();
|
||||
|
||||
// Then update every second
|
||||
setInterval(_updateTimer, 1000);
|
||||
|
||||
function _resetTimer() {
|
||||
|
||||
if (timings == null) {
|
||||
start = new Date();
|
||||
} else {
|
||||
// Reset timer to beginning of current slide
|
||||
var slideEndTiming = getTimeAllocated(timings) * 1000;
|
||||
var currentSlide = Reveal.getSlidePastCount();
|
||||
var currentSlideTiming = timings[currentSlide] * 1000;
|
||||
var previousSlidesTiming = slideEndTiming - currentSlideTiming;
|
||||
var now = new Date();
|
||||
start = new Date(now.getTime() - previousSlidesTiming);
|
||||
}
|
||||
_updateTimer();
|
||||
|
||||
}
|
||||
|
||||
timeEl.addEventListener('click', function () {
|
||||
_resetTimer();
|
||||
return false;
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets up the speaker view layout and layout selector.
|
||||
*/
|
||||
function setupLayout() {
|
||||
|
||||
layoutDropdown = document.querySelector('.speaker-layout-dropdown');
|
||||
layoutLabel = document.querySelector('.speaker-layout-label');
|
||||
|
||||
// Render the list of available layouts
|
||||
for (var id in SPEAKER_LAYOUTS) {
|
||||
var option = document.createElement('option');
|
||||
option.setAttribute('value', id);
|
||||
option.textContent = SPEAKER_LAYOUTS[id];
|
||||
layoutDropdown.appendChild(option);
|
||||
}
|
||||
|
||||
// Monitor the dropdown for changes
|
||||
layoutDropdown.addEventListener('change', function (event) {
|
||||
|
||||
setLayout(layoutDropdown.value);
|
||||
|
||||
}, false);
|
||||
|
||||
// Restore any currently persisted layout
|
||||
setLayout(getLayout());
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a new speaker view layout. The layout is persisted
|
||||
* in local storage.
|
||||
*/
|
||||
function setLayout(value) {
|
||||
|
||||
var title = SPEAKER_LAYOUTS[value];
|
||||
|
||||
layoutLabel.innerHTML = 'Layout' + (title ? (': ' + title) : '');
|
||||
layoutDropdown.value = value;
|
||||
|
||||
document.body.setAttribute('data-speaker-layout', value);
|
||||
|
||||
// Persist locally
|
||||
if (supportsLocalStorage()) {
|
||||
window.localStorage.setItem('reveal-speaker-layout', value);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the ID of the most recently set speaker layout
|
||||
* or our default layout if none has been set.
|
||||
*/
|
||||
function getLayout() {
|
||||
|
||||
if (supportsLocalStorage()) {
|
||||
var layout = window.localStorage.getItem('reveal-speaker-layout');
|
||||
if (layout) {
|
||||
return layout;
|
||||
}
|
||||
}
|
||||
|
||||
// Default to the first record in the layouts hash
|
||||
for (var id in SPEAKER_LAYOUTS) {
|
||||
return id;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function supportsLocalStorage() {
|
||||
|
||||
try {
|
||||
localStorage.setItem('test', 'test');
|
||||
localStorage.removeItem('test');
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function zeroPadInteger(num) {
|
||||
|
||||
var str = '00' + parseInt(num);
|
||||
return str.substring(str.length - 2);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Limits the frequency at which a function can be called.
|
||||
*/
|
||||
function debounce(fn, ms) {
|
||||
|
||||
var lastTime = 0,
|
||||
timeout;
|
||||
|
||||
return function () {
|
||||
|
||||
var args = arguments;
|
||||
var context = this;
|
||||
|
||||
clearTimeout(timeout);
|
||||
|
||||
var timeSinceLastCall = Date.now() - lastTime;
|
||||
if (timeSinceLastCall > ms) {
|
||||
fn.apply(context, args);
|
||||
lastTime = Date.now();
|
||||
} else {
|
||||
timeout = setTimeout(function () {
|
||||
fn.apply(context, args);
|
||||
lastTime = Date.now();
|
||||
}, ms - timeSinceLastCall);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
})();
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,154 +0,0 @@
|
||||
/**
|
||||
* Handles opening of and synchronization with the reveal.js
|
||||
* notes window.
|
||||
*
|
||||
* Handshake process:
|
||||
* 1. This window posts 'connect' to notes window
|
||||
* - Includes URL of presentation to show
|
||||
* 2. Notes window responds with 'connected' when it is available
|
||||
* 3. This window proceeds to send the current presentation state
|
||||
* to the notes window
|
||||
*/
|
||||
var RevealNotes = (function () {
|
||||
|
||||
function openNotes(notesFilePath) {
|
||||
|
||||
if (!notesFilePath) {
|
||||
var jsFileLocation = document.querySelector('script[src$="notes.js"]').src; // this js file path
|
||||
jsFileLocation = jsFileLocation.replace(/notes\.js(\?.*)?$/, ''); // the js folder path
|
||||
notesFilePath = jsFileLocation + 'notes.html';
|
||||
}
|
||||
|
||||
var notesPopup = window.open(notesFilePath, 'reveal.js - Notes', 'width=1100,height=700');
|
||||
|
||||
// Allow popup window access to Reveal API
|
||||
notesPopup.Reveal = this.Reveal;
|
||||
|
||||
/**
|
||||
* Connect to the notes window through a postmessage handshake.
|
||||
* Using postmessage enables us to work in situations where the
|
||||
* origins differ, such as a presentation being opened from the
|
||||
* file system.
|
||||
*/
|
||||
function connect() {
|
||||
// Keep trying to connect until we get a 'connected' message back
|
||||
var connectInterval = setInterval(function () {
|
||||
notesPopup.postMessage(JSON.stringify({
|
||||
namespace: 'reveal-notes',
|
||||
type: 'connect',
|
||||
url: window.location.protocol + '//' + window.location.host + window.location.pathname + window.location.search,
|
||||
state: Reveal.getState()
|
||||
}), '*');
|
||||
}, 500);
|
||||
|
||||
window.addEventListener('message', function (event) {
|
||||
var data = JSON.parse(event.data);
|
||||
if (data && data.namespace === 'reveal-notes' && data.type === 'connected') {
|
||||
clearInterval(connectInterval);
|
||||
onConnected();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Posts the current slide data to the notes window
|
||||
*/
|
||||
function post(event) {
|
||||
|
||||
var slideElement = Reveal.getCurrentSlide(),
|
||||
notesElement = slideElement.querySelector('aside.notes'),
|
||||
fragmentElement = slideElement.querySelector('.current-fragment');
|
||||
|
||||
var messageData = {
|
||||
namespace: 'reveal-notes',
|
||||
type: 'state',
|
||||
notes: '',
|
||||
markdown: false,
|
||||
whitespace: 'normal',
|
||||
state: Reveal.getState()
|
||||
};
|
||||
|
||||
// Look for notes defined in a slide attribute
|
||||
if (slideElement.hasAttribute('data-notes')) {
|
||||
messageData.notes = slideElement.getAttribute('data-notes');
|
||||
messageData.whitespace = 'pre-wrap';
|
||||
}
|
||||
|
||||
// Look for notes defined in a fragment
|
||||
if (fragmentElement) {
|
||||
var fragmentNotes = fragmentElement.querySelector('aside.notes');
|
||||
if (fragmentNotes) {
|
||||
notesElement = fragmentNotes;
|
||||
} else if (fragmentElement.hasAttribute('data-notes')) {
|
||||
messageData.notes = fragmentElement.getAttribute('data-notes');
|
||||
messageData.whitespace = 'pre-wrap';
|
||||
|
||||
// In case there are slide notes
|
||||
notesElement = null;
|
||||
}
|
||||
}
|
||||
|
||||
// Look for notes defined in an aside element
|
||||
if (notesElement) {
|
||||
messageData.notes = notesElement.innerHTML;
|
||||
messageData.markdown = typeof notesElement.getAttribute('data-markdown') === 'string';
|
||||
}
|
||||
|
||||
notesPopup.postMessage(JSON.stringify(messageData), '*');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Called once we have established a connection to the notes
|
||||
* window.
|
||||
*/
|
||||
function onConnected() {
|
||||
|
||||
// Monitor events that trigger a change in state
|
||||
Reveal.addEventListener('slidechanged', post);
|
||||
Reveal.addEventListener('fragmentshown', post);
|
||||
Reveal.addEventListener('fragmenthidden', post);
|
||||
Reveal.addEventListener('overviewhidden', post);
|
||||
Reveal.addEventListener('overviewshown', post);
|
||||
Reveal.addEventListener('paused', post);
|
||||
Reveal.addEventListener('resumed', post);
|
||||
|
||||
// Post the initial state
|
||||
post();
|
||||
|
||||
}
|
||||
|
||||
connect();
|
||||
|
||||
}
|
||||
|
||||
if (!/receiver/i.test(window.location.search)) {
|
||||
|
||||
// If the there's a 'notes' query set, open directly
|
||||
if (window.location.search.match(/(\?|\&)notes/gi) !== null) {
|
||||
openNotes();
|
||||
}
|
||||
|
||||
// Open the notes when the 's' key is hit
|
||||
document.addEventListener('keydown', function (event) {
|
||||
// Disregard the event if the target is editable or a
|
||||
// modifier is present
|
||||
if (document.querySelector(':focus') !== null || event.shiftKey || event.altKey || event.ctrlKey || event.metaKey) return;
|
||||
|
||||
// Disregard the event if keyboard is disabled
|
||||
if (Reveal.getConfig().keyboard === false) return;
|
||||
|
||||
if (event.keyCode === 83) {
|
||||
event.preventDefault();
|
||||
openNotes();
|
||||
}
|
||||
}, false);
|
||||
|
||||
// Show our keyboard shortcut in the reveal.js help overlay
|
||||
if (window.Reveal) Reveal.registerKeyboardShortcut('S', 'Speaker notes view');
|
||||
|
||||
}
|
||||
|
||||
return {open: openNotes};
|
||||
|
||||
})();
|
||||
@@ -1,68 +0,0 @@
|
||||
/**
|
||||
* phantomjs script for printing presentations to PDF.
|
||||
*
|
||||
* Example:
|
||||
* phantomjs print-pdf.js "http://revealjs.com?print-pdf" reveal-demo.pdf
|
||||
*
|
||||
* @author Manuel Bieh (https://github.com/manuelbieh)
|
||||
* @author Hakim El Hattab (https://github.com/hakimel)
|
||||
* @author Manuel Riezebosch (https://github.com/riezebosch)
|
||||
*/
|
||||
|
||||
// html2pdf.js
|
||||
var system = require('system');
|
||||
|
||||
var probePage = new WebPage();
|
||||
var printPage = new WebPage();
|
||||
|
||||
var inputFile = system.args[1] || 'index.html?print-pdf';
|
||||
var outputFile = system.args[2] || 'slides.pdf';
|
||||
|
||||
if (outputFile.match(/\.pdf$/gi) === null) {
|
||||
outputFile += '.pdf';
|
||||
}
|
||||
|
||||
console.log('Export PDF: Reading reveal.js config [1/4]');
|
||||
|
||||
probePage.open(inputFile, function (status) {
|
||||
|
||||
console.log('Export PDF: Preparing print layout [2/4]');
|
||||
|
||||
var config = probePage.evaluate(function () {
|
||||
return Reveal.getConfig();
|
||||
});
|
||||
|
||||
if (config) {
|
||||
|
||||
printPage.paperSize = {
|
||||
width: Math.floor(config.width * (1 + config.margin)),
|
||||
height: Math.floor(config.height * (1 + config.margin)),
|
||||
border: 0
|
||||
};
|
||||
|
||||
printPage.open(inputFile, function (status) {
|
||||
console.log('Export PDF: Preparing pdf [3/4]')
|
||||
printPage.evaluate(function () {
|
||||
Reveal.isReady() ? window.callPhantom() : Reveal.addEventListener('pdf-ready', window.callPhantom);
|
||||
});
|
||||
});
|
||||
|
||||
printPage.onCallback = function (data) {
|
||||
// For some reason we need to "jump the queue" for syntax highlighting to work.
|
||||
// See: http://stackoverflow.com/a/3580132/129269
|
||||
setTimeout(function () {
|
||||
console.log('Export PDF: Writing file [4/4]');
|
||||
printPage.render(outputFile);
|
||||
console.log('Export PDF: Finished successfully!');
|
||||
phantom.exit();
|
||||
}, 0);
|
||||
};
|
||||
} else {
|
||||
|
||||
console.log('Export PDF: Unable to read reveal.js config. Make sure the input address points to a reveal.js page.');
|
||||
phantom.exit(1);
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -1,198 +0,0 @@
|
||||
/*
|
||||
* Handles finding a text string anywhere in the slides and showing the next occurrence to the user
|
||||
* by navigatating to that slide and highlighting it.
|
||||
*
|
||||
* By Jon Snyder <snyder.jon@gmail.com>, February 2013
|
||||
*/
|
||||
|
||||
var RevealSearch = (function () {
|
||||
|
||||
var matchedSlides;
|
||||
var currentMatchedIndex;
|
||||
var searchboxDirty;
|
||||
var myHilitor;
|
||||
|
||||
// Original JavaScript code by Chirp Internet: www.chirp.com.au
|
||||
// Please acknowledge use of this code by including this header.
|
||||
// 2/2013 jon: modified regex to display any match, not restricted to word boundaries.
|
||||
|
||||
function Hilitor(id, tag) {
|
||||
|
||||
var targetNode = document.getElementById(id) || document.body;
|
||||
var hiliteTag = tag || "EM";
|
||||
var skipTags = new RegExp("^(?:" + hiliteTag + "|SCRIPT|FORM)$");
|
||||
var colors = ["#ff6", "#a0ffff", "#9f9", "#f99", "#f6f"];
|
||||
var wordColor = [];
|
||||
var colorIdx = 0;
|
||||
var matchRegex = "";
|
||||
var matchingSlides = [];
|
||||
|
||||
this.setRegex = function (input) {
|
||||
input = input.replace(/^[^\w]+|[^\w]+$/g, "").replace(/[^\w'-]+/g, "|");
|
||||
matchRegex = new RegExp("(" + input + ")", "i");
|
||||
}
|
||||
|
||||
this.getRegex = function () {
|
||||
return matchRegex.toString().replace(/^\/\\b\(|\)\\b\/i$/g, "").replace(/\|/g, " ");
|
||||
}
|
||||
|
||||
// recursively apply word highlighting
|
||||
this.hiliteWords = function (node) {
|
||||
if (node == undefined || !node) return;
|
||||
if (!matchRegex) return;
|
||||
if (skipTags.test(node.nodeName)) return;
|
||||
|
||||
if (node.hasChildNodes()) {
|
||||
for (var i = 0; i < node.childNodes.length; i++)
|
||||
this.hiliteWords(node.childNodes[i]);
|
||||
}
|
||||
if (node.nodeType == 3) { // NODE_TEXT
|
||||
if ((nv = node.nodeValue) && (regs = matchRegex.exec(nv))) {
|
||||
//find the slide's section element and save it in our list of matching slides
|
||||
var secnode = node;
|
||||
while (secnode != null && secnode.nodeName != 'SECTION') {
|
||||
secnode = secnode.parentNode;
|
||||
}
|
||||
|
||||
var slideIndex = Reveal.getIndices(secnode);
|
||||
var slidelen = matchingSlides.length;
|
||||
var alreadyAdded = false;
|
||||
for (var i = 0; i < slidelen; i++) {
|
||||
if ((matchingSlides[i].h === slideIndex.h) && (matchingSlides[i].v === slideIndex.v)) {
|
||||
alreadyAdded = true;
|
||||
}
|
||||
}
|
||||
if (!alreadyAdded) {
|
||||
matchingSlides.push(slideIndex);
|
||||
}
|
||||
|
||||
if (!wordColor[regs[0].toLowerCase()]) {
|
||||
wordColor[regs[0].toLowerCase()] = colors[colorIdx++ % colors.length];
|
||||
}
|
||||
|
||||
var match = document.createElement(hiliteTag);
|
||||
match.appendChild(document.createTextNode(regs[0]));
|
||||
match.style.backgroundColor = wordColor[regs[0].toLowerCase()];
|
||||
match.style.fontStyle = "inherit";
|
||||
match.style.color = "#000";
|
||||
|
||||
var after = node.splitText(regs.index);
|
||||
after.nodeValue = after.nodeValue.substring(regs[0].length);
|
||||
node.parentNode.insertBefore(match, after);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// remove highlighting
|
||||
this.remove = function () {
|
||||
var arr = document.getElementsByTagName(hiliteTag);
|
||||
while (arr.length && (el = arr[0])) {
|
||||
el.parentNode.replaceChild(el.firstChild, el);
|
||||
}
|
||||
};
|
||||
|
||||
// start highlighting at target node
|
||||
this.apply = function (input) {
|
||||
if (input == undefined || !input) return;
|
||||
this.remove();
|
||||
this.setRegex(input);
|
||||
this.hiliteWords(targetNode);
|
||||
return matchingSlides;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
function openSearch() {
|
||||
//ensure the search term input dialog is visible and has focus:
|
||||
var inputboxdiv = document.getElementById("searchinputdiv");
|
||||
var inputbox = document.getElementById("searchinput");
|
||||
inputboxdiv.style.display = "inline";
|
||||
inputbox.focus();
|
||||
inputbox.select();
|
||||
}
|
||||
|
||||
function closeSearch() {
|
||||
var inputboxdiv = document.getElementById("searchinputdiv");
|
||||
inputboxdiv.style.display = "none";
|
||||
if (myHilitor) myHilitor.remove();
|
||||
}
|
||||
|
||||
function toggleSearch() {
|
||||
var inputboxdiv = document.getElementById("searchinputdiv");
|
||||
if (inputboxdiv.style.display !== "inline") {
|
||||
openSearch();
|
||||
} else {
|
||||
closeSearch();
|
||||
}
|
||||
}
|
||||
|
||||
function doSearch() {
|
||||
//if there's been a change in the search term, perform a new search:
|
||||
if (searchboxDirty) {
|
||||
var searchstring = document.getElementById("searchinput").value;
|
||||
|
||||
if (searchstring === '') {
|
||||
if (myHilitor) myHilitor.remove();
|
||||
matchedSlides = null;
|
||||
} else {
|
||||
//find the keyword amongst the slides
|
||||
myHilitor = new Hilitor("slidecontent");
|
||||
matchedSlides = myHilitor.apply(searchstring);
|
||||
currentMatchedIndex = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (matchedSlides) {
|
||||
//navigate to the next slide that has the keyword, wrapping to the first if necessary
|
||||
if (matchedSlides.length && (matchedSlides.length <= currentMatchedIndex)) {
|
||||
currentMatchedIndex = 0;
|
||||
}
|
||||
if (matchedSlides.length > currentMatchedIndex) {
|
||||
Reveal.slide(matchedSlides[currentMatchedIndex].h, matchedSlides[currentMatchedIndex].v);
|
||||
currentMatchedIndex++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var dom = {};
|
||||
dom.wrapper = document.querySelector('.reveal');
|
||||
|
||||
if (!dom.wrapper.querySelector('.searchbox')) {
|
||||
var searchElement = document.createElement('div');
|
||||
searchElement.id = "searchinputdiv";
|
||||
searchElement.classList.add('searchdiv');
|
||||
searchElement.style.position = 'absolute';
|
||||
searchElement.style.top = '10px';
|
||||
searchElement.style.right = '10px';
|
||||
searchElement.style.zIndex = 10;
|
||||
//embedded base64 search icon Designed by Sketchdock - http://www.sketchdock.com/:
|
||||
searchElement.innerHTML = '<span><input type="search" id="searchinput" class="searchinput" style="vertical-align: top;"/><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAJiSURBVHjatFZNaxNBGH5md+Mmu92NVdKDRipSAyqCghgQD4L4cRe86UUtAQ+eFCxoa4/25EXBFi8eBE+eRPoDhB6KgiiixdAPCEkx2pjvTXadd9yNsflwuyUDD/O+u8PzzDPvzOwyx3EwyCZhwG3gAkp7MnpjgbopjsltcD4gjuXZZKeAR348MYLYTm3LzOs/y3j3JTfZxgXWXmTuwPHIc4VmoOmv5IrI53+AO2DdHLjkDWQ3GoEEVFXtXQOvkSnPWcyUceviLhwbDYv8/XIVj97kse7TodLvZXxYxrPUHkQ1ufXs3FEdybEIxucySOesoNvUgWU1cP3MkCBfTFdw9fGaAMVmRELq7LBw2Q3/FaAxxWIRpw+ZIr/7IouPqzUBiqmdHAv7EuhRAwf1er2Vy4x1jW3b2d5Jfvu5IPp7l2LYbcgCFFNb+FoJ7oBqEAqFMPNqFcmEgVMJDfMT+1tvN0pNjERlMS6QA5pFOKxiKVPFhakPeL3It+WGJUDxt2wFR+JhzI7v5ctkd8DXOZAkCYYxhO+lKm4+Xfqz/rIixBuNBl7eOYzkQQNzqX249mRl6zUgEcYkaJrGhUwBinVdh6IouPzwE6/DL5w4oLkH8y981aDf+uq6hlKpJESiUdNfDZi7/ehG9K6KfiA3pml0PLcsq+cSMTj2NL9ukc4UOmz7AZ3+crkC4mHujFvXNaMFB3bEr8xPS6p5O+jXxq4VZtaen7/PwzrntjcLUE0iHPS1Ud1cdiEJl/8WivZk0wXd7zWOMkeF8s0CcAmkNrC2nvXZDbbbN73ccYnZoH9bfgswAFzAe9/h3dbKAAAAAElFTkSuQmCC" id="searchbutton" class="searchicon" style="vertical-align: top; margin-top: -1px;"/></span>';
|
||||
dom.wrapper.appendChild(searchElement);
|
||||
}
|
||||
|
||||
document.getElementById("searchbutton").addEventListener('click', function (event) {
|
||||
doSearch();
|
||||
}, false);
|
||||
|
||||
document.getElementById("searchinput").addEventListener('keyup', function (event) {
|
||||
switch (event.keyCode) {
|
||||
case 13:
|
||||
event.preventDefault();
|
||||
doSearch();
|
||||
searchboxDirty = false;
|
||||
break;
|
||||
default:
|
||||
searchboxDirty = true;
|
||||
}
|
||||
}, false);
|
||||
|
||||
document.addEventListener('keydown', function (event) {
|
||||
if (event.key == "F" && (event.ctrlKey || event.metaKey)) {//Control+Shift+f
|
||||
event.preventDefault();
|
||||
toggleSearch();
|
||||
}
|
||||
}, false);
|
||||
if (window.Reveal) Reveal.registerKeyboardShortcut('Ctrl-Shift-F', 'Search');
|
||||
closeSearch();
|
||||
return {open: openSearch};
|
||||
})();
|
||||
@@ -1,273 +0,0 @@
|
||||
// Custom reveal.js integration
|
||||
(function () {
|
||||
var revealElement = document.querySelector('.reveal');
|
||||
if (revealElement) {
|
||||
|
||||
revealElement.addEventListener('mousedown', function (event) {
|
||||
var defaultModifier = /Linux/.test(window.navigator.platform) ? 'ctrl' : 'alt';
|
||||
|
||||
var modifier = (Reveal.getConfig().zoomKey ? Reveal.getConfig().zoomKey : defaultModifier) + 'Key';
|
||||
var zoomLevel = (Reveal.getConfig().zoomLevel ? Reveal.getConfig().zoomLevel : 2);
|
||||
|
||||
if (event[modifier] && !Reveal.isOverview()) {
|
||||
event.preventDefault();
|
||||
|
||||
zoom.to({
|
||||
x: event.clientX,
|
||||
y: event.clientY,
|
||||
scale: zoomLevel,
|
||||
pan: false
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
})();
|
||||
|
||||
/*!
|
||||
* zoom.js 0.3 (modified for use with reveal.js)
|
||||
* http://lab.hakim.se/zoom-js
|
||||
* MIT licensed
|
||||
*
|
||||
* Copyright (C) 2011-2014 Hakim El Hattab, http://hakim.se
|
||||
*/
|
||||
var zoom = (function () {
|
||||
|
||||
// The current zoom level (scale)
|
||||
var level = 1;
|
||||
|
||||
// The current mouse position, used for panning
|
||||
var mouseX = 0,
|
||||
mouseY = 0;
|
||||
|
||||
// Timeout before pan is activated
|
||||
var panEngageTimeout = -1,
|
||||
panUpdateInterval = -1;
|
||||
|
||||
// Check for transform support so that we can fallback otherwise
|
||||
var supportsTransforms = 'WebkitTransform' in document.body.style ||
|
||||
'MozTransform' in document.body.style ||
|
||||
'msTransform' in document.body.style ||
|
||||
'OTransform' in document.body.style ||
|
||||
'transform' in document.body.style;
|
||||
|
||||
if (supportsTransforms) {
|
||||
// The easing that will be applied when we zoom in/out
|
||||
document.body.style.transition = 'transform 0.8s ease';
|
||||
document.body.style.OTransition = '-o-transform 0.8s ease';
|
||||
document.body.style.msTransition = '-ms-transform 0.8s ease';
|
||||
document.body.style.MozTransition = '-moz-transform 0.8s ease';
|
||||
document.body.style.WebkitTransition = '-webkit-transform 0.8s ease';
|
||||
}
|
||||
|
||||
// Zoom out if the user hits escape
|
||||
document.addEventListener('keyup', function (event) {
|
||||
if (level !== 1 && event.keyCode === 27) {
|
||||
zoom.out();
|
||||
}
|
||||
});
|
||||
|
||||
// Monitor mouse movement for panning
|
||||
document.addEventListener('mousemove', function (event) {
|
||||
if (level !== 1) {
|
||||
mouseX = event.clientX;
|
||||
mouseY = event.clientY;
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Applies the CSS required to zoom in, prefers the use of CSS3
|
||||
* transforms but falls back on zoom for IE.
|
||||
*
|
||||
* @param {Object} rect
|
||||
* @param {Number} scale
|
||||
*/
|
||||
function magnify(rect, scale) {
|
||||
|
||||
var scrollOffset = getScrollOffset();
|
||||
|
||||
// Ensure a width/height is set
|
||||
rect.width = rect.width || 1;
|
||||
rect.height = rect.height || 1;
|
||||
|
||||
// Center the rect within the zoomed viewport
|
||||
rect.x -= (window.innerWidth - (rect.width * scale)) / 2;
|
||||
rect.y -= (window.innerHeight - (rect.height * scale)) / 2;
|
||||
|
||||
if (supportsTransforms) {
|
||||
// Reset
|
||||
if (scale === 1) {
|
||||
document.body.style.transform = '';
|
||||
document.body.style.OTransform = '';
|
||||
document.body.style.msTransform = '';
|
||||
document.body.style.MozTransform = '';
|
||||
document.body.style.WebkitTransform = '';
|
||||
}
|
||||
// Scale
|
||||
else {
|
||||
var origin = scrollOffset.x + 'px ' + scrollOffset.y + 'px',
|
||||
transform = 'translate(' + -rect.x + 'px,' + -rect.y + 'px) scale(' + scale + ')';
|
||||
|
||||
document.body.style.transformOrigin = origin;
|
||||
document.body.style.OTransformOrigin = origin;
|
||||
document.body.style.msTransformOrigin = origin;
|
||||
document.body.style.MozTransformOrigin = origin;
|
||||
document.body.style.WebkitTransformOrigin = origin;
|
||||
|
||||
document.body.style.transform = transform;
|
||||
document.body.style.OTransform = transform;
|
||||
document.body.style.msTransform = transform;
|
||||
document.body.style.MozTransform = transform;
|
||||
document.body.style.WebkitTransform = transform;
|
||||
}
|
||||
} else {
|
||||
// Reset
|
||||
if (scale === 1) {
|
||||
document.body.style.position = '';
|
||||
document.body.style.left = '';
|
||||
document.body.style.top = '';
|
||||
document.body.style.width = '';
|
||||
document.body.style.height = '';
|
||||
document.body.style.zoom = '';
|
||||
}
|
||||
// Scale
|
||||
else {
|
||||
document.body.style.position = 'relative';
|
||||
document.body.style.left = (-(scrollOffset.x + rect.x) / scale) + 'px';
|
||||
document.body.style.top = (-(scrollOffset.y + rect.y) / scale) + 'px';
|
||||
document.body.style.width = (scale * 100) + '%';
|
||||
document.body.style.height = (scale * 100) + '%';
|
||||
document.body.style.zoom = scale;
|
||||
}
|
||||
}
|
||||
|
||||
level = scale;
|
||||
|
||||
if (document.documentElement.classList) {
|
||||
if (level !== 1) {
|
||||
document.documentElement.classList.add('zoomed');
|
||||
} else {
|
||||
document.documentElement.classList.remove('zoomed');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Pan the document when the mosue cursor approaches the edges
|
||||
* of the window.
|
||||
*/
|
||||
function pan() {
|
||||
var range = 0.12,
|
||||
rangeX = window.innerWidth * range,
|
||||
rangeY = window.innerHeight * range,
|
||||
scrollOffset = getScrollOffset();
|
||||
|
||||
// Up
|
||||
if (mouseY < rangeY) {
|
||||
window.scroll(scrollOffset.x, scrollOffset.y - (1 - (mouseY / rangeY)) * (14 / level));
|
||||
}
|
||||
// Down
|
||||
else if (mouseY > window.innerHeight - rangeY) {
|
||||
window.scroll(scrollOffset.x, scrollOffset.y + (1 - (window.innerHeight - mouseY) / rangeY) * (14 / level));
|
||||
}
|
||||
|
||||
// Left
|
||||
if (mouseX < rangeX) {
|
||||
window.scroll(scrollOffset.x - (1 - (mouseX / rangeX)) * (14 / level), scrollOffset.y);
|
||||
}
|
||||
// Right
|
||||
else if (mouseX > window.innerWidth - rangeX) {
|
||||
window.scroll(scrollOffset.x + (1 - (window.innerWidth - mouseX) / rangeX) * (14 / level), scrollOffset.y);
|
||||
}
|
||||
}
|
||||
|
||||
function getScrollOffset() {
|
||||
return {
|
||||
x: window.scrollX !== undefined ? window.scrollX : window.pageXOffset,
|
||||
y: window.scrollY !== undefined ? window.scrollY : window.pageYOffset
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
/**
|
||||
* Zooms in on either a rectangle or HTML element.
|
||||
*
|
||||
* @param {Object} options
|
||||
* - element: HTML element to zoom in on
|
||||
* OR
|
||||
* - x/y: coordinates in non-transformed space to zoom in on
|
||||
* - width/height: the portion of the screen to zoom in on
|
||||
* - scale: can be used instead of width/height to explicitly set scale
|
||||
*/
|
||||
to: function (options) {
|
||||
|
||||
// Due to an implementation limitation we can't zoom in
|
||||
// to another element without zooming out first
|
||||
if (level !== 1) {
|
||||
zoom.out();
|
||||
} else {
|
||||
options.x = options.x || 0;
|
||||
options.y = options.y || 0;
|
||||
|
||||
// If an element is set, that takes precedence
|
||||
if (!!options.element) {
|
||||
// Space around the zoomed in element to leave on screen
|
||||
var padding = 20;
|
||||
var bounds = options.element.getBoundingClientRect();
|
||||
|
||||
options.x = bounds.left - padding;
|
||||
options.y = bounds.top - padding;
|
||||
options.width = bounds.width + (padding * 2);
|
||||
options.height = bounds.height + (padding * 2);
|
||||
}
|
||||
|
||||
// If width/height values are set, calculate scale from those values
|
||||
if (options.width !== undefined && options.height !== undefined) {
|
||||
options.scale = Math.max(Math.min(window.innerWidth / options.width, window.innerHeight / options.height), 1);
|
||||
}
|
||||
|
||||
if (options.scale > 1) {
|
||||
options.x *= options.scale;
|
||||
options.y *= options.scale;
|
||||
|
||||
magnify(options, options.scale);
|
||||
|
||||
if (options.pan !== false) {
|
||||
|
||||
// Wait with engaging panning as it may conflict with the
|
||||
// zoom transition
|
||||
panEngageTimeout = setTimeout(function () {
|
||||
panUpdateInterval = setInterval(pan, 1000 / 60);
|
||||
}, 800);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Resets the document zoom state to its default.
|
||||
*/
|
||||
out: function () {
|
||||
clearTimeout(panEngageTimeout);
|
||||
clearInterval(panUpdateInterval);
|
||||
|
||||
magnify({x: 0, y: 0}, 1);
|
||||
|
||||
level = 1;
|
||||
},
|
||||
|
||||
// Alias
|
||||
magnify: function (options) {
|
||||
this.to(options)
|
||||
},
|
||||
reset: function () {
|
||||
this.out()
|
||||
},
|
||||
|
||||
zoomLevel: function () {
|
||||
return level;
|
||||
}
|
||||
}
|
||||
|
||||
})();
|
||||
|
Before Width: | Height: | Size: 206 KiB |
|
Before Width: | Height: | Size: 118 KiB |
@@ -1,6 +0,0 @@
|
||||
The files and folders in this folder (folder slides) are based on reveal.js
|
||||
|
||||
MIT licensed
|
||||
Copyright (C) 2015 Hakim El Hattab, http://hakim.se
|
||||
|
||||
see https://github.com/hakimel/reveal.js/
|
||||