Rename docs to site (#1550)
Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
13
docs/.gitignore
vendored
@@ -1,13 +0,0 @@
|
||||
# rest api doc
|
||||
content/rest-api/*.json
|
||||
content/rest-api/*.html
|
||||
content/rest-api/*.yaml
|
||||
# npm leftover
|
||||
node_modules
|
||||
package.json
|
||||
package-lock.json
|
||||
# themes
|
||||
themes/hugo-material-docs
|
||||
# hugo
|
||||
public
|
||||
.hugo_build.lock
|
||||
@@ -1,26 +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}/content/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}/content/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"
|
||||
|
||||
|
||||
115
docs/config.toml
@@ -1,115 +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"
|
||||
|
||||
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 = "Management UI"
|
||||
url = "/ui/"
|
||||
weight = 70
|
||||
|
||||
[[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,36 +0,0 @@
|
||||
---
|
||||
title: Direct Device Integration API
|
||||
parent: APIs
|
||||
weight: 82
|
||||
---
|
||||
|
||||
The hawkBit [update server](https://github.com/eclipse/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
|
||||
|
||||
## DDI APIs
|
||||
|
||||
<iframe style="padding-top: 20px;" width="100%" height="900px" frameborder="0" src="../../rest-api/ddi.html"></iframe>
|
||||
@@ -1,588 +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",
|
||||
"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 />
|
||||
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/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/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"]
|
||||
}
|
||||
```
|
||||
|
||||
Possible [actionStatus](https://github.com/eclipse/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"]
|
||||
}
|
||||
```
|
||||
|
||||
### 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."]
|
||||
}
|
||||
```
|
||||
|
||||
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."]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
### 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/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":"md5hash",
|
||||
"sha1":"sha1hash"
|
||||
},
|
||||
"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/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":"md5hash",
|
||||
"sha1":"sha1hash"
|
||||
},
|
||||
"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":"md5hash",
|
||||
"sha1":"sha1hash"
|
||||
},
|
||||
"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,69 +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,114 +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/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/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/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,20 +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/issues/1393) and
|
||||
[Update hawkBit's license to EPL 2.0](https://github.com/eclipse/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,29 +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/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,27 +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/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/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/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/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,45 +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/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/blob/master/CONTRIBUTING.md) on the Eclipse hawkBit GitHub Repository.
|
||||
@@ -1,268 +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.
|
||||
- _Management UI_ by **users**.
|
||||
<!--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 /SPDEMO/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 **and** in the tenant configuration. That allows both the operator as well as the individual customer (if run in a multi-tenant setup) to enable this access method. See [DdiSecurityProperties](https://github.com/eclipse/hawkbit/blob/master/hawkbit-security-core/src/main/java/org/eclipse/hawkbit/security/DdiSecurityProperties.java) for system wide enablement.
|
||||
|
||||
The additional activation for the individual tenant:
|
||||
|
||||

|
||||
|
||||
#### 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 /SPDEMO/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 **and** in the tenant configuration. That allows both the operator as well as the individual customer (if run in a multi-tenant setup) to enable this access method. See [DdiSecurityProperties](https://github.com/eclipse/hawkbit/blob/master/hawkbit-security-core/src/main/java/org/eclipse/hawkbit/security/DdiSecurityProperties.java) for system wide enablement.
|
||||
|
||||
The additional activation for the individual tenant:
|
||||
|
||||

|
||||
|
||||
#### Anonymous access
|
||||
Here we offer general anonymous access for all targets (see [DdiSecurityProperties](https://github.com/eclipse/hawkbit/blob/master/hawkbit-security-core/src/main/java/org/eclipse/hawkbit/security/DdiSecurityProperties.java)) which we consider not really sufficient for a production system but it might come in handy to get a project started in the beginning.
|
||||
|
||||
However, anonymous download on the other side might be interesting even in production for scenarios where the artifact itself is already encrypted.
|
||||
|
||||
The activation for the individual tenant:
|
||||
|
||||

|
||||
|
||||
### 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 SSL Issuer(s) hash of the presented client certificate shall be set for the tenant. For that, in Hawkbit's UI section, under system configuration, you shall enable 'Allow targets to authenticate via a certificate by an reverse proxy' and set the hash of the client certificate issuer(s) (as a comma separated list).
|
||||
|
||||

|
||||
|
||||
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
|
||||
|
||||
## Management UI
|
||||
- Login Dialog
|
||||
- OpenID Connect
|
||||
|
||||
@@ -1,98 +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/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/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.server.im.users[0].username=admin
|
||||
hawkbit.server.im.users[0].password={noop}admin
|
||||
hawkbit.server.im.users[0].firstname=Test
|
||||
hawkbit.server.im.users[0].lastname=Admin
|
||||
hawkbit.server.im.users[0].email=admin@test.de
|
||||
hawkbit.server.im.users[0].permissions=ALL
|
||||
|
||||
hawkbit.server.im.users[1].username=test
|
||||
hawkbit.server.im.users[1].password={noop}test
|
||||
hawkbit.server.im.users[1].firstname=Test
|
||||
hawkbit.server.im.users[1].lastname=Tester
|
||||
hawkbit.server.im.users[1].email=test@tester.com
|
||||
hawkbit.server.im.users[1].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. However, by registering a Spring bean _org.eclipse.hawkbit.autoconfigure.security.OidcUserManagementAutoConfiguration.JwtAuthoritiesExtractor_ a custom extractor permission mapper could be registered.
|
||||
|
||||
### 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
|
||||
|
||||
- READ_TARGET_SECURITY_TOKEN
|
||||
- Permission to read the target security token. The security token is security concerned and should be protected.
|
||||
|
||||
- DOWNLOAD_REPOSITORY_ARTIFACT
|
||||
- Permission to download artifacts of a software module (Note: READ_REPOSITORY allows only to read the metadata).
|
||||
|
||||
- TENANT_CONFIGURATION
|
||||
- Permission to 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,50 +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 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,77 +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,21 +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,69 +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 UI or 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.
|
||||
|
||||
## Management UI
|
||||
- Create/Read/Update/Delete operations for provisioning targets (i.e. devices) and repository content (i.e. software).
|
||||
- Manage and monitor software update operations.
|
||||
- Optimized for professional users, e.g. administrators, developers and 2nd/3rd level support staff.
|
||||
- Ease of use drag-and-drop paradigm.
|
||||
- Flexible grouping of data.
|
||||
- Flexible filters for data browsing.
|
||||
- Responsive to resolution.
|
||||
- Lazy loading of data.
|
||||
- All information on one page.
|
||||
- Deep-linking for Targets to improve navigation.
|
||||
|
||||
## 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,93 +0,0 @@
|
||||
---
|
||||
title: Getting Started
|
||||
weight: 20
|
||||
---
|
||||
|
||||
## On Sandbox
|
||||
|
||||
We offer a sandbox installation that is free for everyone to try out hawkBit's [Management UI](/hawkbit/ui/),
|
||||
[Management API](/hawkbit/apis/management_api/), and [Direct Device Integration API](/hawkbit/apis/ddi_api/):
|
||||
**[<i class="fas fa-desktop"> </i> https://hawkbit.eclipseprojects.io](https://hawkbit.eclipseprojects.io)**
|
||||
|
||||
{{% warning %}}
|
||||
The sandbox is a shared installation that will be reset from time to time. Therefore, it is not allowed to upload
|
||||
any personal data.
|
||||
{{% /warning %}}
|
||||
|
||||
In addition, the following vendors offer free trial accounts for their Eclipse hawkBit compatible products:
|
||||
|
||||
* [Bosch IoT Rollouts](https://bosch-iot-suite.com/service/rollouts/) (by [Bosch Digital](https://www.bosch-digital.com))
|
||||
* [Kynetics Update Factory](https://www.kynetics.com/update-factory) (by [Kynetics LLC](https://www.kynetics.com/))
|
||||
|
||||
|
||||
## From Docker Image
|
||||
|
||||
### Overview
|
||||
|
||||
HawkBit Update Server username/password -> admin/admin as default login credentials. They can be overridden by the environment variables spring.security.user.name and spring.security.user.password which are defined in the corresponding default [application.properties](hawkbit-runtime/hawkbit-update-server/src/main/resources/application.properties).
|
||||
|
||||
It supports two configurations:
|
||||
* monolith - hawkbit-update-server
|
||||
* micro-service - hawkbit-mgmt-server, hawkbit-ddi-server, hawkbit-dmf-server, hawkbit-vv8-ui.
|
||||
|
||||
### 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
|
||||
```
|
||||
|
||||
### B: Run hawkBit Update Server (Monolith) with services as Docker Compose
|
||||
|
||||
Start the hawkBit Update Server together with an MySQL and RabbitMQ instance as containers
|
||||
|
||||
```bash
|
||||
$ git clone https://github.com/eclipse/hawkbit.git
|
||||
$ cd hawkbit/hawkbit-runtime/docker
|
||||
$ docker-compose -f docker-compose-monolith-mysql.yml up -d
|
||||
```
|
||||
|
||||
### C: Run hawkBit Update Server (Micro-Service) with services as Docker Compose
|
||||
|
||||
Start the hawkBit Update Server together with an MySQL and RabbitMQ instance as containers
|
||||
|
||||
```bash
|
||||
$ git clone https://github.com/eclipse/hawkbit.git
|
||||
$ cd hawkbit/hawkbit-runtime/docker
|
||||
$ docker-compose -f docker-compose-micro-service-mysql.yml up -d
|
||||
```
|
||||
|
||||
## From Sources
|
||||
|
||||
### 1: Clone and build hawkBit
|
||||
```sh
|
||||
$ git clone https://github.com/eclipse/hawkbit.git
|
||||
$ cd hawkbit
|
||||
$ mvn clean install
|
||||
```
|
||||
|
||||
### 2: Start hawkBit [update server](https://github.com/eclipse/hawkbit/tree/master/hawkbit-runtime/hawkbit-update-server) (Monolith)
|
||||
|
||||
```sh
|
||||
$ java -jar ./hawkbit-runtime/hawkbit-update-server/target/hawkbit-update-server-#version#-SNAPSHOT.jar
|
||||
```
|
||||
|
||||
### 3: Build hawkBit examples
|
||||
|
||||
```sh
|
||||
$ git clone https://github.com/eclipse/hawkbit-examples.git
|
||||
$ cd hawkbit-examples
|
||||
$ mvn clean install
|
||||
```
|
||||
|
||||
### 4: Start hawkBit [Device Simulator](https://github.com/eclipse/hawkbit-examples/tree/master/hawkbit-device-simulator)
|
||||
```sh
|
||||
$ java -jar ./hawkbit-device-simulator/target/hawkbit-device-simulator-#version#.jar
|
||||
```
|
||||
|
||||
### 5: Generate Getting Started data with [Example Management API Client](https://github.com/eclipse/hawkbit-examples/tree/master/hawkbit-example-mgmt-simulator)
|
||||
|
||||
```sh
|
||||
$ java -jar ./hawkbit-example-mgmt-simulator/target/hawkbit-example-mgmt-simulator-#version#.jar
|
||||
```
|
||||
@@ -1,48 +0,0 @@
|
||||
---
|
||||
title: Clustering
|
||||
parent: Guides
|
||||
weight: 33
|
||||
---
|
||||
|
||||
hawkBit is able to run in a cluster with some constraints. 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/blob/master/hawkbit-runtime/hawkbit-update-server/README.md).
|
||||
<!--more-->
|
||||
|
||||
## Big picture
|
||||
|
||||

|
||||
|
||||
## Events
|
||||
|
||||
Event communication between nodes is based on [Spring Cloud Bus](https://cloud.spring.io/spring-cloud-bus/) and [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. Every node gets his own queue to receive cluster events, the default payload is JSON.
|
||||
If an event is thrown locally at one node, it will be automatically delivered to all other available nodes via the Spring Cloud Bus's topic exchange:
|
||||
|
||||

|
||||
|
||||
Via the ServiceMatcher you can check whether an event happened locally at one node or on a different node.
|
||||
`serviceMatcher.isFromSelf(event)`
|
||||
|
||||
## Caching
|
||||
|
||||
Every node is maintaining its own caches independent from 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.global.ttl" (value in milliseconds). Of course you can implement a shared cache, e.g. Redis.
|
||||
See [CacheAutoConfiguration](https://github.com/eclipse/hawkbit/blob/master/hawkbit-autoconfigure/src/main/java/org/eclipse/hawkbit/autoconfigure/cache/CacheAutoConfiguration.java)
|
||||
|
||||
## 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.
|
||||
|
||||
## Known constraints
|
||||
|
||||
### UI sessions
|
||||
As of today hawkBit is not storing user sessions in a shared, cluster wide cache. Session is only bound to the node where the login took place. If this node is going down for whatever reason, the session is lost and the user is forced to login again.
|
||||
In case that's not an option, you can help yourself by introducing a shared session cache based on e.g. Redis.
|
||||
Furthermore hawkBit is not supporting session stickiness out of the box either. However most of the well known load balancer out there can solve this issue.
|
||||
|
||||
### Caching of download IDs
|
||||
The downloadId is generated and stored in the DownloadIdCache. It is used for downloading an artifact.
|
||||
In hawkBit exists an interface called "[DownloadIdCache](https://github.com/eclipse/hawkbit/blob/master/hawkbit-core/src/main/java/org/eclipse/hawkbit/cache/DownloadIdCache.java)" and one implementation of it: "DefaultDownloadIdCache". This default implementation can't be used within a cluster. Its containing data is only available inside one node and can't be shared with other nodes. E.g. the downloadId which is stored in this cache after authentication on node A can only be used for downloading the artifact by node A.
|
||||
In a cluster-capable environment this fact can lead to issues as it could happen, that the downloadId is stored on node A and node B would like to download the artifact by means of the downloadId which is not available on node B. To solve this issue you can use a cluster-shared cache e.g. Redis or create a new cluster-aware implementation of the interface "DownloadIdCache".
|
||||
|
||||
### Denial-of-Service (DoS) filter
|
||||
hawkBit owns the feature of guarding itself from DoS attacks, a [DoS filter](https://github.com/eclipse/hawkbit/blob/master/hawkbit-security-core/src/main/java/org/eclipse/hawkbit/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,50 +0,0 @@
|
||||
---
|
||||
title: Custom Theme
|
||||
parent: Guides
|
||||
weight: 34
|
||||
---
|
||||
|
||||
This guide provides details about using and creating themes that control the visual look of Eclipse hawkBit Management UI. Theme customization is done using Sass, which is an extension of CSS (Cascading Style Sheets).
|
||||
<!--more-->
|
||||
|
||||
The mechanism described below is the rather simple case by customizing the theme by means of configuring a set of variables as defined by the hawkBit default theme. A full customization be means of copying the hawkBit theme and customize it completely is not described here but of course possible.
|
||||
|
||||
## Example App
|
||||
|
||||
An example application with customized theme can be found [here](https://github.com/eclipse/hawkbit-examples/tree/master/hawkbit-custom-theme-example).
|
||||
|
||||
## Overview
|
||||
Vaadin separates the appearance of the user interface from its logic using themes. Themes can include Sass or CSS style sheets, custom HTML layouts, and any necessary graphics.
|
||||
|
||||
Theme resources can also be accessed from application code as ThemeResource objects. Custom themes are placed under the src/main/resources/VAADIN/themes/ folder of the application.
|
||||
|
||||
This location is fixed -- the VAADIN folder contains static resources that are served by the Vaadin servlet. The servlet augments the files stored in the folder by resources found from corresponding VAADIN folders contained in JARs in the class path.The base theme and all the corresponding custom themes are placed under the above mentioned folder.
|
||||
|
||||
If a new custom theme has to be created, it should always be placed under the src/main/resources/VAADIN/themes/ folder.
|
||||
|
||||
Every custom theme should always refer the base theme and customization can be done by the use of variables mentioned in the XXXXvariable.scss. For details of the creation of the custom theme please refer the next section.
|
||||
|
||||
## Procedure to create a theme
|
||||
- Create a new folder **"XXXtheme"** (significant to the new theme) under src/main/resources/VAADIN/themes/ folder.
|
||||
- Create a folder named as **"customstyles"**.
|
||||
- Create a **XXXvariables.scss** file under **customstyles** folder, putting all the variables inside the same file. For more details about the variables we recommend to take a look at the [hawkBit defaults](https://github.com/eclipse/hawkbit/blob/master/hawkbit-ui/src/main/resources/VAADIN/themes/hawkbit/customstyles/hawkbitvariables.scss).
|
||||
- Create **styles.scss** file under the **"XXXtheme"** folder.
|
||||
- Any images should be placed under the sub folder **"images"** folder.
|
||||
- Within the **_styles.scss_** file, import **XXXvariables.scss** and the base theme (hawkBit theme as mentioned in previous chapter **Overview** . Please find below the syntax:
|
||||
|
||||
```css
|
||||
@import "../hawkbit/customstyles/hawkbitvariables";
|
||||
@import "customstyles/examplevariables";
|
||||
@import "../hawkbit/hawkbittheme";
|
||||
@import "addons";
|
||||
|
||||
.exampletheme {
|
||||
@include addons;
|
||||
@include hawkbittheme;
|
||||
}
|
||||
```
|
||||
|
||||
- Finally the structure should be as in the [example app](https://github.com/eclipse/hawkbit-examples/tree/master/hawkbit-custom-theme-example/src/main/resources/VAADIN).
|
||||
|
||||
## Procedure to add a custom footer
|
||||
- Any footer can be added by creating "footer.html" in **src/main/resources --> VAADIN -- themes --> {XXXtheme} --> layouts** folder. An example can be found [here](https://github.com/eclipse/hawkbit/blob/master/hawkbit-ui/src/main/resources/VAADIN/themes/hawkbit/layouts/footer.html).
|
||||
@@ -1,62 +0,0 @@
|
||||
---
|
||||
title: Feign Client
|
||||
parent: Guides
|
||||
weight: 32
|
||||
---
|
||||
|
||||
In this guide we describe how to create a [Feign](https://github.com/Netflix/feign) Rest Client based on a [Spring Boot](http://projects.spring.io/spring-boot/) Application.
|
||||
<!--more-->
|
||||
|
||||
## Create Feign REST Client
|
||||
hawkBit provides REST interfaces for [Management API](https://github.com/eclipse/hawkbit/tree/master/hawkbit-ddi-api) and [DDI API](https://github.com/eclipse/hawkbit/tree/master/hawkbit-ddi-api). Using this interfaces you can create a feign client with the help of the [feign inheritance support](http://projects.spring.io/spring-cloud/spring-cloud.html#spring-cloud-feign-inheritance).
|
||||
Our [example](https://github.com/eclipse/hawkbit-examples) modules demonstrate how to create [Feign](https://github.com/Netflix/feign) client resources. Here you can find the [Management API client resources](hhttps://github.com/eclipse/hawkbit-examples/tree/master/hawkbit-example-mgmt-feign-client) and the [DDI client resources](https://github.com/eclipse/hawkbit-examples/tree/master/hawkbit-example-ddi-feign-client).
|
||||
A small [simulator application](https://github.com/eclipse/hawkbit-examples/tree/master/hawkbit-example-mgmt-simulator) demonstrates how you can interact with the hawkBit via the [Management API
|
||||
](http://www.eclipse.org/hawkbit/documentation/interfaces/management-api.html).
|
||||
|
||||
## Example Management API simulator
|
||||
|
||||
In the follow code section, you can a see a feign client resource example. The interface extend the origin api interface to declare the `@FeignClient`. The `@FeignClient`declares that a REST client with that interface should be created.
|
||||
|
||||
```Java
|
||||
@FeignClient(url = "${hawkbit.url:localhost:8080}/" + MgmtRestConstants.TARGET_V1_REQUEST_MAPPING)
|
||||
public interface MgmtTargetClientResource extends MgmtTargetRestApi {
|
||||
}
|
||||
```
|
||||
|
||||
This interface can be autowired and use as a normal java interface:
|
||||
|
||||
```Java
|
||||
public class CreateStartedRolloutExample {
|
||||
|
||||
@Autowired
|
||||
private MgmtTargetClientResource targetResource;
|
||||
|
||||
|
||||
public void run() {
|
||||
// create ten targets
|
||||
targetResource.createTargets(new TargetBuilder().controllerId("00-FF-AA-0").name("00-FF-AA-0")
|
||||
.description("Targets used for rollout example").buildAsList(10));
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
At [hawkbit-example-core-feign-client](https://github.com/eclipse/hawkbit-examples/tree/master/hawkbit-example-core-feign-client) is a spring configuration to auto configure some beans, which can be reused for a own feign client.
|
||||
|
||||
```Java
|
||||
@Configuration
|
||||
@ConditionalOnClass(Feign.class)
|
||||
@Import(FeignClientsConfiguration.class)
|
||||
public class FeignClientConfiguration {
|
||||
|
||||
@Bean
|
||||
public ApplicationJsonRequestHeaderInterceptor jsonHeaderInterceptor() {
|
||||
return new ApplicationJsonRequestHeaderInterceptor();
|
||||
}
|
||||
|
||||
@Bean
|
||||
public Contract feignContract() {
|
||||
return new IgnoreMultipleConsumersProducersSpringMvcContract();
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
@@ -1,106 +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 is more like one that you will expect in a production system.
|
||||
|
||||
- hawkBit [Update Server](https://github.com/eclipse/hawkbit/tree/master/hawkbit-runtime/hawkbit-update-server).
|
||||
- [MariaDB](https://mariadb.org) for the repository.
|
||||
- [RabbitMQ](https://www.rabbitmq.com) for DMF communication.
|
||||
- For testing and demonstration purposes we will also use:
|
||||
- [hawkBit Device Simulator](https://github.com/eclipse/hawkbit-examples/tree/master/hawkbit-device-simulator).
|
||||
- [hawkBit Management API example client](https://github.com/eclipse/hawkbit-examples/tree/master/hawkbit-example-mgmt-feign-client).
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- You have a working [hawkBit core build](https://github.com/eclipse/hawkbit).
|
||||
- You have a working [hawkBit examples build](https://github.com/eclipse/hawkbit-examples).
|
||||
|
||||
## 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.
|
||||
|
||||
### Set MariaDB dependency to compile in the [update server POM](https://github.com/eclipse/hawkbit/blob/master/hawkbit-runtime/hawkbit-update-server/pom.xml)
|
||||
|
||||
```xml
|
||||
<dependency>
|
||||
<groupId>org.mariadb.jdbc</groupId>
|
||||
<artifactId>mariadb-java-client</artifactId>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
### 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.url=jdbc:mariadb://localhost:3306/YOUR_SCHEMA
|
||||
spring.datasource.username=YOUR_USER
|
||||
spring.datasource.password=YOUR_PWD
|
||||
spring.datasource.driverClassName=org.mariadb.jdbc.Driver
|
||||
```
|
||||
|
||||
Note: On Ubuntu 18.04 with MariaDB 10.1 installed from the default repository via apt install _COLLATE option_ of database have to be changed manually to "latin1".
|
||||
For recent versions of MariaDB running on Ubuntu this is not required (cf. [system variables](https://mariadb.com/kb/en/differences-in-mariadb-in-debian-and-ubuntu), [issue](https://github.com/eclipse/hawkbit/issues/963))
|
||||
|
||||
### Configure RabbitMQ connection settings for update server and device simulator (optional).
|
||||
|
||||
We provide already defaults that should work with a standard Rabbit installation. Otherwise configure the following in the `application.properties` of the two services:
|
||||
|
||||
```properties
|
||||
spring.rabbitmq.username=guest
|
||||
spring.rabbitmq.password=guest
|
||||
spring.rabbitmq.virtualHost=/
|
||||
spring.rabbitmq.host=localhost
|
||||
spring.rabbitmq.port=5672
|
||||
```
|
||||
|
||||
### Adapt hostname of example scenario [creation script](https://github.com/eclipse/hawkbit-examples/blob/master/hawkbit-example-mgmt-simulator/src/main/resources/application.properties)
|
||||
|
||||
Should only be necessary if your system does not run on localhost or uses a different port than the example app.
|
||||
|
||||
Adapt `application.properties` in this case:
|
||||
|
||||
```properties
|
||||
hawkbit.url=localhost:8080
|
||||
```
|
||||
|
||||
or provide the parameter on command line:
|
||||
|
||||
```properties
|
||||
hawkbit-example-mgmt-simulator-##VERSION##.jar --hawkbit.url=YOUR_HOST:PORT
|
||||
```
|
||||
|
||||
## Compile & Run
|
||||
|
||||
### Compile & Run your _"production ready"_ app
|
||||
|
||||
see [update server](https://github.com/eclipse/hawkbit/tree/master/hawkbit-runtime/hawkbit-update-server)
|
||||
|
||||
### Compile & Run example scenario [creation script](https://github.com/eclipse/hawkbit-examples/tree/master/hawkbit-example-mgmt-simulator) (optional)
|
||||
|
||||
This has to be done before the device simulator is started. hawkBit creates the mandatory tenant metadata with first login into either _Management UI_ or API (which is done by this client).
|
||||
|
||||
However, this is not done by _DMF_ which is in fact used by the device simulator, i.e. without calling _Management API_ first hawkBit would drop all _DMF_ messages as the tenant is unknown.
|
||||
|
||||
### Compile & Run device simulator (optional)
|
||||
|
||||
see [device simulator](https://github.com/eclipse/hawkbit-examples/tree/master/hawkbit-device-simulator)
|
||||
|
||||
# Enjoy hawkBit with a real database, artifact storage and all [interfaces](../../apis/) available
|
||||
|
||||

|
||||
@@ -1,129 +0,0 @@
|
||||
---
|
||||
title: Release notes
|
||||
weight: 100
|
||||
---
|
||||
|
||||
## 0.4.1
|
||||
|
||||
**Release Date:** Friday, January 12, 2024 <br />
|
||||
Hawkbit: [Tag](https://github.com/eclipse/hawkbit/releases/tag/0.4.1) /
|
||||
[Release](https://github.com/eclipse/hawkbit/milestone/25) <br />
|
||||
Extensions: [Tag](https://github.com/eclipse/hawkbit-extensions/releases/tag/0.4.1)
|
||||
|
||||
## 0.3.0
|
||||
|
||||
**Release Date:** Friday, November 17, 2023 <br />
|
||||
Hawkbit: [Tag](https://github.com/eclipse/hawkbit/releases/tag/0.3.0) /
|
||||
[Release](https://github.com/eclipse/hawkbit/milestone/11) <br />
|
||||
Extensions: [Tag](https://github.com/eclipse/hawkbit-extensions/releases/tag/0.3.0)
|
||||
|
||||
## 0.3.0M9
|
||||
|
||||
**Release Date:** Thursday, August 24, 2023 <br />
|
||||
Hawkbit: [Tag](https://github.com/eclipse/hawkbit/releases/tag/0.3.0M9) /
|
||||
[Release](https://github.com/eclipse/hawkbit/milestone/24) <br />
|
||||
Extensions: [Tag](https://github.com/eclipse/hawkbit-extensions/releases/tag/0.3.0M9)
|
||||
|
||||
## 0.3.0M8
|
||||
|
||||
**Release Date:** Friday, April 21, 2023 <br />
|
||||
Hawkbit: [Tag](https://github.com/eclipse/hawkbit/releases/tag/0.3.0M8) /
|
||||
[Release](https://github.com/eclipse/hawkbit/milestone/23) <br />
|
||||
Extensions: [Tag](https://github.com/eclipse/hawkbit-extensions/releases/tag/0.3.0M8) /
|
||||
[Release](https://github.com/eclipse/hawkbit-extensions/milestone/2)
|
||||
|
||||
|
||||
## 0.3.0M7
|
||||
|
||||
**Release Date:** Monday, February 15, 2021 <br />
|
||||
Hawkbit: [Tag](https://github.com/eclipse/hawkbit/releases/tag/0.3.0M7) /
|
||||
[Release](https://github.com/eclipse/hawkbit/milestone/22?closed=1) <br />
|
||||
Extensions: [Tag](https://github.com/eclipse/hawkbit-extensions/releases/tag/0.3.0M7) /
|
||||
[Release](https://github.com/eclipse/hawkbit-extensions/milestone/1?closed=1)
|
||||
|
||||
## 0.3.0M6
|
||||
|
||||
**Release Date:** Friday, January 17, 2020 <br />
|
||||
[Tag](https://github.com/eclipse/hawkbit/releases/tag/0.3.0M6) /
|
||||
[Release](https://github.com/eclipse/hawkbit/milestone/21?closed=1)
|
||||
|
||||
## 0.3.0M5
|
||||
|
||||
**Release Date:** Tuesday, July 29, 2019 <br />
|
||||
[Tag](https://github.com/eclipse/hawkbit/releases/tag/0.3.0M5) /
|
||||
[Release](https://github.com/eclipse/hawkbit/milestone/20?closed=1)
|
||||
|
||||
## 0.3.0M4
|
||||
|
||||
**Release Date:** Thursday, June 6, 2019 <br />
|
||||
[Tag](https://github.com/eclipse/hawkbit/releases/tag/0.3.0M4) /
|
||||
[Release](https://github.com/eclipse/hawkbit/milestone/19?closed=1)
|
||||
|
||||
## 0.3.0M3
|
||||
|
||||
**Release Date:** Tuesday, May 21, 2019 <br />
|
||||
[Tag](https://github.com/eclipse/hawkbit/releases/tag/0.3.0M3) /
|
||||
[Release](https://github.com/eclipse/hawkbit/milestone/18?closed=1)
|
||||
|
||||
## 0.3.0M2
|
||||
|
||||
**Release Date:** Tuesday, April 2, 2019 <br />
|
||||
[Tag](https://github.com/eclipse/hawkbit/releases/tag/0.3.0M2) /
|
||||
[Release](https://github.com/eclipse/hawkbit/milestone/17?closed=1)
|
||||
|
||||
## 0.3.0M1
|
||||
|
||||
**Release Date:** Saturday, February 2, 2019 <br />
|
||||
[Tag](https://github.com/eclipse/hawkbit/releases/tag/0.3.0M1) /
|
||||
[Release](https://github.com/eclipse/hawkbit/milestone/16?closed=1)
|
||||
|
||||
## 0.2.5
|
||||
|
||||
**Release Date:** Friday, November 30, 2018 <br />
|
||||
[Tag](https://github.com/eclipse/hawkbit/releases/tag/0.2.5) /
|
||||
[Release](https://github.com/eclipse/hawkbit/milestone/14?closed=1)
|
||||
|
||||
## 0.2.4
|
||||
|
||||
**Release Date:** Friday, October 26, 2018 <br />
|
||||
[Tag](https://github.com/eclipse/hawkbit/releases/tag/0.2.4) /
|
||||
[Release](https://github.com/eclipse/hawkbit/milestone/13?closed=1)
|
||||
|
||||
## 0.2.3
|
||||
|
||||
**Release Date:** Monday, October 1, 2018 <br />
|
||||
[Tag](https://github.com/eclipse/hawkbit/releases/tag/0.2.3) /
|
||||
[Release](https://github.com/eclipse/hawkbit/milestone/12?closed=1)
|
||||
|
||||
## 0.2.2
|
||||
|
||||
**Release Date:** Thursday, September 21, 2018 <br />
|
||||
[Tag](https://github.com/eclipse/hawkbit/releases/tag/0.2.2) /
|
||||
[Release](https://github.com/eclipse/hawkbit/milestone/10?closed=1)
|
||||
|
||||
## 0.2.1
|
||||
|
||||
**Release Date:** Friday, July 6, 2018 <br />
|
||||
[Tag](https://github.com/eclipse/hawkbit/releases/tag/0.2.1) /
|
||||
[Release](https://github.com/eclipse/hawkbit/milestone/9?closed=1)
|
||||
|
||||
|
||||
## 0.2.0
|
||||
|
||||
First Eclipse hawkBit release including:
|
||||
|
||||
* **Core features:**
|
||||
* Device and Software Repository
|
||||
* Update Management Management UI/Console
|
||||
* 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/releases/tag/0.2.0) /
|
||||
[Release](https://github.com/eclipse/hawkbit/milestone/1?closed=1) /
|
||||
[Eclipse](https://projects.eclipse.org/projects/iot.hawkbit/releases/0.2.0)
|
||||
@@ -1,4 +0,0 @@
|
||||
---
|
||||
title: Sandbox
|
||||
redirectURL: https://hawkbit.eclipseprojects.io
|
||||
---
|
||||
@@ -1,165 +0,0 @@
|
||||
---
|
||||
title: Management UI
|
||||
weight: 70
|
||||
---
|
||||
|
||||
The hawkBit Management UI provides several views for the different use cases:
|
||||
|
||||
- _Deployment Management_ view for target administration and manual deployment.
|
||||
- _Distribution Management_ view software repository metadata management.
|
||||
- _Artifact Management_ view to manage the artifacts.
|
||||
- _Target Filter Management_ view to manage target filters that can be used both in Deployment and Rollout Management views.
|
||||
- _Rollout Management_ for large scale rollout orchestration.
|
||||
|
||||
## Deployment Management
|
||||
|
||||
### Purpose
|
||||
|
||||
Target status overview, target management and manual deployments.
|
||||
|
||||
### Feature explained
|
||||
- Target Status: check status of all targets.
|
||||
- Target list allows filters based on:
|
||||
- Assigned/installed _DistributionSet_ (drag and drop a set on the filter icon on the top of the list)
|
||||
- Target update status: click 1-X status to reduce the list of targets that have one of them.
|
||||
- Target tag: click 1-X tags to reduce the list to targets that have one of them.
|
||||
- Name, description: use search button on the top of the list.
|
||||
- Target type: open Type Filter section to show targets of a specific type
|
||||
|
||||
- _DistributionSet_ list allows filters based on:
|
||||
- _DistributionSet_ tag: click 1-X tags to reduce the list of sets that have one of them.
|
||||
- Name, description: use search button on the top of the list.
|
||||
|
||||
- Start roll out by drag and drop targets on a DS.
|
||||
- Target list supports CTRL-A for "select all".
|
||||
- Select _Target_ to see _Action_ History.
|
||||
- Bulk target upload: create bulk targets by upload.
|
||||
- DS invalidation allows to mark broken updates and avoid the distribution of such
|
||||
|
||||
Hints for bulk upload:
|
||||
|
||||
- Expected file type : csv.
|
||||
- Expected file format : Each line with two values (ControllerID,Target Name). ControllerID is mandatory.
|
||||
- Example:
|
||||
```
|
||||
Controller_id_1,targetName1
|
||||
Controller_id_2,targetName2
|
||||
```
|
||||
|
||||

|
||||
|
||||
### Distribution set invalidation
|
||||
|
||||
It is possible to mark broken updates and avoid the distribution of such by invalidating the corresponding distribution
|
||||
set in the Distributions list of the Deployment view.
|
||||
|
||||
Invalidating a distribution set removes all auto-assignments that reference this distribution set. Optionally, all
|
||||
rollouts that reference the distribution set can be stopped and existing update actions are removed, either by a
|
||||
soft-cancel or a forced-cancel.
|
||||
|
||||
Invalidated distribution sets cannot be valid again, but remain invalid. They cannot be assigned to targets, neither
|
||||
through a rollout, auto-assignment nor a single assignment.
|
||||
|
||||

|
||||
|
||||
## Distribution Management
|
||||
|
||||
### Purpose
|
||||
|
||||
Distribution Set view to manage software repository metadata, i.e. Distribution Sets, their Software Modules and the respective types.
|
||||
|
||||
### Features explained
|
||||
- Browse, create, delete and update Distribution Sets.
|
||||
- Browse, create, delete and update Distribution Set Types.
|
||||
- Browse, create, delete and update Software Modules.
|
||||
- Browse, create, delete and update Software Module Types.
|
||||
- Assign Software Modules to Distribution Sets.
|
||||
|
||||

|
||||
|
||||
## Artifact Management
|
||||
|
||||
### Purpose
|
||||
Software artifact management, both metadata (i.e. Software Modules) and artifacts themselves.
|
||||
|
||||
### Features explained
|
||||
- Browse, create, delete and update Software Modules.
|
||||
- Browse, create, delete and update Software Module Types.
|
||||
- Upload and delete software artifacts for a module.
|
||||
|
||||

|
||||
|
||||
## Rollout Management
|
||||
|
||||
### Purpose
|
||||
Software rollout in large scale, rollout status overview and rollout management.
|
||||
|
||||
### Features explained
|
||||
- Create, update, copy and delete of rollouts.
|
||||
- Start, pause and resume of rollouts.
|
||||
- Progress monitoring for the entire rollout and the individual groups.
|
||||
- Drill down to see the groups in a rollout and targets in each group.
|
||||
- Rollout attributes:
|
||||
- Selection of targets as input for the rollout based on _target filter_
|
||||
- Selection of _distribution set_
|
||||
- Auto-splitting of the input target list based on _group number_ defined
|
||||
- _Trigger threshold_ to define the percentage of installation to be completed , to trigger the start of next group
|
||||
- _Error threshold_ defines the percentage of error tolerance of a group before calling for an emergency shutdown of a rollout
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
{{% note %}}
|
||||
Deletion of targets which are in a rollout, changes the rollout statistics.
|
||||
{{% /note %}}
|
||||
|
||||
## Target Filter Management
|
||||
|
||||
### Purpose
|
||||
Custom target filter overview and filter management.
|
||||
|
||||
### Features explained
|
||||
- Custom target filter allows user to filter targets by defining custom query.
|
||||
- Displays custom target filter list and user can search any particular filter.
|
||||
- Create, update and delete features are supported for target filters.
|
||||
- Auto assignment of a distribution set to filtered targets.
|
||||
|
||||
### How to Filter
|
||||
The basic syntax to filter is: `field<basic_operator>value <composite_operator> field<basic_operator>value <...>`
|
||||
|
||||
- `field`: is the name of the resource field.
|
||||
- `value`: is the expected value of the target field.
|
||||
- Use `*` for wildcard matches.
|
||||
- `<basic_operator>`: Are operators to do simple queries. Supported basic operators are:
|
||||
- `==` : equal
|
||||
- `!=` : not equal
|
||||
- Use `=IN=` for 'in' parameter.(Example: name=IN=(target1,target2).
|
||||
- `<composite_operator>`: Are operators to join simple queries: Supported composite operators are:
|
||||
- `and`
|
||||
- `or`
|
||||
|
||||
### Examples
|
||||
|
||||
| Custom query | Description |
|
||||
|--------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| updatestatus==error | Gives all targets in ‘error’ state. |
|
||||
| controllerId!=192.168.2.42 | Gives all targets that do not have the controllerId 192.168.2.42. |
|
||||
| name==\*CCU\* | Gives all targets which contain the term ‘CCU’ in there name. |
|
||||
| name==\*CCU\* or description==\*CCU\* | Gives all targets that either have the term ‘CCU’ in their name or their description. |
|
||||
| name==\*SHC\* and description==\*SHC\* | Gives all targets that have the term SHC in their name and their description. |
|
||||
| name==CCU* and updatestatus==pending | Gives all targets with their name starting with ‘CCU’ and which are in ‘pending’ state. |
|
||||
| (assignedds.name==‘ECU-DS’ and description==test) or updatestatus!=error | Gives all targets which are either assigned to ‘ECU-DS’ and have description equals to ‘test’ or which are not in error status. |
|
||||
| (updatestatus!=In\_sync or updatestatus!=error) and name==\*SHC1\* | Gives all targets that do not have the update status In\_sync or error and that contains the term SHC1 in their name. |
|
||||
| (updatestatus!=error or updatestatus!=pending) and (name==\*CCU\* or description==\*CCU\*) | Gives all targets that either have the term ‘CCU’ in their name or their description and that either have the _update status_ not in state error or pending. |
|
||||
|
||||

|
||||
|
||||
### Auto assignment
|
||||
It is possible to assign some distribution set with different action types (_forced_, _soft_, or _download only_) to all targets that belong to the corresponding custom target filter, including the ones, that are registered later on.
|
||||
|
||||
In order to activate the auto-assignment, one should first click on _Auto assignment_ cell in Custom Filters table, and then check the corresponding checkbox. After that, the action type and distribution set for auto-assignment should be selected and confirmed.
|
||||
|
||||
As long as the auto-assignment stays active, the scheduler will try to assign selected distribution set to corresponding custom filter targets, that have never seen it before.
|
||||
|
||||

|
||||
@@ -1,43 +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,74 +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">
|
||||
<li class="repo-download">
|
||||
<a href="https://hawkbit.eclipseprojects.io" target="_blank" title="hawkBit Sandbox" data-action="sandbox">
|
||||
<i class="fas fa-desktop"></i> Sandbox
|
||||
</a>
|
||||
</li>
|
||||
<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://circleci.com/gh/eclipse/hawkbit" title="Circle CI Status" target="_blank">
|
||||
<img src="https://circleci.com/gh/eclipse/hawkbit.svg?style=shield" />
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://sonarcloud.io/organizations/bosch-iot-rollouts/projects?sort=name" title="Sonarcloud Status" target="_blank">
|
||||
<img src="https://sonarcloud.io/api/project_badges/measure?project=org.eclipse.hawkbit%3Ahawkbit-parent&metric=alert_status" />
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://maven-badges.herokuapp.com/maven-central/org.eclipse.hawkbit/hawkbit-parent" title="Maven Central Status" target="_blank">
|
||||
<img src="https://maven-badges.herokuapp.com/maven-central/org.eclipse.hawkbit/hawkbit-parent/badge.svg" />
|
||||
</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.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.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.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.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 }}
|
||||
154
docs/pom.xml
@@ -1,154 +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="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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>docs</artifactId>
|
||||
<!-- <packaging>pom</packaging>-->
|
||||
<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-boot-starter</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Test -->
|
||||
<dependency>
|
||||
<groupId>io.qameta.allure</groupId>
|
||||
<artifactId>allure-junit5</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.hawkbit</groupId>
|
||||
<artifactId>hawkbit-repository-test</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@@ -1,38 +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.eclipse.hawkbit.autoconfigure.security.EnableHawkbitManagedSecurityConfiguration;
|
||||
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
|
||||
@EnableHawkbitManagedSecurityConfiguration
|
||||
// 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,41 +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
|
||||
#
|
||||
|
||||
# User Security
|
||||
spring.security.user.name=admin
|
||||
spring.security.user.password={noop}admin
|
||||
spring.main.allow-bean-definition-overriding=true
|
||||
|
||||
# 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.anonymous.enabled=false
|
||||
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
|
||||
|
||||
## Configuration for DMF/RabbitMQ integration
|
||||
hawkbit.dmf.rabbitmq.enabled=false
|
||||
|
||||
# Swagger Configuration
|
||||
|
||||
#springdoc.swagger-ui.path=/update-server-documentation
|
||||
#springdoc.api-docs.path=/update-server-api-docs
|
||||
springdoc.show-oauth2-endpoints=true
|
||||
springdoc.api-docs.version=openapi_3_0
|
||||
springdoc.show-login-endpoint=true
|
||||
springdoc.packages-to-scan=org.eclipse.hawkbit.mgmt,org.eclipse.hawkbit.ddi
|
||||
springdoc.swagger-ui.oauth2RedirectUrl=/login/oauth2/code/suite
|
||||
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,33 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Copyright (c) 2015 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
|
||||
|
||||
-->
|
||||
<configuration>
|
||||
<include resource="org/springframework/boot/logging/logback/base.xml" />
|
||||
|
||||
<logger name="org.eclipse.hawkbit.eventbus.DeadEventListener" level="WARN" />
|
||||
<Logger name="org.springframework.boot.actuate.audit.listener.AuditListener" level="WARN" />
|
||||
|
||||
<Logger name="org.hibernate.validator.internal.util.Version" level="WARN" />
|
||||
|
||||
<!-- Security Log with hints on potential attacks -->
|
||||
<logger name="server-security" level="INFO" />
|
||||
|
||||
<!-- Suppressing "More than one Servlet Mapping defined. WebSocket may not work"
|
||||
error due to the way VaadinServletConfiguration configures the endpoints mapping ("/UI" and "/UI/*").
|
||||
At the end only the first "/UI" is taken for websocket communication. -->
|
||||
<logger name="org.atmosphere.util.IOUtils" level="OFF" />
|
||||
|
||||
<Root level="INFO">
|
||||
<appender-ref ref="CONSOLE" />
|
||||
</Root>
|
||||
|
||||
</configuration>
|
||||
@@ -1,155 +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;
|
||||
}
|
||||
}
|
||||
|
||||
57
docs/static/css/hawkbit.css
vendored
@@ -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
|
||||
}
|
||||
BIN
docs/static/images/architecture/architecture.png
vendored
|
Before Width: | Height: | Size: 404 KiB |
|
Before Width: | Height: | Size: 44 KiB |
BIN
docs/static/images/eclipse_foundation_logo.png
vendored
|
Before Width: | Height: | Size: 23 KiB |
BIN
docs/static/images/eventing-within-cluster.png
vendored
|
Before Width: | Height: | Size: 16 KiB |
BIN
docs/static/images/favicon.ico
vendored
|
Before Width: | Height: | Size: 32 KiB |
BIN
docs/static/images/hawkBit_overview.jpeg
vendored
|
Before Width: | Height: | Size: 206 KiB |
BIN
docs/static/images/hawkbit_icon.png
vendored
|
Before Width: | Height: | Size: 14 KiB |
BIN
docs/static/images/hawkbit_logo.png
vendored
|
Before Width: | Height: | Size: 118 KiB |
BIN
docs/static/images/hawkbit_transparency.png
vendored
|
Before Width: | Height: | Size: 19 KiB |
BIN
docs/static/images/hawkbit_ui.png
vendored
|
Before Width: | Height: | Size: 251 KiB |
BIN
docs/static/images/interfaces.png
vendored
|
Before Width: | Height: | Size: 38 KiB |
BIN
docs/static/images/overall_cluster.png
vendored
|
Before Width: | Height: | Size: 41 KiB |
BIN
docs/static/images/packagemodel.png
vendored
|
Before Width: | Height: | Size: 22 KiB |
BIN
docs/static/images/rollout.png
vendored
|
Before Width: | Height: | Size: 34 KiB |
BIN
docs/static/images/rolloutgroupstatediagram.png
vendored
|
Before Width: | Height: | Size: 8.6 KiB |
BIN
docs/static/images/rolloutstatediagram.png
vendored
|
Before Width: | Height: | Size: 11 KiB |
BIN
docs/static/images/security/anonymousDownload.png
vendored
|
Before Width: | Height: | Size: 51 KiB |
|
Before Width: | Height: | Size: 916 KiB |
|
Before Width: | Height: | Size: 44 KiB |
BIN
docs/static/images/security/gatewayToken.png
vendored
|
Before Width: | Height: | Size: 61 KiB |
BIN
docs/static/images/security/targetToken.png
vendored
|
Before Width: | Height: | Size: 51 KiB |
BIN
docs/static/images/ui/artifact_mgmt.png
vendored
|
Before Width: | Height: | Size: 110 KiB |
BIN
docs/static/images/ui/deployment_ds_invalidation.png
vendored
|
Before Width: | Height: | Size: 212 KiB |
BIN
docs/static/images/ui/deployment_mgmt.png
vendored
|
Before Width: | Height: | Size: 190 KiB |
BIN
docs/static/images/ui/distribution_mgmt.png
vendored
|
Before Width: | Height: | Size: 114 KiB |
BIN
docs/static/images/ui/rollout_groups.png
vendored
|
Before Width: | Height: | Size: 105 KiB |
BIN
docs/static/images/ui/rollout_mgmt.png
vendored
|
Before Width: | Height: | Size: 74 KiB |
BIN
docs/static/images/ui/target_filter.png
vendored
|
Before Width: | Height: | Size: 309 KiB |
|
Before Width: | Height: | Size: 152 KiB |
249
docs/static/slides/community-day-2018.html
vendored
@@ -1,249 +0,0 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
<title>Eclipse hawkBit</title>
|
||||
|
||||
<meta name="description" content="Eclipse hawkBit - Community Day 2018">
|
||||
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui">
|
||||
|
||||
<link rel="stylesheet" href="css/reveal.css">
|
||||
<link rel="stylesheet" href="css/theme/hawkBit.css" id="theme">
|
||||
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU"
|
||||
crossorigin="anonymous">
|
||||
|
||||
<body>
|
||||
<div class="reveal">
|
||||
<div class="header">
|
||||
<img src="resources/images/hawkbit_logo.png" width="120px" align="right" />
|
||||
</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 src="https://avatars3.githubusercontent.com/u/9153035?s=120&v=4"
|
||||
style="border-radius: 50%;" align="left"></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 src="https://avatars1.githubusercontent.com/u/18215905?s=120&v=4"
|
||||
style="border-radius: 50%;" align="left"></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 src="https://avatars3.githubusercontent.com/u/19288577?s=120&v=4"
|
||||
style="border-radius: 50%;" align="left"></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 src="https://avatars2.githubusercontent.com/u/16321153?s=120&v=4"
|
||||
style="border-radius: 50%;" align="left"></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 src="https://avatars1.githubusercontent.com/u/18215905?s=120&v=4"
|
||||
style="border-radius: 50%;" align="left"></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 Core</a>: 149
|
||||
stars, 622 PRs, 134 issues</li>
|
||||
<li style="margin-bottom: 0.5em"><a href="https://github.com/eclipse/hawkbit-extensions">hawkbit
|
||||
Extensions</a>: 30 PRs</li>
|
||||
<li style="margin-bottom: 0.5em"><a href="https://github.com/eclipse/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-examples">examples</a>
|
||||
& <a href="https://github.com/eclipse/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/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/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/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">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>
|
||||
241
docs/static/slides/community-day-2019.html
vendored
@@ -1,241 +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 name="description" content="Eclipse hawkBit - Community Day 2018">
|
||||
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
||||
<meta name="viewport"
|
||||
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui">
|
||||
|
||||
<link rel="stylesheet" href="css/reveal.css">
|
||||
<link rel="stylesheet" href="css/theme/hawkBit.css" id="theme">
|
||||
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css"
|
||||
integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">
|
||||
|
||||
<body>
|
||||
<div class="reveal">
|
||||
<div class="header">
|
||||
<img src="resources/images/hawkbit_logo.png" width="120px" align="right" />
|
||||
</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
|
||||
src="https://avatars3.githubusercontent.com/u/9153035?s=120&v=4"
|
||||
style="border-radius: 50%;" align="left"></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
|
||||
src="https://avatars3.githubusercontent.com/u/19288577?s=120&v=4"
|
||||
style="border-radius: 50%;" align="left"></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 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-extensions">hawkbit
|
||||
Extensions</a>: 41 (+11) PRs</li>
|
||||
<li style="margin-bottom: 0.5em"><a href="https://github.com/eclipse/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/pull/829">#829</a>)</li>
|
||||
<li style="margin-bottom: 0.5em">Introduce Multi-Assignments (<a
|
||||
href="https://github.com/eclipse/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/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/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/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/pull/869">#869</a>)</li>
|
||||
<li style="margin-bottom: 0.5em">... and <a
|
||||
href="https://github.com/eclipse/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/issues/880">#880</a>)</li>
|
||||
<li style="margin-bottom: 0.5em">Release 0.3.0 (<a
|
||||
href="https://github.com/eclipse/hawkbit/issues/784">#784</a>)</li>
|
||||
<li style="margin-bottom: 0.5em">Prioritization of updates (<a
|
||||
href="https://github.com/eclipse/hawkbit/issues/863">#863</a>)</li>
|
||||
<li style="margin-bottom: 0.5em">Integration with other device inventories (<a
|
||||
href="https://github.com/eclipse/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">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>
|
||||
186
docs/static/slides/community-day-2020.html
vendored
@@ -1,186 +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 name="description" content="Eclipse hawkBit - Community Day 2020">
|
||||
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
||||
<meta name="viewport"
|
||||
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui">
|
||||
|
||||
<link rel="stylesheet" href="css/reveal.css">
|
||||
<link rel="stylesheet" href="css/theme/hawkBit.css" id="theme">
|
||||
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css"
|
||||
integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">
|
||||
|
||||
<body>
|
||||
<div class="reveal">
|
||||
<div class="header">
|
||||
<img src="resources/images/hawkbit_logo.png" width="120px" align="right" />
|
||||
</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 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-extensions">hawkbit
|
||||
Extensions</a>: 46 (+5) PRs</li>
|
||||
<li style="margin-bottom: 0.5em"><a href="https://github.com/eclipse/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/pull/980">#980</a>)</li>
|
||||
<li style="margin-bottom: 0.5em">Support PostgreSQL (<a
|
||||
href="https://github.com/eclipse/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/pull/944">#944</a>)</li>
|
||||
<li style="margin-bottom: 0.5em">Fix XSS Vulnerability (<a
|
||||
href="https://github.com/eclipse/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/pull/918">#918</a>)</li>
|
||||
<li style="margin-bottom: 0.5em">Add Stackoverflow tag for hawkBit (<a
|
||||
href="https://github.com/eclipse/hawkbit/issues/923">#923</a>)</li>
|
||||
<li style="margin-bottom: 0.5em">... and <a
|
||||
href="https://github.com/eclipse/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/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/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/issues/999">#999</a>)</li>
|
||||
<li style="margin-bottom: 0.5em">Integration with other device inventories (<a
|
||||
href="https://github.com/eclipse/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">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>
|
||||
1555
docs/static/slides/css/reveal.css
vendored
381
docs/static/slides/css/theme/hawkBit.css
vendored
@@ -1,381 +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;
|
||||
}
|
||||
5239
docs/static/slides/js/reveal.js
vendored
2
docs/static/slides/lib/js/classList.js
vendored
@@ -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
docs/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
|
||||
*/
|
||||
77
docs/static/slides/plugin/highlight/highlight.js
vendored
412
docs/static/slides/plugin/markdown/markdown.js
vendored
@@ -1,412 +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
|
||||
|
||||
};
|
||||
|
||||
}));
|
||||
6
docs/static/slides/plugin/markdown/marked.js
vendored
67
docs/static/slides/plugin/math/math.js
vendored
@@ -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 );
|
||||
|
||||
}
|
||||
|
||||
})();
|
||||
13
docs/static/slides/plugin/multiplex/client.js
vendored
@@ -1,13 +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);
|
||||
});
|
||||
}());
|
||||
64
docs/static/slides/plugin/multiplex/index.js
vendored
@@ -1,64 +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 );
|
||||
34
docs/static/slides/plugin/multiplex/master.js
vendored
@@ -1,34 +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 );
|
||||
|
||||
}());
|
||||
19
docs/static/slides/plugin/multiplex/package.json
vendored
@@ -1,19 +0,0 @@
|
||||
{
|
||||
"name": "reveal-js-multiplex",
|
||||
"version": "1.0.0",
|
||||
"description": "reveal.js multiplex server",
|
||||
"homepage": "http://revealjs.com",
|
||||
"scripts": {
|
||||
"start": "node index.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": "~4.1.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"express": "~4.13.3",
|
||||
"grunt-cli": "~0.1.13",
|
||||
"mustache": "~2.2.1",
|
||||
"socket.io": "~2.4.0"
|
||||
},
|
||||
"license": "MIT"
|
||||
}
|
||||
65
docs/static/slides/plugin/notes-server/client.js
vendored
@@ -1,65 +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();
|
||||
|
||||
}());
|
||||
69
docs/static/slides/plugin/notes-server/index.js
vendored
@@ -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' );
|
||||
585
docs/static/slides/plugin/notes-server/notes.html
vendored
@@ -1,585 +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 id="speaker-layout" class="overlay-element interactive">
|
||||
<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>
|
||||
759
docs/static/slides/plugin/notes/notes.html
vendored
@@ -1,759 +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 id="speaker-layout" class="overlay-element interactive">
|
||||
<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>
|
||||
155
docs/static/slides/plugin/notes/notes.js
vendored
@@ -1,155 +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 };
|
||||
|
||||
})();
|
||||
69
docs/static/slides/plugin/print-pdf/print-pdf.js
vendored
@@ -1,69 +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);
|
||||
|
||||
}
|
||||
} );
|
||||
|
||||
|
||||