Add sleep/wakeup process to retrieve bucket data during plugin initialization

オープン
#117 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
typescript
領域
api, full-stack

調査の方向性

Start by comparing the sleep/wakeup flow in the referenced geowatch-agent-track implementation. Then trace the plugin descriptor's DATA_TO_RETRIEVE secureData, OFS bucket API calls, device cache/local storage, and plugin page entry point; the work is done when configured string and file properties are retrieved, persisted, displayed, and failure or missing-data cases are handled.

索引モデルが issue の本文から書いたものです。

説明

Enhancement Request

Overview

Implement a sleep/wakeup process similar to the geowatch-agent-track plugin that will invoke the OFS API during the plugin initialization to retrieve data from specified buckets.

Background

The geowatch-agent-track plugin (/Volumes/SSD Miquel - SanDisk/visual-code/cat-repos/geowatch-agent/geowatch-agent-track) demonstrates how to retrieve OFS position data during initialization. This enhancement will follow the same pattern but for retrieving bucket properties.

Requirements
Data Retrieval

The plugin should retrieve two types of properties from a specified bucket:

  1. String property - A text/string value stored in the bucket
  2. File property - A file stored in the bucket
Configuration

The bucket and properties to fetch will be defined in the plugin descriptor as secureData with the name DATA_TO_RETRIEVE in the following format:

[
    {
        "bucket_name": "my_data_bucket",
        "properties_to_fetch": {
            "string_property": "string",
            "file_property": "file"
        }
    }
]
Data Storage

After retrieving the data from the OFS API:

  • Store both the string property and file property in the device cache/local storage
  • Persist the data so it's available when the plugin opens
Data Display

When the plugin is opened:

  • Retrieve the previously stored data from device cache/local storage
  • Display both the string property value and the file property on the page
  • Handle cases where no data has been retrieved yet
Implementation Pattern
  • Follow the same sleep/wakeup pattern used in geowatch-agent-track
  • Invoke OFS API during plugin initialization (init process)
  • Handle both string and file property types
  • Store retrieved data in device cache/local storage
  • Display stored data when plugin opens
Technical Approach
  1. Add sleep/wakeup event handlers
  2. Parse DATA_TO_RETRIEVE from secureData
  3. Make API calls to OFS bucket API during initialization
  4. Handle string property retrieval
  5. Handle file property retrieval
  6. Store data in device cache/local storage
  7. On plugin open, retrieve data from local storage
  8. Display retrieved data on the plugin page
  9. Handle errors gracefully (missing bucket, properties, API failures, storage failures)
Reference Implementation

See: /Volumes/SSD Miquel - SanDisk/visual-code/cat-repos/geowatch-agent/geowatch-agent-track

Acceptance Criteria
  • Plugin reads DATA_TO_RETRIEVE configuration from secureData
  • Sleep/wakeup process initializes on plugin load
  • API calls retrieve string property from specified bucket
  • API calls retrieve file property from specified bucket
  • Retrieved data is stored in device cache/local storage
  • Plugin displays stored string property when opened
  • Plugin displays stored file property when opened
  • Handle cases where no cached data exists yet
  • Error handling for missing/invalid configuration
  • Error handling for API failures
  • Error handling for storage access failures
  • Documentation updated with configuration examples
主要言語
TypeScript
スター
6
フォーク
5
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

oracle-samples/ofs-sample-plugins のほかの issue

oracle-samples/ofs-sample-plugins の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。