make a chart card

This commit is contained in:
dal 2025-02-11 10:58:25 -07:00
parent db50da5ea3
commit e7b96d9bd5
No known key found for this signature in database
GPG Key ID: 16F4B0E1E9F61122
2 changed files with 4 additions and 20 deletions

View File

@ -181,7 +181,6 @@ async fn get_org_datasets(
users::email, users::email,
data_sources::id, data_sources::id,
data_sources::name, data_sources::name,
sql::<Nullable<Timestamptz>>("max(messages.created_at) as last_queried"),
)) ))
.group_by(( .group_by((
datasets::id, datasets::id,
@ -229,7 +228,6 @@ async fn get_org_datasets(
String, String,
Uuid, Uuid,
String, String,
Option<DateTime<Utc>>,
)>(&mut conn) )>(&mut conn)
.await .await
{ {
@ -252,7 +250,6 @@ async fn get_org_datasets(
user_email, user_email,
data_source_id, data_source_id,
data_source_name, data_source_name,
last_queried,
)| { )| {
ListDatasetObject { ListDatasetObject {
id, id,
@ -265,7 +262,7 @@ async fn get_org_datasets(
id: data_source_id, id: data_source_id,
name: data_source_name, name: data_source_name,
}, },
last_queried, last_queried: None,
owner: Some(ListDatasetOwner { owner: Some(ListDatasetOwner {
id: user_id, id: user_id,
name: user_name.unwrap_or(user_email), name: user_name.unwrap_or(user_email),

View File

@ -236,7 +236,6 @@ async fn get_user_permissioned_datasets(
users::email, users::email,
data_sources::id, data_sources::id,
data_sources::name, data_sources::name,
sql::<Nullable<Timestamptz>>("max(messages.created_at) as last_queried"),
)) ))
.group_by(( .group_by((
datasets::id, datasets::id,
@ -271,7 +270,6 @@ async fn get_user_permissioned_datasets(
String, String,
Uuid, Uuid,
String, String,
Option<DateTime<Utc>>,
)>(&mut conn) )>(&mut conn)
.await .await
{ {
@ -294,7 +292,6 @@ async fn get_user_permissioned_datasets(
user_email, user_email,
data_source_id, data_source_id,
data_source_name, data_source_name,
last_queried,
)| { )| {
ListDatasetObject { ListDatasetObject {
id, id,
@ -307,7 +304,7 @@ async fn get_user_permissioned_datasets(
id: data_source_id, id: data_source_id,
name: data_source_name, name: data_source_name,
}, },
last_queried, last_queried: None,
owner: Some(ListDatasetOwner { owner: Some(ListDatasetOwner {
id: user_id, id: user_id,
name: user_name.unwrap_or(user_email), name: user_name.unwrap_or(user_email),
@ -351,7 +348,6 @@ async fn get_org_datasets(
users::email, users::email,
data_sources::id, data_sources::id,
data_sources::name, data_sources::name,
sql::<Nullable<Timestamptz>>("max(messages.created_at) as last_queried"),
)) ))
.group_by(( .group_by((
datasets::id, datasets::id,
@ -397,7 +393,6 @@ async fn get_org_datasets(
String, String,
Uuid, Uuid,
String, String,
Option<DateTime<Utc>>,
)>(&mut conn) )>(&mut conn)
.await .await
{ {
@ -420,7 +415,6 @@ async fn get_org_datasets(
user_email, user_email,
data_source_id, data_source_id,
data_source_name, data_source_name,
last_queried,
)| { )| {
ListDatasetObject { ListDatasetObject {
id, id,
@ -433,7 +427,7 @@ async fn get_org_datasets(
id: data_source_id, id: data_source_id,
name: data_source_name, name: data_source_name,
}, },
last_queried, last_queried: None,
owner: Some(ListDatasetOwner { owner: Some(ListDatasetOwner {
id: user_id, id: user_id,
name: user_name.unwrap_or(user_email), name: user_name.unwrap_or(user_email),
@ -542,7 +536,6 @@ async fn get_restricted_user_datasets(
users::email, users::email,
data_sources::id, data_sources::id,
data_sources::name, data_sources::name,
sql::<Nullable<Timestamptz>>("max(messages.created_at) as last_queried"),
)) ))
.group_by(( .group_by((
datasets::id, datasets::id,
@ -575,7 +568,6 @@ async fn get_restricted_user_datasets(
String, String,
Uuid, Uuid,
String, String,
Option<DateTime<Utc>>,
)>(&mut conn) )>(&mut conn)
.await .await
{ {
@ -608,7 +600,6 @@ async fn get_restricted_user_datasets(
String, String,
Uuid, Uuid,
String, String,
Option<DateTime<Utc>>,
)> = match datasets::table )> = match datasets::table
.inner_join(data_sources::table.on(datasets::data_source_id.eq(data_sources::id))) .inner_join(data_sources::table.on(datasets::data_source_id.eq(data_sources::id)))
.inner_join(users::table.on(datasets::created_by.eq(users::id))) .inner_join(users::table.on(datasets::created_by.eq(users::id)))
@ -632,7 +623,6 @@ async fn get_restricted_user_datasets(
users::email, users::email,
data_sources::id, data_sources::id,
data_sources::name, data_sources::name,
sql::<Nullable<Timestamptz>>("max(messages.created_at) as last_queried"),
)) ))
.group_by(( .group_by((
datasets::id, datasets::id,
@ -668,7 +658,6 @@ async fn get_restricted_user_datasets(
String, String,
Uuid, Uuid,
String, String,
Option<DateTime<Utc>>,
)>(&mut conn) )>(&mut conn)
.await .await
{ {
@ -692,7 +681,6 @@ async fn get_restricted_user_datasets(
String, String,
Uuid, Uuid,
String, String,
Option<DateTime<Utc>>,
)> = Vec::new(); )> = Vec::new();
match direct_user_permissioned_datasets_handle.await { match direct_user_permissioned_datasets_handle.await {
@ -728,7 +716,6 @@ async fn get_restricted_user_datasets(
user_email, user_email,
data_source_id, data_source_id,
data_source_name, data_source_name,
last_queried,
)| { )| {
ListDatasetObject { ListDatasetObject {
id, id,
@ -741,7 +728,7 @@ async fn get_restricted_user_datasets(
id: data_source_id, id: data_source_id,
name: data_source_name, name: data_source_name,
}, },
last_queried, last_queried: None,
owner: Some(ListDatasetOwner { owner: Some(ListDatasetOwner {
id: user_id, id: user_id,
name: user_name.unwrap_or(user_email), name: user_name.unwrap_or(user_email),