System generated commit, initial commit
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
WITH ranked AS (
|
||||
SELECT
|
||||
t.*,
|
||||
ROW_NUMBER() OVER (
|
||||
PARTITION BY t.inventortools_drawingpath
|
||||
ORDER BY t.inventortools_build_date DESC, t.inventortools_id DESC
|
||||
) AS rn
|
||||
FROM mpe.inventortools t
|
||||
)
|
||||
SELECT
|
||||
r.inventortools_id AS "ID",
|
||||
CONCAT('http://magnafastapi:8000/api/v1/webfrontend/logs/itools/job/', r.inventortools_id) AS "URL",
|
||||
r.inventortools_drawingpath AS "Drawing Path",
|
||||
CONCAT(r.inventortools_svn_id, ' (', TO_CHAR(r.inventortools_build_date, 'YY-MM-DD HH24:MI'), ')') AS "SVN",
|
||||
r.inventortools_user AS "User",
|
||||
r.inventortools_message AS "Message",
|
||||
COALESCE(array_length(r.inventortools_unresolvedreferencepaths, 1), 0) AS "Unresolved Count",
|
||||
COALESCE(array_length(r.inventortools_unresolvedreferencepaths, 1), 0) > 0 AS "Has Unresolved",
|
||||
CASE
|
||||
WHEN COALESCE(array_length(r.inventortools_unresolvedreferencepaths, 1), 0) > 0 THEN
|
||||
array_to_string(
|
||||
ARRAY (
|
||||
SELECT CONCAT(
|
||||
split_part(regexp_replace(unres_path.path, E'\\\\','/','g'), '/', 1),
|
||||
'/.../',
|
||||
regexp_replace(regexp_replace(unres_path.path, E'\\\\','/','g'), '^.*/', '')
|
||||
)
|
||||
FROM unnest(r.inventortools_unresolvedreferencepaths) AS unres_path(path)
|
||||
),
|
||||
'; '
|
||||
)
|
||||
ELSE
|
||||
'No unresolved references'
|
||||
END AS "Unresolved Links"
|
||||
FROM ranked r
|
||||
WHERE r.rn = 1
|
||||
AND r.inventortools_message IS NOT NULL
|
||||
AND r.inventortools_message <> ''
|
||||
ORDER BY r.inventortools_id DESC
|
||||
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"gitSyncId": "ea31ffe3b6fe44579c5a5898_e0eadab7-010c-4011-8151-744e28569b7e",
|
||||
"id": "Operations - Job Drawing Status_job_drawing_status",
|
||||
"pluginId": "postgres-plugin",
|
||||
"pluginType": "DB",
|
||||
"unpublishedAction": {
|
||||
"actionConfiguration": {
|
||||
"body": "WITH ranked AS (\n SELECT\n t.*,\n ROW_NUMBER() OVER (\n PARTITION BY t.inventortools_drawingpath\n ORDER BY t.inventortools_build_date DESC, t.inventortools_id DESC\n ) AS rn\n FROM mpe.inventortools t\n)\nSELECT\n r.inventortools_id AS \"ID\",\n CONCAT('http://magnafastapi:8000/api/v1/webfrontend/logs/itools/job/', r.inventortools_id) AS \"URL\",\n r.inventortools_drawingpath AS \"Drawing Path\",\n CONCAT(r.inventortools_svn_id, ' (', TO_CHAR(r.inventortools_build_date, 'YY-MM-DD HH24:MI'), ')') AS \"SVN\",\n r.inventortools_user AS \"User\",\n r.inventortools_message AS \"Message\",\n COALESCE(array_length(r.inventortools_unresolvedreferencepaths, 1), 0) AS \"Unresolved Count\",\n COALESCE(array_length(r.inventortools_unresolvedreferencepaths, 1), 0) > 0 AS \"Has Unresolved\",\n CASE\n WHEN COALESCE(array_length(r.inventortools_unresolvedreferencepaths, 1), 0) > 0 THEN\n array_to_string(\n ARRAY (\n SELECT CONCAT(\n split_part(regexp_replace(unres_path.path, E'\\\\\\\\','/','g'), '/', 1),\n '/.../',\n regexp_replace(regexp_replace(unres_path.path, E'\\\\\\\\','/','g'), '^.*/', '')\n )\n FROM unnest(r.inventortools_unresolvedreferencepaths) AS unres_path(path)\n ),\n '; '\n )\n ELSE\n 'No unresolved references'\n END AS \"Unresolved Links\"\nFROM ranked r\nWHERE r.rn = 1\n AND r.inventortools_message IS NOT NULL\n AND r.inventortools_message <> ''\nORDER BY r.inventortools_id DESC",
|
||||
"encodeParamsToggle": true,
|
||||
"paginationType": "NONE",
|
||||
"pluginSpecifiedTemplates": [
|
||||
{
|
||||
"value": true
|
||||
}
|
||||
],
|
||||
"timeoutInMillisecond": 10000
|
||||
},
|
||||
"confirmBeforeExecute": false,
|
||||
"datasource": {
|
||||
"id": "xTuple_GoLive",
|
||||
"isAutoGenerated": false,
|
||||
"name": "xTuple_GoLive",
|
||||
"pluginId": "postgres-plugin"
|
||||
},
|
||||
"dynamicBindingPathList": [],
|
||||
"name": "job_drawing_status",
|
||||
"pageId": "Operations - Job Drawing Status",
|
||||
"runBehaviour": "AUTOMATIC",
|
||||
"userSetOnLoad": false
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user