eliweitzman / EnterpriseTechTool

A one-stop-shop powershell-based application for automating and abstracting enterprise service tasks!
BSD 3-Clause "New" or "Revised" License
9 stars 1 forks source link

[REQUEST] Config file settings + functions #24

Closed eliweitzman closed 6 months ago

eliweitzman commented 1 year ago

Describe the solution you'd like

A settings UX, which allows for feature flags to be turned on or off, baked into the main UX. Allows customizations to be saved locally and without needing to remanufacture and recompile ETT with custom changes.

Describe alternatives you've considered Keeping as-is with feature flags and conditionality

eliweitzman commented 1 year ago

Pushing to 1.2.1

TheDeadGPU commented 7 months ago

I kinda got this working by creating a config.ini file with the contents

function MyFunction { Write-Host 'Hello from MyFunction!'}
function MyFunction2 { Write-Host 'Hello from MyFunction2!'}

Then the functions get read in with the following PowerShell code

$content = Get-Content .\config.ini -Raw
. { Invoke-Expression "$content" }
MyFunction
MyFunction2
TheDeadGPU commented 7 months ago

image

TheDeadGPU commented 7 months ago

There is still more work to be done on this Feature Request. Going to leave this open for now.

TheDeadGPU commented 7 months ago

I'm thinking we can do something where we can define which tab a custom function can go under if we don't want it under the custom tab. Maybe have the function naming schema be "tabname_custom_nameoffunction" or "custom_tabname_nameoffunction"? What are your thoughts @eliweitzman?

TheDeadGPU commented 7 months ago

Just need to implement the function description on list item hover and then we can close.

eliweitzman commented 7 months ago

I'm thinking we can do something where we can define which tab a custom function can go under if we don't want it under the custom tab. Maybe have the function naming schema be "tabname_custom_nameoffunction" or "custom_tabname_nameoffunction"? What are your thoughts @eliweitzman?

I like this naming style! The only issue being it might things a bit more complex when it comes to differentiating proprietary and custom functions from existing ones... Unless maybe we add some sort of a differentiating symbol that could point out custom from built-in... The only idea being to keep a visible separation for any future variants.

TheDeadGPU commented 6 months ago

This is done.