module Web.View.ApiConsumers.Index where import Web.Types import Generated.Types import IHP.Prelude import IHP.ViewPrelude import Web.Routes () data IndexView = IndexView { consumers :: ![ApiConsumer] } instance View IndexView where html IndexView { .. } = [hsx|

API Consumers

External systems authenticated against /api/v2/

New Consumer
openapi.json API Docs SDKs Dashboard
{forEach consumers renderRow}
Name Manifest Rate Limit Quota/day Status
|] where renderRow consumer = [hsx| {consumer.name} {if isJust consumer.hubCapabilityManifestId then "✓" else "–" :: Text} {show consumer.rateLimitPerMinute}/min {show consumer.quotaPerDay} {renderConsumerStatus consumer.isActive} Edit Keys |] renderConsumerStatus :: Bool -> Html renderConsumerStatus True = [hsx|active|] renderConsumerStatus False = [hsx|inactive|]