Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-40768

Jenkins client-side HTML5 storage API




      Not specifically related to Blue Ocean, but it is driving the requirements for it atm.


      HTML5 localStorage is great for storing per-domain name/value pairs, but it's a totally flat and untyped structure. The lack of hierarchy/namespacing makes it difficult to perform operations on subsets of data stored in localStorage e.g. to clear out (invalidate) a subset of localStorage NVPs when a new instance of Jenkins is installed, or to group a subset of NVPs and have APIs that allow the client code to just navigate those properties only e.g. log categories.


      1. Support for NVP namespacing so that we can perform operations on a subset of NVPs i.e.
        1. set and get in the namespace.
        2. clear all NVPs in a namespace. Obviously, should not remove NVPs in other namespaces. This will e.g. allow us to clear all NVPs associated with a Jenkins "instance" after a new instance is installed, or plugins have ben added/removed/updated.
        3. iterate all NVPs in a namespace.
      2. Support more than just string values e.g. boolean, number, object. Not function though, obviously.
      3. Support subspaces i.e. namespaces inside namespaces e.g. you could have the "log-gategory" namespace inside the "jenkins-instance" namespace i.e. "jenkins-instance/log-gategory". Another one might be "jenkins-instance/classes-info" for storing classes metadata Vs the client UI contantly firing REST API calls to get it (see JENKINS-40080).
      4. Support get fallback options whereby you can configure the get to look in parent namespaces, or if using a dot separated key in the name (the N part of the NVP) that it can be configured to check back along the "dot parent path" e.g. if "org.jenkins.a.b" has no value, then fallback and check "org.jenkins.a" etc. This would be useful for e.g. log categories.




            tfennelly Tom FENNELLY
            tfennelly Tom FENNELLY
            0 Vote for this issue
            1 Start watching this issue