ansible-community / ara-web

Stateless web client for the ARA Records Ansible API.
https://ara.recordsansible.org
GNU General Public License v3.0
37 stars 8 forks source link

Implement file content view #3

Open dmsimard opened 5 years ago

dmsimard commented 5 years ago

Files are displayed as paths in list view and their contents are available in the detailed view of the file. When clicking on a file, we should be able to see the file's contents.

Example:

{
    "id": 1,
    "sha1": "52a93d5d88c96d0aefe53f70c0b1de0402f2b885",
    "playbook": {
        "id": 1,
        "duration": "38.40244",
        "started": "2019-04-17T13:17:18.334437",
        "ended": "2019-04-17T13:17:56.736877",
        "name": null,
        "status": "failed",
        "path": "/home/dmsimard/dev/sandbox/update-packages.yaml"
    },
    "content": "- name: Update packages on all servers\n  hosts: all\n  gather_facts: yes\n  tasks:\n    - name: Update packages\n      become: yes\n      package:\n        name: \"*\"\n        state: latest\n      register: updates\n\n    - name: Send an email if there are updates\n      mail:\n        to: ops@example.org\n        subject: \"Package updates: {{ ansible_hostname }}\"\n        body: \"{{ updates.results }}\"\n      when: updates is changed\n",
    "created": "2019-04-17T13:17:18.354348",
    "updated": "2019-04-17T13:17:18.354367",
    "path": "/home/dmsimard/dev/sandbox/update-packages.yaml"
}