Skip to content

Commit ac915dd

Browse files
authored
Merge pull request #85 from sigmacomputing/dashboard_builder_QS
plugin_dashboard_builder
2 parents 8e2febd + 7e6a737 commit ac915dd

35 files changed

Lines changed: 11018 additions & 0 deletions

dashboard_builder/LICENSE

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
2+
Copyright 2025 Sigma Computing
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.

dashboard_builder/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# dashboard_builder
2+
3+
This is a plugin to implement the dashboard builder use case.
4+
5+
## Disclaimer
6+
7+
**Important Notice:**
8+
9+
This software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.
10+
11+
This project is intended for educational/informational purposes only. Use of this code is at your own risk.

dashboard_builder/angular.json

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
{
2+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3+
"version": 1,
4+
"newProjectRoot": "projects",
5+
"projects": {
6+
"dashboard-builder": {
7+
"projectType": "application",
8+
"schematics": {
9+
"@schematics/angular:component": {
10+
"style": "scss"
11+
}
12+
},
13+
"root": "",
14+
"sourceRoot": "src",
15+
"prefix": "app",
16+
"architect": {
17+
"build": {
18+
"builder": "@angular-devkit/build-angular:browser",
19+
"options": {
20+
"outputPath": "dist/dashboard-builder",
21+
"index": "src/index.html",
22+
"main": "src/main.ts",
23+
"polyfills": [
24+
"zone.js"
25+
],
26+
"tsConfig": "tsconfig.app.json",
27+
"inlineStyleLanguage": "scss",
28+
"assets": [
29+
"src/favicon.ico",
30+
"src/assets"
31+
],
32+
"styles": [
33+
"src/styles.scss"
34+
]
35+
},
36+
"configurations": {
37+
"production": {
38+
"budgets": [
39+
{
40+
"type": "initial",
41+
"maximumWarning": "5mb",
42+
"maximumError": "10mb"
43+
},
44+
{
45+
"type": "anyComponentStyle",
46+
"maximumWarning": "5mb",
47+
"maximumError": "10mb"
48+
}
49+
],
50+
"fileReplacements": [
51+
{
52+
"replace": "src/environments/environment.ts",
53+
"with": "src/environments/environment.prod.ts"
54+
}
55+
],
56+
"outputHashing": "all",
57+
"baseHref": "/dashboard-builder/",
58+
"deployUrl": ""
59+
},
60+
"development": {
61+
"buildOptimizer": false,
62+
"optimization": false,
63+
"vendorChunk": true,
64+
"extractLicenses": false,
65+
"sourceMap": true,
66+
"namedChunks": true
67+
}
68+
},
69+
"defaultConfiguration": "production"
70+
},
71+
"serve": {
72+
"builder": "@angular-devkit/build-angular:dev-server",
73+
"configurations": {
74+
"production": {
75+
"buildTarget": "dashboard-builder:build:production"
76+
},
77+
"development": {
78+
"buildTarget": "dashboard-builder:build:development"
79+
}
80+
},
81+
"defaultConfiguration": "development"
82+
},
83+
"extract-i18n": {
84+
"builder": "@angular-devkit/build-angular:extract-i18n",
85+
"options": {
86+
"buildTarget": "dashboard-builder:build"
87+
}
88+
},
89+
"test": {
90+
"builder": "@angular-devkit/build-angular:karma",
91+
"options": {
92+
"polyfills": [
93+
"zone.js",
94+
"zone.js/testing"
95+
],
96+
"tsConfig": "tsconfig.spec.json",
97+
"karmaConfig": "karma.conf.js",
98+
"inlineStyleLanguage": "scss",
99+
"assets": [
100+
"src/favicon.ico",
101+
"src/assets"
102+
],
103+
"styles": [
104+
"src/styles.scss"
105+
],
106+
"scripts": []
107+
}
108+
}
109+
}
110+
}
111+
}
112+
}

