Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cc-logs-instances: init component #877

Closed
pdesoyres-cc opened this issue Nov 2, 2023 · 0 comments · Fixed by #878 or #938
Closed

cc-logs-instances: init component #877

pdesoyres-cc opened this issue Nov 2, 2023 · 0 comments · Fixed by #878 or #938
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@pdesoyres-cc
Copy link
Contributor

Context

The logs page needs a way to filter by instances: As a user, I want to see logs produced by this instance or this selection of instances.

Instances can be grouped in two ways:

  • by some logical categories:
    • instances attached to the deployment in progress
    • running instances
    • instances that are in the process of being stopped
    • deleted instances
  • by deployment

The first will be used for the 'live' mode. The latter is for the 'cold' mode.

In front of each instance, is a checkbox that allows a selection of instances.

To be discussed

The name of the component can be discussed.

In the logs page, we may want to allow users to filter logs on other data (like logs level, service ...). Should we have a single component that allows all those filters or should we keep this simple and allow only instance selection?

Inputs

Attributes/properties

Property Type Default value Mandatory Description
state LogsInstancesState { state: 'loading' } false

Outputs

Event Data type Description
cc-logs-instances:selectionChange Array<string> Fires whenever the instances selection changes

Type Definitions

export type LogsInstancesState = LogsInstancesStateLoading | LogsInstancesStateError | LogsInstancesStateLoaded;

export interface LogsInstancesStateLoading {
  state: "loading";
}

export interface LogsInstancesStateError {
  state: "error";
}

export interface LogsInstancesStateLoaded {
  state: "loaded";
  mode: "live" | "cold";
  instances: Array<Instance>;
  selection: Array<string>;
}

export type DeploymentState = "QUEUED" | "WIP" | "OK" | "CANCELLED" | "FAILED"

export interface Deployment {
  id: string;
  index: number;
  state: DeploymentState;
  creationDate: Date;
  instanceCount: number;
  commitId: string;
}


export type InstanceState = "BOOTING" | "STARTING" | "DEPLOYING" | "READY" | "UP" | "STOPPING" | "DELETED";
export type InstanceKind = "BUILD" | "RUN";

export interface Instance {
  id: string;
  name: string;
  index: number;
  deployment: Deployment;
  state: InstanceState;
  creationDate: Date;
  deletionDate: Date;
  flavor: string;
  kind: InstanceKind;
}
@pdesoyres-cc pdesoyres-cc added the enhancement New feature or request label Nov 2, 2023
@pdesoyres-cc pdesoyres-cc self-assigned this Nov 2, 2023
@pdesoyres-cc pdesoyres-cc added this to the logs milestone Nov 2, 2023
pdesoyres-cc added a commit that referenced this issue Nov 2, 2023
pdesoyres-cc added a commit that referenced this issue Nov 2, 2023
pdesoyres-cc added a commit that referenced this issue Nov 2, 2023
pdesoyres-cc added a commit that referenced this issue Nov 2, 2023
pdesoyres-cc added a commit that referenced this issue Nov 2, 2023
pdesoyres-cc added a commit that referenced this issue Nov 3, 2023
pdesoyres-cc added a commit that referenced this issue Dec 18, 2023
pdesoyres-cc added a commit that referenced this issue Dec 19, 2023
pdesoyres-cc added a commit that referenced this issue Jan 9, 2024
pdesoyres-cc added a commit that referenced this issue Jan 31, 2024
pdesoyres-cc added a commit that referenced this issue Feb 12, 2024
pdesoyres-cc added a commit that referenced this issue Feb 12, 2024
pdesoyres-cc added a commit that referenced this issue Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
1 participant