{"id":14109538,"url":"https://github.com/nextcloud/dashboard","last_synced_at":"2025-10-04T14:32:10.390Z","repository":{"id":66341453,"uuid":"98104277","full_name":"nextcloud/dashboard","owner":"nextcloud","description":"ARCHIVED, new Dashboard is in the server","archived":true,"fork":false,"pushed_at":"2020-10-16T11:13:00.000Z","size":9931,"stargazers_count":58,"open_issues_count":34,"forks_count":29,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-09-30T02:41:31.134Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://nextcloud.com/dashboard","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nextcloud.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-07-23T14:42:32.000Z","updated_at":"2023-11-11T10:47:43.000Z","dependencies_parsed_at":"2023-03-10T23:52:24.656Z","dependency_job_id":null,"html_url":"https://github.com/nextcloud/dashboard","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nextcloud%2Fdashboard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nextcloud%2Fdashboard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nextcloud%2Fdashboard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nextcloud%2Fdashboard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nextcloud","download_url":"https://codeload.github.com/nextcloud/dashboard/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235264967,"owners_count":18962459,"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","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":"2024-08-14T10:02:22.318Z","updated_at":"2025-10-04T14:32:05.060Z","avatar_url":"https://github.com/nextcloud.png","language":"PHP","readme":"## Archived repository\n\nThe dashboard app was rewritten as part of Nextcloud 20 and is now part of the [server repository](https://github.com/nextcloud/server/). Please head there for issue reporting and the app code.\n\n![](https://raw.githubusercontent.com/nextcloud/dashboard/master/screenshots/dashboard-grid.png)\n### Quick guide on how to build the app from git:\n\n```\n $ git clone -b gridstack https://github.com/nextcloud/dashboard.git\n $ cd dashboard\n $ make npm\n```\n\n\n### How to create a Widget:\n\n- Generate an app (see [app development documentation](https://docs.nextcloud.com/server/16/developer_manual/app/index.html) or use the [app genreator from the app store.)](https://apps.nextcloud.com/developer/apps/generate)\n- Create a PHP class that implement IDashboardWidget:\n1. [getId()](https://github.com/nextcloud/dashboard/blob/a1d2f0d72d6d7a62e4309da7291bf215395ba7d7/lib/Widgets/FortunesWidget.php#L48-L50) returns a unique ID of the widget\n2. [getName()](https://github.com/nextcloud/dashboard/blob/a1d2f0d72d6d7a62e4309da7291bf215395ba7d7/lib/Widgets/FortunesWidget.php#L56-L58) returns the name of the widget\n3. [getDescription()](https://github.com/nextcloud/dashboard/blob/a1d2f0d72d6d7a62e4309da7291bf215395ba7d7/lib/Widgets/FortunesWidget.php#L64-L66) returns a description of the widget\n4. [getTemplate()](https://github.com/nextcloud/dashboard/blob/a1d2f0d72d6d7a62e4309da7291bf215395ba7d7/lib/Widgets/DiskSpaceWidget.php#L73-L82) returns information about the template to load and css/js:\n5. [widgetSetup()](https://github.com/nextcloud/dashboard/blob/a1d2f0d72d6d7a62e4309da7291bf215395ba7d7/lib/Widgets/FortunesWidget.php#L87-L107) returns optional information like size of the widget, additional menu entries and background jobs:\n6. [loadWidget($config)](https://github.com/nextcloud/dashboard/blob/a1d2f0d72d6d7a62e4309da7291bf215395ba7d7/lib/Widgets/FortunesWidget.php#L113-L122) is called on external request (cf. requestWidget()). `$config` is an array that contains the current setup of the widget\n7. [requestWidget(WidgetRequest $request)](https://github.com/nextcloud/dashboard/blob/a1d2f0d72d6d7a62e4309da7291bf215395ba7d7/lib/Widgets/FortunesWidget.php#L128-L132) is called after the loadWidget() after a [new.requestWidget(object, callback)](https://github.com/nextcloud/dashboard/blob/08c0850b5f586110264ac6f90e7f7e94ec070e4e/js/widgets/fortunes.js#L43-L50) from JavaScript  \n\n- Add to appinfo/info.xml:\n\n```\n\t\u003cdashboard\u003e\n\t\t\u003cwidget\u003eOCA\\YourApp\\Widgets\\MyFirstWidget\u003c/widget\u003e\n\t\t\u003cwidget\u003eOCA\\YourApp\\Widgets\\AnOtherWidget\u003c/widget\u003e\n\t\u003c/dashboard\u003e\n```\n\n### Event \u0026 Push\n\nYou can (almost) instantly push payload from Nextcloud to your widget:\n \n - define the method to be called in the `widgetSetup()` array:\n\n```\n   'push'  =\u003e  'your-javascript-function-to-call-on-event\n```\n\n - call the API from your PHP:\n\n```\nOCA\\Dashboard\\Api\\v1\\Dashboard::createEvent('your_widget_id', 'user_id', payload_in_JSON);\n```\n\n - the method set in `widgetSetup()['push']` will receive the payload.\n\n_Note: you can manually generate events using the command line:_\n\n\n\u003e      ./occ dashboard:push widgetid userid payload\n\n_You can, this way, modify the displayed fortune for any user:_\n\n\u003e     ./occ dashboard:push fortunes cult \"{\\\"fortune\\\": \\\"foobar\\\"}\"\n\nSee the wiki, [in particular this page about how the fortune widget works,](https://github.com/nextcloud/dashboard/wiki/How-the-Fortunes-widget-works) for more background.\n","funding_links":[],"categories":["PHP"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnextcloud%2Fdashboard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnextcloud%2Fdashboard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnextcloud%2Fdashboard/lists"}