import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, ParamMap } from "@angular/router";
import { switchMap } from "rxjs/operators";
import { Server } from "../../../../server";
import { ServerModel } from "../../../../models/atlasData/server.model";

@Component({
  selector: 'app-server',
  templateUrl: './server.component.html'
})
export class ServerComponent implements OnInit {
  private cell: ServerModel;

  constructor(private server: Server, private route: ActivatedRoute) {
  }

  ngOnInit() {
    let index = this.route.snapshot.paramMap.get('index');
    this.cell = this.server.serverGrid.servers[index];
  }

}
