feat(api): dashboard category description
feat(db): changed metrics to support overview metric-type
This commit is contained in:
parent
f423e9c9cf
commit
ed51fc09cb
7 changed files with 101 additions and 96 deletions
|
|
@ -13,9 +13,9 @@ def jwt_authorizer(token):
|
|||
try:
|
||||
payload = jwt.decode(
|
||||
token[1],
|
||||
config("jwt_secret"),
|
||||
"",
|
||||
algorithms=config("jwt_algorithm"),
|
||||
audience=[f"plugin:{helper.get_stage_name()}", f"front:{helper.get_stage_name()}"]
|
||||
audience=[ f"front:default-foss"]
|
||||
)
|
||||
except jwt.ExpiredSignatureError:
|
||||
print("! JWT Expired signature")
|
||||
|
|
|
|||
|
|
@ -7,7 +7,8 @@ from chalicelib.utils import pg_client
|
|||
from chalicelib.utils.TimeUTC import TimeUTC
|
||||
|
||||
CATEGORY_DESCRIPTION = {
|
||||
'categ1': 'lorem',
|
||||
'overview': 'lorem ipsum',
|
||||
'custom': 'lorem cusipsum',
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ def get_templates(projectId: int, context: schemas.CurrentContext = Depends(OR_c
|
|||
@app.put('/{projectId}/metrics/try', tags=["dashboard"])
|
||||
@app.post('/{projectId}/custom_metrics/try', tags=["customMetrics"])
|
||||
@app.put('/{projectId}/custom_metrics/try', tags=["customMetrics"])
|
||||
def try_custom_metric(projectId: int, data: schemas.CreateCustomMetricsSchema = Body(...),
|
||||
def try_custom_metric(projectId: int, data: schemas.TryCustomMetricsPayloadSchema = Body(...),
|
||||
context: schemas.CurrentContext = Depends(OR_context)):
|
||||
return {"data": custom_metrics.merged_live(project_id=projectId, data=data)}
|
||||
|
||||
|
|
|
|||
|
|
@ -48,33 +48,34 @@ CREATE TABLE IF NOT EXISTS dashboard_widgets
|
|||
config jsonb NOT NULL DEFAULT '{}'::jsonb
|
||||
);
|
||||
|
||||
COMMIT;
|
||||
ALTER TYPE metric_view_type ADD VALUE IF NOT EXISTS 'areaChart';
|
||||
ALTER TYPE metric_type ADD VALUE IF NOT EXISTS 'overview';
|
||||
|
||||
INSERT INTO metrics (name, category, config, is_predefined, is_template, is_public, key)
|
||||
VALUES ('sessions count', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'count_sessions'),
|
||||
('avg request load time', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_request_load_time'),
|
||||
('avg page load time', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_page_load_time'),
|
||||
('avg image load time', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_image_load_time'),
|
||||
('avg dom content load start', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_dom_content_load_start'),
|
||||
('avg first contentful pixel', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_first_contentful_pixel'),
|
||||
('avg visited pages count', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_visited_pages'),
|
||||
('avg session duration', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_session_duration'),
|
||||
('avg pages dom build time', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_pages_dom_buildtime'),
|
||||
('avg pages response time', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_pages_response_time'),
|
||||
('avg response time', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_response_time'),
|
||||
('avg first paint', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_first_paint'),
|
||||
('avg dom content loaded', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_dom_content_loaded'),
|
||||
('avg time till first bit', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_till_first_bit'),
|
||||
('avg time to interactive', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_time_to_interactive'),
|
||||
('requests count', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'count_requests'),
|
||||
('avg time to render', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_time_to_render'),
|
||||
('avg used js heap size', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_used_js_heap_size'),
|
||||
('avg cpu', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_cpu')
|
||||
INSERT INTO metrics (name, category, config, is_predefined, is_template, is_public, key, metric_type)
|
||||
VALUES ('sessions count', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'count_sessions', 'overview'),
|
||||
('avg request load time', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_request_load_time', 'overview'),
|
||||
('avg page load time', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_page_load_time', 'overview'),
|
||||
('avg image load time', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_image_load_time', 'overview'),
|
||||
('avg dom content load start', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_dom_content_load_start', 'overview'),
|
||||
('avg first contentful pixel', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_first_contentful_pixel', 'overview'),
|
||||
('avg visited pages count', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_visited_pages', 'overview'),
|
||||
('avg session duration', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_session_duration', 'overview'),
|
||||
('avg pages dom build time', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_pages_dom_buildtime', 'overview'),
|
||||
('avg pages response time', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_pages_response_time', 'overview'),
|
||||
('avg response time', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_response_time', 'overview'),
|
||||
('avg first paint', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_first_paint', 'overview'),
|
||||
('avg dom content loaded', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_dom_content_loaded', 'overview'),
|
||||
('avg time till first bit', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_till_first_bit', 'overview'),
|
||||
('avg time to interactive', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_time_to_interactive', 'overview'),
|
||||
('requests count', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'count_requests', 'overview'),
|
||||
('avg time to render', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_time_to_render', 'overview'),
|
||||
('avg used js heap size', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_used_js_heap_size', 'overview'),
|
||||
('avg cpu', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_cpu', 'overview')
|
||||
ON CONFLICT (key) DO UPDATE SET name=excluded.name,
|
||||
category=excluded.category,
|
||||
config=excluded.config,
|
||||
is_predefined=excluded.is_predefined,
|
||||
is_template=excluded.is_template,
|
||||
is_public=excluded.is_public;
|
||||
|
||||
COMMIT;
|
||||
ALTER TYPE metric_view_type ADD VALUE IF NOT EXISTS 'areaChart';
|
||||
is_public=excluded.is_public,
|
||||
metric_type=excluded.metric_type;
|
||||
|
|
@ -788,7 +788,7 @@ $$
|
|||
CREATE INDEX IF NOT EXISTS traces_user_id_idx ON traces (user_id);
|
||||
CREATE INDEX IF NOT EXISTS traces_tenant_id_idx ON traces (tenant_id);
|
||||
|
||||
CREATE TYPE metric_type AS ENUM ('timeseries','table');
|
||||
CREATE TYPE metric_type AS ENUM ('timeseries','table', 'overview');
|
||||
CREATE TYPE metric_view_type AS ENUM ('lineChart','progress','table','pieChart','areaChart');
|
||||
CREATE TABLE IF NOT EXISTS metrics
|
||||
(
|
||||
|
|
@ -1257,31 +1257,32 @@ $$
|
|||
$$
|
||||
LANGUAGE plpgsql;
|
||||
|
||||
INSERT INTO metrics (name, category, config, is_predefined, is_template, is_public, key)
|
||||
VALUES ('sessions count', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'count_sessions'),
|
||||
('avg request load time', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_request_load_time'),
|
||||
('avg page load time', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_page_load_time'),
|
||||
('avg image load time', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_image_load_time'),
|
||||
('avg dom content load start', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_dom_content_load_start'),
|
||||
('avg first contentful pixel', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_first_contentful_pixel'),
|
||||
('avg visited pages count', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_visited_pages'),
|
||||
('avg session duration', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_session_duration'),
|
||||
('avg pages dom build time', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_pages_dom_buildtime'),
|
||||
('avg pages response time', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_pages_response_time'),
|
||||
('avg response time', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_response_time'),
|
||||
('avg first paint', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_first_paint'),
|
||||
('avg dom content loaded', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_dom_content_loaded'),
|
||||
('avg time till first bit', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_till_first_bit'),
|
||||
('avg time to interactive', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_time_to_interactive'),
|
||||
('requests count', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'count_requests'),
|
||||
('avg time to render', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_time_to_render'),
|
||||
('avg used js heap size', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_used_js_heap_size'),
|
||||
('avg cpu', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_cpu')
|
||||
INSERT INTO metrics (name, category, config, is_predefined, is_template, is_public, key, metric_type)
|
||||
VALUES ('sessions count', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'count_sessions', 'overview'),
|
||||
('avg request load time', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_request_load_time', 'overview'),
|
||||
('avg page load time', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_page_load_time', 'overview'),
|
||||
('avg image load time', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_image_load_time', 'overview'),
|
||||
('avg dom content load start', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_dom_content_load_start', 'overview'),
|
||||
('avg first contentful pixel', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_first_contentful_pixel', 'overview'),
|
||||
('avg visited pages count', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_visited_pages', 'overview'),
|
||||
('avg session duration', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_session_duration', 'overview'),
|
||||
('avg pages dom build time', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_pages_dom_buildtime', 'overview'),
|
||||
('avg pages response time', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_pages_response_time', 'overview'),
|
||||
('avg response time', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_response_time', 'overview'),
|
||||
('avg first paint', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_first_paint', 'overview'),
|
||||
('avg dom content loaded', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_dom_content_loaded', 'overview'),
|
||||
('avg time till first bit', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_till_first_bit', 'overview'),
|
||||
('avg time to interactive', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_time_to_interactive', 'overview'),
|
||||
('requests count', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'count_requests', 'overview'),
|
||||
('avg time to render', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_time_to_render', 'overview'),
|
||||
('avg used js heap size', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_used_js_heap_size', 'overview'),
|
||||
('avg cpu', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_cpu', 'overview')
|
||||
ON CONFLICT (key) DO UPDATE SET name=excluded.name,
|
||||
category=excluded.category,
|
||||
config=excluded.config,
|
||||
is_predefined=excluded.is_predefined,
|
||||
is_template=excluded.is_template,
|
||||
is_public=excluded.is_public;
|
||||
is_public=excluded.is_public,
|
||||
metric_type=excluded.metric_type;
|
||||
|
||||
COMMIT;
|
||||
|
|
@ -48,33 +48,34 @@ CREATE TABLE IF NOT EXISTS dashboard_widgets
|
|||
config jsonb NOT NULL DEFAULT '{}'::jsonb
|
||||
);
|
||||
|
||||
COMMIT;
|
||||
ALTER TYPE metric_view_type ADD VALUE IF NOT EXISTS 'areaChart';
|
||||
ALTER TYPE metric_type ADD VALUE IF NOT EXISTS 'overview';
|
||||
|
||||
INSERT INTO metrics (name, category, config, is_predefined, is_template, is_public, key)
|
||||
VALUES ('sessions count', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'count_sessions'),
|
||||
('avg request load time', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_request_load_time'),
|
||||
('avg page load time', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_page_load_time'),
|
||||
('avg image load time', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_image_load_time'),
|
||||
('avg dom content load start', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_dom_content_load_start'),
|
||||
('avg first contentful pixel', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_first_contentful_pixel'),
|
||||
('avg visited pages count', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_visited_pages'),
|
||||
('avg session duration', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_session_duration'),
|
||||
('avg pages dom build time', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_pages_dom_buildtime'),
|
||||
('avg pages response time', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_pages_response_time'),
|
||||
('avg response time', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_response_time'),
|
||||
('avg first paint', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_first_paint'),
|
||||
('avg dom content loaded', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_dom_content_loaded'),
|
||||
('avg time till first bit', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_till_first_bit'),
|
||||
('avg time to interactive', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_time_to_interactive'),
|
||||
('requests count', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'count_requests'),
|
||||
('avg time to render', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_time_to_render'),
|
||||
('avg used js heap size', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_used_js_heap_size'),
|
||||
('avg cpu', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_cpu')
|
||||
INSERT INTO metrics (name, category, config, is_predefined, is_template, is_public, key, metric_type)
|
||||
VALUES ('sessions count', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'count_sessions', 'overview'),
|
||||
('avg request load time', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_request_load_time', 'overview'),
|
||||
('avg page load time', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_page_load_time', 'overview'),
|
||||
('avg image load time', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_image_load_time', 'overview'),
|
||||
('avg dom content load start', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_dom_content_load_start', 'overview'),
|
||||
('avg first contentful pixel', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_first_contentful_pixel', 'overview'),
|
||||
('avg visited pages count', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_visited_pages', 'overview'),
|
||||
('avg session duration', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_session_duration', 'overview'),
|
||||
('avg pages dom build time', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_pages_dom_buildtime', 'overview'),
|
||||
('avg pages response time', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_pages_response_time', 'overview'),
|
||||
('avg response time', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_response_time', 'overview'),
|
||||
('avg first paint', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_first_paint', 'overview'),
|
||||
('avg dom content loaded', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_dom_content_loaded', 'overview'),
|
||||
('avg time till first bit', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_till_first_bit', 'overview'),
|
||||
('avg time to interactive', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_time_to_interactive', 'overview'),
|
||||
('requests count', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'count_requests', 'overview'),
|
||||
('avg time to render', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_time_to_render', 'overview'),
|
||||
('avg used js heap size', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_used_js_heap_size', 'overview'),
|
||||
('avg cpu', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_cpu', 'overview')
|
||||
ON CONFLICT (key) DO UPDATE SET name=excluded.name,
|
||||
category=excluded.category,
|
||||
config=excluded.config,
|
||||
is_predefined=excluded.is_predefined,
|
||||
is_template=excluded.is_template,
|
||||
is_public=excluded.is_public;
|
||||
|
||||
COMMIT;
|
||||
ALTER TYPE metric_view_type ADD VALUE IF NOT EXISTS 'areaChart';
|
||||
is_public=excluded.is_public,
|
||||
metric_type=excluded.metric_type;
|
||||
|
|
@ -935,7 +935,7 @@ $$
|
|||
CREATE INDEX jobs_start_at_idx ON jobs (start_at);
|
||||
CREATE INDEX jobs_project_id_idx ON jobs (project_id);
|
||||
|
||||
CREATE TYPE metric_type AS ENUM ('timeseries','table');
|
||||
CREATE TYPE metric_type AS ENUM ('timeseries','table', 'overview');
|
||||
CREATE TYPE metric_view_type AS ENUM ('lineChart','progress','table','pieChart','areaChart');
|
||||
CREATE TABLE metrics
|
||||
(
|
||||
|
|
@ -1048,31 +1048,32 @@ $$
|
|||
$$
|
||||
LANGUAGE plpgsql;
|
||||
|
||||
INSERT INTO metrics (name, category, config, is_predefined, is_template, is_public, key)
|
||||
VALUES ('sessions count', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'count_sessions'),
|
||||
('avg request load time', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_request_load_time'),
|
||||
('avg page load time', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_page_load_time'),
|
||||
('avg image load time', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_image_load_time'),
|
||||
('avg dom content load start', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_dom_content_load_start'),
|
||||
('avg first contentful pixel', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_first_contentful_pixel'),
|
||||
('avg visited pages count', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_visited_pages'),
|
||||
('avg session duration', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_session_duration'),
|
||||
('avg pages dom build time', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_pages_dom_buildtime'),
|
||||
('avg pages response time', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_pages_response_time'),
|
||||
('avg response time', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_response_time'),
|
||||
('avg first paint', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_first_paint'),
|
||||
('avg dom content loaded', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_dom_content_loaded'),
|
||||
('avg time till first bit', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_till_first_bit'),
|
||||
('avg time to interactive', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_time_to_interactive'),
|
||||
('requests count', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'count_requests'),
|
||||
('avg time to render', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_time_to_render'),
|
||||
('avg used js heap size', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_used_js_heap_size'),
|
||||
('avg cpu', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_cpu')
|
||||
INSERT INTO metrics (name, category, config, is_predefined, is_template, is_public, key, metric_type)
|
||||
VALUES ('sessions count', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'count_sessions', 'overview'),
|
||||
('avg request load time', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_request_load_time', 'overview'),
|
||||
('avg page load time', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_page_load_time', 'overview'),
|
||||
('avg image load time', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_image_load_time', 'overview'),
|
||||
('avg dom content load start', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_dom_content_load_start', 'overview'),
|
||||
('avg first contentful pixel', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_first_contentful_pixel', 'overview'),
|
||||
('avg visited pages count', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_visited_pages', 'overview'),
|
||||
('avg session duration', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_session_duration', 'overview'),
|
||||
('avg pages dom build time', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_pages_dom_buildtime', 'overview'),
|
||||
('avg pages response time', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_pages_response_time', 'overview'),
|
||||
('avg response time', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_response_time', 'overview'),
|
||||
('avg first paint', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_first_paint', 'overview'),
|
||||
('avg dom content loaded', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_dom_content_loaded', 'overview'),
|
||||
('avg time till first bit', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_till_first_bit', 'overview'),
|
||||
('avg time to interactive', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_time_to_interactive', 'overview'),
|
||||
('requests count', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'count_requests', 'overview'),
|
||||
('avg time to render', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_time_to_render', 'overview'),
|
||||
('avg used js heap size', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_used_js_heap_size', 'overview'),
|
||||
('avg cpu', 'overview', '{"col":1,"row":1,"position":0}', true, true, true, 'avg_cpu', 'overview')
|
||||
ON CONFLICT (key) DO UPDATE SET name=excluded.name,
|
||||
category=excluded.category,
|
||||
config=excluded.config,
|
||||
is_predefined=excluded.is_predefined,
|
||||
is_template=excluded.is_template,
|
||||
is_public=excluded.is_public;
|
||||
is_public=excluded.is_public,
|
||||
metric_type=excluded.metric_type;
|
||||
|
||||
COMMIT;
|
||||
Loading…
Add table
Reference in a new issue