Skip to content

Commit

Permalink
Drop filagg
Browse files Browse the repository at this point in the history
  • Loading branch information
eatonphil committed Nov 10, 2023
1 parent 520407a commit 126b910
Show file tree
Hide file tree
Showing 14 changed files with 5 additions and 960 deletions.
189 changes: 0 additions & 189 deletions desktop/panel/filagg.test.js

This file was deleted.

2 changes: 0 additions & 2 deletions desktop/store.ts
Expand Up @@ -12,7 +12,6 @@ import {
DatabasePanelInfo,
Encrypt,
FilePanelInfo,
FilterAggregatePanelInfo,
GraphPanelInfo,
HTTPPanelInfo,
LiteralPanelInfo,
Expand Down Expand Up @@ -122,7 +121,6 @@ const FACTORIES: Record<PanelInfoType, (pageId: string) => PanelInfo> = {
literal: (pageId: string) => new LiteralPanelInfo(pageId),
database: (pageId: string) => new DatabasePanelInfo(pageId),
file: (pageId: string) => new FilePanelInfo(pageId),
filagg: (pageId: string) => new FilterAggregatePanelInfo(pageId),
};

// SOURCE: https://www.sqlite.org/fileformat.html
Expand Down
1 change: 1 addition & 0 deletions integration/mongo.test.js
@@ -1,3 +1,4 @@
// TODO: Support mongo.
if (false) {
const cp = require('child_process');
const fs = require('fs');
Expand Down
1 change: 1 addition & 0 deletions integration/oracle.test.js
@@ -1,3 +1,4 @@
// TODO: Support Oracle
if (false) {
const { basicDatabaseTest } = require('../desktop/panel/testutil');
const { withDocker, DEFAULT_TIMEOUT } = require('./docker');
Expand Down
1 change: 1 addition & 0 deletions integration/sqlserver.test.js
@@ -1,3 +1,4 @@
// TODO: Support SQL Server
if (false) {
const { basicDatabaseTest } = require('../desktop/panel/testutil');
const { withDocker } = require('./docker');
Expand Down
1 change: 0 additions & 1 deletion package.json
Expand Up @@ -33,7 +33,6 @@
"chart.js": "^4.3.0",
"cookie-parser": "^1.4.6",
"core-js": "^3.31.0",
"date-fns": "^2.30.0",
"express": "^4.18.2",
"express-session": "^1.17.3",
"js-yaml": "^4.1.0",
Expand Down
3 changes: 0 additions & 3 deletions runner/eval.go
Expand Up @@ -216,9 +216,6 @@ func (ec EvalContext) Eval(projectId, panelId string) (error, string) {
case DatabasePanel:
Logln("Evaling database panel: " + panel.Name)
return ec.EvalDatabasePanel(project, pageIndex, panel, nil, *DefaultCacheSettings), ""
case FilaggPanel:
Logln("Evaling filagg panel: " + panel.Name)
return ec.evalFilaggPanel(project, pageIndex, panel), ""
case TablePanel:
Logln("Evaling table panel: " + panel.Name)
return ec.evalTablePanel(project, pageIndex, panel), ""
Expand Down
28 changes: 0 additions & 28 deletions runner/state.go
@@ -1,7 +1,6 @@
package runner

import (
"fmt"
"time"
)

Expand Down Expand Up @@ -54,7 +53,6 @@ const (
ProgramPanel = "program"
LiteralPanel = "literal"
FilePanel = "file"
FilaggPanel = "filagg"
DatabasePanel = "database"
GraphPanel = "graph"
TablePanel = "table"
Expand All @@ -75,7 +73,6 @@ type PanelInfo struct {
*LiteralPanelInfo
*DatabasePanelInfo
*HttpPanelInfo
*FilaggPanelInfo
*TablePanelInfo
*GraphPanelInfo
}
Expand Down Expand Up @@ -190,31 +187,6 @@ const (
MaxAggregate AggregateType = "max"
)

type FilaggPanelInfoFilagg struct {
PanelSource any `json:"panelSource"`
Filter string `json:"filter"`
Range TimeSeriesRange `json:"range"`
AggregateType AggregateType `json:"aggregateType"`
GroupBy string `json:"groupBy"`
AggregateOn string `json:"aggregateOn"`
SortOn string `json:"sortOn"`
SortAsc bool `json:"sortAsc"`
WindowInterval string `json:"windowInterval"`
Limit int `json:"limit"`
}

func (fpif FilaggPanelInfoFilagg) GetPanelSource() string {
if s, ok := fpif.PanelSource.(string); ok {
return s
}

return fmt.Sprintf("%v", fpif.PanelSource)
}

type FilaggPanelInfo struct {
Filagg FilaggPanelInfoFilagg `json:"filagg"`
}

type DatabasePanelInfoDatabase struct {
ConnectorId string `json:"connectorId" db:"connectorId"`
Range TimeSeriesRange `json:"range" db:"range"`
Expand Down

0 comments on commit 126b910

Please sign in to comment.