Skip to content

Commit

Permalink
Revert "Refactor table into a component"
Browse files Browse the repository at this point in the history
  • Loading branch information
mansurpasha committed Apr 29, 2020
1 parent 86a2305 commit 5cd671d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 29 deletions.
18 changes: 16 additions & 2 deletions src/components/resourceTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { getStackResources } from "../services/stackResources";
import { lambdaStatisticsModal } from "../modals/lambdaStatisticsModal";
import { lambdaInvokeModal } from "../modals/lambdaInvokeModal";
import { padString } from "../utils/padString";
import { Table } from "../components/table";

const contrib = require("blessed-contrib");
const open = require("open");
Expand All @@ -34,7 +33,7 @@ class resourceTable {
this.latestLambdaFunctionsUpdateTimestamp = -1;
this.program = program;
this.cloudformation = cloudformation;
this.table = new Table(application).table;
this.table = this.generateLambdaTable();
this.funcName = null;
this.fullFuncName = null;
this.table.rows.on("select", (item) => {
Expand Down Expand Up @@ -157,6 +156,21 @@ class resourceTable {
return this.updateData();
}

generateLambdaTable() {
return this.application.layoutGrid.set(0, 6, 4, 6, contrib.table, {
keys: true,
fg: "green",
label: "<- Lambda Functions ->",
columnSpacing: 1,
columnWidth: [35, 40, 10, 10, 20],
style: {
border: {
fg: "yellow",
},
},
});
}

getCurrentlyOnHoverLambdaName() {
const onHoverRow = this.table.rows.selected;
const [onHoverLambdaName] = this.table.rows.items[onHoverRow].data;
Expand Down
27 changes: 0 additions & 27 deletions src/components/table.js

This file was deleted.

0 comments on commit 5cd671d

Please sign in to comment.