mirror of
https://github.com/moghtech/komodo.git
synced 2026-04-28 19:59:46 -05:00
tag include unused flag for future use
This commit is contained in:
@@ -46,6 +46,7 @@ impl Resolve<WriteArgs> for CreateTag {
|
||||
name: self.name,
|
||||
color: TagColor::Slate,
|
||||
owner: user.id.clone(),
|
||||
unused: false,
|
||||
};
|
||||
|
||||
tag.id = db_client()
|
||||
|
||||
@@ -32,14 +32,25 @@ pub struct Tag {
|
||||
#[cfg_attr(feature = "mongo", unique_index)]
|
||||
pub name: String,
|
||||
|
||||
/// Hex color code with alpha for UI display
|
||||
#[serde(default)]
|
||||
pub color: TagColor,
|
||||
|
||||
#[serde(default)]
|
||||
#[builder(default)]
|
||||
#[cfg_attr(feature = "mongo", index)]
|
||||
pub owner: String,
|
||||
|
||||
/// Hex color code with alpha for UI display
|
||||
#[serde(default)]
|
||||
#[builder(default)]
|
||||
pub color: TagColor,
|
||||
|
||||
/// This field is not stored on database,
|
||||
/// but rather populated at query time based on results from the other resources.
|
||||
#[serde(default, skip_serializing_if = "is_false")]
|
||||
#[builder(default)]
|
||||
pub unused: bool,
|
||||
}
|
||||
|
||||
fn is_false(b: &bool) -> bool {
|
||||
!b
|
||||
}
|
||||
|
||||
#[typeshare]
|
||||
|
||||
@@ -2429,9 +2429,14 @@ export interface Tag {
|
||||
*/
|
||||
_id?: MongoId;
|
||||
name: string;
|
||||
owner?: string;
|
||||
/** Hex color code with alpha for UI display */
|
||||
color?: TagColor;
|
||||
owner?: string;
|
||||
/**
|
||||
* This field is not stored on database,
|
||||
* but rather populated at query time based on results from the other resources.
|
||||
*/
|
||||
unused?: boolean;
|
||||
}
|
||||
|
||||
export type GetTagResponse = Tag;
|
||||
|
||||
8
frontend/public/client/lib.d.ts
vendored
8
frontend/public/client/lib.d.ts
vendored
@@ -162,7 +162,7 @@ export declare function KomodoClient(url: string, options: InitOptions): {
|
||||
* and gives a callback to handle the output as it comes in.
|
||||
*
|
||||
* ```ts
|
||||
* const stream = await komodo.execute_terminal(
|
||||
* await komodo.execute_terminal(
|
||||
* {
|
||||
* server: "my-server",
|
||||
* terminal: "name",
|
||||
@@ -222,7 +222,7 @@ export declare function KomodoClient(url: string, options: InitOptions): {
|
||||
* and gives a callback to handle the output as it comes in.
|
||||
*
|
||||
* ```ts
|
||||
* const stream = await komodo.execute_container_exec(
|
||||
* await komodo.execute_container_exec(
|
||||
* {
|
||||
* server: "my-server",
|
||||
* container: "name",
|
||||
@@ -275,7 +275,7 @@ export declare function KomodoClient(url: string, options: InitOptions): {
|
||||
* and gives a callback to handle the output as it comes in.
|
||||
*
|
||||
* ```ts
|
||||
* const stream = await komodo.execute_deployment_exec(
|
||||
* await komodo.execute_deployment_exec(
|
||||
* {
|
||||
* deployment: "my-deployment",
|
||||
* shell: "bash",
|
||||
@@ -326,7 +326,7 @@ export declare function KomodoClient(url: string, options: InitOptions): {
|
||||
* and gives a callback to handle the output as it comes in.
|
||||
*
|
||||
* ```ts
|
||||
* const stream = await komodo.execute_stack_exec(
|
||||
* await komodo.execute_stack_exec(
|
||||
* {
|
||||
* stack: "my-stack",
|
||||
* service: "database"
|
||||
|
||||
@@ -279,7 +279,7 @@ export function KomodoClient(url, options) {
|
||||
* and gives a callback to handle the output as it comes in.
|
||||
*
|
||||
* ```ts
|
||||
* const stream = await komodo.execute_terminal(
|
||||
* await komodo.execute_terminal(
|
||||
* {
|
||||
* server: "my-server",
|
||||
* terminal: "name",
|
||||
@@ -335,7 +335,7 @@ export function KomodoClient(url, options) {
|
||||
* and gives a callback to handle the output as it comes in.
|
||||
*
|
||||
* ```ts
|
||||
* const stream = await komodo.execute_container_exec(
|
||||
* await komodo.execute_container_exec(
|
||||
* {
|
||||
* server: "my-server",
|
||||
* container: "name",
|
||||
@@ -386,7 +386,7 @@ export function KomodoClient(url, options) {
|
||||
* and gives a callback to handle the output as it comes in.
|
||||
*
|
||||
* ```ts
|
||||
* const stream = await komodo.execute_deployment_exec(
|
||||
* await komodo.execute_deployment_exec(
|
||||
* {
|
||||
* deployment: "my-deployment",
|
||||
* shell: "bash",
|
||||
@@ -435,7 +435,7 @@ export function KomodoClient(url, options) {
|
||||
* and gives a callback to handle the output as it comes in.
|
||||
*
|
||||
* ```ts
|
||||
* const stream = await komodo.execute_stack_exec(
|
||||
* await komodo.execute_stack_exec(
|
||||
* {
|
||||
* stack: "my-stack",
|
||||
* service: "database"
|
||||
|
||||
7
frontend/public/client/types.d.ts
vendored
7
frontend/public/client/types.d.ts
vendored
@@ -2521,9 +2521,14 @@ export interface Tag {
|
||||
*/
|
||||
_id?: MongoId;
|
||||
name: string;
|
||||
owner?: string;
|
||||
/** Hex color code with alpha for UI display */
|
||||
color?: TagColor;
|
||||
owner?: string;
|
||||
/**
|
||||
* This field is not stored on database,
|
||||
* but rather populated at query time based on results from the other resources.
|
||||
*/
|
||||
unused?: boolean;
|
||||
}
|
||||
export type GetTagResponse = Tag;
|
||||
export type GetUpdateResponse = Update;
|
||||
|
||||
Reference in New Issue
Block a user