-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from arkedge/implement-ui-pages
Implement UI pages
- Loading branch information
Showing
14 changed files
with
1,825 additions
and
1,135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { Intent, Tag, TagProps } from "@blueprintjs/core"; | ||
import { Contact_StatusJson } from "~/gen/aegs/clover/v1/models_pb"; | ||
|
||
interface Props extends TagProps { | ||
status: Contact_StatusJson; | ||
} | ||
|
||
export const ContactStatusTag = ({ status, ...rest }: Props) => { | ||
const intent = getIntent(status); | ||
const label = status.replace("STATUS_", ""); | ||
return ( | ||
<Tag intent={intent} {...rest}> | ||
{label} | ||
</Tag> | ||
); | ||
}; | ||
|
||
function getIntent(status: Contact_StatusJson) { | ||
switch (status) { | ||
case "STATUS_SCHEDULED": | ||
return Intent.SUCCESS; | ||
case "STATUS_REJECTED": | ||
return Intent.DANGER; | ||
case "STATUS_RUNNING": | ||
return Intent.WARNING; | ||
case "STATUS_COMPLETED": | ||
return Intent.PRIMARY; | ||
case "STATUS_FAILED": | ||
return Intent.DANGER; | ||
default: | ||
return Intent.NONE; | ||
} | ||
} |
144 changes: 0 additions & 144 deletions
144
client-ui/app/gen/aegs/clover/v1/clover_service_connect.ts
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.