feat(console): actions and flows (#2559)

* features, page, table, create dialog, i18n

* trigger actions service, add action dialog

* display flows, add flow dialog, duration pipe, i18n

* optim flow layout, action presets

* delete actions, flows, layout

* drag drop list, fix update

* lint

* stylelint

* fix template rest

* actions, drag, fix hasrole

* stylelint

* toast, i18n

* missing italian translations

* it

* fix ActionSearchQueries

Co-authored-by: Livio Amstutz <[email protected]>
This commit is contained in:
Max Peintner
2021-11-16 08:18:03 +01:00
committed by GitHub
co-authored by Livio Amstutz
parent b80751d7f7
commit 06e1af4f78
36 changed files with 2271 additions and 914 deletions
@@ -0,0 +1,18 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { DurationToSecondsPipe } from './duration-to-seconds.pipe';
@NgModule({
declarations: [
DurationToSecondsPipe,
],
imports: [
CommonModule,
],
exports: [
DurationToSecondsPipe,
],
})
export class DurationToSecondsPipeModule { }
@@ -0,0 +1,25 @@
import { Pipe, PipeTransform } from '@angular/core';
import { Duration } from 'google-protobuf/google/protobuf/duration_pb';
@Pipe({
name: 'durationToSeconds',
})
export class DurationToSecondsPipe implements PipeTransform {
transform(value?: Duration.AsObject, ...args: unknown[]): unknown {
if (value) {
return this.durationToSeconds(value);
} else {
return '';
}
}
private durationToSeconds(date: Duration.AsObject): any {
if (date?.seconds !== undefined && date?.nanos !== undefined) {
const ms = (date.seconds * 1000 + date.nanos / 1000 / 1000);
const secs = ms / 1000;
return `${secs.toFixed(2)} sec`
}
}
}