Sources and sharing
Your dagboards and Logic Bricks are kept in your browser's workspace. Beside it, the app opens dagboards and Logic Bricks from folders and from public git repos on GitHub or GitLab, and you share your own from a folder or a repo. A dagboard isn't shared as a file: its link says where it's kept, and carries no code or data.
Open a dagboard from a link
- A repo's link opens the dagboard at once, from the repo's files. A folder's link names a folder you have too, such as one shared or synced with you, which the app asks you to choose in your browser's folder picker.
- A dagboard from outside your workspace runs apart from it, in a sandbox: its Logic Bricks can reach the internet, but not your workspace, your dagboards or your own Logic Bricks.
- The banner above it has View code, Save a copy… and Discard. Nothing of it is kept until you save a copy, which shows you its files first, with what a check of its code finds, and asks whether you trust its author.
Updates of a copy you saved
Settings → Storage lists the repos and folders you saved a copy of a dagboard from, each with Update…. An update reads the repo or the folder again, and shows what would change, file by file, with the commits since the one you trusted. Trusting it writes the update, and a file you changed too keeps your version.
Sources side by side
Trusted sources, in Settings → Sources, lists your browser's workspace, the sources you added and the default sources, each with an icon for read-write or read-only. Add source adds one from the places that Settings → Storage offers:
- a repo on GitHub or GitLab, by its URL, at a branch, tag or commit, or at its default branch. The app reads it at that commit and stays there until you take a newer one: Check for updates shows the commits since and each file that changed, for you to review first;
- a folder on your device, where your browser can pick one.
You don't choose the access: the app finds it from the place. A source is read-write where you may change it there, and read-only otherwise. A repo on GitHub or GitLab is read-write at a branch your token for it may push to: each save is a commit, pushed to that branch. Others' commits come as an update to review. A repo is read-only otherwise. A read-only source's dagboard saves a copy to change it.
A source's dagboards show with your own on the home, grouped by source, and its Logic Bricks show with its name. Removing a source leaves its files as they are.
The default sources
A new workspace starts with two sources of the app's own, listed after the ones you add, read-only: brickutils, the standard Logic Bricks, and Samples, the example Logic Bricks in Python and R and the sample dagboards (Logic Bricks). The app reads each from its git repo, at the release it names.
- Samples lists its sample dagboards, each to open, or to Use, a copy in your workspace.
- You may remove them, and Add the default libraries back, under the list, adds them again.
- Previous versions, under Trusted sources, lists the versions of the git libraries your dagboards used, newest first, and Roll back moves your dagboards back to one. A dagboard that doesn't pass its check with that version stays where it is.
Share a dagboard
Share, in the dagboard's toolbar, gives the link that opens the dagboard from where it's kept:
- in a folder that git keeps, with a remote on GitHub or GitLab, the link names the commit that holds the dagboard as you saved it, so everyone opens the same version. Changes you haven't committed or pushed are named, with the commands that commit and push them;
- in a folder without git, the link names the folder, once you say it's shared or synced with the people you send it to;
- in your browser alone, Make it shareable keeps your workspace in a folder, where your browser can, or puts it in a git repo with Share via git.
Share via git
Share via git…, in a dagboard's Share, shares your workspace as a git repo on GitHub or GitLab, whose README opens its dagboards in the app:
- The app commits your workspace's files and pushes them to the repo's default branch itself, in any browser, with your own token for the host, which a token for GitHub or GitLab says how to make. It keeps the token as it keeps your AI key, and sends it only to that host.
- When the branch has moved since your last push, the app shows the commits since, and pushes on top of them only once you say so.
- Or commit and push with the git you already use: where your browser can keep your workspace in a folder, the app keeps it there, and gives the commands to run in it.
- Each dagboard then has its link, which opens it from the repo.
A token for GitHub or GitLab
Share via git, a workspace kept in a repo, and a private repo added as a source each take your own token for the repo's host. The app reads the repo and commits to it through the host's API with the token, so the token needs only the settings below. How to make one, under the token field, lists them too, and Make one on GitHub or Make one on GitLab opens the host's form. When the host refuses a write, the app's message names the setting to change.
On GitHub
Make a fine-grained personal access token, with these settings:
- Resource owner: the account or organization that owns the repo. An organization may have to approve the token before it works.
- Repository access: Only select repositories, with this repo selected. A repo you make later isn't in the token until you add it.
- Repository permissions: Contents set to Read and write, since Read-only can't push. GitHub adds Metadata, read-only, itself.
- Expiration: once the token expires, make a new one and paste it in the field.
For a private repo you only read, as a source, set Contents to Read-only instead. A classic token works too, with the repo scope, or public_repo for a public repo, but it reaches every repo your account can.
Where the app offers Connect GitHub, it signs you in to GitHub with no token to make. dagboard.ai's GitHub app then reaches only the repos you install it on: add yours with Choose them on GitHub. Connect GitLab, where the app offers it, signs in for a source the app only reads.
On GitLab
- Make a project access token, in the project's Settings under Access tokens, or a personal access token, which has your own role in the project.
- Role: Developer or higher, since Reporter can't push.
- Scopes: api, since the app commits through GitLab's API.
- Expiration date: once the token expires, make a new one and paste it in the field.
For a private project you only read, as a source, give it the Reporter role and the read_api scope instead.