dashboard_builder/package.json

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
"name": "dashboard-builder",
3+
"version": "1.0.0",
4+
"scripts": {
5+
"ng": "ng",
6+
"start": "ng serve",
7+
"build": "ng build",
8+
"build:prod": "ng build --configuration production",
9+
"watch": "ng build --watch --configuration development",
10+
"test": "ng test",
11+
"lint": "ng lint"
12+
},
13+
"private": true,
14+
"dependencies": {
15+
"@angular/animations": "^20.1.0",
16+
"@angular/cdk": "^20.1.0",
17+
"@angular/common": "^20.1.0",
18+
"@angular/compiler": "^20.1.0",
19+
"@angular/core": "^20.1.0",
20+
"@angular/forms": "^20.1.0",
21+
"@angular/platform-browser": "^20.1.0",
22+
"@angular/platform-browser-dynamic": "^20.1.0",
23+
"@angular/router": "^20.1.0",
24+
"@primeng/themes": "^20.0.1",
25+
"@sigmacomputing/plugin": "^1.0.6",
26+
"primeflex": "^4.0.0",
27+
"primeicons": "^7.0.0",
28+
"primeng": "^20.0.1",
29+
"quill": "^1.3.7",
30+
"rxjs": "~7.8.0",
31+
"tslib": "^2.3.0",
32+
"zone.js": "~0.15.0"
33+
},
34+
"devDependencies": {
35+
"@angular-devkit/build-angular": "^20.1.4",
36+
"@angular/build": "^20.1.4",
37+
"@angular/cli": "^20.1.4",
38+
"@angular/compiler-cli": "^20.1.0",
39+
"@types/jasmine": "~5.1.0",
40+
"@types/react": "^19.1.4",
41+
"jasmine-core": "~5.8.0",
42+
"karma": "~6.4.0",
43+
"karma-chrome-launcher": "~3.2.0",
44+
"karma-coverage": "~2.2.0",
45+
"karma-jasmine": "~5.1.0",
46+
"karma-jasmine-html-reporter": "~2.1.0",
47+
"typescript": "~5.8.2"
48+
}
49+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<router-outlet></router-outlet>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/* tslint:disable:no-unused-variable */
2+
3+
import { TestBed, async } from '@angular/core/testing';
4+
import { RouterTestingModule } from '@angular/router/testing';
5+
import { AppComponent } from './app.component';
6+
7+
describe('AppComponent', () => {
8+
beforeEach(() => {
9+
TestBed.configureTestingModule({
10+
imports: [ RouterTestingModule ],
11+
declarations: [ AppComponent ]
12+
});
13+
TestBed.compileComponents();
14+
});
15+
16+
it('should create the app', async(() => {
17+
const fixture = TestBed.createComponent(AppComponent);
18+
const app = fixture.debugElement.componentInstance;
19+
expect(app).toBeTruthy();
20+
}));
21+
});
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { Component, OnInit } from '@angular/core';
2+
import { RouterOutlet } from '@angular/router';
3+
4+
@Component({
5+
selector: 'app-root',
6+
templateUrl: './app.component.html',
7+
standalone: true,
8+
imports: [RouterOutlet]
9+
})
10+
export class AppComponent implements OnInit {
11+
12+
constructor() {}
13+
14+
ngOnInit(): void {}
15+
16+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core';
2+
import { provideRouter } from '@angular/router';
3+
import { provideHttpClient } from '@angular/common/http';
4+
import { LocationStrategy, PathLocationStrategy } from '@angular/common';
5+
6+
import { providePrimeNG } from 'primeng/config';
7+
import Aura from '@primeuix/themes/aura';
8+
import { definePreset } from '@primeuix/themes';
9+
10+
import { routes } from './app.routes';
11+
12+
const SigmaPreset = definePreset(Aura, {
13+
semantic: {
14+
colorScheme: {
15+
light: {
16+
surface: {
17+
200: 'rgba(255, 201, 100, 0.7)'
18+
}
19+
}
20+
}
21+
}
22+
});
23+
24+
export const appConfig: ApplicationConfig = {
25+
providers: [
26+
provideZoneChangeDetection({ eventCoalescing: true }),
27+
provideRouter(routes),
28+
provideHttpClient(),
29+
{ provide: LocationStrategy, useClass: PathLocationStrategy },
30+
providePrimeNG({ theme: { preset: SigmaPreset } })
31+
]
32+
};
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { Routes } from '@angular/router';
2+
3+
export const routes: Routes = [
4+
{
5+
path: '',
6+
loadComponent: () => import('./main/main.component').then(m => m.MainComponent)
7+
}
8+
];
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
.iframe-container {
2+
position: relative;
3+
height: 0px; /* Default height when loading */
4+
}
5+
6+
.iframe-container-loaded {
7+
height: 100% !important; /* Height when loaded */
8+
}
9+
10+
.iframe-container-loading {
11+
height: 0px !important; /* Explicit height when loading */
12+
}
13+
14+
.sigma-iframe {
15+
top: 0px;
16+
width: 100%;
17+
height: 100%;
18+
background: #FAF8FA;
19+
}
20+
21+
.sigma-loader {
22+
height: 100%;
23+
}
24+
25+
/* override skeleton animation when vizUrlControlValue is empty */
26+
.sigma-loader.no-animation ::ng-deep .p-skeleton::after {
27+
animation: none !important;
28+
}

0 commit comments

Comments
 (0)