Code insights: Add BE insight creation UI
Created by: vovakulikov
Context
Since this PR we have some new insight type called insight BE (or over all repositories insight). This insight will collect information from all repositories in sg instance. To introduce this new type of insight this PR adds a new form field to the insight creation/edit UI
With this turned-on mode, the creation UI creates BE insight. A couple of words about this new BE insights
- Collect data for insight from all repositories that you have in instance (because of this we disable the repositories field in the form)
- Work with fixed time step between chart data points (2 weeks). Because of that we disable the time step and set 2 weeks-value programmatically
- This type of insight lives in a special place in the setting file -
insights.allrepos
"insights.allrepos" : { "<insight_id>: { /* insight configuration */}"}
What have been done
-
Add all repos UI (form checkbox) -
Add all repos logic to other form fields (disable repositories and time step in case if all repos is checked -
Connect UI to the update logic
How to test
- Go to
/insights/create/search
- the search based insight creation UI page - Try to fill some value as you do usually when you want to create a code insight
- Turn on all repos mode (checked the new checkbox from screenshot above)
- You must see that repositories and timestep field are disabled
- Click create button
- Check your settings, you must see
insights.allrepos
map with your newly created insight's configurations