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

[batch] Separate closed and open projects on billing limits page #13215

Merged
merged 1 commit into from
Jun 27, 2023

Conversation

jigold
Copy link
Contributor

@jigold jigold commented Jun 26, 2023

Fixes #13205

Possible billing project states are defined in the database schema:

CREATE TABLE IF NOT EXISTS `billing_projects` (
  `name` VARCHAR(100) NOT NULL,
  `name_cs` VARCHAR(100) NOT NULL COLLATE utf8mb4_0900_as_cs,
  `status` ENUM('open', 'closed', 'deleted') NOT NULL DEFAULT 'open',
  `limit` DOUBLE DEFAULT NULL,
  `msec_mcpu` BIGINT DEFAULT 0,
  PRIMARY KEY (`name`)
) ENGINE = InnoDB;
CREATE INDEX `billing_project_status` ON `billing_projects` (`status`);
CREATE UNIQUE INDEX `billing_project_name_cs` ON `billing_projects` (`name_cs`);
CREATE INDEX `billing_project_name_cs_status` ON `billing_projects` (`name_cs`, `status`);

Copy link
Contributor

@iris-garden iris-garden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! We could use a Jinja2 macro to reduce code duplication in the template, but considering we want to revamp the frontend anyway, I don't think that needs to happen right now.

@jigold jigold added WIP and removed WIP labels Jun 26, 2023
@danking danking merged commit 4e03b5f into hail-is:main Jun 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[batch] Visually distinguish closed billing projects from open ones on the billing limits page
3 participants