Class SavedObjectService
java.lang.Object
fr.paris.lutece.plugins.kibana.service.SavedObjectService
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidcreate(net.sf.json.JSONObject object) create a kibana objectstatic voidcreateDashboard(String strIdDashboard, String strTitleDashboard, String strIdIndexPattern, net.sf.json.JSONArray jsonArrayReference, net.sf.json.JSONArray jsonArraypanelsJSON, fr.paris.lutece.plugins.elasticdata.business.DataSource dataSource) Create a dashboardstatic voidcreateFromString(String strObject) create a kibana object from stringstatic voidcreateIndexPattern(String strIdIndexPattern) create kibana index patternstatic net.sf.json.JSONObjectcreatePanelJson(String panelId, Gird gird) Create a dashboard visualization panel objectstatic voidcreateReadOnlyUser(String strLogin, String strPassword, List<String> listTargetIndexName) create read only userstatic voidcreateSpace(String strSpaceId) create space index patternstatic voiddeleteDashboard(String strIdDashboard) delete a dashboardstatic final voiddoPostSavedObject(List<net.sf.json.JSONObject> savedObjectList) Post a saved objectstatic voiddoRefreshKibanaIndexPattern(String strIdIndexPattern) Refresh kibana index patternstatic Stringescape json stringstatic net.sf.json.JSONObjectgetDashboard(String strIdDashboard) Get dashboardgetFieldDistinctValues(String strIndexId, String strFieldName, int nMaxSize) Get distinct values of a fieldstatic fr.paris.lutece.util.ReferenceListgetParentList(String strIndexId) Get parent list of elk documentsstatic voidstatic booleanisExistSpace(String strSpaceId) Is space existstatic StringremoveUnusedBackSlash(String jsString) Remove backslash
-
Method Details
-
getDashboard
Get dashboard- Parameters:
strIdIndexPattern- The index pattern id
-
initEnvironnement
public static void initEnvironnement() -
createIndexPattern
create kibana index pattern- Parameters:
strIdIndexPattern- The index pattern id
-
isExistSpace
Is space exist- Parameters:
strSpaceId- The index pattern id
-
createSpace
create space index pattern- Parameters:
strSpaceId- The index pattern id
-
createReadOnlyUser
public static void createReadOnlyUser(String strLogin, String strPassword, List<String> listTargetIndexName) create read only user- Parameters:
strSpaceId- The index pattern id
-
doRefreshKibanaIndexPattern
Refresh kibana index pattern- Parameters:
strIdIndexPattern- The index pattern id
-
create
public static void create(net.sf.json.JSONObject object) create a kibana object- Parameters:
object- The json object
-
createFromString
create a kibana object from string- Parameters:
strObject- The string object
-
deleteDashboard
delete a dashboard- Parameters:
strIdDashboard- The dashboard id
-
createDashboard
public static void createDashboard(String strIdDashboard, String strTitleDashboard, String strIdIndexPattern, net.sf.json.JSONArray jsonArrayReference, net.sf.json.JSONArray jsonArraypanelsJSON, fr.paris.lutece.plugins.elasticdata.business.DataSource dataSource) Create a dashboard- Parameters:
strIdDashboard- the id of dashboardstrTitleDashboard- the title of dashboardstrIdIndexPattern- the index pattern idjsonArrayReference- the reference arrayjsonArraypanelsJSON- the panels array
-
createPanelJson
Create a dashboard visualization panel object- Parameters:
strIdVisualisation- The visualization idgird- The gird of the visualization- Returns:
- PanelJSON object
-
getParentList
Get parent list of elk documents- Parameters:
strIndexId- The index id- Returns:
- a reference list of parents
-
getFieldDistinctValues
public static List<String> getFieldDistinctValues(String strIndexId, String strFieldName, int nMaxSize) Get distinct values of a field- Parameters:
strIndexId- The index idstrFieldName- the field namenMaxSize- the max size- Returns:
- a list of values
-
removeUnusedBackSlash
Remove backslash- Parameters:
jsString- string to clean- Returns:
- string without multiple backslash
-
escape
escape json string- Parameters:
jsString- string to escape- Returns:
- string escaped
-
doPostSavedObject
Post a saved object- Parameters:
savedObject- Object to save
-