Skip to content

Commit

Permalink
Merge branch 'develop' into komiser-develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Oluwaseyi3 authored Jan 5, 2024
2 parents e942149 + 39db86e commit 8452db0
Show file tree
Hide file tree
Showing 20 changed files with 208 additions and 81 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
* @mlabouardy @ShubhamPalriwala @AvineshTripathi @greghub @Traxmaxx @Kolawole9 @Azanul @jakepage91
* @mlabouardy @ShubhamPalriwala @AvineshTripathi @greghub @Traxmaxx @Kolawole99 @Azanul @jakepage91
docs @jakepage91
README.md @jakepage91
CONTRIBUTING.md @jakepage91
8 changes: 6 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@ updates:
directory: "/dashboard"
schedule:
interval: "weekly"
time: "23:00"
timezone: Europe/London
labels:
- "npm dependencies"
- "dependencies"
open-pull-requests-limit: 10
reviewers:
- "mlabouardy"
- "ShubhamPalriwala"
- "Azanul"
- "AvineshTripathi"

Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,39 @@ function DashboardCostExplorerCard({
<div className="mt-8"></div>
<div className="h-full min-h-[22rem]">
{chartData && <Bar data={chartData} options={options} />}
{!chartData && (
{/* ⤵ will be removed when cost is supported at Resource level */}
{queryGroup === 'Resource' && (
<div className="relative flex flex-col items-center bg-empty-cost-explorer h-[330px] w-full">
<div className="mt-10 text-lg text-black-900 border border-gray-200 px-8 py-6 flex bg-white">
<div>
<p className="text-lg">
Cost at resource level not yet supported
</p>
<p className="text-sm text-gray-400 mb-4">
We recommend our cloud version, Tailwarden, <br />
as it supports accurate costs at the resource level
</p>

<Button
size="sm"
gap="md"
asLink
href="https://tailwarden.com/?utm_source=komiser"
target="_blank"
>
<CloudIcon width="24" /> Discover Tailwarden
</Button>
</div>
<Image
src="/assets/img/purplin/rocket.svg"
alt="Purplin on a Rocket"
width="115"
height="124"
/>
</div>
</div>
)}
{!chartData && queryGroup !== 'Resource' && (
<div className="relative flex flex-col items-center bg-empty-cost-explorer h-[330px] w-full">
<div className="mt-10 text-lg text-black-900 border border-gray-200 px-8 py-6 flex bg-white">
<div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ export type CostExplorerQueryGroupProps =
| 'service'
| 'region'
| 'account'
| 'view';
| 'view'
| 'Resource';
export type CostExplorerQueryGranularityProps = 'monthly' | 'daily';
export type CostExplorerQueryDateProps =
| 'thisMonth'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,13 @@ function useCostExplorerChart({
}; */

const groupBySelect: GroupBySelectProps = {
values: ['provider', 'service', 'region', 'account'],
values: ['provider', 'service', 'region', 'account','Resource'],
displayValues: [
'Cloud provider',
'Cloud service',
'Cloud region',
'Cloud account'
'Cloud account',
'Resource'
]
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ export type ResourcesManagerQuery =
| 'service'
| 'region'
| 'account'
| 'view';
| 'view'
| 'Resource';

export type ResourcesManagerGroupBySelectProps = {
values: ResourcesManagerQuery[];
Expand Down
17 changes: 17 additions & 0 deletions dashboard/components/inventory/components/InventorySidePanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,23 @@ function InventorySidePanel({
)}
</h2>
</div>
{data && data.metadata !== null && (
<div className="space-y-2">
<h2 className="font-['Noto Sans'] text-neutral-500 text-sm font-normal leading-tight">
Metadata
</h2>
<h2 className="font-['Noto Sans'] text-neutral-900 text-sm font-normal leading-tight">
{!data && (
<p className="h-3 w-48 animate-pulse rounded-xl bg-cyan-200"></p>
)}
{data && (
<pre>
{JSON.stringify(data.metadata, null, 2)}
</pre>
)}
</h2>
</div>
)}
</div>
</SidepanelPage>
)}
Expand Down
1 change: 0 additions & 1 deletion dashboard/components/select/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ function Select({
function toggle() {
setIsOpen(!isOpen);
}

return (
<div className="relative">
<div
Expand Down
36 changes: 8 additions & 28 deletions dashboard/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dashboard/styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
}
}

@variants responsive {
@layer responsive {
/* Chrome, Safari and Opera */
.no-scrollbar::-webkit-scrollbar {
display: none;
Expand Down
2 changes: 1 addition & 1 deletion docker/docker-compose.postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ services:
- 3000:3000

postgres:
image: postgres:13
image: postgres:16
restart: always
environment:
- POSTGRES_USER=root
Expand Down
4 changes: 2 additions & 2 deletions internal/internal.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ func setupDBConnection(c *models.Config) error {
return nil
}

func triggerFetchingWorfklow(ctx context.Context, client providers.ProviderClient, provider string, telemetry bool, regions []string, wp *providers.WorkerPool) {
func triggerFetchingWorkflow(ctx context.Context, client providers.ProviderClient, provider string, telemetry bool, regions []string, wp *providers.WorkerPool) {
localHub := sentry.CurrentHub().Clone()

defer func() {
Expand Down Expand Up @@ -270,7 +270,7 @@ func fetchResources(ctx context.Context, clients []providers.ProviderClient, reg
wwg.Add(1)
go func() {
defer wwg.Done()
triggerFetchingWorfklow(ctx, client, provider, telemetry, regions, wp)
triggerFetchingWorkflow(ctx, client, provider, telemetry, regions, wp)
}()
}

Expand Down
Loading

0 comments on commit 8452db0

Please sign in to comment.