Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Angular refactoring to v13 #398

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions webapp/backend/pkg/database/scrutiny_repository_migrations.go
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,12 @@ func (sr *scrutinyRepository) Migrate(ctx context.Context) error {
SettingDataType: "bool",
SettingValueBool: false,
},
{
SettingKeyName: "line_stroke",
SettingKeyDescription: "Temperature chart line stroke ('smooth' | 'straight' | 'stepline')",
SettingDataType: "string",
SettingValueString: "smooth",
},

{
SettingKeyName: "metrics.notify_level",
Expand Down
1 change: 1 addition & 0 deletions webapp/backend/pkg/models/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ type Settings struct {
DashboardSort string `json:"dashboard_sort" mapstructure:"dashboard_sort"`
TemperatureUnit string `json:"temperature_unit" mapstructure:"temperature_unit"`
FileSizeSIUnits bool `json:"file_size_si_units" mapstructure:"file_size_si_units"`
LineStroke string `json:"line_stroke" mapstructure:"line_stroke"`

Metrics struct {
NotifyLevel int `json:"notify_level" mapstructure:"notify_level"`
Expand Down
1 change: 0 additions & 1 deletion webapp/frontend/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
Expand Down
109 changes: 49 additions & 60 deletions webapp/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"start": "ng serve --open",
"start:mem": "node --max_old_space_size=6144 ./node_modules/@angular/cli/bin/ng serve --open",
"build": "ng build",
"build:prod": "ng build --prod",
"build:prod": "ng build --configuration production",
"build:prod:mem": "node --max_old_space_size=6144 ./node_modules/@angular/cli/bin/ng build --prod",
"test": "ng test",
"lint": "ng lint",
Expand All @@ -20,66 +20,55 @@
},
"private": true,
"dependencies": {
"@angular/animations": "9.1.4",
"@angular/cdk": "9.2.2",
"@angular/common": "9.1.4",
"@angular/compiler": "9.1.4",
"@angular/core": "9.1.4",
"@angular/forms": "9.1.4",
"@angular/material": "9.2.2",
"@angular/material-moment-adapter": "9.2.2",
"@angular/platform-browser": "9.1.4",
"@angular/platform-browser-dynamic": "9.1.4",
"@angular/router": "9.1.4",
"@fullcalendar/angular": "4.4.5-beta",
"@fullcalendar/core": "4.4.0",
"@fullcalendar/daygrid": "4.4.0",
"@fullcalendar/interaction": "4.4.0",
"@fullcalendar/list": "4.4.0",
"@fullcalendar/moment": "4.4.0",
"@fullcalendar/rrule": "4.4.0",
"@fullcalendar/timegrid": "4.4.0",
"@types/humanize-duration": "^3.18.1",
"apexcharts": "3.19.2",
"crypto-js": "3.3.0",
"highlight.js": "10.0.1",
"humanize-duration": "^3.24.0",
"lodash": "4.17.15",
"moment": "2.24.0",
"ng-apexcharts": "1.5.12",
"ngx-markdown": "9.0.0",
"ngx-quill": "9.1.0",
"perfect-scrollbar": "1.5.0",
"quill": "1.3.7",
"rrule": "2.6.4",
"rxjs": "6.5.5",
"tslib": "1.11.1",
"web-animations-js": "2.3.2",
"zone.js": "0.10.3"
"@angular/animations": "v13-lts",
"@angular/cdk": "v13-lts",
"@angular/common": "v13-lts",
"@angular/compiler": "v13-lts",
"@angular/core": "v13-lts",
"@angular/forms": "v13-lts",
"@angular/material": "v13-lts",
"@angular/material-moment-adapter": "v13-lts",
"@angular/platform-browser": "v13-lts",
"@angular/platform-browser-dynamic": "v13-lts",
"@angular/router": "v13-lts",
"@types/humanize-duration": "^3.27.1",
"crypto-js": "^4.1.1",
"highlight.js": "^11.6.0",
"humanize-duration": "^3.27.3",
"lodash": "4.17.21",
"moment": "^2.29.4",
"ng-apexcharts": "^1.7.4",
"perfect-scrollbar": "^1.5.5",
"quill": "^1.3.7",
"rrule": "^2.7.1",
"rxjs": "^7.5.7",
"tslib": "^2.4.1",
"web-animations-js": "^2.3.2",
"ngx-markdown": "^13.1.0"
},
"devDependencies": {
"@angular-devkit/build-angular": "0.901.4",
"@angular/cli": "9.1.4",
"@angular/compiler-cli": "9.1.4",
"@angular/language-service": "9.1.4",
"@types/crypto-js": "3.1.45",
"@types/highlight.js": "9.12.3",
"@types/jasmine": "3.5.10",
"@types/jasminewd2": "2.0.8",
"@types/lodash": "4.14.150",
"@types/node": "12.12.37",
"codelyzer": "5.2.2",
"jasmine-core": "3.5.0",
"jasmine-spec-reporter": "4.2.1",
"karma": "5.0.4",
"karma-chrome-launcher": "3.1.0",
"karma-coverage-istanbul-reporter": "2.1.1",
"karma-jasmine": "3.0.3",
"karma-jasmine-html-reporter": "1.5.3",
"protractor": "5.4.4",
"tailwindcss": "1.4.4",
"ts-node": "8.3.0",
"tslint": "6.1.2",
"typescript": "3.8.3"
"@angular-devkit/build-angular": "v13-lts",
"@angular/cli": "v13-lts",
"@angular/compiler-cli": "v13-lts",
"@angular/language-service": "v13-lts",
"@types/crypto-js": "^4.1.1",
"@types/highlight.js": "^10.1.0",
"@types/jasmine": "^4.3.0",
"@types/jasminewd2": "^2.0.10",
"@types/lodash": "^4.14.188",
"@types/node": "^18.11.9",
"codelyzer": "^6.0.2",
"jasmine-core": "^4.5.0",
"jasmine-spec-reporter": "^7.0.0",
"karma": "^6.4.1",
"karma-chrome-launcher": "^3.1.1",
"karma-coverage-istanbul-reporter": "^3.0.3",
"karma-jasmine": "^5.1.0",
"karma-jasmine-html-reporter": "^2.0.0",
"protractor": "^7.0.0",
"tailwindcss": "^3.2.3",
"ts-node": "^10.9.1",
"tslint": "^6.1.3",
"typescript": "^4.6.4"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export class TreoDateRangeComponent implements ControlValueAccessor, OnInit, OnD
private _timeFormat: string;
private _timeRange: boolean;
private readonly _timeRegExp: RegExp;
private _unsubscribeAll: Subject<any>;
private _unsubscribeAll: Subject<void>;

/**
* Constructor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export class TreoMessageComponent implements OnInit, OnDestroy
private _dismissed: null | boolean;
private _showIcon: boolean;
private _type: TreoMessageType;
private _unsubscribeAll: Subject<any>;
private _unsubscribeAll: Subject<void>;

/**
* Constructor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class TreoHorizontalNavigationBasicItemComponent implements OnInit, OnDes

// Private
private _treoHorizontalNavigationComponent: TreoHorizontalNavigationComponent;
private _unsubscribeAll: Subject<any>;
private _unsubscribeAll: Subject<void>;

/**
* Constructor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export class TreoHorizontalNavigationBranchItemComponent implements OnInit, OnDe

// Private
private _treoHorizontalNavigationComponent: TreoHorizontalNavigationComponent;
private _unsubscribeAll: Subject<any>;
private _unsubscribeAll: Subject<void>;

/**
* Constructor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class TreoHorizontalNavigationDividerItemComponent implements OnInit, OnD

// Private
private _treoHorizontalNavigationComponent: TreoHorizontalNavigationComponent;
private _unsubscribeAll: Subject<any>;
private _unsubscribeAll: Subject<void>;

/**
* Constructor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class TreoHorizontalNavigationSpacerItemComponent implements OnInit, OnDe

// Private
private _treoHorizontalNavigationComponent: TreoHorizontalNavigationComponent;
private _unsubscribeAll: Subject<any>;
private _unsubscribeAll: Subject<void>;

/**
* Constructor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class TreoHorizontalNavigationComponent implements OnInit, OnDestroy

// Private
private _navigation: TreoNavigationItem[];
private _unsubscribeAll: Subject<any>;
private _unsubscribeAll: Subject<void>;

/**
* Constructor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export class TreoVerticalNavigationAsideItemComponent implements OnInit, OnDestr

// Private
private _treoVerticalNavigationComponent: TreoVerticalNavigationComponent;
private _unsubscribeAll: Subject<any>;
private _unsubscribeAll: Subject<void>;

/**
* Constructor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class TreoVerticalNavigationBasicItemComponent implements OnInit, OnDestr

// Private
private _treoVerticalNavigationComponent: TreoVerticalNavigationComponent;
private _unsubscribeAll: Subject<any>;
private _unsubscribeAll: Subject<void>;

/**
* Constructor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export class TreoVerticalNavigationCollapsableItemComponent implements OnInit, O

// Private
private _treoVerticalNavigationComponent: TreoVerticalNavigationComponent;
private _unsubscribeAll: Subject<any>;
private _unsubscribeAll: Subject<void>;

/**
* Constructor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class TreoVerticalNavigationDividerItemComponent implements OnInit, OnDes

// Private
private _treoVerticalNavigationComponent: TreoVerticalNavigationComponent;
private _unsubscribeAll: Subject<any>;
private _unsubscribeAll: Subject<void>;

/**
* Constructor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export class TreoVerticalNavigationGroupItemComponent implements OnInit, OnDestr

// Private
private _treoVerticalNavigationComponent: TreoVerticalNavigationComponent;
private _unsubscribeAll: Subject<any>;
private _unsubscribeAll: Subject<void>;

/**
* Constructor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class TreoVerticalNavigationSpacerItemComponent implements OnInit, OnDest

// Private
private _treoVerticalNavigationComponent: TreoVerticalNavigationComponent;
private _unsubscribeAll: Subject<any>;
private _unsubscribeAll: Subject<void>;

/**
* Constructor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export class TreoVerticalNavigationComponent implements OnInit, AfterViewInit, O
private _position: TreoVerticalNavigationPosition;
private _scrollStrategy: ScrollStrategy;
private _transparentOverlay: boolean | '';
private _unsubscribeAll: Subject<any>;
private _unsubscribeAll: Subject<void>;

@HostBinding('class.treo-vertical-navigation-animations-enabled')
private _animationsEnabled: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export class TreoAutogrowDirective implements OnInit, OnDestroy

// Private
private _padding: number;
private _unsubscribeAll: Subject<any>;
private _unsubscribeAll: Subject<void>;

/**
* Constructor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export class TreoScrollbarDirective implements OnInit, OnDestroy
private _animation: number | null;
private _enabled: boolean;
private _options: any;
private _unsubscribeAll: Subject<any>;
private _unsubscribeAll: Subject<void>;

/**
* Constructor
Expand Down
2 changes: 1 addition & 1 deletion webapp/frontend/src/@treo/lib/mock-api/mock-api.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export class TreoMockApiModule
*
* @param mockDataServices
*/
static forRoot(mockDataServices: any[]): ModuleWithProviders
static forRoot(mockDataServices: any[]): ModuleWithProviders<TreoMockApiModule>
{
return {
ngModule : TreoMockApiModule,
Expand Down
1 change: 0 additions & 1 deletion webapp/frontend/src/@treo/styles/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@

// 6. Overrides
@import 'overrides/angular-material';
@import 'overrides/fullcalendar';
@import 'overrides/highlightjs';
@import 'overrides/perfect-scrollbar';
@import 'overrides/quill';
Loading