# Developing Discourse Plugins - Part 5 - Add an admin interface

**URL:** https://meta.discourse.org/t/developing-discourse-plugins-part-5-add-an-admin-interface/31761
**Category:** Developer Guides
**Tags:** plugin-guides, tutorial
**Created:** [8월 4, 2015, 8:34오후 UTC](https://meta.discourse.org/t/developing-discourse-plugins-part-5-add-an-admin-interface/31761 "2015-08-04T20:34:32Z")
**Posts on this page:** 8
**Page:** 3

<div class="post-metadata">

### Author: ![1c7](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/1c7/32/94822_2.png) [@1c7](https://meta.discourse.org/u/1c7)
#### Post date: [4월 29, 2018, 7:36오전 UTC](https://meta.discourse.org/t/developing-discourse-plugins-part-5-add-an-admin-interface/31761/44 "2018-04-29T07:36:38Z")

</div>

Work for me!  
2018-4-29

## 1. Code

 ![image](https://global.discourse-cdn.com/meta/original/3X/9/2/921917acf4b06d311e2a6101ae88305bbad5681e.png)  
 ![image](https://global.discourse-cdn.com/meta/original/3X/6/1/61246a41619218d3f6aae1e17f3f28f3776960b8.png)  
 ![image](https://global.discourse-cdn.com/meta/original/3X/1/9/193ceda5c7d101ad3e4cead3a77e8394bc3c478a.png)  
 ![image](https://global.discourse-cdn.com/meta/original/3X/6/3/63646d91789925dac8426dc0bb5ffcdf4af8038b.png)

## 2. Result

 ![image](https://global.discourse-cdn.com/meta/original/3X/0/5/05eba137d1f9f19ffaef6cc4a5e27434d401020e.png)

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [4월 29, 2018, 11:58오전 UTC](https://meta.discourse.org/t/developing-discourse-plugins-part-5-add-an-admin-interface/31761/45 "2018-04-29T11:58:09Z")

</div>

Glad it worked, but It is always better to post code than pictures of code.

---

<div class="post-metadata">

### Author: ![1c7](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/1c7/32/94822_2.png) [@1c7](https://meta.discourse.org/u/1c7)
#### Post date: [4월 29, 2018, 12:00오후 UTC](https://meta.discourse.org/t/developing-discourse-plugins-part-5-add-an-admin-interface/31761/46 "2018-04-29T12:00:00Z")

</div>

Thanks for reply  
original post have all these code,  
it’s not necessary for me to post code again.

The purpose of these picture is to show it work, give viewer a big picture view  
(not for viewer to copy&paste)  
(code in code editor have nicer code highlight)

---

<div class="post-metadata">

### Author: ![j127](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j127/32/79093_2.png) [@j127](https://meta.discourse.org/u/j127)
#### Post date: [5월 22, 2018, 7:01오후 UTC](https://meta.discourse.org/t/developing-discourse-plugins-part-5-add-an-admin-interface/31761/47 "2018-05-22T19:01:27Z")

</div>

If anyone runs into a testing error, I had to add `id="show-tentacle"` to the button component to get the tests to pass in [part 6 of the tutorial](https://meta.discourse.org/t/beginner-s-guide-to-creating-discourse-plugins-part-6-acceptance-tests/32619):

```plaintext
<div class="buttons">
  {{d-button label="purple_tentacle.show" action="showTentacle" icon="eye" id="show-tentacle"}}
</div>

```

---

<div class="post-metadata">

### Author: ![pacharanero](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pacharanero/32/500583_2.png) [@pacharanero](https://meta.discourse.org/u/pacharanero)
#### Post date: [5월 1, 2019, 1:46오후 UTC](https://meta.discourse.org/t/developing-discourse-plugins-part-5-add-an-admin-interface/31761/48 "2019-05-01T13:46:44Z")

</div>

I found the Ember routing didn’t work until I commented out `path: '/plugins'` in the route-map file:

```js
export default {
  resource: 'admin.adminPlugins',
  // path: '/plugins',
  map () {
    this.route('watch-mute')
  }
}

```

For some reason Ember was expecting a route at `adminPlugins/watch-mute` not at `adminPlugins/plugins/watch-mute`. Is this something I did wrong upstream in the routing call chain, or has something changed in the way Discourse/Ember handles these?

---

<div class="post-metadata">

### Author: ![Artem\_Vasiliev](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/artem_vasiliev/32/175226_2.png) [@Artem\_Vasiliev](https://meta.discourse.org/u/Artem_Vasiliev)
#### Post date: [4월 3, 2020, 3:55오후 UTC](https://meta.discourse.org/t/developing-discourse-plugins-part-5-add-an-admin-interface/31761/49 "2020-04-03T15:55:01Z")

</div>

참고로, 링크된 discourse-akismet 플러그인에는 해당 관리자 UI/탭/코드가 없습니다. 좋은 소식은 다른 플러그인인 [GitHub - discourse/discourse-data-explorer: SQL Queries for admins in Discourse · GitHub](https://github.com/discourse/discourse-data-explorer) 에는 해당 기능이 있다는 점입니다.

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [5월 22, 2023, 12:23오후 UTC](https://meta.discourse.org/t/developing-discourse-plugins-part-5-add-an-admin-interface/31761/50 "2023-05-22T12:23:54Z")

</div>

11개의 게시물이 새 주제 [버튼을 클릭할 때 서버 측 코드를 실행하는 방법?](https://meta.discourse.org/t/how-to-execute-server-side-code-when-clicking-a-button/265795)로 분리되었습니다.

---

<div class="post-metadata">

### Author: ![NateDhaliwal](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/natedhaliwal/32/313494_2.png) [@NateDhaliwal](https://meta.discourse.org/u/NateDhaliwal)
#### Post date: [9월 24, 2024, 11:10오전 UTC](https://meta.discourse.org/t/developing-discourse-plugins-part-5-add-an-admin-interface/31761/51 "2024-09-24T11:10:58Z")

</div>

안녕하세요, 116번 줄에 있는 문서 오류를 발견해서 알려드리려고 해요.  
풀 리퀘스트를 열었습니다.

> <https://github.com/discourse/discourse-developer-docs/pull/10>
>
> Fixed 'PLugins' to 'Plugins'.

[이전 페이지](https://meta.discourse.org/t/developing-discourse-plugins-part-5-add-an-admin-interface/31761.md?page=2)
