ngOnInit()

in angular/src/app/stage/namespace-details/namespace-details.component.ts [33:62]


  ngOnInit() {
    this.namespaceCode = this.activatedRoute.snapshot.params['namespace'];
    let stageCode = this.activatedRoute.snapshot.params['stage'];
    this.stageService.list().subscribe(
      (res: any) => {
        let stage = res.find(c => c.code === stageCode);
        this.stageCode = stage.code;
        this.stageEndpoint = stage.endpoint;
        this.getEntityInfo();
        this.getEntityUsage();
    
        let options = new JsonEditorOptions();
        options.modes = ['code']
        options.mode = 'code';
        options.enableTransform = false;
        options.enableSort = false;
        options.search = false;
        options.mainMenuBar = false;
    
        this.schemaResourceOptions = options;
        this.schemaMetadataOptions = options;
    
        this.getSchemaResource();
        this.getSchemaMetadata();
      },
      (err: any) => {
        this.formHelperService.showError('Errors.GenericError', null);
      }
    );    
  }