Code Monkey home page Code Monkey logo

ng-redmine-admin's Introduction

ng-redmine-admin

篠宮樹里「絵子よ、AngularRedmine のフロントエンドアプリケーションを作ってみたぞ」
瀬尾絵子「おー。おめでとー」

Description

Usage

環境構築

絵子「さっそく使ってみよう!」 樹里「まず、Node.jsnpmAngular CLI がセットアップされていない人はさっさとセットアップするように」
絵子「はーい」

  • まずNode.jsのインストーラーを実行したあとに、npm install -g @angular/cli とコマンドを入力してAngular CLIをインストールします。

設置

樹里「準備ができたら、さっそくアプリをダウンロードしよう」

git clone https://github.com/8amjp/ng-redmine-admin.git

絵子「gitをインストールしていない人は、ZIPファイルをダウンロードして解凍してもOKだよ」

準備

樹里「次に、必要なモジュールを追加しよう。ng-redmine-adminディレクトリに移動し、次のコマンドを実行する」

npm install

絵子「いろいろダウンロードしだしたぞ。けっこう時間かかるもんだね……」
樹里「それから、 /src/environments/environment.ts を環境に応じて編集する必要がある」

  • redmine_protocolredmine_host_name の値にRedmineのプロトコル、URLを記述します。
  • redmine_api_key の値にRedmineのシステム管理者アカウントのAPIキーを記述します。

Redmine側の準備

樹里「Redmine側でも準備がいる。管理画面で、『RESTによるWebサービスを有効にする』をオンにしよう。それから、CORS(オリジン間リソース共有)を使用した要求に応答させる設定が必要だ」
絵子「どうやったらいいの?」
樹里「方法はいろいろあるが、セキュリティ面に目をつぶれば、Redmineが稼働しているWebサーバーの設定ファイル(Apacheならhttpd.conf)を書き換えてしまうのが最も簡単だ」

Header always set Access-Control-Allow-Origin "*" 
Header always set Access-Control-Allow-Methods "OPTIONS, PUT" 
Header always set Access-Control-Max-Age "60" 
Header always set Access-Control-Allow-Headers "Content-Type, X-Redmine-API-Key" 
RewriteEngine On 
RewriteCond %{REQUEST_METHOD} OPTIONS 
RewriteRule ^(.*)$ $1 [R=200,L] 

樹里「これをhttpd.confの末尾に追記すると、あらゆるドメインからのアクセスも受け付け、X-Redmine-API-Keyというリクエストヘッダーを許可し、さらにすべてのOPTIONSメソッドのリクエストに対しステータスコード200を返す」
絵子「ザル警備だね……」

起動

絵子「さて、準備できたよ」
樹里「では、さっそく起動しよう」

ng s

樹里「起動したら、Webブラウザでアクセスしてみよう。通常は http://localhost:4200/ だ」
絵子「……おー、表示されたよ! 樹里すごーい!」

Todo

  • ログイン画面
  • チケットの新規登録画面
  • レポート画面
  • フィルタ項目の追加

樹里「まだまだ完成には程遠いが、気長に開発していこう」
絵子「がんばって!」

Author

8amjp

ng-redmine-admin's People

Contributors

angular-cli avatar superman32432432 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

ng-redmine-admin's Issues

バグ

チケット更新-送信が失敗します。下記で直りました。

\src\app\pages\issue\default-layout-form\default-layout-form.component.html

61行目 item.user_id

{{item.user.name}}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.