diff --git a/ui/.eslintignore b/ui/.eslintignore
index a4ba0955eb..fd5519665a 100644
--- a/ui/.eslintignore
+++ b/ui/.eslintignore
@@ -38,5 +38,4 @@ src/app/NS
src/app/pipeline-details
src/app/pipelines
src/app/profile
-src/app/services
src/scss
diff --git a/ui/.prettierignore b/ui/.prettierignore
index e90ed933fe..78fd58ffd1 100644
--- a/ui/.prettierignore
+++ b/ui/.prettierignore
@@ -39,5 +39,4 @@ src/app/NS
src/app/pipeline-details
src/app/pipelines
src/app/profile
-src/app/services
src/scss
diff --git a/ui/src/app/services/auth.service.ts b/ui/src/app/services/auth.service.ts
index feb406d657..9dee94a47e 100644
--- a/ui/src/app/services/auth.service.ts
+++ b/ui/src/app/services/auth.service.ts
@@ -30,21 +30,29 @@ import { RoleModel } from '../_models/auth.model';
@Injectable()
export class AuthService {
-
- public authToken$: BehaviorSubject In this tutorial you will learn how to get official environment data from the \'Landesamt für Umwelt Baden-Württemberg\' LUBW.' +
- ' In this tutorial you will learn how to get official environment data from the 'Landesamt für Umwelt Baden-Württemberg' LUBW." +
+ ' Let\'s start! Select the Http Stream adapter to get the data from the LUBW Let's start! Select the Http Stream adapter to get the data from the LUBW In this tutorial we connect the live data form parking lots of the LAX airport. Link to data description: https://goo.gl/48y2xv In this tutorial we connect the live data form parking lots of the LAX airport. Link to data description: https://goo.gl/48y2xv Let\'s start! First select the Http Stream adapter Let's start! First select the Http Stream adapter After setting the configuration, click on next to go to the next step After setting the configuration, click on next to go to the next step When you understand the schema of the data go to the next step by clicking on the next button!',
+ text:
+ 'In this view you can see the schema of each data entry. You can use the schema editor to change the schema, add more information and have a look at the data' +
+ ' When you understand the schema of the data go to the next step by clicking on the next button!',
attachToElement: '#schema_reload_button',
attachPosition: 'top',
- buttons: [
- 'cancel',
-
- ]
+ buttons: ['cancel'],
},
{
stepId: 'step-7',
@@ -83,9 +77,7 @@ export default {
text: 'Change the name of the adapter to LAX and click on button Start Adapter',
attachToElement: '#input-AdapterName',
attachPosition: 'top',
- buttons: [
- 'cancel'
- ]
+ buttons: ['cancel'],
},
{
stepId: 'step-8',
@@ -93,29 +85,31 @@ export default {
text: 'Wait for the data! Then finish the creation process by clicking on this button.',
attachToElement: '#confirm_adapter_started_button',
attachPosition: 'right',
- buttons: [
- 'cancel'
- ]
+ buttons: ['cancel'],
},
{
stepId: 'step-9',
title: 'Congratulation',
text: 'Congratulation you have created your second adapter and finished the tutorial. Go to the pipeline editor to see the new data source',
classes: 'shepherd shepherd-welcome',
- buttons: [
- 'cancel'
- ]
- }
+ buttons: ['cancel'],
+ },
],
matchingSteps: [
- {actionId: 'select-adapter', currentStep: 'step-2'},
- {actionId: 'specific-settings-next-button', currentStep: 'step-3'},
- {actionId: 'format-selection-next-button', currentStep: 'step-4'},
+ { actionId: 'select-adapter', currentStep: 'step-2' },
+ {
+ actionId: 'specific-settings-next-button',
+ currentStep: 'step-3',
+ },
+ { actionId: 'format-selection-next-button', currentStep: 'step-4' },
- {actionId: 'event-schema-next-button', currentStep: 'step-6.0'},
+ { actionId: 'event-schema-next-button', currentStep: 'step-6.0' },
- {actionId: 'button-startAdapter', currentStep: 'step-7'},
- {actionId: 'confirm_adapter_started_button', currentStep: 'step-8'},
- ]
- }
+ { actionId: 'button-startAdapter', currentStep: 'step-7' },
+ {
+ actionId: 'confirm_adapter_started_button',
+ currentStep: 'step-8',
+ },
+ ],
+ },
};
diff --git a/ui/src/app/services/tour/adapter-tour.constants.ts b/ui/src/app/services/tour/adapter-tour.constants.ts
index ece3c5273c..eea1b7d19a 100644
--- a/ui/src/app/services/tour/adapter-tour.constants.ts
+++ b/ui/src/app/services/tour/adapter-tour.constants.ts
@@ -19,112 +19,104 @@
export default {
adapterTour: {
id: 'adapter',
- steps: [{
- stepId: 'step-1',
- title: 'Welcome to the Adapter Tutorial',
- text: ' In this tour you will learn how to create a new adapter, which then can be used as a source in the pipeline editor. In this tour you will learn how to create a new adapter, which then can be used as a source in the pipeline editor. Let\'s start! This is the OpenSenseMap adapter. OpenSenseMap is an online service where everybody can publish environment data. Let's start! This is the OpenSenseMap adapter. OpenSenseMap is an online service where everybody can publish environment data. Select all sensors in the menu on the left. With the selection you just get the values of the sensor boxes containing all sensors. ' +
- 'After selecting all Sensors click on next to continue.',
+ text:
+ ' Select all sensors in the menu on the left. With the selection you just get the values of the sensor boxes containing all sensors. ' +
+ 'After selecting all Sensors click on next to continue.',
attachToElement: '#specific-settings-next-button',
attachPosition: 'top',
- buttons: [
- 'cancel',
- ]
+ buttons: ['cancel'],
},
{
stepId: 'step-4',
title: 'Configure the schema of the data',
- text: 'In this editor it is possible to change the schema of the sensebox data. Each entry describes a property. For example the id property contains the unique id of the sensebox. ' +
- 'Open the configuration menu by clicking on the arrow!',
+ text:
+ 'In this editor it is possible to change the schema of the sensebox data. Each entry describes a property. For example the id property contains the unique id of the sensebox. ' +
+ 'Open the configuration menu by clicking on the arrow!',
attachToElement: '#id button:last-of-type',
attachPosition: 'top',
- buttons: [
- 'cancel',
- ]
+ buttons: ['cancel'],
},
{
stepId: 'step-5',
title: 'Change the id runtime name',
- text: 'The runtime name represents the key in our Json data objects. Change the value of the runtime name to new_id. This will also change all the keys later in the real data stream. ' +
- 'Then click the next button of the user guide.',
+ text:
+ 'The runtime name represents the key in our Json data objects. Change the value of the runtime name to new_id. This will also change all the keys later in the real data stream. ' +
+ 'Then click the next button of the user guide.',
attachToElement: '#input-runtime-name-Id',
attachPosition: 'bottom',
- buttons: [
- 'cancel',
- 'next'
- ]
+ buttons: ['cancel', 'next'],
},
- {
+ {
stepId: 'step-6',
title: 'Go to next Step',
text: 'Finish the modelling and go to next step to start the adapter. Click next to continue.',
attachToElement: '#event-schema-next-button',
attachPosition: 'bottom',
- buttons: [
- 'cancel'
- ]
+ buttons: ['cancel'],
},
{
stepId: 'step-7',
title: 'Start Adapter',
- text: 'Change the name of the adapter to OpenSenseMap and click on button \'Start Adapter\'',
+ text: "Change the name of the adapter to OpenSenseMap and click on button 'Start Adapter'",
attachToElement: '#input-AdapterName',
attachPosition: 'top',
- buttons: [
- 'cancel'
- ]
+ buttons: ['cancel'],
},
{
stepId: 'step-8',
title: 'Adapter was started successfully',
- text: ' The adpater is now deployed in the background and the data is fetched and processed from the OpenSenseMap endpoint. Here you will see some example data, which is coming directly ' +
- 'the data source. This might take a minute. On the left you can see the runtime names of the properties you defined before. On the right side the values are shown. After having a look at ' +
- 'the data click on Close to continue. The adpater is now deployed in the background and the data is fetched and processed from the OpenSenseMap endpoint. Here you will see some example data, which is coming directly ' +
+ 'the data source. This might take a minute. On the left you can see the runtime names of the properties you defined before. On the right side the values are shown. After having a look at ' +
+ 'the data click on Close to continue. This tour will teach you how to create your first pipeline. You will learn how to select streams, how to connect data processors and sinks and how to start a pipeline. Let\'s start! This is the Pipeline Element Selection panel. Here you can select and use all available pipeline elements. Let's start! This is the Pipeline Element Selection panel. Here you can select and use all available pipeline elements. To select a stream, drag and drop the stream named Flow Rate 1 to the assembly area on the right. To select a stream, drag and drop the stream named Flow Rate 1 to the assembly area on the right. Cool! Dragging and dropping elements is the basic principle you need to know to create pipelines. You only need to select a pipeline element and drop it to the assembly area. Click Next to continue. Click Next to continue. Processors can provide simple capabilities such as filters or aggregations, but can also provide more advanced capabilities such as trend and pattern detection or even pre-trained neural networks. Select the processor called Numerical Filter and move it to the assembly area. Now it\'s time to connect the first elements of your pipeline! Click the gray output port of the stream and connect it with the Numerical Filter component. Now it's time to connect the first elements of your pipeline! Click the gray output port of the stream and connect it with the Numerical Filter component. Most pipeline elements can be customized according to your needs. Whenever you connect two elements with each other, a configuration dialog pops up. Select Mass Flow as the field to filter, select greater than (>) as operation, select 2 as the threshold value and click Save. What\'s missing? Every pipeline needs a data sink. Sinks define what to do with the output of your pipeline and can be visualizations, notifications, or can trigger third party components or even actuators. Click Next to continue. What's missing? Every pipeline needs a data sink. Sinks define what to do with the output of your pipeline and can be visualizations, notifications, or can trigger third party components or even actuators. Click Next to continue. Almost there!' +
+ text:
+ 'The data source of LUWB provices a lot of information and we do not need all of this. Therefore first delete all properties, except the following.' +
+ '
' +
+ 'When you make any errors during the editing you can reset the the schema on the reload button.',
attachToElement: '#schema_reload_button',
attachPosition: 'top',
- buttons: [
- 'cancel',
- 'next'
-
- ]
+ buttons: ['cancel', 'next'],
},
{
stepId: 'step-6.1',
@@ -103,9 +94,7 @@ export default {
text: 'Finish the modelling and go to next step to start the adapter',
attachToElement: '#event-schema-next-button',
attachPosition: 'bottom',
- buttons: [
- 'cancel'
- ]
+ buttons: ['cancel'],
},
{
stepId: 'step-7',
@@ -113,9 +102,7 @@ export default {
text: 'Change the name of the adapter to LUBW and click on button Start Adapter',
attachToElement: '#input-AdapterName',
attachPosition: 'top',
- buttons: [
- 'cancel'
- ]
+ buttons: ['cancel'],
},
{
stepId: 'step-8',
@@ -123,30 +110,32 @@ export default {
text: 'Wait for the data! Then finish the creation process by clicking on this button.',
attachToElement: '#confirm_adapter_started_button',
attachPosition: 'right',
- buttons: [
- 'cancel'
- ]
+ buttons: ['cancel'],
},
{
stepId: 'step-9',
title: 'Congratulation',
text: 'Congratulation you have created your first adapter and finished the tutorial. Go to the pipeline editor to see the new data source',
classes: 'shepherd shepherd-welcome',
- buttons: [
- 'cancel'
- ]
- }
+ buttons: ['cancel'],
+ },
],
matchingSteps: [
- {actionId: 'select-adapter', currentStep: 'step-2'},
- {actionId: 'specific-settings-next-button', currentStep: 'step-3'},
- {actionId: 'select-format', currentStep: 'step-4'},
- {actionId: 'format-selection-next-button', currentStep: 'step-5'},
+ { actionId: 'select-adapter', currentStep: 'step-2' },
+ {
+ actionId: 'specific-settings-next-button',
+ currentStep: 'step-3',
+ },
+ { actionId: 'select-format', currentStep: 'step-4' },
+ { actionId: 'format-selection-next-button', currentStep: 'step-5' },
- {actionId: 'event-schema-next-button', currentStep: 'step-6.1'},
+ { actionId: 'event-schema-next-button', currentStep: 'step-6.1' },
- {actionId: 'button-startAdapter', currentStep: 'step-7'},
- {actionId: 'confirm_adapter_started_button', currentStep: 'step-8'},
- ]
- }
+ { actionId: 'button-startAdapter', currentStep: 'step-7' },
+ {
+ actionId: 'confirm_adapter_started_button',
+ currentStep: 'step-8',
+ },
+ ],
+ },
};
diff --git a/ui/src/app/services/tour/adapter-tour-3.constants.ts b/ui/src/app/services/tour/adapter-tour-3.constants.ts
index 2f8e00a932..dc26631ed5 100644
--- a/ui/src/app/services/tour/adapter-tour-3.constants.ts
+++ b/ui/src/app/services/tour/adapter-tour-3.constants.ts
@@ -19,63 +19,57 @@
export default {
adapterTour: {
id: 'adapter3',
- steps: [{
- stepId: 'step-1',
- title: 'Welcome to the Second Adapter Tutorial',
- text: '' +
'
' +
- 'When you make any errors during the editing you can reset the the schema on the reload button.',
+ '
Great!
Your first pipeline is complete. No we\'re ready to start the pipeline.
Click the Save icon to open the save dialog.
', - attachToElement: '.pipeline-assembly-options>div>button:nth-of-type(1)', + text: "Great!
Your first pipeline is complete. No we're ready to start the pipeline.
Click the Save icon to open the save dialog.
", + attachToElement: + '.pipeline-assembly-options>div>button:nth-of-type(1)', attachPosition: 'left', - buttons: [ - 'cancel' - ] + buttons: ['cancel'], }, { stepId: 'step-12', @@ -140,42 +118,38 @@ export default { text: 'Enter a name and an optional description of your pipeline.
Afterwards, make sure that Start pipeline immediately is checked.
', attachToElement: 'div .dialog-panel-content', attachPosition: 'right', - buttons: [ - 'cancel' - ] + buttons: ['cancel'], }, { stepId: 'step-13', title: 'Save Pipeline Dialog', text: 'Click on Save and go to pipeline view to start the pipeline.
', - attachToElement: 'save-pipeline .sp-dialog-actions>button:nth-of-type(2)', + attachToElement: + 'save-pipeline .sp-dialog-actions>button:nth-of-type(2)', attachPosition: 'top', - buttons: [ - 'cancel' - ] + buttons: ['cancel'], }, { stepId: 'step-14', title: 'Pipeline Started', - text: 'Congratulations!
You\'ve completed the first tutorial. The next step would be to add a visualization in the Dashboard. If you wish to see how it works, start the second tutorial.
', - attachToElement: 'md-dialog>form>md-dialog-actions>button:nth-of-type(1)', + text: "Congratulations!
You've completed the first tutorial. The next step would be to add a visualization in the Dashboard. If you wish to see how it works, start the second tutorial.
", + attachToElement: + 'md-dialog>form>md-dialog-actions>button:nth-of-type(1)', attachPosition: 'bottom', - buttons: [ - 'cancel' - ] - } + buttons: ['cancel'], + }, ], matchingSteps: [ - {actionId: 'drop-stream', currentStep: 'step-3'}, - {actionId: 'select-sepa', currentStep: 'step-5'}, - {actionId: 'drop-sepa', currentStep: 'step-6'}, - {actionId: 'customize-sepa', currentStep: 'step-7'}, - {actionId: 'save-sepa', currentStep: 'step-8'}, - {actionId: 'select-action', currentStep: 'step-9'}, - {actionId: 'save-action', currentStep: 'step-10'}, - {actionId: 'enter-pipeline-name', currentStep: 'step-11'}, - {actionId: 'save-pipeline-dialog', currentStep: 'step-12'}, - {actionId: 'pipeline-started', currentStep: 'step-13'}, - ] - } + { actionId: 'drop-stream', currentStep: 'step-3' }, + { actionId: 'select-sepa', currentStep: 'step-5' }, + { actionId: 'drop-sepa', currentStep: 'step-6' }, + { actionId: 'customize-sepa', currentStep: 'step-7' }, + { actionId: 'save-sepa', currentStep: 'step-8' }, + { actionId: 'select-action', currentStep: 'step-9' }, + { actionId: 'save-action', currentStep: 'step-10' }, + { actionId: 'enter-pipeline-name', currentStep: 'step-11' }, + { actionId: 'save-pipeline-dialog', currentStep: 'step-12' }, + { actionId: 'pipeline-started', currentStep: 'step-13' }, + ], + }, }; diff --git a/ui/src/app/services/tour/dashboard-tour.constants.ts b/ui/src/app/services/tour/dashboard-tour.constants.ts index 4439c684f7..095d3c0610 100644 --- a/ui/src/app/services/tour/dashboard-tour.constants.ts +++ b/ui/src/app/services/tour/dashboard-tour.constants.ts @@ -19,25 +19,21 @@ export default { dashboardTour: { id: 'dashboard', - steps: [{ - stepId: 'step-1', - title: 'Welcome to the Dashboard Tutorial!', - classes: 'shepherd shepherd-welcome', - text: 'In this tutorial, you\'ll learn how to create a live dashboard that shows data from a running pipeline.
Note:This tutorial requires a running pipeline that makes use of the Dashboard Sink. If you don\'t have such a pipeine started yet, go to the pipeline editor and create one.Press Next to start the tutorial!
', - buttons: [ - 'cancel', - 'next' - ] - }, + steps: [ + { + stepId: 'step-1', + title: 'Welcome to the Dashboard Tutorial!', + classes: 'shepherd shepherd-welcome', + text: "In this tutorial, you'll learn how to create a live dashboard that shows data from a running pipeline.
Note:This tutorial requires a running pipeline that makes use of the Dashboard Sink. If you don't have such a pipeine started yet, go to the pipeline editor and create one.Press Next to start the tutorial!
", + buttons: ['cancel', 'next'], + }, { stepId: 'step-2', title: 'Add visualization', - text: 'Let\'s start!
To create a new visulization, click the Add visualization button.
', + text: "Let's start!
To create a new visulization, click the Add visualization button.
", attachToElement: '#add-viz-button', attachPosition: 'bottom', - buttons: [ - 'cancel', - ] + buttons: ['cancel'], }, { stepId: 'step-3', @@ -45,19 +41,15 @@ export default { text: 'This wizard allows to configure visualizations. The first step is to select a currently running pipeline.
Click the pipeline shown on the left.
', attachToElement: 'md-grid-tile:nth-of-type(1)', attachPosition: 'right', - buttons: [ - 'cancel', - ] + buttons: ['cancel'], }, { stepId: 'step-4', title: 'Select visualization', - text: 'The second step requires the selection of a visulization. You can select from tables, gauges, maps or charts.
In this tutorial, we\'ll create a table visualization, so click the Table visualization on the left.
', + text: "The second step requires the selection of a visulization. You can select from tables, gauges, maps or charts.
In this tutorial, we'll create a table visualization, so click the Table visualization on the left.
", attachToElement: 'md-grid-tile:nth-of-type(1)', attachPosition: 'right', - buttons: [ - 'cancel', - ] + buttons: ['cancel'], }, { stepId: 'step-5', @@ -65,9 +57,7 @@ export default { text: 'Some visualizations can be customized according to your needs.
For instance, the table visualization provides a dialog to filter columns. Click the Select all button on the left to select all fields from the incoming event.
', attachToElement: '#select-all-button', attachPosition: 'right', - buttons: [ - 'cancel', - ] + buttons: ['cancel'], }, { stepId: 'step-6', @@ -75,9 +65,7 @@ export default { text: 'Now you are ready to save your visualization. Click Save to create a new visualization in your dashboard.', attachToElement: '#save-viz-button', attachPosition: 'bottom', - buttons: [ - 'cancel', - ] + buttons: ['cancel'], }, { stepId: 'step-7', @@ -85,17 +73,15 @@ export default { text: 'Now you should see live data coming in. There are many more visualization types you can try.
Press Exit to finish the tour.', attachToElement: '.widget-container:nth-of-type(1)', attachPosition: 'right', - buttons: [ - 'cancel', - ] + buttons: ['cancel'], }, ], matchingSteps: [ - {actionId: 'add-viz', currentStep: 'step-2'}, - {actionId: 'select-pipeline', currentStep: 'step-3'}, - {actionId: 'select-viz', currentStep: 'step-4'}, - {actionId: 'customize-viz', currentStep: 'step-5'}, - {actionId: 'save-viz', currentStep: 'step-6'}, - ] - } + { actionId: 'add-viz', currentStep: 'step-2' }, + { actionId: 'select-pipeline', currentStep: 'step-3' }, + { actionId: 'select-viz', currentStep: 'step-4' }, + { actionId: 'customize-viz', currentStep: 'step-5' }, + { actionId: 'save-viz', currentStep: 'step-6' }, + ], + }, }; diff --git a/ui/src/app/services/tour/shepherd.service.ts b/ui/src/app/services/tour/shepherd.service.ts index 9d820fdc45..c5c87f09f8 100644 --- a/ui/src/app/services/tour/shepherd.service.ts +++ b/ui/src/app/services/tour/shepherd.service.ts @@ -25,13 +25,14 @@ import StepOptions = Step.StepOptions; @Injectable() export class ShepherdService { - currentTour: any; currentTourSettings: any; timeWaitMillis: number; - constructor(private router: Router, - private tourProviderService: TourProviderService) { + constructor( + private router: Router, + private tourProviderService: TourProviderService, + ) { this.timeWaitMillis = tourProviderService.getTime(); } @@ -41,9 +42,9 @@ export class ShepherdService { confirmCancelMessage: 'Do you really want to cancel the tour?', defaultStepOptions: { classes: 'shadow-md bg-purple-dark', - scrollTo: true + scrollTo: true, // showCancelLink: true - } + }, }); currentTourSettings.steps.forEach(step => { @@ -59,7 +60,7 @@ export class ShepherdService { text: step.text, classes: step.classes, id: step.stepId, - buttons: this.generateButtons(tour, step.buttons) + buttons: this.generateButtons(tour, step.buttons), }; if (step.attachToElement) { @@ -67,7 +68,7 @@ export class ShepherdService { attachTo: { element: step.attachToElement, on: step.attachPosition, - } + }, }); } @@ -100,19 +101,18 @@ export class ShepherdService { this.currentTour.start(); } - makeCancelButton(tour) { return { action: tour.cancel, classes: 'shepherd-button-secondary', - text: 'Exit Tour' + text: 'Exit Tour', }; } makeNextButton(tour) { return { action: tour.next, - text: 'Next' + text: 'Next', }; } @@ -120,28 +120,36 @@ export class ShepherdService { return { action: tour.back, classes: 'shepherd-button-secondary', - text: 'Back' + text: 'Back', }; } makeStartDashboardTutorialButton() { return { action: this.switchAndStartDashboardTour(), - text: 'Dashboard Tutorial' + text: 'Dashboard Tutorial', }; } trigger(actionId) { if (Shepherd.activeTour) { - if (this.shouldTrigger(actionId, this.currentTour.getCurrentStep().id)) { - setTimeout(() => this.currentTour.next(), this.tourProviderService.getTime()); + if ( + this.shouldTrigger( + actionId, + this.currentTour.getCurrentStep().id, + ) + ) { + setTimeout( + () => this.currentTour.next(), + this.tourProviderService.getTime(), + ); } } } shouldTrigger(actionId, currentStep) { return this.currentTourSettings.matchingSteps.some(el => { - return (el.actionId === actionId) && (el.currentStep === currentStep); + return el.actionId === actionId && el.currentStep === currentStep; }); } @@ -182,6 +190,6 @@ export class ShepherdService { } getTimeWaitMillies() { - return this.tourProviderService.getTime(); + return this.tourProviderService.getTime(); } } diff --git a/ui/src/app/services/tour/tour-provider.service.ts b/ui/src/app/services/tour/tour-provider.service.ts index c2094a4c98..6e4520106c 100644 --- a/ui/src/app/services/tour/tour-provider.service.ts +++ b/ui/src/app/services/tour/tour-provider.service.ts @@ -1,4 +1,3 @@ - /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -26,7 +25,6 @@ import { Injectable } from '@angular/core'; @Injectable() export class TourProviderService { - guidedTours: any; // This is needed to configure the time in cypress test cases @@ -48,7 +46,7 @@ export class TourProviderService { getTourById(tourId) { return this.guidedTours.find(tour => { - return tour.id === tourId; + return tour.id === tourId; }); }