GithubHelp home page GithubHelp logo

Support for custom URL roots about odd-jobs HOT 3 OPEN

ivanbakel avatar ivanbakel commented on May 26, 2024
Support for custom URL roots

from odd-jobs.

Comments (3)

saurabhnanda avatar saurabhnanda commented on May 26, 2024 1

@ivanbakel I believe the code already supports this. Please take a look at the following function -

mkEnv :: (MonadIO m) => Config -> (Text -> Text) -> m Env
mkEnv cfg@Config{..} linksFn = do
allJobTypes <- fetchAllJobTypes cfg
allJobRunners <- fetchAllJobRunners cfg
envJobTypesRef <- newIORef allJobTypes
envJobRunnersRef <- newIORef allJobRunners
let envRoutes = routes linksFn
The second argument is a function that allows you to transform the links generated by the web UI to whatever you want. This "hook" was added specifically for your use-case.

Are you starting the web UI via the default command-line? We can probably add another flag --web-ui-root-path to make this easier without having to write custom code.

from odd-jobs.

ivanbakel avatar ivanbakel commented on May 26, 2024

Good to know, thanks! I am using the default command-line settings to start the web UI, so a flag would be really useful. I'll make a PR to support doing that.

from odd-jobs.

saurabhnanda avatar saurabhnanda commented on May 26, 2024

@ivanbakel before you work on the PR, please take a look at #76 -- this might make your PR easier.

from odd-jobs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.