|
@@ -1,20 +1,22 @@
|
|
|
|
+SET ":user" = 'shannon';
|
|
INSERT INTO activities(user, activity, ts)
|
|
INSERT INTO activities(user, activity, ts)
|
|
SELECT :user, :activity, COALESCE(CASE COALESCE(:ts, '')
|
|
SELECT :user, :activity, COALESCE(CASE COALESCE(:ts, '')
|
|
WHEN '' THEN NULL
|
|
WHEN '' THEN NULL
|
|
ELSE datetime(:ts, 'utc')
|
|
ELSE datetime(:ts, 'utc')
|
|
END, CURRENT_TIMESTAMP)
|
|
END, CURRENT_TIMESTAMP)
|
|
WHERE COALESCE(:activity, '') <> ''
|
|
WHERE COALESCE(:activity, '') <> ''
|
|
-RETURNING 'redirect' AS component, '/' AS link
|
|
|
|
|
|
+RETURNING 'redirect' AS component, '/activity' AS link
|
|
;
|
|
;
|
|
|
|
|
|
-SET ":user" = 'shannon';
|
|
|
|
SET ":title" = 'Activities';
|
|
SET ":title" = 'Activities';
|
|
SELECT 'shell' AS component
|
|
SELECT 'shell' AS component
|
|
, 'dark' AS theme
|
|
, 'dark' AS theme
|
|
, :title AS title
|
|
, :title AS title
|
|
;
|
|
;
|
|
|
|
|
|
-SELECT 'form' AS component;
|
|
|
|
|
|
+SELECT 'form' AS component
|
|
|
|
+, '/activity/index.sql' AS action
|
|
|
|
+;
|
|
SELECT 'select' AS type
|
|
SELECT 'select' AS type
|
|
, 'Activity' AS label
|
|
, 'Activity' AS label
|
|
, 'activity' AS name
|
|
, 'activity' AS name
|
|
@@ -38,7 +40,7 @@ SELECT 'datetime-local' AS type
|
|
;
|
|
;
|
|
|
|
|
|
SELECT date(datetime(CURRENT_TIMESTAMP, '-'|| value ||' days')) AS title
|
|
SELECT date(datetime(CURRENT_TIMESTAMP, '-'|| value ||' days')) AS title
|
|
-, '/chart.sql'||
|
|
|
|
|
|
+, '/activity/chart.sql'||
|
|
'?user='||:user||
|
|
'?user='||:user||
|
|
'&date='|| REPLACE(datetime(CURRENT_TIMESTAMP, '-'|| value ||' days'), ' ', '+') ||
|
|
'&date='|| REPLACE(datetime(CURRENT_TIMESTAMP, '-'|| value ||' days'), ' ', '+') ||
|
|
'&_sqlpage_embed' AS embed
|
|
'&_sqlpage_embed' AS embed
|