فهرست منبع

deleted dummy files

onunez 6 سال پیش
والد
کامیت
e26b83f6f7

+ 0 - 2
src/app/components/assets/assets.component.ts

@@ -4,7 +4,6 @@ import { Label, BaseChartDirective } from 'ng2-charts';
 
 import { MeasuresService } from 'src/app/services/measures.service';
 import { PlantsService } from 'src/app/services/plants.service';
-import { AssetsService } from 'src/app/services/assets/assets.service';
 import { LogsService } from 'src/app/services/logs.service';
 
 import { OrganizationsService } from '@app/services/organizations.service';
@@ -67,7 +66,6 @@ export class AssetsComponent implements OnInit {
     private orgService: OrganizationsService, 
     private route: ActivatedRoute, 
     private plantsService: PlantsService,
-    private assetService: AssetsService,
     private http: HttpClient,
     private logsService: LogsService,
     private measService: MeasuresService) {

+ 1 - 3
src/app/components/dashboard/dashboard.component.html

@@ -11,7 +11,7 @@
             <h4 class="font-weight-normal mb-3">Total de plantas instaladas
               <i class="mdi mdi-chart-line mdi-24px float-right"></i>
             </h4>
-            <h2 class="mb-3">30</h2>
+            <h2 class="mb-3">1</h2>
           </div>
         </div>
       </div>
@@ -30,8 +30,6 @@
   
     </div>
     
-    <br>
-
     <div class="row ">
       <div *ngIf="error; then showAlert"></div>
       <ng-template #showAlert>

+ 0 - 59
src/app/services/assets/assets.service.ts

@@ -1,59 +0,0 @@
-import { Injectable } from '@angular/core';
-import { Organization } from '../../models/organization';
-import { Plant } from '../../models/plant';
-
-import { of as observableOf, Observable, throwError } from 'rxjs';
-import { HttpClient, HttpHeaders } from '@angular/common/http';
-import { retry, catchError, map, timeout } from 'rxjs/operators';
-
-import { environment } from '@environments/environment';
-
-@Injectable({
-  providedIn: 'root'
-})
-export class AssetsService {
-
-  time:number = 10000;
-
-  constructor(private http: HttpClient) {
-  }
-
-  getAssets() {
-    return this.http.get(`${environment.api2Url}/users/api_v1/movies`)
-    .pipe(
-      timeout(this.time),
-      map(response =>{
-        console.log(response);
-        return response;
-      }),
-      catchError(this.errorHandl)
-    )
-  }
-  
-  getAssetsId() {
-    return this.http.get(`${environment.api2Url}/users/api_v1/movies/1`)
-    .pipe(
-      timeout(this.time),
-      map(response =>{
-        console.log(response);
-        return response;
-      }),
-      catchError(this.errorHandl)
-    )
-  }
-  
-
-  errorHandl(error) {
-    let errorMessage = '';
-    if(error.error instanceof ErrorEvent) {
-      // Get client-side error
-      errorMessage = error.error.message;
-    } else {
-      // Get server-side error
-      errorMessage = `Error Code: ${error.status}\nMessage: ${error.message}`;
-    }
-    console.log(error);
-    return throwError(errorMessage);
- }
-
-}

+ 0 - 1
src/environments/environment.ts

@@ -6,7 +6,6 @@ export const environment = {
     production: false,
     apiUrl: 'http://192.168.98.140:8000',
     appID: '55899b9ea53834f2736b65a3582b734b',
-    api2Url: 'https://space-movie-rental-store.herokuapp.com',
     gKey: '',
     config: {
       apiKey: '',