Skip to content

Commit

Permalink
added jira cloud integration
Browse files Browse the repository at this point in the history
removed duplicated code + event tracking + error msg string

added japenese tx message + refactor

refactor to use jira project hash

added  feature flag IRENE_SHOW_JIRA_CLOUD to show/hide connect jira button

added translate messages for cloud integration

show jira cloud integration section by default

JIRA Cloud Integration support
  • Loading branch information
sureshdsk authored and guganabu committed Feb 10, 2022
1 parent c1e7152 commit 1b956b7
Show file tree
Hide file tree
Showing 14 changed files with 503 additions and 333 deletions.
125 changes: 0 additions & 125 deletions app/components/jira-account.js

This file was deleted.

132 changes: 132 additions & 0 deletions app/components/jira-integration/index.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
<div {{did-insert this.initComp}}>
{{! Manual Integration start}}
{{#if (or this.isIntegratedByCred (not this.isJIRAIntegrated))}}
<div local-class="subtitle-margin jira-integration-subtitle">
{{t 'manualIntegration'}}
</div>
{{/if}}
{{#unless this.isJIRAIntegrated}}
<form>
<div class="input-wrap">
<Input
classNameBindings="changeset.error.host:has-error"
placeholder={{t 'jiraHost'}}
@type="text"
@value={{this.changeset.host}}
class="input-field"
id="jira-host"
/>
</div>
<div class="input-wrap">
<div class="half-wrap">
<Input
classNameBindings="changeset.error.username:has-error"
placeholder={{t 'username'}}
@type="text"
@value={{this.changeset.username}}
class="input-field"
id="jira-username"
/>
<Input
classNameBindings="changeset.error.password:has-error"
placeholder={{t 'apiKey'}}
@type="password"
@value={{this.changeset.password}}
autocomplete="jira-password"
class="input-field"
id="jira-password"
/>
</div>
</div>
<button
disabled={{this.integrateJIRAByCred.isRunning}}
class="button is-primary mp-jira-integrate"
type="button"
{{on 'click' this.onIntegrateJIRAByCred}}
>
{{#if this.integrateJIRAByCred.isRunning}}
<div class="fa-font-size">
<i class="fa fa-spinner fa-spin"></i>
</div>
{{/if}}
{{t 'integrateJIRA'}}
</button>
</form>
{{/unless}}
{{! Manual Integration end }}
{{#if this.isJiraCloudEnabled}}
{{#unless this.isJIRAIntegrated}}
<div local-class="subsection-divider"></div>
{{/unless}}
{{! Cloud Integration start }}
{{#if (or this.isIntegratedByCloud (not this.isJIRAIntegrated))}}
<div local-class="jira-integration-subtitle subtitle-margin">
{{t 'cloudIntegration'}}
</div>
{{/if}}
{{#unless this.isJIRAIntegrated}}
<button
type="button"
disabled={{this.integrateJiraCloud.isRunning}}
class="button is-primary mp-jira-integrate"
{{on 'click' this.onIntegrateJiraCloud}}
>
{{t 'integrateJIRA'}}
</button>
{{/unless}}
{{! Cloud Integration end }}
{{/if}}
{{! JIRA integrated info container }}
{{#if this.isJIRAIntegrated}}
<div class="integration integration-jira">
<div class="integration-logo-container">
<img
src="/images/jira-icon.png"
class="integration-logo"
alt="JIRA Icon"
/>
</div>
<div class="integration-account-container">
<div class="integration-account">
<div>
<div class="text-lightgray padding-b-q">
{{this.connectedHost}}
</div>
{{#if this.isIntegratedByCred}}
<div class="black-text">
{{this.connectedUsername}}
</div>
{{/if}}
</div>
<button
class="button is-primary mp-jira-revoke"
type="button"
{{on 'click' this.toggleConfirmBox}}
>
{{t 'disconnect'}}
</button>
</div>
</div>
</div>
{{/if}}
</div>
{{! Revoke JIRA integration confirmation modal }}
{{#if this.showRevokeJIRAConfirmBox}}
<AkModal
@onClose={{this.toggleConfirmBox}}
@showHeader={{true}}
@headerTitle={{t 'revokeJira'}}
>
<div local-class="confirm-box-label">
{{t 'confirmBox.revokeJira'}}
</div>
<div local-class="confirm-box-action-btns">
<AkButton::PrimaryFilled @onClick={{this.onRevokeJira}}>
{{t 'ok'}}
</AkButton::PrimaryFilled>
<AkButton::NeutralOutlined @onClick={{this.toggleConfirmBox}}>
{{t 'cancel'}}
</AkButton::NeutralOutlined>
</div>
</AkModal>
{{/if}}
Loading

0 comments on commit 1b956b7

Please sign in to comment.