Cotton code
107 lines · 4.4 KB · JSONRaw
{  "machines": {    "machine": {      "face": "machine",      "fields": [        { "slot": "title", "column": "name" },        { "slot": "subtitle", "column": "chip" },        { "slot": "memory_dial", "column": "mem_used_gb", "also": ["mem_total_gb"] },        { "slot": "disk_dial", "column": "disk_used_gb", "also": ["disk_total_gb"] },        { "slot": "load_dial", "column": "load_1", "also": ["cpu_count"] },        { "slot": "facts", "column": "chip", "also": ["memory", "disk", "load", "sessions"] },        { "slot": "body", "column": "os_version" },        { "slot": "model", "column": "model" },        { "slot": "date", "column": "sampled_at", "form": "ago" }      ]    }  },  "quotas": {    "quota": {      "face": "quota",      "fields": [        { "slot": "title", "column": "name" },        { "slot": "subtitle", "column": "plan", "also": ["provider"] },        { "slot": "used", "column": "week_pct" },        { "slot": "share", "column": "week_pct", "line": "field.percent_used" },        { "slot": "hours_left", "column": "week_resets_at" },        { "slot": "resets_on", "column": "week_resets_at" },        { "slot": "trend", "column": "week_trend" },        { "slot": "period", "column": "resets_line" },        { "slot": "body", "column": "notes" },        { "slot": "date", "column": "checked_at", "form": "relative" },        { "slot": "state", "column": "status", "only": ["unreachable"] }      ]    }  },  "subscriptions": {    "subscription": {      "face": "subscription",      "fields": [        { "slot": "title", "column": "name" },        { "slot": "subtitle", "column": "provider" },        { "slot": "price", "column": "amount" },        { "slot": "period", "column": "cycle", "line": "field.per_cycle", "also": ["cycle"] },        { "slot": "next_charge", "column": "next_renewal" },        { "slot": "state", "column": "status", "only": ["paused", "cancelled"] },        { "slot": "started", "column": "started", "label": "label.subscription.since" },        { "slot": "ends", "column": "cancelled_on", "also": ["started"], "label": "label.subscription.cancelled" },        { "slot": "account", "column": "account_id", "label": "label.subscription.account" },        { "slot": "holder", "column": "login", "label": "label.subscription.login" },        { "slot": "tag", "column": "category" },        { "slot": "facts", "column": "paid_total", "also": ["charges", "last_charged"] },        { "slot": "body", "column": "notes" }      ]    }  },  "money": {    "past": {      "face": "transaction.receipt",      "fields": [        { "slot": "title", "column": "title", "label": "label.money.merchant" },        { "slot": "subtitle", "column": "description", "label": "label.money.for" },        { "slot": "amount", "column": "amount_minor" },        { "slot": "account", "column": "account_id" },        { "slot": "date", "column": "occurred_on" },        { "slot": "tag", "column": "tag" }      ]    },    "future": {      "face": "transaction.receipt",      "fields": [        { "slot": "title", "column": "title", "label": "label.money.to" },        { "slot": "subtitle", "column": "description", "label": "label.money.for" },        { "slot": "amount", "column": "amount_minor" },        { "slot": "account", "column": "account_id" },        { "slot": "date", "column": "occurred_on", "label": "label.money.due" },        { "slot": "tag", "column": "tag" }      ]    },    "bank_accounts": {      "face": "account.statement",      "fields": [        { "slot": "title", "column": "name" },        { "slot": "subtitle", "column": "institution" },        { "slot": "amount", "column": "balance_minor" },        { "slot": "mask", "column": "number_mask" }      ]    }  },  "birthdays": {    "coming": {      "face": "birthday",      "fields": [        { "slot": "title", "column": "full_name" },        { "slot": "subtitle", "column": "city" },        { "slot": "date", "column": "birthday", "form": "weekday_name_date" },        { "slot": "turns", "column": "birthday" },        { "slot": "photo", "column": "avatar_key" },        { "slot": "wishes", "column": "own_birthdays__wish" },        { "slot": "last_wished", "column": "own_birthdays__last_wished" },        { "slot": "wished_via", "column": "own_birthdays__last_wished_via" }      ],      "corner": [        { "column": "birthday", "form": "next_occurrence", "within": 366, "line": "corner.birthday" }      ]    }  }}