-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add notification feature #728
Conversation
5110bbd
to
524a143
Compare
レビュー依頼後で申し訳ございませんが、
|
@yohm Slackにてご指摘いただいた以下の修正をpushいたしました 🙇
|
@kimurabps 早速対応いただきましてありがとうございます。修正を確認しました。 |
@kimurabps 上のコメントで述べたように |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
とても完成度も高くて、使いやすい機能でした。設定のUIも通知のUIもslackへの連携も思い描いていた通りのものができています。
主に文言や設定方法についてコメントしましたのでご検討いただけるとありがたいです。
module NotificationEventsHelper | ||
def generate_all_jobs_in_simulator_finished_message(job) | ||
simulator_id = job.simulator.id | ||
id_link = link_to(shortened_id(simulator_id), simulator_url(simulator_id)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OACISのUI上から参照するリンクは_url
ではなく_path
にして、user_config[
oacis_host]
に依存しないようにできないでしょうか?
slackと連携させずに使う人も多いと思われますので、slackにメッセージを送る際のみoacis_host
の値を参照するようにすると、ユーザーのセットアップがより簡便になると思っています。
simulator_id = job.simulator.id | ||
id_link = link_to(shortened_id(simulator_id), simulator_url(simulator_id)) | ||
|
||
return "All #{job.class} in SimulatorID #{id_link} finished." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
文言ですが、Simulatorの場合のみ、IDではなくnameを表示していただいた方が使いやすいと思います。
id_link
を作る際に shortened_id(simulator_id)
ではなく job.simulator.name
を使うようにしてもらえませんか?
|
||
def update | ||
if @oacis_setting.update(oacis_setting_params) | ||
redirect_to edit_oacis_setting_path, notice: 'Oacis setting was successfully updated.' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Slackのwebhook登録時または更新時に、実際にslackに通知("OACIS setting was successfully updated"などの文言)を送っていただけないでしょうか?
ユーザーが、webhookの設定が正しく行われたことを確認できるようにするという意図です。
.col-md-2 | ||
= f.select :notification_level, [1, 2, 3], {}, class: 'form-control', data: tooltip_data(:oacis_setting, :notification_level) | ||
.form-group | ||
= f.label_c :webhook_url |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
文言を "Webhook url" から "Slack webhook URL" に変更していただけないでしょうか?
.form-group | ||
= f.label_c :webhook_url | ||
.col-md-5 | ||
= f.text_field :webhook_url, class: 'form-control', data: tooltip_data(:oacis_setting, :webhook_url) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
このテキストフィールドの直下に以下のようなリンクを貼って、ユーザーがどのようにslackを設定するかがわかるようにしたいと考えています。特に問題なさそうであれば追加していただけないでしょうか?
@yohm レビューいただきありがとうございます 🙇 |
おっしゃる通りです。ご指摘の通りフォールバックも必要ですね。 |
ご回答ありがとうございます。承知いたしました。 |
4d5f3dc
to
6efb807
Compare
@yohm 指摘箇所を修正いたしましたので、お手すきの際にレビューをお願いいたします 🙇 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
素晴らしいです!ありがとうございます
refs #712
対応内容
ジョブ完了通知機能を実装しました。
スクリーンショット
ナビゲーションメニューにベルアイコンを追加
ベルアイコン押下で通知を10件まで表示
「more...」押下で通知一覧ページに遷移
ナビゲーションに「Setting」メニューを追加し、通知粒度とWebhook URLを設定できるようにする
Webhook URLが設定されている場合はSlack通知を行う