diff --git a/.circleci/config.yml b/.circleci/config.yml index 9b5f164bd..6d8f353b7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -60,13 +60,13 @@ jobs: chmod +x komiser_windows_amd64.exe komiser_darwin_amd64 komiser_linux_amd64 - run: name: Push Linux binary - command: aws s3 cp komiser_linux_amd64 s3://komiser-releases/2.6.0/linux/komiser --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers + command: aws s3 cp komiser_linux_amd64 s3://komiser-releases/2.7.0/linux/komiser --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers - run: name: Push Windows binary - command: aws s3 cp komiser_windows_amd64.exe s3://komiser-releases/2.6.0/windows/komiser --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers + command: aws s3 cp komiser_windows_amd64.exe s3://komiser-releases/2.7.0/windows/komiser --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers - run: name: Push Mac OS X binary - command: aws s3 cp komiser_darwin_amd64 s3://komiser-releases/2.6.0/osx/komiser --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers + command: aws s3 cp komiser_darwin_amd64 s3://komiser-releases/2.7.0/osx/komiser --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers - run: name: Upload IAM policy command: aws s3 cp policy.json s3://komiser-releases/policy.json --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers @@ -85,7 +85,9 @@ jobs: command: | docker login -u$DOCKERHUB_LOGIN -p$DOCKERHUB_PASSWORD docker tag mlabouardy/komiser:latest mlabouardy/komiser:${CIRCLE_SHA1} + docker tag mlabouardy/komiser:latest mlabouardy/komiser:2.7.0 docker push mlabouardy/komiser:latest + docker push mlabouardy/komiser:2.7.0 docker push mlabouardy/komiser:${CIRCLE_SHA1} workflows: diff --git a/README.md b/README.md index 4a832595b..f60e4d893 100644 --- a/README.md +++ b/README.md @@ -37,24 +37,24 @@ Does your company use Komiser? Ask your manager or marketing team if your compa ## Download -Below are the available downloads for the latest version of Komiser (2.6.0). Please download the proper package for your operating system and architecture. +Below are the available downloads for the latest version of Komiser (2.7.0). Please download the proper package for your operating system and architecture. ### Linux: ``` -wget https://cli.komiser.io/2.6.0/linux/komiser +wget https://cli.komiser.io/2.7.0/linux/komiser ``` ### Windows: ``` -wget https://cli.komiser.io/2.6.0/windows/komiser -OutFile komiser.exe +wget https://cli.komiser.io/2.7.0/windows/komiser -OutFile komiser.exe ``` ### Mac OS X: ``` -wget https://cli.komiser.io/2.6.0/osx/komiser +wget https://cli.komiser.io/2.7.0/osx/komiser ``` _Note_: make sure to add the execution permission to Komiser `chmod +x komiser` @@ -67,7 +67,7 @@ brew install komiser ### Docker: ``` -docker run -d -p 3000:3000 -e AWS_ACCESS_KEY_ID="" -e AWS_SECRET_ACCESS_KEY="" -e AWS_DEFAULT_REGION="" --name komiser mlabouardy/komiser:2.6.0 +docker run -d -p 3000:3000 -e AWS_ACCESS_KEY_ID="" -e AWS_SECRET_ACCESS_KEY="" -e AWS_DEFAULT_REGION="" --name komiser mlabouardy/komiser:2.7.0 ``` ## How to use @@ -200,6 +200,10 @@ komiser start --port 3000 * Point your browser to http://localhost:3000 +

+ +

