[GH-ISSUE #436] About the modification of storage_panel.js #863

Closed
opened 2026-03-12 17:33:07 +03:00 by kerem · 8 comments
Owner

Originally created by @wjz304 on GitHub (Mar 4, 2025).
Original GitHub issue: https://github.com/007revad/Synology_HDD_db/issues/436

github.com/007revad/Synology_HDD_db@aa5ec68125/syno_hdd_db.sh (L2247)

Can you help me complete the version less than 64570 and how to modify it?

Originally created by @wjz304 on GitHub (Mar 4, 2025). Original GitHub issue: https://github.com/007revad/Synology_HDD_db/issues/436 https://github.com/007revad/Synology_HDD_db/blob/aa5ec68125212bca5f6abbf802444fc1c1282c82/syno_hdd_db.sh#L2247 Can you help me complete the version less than 64570 and how to modify it?
kerem closed this issue 2026-03-12 17:33:12 +03:00
Author
Owner

@007revad commented on GitHub (Mar 4, 2025):

For versions less than 64570

if [[ $buildnumber -gt 64570 ]]; then
    # DSM 7.2.1 and later
    #strgmgr="/var/packages/StorageManager/target/ui/storage_panel.js"
    strgmgr="/usr/local/packages/@appstore/StorageManager/ui/storage_panel.js"
elif [[ $buildnumber -ge 64561 ]]; then
    # DSM 7.2
    strgmgr="/usr/syno/synoman/webman/modules/StorageManager/storage_panel.js"
fi

I've just changed it to:

elif [[ $buildnumber -ge 42962 ]]; then
    # DSM 7.1.1 to 7.2

https://github.com/007revad/Synology_HDD_db/releases/tag/v3.6.111

DSM 7.1.1-42962 was the first version that supported M.2 volumes.

<!-- gh-comment-id:2698699854 --> @007revad commented on GitHub (Mar 4, 2025): For versions less than 64570 ``` if [[ $buildnumber -gt 64570 ]]; then # DSM 7.2.1 and later #strgmgr="/var/packages/StorageManager/target/ui/storage_panel.js" strgmgr="/usr/local/packages/@appstore/StorageManager/ui/storage_panel.js" elif [[ $buildnumber -ge 64561 ]]; then # DSM 7.2 strgmgr="/usr/syno/synoman/webman/modules/StorageManager/storage_panel.js" fi ``` I've just changed it to: ``` elif [[ $buildnumber -ge 42962 ]]; then # DSM 7.1.1 to 7.2 ``` https://github.com/007revad/Synology_HDD_db/releases/tag/v3.6.111 DSM 7.1.1-42962 was the first version that supported M.2 volumes.
Author
Owner

@wjz304 commented on GitHub (Mar 5, 2025):

I need something lower, from 42218

42218: storage_panel.js.gz

<!-- gh-comment-id:2699588250 --> @wjz304 commented on GitHub (Mar 5, 2025): I need something lower, from 42218 42218: [storage_panel.js.gz](https://github.com/user-attachments/files/19080796/storage_panel.js.gz)
Author
Owner

@wjz304 commented on GitHub (Mar 5, 2025):

Because I only analyzed 69057 and above versions of so before cracking the nvme installation system, storage_panel.js only needs to follow your method. Yesterday, someone applied to me to use 7.0 for nvme installation system, so I analyzed 42218 so, but I am not very good at js language, so I didn't show it.

<!-- gh-comment-id:2699597323 --> @wjz304 commented on GitHub (Mar 5, 2025): Because I only analyzed 69057 and above versions of so before cracking the nvme installation system, storage_panel.js only needs to follow your method. Yesterday, someone applied to me to use 7.0 for nvme installation system, so I analyzed 42218 so, but I am not very good at js language, so I didn't show it.
Author
Owner

@007revad commented on GitHub (Mar 5, 2025):

I'm not very good at js. After formatting the js file to make it readable the file is around 40,000 lines!

42218 does not have the functions that I edit. It may just be checking if the drive is in a SATA or SAS drive tray with "isNormalTray".

There are 4 lines where it calls a isNormalTray() function but I cannot find that function.

<!-- gh-comment-id:2699683201 --> @007revad commented on GitHub (Mar 5, 2025): I'm not very good at js. After formatting the js file to make it readable the file is around 40,000 lines! 42218 does not have the functions that I edit. It may just be checking if the drive is in a SATA or SAS drive tray with "isNormalTray". There are 4 lines where it calls a `isNormalTray()` function but I cannot find that function.
Author
Owner

@wjz304 commented on GitHub (Mar 5, 2025):

OK, I'll take a look and share the results here.

<!-- gh-comment-id:2699717296 --> @wjz304 commented on GitHub (Mar 5, 2025): OK, I'll take a look and share the results here.
Author
Owner

@wjz304 commented on GitHub (Mar 5, 2025):

Image

FILE_JS="/usr/syno/synoman/webman/modules/StorageManager/storage_panel.js"
sed -i "s/\!u.isCacheTray()/(\!u.isCacheTray()||true)/" "${FILE_JS}"
sed -i 's/t="normal"!==this.portType/t="normal"!==this.portType\&\&"cache"!==this.portType/g' "${FILE_JS}"
sed -i 's/return"normal"===this.portType/return"normal"===this.portType||"cache"===this.portType/g' "${FILE_JS}"
<!-- gh-comment-id:2701867598 --> @wjz304 commented on GitHub (Mar 5, 2025): ![Image](https://github.com/user-attachments/assets/b116659b-9af4-4cbd-a888-f091df3d0fda) ``` FILE_JS="/usr/syno/synoman/webman/modules/StorageManager/storage_panel.js" sed -i "s/\!u.isCacheTray()/(\!u.isCacheTray()||true)/" "${FILE_JS}" sed -i 's/t="normal"!==this.portType/t="normal"!==this.portType\&\&"cache"!==this.portType/g' "${FILE_JS}" sed -i 's/return"normal"===this.portType/return"normal"===this.portType||"cache"===this.portType/g' "${FILE_JS}" ```
Author
Owner

@007revad commented on GitHub (Mar 5, 2025):

Nice work!

<!-- gh-comment-id:2701906912 --> @007revad commented on GitHub (Mar 5, 2025): Nice work!
Author
Owner

@wjz304 commented on GitHub (Mar 6, 2025):

# 64570
sed -i "s/e.portType||e.isCacheTray()/e.portType||false/g" "${FILE_JS}" # [42962 - ?)
sed -i 's/notSupportM2Pool_addOnCard:this.T("disk_info","disk_reason_m2_add_on_card"),//g' "${FILE_JS}" # [64570 - ?)
sed -i 's/},{isConditionInvalid:0<this.pciSlot,invalidReason:"notSupportM2Pool_addOnCard"//g' "${FILE_JS}" # [64570 - ?)
# 42218
sed -i "s/\!u.isCacheTray()/(\!u.isCacheTray()||true)/g" "${FILE_JS}" # [42218,42962)
sed -i 's/t="normal"!==this.portType/t="normal"!==this.portType\&\&"cache"!==this.portType/g' "${FILE_JS}" # [42218 - 64570)
sed -i 's/return"normal"===this.portType/return"normal"===this.portType||"cache"===this.portType/g' "${FILE_JS}" # [42218 - 64570)
<!-- gh-comment-id:2702904301 --> @wjz304 commented on GitHub (Mar 6, 2025): ``` # 64570 sed -i "s/e.portType||e.isCacheTray()/e.portType||false/g" "${FILE_JS}" # [42962 - ?) sed -i 's/notSupportM2Pool_addOnCard:this.T("disk_info","disk_reason_m2_add_on_card"),//g' "${FILE_JS}" # [64570 - ?) sed -i 's/},{isConditionInvalid:0<this.pciSlot,invalidReason:"notSupportM2Pool_addOnCard"//g' "${FILE_JS}" # [64570 - ?) # 42218 sed -i "s/\!u.isCacheTray()/(\!u.isCacheTray()||true)/g" "${FILE_JS}" # [42218,42962) sed -i 's/t="normal"!==this.portType/t="normal"!==this.portType\&\&"cache"!==this.portType/g' "${FILE_JS}" # [42218 - 64570) sed -i 's/return"normal"===this.portType/return"normal"===this.portType||"cache"===this.portType/g' "${FILE_JS}" # [42218 - 64570) ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Synology_HDD_db#863
No description provided.