mirror of
https://github.com/sasjs/server.git
synced 2025-12-23 00:31:20 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
72a5393be3 | ||
|
|
769a840e9f | ||
| 730c7c52ac | |||
| ee2db276bb |
@@ -1,3 +1,10 @@
|
|||||||
|
# [0.18.0](https://github.com/sasjs/server/compare/v0.17.5...v0.18.0) (2022-09-02)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* add option for program launch in context menu ([ee2db27](https://github.com/sasjs/server/commit/ee2db276bb0bbd522f758e0b66f7e7b2f4afd9d5))
|
||||||
|
|
||||||
## [0.17.5](https://github.com/sasjs/server/compare/v0.17.4...v0.17.5) (2022-09-02)
|
## [0.17.5](https://github.com/sasjs/server/compare/v0.17.4...v0.17.5) (2022-09-02)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -78,6 +78,18 @@ const TreeViewNode = ({
|
|||||||
mouseY: number
|
mouseY: number
|
||||||
} | null>(null)
|
} | null>(null)
|
||||||
|
|
||||||
|
const launchProgram = () => {
|
||||||
|
const baseUrl = window.location.origin
|
||||||
|
window.open(`${baseUrl}/SASjsApi/stp/execute?_program=${node.relativePath}`)
|
||||||
|
}
|
||||||
|
|
||||||
|
const launchProgramWithDebug = () => {
|
||||||
|
const baseUrl = window.location.origin
|
||||||
|
window.open(
|
||||||
|
`${baseUrl}/SASjsApi/stp/execute?_program=${node.relativePath}&_debug=131`
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
const handleContextMenu = (event: React.MouseEvent) => {
|
const handleContextMenu = (event: React.MouseEvent) => {
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
event.stopPropagation()
|
event.stopPropagation()
|
||||||
@@ -224,8 +236,8 @@ const TreeViewNode = ({
|
|||||||
: undefined
|
: undefined
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{node.isFolder && (
|
{node.isFolder ? (
|
||||||
<div>
|
<>
|
||||||
<MenuItem onClick={handleNewFolderItemClick}>Add Folder</MenuItem>
|
<MenuItem onClick={handleNewFolderItemClick}>Add Folder</MenuItem>
|
||||||
<MenuItem
|
<MenuItem
|
||||||
disabled={!node.relativePath}
|
disabled={!node.relativePath}
|
||||||
@@ -233,14 +245,21 @@ const TreeViewNode = ({
|
|||||||
>
|
>
|
||||||
Add File
|
Add File
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
</div>
|
</>
|
||||||
|
) : (
|
||||||
|
<>
|
||||||
|
<MenuItem onClick={launchProgram}>Launch</MenuItem>
|
||||||
|
<MenuItem onClick={launchProgramWithDebug}>
|
||||||
|
Launch and Debug
|
||||||
|
</MenuItem>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
{!!node.relativePath && (
|
||||||
|
<>
|
||||||
|
<MenuItem onClick={handleRenameItemClick}>Rename</MenuItem>
|
||||||
|
<MenuItem onClick={handleDeleteItemClick}>Delete</MenuItem>
|
||||||
|
</>
|
||||||
)}
|
)}
|
||||||
<MenuItem disabled={!node.relativePath} onClick={handleRenameItemClick}>
|
|
||||||
Rename
|
|
||||||
</MenuItem>
|
|
||||||
<MenuItem disabled={!node.relativePath} onClick={handleDeleteItemClick}>
|
|
||||||
Delete
|
|
||||||
</MenuItem>
|
|
||||||
</Menu>
|
</Menu>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user