+ ### OVH * Create an API application from [here](https://eu.api.ovh.com/createToken/). diff --git a/dashboard/src/app/app.component.css b/dashboard/src/app/app.component.css index 063a14fc4..d7a945e3f 100644 --- a/dashboard/src/app/app.component.css +++ b/dashboard/src/app/app.component.css @@ -1,4 +1,4 @@ -.service-logo{ +.service-logo { width: 30px; } @@ -6,7 +6,7 @@ width: 370px; } -.notif-content{ +.notif-content { width: 100%; } @@ -17,6 +17,10 @@ margin-top: 50px; } -.photo img{ +.photo img { object-fit: contain !important; +} + +.logo img { + width: 125px; } \ No newline at end of file diff --git a/dashboard/src/app/app.component.html b/dashboard/src/app/app.component.html index 192e5ab06..0e9992e01 100644 --- a/dashboard/src/app/app.component.html +++ b/dashboard/src/app/app.component.html @@ -1,8 +1,7 @@
+
diff --git a/dashboard/src/app/app.module.ts b/dashboard/src/app/app.module.ts index 099a88e81..78e574907 100644 --- a/dashboard/src/app/app.module.ts +++ b/dashboard/src/app/app.module.ts @@ -29,10 +29,6 @@ import { OvhDataAndAIComponent } from './pages/data-and-ai/ovh/ovh.component'; import { DigitaloceanService } from './services/digitalocean.service'; import { GcpService } from './services/gcp.service'; import { GoogleAnalyticsService } from './services/google-analytics.service'; -import { AwsLimitsComponent } from './pages/limits/aws/aws.component'; -import { GcpLimitsComponent } from './pages/limits/gcp/gcp.component'; -import { LimitsComponent } from './pages/limits/limits.component'; -import { OvhLimitsComponent } from './pages/limits/ovh/ovh.component'; import { AwsNetworkComponent } from './pages/network/aws/aws.component'; import { AzureNetworkComponent } from './pages/network/azure/azure.component'; import { DigitaloceanNetworkComponent } from './pages/network/digitalocean/digitalocean.component'; @@ -92,11 +88,6 @@ const appRoutes: Routes = [ component: ProfileComponent, data: { title: "Profile - Komiser" }, }, - { - path: "limits", - component: LimitsComponent, - data: { title: "Service Limits Checks - Komiser" }, - }, { path: "notifications", component: NotificationsComponent, @@ -120,7 +111,6 @@ const appRoutes: Routes = [ SecurityComponent, DataAndAiComponent, ProfileComponent, - LimitsComponent, AwsDashboardComponent, GcpDashboardComponent, AwsComputeComponent, @@ -136,8 +126,6 @@ const appRoutes: Routes = [ GcpSecurityComponent, GcpDataAndAIComponent, AwsDataAndAIComponent, - AwsLimitsComponent, - GcpLimitsComponent, AwsProfileComponent, GcpProfileComponent, NotificationsComponent, @@ -147,7 +135,6 @@ const appRoutes: Routes = [ OvhNetworkComponent, OvhSecurityComponent, OvhDataAndAIComponent, - OvhLimitsComponent, OvhProfileComponent, DigitaloceanDashboardComponent, DigitaloceanComputeComponent, diff --git a/dashboard/src/app/pages/dashboard/azure/azure.component.ts b/dashboard/src/app/pages/dashboard/azure/azure.component.ts index 107697d0b..a4b6571cc 100644 --- a/dashboard/src/app/pages/dashboard/azure/azure.component.ts +++ b/dashboard/src/app/pages/dashboard/azure/azure.component.ts @@ -35,14 +35,7 @@ export class AzureDashboardComponent ["westus3", { latitude: "33.448376", longitude: "-112.074036" }], ["australiaeast", { latitude: "-33.86", longitude: "151.2094" }], ["southeastasia", { latitude: "1.283", longitude: "103.833" }], - ["southeastasia", { latitude: "1.283", longitude: "103.833" }], - /* ["ams", { latitude: "52.370216", longitude: "4.895168" }], - ["sfo", { latitude: "37.774929", longitude: "-122.419418" }], - ["sgp", { latitude: "1.352083", longitude: "103.819839" }], - ["lon", { latitude: "51.507351", longitude: "-0.127758" }], - ["fra", { latitude: "50.110924", longitude: "8.682127" }], - ["tor", { latitude: "43.653225", longitude: "-79.383186" }], - ["blr", { latitude: "12.971599", longitude: "77.594566" }],*/ + ['australiaeas', { latitude: '-31.84', longitude: '145.61' }], ]); private _subscription: Subscription; diff --git a/dashboard/src/app/pages/limits/aws/aws.component.css b/dashboard/src/app/pages/limits/aws/aws.component.css deleted file mode 100644 index a70cee1dd..000000000 --- a/dashboard/src/app/pages/limits/aws/aws.component.css +++ /dev/null @@ -1,93 +0,0 @@ -.card-warning{ - background: #FBAD4B; -} - -.spinner{ - padding-top: 200px; -} - -.card-success { - background: #4BC0C0; -} - -.loader { - color: #000000; - font-size: 90px; - text-indent: -9999em; - overflow: hidden; - width: 1em; - height: 1em; - border-radius: 50%; - margin: 72px auto; - position: relative; - -webkit-transform: translateZ(0); - -ms-transform: translateZ(0); - transform: translateZ(0); - -webkit-animation: load6 1.7s infinite ease, round 1.7s infinite ease; - animation: load6 1.7s infinite ease, round 1.7s infinite ease; - } - @-webkit-keyframes load6 { - 0% { - box-shadow: 0 -0.83em 0 -0.4em, 0 -0.83em 0 -0.42em, 0 -0.83em 0 -0.44em, 0 -0.83em 0 -0.46em, 0 -0.83em 0 -0.477em; - } - 5%, - 95% { - box-shadow: 0 -0.83em 0 -0.4em, 0 -0.83em 0 -0.42em, 0 -0.83em 0 -0.44em, 0 -0.83em 0 -0.46em, 0 -0.83em 0 -0.477em; - } - 10%, - 59% { - box-shadow: 0 -0.83em 0 -0.4em, -0.087em -0.825em 0 -0.42em, -0.173em -0.812em 0 -0.44em, -0.256em -0.789em 0 -0.46em, -0.297em -0.775em 0 -0.477em; - } - 20% { - box-shadow: 0 -0.83em 0 -0.4em, -0.338em -0.758em 0 -0.42em, -0.555em -0.617em 0 -0.44em, -0.671em -0.488em 0 -0.46em, -0.749em -0.34em 0 -0.477em; - } - 38% { - box-shadow: 0 -0.83em 0 -0.4em, -0.377em -0.74em 0 -0.42em, -0.645em -0.522em 0 -0.44em, -0.775em -0.297em 0 -0.46em, -0.82em -0.09em 0 -0.477em; - } - 100% { - box-shadow: 0 -0.83em 0 -0.4em, 0 -0.83em 0 -0.42em, 0 -0.83em 0 -0.44em, 0 -0.83em 0 -0.46em, 0 -0.83em 0 -0.477em; - } - } - @keyframes load6 { - 0% { - box-shadow: 0 -0.83em 0 -0.4em, 0 -0.83em 0 -0.42em, 0 -0.83em 0 -0.44em, 0 -0.83em 0 -0.46em, 0 -0.83em 0 -0.477em; - } - 5%, - 95% { - box-shadow: 0 -0.83em 0 -0.4em, 0 -0.83em 0 -0.42em, 0 -0.83em 0 -0.44em, 0 -0.83em 0 -0.46em, 0 -0.83em 0 -0.477em; - } - 10%, - 59% { - box-shadow: 0 -0.83em 0 -0.4em, -0.087em -0.825em 0 -0.42em, -0.173em -0.812em 0 -0.44em, -0.256em -0.789em 0 -0.46em, -0.297em -0.775em 0 -0.477em; - } - 20% { - box-shadow: 0 -0.83em 0 -0.4em, -0.338em -0.758em 0 -0.42em, -0.555em -0.617em 0 -0.44em, -0.671em -0.488em 0 -0.46em, -0.749em -0.34em 0 -0.477em; - } - 38% { - box-shadow: 0 -0.83em 0 -0.4em, -0.377em -0.74em 0 -0.42em, -0.645em -0.522em 0 -0.44em, -0.775em -0.297em 0 -0.46em, -0.82em -0.09em 0 -0.477em; - } - 100% { - box-shadow: 0 -0.83em 0 -0.4em, 0 -0.83em 0 -0.42em, 0 -0.83em 0 -0.44em, 0 -0.83em 0 -0.46em, 0 -0.83em 0 -0.477em; - } - } - @-webkit-keyframes round { - 0% { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } - 100% { - -webkit-transform: rotate(360deg); - transform: rotate(360deg); - } - } - @keyframes round { - 0% { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } - 100% { - -webkit-transform: rotate(360deg); - transform: rotate(360deg); - } - } - \ No newline at end of file diff --git a/dashboard/src/app/pages/limits/aws/aws.component.html b/dashboard/src/app/pages/limits/aws/aws.component.html deleted file mode 100644 index afc3f1df4..000000000 --- a/dashboard/src/app/pages/limits/aws/aws.component.html +++ /dev/null @@ -1,28 +0,0 @@ -
-
-
-
-
Loading...
-
-
-
-
-
-
-
-
- -
-
-
-
-

{{limit.name}}

-

{{limit.checkId}}

-
-
-
-
-
-
-
-
\ No newline at end of file diff --git a/dashboard/src/app/pages/limits/aws/aws.component.spec.ts b/dashboard/src/app/pages/limits/aws/aws.component.spec.ts deleted file mode 100644 index 88bc9df31..000000000 --- a/dashboard/src/app/pages/limits/aws/aws.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; - -import { AwsComponent } from './aws.component'; - -describe('AwsComponent', () => { - let component: AwsComponent; - let fixture: ComponentFixture; - - beforeEach(waitForAsync(() => { - TestBed.configureTestingModule({ - declarations: [ AwsComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(AwsComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/dashboard/src/app/pages/limits/aws/aws.component.ts b/dashboard/src/app/pages/limits/aws/aws.component.ts deleted file mode 100644 index aec22d454..000000000 --- a/dashboard/src/app/pages/limits/aws/aws.component.ts +++ /dev/null @@ -1,111 +0,0 @@ -import { Component, OnInit, OnDestroy } from '@angular/core'; -import { AwsService } from '../../../services/aws.service'; -import { StoreService } from '../../../services/store.service'; -import { Subject, Subscription } from 'rxjs'; - -@Component({ - selector: 'aws-limits', - templateUrl: './aws.component.html', - styleUrls: ['./aws.component.css'] -}) -export class AwsLimitsComponent implements OnInit, OnDestroy { - - public serviceLimits: Array = []; - - public loadingServiceLimits: boolean = true; - - private _subscription: Subscription; - - constructor(private awsService: AwsService, private storeService: StoreService) { - this.initState(); - - this._subscription = this.storeService.profileChanged.subscribe(profile => { - this.serviceLimits = []; - - this.loadingServiceLimits = true; - - this.initState(); - }); - } - - private initState() { - this.awsService.getServiceLimits().subscribe(data => { - this.serviceLimits = data; - this.loadingServiceLimits = false; - }, err => { - this.serviceLimits = []; - this.loadingServiceLimits = false; - }); - } - - ngOnDestroy() { - this._subscription.unsubscribe(); - } - - public getColor(status: string) { - switch (status) { - case 'ok': - return 'card card-stats card-success'; - case 'warning': - return 'card card-stats card-warning'; - case 'danger': - return 'card card-stats card-danger'; - default: - return 'card card-stats'; - } - } - - public getServiceLogo(name: string) { - if (name.indexOf('Route 53') != -1) { - return 'https://cdn.komiser.io/images/services/aws/white/route53.png'; - } - else if (name.indexOf('EBS') != -1) { - return 'https://cdn.komiser.io/images/services/aws/white/ebs.png'; - } - else if (name.indexOf('RDS') != -1) { - return 'https://cdn.komiser.io/images/services/aws/white/rds.png'; - } - else if (name.indexOf('DynamoDB') != -1) { - return 'https://cdn.komiser.io/images/services/aws/white/dynamodb.png'; - } - else if (name.indexOf('IAM Group') != -1) { - return 'https://cdn.komiser.io/images/services/aws/white/iam_groups.png'; - } - else if (name.indexOf('VPC Internet Gateways') != -1) { - return 'https://cdn.komiser.io/images/services/aws/white/igw.png'; - } - else if (name.indexOf('IAM Roles') != -1) { - return 'https://cdn.komiser.io/images/services/aws/white/iam_roles.png'; - } - else if (name.indexOf('Elastic IP Address') != -1) { - return 'https://cdn.komiser.io/images/services/aws/white/elastic_ip.png'; - } - else if (name.indexOf('IAM Instance Profiles') != -1) { - return 'https://cdn.komiser.io/images/services/aws/white/instance_profiles.png'; - } - else if (name.indexOf('IAM Users') != -1) { - return 'https://cdn.komiser.io/images/services/aws/white/iam_users.png'; - } - else if (name.indexOf('ELB') != -1) { - return 'https://cdn.komiser.io/images/services/aws/white/elb.png'; - } - else if (name.indexOf('IAM Policies') != -1) { - return 'https://cdn.komiser.io/images/services/aws/white/iam_policies.png'; - } - else if (name.indexOf('CloudFormation') != -1) { - return 'https://cdn.komiser.io/images/services/aws/white/cloudformation.png'; - } - else if (name.indexOf('Auto Scaling Groups') != -1) { - return 'https://cdn.komiser.io/images/services/aws/white/ec2.png'; - } - else if (name.indexOf('SES') != -1) { - return 'https://cdn.komiser.io/images/services/aws/white/ses.png'; - } else { - return 'https://cdn.komiser.io/images/services/aws/white/aws.png'; - } - } - - ngOnInit() { - } - -} diff --git a/dashboard/src/app/pages/limits/gcp/gcp.component.css b/dashboard/src/app/pages/limits/gcp/gcp.component.css deleted file mode 100644 index 1f4fa0105..000000000 --- a/dashboard/src/app/pages/limits/gcp/gcp.component.css +++ /dev/null @@ -1,98 +0,0 @@ -.gcp-logo { - width: 40px !important; - padding-bottom: 10px !important; -} - -.card-warning{ - background: #FBAD4B; -} - -.spinner{ - padding-top: 200px; -} - -.card-success { - background: #4BC0C0; -} - -.loader { - color: #000000; - font-size: 90px; - text-indent: -9999em; - overflow: hidden; - width: 1em; - height: 1em; - border-radius: 50%; - margin: 72px auto; - position: relative; - -webkit-transform: translateZ(0); - -ms-transform: translateZ(0); - transform: translateZ(0); - -webkit-animation: load6 1.7s infinite ease, round 1.7s infinite ease; - animation: load6 1.7s infinite ease, round 1.7s infinite ease; - } - @-webkit-keyframes load6 { - 0% { - box-shadow: 0 -0.83em 0 -0.4em, 0 -0.83em 0 -0.42em, 0 -0.83em 0 -0.44em, 0 -0.83em 0 -0.46em, 0 -0.83em 0 -0.477em; - } - 5%, - 95% { - box-shadow: 0 -0.83em 0 -0.4em, 0 -0.83em 0 -0.42em, 0 -0.83em 0 -0.44em, 0 -0.83em 0 -0.46em, 0 -0.83em 0 -0.477em; - } - 10%, - 59% { - box-shadow: 0 -0.83em 0 -0.4em, -0.087em -0.825em 0 -0.42em, -0.173em -0.812em 0 -0.44em, -0.256em -0.789em 0 -0.46em, -0.297em -0.775em 0 -0.477em; - } - 20% { - box-shadow: 0 -0.83em 0 -0.4em, -0.338em -0.758em 0 -0.42em, -0.555em -0.617em 0 -0.44em, -0.671em -0.488em 0 -0.46em, -0.749em -0.34em 0 -0.477em; - } - 38% { - box-shadow: 0 -0.83em 0 -0.4em, -0.377em -0.74em 0 -0.42em, -0.645em -0.522em 0 -0.44em, -0.775em -0.297em 0 -0.46em, -0.82em -0.09em 0 -0.477em; - } - 100% { - box-shadow: 0 -0.83em 0 -0.4em, 0 -0.83em 0 -0.42em, 0 -0.83em 0 -0.44em, 0 -0.83em 0 -0.46em, 0 -0.83em 0 -0.477em; - } - } - @keyframes load6 { - 0% { - box-shadow: 0 -0.83em 0 -0.4em, 0 -0.83em 0 -0.42em, 0 -0.83em 0 -0.44em, 0 -0.83em 0 -0.46em, 0 -0.83em 0 -0.477em; - } - 5%, - 95% { - box-shadow: 0 -0.83em 0 -0.4em, 0 -0.83em 0 -0.42em, 0 -0.83em 0 -0.44em, 0 -0.83em 0 -0.46em, 0 -0.83em 0 -0.477em; - } - 10%, - 59% { - box-shadow: 0 -0.83em 0 -0.4em, -0.087em -0.825em 0 -0.42em, -0.173em -0.812em 0 -0.44em, -0.256em -0.789em 0 -0.46em, -0.297em -0.775em 0 -0.477em; - } - 20% { - box-shadow: 0 -0.83em 0 -0.4em, -0.338em -0.758em 0 -0.42em, -0.555em -0.617em 0 -0.44em, -0.671em -0.488em 0 -0.46em, -0.749em -0.34em 0 -0.477em; - } - 38% { - box-shadow: 0 -0.83em 0 -0.4em, -0.377em -0.74em 0 -0.42em, -0.645em -0.522em 0 -0.44em, -0.775em -0.297em 0 -0.46em, -0.82em -0.09em 0 -0.477em; - } - 100% { - box-shadow: 0 -0.83em 0 -0.4em, 0 -0.83em 0 -0.42em, 0 -0.83em 0 -0.44em, 0 -0.83em 0 -0.46em, 0 -0.83em 0 -0.477em; - } - } - @-webkit-keyframes round { - 0% { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } - 100% { - -webkit-transform: rotate(360deg); - transform: rotate(360deg); - } - } - @keyframes round { - 0% { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } - 100% { - -webkit-transform: rotate(360deg); - transform: rotate(360deg); - } - } - \ No newline at end of file diff --git a/dashboard/src/app/pages/limits/gcp/gcp.component.html b/dashboard/src/app/pages/limits/gcp/gcp.component.html deleted file mode 100644 index dd886ebc3..000000000 --- a/dashboard/src/app/pages/limits/gcp/gcp.component.html +++ /dev/null @@ -1,28 +0,0 @@ -
-
-
-
-
Loading...
-
-
-
-
-
-
-
-
- -
-
-
-
-

{{fixLabel(limit.metric)}}

-

{{limit.usage}}/{{limit.limit}}

-
-
-
-
-
-
-
-
\ No newline at end of file diff --git a/dashboard/src/app/pages/limits/gcp/gcp.component.spec.ts b/dashboard/src/app/pages/limits/gcp/gcp.component.spec.ts deleted file mode 100644 index 01144960a..000000000 --- a/dashboard/src/app/pages/limits/gcp/gcp.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; - -import { GcpComponent } from './gcp.component'; - -describe('GcpComponent', () => { - let component: GcpComponent; - let fixture: ComponentFixture; - - beforeEach(waitForAsync(() => { - TestBed.configureTestingModule({ - declarations: [ GcpComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(GcpComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/dashboard/src/app/pages/limits/gcp/gcp.component.ts b/dashboard/src/app/pages/limits/gcp/gcp.component.ts deleted file mode 100644 index 2d0bd0d58..000000000 --- a/dashboard/src/app/pages/limits/gcp/gcp.component.ts +++ /dev/null @@ -1,95 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { GcpService } from '../../../services/gcp.service'; - -@Component({ - selector: 'gcp-limits', - templateUrl: './gcp.component.html', - styleUrls: ['./gcp.component.css'] -}) -export class GcpLimitsComponent implements OnInit { - public limits: Array = []; - public loadingServiceLimits: boolean = true; - - constructor(private gcpService: GcpService) { - this.gcpService.getQuotas().subscribe(data => { - this.limits = data; - this.loadingServiceLimits = false; - }, err => { - this.limits = []; - this.loadingServiceLimits = false; - }); - } - - public fixLabel(label) { - let value = label.toLowerCase().split('_').join(' '); - let data = []; - value.split(' ').forEach(part => { - data.push(part.charAt(0).toUpperCase() + part.slice(1)); - }) - return data.join(' '); - } - - public getServiceLogo(name: string) { - if (name.indexOf('Snapshots') != -1) { - return 'https://cdn.komiser.io/images/services/gcp/white/disk.png'; - } - else if (name.indexOf('Ssl') != -1) { - return 'https://cdn.komiser.io/images/services/gcp/white/ssl.png'; - } - else if (name.indexOf('Firewalls') != -1) { - return 'https://cdn.komiser.io/images/services/gcp/white/firewalls.png'; - } - else if (name.indexOf('Networks') != -1) { - return 'https://cdn.komiser.io/images/services/gcp/white/network.png'; - } - else if (name.indexOf('Routes') != -1) { - return 'https://cdn.komiser.io/images/services/gcp/white/routes.png'; - } - else if (name.indexOf('Buckets') != -1) { - return 'https://cdn.komiser.io/images/services/gcp/white/compute.png'; - } - else if (name.indexOf('Services') != -1) { - return 'https://cdn.komiser.io/images/services/gcp/white/bucket.png'; - } - else if (name.indexOf('Images') != -1) { - return 'https://cdn.komiser.io/images/services/gcp/white/os.png'; - } - else if (name.indexOf('Instances') != -1) { - return 'https://cdn.komiser.io/images/services/gcp/white/compute.png'; - } - else if (name.indexOf('Router') != -1) { - return 'https://cdn.komiser.io/images/services/gcp/white/router.png'; - } - else if (name.indexOf('Vpn') != -1) { - return 'https://cdn.komiser.io/images/services/gcp/white/vpn.png'; - } - else if (name.indexOf('Https') != -1) { - return 'https://cdn.komiser.io/images/services/gcp/white/https.png'; - } - else if (name.indexOf('Security') != -1) { - return 'https://cdn.komiser.io/images/services/gcp/white/security.png'; - } - else if (name.indexOf('Addresses') != -1) { - return 'https://cdn.komiser.io/images/services/gcp/white/ip.png'; - } - else if (name.indexOf('Health Checks') != -1) { - return 'https://cdn.komiser.io/images/services/gcp/white/healthcheck.png'; - } else { - return 'https://cdn.komiser.io/images/services/gcp/white/gcp.png'; - } - } - - public getColor(quota) { - if (quota.limit == quota.usage) { - return 'card card-stats card-danger'; - } else if (quota.limit > quota.usage && quota.usage > 0) { - return 'card card-stats card-warning'; - } else { - return 'card card-stats card-success'; - } - } - - ngOnInit() { - } - -} diff --git a/dashboard/src/app/pages/limits/limits.component.css b/dashboard/src/app/pages/limits/limits.component.css deleted file mode 100644 index e69de29bb..000000000 diff --git a/dashboard/src/app/pages/limits/limits.component.html b/dashboard/src/app/pages/limits/limits.component.html deleted file mode 100644 index a97dacc6a..000000000 --- a/dashboard/src/app/pages/limits/limits.component.html +++ /dev/null @@ -1,10 +0,0 @@ -
-
-

Service Limits Checks

- - - - - - -
\ No newline at end of file diff --git a/dashboard/src/app/pages/limits/limits.component.spec.ts b/dashboard/src/app/pages/limits/limits.component.spec.ts deleted file mode 100644 index b930ed9a4..000000000 --- a/dashboard/src/app/pages/limits/limits.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; - -import { LimitsComponent } from './limits.component'; - -describe('LimitsComponent', () => { - let component: LimitsComponent; - let fixture: ComponentFixture; - - beforeEach(waitForAsync(() => { - TestBed.configureTestingModule({ - declarations: [ LimitsComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(LimitsComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/dashboard/src/app/pages/limits/limits.component.ts b/dashboard/src/app/pages/limits/limits.component.ts deleted file mode 100644 index a1ea1de63..000000000 --- a/dashboard/src/app/pages/limits/limits.component.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { Component, OnInit, OnDestroy } from '@angular/core'; -import { StoreService } from '../../services/store.service'; -import { Subscription } from 'rxjs'; - -@Component({ - selector: 'app-limits', - templateUrl: './limits.component.html', - styleUrls: ['./limits.component.css'] -}) -export class LimitsComponent implements OnInit { - public provider: string; - public _subscription: Subscription; - - ngOnDestroy() { - this._subscription.unsubscribe(); - } - - constructor(private storeService: StoreService) { - this.provider = this.storeService.getProvider(); - this._subscription = this.storeService.providerChanged.subscribe(provider => { - this.provider = provider; - }); - } - - ngOnInit() { - } - -} - diff --git a/dashboard/src/app/pages/limits/ovh/ovh.component.css b/dashboard/src/app/pages/limits/ovh/ovh.component.css deleted file mode 100644 index 920418965..000000000 --- a/dashboard/src/app/pages/limits/ovh/ovh.component.css +++ /dev/null @@ -1,102 +0,0 @@ -.flag-icon{ - width: 25px; - margin-right: 10px; -} -.gcp-logo { - width: 40px !important; - padding-bottom: 10px !important; -} - -.card-warning{ - background: #FBAD4B; -} - -.spinner{ - padding-top: 200px; -} - -.card-success { - background: #4BC0C0; -} - -.loader { - color: #000000; - font-size: 90px; - text-indent: -9999em; - overflow: hidden; - width: 1em; - height: 1em; - border-radius: 50%; - margin: 72px auto; - position: relative; - -webkit-transform: translateZ(0); - -ms-transform: translateZ(0); - transform: translateZ(0); - -webkit-animation: load6 1.7s infinite ease, round 1.7s infinite ease; - animation: load6 1.7s infinite ease, round 1.7s infinite ease; - } - @-webkit-keyframes load6 { - 0% { - box-shadow: 0 -0.83em 0 -0.4em, 0 -0.83em 0 -0.42em, 0 -0.83em 0 -0.44em, 0 -0.83em 0 -0.46em, 0 -0.83em 0 -0.477em; - } - 5%, - 95% { - box-shadow: 0 -0.83em 0 -0.4em, 0 -0.83em 0 -0.42em, 0 -0.83em 0 -0.44em, 0 -0.83em 0 -0.46em, 0 -0.83em 0 -0.477em; - } - 10%, - 59% { - box-shadow: 0 -0.83em 0 -0.4em, -0.087em -0.825em 0 -0.42em, -0.173em -0.812em 0 -0.44em, -0.256em -0.789em 0 -0.46em, -0.297em -0.775em 0 -0.477em; - } - 20% { - box-shadow: 0 -0.83em 0 -0.4em, -0.338em -0.758em 0 -0.42em, -0.555em -0.617em 0 -0.44em, -0.671em -0.488em 0 -0.46em, -0.749em -0.34em 0 -0.477em; - } - 38% { - box-shadow: 0 -0.83em 0 -0.4em, -0.377em -0.74em 0 -0.42em, -0.645em -0.522em 0 -0.44em, -0.775em -0.297em 0 -0.46em, -0.82em -0.09em 0 -0.477em; - } - 100% { - box-shadow: 0 -0.83em 0 -0.4em, 0 -0.83em 0 -0.42em, 0 -0.83em 0 -0.44em, 0 -0.83em 0 -0.46em, 0 -0.83em 0 -0.477em; - } - } - @keyframes load6 { - 0% { - box-shadow: 0 -0.83em 0 -0.4em, 0 -0.83em 0 -0.42em, 0 -0.83em 0 -0.44em, 0 -0.83em 0 -0.46em, 0 -0.83em 0 -0.477em; - } - 5%, - 95% { - box-shadow: 0 -0.83em 0 -0.4em, 0 -0.83em 0 -0.42em, 0 -0.83em 0 -0.44em, 0 -0.83em 0 -0.46em, 0 -0.83em 0 -0.477em; - } - 10%, - 59% { - box-shadow: 0 -0.83em 0 -0.4em, -0.087em -0.825em 0 -0.42em, -0.173em -0.812em 0 -0.44em, -0.256em -0.789em 0 -0.46em, -0.297em -0.775em 0 -0.477em; - } - 20% { - box-shadow: 0 -0.83em 0 -0.4em, -0.338em -0.758em 0 -0.42em, -0.555em -0.617em 0 -0.44em, -0.671em -0.488em 0 -0.46em, -0.749em -0.34em 0 -0.477em; - } - 38% { - box-shadow: 0 -0.83em 0 -0.4em, -0.377em -0.74em 0 -0.42em, -0.645em -0.522em 0 -0.44em, -0.775em -0.297em 0 -0.46em, -0.82em -0.09em 0 -0.477em; - } - 100% { - box-shadow: 0 -0.83em 0 -0.4em, 0 -0.83em 0 -0.42em, 0 -0.83em 0 -0.44em, 0 -0.83em 0 -0.46em, 0 -0.83em 0 -0.477em; - } - } - @-webkit-keyframes round { - 0% { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } - 100% { - -webkit-transform: rotate(360deg); - transform: rotate(360deg); - } - } - @keyframes round { - 0% { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } - 100% { - -webkit-transform: rotate(360deg); - transform: rotate(360deg); - } - } - \ No newline at end of file diff --git a/dashboard/src/app/pages/limits/ovh/ovh.component.html b/dashboard/src/app/pages/limits/ovh/ovh.component.html deleted file mode 100644 index fd26c363e..000000000 --- a/dashboard/src/app/pages/limits/ovh/ovh.component.html +++ /dev/null @@ -1,41 +0,0 @@ -
-
-
-
-
Loading...
-
-
-
-
-
-

Current limits

-

The resources for your cloud project are limited, so that you can control your resource consumption

-
-
- - - - - - - - - - - - - - - - - -
RegionInstancesVolumesSSH Keys
- - {{limit.region}} - - {{limit.instance.usedInstances}} / {{limit.instance.maxInstances}}{{limit.volume.usedGigabytes}} / {{limit.volume.maxGigabytes}}{{limit.keypair.maxCount}}
-
-
-
-
-
\ No newline at end of file diff --git a/dashboard/src/app/pages/limits/ovh/ovh.component.spec.ts b/dashboard/src/app/pages/limits/ovh/ovh.component.spec.ts deleted file mode 100644 index 3eaa4cfd0..000000000 --- a/dashboard/src/app/pages/limits/ovh/ovh.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; - -import { OvhComponent } from './ovh.component'; - -describe('OvhComponent', () => { - let component: OvhComponent; - let fixture: ComponentFixture; - - beforeEach(waitForAsync(() => { - TestBed.configureTestingModule({ - declarations: [ OvhComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(OvhComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/dashboard/src/app/pages/limits/ovh/ovh.component.ts b/dashboard/src/app/pages/limits/ovh/ovh.component.ts deleted file mode 100644 index 735f61cd1..000000000 --- a/dashboard/src/app/pages/limits/ovh/ovh.component.ts +++ /dev/null @@ -1,56 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { OvhService } from '../../../services/ovh.service'; -@Component({ - selector: 'ovh-limits', - templateUrl: './ovh.component.html', - styleUrls: ['./ovh.component.css'] -}) -export class OvhLimitsComponent implements OnInit { - - public limits: Array = new Array(); - public loadingServiceLimits: boolean = true; - - constructor(private ovhService: OvhService) { - this.ovhService.getLimits().subscribe(data => { - this.limits = data; - data.forEach(item => { - item.volume.usedGigabytes = this.bytesToSizeWithUnit(item.volume.usedGigabytes * 1024 * 1024 * 1024); - item.volume.maxGigabytes = this.bytesToSizeWithUnit(item.volume.maxGigabytes * 1024 * 1024 * 1024); - }); - this.loadingServiceLimits = false; - }, err => { - this.loadingServiceLimits = false; - this.limits = []; - }) - } - - public getFlagIcon(region) { - switch (region) { - case 'SBG5': - return 'https://cdn.komiser.io/images/flags/france.png'; - case 'BHS5': - return 'https://cdn.komiser.io/images/flags/canada.png'; - case 'GRA5': - return 'https://cdn.komiser.io/images/flags/france.png'; - case 'WAW1': - return 'https://cdn.komiser.io/images/flags/poland.png'; - case 'DE1': - return 'https://cdn.komiser.io/images/flags/germany.png'; - case 'UK1': - return 'https://cdn.komiser.io/images/flags/uk.png'; - default: - return 'https://cdn.komiser.io/images/flags/france.png'; - } - } - - private bytesToSizeWithUnit(bytes) { - var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB']; - if (bytes == 0) return '0 Byte'; - var i = parseInt(Math.floor(Math.log(bytes) / Math.log(1024)).toString()); - return Math.round(bytes / Math.pow(1024, i)) + ' ' + sizes[i]; - }; - - ngOnInit() { - } - -} diff --git a/dashboard/src/environments/environment.ts b/dashboard/src/environments/environment.ts index 931a57847..e76a9fe06 100644 --- a/dashboard/src/environments/environment.ts +++ b/dashboard/src/environments/environment.ts @@ -1,9 +1,4 @@ -// The file contents for the current environment will overwrite these during build. -// The build system defaults to the dev environment which uses `environment.ts`, but if you do -// `ng build --env=prod` then `environment.prod.ts` will be used instead. -// The list of which env maps to which file can be found in `.angular-cli.json`. - export const environment = { production: true, apiUrl: '' -}; \ No newline at end of file +};