-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: starting integration with tilt by detecting dashboard and servi…
…ng it
- Loading branch information
Showing
31 changed files
with
728 additions
and
88 deletions.
There are no files selected for viewing
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
15 changes: 15 additions & 0 deletions
15
client/manager/src/components/session/integrations-status/session-integrations-status.tsx
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,15 @@ | ||
import { ISession } from '@polo/common/state/models'; | ||
import { observer } from 'mobx-react-lite'; | ||
import React from 'react'; | ||
import { TiltSessionIntegrationStatusDashboardLink } from './tilt/tilt-session-integration-status-dashboard-link'; | ||
|
||
type TProps = { | ||
session: ISession; | ||
integrationsStatus: ISession['integrations']; | ||
}; | ||
|
||
export const SessionIntegrationsStatus = observer((props: TProps) => { | ||
return <TiltSessionIntegrationStatusDashboardLink | ||
session={props.session} | ||
dashboards={props.integrationsStatus.tilt.dashboards} />; | ||
}); |
22 changes: 22 additions & 0 deletions
22
...nents/session/integrations-status/tilt/tilt-session-integration-status-dashboard-link.tsx
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,22 @@ | ||
import React from 'react'; | ||
import { ISession } from "@polo/common/state/models"; | ||
import { observer } from "mobx-react-lite"; | ||
|
||
type TProps = { | ||
session: ISession; | ||
dashboards: ISession['integrations']['tilt']['dashboards']; | ||
}; | ||
|
||
export const TiltSessionIntegrationStatusDashboardLink = observer((props: TProps) => { | ||
return <div className={'flex'}> | ||
{props.dashboards.map((dashboard, i) => { | ||
return <a | ||
key={dashboard.id} | ||
href={`${window.configuration.integrationsPublicURL}/tilt/${props.session.uuid}/${dashboard.id}`} | ||
target="_blank" | ||
className="text-xs uppercase px-3 py-2 rounded-md bg-nord14 text-nord5 hover:text-nord0-lighter hover:bg-nord14-alpha50 active:bg-nord14-darker active:text-nord5 transition-colors duration-200 ease-in-out mx-1"> | ||
Tilt Dashboard {props.dashboards.length > 1 ? i + 1 : ''} | ||
</a> | ||
})} | ||
</div>; | ||
}); |
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
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
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
Oops, something went wrong.