WeBankFinTech / DataSphereStudio

DataSphereStudio is a one stop data application development& management portal, covering scenarios including data exchange, desensitization/cleansing, analysis/mining, quality measurement, visualization, and task scheduling.
https://github.com/WeBankFinTech/DataSphereStudio-Doc
Apache License 2.0
3.04k stars 999 forks source link

[Feature] When the version is released, the front-end prompts the user to refresh #1078

Closed wxyn closed 1 year ago

wxyn commented 1 year ago

Search before asking

Problem Description

After each version release, if users do not refresh the page, the browser may still cache the content of the previous version, which will affect users' normal use of DSS. The current user is not clear about the features and usage of each version release. They hope to use version release prompts to guide users to understand the newly added and optimized features and defects fixed in each version.

Description

Version release prompt If the version number cached by the user's current browser does not match the version number of the server, a prompt will pop up. Scope of prompt occurrence: Any page in DSS (if it does not jump out of DSS, the prompt page will pop up, such as in Scriptis, homepage, DSS workflow, management console) When the prompt appears: When the user switches pages, it will pop up (such as switching from Scriptis to the management console, switching from the management console to the homepage, etc.). --Prompt when switching pages: such as switching to the homepage from Scriptis (if the iframe is moved, it will change once). image

interactive When the user clicks "Update now", the front-end automatically refreshes the page for the user to obtain the new version. Reason for forcing the user to refresh immediately: There is no situation that will trigger the user to edit the content unsaved, the content is lost, because the user is first asked to save the content being edited before cutting the tab. Popup Content

  1. Click [View more version features] to open the version release record document in the Knowledge base on the new tab page.
  2. Users click the function points listed in the version function introduction, such as "[Add] You can provide alarm notification when Scriptis tasks are configured", and the usage instructions of the corresponding functions will be opened in the new tab page (Function description documents will be provided in the background). other Add a new display of 'Dynamics and Announcements', which displays the' DSS Function Release Record 'knowledge base link. Click the link to expand on the new tab page. image

Use case

No response

solutions

  1. When users switch pages, the front-end will detect the front-end feature files on the server, and if any changes are found in the feature files, it indicates that a new front-end version has been released.
  2. If the front-end detects the release of a new version, it requests the back-end interface to obtain the version release content.
  3. When publishing, the backend will upload the knowledge base related to the published content to GitBook and configure it on the server. When the front-end requests to publish content, the back-end returns a list of published content for this version.
  4. Users can click on the function list on the published content to enter the function description. Simultaneously clicking the Update Now button can trigger a front-end browser refresh to update front-end resources.

When deploying dss, use the dss interface: Interface Path: /api/rest_j/v1/dss/framework/workspace/getReleaseNote The demo data is as follows:

{
  "method": null,
  "status": 0,
  "message": "获取侧边栏成功",
  "data": {
    "releaseNote": [
      {
        "name": "DSSv1.1.9releaseNote",
        "title": "DSSv1.1.9版本功能介绍",
        "contents": [
          {
            "name": "[feature1] support xxx",
            "title": "【新增】你可以为scriptis运行中的任务配置完成时告警通知",
            "url": "_book/知识库/用户手册/版本功能介绍/v1.1.9/你可以为scriptis运行中的任务配置完成时告警通知.html",
            "urlType": 1
          },
          {
            "name": "[feature2] support xxx",
            "title": "【新增】为用户提供编辑锁主动解锁按钮",
            "url": "_book/知识库/用户手册/版本功能介绍/v1.1.9/为用户提供编辑锁主动解锁按钮.html",
            "urlType": 1
          }
        ]
      },
      {
        "name": "new feature",
        "title": "快速体验新功能",
        "contents": [
          {
            "name": "[feature1] kill xxx",
            "title": "kill引擎",
            "url": "/workspaceManagement/enginelist?workspaceId=251",
            "urlType": 0
          }
        ]
      }
    ],
   "version":"v1.1.11",
   "releaseNoteUrl":"_book/版本动态与公告/v1.1.11.html"
  }
}

Return data: image

When deploying scriptis separately, use the scriptis interface: Interface Path: /api/rest_j/v1/dss/scriptis/getReleaseNote The demo data is as follows:

{
  "method": null,
  "status": 0,
  "message": "获取侧边栏成功",
  "data": {
    "version":"v1.1.11",
    "releaseNoteUrl":"_book/版本动态与公告/v1.1.11.html",
    "releaseNote": [
      {
        "name": "scriptis1.1.9 releaseNote",
        "title": "scriptisv1.1.9版本功能介绍",
        "contents": [
          {
            "name": "[feature1] support xxx",
            "title": "【新增】你可以为scriptis运行中的任务配置完成时告警通知",
            "url": "_book/知识库/用户手册/版本功能介绍/v1.1.9/你可以为scriptis运行中的任务配置完成时告警通知.html",
            "urlType": 1
          },
          {
            "name": "[feature2] support xxx",
            "title": "【新增】为用户提供编辑锁主动解锁按钮",
            "url": "_book/知识库/用户手册/版本功能介绍/v1.1.9/为用户提供编辑锁主动解锁按钮.html",
            "urlType": 1
          }
        ],
      },
      {
        "name": "new feature",
        "title": "快速体验新功能",
        "contents": [
          {
            "name": "[feature1] kill xxx",
            "title": "kill引擎",
            "url": "/workspaceManagement/enginelist?workspaceId=251",
            "urlType": 0
          }
        ]
      }
    ]
  }
}

Return data: image

Anything else

No response

Are you willing to submit a PR?

zqburde commented 1 year ago

Add it in DSS1.1.2