Discourse 플러그인 개발 - 5부 - 관리자 인터페이스 추가

Work for me!
2018-4-29

1. Code




2. Result

4개의 좋아요

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

3개의 좋아요

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)

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:

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

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

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?

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

1개의 좋아요

11개의 게시물이 새 주제 버튼을 클릭할 때 서버 측 코드를 실행하는 방법?로 분리되었습니다.

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

1개의 좋아요