--- /dev/null
+# -*- coding: utf-8 -*-
+
+# Copyright 2021 Whitestack, LLC
+# *************************************************************
+
+# This file is part of OSM Monitoring module
+# All Rights Reserved to Whitestack, LLC
+
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
+# not use this file except in compliance with the License. You may obtain
+# a copy of the License at
+
+# http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations
+# under the License.
+# For those usages not covered by the Apache License, Version 2.0 please
+# contact: fbravo@whitestack.com
+##
+
+node_modules
\ No newline at end of file
# dependencies
/node_modules
package-lock.json
+yarn.lock
# profiling files
chrome-profiler-events.json
&& apt-get update && apt-get install -y nodejs \
&& apt-get install -y nginx
+RUN npm install -g yarn
+
# Preparing working environment.
RUN mkdir -p /usr/src/osm-angularapp
WORKDIR /usr/src/osm-angularapp
# Installing dependencies.
COPY ./package.json /usr/src/osm-angularapp/
-RUN npm install
+RUN yarn install
# Copy osm-angularapp source into image.
COPY ./ /usr/src/osm-angularapp
# Building app.
-RUN npm run build
+RUN yarn build
# Removing nginx default page.
RUN rm -rf /usr/share/nginx/html/*
"@types/ol": "^5.3.5",
"angular-notifier": "^6.0.1",
"bootstrap": "^4.4.1",
- "chart.js": "^2.8.0",
+ "chart.js": "^3.2.1",
"codemirror": "^5.51.0",
"core-js": "^2.5.4",
"d3": "^5.9.2",
"stream": "0.0.2",
"tslib": "^2.0.0",
"web-animations-js": "^2.3.2",
- "zone.js": "~0.10.3"
+ "zone.js": "~0.10.0"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.1100.2",
"karma-jasmine": "~4.0.0",
"karma-jasmine-html-reporter": "^1.5.0",
"ng2-completer": "^3.0.3",
- "node-sass": "^4.14.1",
+ "node-sass": "^5.0.0",
"protractor": "~7.0.0",
"ts-node": "~7.0.0",
"tslint": "~6.1.0",
import { Component, Injector, OnInit } from '@angular/core';
import { TranslateService } from '@ngx-translate/core';
import { AuthenticationService } from 'AuthenticationService';
-import { Chart } from 'chart.js';
+import { ActiveElement, Chart, ChartEvent } from 'chart.js';
import { ERRORDATA } from 'CommonModel';
import { environment } from 'environment';
import { NSDDetails } from 'NSDModel';
data: this.noOfHours,
label: this.translateService.instant('NOOFHOURS'),
borderColor: this.backgroundColor,
- fill: false,
backgroundColor: this.backgroundColor
}]
},
options: {
- hover: {
- onHover(evt: Event, item: {}): void {
- const el: HTMLElement = document.getElementById('canvas');
- el.style.cursor = item[0] ? 'pointer' : 'default';
- }
+ onHover: (evt: ChartEvent, elements):void => {
+ const el: HTMLElement = document.getElementById('canvas');
+ el.style.cursor = elements[0] ? 'pointer' : 'default';
+ },
+ plugins: {
+ legend: { display: false },
},
- legend: { display: false },
scales: {
- xAxes: [{
+ x: {
display: true,
- scaleLabel: {
- display: true,
- labelString: this.translateService.instant('INSTANCES')
- }
- }],
- yAxes: [{
+ labels: [this.translateService.instant('INSTANCES')],
+ },
+ y: {
ticks: {
- beginAtZero: true
+ labelOffset: 0,
},
display: true,
- scaleLabel: {
- display: true,
- labelString: this.translateService.instant('NOOFHOURS')
- }
- }]
+ labels: [this.translateService.instant('NOOFHOURS')]
+ },
}
}
});
/***************************************************************************************************
* Zone JS is required by default for Angular itself.
*/
-import 'zone.js/dist/zone'; // Included with Angular CLI.
+import 'zone.js'; // Included with Angular CLI.
/***************************************************************************************************
* APPLICATION IMPORTS
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/app",
- "types": []
+ "types": ["node"]
},
"exclude": [
"test.ts",
"experimentalDecorators": true,
"importHelpers": true,
"target": "es5",
+ "types": [
+ "node"
+ ],
"typeRoots": [
"node_modules/@types"
],