-
Notifications
You must be signed in to change notification settings - Fork 752
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
Integration list page and integration config #2684
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
79778db
Integration page & config
gaspergrom 2c5153e
Configuration improvements and git settings
gaspergrom 4799742
Confluence and groupsio integrations align
gaspergrom e77fbb2
Jira integration align
gaspergrom 19c8ea4
Slack & Discord integration align
gaspergrom 59697e5
Linkedin & twitter
gaspergrom ce699e9
Reddit and hackernews
gaspergrom a141063
Stackoverflow
gaspergrom 76a96f5
Discourse & Gerrit
gaspergrom 586493d
Add gitlab and lint fix
gaspergrom bfa40ce
Minor fixes
gaspergrom 57904b6
Design fixes for list page
gaspergrom 5eb2e36
Bug fixes and improvements
gaspergrom edc2d1d
Cleanup
gaspergrom b4ea0f5
Fixed connecting check
gaspergrom 6a34460
Fix error on discord connect
gaspergrom File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 39 additions & 0 deletions
39
frontend/src/config/integrations/confluence/components/confluence-connect.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<template> | ||
<div class="flex items-center gap-4"> | ||
<!-- <lf-button type="secondary-ghost" @click="isDetailsModalOpen = true">--> | ||
<!-- <lf-icon name="circle-info" type="regular" />--> | ||
<!-- Details--> | ||
<!-- </lf-button>--> | ||
<lf-button type="secondary" @click="isConfluenceSettingsDrawerVisible = true"> | ||
<lf-icon name="link-simple" /> | ||
Connect | ||
</lf-button> | ||
</div> | ||
<lf-confluence-settings-drawer | ||
v-if="isConfluenceSettingsDrawerVisible" | ||
v-model="isConfluenceSettingsDrawerVisible" | ||
:integration="props.integration" | ||
/> | ||
</template> | ||
|
||
<script setup> | ||
import { defineProps, ref } from 'vue'; | ||
import LfIcon from '@/ui-kit/icon/Icon.vue'; | ||
import LfButton from '@/ui-kit/button/Button.vue'; | ||
import LfConfluenceSettingsDrawer from '@/config/integrations/confluence/components/confluence-settings-drawer.vue'; | ||
|
||
const props = defineProps({ | ||
integration: { | ||
type: Object, | ||
default: () => {}, | ||
}, | ||
}); | ||
|
||
const isConfluenceSettingsDrawerVisible = ref(false); | ||
</script> | ||
|
||
<script> | ||
export default { | ||
name: 'LfConfluenceConnect', | ||
}; | ||
</script> |
34 changes: 34 additions & 0 deletions
34
frontend/src/config/integrations/confluence/components/confluence-dropdown.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<template> | ||
<lf-dropdown-item @click="isConfluenceSettingsDrawerVisible = true"> | ||
<lf-icon name="sliders-simple" type="regular" /> | ||
Settings | ||
</lf-dropdown-item> | ||
<lf-confluence-settings-drawer | ||
v-if="isConfluenceSettingsDrawerVisible" | ||
v-model="isConfluenceSettingsDrawerVisible" | ||
:integration="props.integration" | ||
/> | ||
</template> | ||
|
||
<script setup> | ||
import { defineProps, ref } from 'vue'; | ||
import LfDropdownItem from '@/ui-kit/dropdown/DropdownItem.vue'; | ||
import LfIcon from '@/ui-kit/icon/Icon.vue'; | ||
import LfConfluenceSettingsDrawer from '@/config/integrations/confluence/components/confluence-settings-drawer.vue'; | ||
|
||
const props = defineProps({ | ||
integration: { | ||
type: Object, | ||
default: () => {}, | ||
}, | ||
}); | ||
|
||
const isConfluenceSettingsDrawerVisible = ref(false); | ||
// const isDetailsModalOpen = ref(false); | ||
</script> | ||
|
||
<script> | ||
export default { | ||
name: 'AppGitConnect', | ||
}; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { IntegrationConfig } from '@/config/integrations'; | ||
import ConfluenceConnect from './components/confluence-connect.vue'; | ||
import ConfluenceParams from './components/confluence-params.vue'; | ||
import ConfluenceDropdown from './components/confluence-dropdown.vue'; | ||
|
||
const confluence: IntegrationConfig = { | ||
key: 'confluence', | ||
name: 'Confluence', | ||
image: '/images/integrations/confluence.svg', | ||
description: 'Connect Confluence to sync documentation activities from your repos.', | ||
connectComponent: ConfluenceConnect, | ||
connectedParamsComponent: ConfluenceParams, | ||
dropdownComponent: ConfluenceDropdown, | ||
}; | ||
|
||
export default confluence; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
frontend/src/config/integrations/devto/components/devto-connect.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<template> | ||
<div class="flex items-center gap-4"> | ||
<!-- <lf-button type="secondary-ghost" @click="isDetailsModalOpen = true">--> | ||
<!-- <lf-icon name="circle-info" type="regular" />--> | ||
<!-- Details--> | ||
<!-- </lf-button>--> | ||
<lf-button type="secondary" @click="isDevtoConnectDrawerVisible = true"> | ||
<lf-icon name="link-simple" /> | ||
Connect | ||
</lf-button> | ||
</div> | ||
<lf-devto-connect-drawer | ||
v-if="isDevtoConnectDrawerVisible" | ||
v-model="isDevtoConnectDrawerVisible" | ||
:integration="props.integration" | ||
/> | ||
</template> | ||
|
||
<script setup> | ||
import { defineProps, ref } from 'vue'; | ||
import LfIcon from '@/ui-kit/icon/Icon.vue'; | ||
import LfButton from '@/ui-kit/button/Button.vue'; | ||
import LfDevtoConnectDrawer from '@/config/integrations/devto/components/devto-connect-drawer.vue'; | ||
|
||
const props = defineProps({ | ||
integration: { | ||
type: Object, | ||
default: () => {}, | ||
}, | ||
}); | ||
|
||
const isDevtoConnectDrawerVisible = ref(false); | ||
</script> | ||
|
||
<script> | ||
export default { | ||
name: 'AppDevtoConnect', | ||
}; | ||
</script> |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { IntegrationConfig } from '@/config/integrations'; | ||
import DevtoConnect from './components/devto-connect.vue'; | ||
import DevtoParams from './components/devto-params.vue'; | ||
|
||
const devto: IntegrationConfig = { | ||
key: 'devto', | ||
name: 'DEV', | ||
image: '/images/integrations/devto.png', | ||
description: 'Connect DEV to sync profile information and comments on articles.', | ||
connectComponent: DevtoConnect, | ||
connectedParamsComponent: DevtoParams, | ||
}; | ||
|
||
export default devto; |
63 changes: 63 additions & 0 deletions
63
frontend/src/config/integrations/discord/components/discord-connect.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<template> | ||
<div class="flex items-center gap-4"> | ||
<!-- <lf-button type="secondary-ghost" @click="isDetailsModalOpen = true">--> | ||
<!-- <lf-icon name="circle-info" type="regular" />--> | ||
<!-- Details--> | ||
<!-- </lf-button>--> | ||
<lf-button type="secondary" @click="connect()"> | ||
<lf-icon name="link-simple" /> | ||
Connect | ||
</lf-button> | ||
</div> | ||
</template> | ||
|
||
<script setup> | ||
import { computed, onMounted } from 'vue'; | ||
import config from '@/config'; | ||
import LfIcon from '@/ui-kit/icon/Icon.vue'; | ||
import LfButton from '@/ui-kit/button/Button.vue'; | ||
import { EventType, FeatureEventKey } from '@/shared/modules/monitoring/types/event'; | ||
import { Platform } from '@/shared/modules/platform/types/Platform'; | ||
import { mapActions } from '@/shared/vuex/vuex.helpers'; | ||
import { useRoute } from 'vue-router'; | ||
|
||
const route = useRoute(); | ||
|
||
const { doDiscordConnect } = mapActions('integration'); | ||
|
||
const connectUrl = computed(() => config.discordInstallationUrl); | ||
|
||
const connect = () => { | ||
window.open(connectUrl.value, '_self'); | ||
}; | ||
|
||
const finallizeDiscordConnect = () => { | ||
const { | ||
source, code, | ||
} = route.query; | ||
const guildId = route.query.guild_id; | ||
|
||
if (code && source === 'discord' && guildId) { | ||
doDiscordConnect({ | ||
guildId, | ||
}) | ||
.then(() => { | ||
trackEvent({ | ||
key: FeatureEventKey.CONNECT_INTEGRATION, | ||
type: EventType.FEATURE, | ||
properties: { platform: Platform.DISCORD }, | ||
}); | ||
}); | ||
} | ||
}; | ||
|
||
onMounted(() => { | ||
finallizeDiscordConnect(); | ||
}); | ||
</script> | ||
|
||
<script> | ||
export default { | ||
name: 'LfDiscordConnect', | ||
}; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { IntegrationConfig } from '@/config/integrations'; | ||
import DiscordConnect from './components/discord-connect.vue'; | ||
import DiscordParams from './components/discord-params.vue'; | ||
|
||
const discord: IntegrationConfig = { | ||
key: 'discord', | ||
name: 'Discord', | ||
image: '/images/integrations/discord.png', | ||
description: 'Connect Discord to sync messages, threads, forum channels, and new joiners.', | ||
connectComponent: DiscordConnect, | ||
connectedParamsComponent: DiscordParams, | ||
}; | ||
|
||
export default discord; |
39 changes: 39 additions & 0 deletions
39
frontend/src/config/integrations/discourse/components/discourse-connect.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<template> | ||
<div class="flex items-center gap-4"> | ||
<!-- <lf-button type="secondary-ghost" @click="isDetailsModalOpen = true">--> | ||
<!-- <lf-icon name="circle-info" type="regular" />--> | ||
<!-- Details--> | ||
<!-- </lf-button>--> | ||
<lf-button type="secondary" @click="isDiscourseConnectDrawerOpen = true"> | ||
<lf-icon name="link-simple" /> | ||
Connect | ||
</lf-button> | ||
</div> | ||
<lf-discourse-settings-drawer | ||
v-if="isDiscourseConnectDrawerOpen" | ||
v-model="isDiscourseConnectDrawerOpen" | ||
:integration="props.integration" | ||
/> | ||
</template> | ||
|
||
<script setup> | ||
import { defineProps, ref } from 'vue'; | ||
import LfDiscourseSettingsDrawer from '@/config/integrations/discourse/components/discourse-settings-drawer.vue'; | ||
import LfIcon from '@/ui-kit/icon/Icon.vue'; | ||
import LfButton from '@/ui-kit/button/Button.vue'; | ||
|
||
const props = defineProps({ | ||
integration: { | ||
type: Object, | ||
default: () => {}, | ||
}, | ||
}); | ||
|
||
const isDiscourseConnectDrawerOpen = ref(false); | ||
</script> | ||
|
||
<script> | ||
export default { | ||
name: 'AppDiscourseConnect', | ||
}; | ||
</script> |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I don't think route is defined anywhere
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.
it is you can catch route.query from anywhere and get the params