Skip to content

Commit 8cf0104

Browse files
committed
fix(#810): dataset-create was broken in dashboard
In the dashboard the cration of datasets was a bit broken. The name validation had the wrong legth-number the the accept-button was not triggered for the MNIST- fileupload. Signed-off-by: Tobias Anker <tobias.anker@kitsunemimi.moe>
1 parent 415e59c commit 8cf0104

3 files changed

Lines changed: 11 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
- added cluster-list without actions to overview-page
2121
- automatic logout in case the token is expired
2222
- quota-management was added to the admin-section of the dashboard
23+
- dataset list in the dashboard now prints the number of rows and columns
24+
- cluster list in the dashboard now prints the cluster adress
2325

2426
### Changed
2527

src/binaries/hanami/src/api/http_endpoints/cluster/list_cluster_v1_0.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ use ainari_api::common_functions::*;
2222
use ainari_api::errors::ErrorResponse;
2323
use ainari_api_structs::cluster_structs::*;
2424
use ainari_api_structs::user_context::UserContext;
25-
use ainari_clients::proxy as proxy_clients;
2625
use ainari_clients::endpoints::*;
26+
use ainari_clients::proxy as proxy_clients;
2727

2828
#[api_operation(
2929
tag = "cluster",
@@ -34,7 +34,8 @@ use ainari_clients::endpoints::*;
3434
)]
3535
pub async fn list_cluster(context: UserContext) -> Result<Json<ClusterListResp>, ErrorResponse> {
3636
// get clusters from db
37-
let clusters = meta_cluster_table::list_meta_clusters(&context).map_err(|e| map_db_list_error("hosts", e))?;
37+
let clusters = meta_cluster_table::list_meta_clusters(&context)
38+
.map_err(|e| map_db_list_error("hosts", e))?;
3839

3940
// get endpoints from miko
4041
let miko_endpoint = &config::CONFIG.miko;
@@ -43,7 +44,9 @@ pub async fn list_cluster(context: UserContext) -> Result<Json<ClusterListResp>,
4344
.map_err(map_ainari_error_to_api_response)?;
4445

4546
// prepare response
46-
let mut resp = ClusterListResp { clusters: Vec::new() };
47+
let mut resp = ClusterListResp {
48+
clusters: Vec::new(),
49+
};
4750

4851
// fill reponse
4952
for cluster in clusters {

src/dashboard/app/src/components/storage/dataset/dataset_create_modal.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ const onFile2Change = (event: Event) => {
128128
};
129129
130130
async function handleAccept() {
131-
datasetNameError.value = form.datasetName.length < 8;
131+
datasetNameError.value = form.datasetName.length < 4;
132132
133133
if (datasetNameError.value) {
134134
return;
@@ -156,6 +156,8 @@ async function handleAccept() {
156156
},
157157
},
158158
);
159+
160+
emit("accept");
159161
} catch (err) {
160162
errorPopupMsg.value = handleAxiosError(
161163
err,

0 commit comments

Comments
 (0)