Cotton code
226 lines · 4.4 KB · JSONRaw
{  "id": "disk_claim",  "name": "Disk item",  "plural": "Disk",  "picture": { "photo": "photo:8ecb7aaab70615c06304e2c8194ae25371831c1dc1820a38102ab9281da89d52" },  "builtin": false,  "engine": null,  "columns": [  {    "key": "name",    "name": "Name",    "type": "text",    "readonly": true  },  {    "key": "machine",    "name": "Mac",    "type": "text",    "readonly": true  },  {    "key": "kind",    "name": "Kind",    "type": "text",    "readonly": true  },  {    "key": "lane",    "name": "Lane",    "type": "text",    "readonly": true  },  {    "key": "size_gb",    "name": "Size",    "type": "number",    "readonly": true,    "units": {      "one": "GB",      "other": "GB",      "zero": "0 GB"    }  },  {    "key": "touched_at",    "name": "Last changed",    "type": "date",    "readonly": true  },  {    "key": "rule",    "name": "Lets go when",    "type": "text",    "readonly": true  },  {    "key": "state",    "name": "State",    "type": "text",    "readonly": true  },  {    "key": "dropped",    "name": "Drop",    "type": "bool"  },  {    "key": "path",    "name": "Path",    "type": "text",    "readonly": true  },  {    "key": "session",    "name": "Session",    "type": "text",    "readonly": true  },  {    "key": "released_at",    "name": "Released",    "type": "date",    "readonly": true  },  {    "key": "why",    "name": "Why",    "type": "text",    "readonly": true  },  {    "key": "device_id",    "name": "Device id",    "type": "text",    "indexed": true,    "readonly": true  },  {    "key": "claim_id",    "name": "Claim id",    "type": "text",    "indexed": true,    "readonly": true  },  {    "key": "release_rule",    "name": "Kept until",    "type": "choice",    "readonly": true,    "choices": [      "session_ends",      "idle_hours",      "budget_lru",      "keep_last",      "owner_only"    ],    "labels": {      "session_ends": "The session ends",      "idle_hours": "It has been idle",      "budget_lru": "Space is needed",      "keep_last": "Newer runs replace it",      "owner_only": "You drop it"    }  },  {    "key": "idle_hours",    "name": "Idle for",    "type": "number",    "readonly": true,    "units": {      "one": "hour",      "other": "hours"    },    "shown_when": {      "column": "release_rule",      "values": [        "idle_hours"      ]    }  },  {    "key": "keep_last",    "name": "Keep newest",    "type": "number",    "readonly": true,    "units": {      "one": "run",      "other": "runs"    },    "shown_when": {      "column": "release_rule",      "values": [        "keep_last"      ]    }  },  {    "key": "size_bytes",    "name": "Size",    "type": "bytes",    "readonly": true  }],  "title": "name",  "date": "touched_at",  "project": null,  "order": null,  "slip": {    "title": "name",    "subtitle": [      "machine",      "kind",      "lane"    ],    "trailing": "size_bytes",    "photo": null,    "toggle": null  },  "tile": {    "face": "slip-list",    "summary": [      {        "op": "sum",        "column": "size_gb",        "label": "GB held"      }    ]  },  "sort": {    "column": "size_gb",    "descending": true  },  "add": false,  "delete": false,  "empty": {    "title": "No Mac has reported yet",    "message": "Each Mac's app lists what it holds for development here within a few minutes of starting."  },  "page": [    {      "heading": null,      "columns": [  "name",  "machine",  "kind",  "lane",  "size_bytes",  "touched_at",  "release_rule",  "idle_hours",  "keep_last",  "state",  "dropped",  "why"]    },    {      "heading": "Where",      "columns": [  "session",  "released_at"]    }  ],  "instructions": "One row per path a Mac holds for development. claim_id and device_id name the claim on that Mac and are written by its app, never by hand; every column but Drop is the Mac's. size_gb is measured every few hours. rule is when it lets go: session_ends, idle_hours:N, budget_lru (build output, least recently used first when the Mac is under its reserve) or owner_only (only the owner's Drop). state is Held or Released. Switching Drop on asks that Mac to remove the path: it says so in why at its next pass and removes it at the pass after, a few minutes later, unless Drop is switched off again; the row then says Released and why."}