import { Component, OnInit } from '@angular/core';
import {FramePageComponent} from '../../core/FramePageComponent';
import {FrameResDetailComponent} from '../frame-res-detail/frame-res-detail.component';
import {BsModalService} from 'ngx-bootstrap';
import {FrameResTreeComponent} from '../frame-res-tree/frame-res-tree.component';
import {AjaxService} from '../../../../core/ajax/ajax.service';


@Component({
  selector: 'app-frame-res-page',
  templateUrl: './frame-res-page.component.html',
  styleUrls: ['./frame-res-page.component.scss']
})
export class FrameResPageComponent extends FramePageComponent implements OnInit {

  constructor(private modalService: BsModalService) {
    super(modalService);
    this.modalComponent = FrameResDetailComponent;
  }

  ngOnInit() {
  }

  showResTree(param) {
    this.showComponentModal(FrameResTreeComponent, param);
  }

  testThread() {
    AjaxService.request('frame/thread/test.htm', {}, (data) => {
      this.showThreadRunning(data.entity);
    });
  }
}
