7 Replies Latest reply on Apr 27, 2016 6:51 PM by jgolla

    Coresight 2016 configuration modes

    arosenthal

      Is there any documentation on the different "modes" that are available when defining configOptions for custom symbols in Coresight 2016? The best I could gather from the GitHub repo is that the modes allow configuration panes to share "similar" configurations. I think it would be helpful to know what is available, what features each mode has, and if it is possible to create our own "modes".

        • Re: Coresight 2016 configuration modes
          pthivierge

          Hello Aaron,

           

          This is a good question.

          Let see if Jason Golla can chime in and tell us more about it.

          • Re: Coresight 2016 configuration modes
            jgolla

            Hello Aaron,

             

            Unfortunately we do not have any proper documentation on the extensibility model in PI Coresight (yet). We are working with our documentation team to convert developer speak to English, but that will take some time.


            I will attempt to answer your question about configOptions, though. Like you stated, configOptions.mode setting is used to allow the configuration pane to be "shared" among similar symbols. What this really means is that if 2 symbols share the same configOptions.mode, as you click between those 2 symbols, the configuration pane will remain open. Even though it remains open, the contents of the configuration pane could change. To see this in practice, add a rectangle and a polygon to a PI Coresight display, right click and choose Format Shape on either one. Clicking back and forth between both shapes will keep the pane open, but polygon will have one additional setting available (Number of Sides). Another example of this is vertical and horizontal gauges.

             

            Now, if you add 2 shapes that do not have the same configOptions.mode, the configuration pane will be closed when clicking between those symbols, such as with a table and a value symbol.

             

            What do you think of this interaction in general? Should we be closing the configuration pane as you switch symbols? Should we keep it open as you switch symbols? Should we keep it open only is the symbols are "similiar"?

            4 of 4 people found this helpful
              • Re: Coresight 2016 configuration modes
                arosenthal

                Thanks Jason Golla, your explanation was helpful.

                 

                One area I still have confusion (and perhaps this will be cleared up when documentation is made available) is that each symbol can define multiple menu items in the configOptions setting, but only a single configTemplateUrl. An example of this occurs in the code for the coresight.sym-statictext symbol that is shipped with Coresight by default. As best as I can tell, only the first item in the array returned by configOptions is tied to the specified configTemplateUrl, and if we want to implement multiple menu items the custom symbol needs to listen for the 'showConfigPane' event and decide how to lay out the configuration pane based on the mode. Is this correct? If so, it may be helpful to move the configTemplateUrl inside the configOptions definition so that each menu item can link to a different template file. This would improve the extensability model.

                  • Re: Coresight 2016 configuration modes
                    jgolla

                    Your understanding is correct. You can have multiple menu items associated with a configOptions, but only one of them would be linked to the configuration pane. Our original thinking was that each symbol would have only one configuration pane, used to set all the options available for that symbol.

                     

                    The other menu items we envisioned were to do immediate actions. For example, providing a JavaScript callback to a menu item to run as soon as that menu item was selected.

                     

                    Did you have a use case in mind for multiple panes?

                    • Re: Coresight 2016 configuration modes
                      jgolla

                      Aaron Rosenthal, I was just talking to a colleague (John Sintilas) and I forgot one thing. The mode can also be used as a switch inside of the configuration pane to show different areas inside of the configuration template, our Trend symbol does this. So you can use the mode, combined with ng-show to show only specific parts of the configuration template. I think this would accomplish what you were suggesting as well.