mirror of
https://github.com/moghtech/komodo.git
synced 2026-03-11 17:44:19 -05:00
fixes
This commit is contained in:
@@ -5,7 +5,7 @@ use axum::{extract::Query, routing::get, Extension, Json, Router};
|
||||
use helpers::handle_anyhow_error;
|
||||
use mungos::{doc, to_bson, ObjectId};
|
||||
use serde_json::Value;
|
||||
use types::{PermissionLevel, Update, UpdateTarget};
|
||||
use types::{Operation, PermissionLevel, Update, UpdateTarget};
|
||||
|
||||
use crate::{
|
||||
auth::{RequestUser, RequestUserExtension},
|
||||
@@ -95,7 +95,7 @@ impl State {
|
||||
let deployment = self
|
||||
.get_deployment_check_permissions(id, user, PermissionLevel::Read)
|
||||
.await?;
|
||||
if let Some(build_id) = &deployment.branch {
|
||||
if let Some(build_id) = &deployment.build_id {
|
||||
let build = self
|
||||
.get_build_check_permissions(build_id, user, PermissionLevel::Read)
|
||||
.await;
|
||||
@@ -103,7 +103,7 @@ impl State {
|
||||
Some(doc! {
|
||||
"$or": [
|
||||
{"target": to_bson(&target).unwrap()},
|
||||
{"target": { "type": "Build", "id": build_id }, "operation": "build_build"}
|
||||
{"target": { "type": "Build", "id": build_id }, "operation": Operation::BuildBuild.to_string()}
|
||||
],
|
||||
})
|
||||
} else {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Component, Show } from "solid-js";
|
||||
import { useAppState } from "../../state/StateProvider";
|
||||
import { Operation, Update as UpdateType, UpdateStatus } from "../../types";
|
||||
import { combineClasses, readableMonitorTimestamp } from "../../util/helpers";
|
||||
import { combineClasses, readableMonitorTimestamp, readableVersion } from "../../util/helpers";
|
||||
import Icon from "../shared/Icon";
|
||||
import Flex from "../shared/layout/Flex";
|
||||
import Grid from "../shared/layout/Grid";
|
||||
@@ -12,9 +12,11 @@ const Update: Component<{ update: UpdateType }> = (p) => {
|
||||
const { usernames } = useAppState();
|
||||
const operation = () => {
|
||||
if (p.update.operation === Operation.BuildBuild) {
|
||||
return "build";
|
||||
return `build ${readableVersion(p.update.version!)}`;
|
||||
}
|
||||
return p.update.operation.replaceAll("_", " ");
|
||||
return `${p.update.operation.replaceAll("_", " ")}${
|
||||
p.update.version ? " " + readableVersion(p.update.version) : ""
|
||||
}`;
|
||||
};
|
||||
return (
|
||||
<Grid gap="0.25rem" class={combineClasses(s.Update, "shadow")}>
|
||||
|
||||
Reference in New Issue
Block a user