edit-icon download-icon

Publish a project

Last Updated: Jul 05, 2018

The Publish feature includes Sharing Configuration and History Versions, as shown in the following figure.

Log on to the DataV console, and click publish. If the Publish button is turned on, the project has been published as a webpage, otherwise the project has not been published.

Sharing configuration

A random sharing link is generated when the Publish button is turned on. This sharing link changes each time it is turned on and the previous sharing link becomes invalid immediately and cannot be restored.

The three modes of the publishing function are as follows:

  • Public sharing

  • Password access sharing

  • Token verification sharing

Select a mode that fits your needs to help internal and external users have access to visualization projects.

Public sharing

  1. Log on to the DataV console.

  2. Click Projects.

  3. Select a project and click Publish.

  4. Turn on the Publish button. Other users have access to a project through the Sharing URL shown in the following sharing link.

Password access sharing (unavailable for Basic Edition)

  1. Log on to the DataV console.

  2. Click Projects.

  3. Select a project and click Publish.

  4. Click Password Protection in the publish window and turn on the button.

  5. Enter a password. The password must contain at least 6 characters and satisfy the following three conditions:

    • Uppercase letters A to Z
    • Lowercase letters a to z
    • Arabic numerals 0 to 9

    If a password is successfully set, “The password has been set” will be displayed, otherwise the color of the password input box becomes red.

  6. Choose whether to enable the Password/Token Expiration: 32 Hours button.

    • When this verification mode is enabled, after a visitor enters a password and successfully accesses a large screen, the visitor can access the large screen again within 32 hours without the password. The visitor needs to re-enter the password after 32 hours.
    • When this verification mode is disabled, the visitor needs to re-enter the password after 1 minute.

When the visitor attempts to access the URL again, the system requests the password.

publicByPassword

Token verification sharing (unavailable for Basic Edition)

If you want to integrate a project with your permission system, you can choose this mode.

  1. Log on to the DataV console.

  2. Click Projects.

  3. Select a project and click Publish.

  4. Click Token Protection in the publish window and turn on the button.

  5. Choose whether to enable the Password/Token Expiration: 32 Hours button.

    • When this verification mode is enabled, after a visitor successfully accesses a large screen through a token verification, the visitor can access the large screen within 32 hours without a token verification. The visitor needs to perform the token verification again after 32 hours.
    • When this verification mode is disabled, the visitor needs to perform the token verification again after 1 minute.

When you enable Token Protection, DataV generates a token for you. You need to keep it for future use.

When a visitor directly visits the page by using the page URL, the visitor receives an “Access Denied” message, which means the access has been rejected.

To enable visitors to open this page, follow these steps:

  1. Publish a project and record the code of the project. This is the last part of the URL.

  2. Connect the code and the current time, accurate to a millisecond (ms) with a vertical bar (|).

  3. Use the token to encrypt the preceding string through HMAC-SHA256 base64.

  4. Name the time and the encrypted signature as _datav_time and _datav_signature respectively.

  5. Insert the time and the encrypted signature in the querystring of the url one by one.

The example is as follows:

PHP

  1. <?php
  2. $token = "kBwoX9rFX9v4zbOT0Gjd_wr65DZ3P_WW";
  3. $screenID = "03d1b68faeb09671046d1ef43f588c33";
  4. $time = time()*1000;
  5. $stringToSign = $screenID.'|'.$time;
  6. $signature = urlencode(base64_encode(hash_hmac('sha256', $stringToSign, $token, true)));
  7. $url = "http://local.datav.aliyun.com:9999/share/".$screenID."?_datav_time=".$time."&_datav_signature=".$signature;
  8. ?>
  9. <iframe width=100% height=100% src="<?=$url?>"/>

NODE.JS:

  1. const crypto = require('crypto');
  2. var token = "Ev97wOUSAtJusc3Vsd9O2ngr_vfVFH67";
  3. var screenID ="14c5448c00ecde02b065c231d1659f38";
  4. var time = Date.now();
  5. var stringToSign = screenID +'|'+ time;
  6. var signature = crypto.createHmac('sha256', token).update(str).digest().toString('base64');
  7. var url="http://datav.aliyun.com/share/"+ screenID +"?_datav_time="+time+"&_datav_signature="+ encodeURIComponent(signature);

History versions (unavailable for Basic Edition)

A snapshot of the project content is taken when creating a version. Any edits to the archived project content cannot be synchronized to history snapshots, but can be used as a backup for previewing stable versions.

When the history snapshot feature is enabled for the first time, it is defaulted to Current Version as shown in the following figure. Refresh the shared link to see the current version.

Note: The history versions can be switched with each other. The rollback feature is not supported.

  1. Click Create Version. The current project configurations are saved as a snapshot.

    • Enter a note in the Note column.
    • The snapshot data is still retained when the Publish feature is disabled.
  2. To add new snapshots click Create Version again. Currently only three valid snapshots can be saved.

  3. To delete extra snapshots click Delete.

  4. To switch among snapshots and the real-time version , select a radio button in the Status column, as shown in the following figure.

  5. To view the project content of the selected snapshot version, refresh the sharing page.

Thank you! We've received your feedback.