{"id":28353055,"url":"https://github.com/intercloud/mozaik-ext-datadog","last_synced_at":"2025-10-08T21:38:37.663Z","repository":{"id":83193208,"uuid":"163399008","full_name":"intercloud/mozaik-ext-datadog","owner":"intercloud","description":null,"archived":false,"fork":false,"pushed_at":"2020-09-04T22:34:17.000Z","size":40,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-20T17:43:48.394Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/intercloud.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-12-28T10:41:45.000Z","updated_at":"2019-01-02T10:00:42.000Z","dependencies_parsed_at":"2023-07-03T08:35:28.264Z","dependency_job_id":null,"html_url":"https://github.com/intercloud/mozaik-ext-datadog","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/intercloud/mozaik-ext-datadog","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intercloud%2Fmozaik-ext-datadog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intercloud%2Fmozaik-ext-datadog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intercloud%2Fmozaik-ext-datadog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intercloud%2Fmozaik-ext-datadog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/intercloud","download_url":"https://codeload.github.com/intercloud/mozaik-ext-datadog/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intercloud%2Fmozaik-ext-datadog/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000707,"owners_count":26082837,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-05-28T00:10:37.894Z","updated_at":"2025-10-08T21:38:37.656Z","avatar_url":"https://github.com/intercloud.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mozaïk JSON widget\n\nThis widget display data from JSON file in your [Mozaik](http://mozaik.rocks/) dashboard.\nThis JSON file may be either a static hosted file or a JSON object fetched from a REST API.\n\n![json](https://raw.githubusercontent.com/jtbonhomme/mozaik-ext-json/master/preview/mozaik-ext-json.png)\n\n## Installation\n\nTo install mozaik-ext-json from npm, run:\n\n```bash\nnpm install --save mozaik-ext-json\n```\n\n## Configuration\n\n### Static hosted file\n\nLet's say you want to display two set of data from a file you host on your Dropbox public directory.\n\n#### JSON file\n\n```javascript\n  {\n      type:  'json.data',\n      title: '${obj2.name}',\n      value: '${obj2.value}',\n      unit:  null,\n      columns: 1, rows: 1,\n      x: 1, y: 1\n  },\n  {\n      type:  'json.data',\n      title: 'WIDGET TITLE',\n      value: '${obj1.value}',\n      unit:  '${obj1.unit}',\n          columns: 1, rows: 1,\n      x: 2, y: 1\n  },\n```\n\n#### api\n\nIn your Mozaik dashboard's config.js file, add the JSON file url in the \u003ccode\u003eapi\u003c/code\u003e section. The \u003ccode\u003eurl\u003c/code\u003e key shall contains the full URL where your JSON file is hosted:\n\n```javascript\n    // clients configs\n    api: {\n        json: {\n            url: 'https://dl.dropboxusercontent.com/u/21352749/mozaik.json'\n        }\n    }\n```\n\n### JSON data fetched from REST API\n\nIn your Mozaik dashboard's config.js file, add the webservice url in the \u003ccode\u003eapi\u003c/code\u003e section. The \u003ccode\u003eurl\u003c/code\u003e key shall contains the full URL where your webservice is hosted. An optionnal headers key can be added (to add authentication information for example):\n\n```javascript\n    // clients configs\n    api: {\n        json: {\n            url: 'http://mywebservice/rest/api/2/resource/id',\n            headers: [{name: 'Authorization', value: 'Basic aKjs6LK8ijkSfT'}, {name: 'Content-type', value: 'applicatin/json'}]\n        }\n    }\n```\n\n### parameters\n\n\u003ccode\u003etitle\u003c/code\u003e, \u003ccode\u003evalue\u003c/code\u003e and \u003ccode\u003eunit\u003c/code\u003e parameters can be either a String or a property path to be retrieve in the JSON data.\n\nkey       | required | description\n----------|----------|-------------------------------------------------------------------\n`type`    | yes      | *Always equal to 'json.data'*\n`title`   | yes      | *The title to be displayed in the header.*\n`value`   | yes      | *The value to be displayed in the widget body.*\n`unit`    | yes      | *Unit to be displayed after the data. Set to null if not needed.*\n\n### usage\n\n```javascript\n  {\n      type:  'json.data',\n      title: 'THIS IS A TITLE',\n      value: '${obj1.value}',\n      unit:  '${obj1.unit}',\n      columns: 1, rows: 1,\n      x: 1, y: 1\n  },\n  {\n      type:  'json.data',\n      title: '${obj2.name}',\n      value: '${obj2.value}',\n      unit:  null,\n      columns: 1, rows: 1,\n      x: 2, y: 1\n  }\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintercloud%2Fmozaik-ext-datadog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fintercloud%2Fmozaik-ext-datadog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintercloud%2Fmozaik-ext-datadog/lists"}