Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add collections templates #170

Closed
falzm opened this issue Mar 22, 2015 · 5 comments
Closed

Add collections templates #170

falzm opened this issue Mar 22, 2015 · 5 comments
Labels
Back-end Back-end component related (API) Front-end Front-end component related (Web UI, CLI) New Feature New feature introduction
Milestone

Comments

@falzm
Copy link
Member

falzm commented Mar 22, 2015

As for graph templates (#112), implement "collection templates" allowing collections to be created dynamically using templates.

@falzm falzm added Front-end Front-end component related (Web UI, CLI) New Feature New feature introduction Back-end Back-end component related (API) labels Mar 22, 2015
@falzm falzm added this to the 0.4.0 milestone Mar 22, 2015
@sbocahu
Copy link

sbocahu commented Jun 5, 2015

hey,

has any work been done on this subject yet ?
thx !

@falzm
Copy link
Member Author

falzm commented Jun 5, 2015

Hi @zecrazytux

No progress on this matter for now, we'll try to free some time this weekend.

@falzm
Copy link
Member Author

falzm commented Jun 7, 2015

Backend implementation has been drafted on branch collection-templates.

To @vbatoufflet for UI implementation:

Example of collection template:

{
    "id": "a3269a61-930d-49f6-6bf3-ee7701e1bb01",
    "name": "test_template",
    "title": "{{ .source }}",
    "description": "Collection of graphs for source {{ .source }}",
    "template": true,
    "entries": [
        {
            "id": "84d6ef76-83a5-43a9-41b1-96d9600a4eb4",
            "options": { ... }
        },
        {
            "id": "94d6ef76-83a5-43a9-41b1-92d9600a4eb4",
            "options": { ... }
        }
    ]
}

Example of template-based collection:

{
    "id": "2f72b448-f498-432a-5ffe-5fad12b3f45f",
    "name": "host1.example.net",
    "title": "host1.example.net",
    "description": "Collection of graphs for source host1.example.net",
    "link": "a3269a61-930d-49f6-6bf3-ee7701e1bb01",
    "template": false,
    "attributes": { "source": "host1.example.net" },
    "entries": [
        {
            "id": "84d6ef76-83a5-43a9-41b1-96d9600a4eb4",
            "attributes": { "port": 8081 }
        }
    ]
}

Note: the UI-side plot fetching code is responsible for template collection/entries attributes merging, should query the backend such as:

$ curl -X POST \
  -H 'Content-Type: application/json' \
  -d '
{
  "range": "-1h",
  "graph": {
    "link": "84d6ef76-83a5-43a9-41b1-96d9600a4eb4",
    "attributes": {
      "source": "host1.example.net",
      "port": 8081
    }
  }
}
' \
  localhost:12003/api/v1/plots

@sbocahu
Copy link

sbocahu commented Jun 18, 2015

Hey,

I noticed your work on this subject, thanks. It is still missing the UI bits to be usable, right ?

@falzm
Copy link
Member Author

falzm commented Mar 15, 2017

Implemented in branch 0.4-alpha.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Back-end Back-end component related (API) Front-end Front-end component related (Web UI, CLI) New Feature New feature introduction
Projects
None yet
Development

No branches or pull requests

3 participants