Commit f2c5f4ea authored by huriarte's avatar huriarte

FUsion de ramas

parents dbfd7bb0 2caeab90
# Editor configuration, see https://editorconfig.org # Editor configuration, see https://editorconfig.org
root = true root = true
[*] [*]
charset = utf-8 charset = utf-8
indent_style = space indent_style = space
indent_size = 2 indent_size = 2
insert_final_newline = true insert_final_newline = true
trim_trailing_whitespace = true trim_trailing_whitespace = true
[*.md] [*.md]
max_line_length = off max_line_length = off
trim_trailing_whitespace = false trim_trailing_whitespace = false
# See http://help.github.com/ignore-files/ for more about ignoring files. # See http://help.github.com/ignore-files/ for more about ignoring files.
# compiled output # compiled output
/dist /dist
/tmp /tmp
/out-tsc /out-tsc
# Only exists if Bazel was run # Only exists if Bazel was run
/bazel-out /bazel-out
# dependencies # dependencies
/node_modules /node_modules
# profiling files # profiling files
chrome-profiler-events*.json chrome-profiler-events*.json
speed-measure-plugin*.json speed-measure-plugin*.json
# IDEs and editors # IDEs and editors
/.idea /.idea
.project .project
.classpath .classpath
.c9/ .c9/
*.launch *.launch
.settings/ .settings/
*.sublime-workspace *.sublime-workspace
# IDE - VSCode # IDE - VSCode
.vscode/* .vscode/*
!.vscode/settings.json !.vscode/settings.json
!.vscode/tasks.json !.vscode/tasks.json
!.vscode/launch.json !.vscode/launch.json
!.vscode/extensions.json !.vscode/extensions.json
.history/* .history/*
# misc # misc
/.sass-cache /.sass-cache
/connect.lock /connect.lock
/coverage /coverage
/libpeerconnection.log /libpeerconnection.log
npm-debug.log npm-debug.log
yarn-error.log yarn-error.log
testem.log testem.log
/typings /typings
# System Files # System Files
.DS_Store .DS_Store
Thumbs.db Thumbs.db
# ByteBot # ByteBot
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 8.3.24. This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 8.3.24.
## Development server ## Development server
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files. Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
## Code scaffolding ## Code scaffolding
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`. Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
## Build ## Build
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build. Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.
## Running unit tests ## Running unit tests
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
## Running end-to-end tests ## Running end-to-end tests
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/). Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
## Further help ## Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md). To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
This diff is collapsed.
{ {
"name": "bytebot-projects", "name": "bytebot-projects",
"version": "0.0.0", "version": "0.0.0",
"scripts": { "scripts": {
"ng": "ng", "ng": "ng",
"start": "ng serve", "start": "ng serve",
"build": "ng build", "build": "ng build",
"test": "ng test", "test": "ng test",
"lint": "ng lint", "lint": "ng lint",
"e2e": "ng e2e" "e2e": "ng e2e"
}, },
"private": true, "private": true,
"dependencies": { "dependencies": {
"@agm/core": "^1.1.0", "@agm/core": "^1.1.0",
"@angular-material-components/datetime-picker": "^2.0.4", "@angular-material-components/datetime-picker": "^2.0.4",
"@angular/animations": "^8.2.14", "@angular/animations": "^8.2.14",
"@angular/cdk": "^8.2.3", "@angular/cdk": "^8.2.3",
"@angular/common": "~8.2.14", "@angular/common": "~8.2.14",
"@angular/compiler": "~8.2.14", "@angular/compiler": "~8.2.14",
"@angular/core": "~8.2.14", "@angular/core": "~8.2.14",
"@angular/forms": "~8.2.14", "@angular/forms": "~8.2.14",
"@angular/material": "^8.2.3", "@angular/material": "^8.2.3",
"@angular/material-moment-adapter": "^9.2.0", "@angular/material-moment-adapter": "^9.2.0",
"@angular/platform-browser": "^8.2.14", "@angular/platform-browser": "^8.2.14",
"@angular/platform-browser-dynamic": "^8.2.14", "@angular/platform-browser-dynamic": "^8.2.14",
"@angular/router": "~8.2.14", "@angular/router": "~8.2.14",
"@babel/compat-data": "^7.8.0", "@babel/compat-data": "^7.8.0",
"@ng-bootstrap/ng-bootstrap": "^5.1.5", "@ng-bootstrap/ng-bootstrap": "^5.1.5",
"@ng-select/ng-select": "^3.7.3", "@ng-select/ng-select": "^3.7.3",
"@ngx-translate/core": "^12.1.2", "@ngx-translate/core": "^12.1.2",
"@ngx-translate/http-loader": "^4.0.0", "@ngx-translate/http-loader": "^4.0.0",
"@swimlane/ngx-datatable": "^16.0.3", "@swimlane/ngx-datatable": "^16.0.3",
"@swimlane/ngx-graph": "^6.2.0", "@swimlane/ngx-graph": "^6.2.0",
"@types/jquery": "^3.3.34", "@types/jquery": "^3.3.34",
"@xdf/commons": "^1.0.0", "@xdf/commons": "^1.0.0",
"@xdf/gallery": "^1.0.4", "@xdf/gallery": "^1.0.4",
"@xdf/layouts": "^1.0.0", "@xdf/layouts": "^1.0.0",
"@xdf/security": "^1.0.0", "@xdf/security": "^1.0.0",
"@xdf/settings": "^1.0.2", "@xdf/settings": "^1.0.2",
"ace-builds": "^1.4.8", "ace-builds": "^1.4.8",
"angular-highcharts": "^9.0.2", "angular-highcharts": "^9.0.2",
"angular-marked": "^1.2.2", "angular-marked": "^1.2.2",
"bootstrap": "^4.4.1", "bootstrap": "^4.4.1",
"chart.js": "^2.9.3", "chart.js": "^2.9.3",
"dagre": "^0.8.5", "dagre": "^0.8.5",
"date-fns": "^2.11.1", "date-fns": "^2.11.1",
"font-awesome": "^4.7.0", "font-awesome": "^4.7.0",
"hammerjs": "^2.0.8", "hammerjs": "^2.0.8",
"highcharts": "^8.0.4", "highcharts": "^8.0.4",
"jquery": "^3.4.1", "jquery": "^3.4.1",
"jquery-slimscroll": "^1.3.8", "jquery-slimscroll": "^1.3.8",
"material-design-icons": "^3.0.1", "material-design-icons": "^3.0.1",
"material-icons": "^0.3.1", "material-icons": "^0.3.1",
"metismenu": "^3.0.6", "metismenu": "^3.0.6",
"moment": "^2.22.1", "moment": "^2.22.1",
"moment-timezone": "^0.5.31", "moment-timezone": "^0.5.31",
"net": "^1.0.2", "net": "^1.0.2",
"ng-circle-progress": "^1.5.1", "ng-circle-progress": "^1.5.1",
"ng-json-view": "^3.0.0", "ng-json-view": "^3.0.0",
"ng2-ace-editor": "^0.3.9", "ng2-ace-editor": "^0.3.9",
"ng2-charts": "^2.3.0", "ng2-charts": "^2.3.0",
"ng2-data-table": "^1.4.0", "ng2-data-table": "^1.4.0",
"ngx-bootstrap": "^4.3.0", "ngx-bootstrap": "^4.3.0",
"ngx-color": "^4.1.1", "ngx-color": "^4.1.1",
"ngx-echarts": "^4.2.2", "ngx-echarts": "^4.2.2",
"ngx-moment": "^3.5.0", "ngx-moment": "^3.5.0",
"ngx-scrollbar": "^7.1.0", "ngx-scrollbar": "^7.1.0",
"ngx-slick-carousel": "^0.5.1", "ngx-slick-carousel": "^0.5.1",
"ngx-toastr": "^10.0.4", "ngx-toastr": "^10.0.4",
"ngx-translate-multi-http-loader": "^3.0.0", "ngx-translate-multi-http-loader": "^3.0.0",
"ngx-tribute": "^1.5.1", "ngx-tribute": "^1.5.1",
"nomnoml": "^0.6.2", "nomnoml": "^0.6.2",
"pace-js": "^1.0.2", "pace-js": "^1.0.2",
"peity": "^3.3.0", "peity": "^3.3.0",
"popper": "^1.0.1", "popper": "^1.0.1",
"popper.js": "^1.16.1", "popper.js": "^1.16.1",
"rxjs": "~6.4.0", "rxjs": "~6.4.0",
"stompjs": "^2.3.3", "stompjs": "^2.3.3",
"tributejs": "^5.1.3", "tributejs": "^5.1.3",
"tslib": "^1.10.0", "tslib": "^1.10.0",
"zone.js": "~0.9.1" "zone.js": "~0.9.1"
}, },
"devDependencies": { "devDependencies": {
"@angular-devkit/build-angular": "~0.803.25", "@angular-devkit/build-angular": "~0.803.25",
"@angular/cli": "~8.3.24", "@angular/cli": "~8.3.24",
"@angular/compiler-cli": "~8.2.14", "@angular/compiler-cli": "~8.2.14",
"@angular/language-service": "~8.2.14", "@angular/language-service": "~8.2.14",
"@types/node": "~8.9.4", "@types/node": "~8.9.4",
"@types/jasmine": "~3.3.8", "@types/jasmine": "~3.3.8",
"@types/jasminewd2": "~2.0.3", "@types/jasminewd2": "~2.0.3",
"codelyzer": "^5.0.0", "codelyzer": "^5.0.0",
"jasmine-core": "~3.4.0", "jasmine-core": "~3.4.0",
"jasmine-spec-reporter": "~4.2.1", "jasmine-spec-reporter": "~4.2.1",
"karma": "~4.1.0", "karma": "~4.1.0",
"karma-chrome-launcher": "~2.2.0", "karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.1", "karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~2.0.1", "karma-jasmine": "~2.0.1",
"karma-jasmine-html-reporter": "^1.4.0", "karma-jasmine-html-reporter": "^1.4.0",
"protractor": "~5.4.0", "protractor": "~5.4.0",
"ts-node": "~7.0.0", "ts-node": "~7.0.0",
"tslint": "~5.15.0", "tslint": "~5.15.0",
"typescript": "~3.5.3" "typescript": "~3.5.3"
} }
} }
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below. # This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
# For additional information regarding the format and rule options, please see: # For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries # https://github.com/browserslist/browserslist#queries
# You can see what browsers were selected by your queries by running: # You can see what browsers were selected by your queries by running:
# npx browserslist # npx browserslist
> 0.5% > 0.5%
last 2 versions last 2 versions
Firefox ESR Firefox ESR
not dead not dead
not IE 9-11 # For IE 9-11 support, remove 'not'. not IE 9-11 # For IE 9-11 support, remove 'not'.
\ No newline at end of file
// @ts-check // @ts-check
// Protractor configuration file, see link for more information // Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts // https://github.com/angular/protractor/blob/master/lib/config.ts
const { SpecReporter } = require('jasmine-spec-reporter'); const { SpecReporter } = require('jasmine-spec-reporter');
/** /**
* @type { import("protractor").Config } * @type { import("protractor").Config }
*/ */
exports.config = { exports.config = {
allScriptsTimeout: 11000, allScriptsTimeout: 11000,
specs: [ specs: [
'./src/**/*.e2e-spec.ts' './src/**/*.e2e-spec.ts'
], ],
capabilities: { capabilities: {
browserName: 'chrome' browserName: 'chrome'
}, },
directConnect: true, directConnect: true,
baseUrl: 'http://localhost:4200/', baseUrl: 'http://localhost:4200/',
framework: 'jasmine', framework: 'jasmine',
jasmineNodeOpts: { jasmineNodeOpts: {
showColors: true, showColors: true,
defaultTimeoutInterval: 30000, defaultTimeoutInterval: 30000,
print: function() {} print: function() {}
}, },
onPrepare() { onPrepare() {
require('ts-node').register({ require('ts-node').register({
project: require('path').join(__dirname, './tsconfig.json') project: require('path').join(__dirname, './tsconfig.json')
}); });
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } })); jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
} }
}; };
\ No newline at end of file
import { AppPage } from './app.po'; import { AppPage } from './app.po';
import { browser, logging } from 'protractor'; import { browser, logging } from 'protractor';
describe('workspace-project App', () => { describe('workspace-project App', () => {
let page: AppPage; let page: AppPage;
beforeEach(() => { beforeEach(() => {
page = new AppPage(); page = new AppPage();
}); });
it('should display welcome message', () => { it('should display welcome message', () => {
page.navigateTo(); page.navigateTo();
expect(page.getTitleText()).toEqual('bytebot-html app is running!'); expect(page.getTitleText()).toEqual('bytebot-html app is running!');
}); });
afterEach(async () => { afterEach(async () => {
// Assert that there are no errors emitted from the browser // Assert that there are no errors emitted from the browser
const logs = await browser.manage().logs().get(logging.Type.BROWSER); const logs = await browser.manage().logs().get(logging.Type.BROWSER);
expect(logs).not.toContain(jasmine.objectContaining({ expect(logs).not.toContain(jasmine.objectContaining({
level: logging.Level.SEVERE, level: logging.Level.SEVERE,
} as logging.Entry)); } as logging.Entry));
}); });
}); });
import { browser, by, element } from 'protractor'; import { browser, by, element } from 'protractor';
export class AppPage { export class AppPage {
navigateTo() { navigateTo() {
return browser.get(browser.baseUrl) as Promise<any>; return browser.get(browser.baseUrl) as Promise<any>;
} }
getTitleText() { getTitleText() {
return element(by.css('app-root .content span')).getText() as Promise<string>; return element(by.css('app-root .content span')).getText() as Promise<string>;
} }
} }
{ {
"extends": "../../../tsconfig.json", "extends": "../../../tsconfig.json",
"compilerOptions": { "compilerOptions": {
"outDir": "../../../out-tsc/e2e", "outDir": "../../../out-tsc/e2e",
"module": "commonjs", "module": "commonjs",
"target": "es5", "target": "es5",
"types": [ "types": [
"jasmine", "jasmine",
"jasminewd2", "jasminewd2",
"node" "node"
] ]
} }
} }
// Karma configuration file, see link for more information // Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html // https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function (config) { module.exports = function (config) {
config.set({ config.set({
basePath: '', basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'], frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [ plugins: [
require('karma-jasmine'), require('karma-jasmine'),
require('karma-chrome-launcher'), require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'), require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'), require('karma-coverage-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma') require('@angular-devkit/build-angular/plugins/karma')
], ],
client: { client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser clearContext: false // leave Jasmine Spec Runner output visible in browser
}, },
coverageIstanbulReporter: { coverageIstanbulReporter: {
dir: require('path').join(__dirname, '../../coverage/bytebot-html'), dir: require('path').join(__dirname, '../../coverage/bytebot-html'),
reports: ['html', 'lcovonly', 'text-summary'], reports: ['html', 'lcovonly', 'text-summary'],
fixWebpackSourcePaths: true fixWebpackSourcePaths: true
}, },
reporters: ['progress', 'kjhtml'], reporters: ['progress', 'kjhtml'],
port: 9876, port: 9876,
colors: true, colors: true,
logLevel: config.LOG_INFO, logLevel: config.LOG_INFO,
autoWatch: true, autoWatch: true,
browsers: ['Chrome'], browsers: ['Chrome'],
singleRun: false, singleRun: false,
restartOnFileChange: true restartOnFileChange: true
}); });
}; };
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router'; import { Routes, RouterModule } from '@angular/router';
import { BaseLayoutComponent, NotFoundComponent } from '@xdf/layouts'; import { BaseLayoutComponent, NotFoundComponent } from '@xdf/layouts';
import { AuthGuard, LoginComponent } from '@xdf/security'; import { AuthGuard, LoginComponent } from '@xdf/security';
import { HomeComponent } from './views/home/home.component'; import { HomeComponent } from './views/home/home.component';
const routes: Routes = [ const routes: Routes = [
// Remover para SSO // Remover para SSO
{ path: 'login', component: LoginComponent }, { path: 'login', component: LoginComponent },
// Main redirect // Main redirect
{ path: '', redirectTo: 'home', pathMatch: 'full', canActivate: [AuthGuard] }, { path: '', redirectTo: 'home', pathMatch: 'full', canActivate: [AuthGuard] },
{ {
path: '', component: BaseLayoutComponent, path: '', component: BaseLayoutComponent,
children: [ children: [
{ path: 'home', component: HomeComponent, data: { breadcrumb: 'Home' } }, { path: 'home', component: HomeComponent, data: { breadcrumb: 'Home' } },
{ {
path: 'security', data: { breadcrumb: 'Seguridad' }, canLoad: [AuthGuard], path: 'security', data: { breadcrumb: 'Seguridad' }, canLoad: [AuthGuard],
loadChildren: () => import('./modules/security/security.module').then(m => m.SecurityModule) loadChildren: () => import('./modules/security/security.module').then(m => m.SecurityModule)
}, },
{ {
path: 'settings', data: { breadcrumb: 'Ajustes Generales' }, canLoad: [AuthGuard], path: 'settings', data: { breadcrumb: 'Ajustes Generales' }, canLoad: [AuthGuard],
loadChildren: () => import('./modules/settings/settings.module').then(m => m.SettingsModule) loadChildren: () => import('./modules/settings/settings.module').then(m => m.SettingsModule)
}, },
{ {
path: 'config', data: { breadcrumb: 'Agentes' }, canLoad: [AuthGuard], path: 'config', data: { breadcrumb: 'Agentes' }, canLoad: [AuthGuard],
loadChildren: () => import('./modules/agent/agent.module').then(m => m.AgentModule) loadChildren: () => import('./modules/agent/agent.module').then(m => m.AgentModule)
} },
{
], path: 'configuration', canLoad: [AuthGuard],
canActivate: [AuthGuard] loadChildren: () => import('./modules/configuration/configuration.module').then(m => m.ConfigurationModule)
}, }
{ path: 'notpermitted', component: NotFoundComponent},
],
// Handle all other routes canActivate: [AuthGuard]
{ path: '**', component: NotFoundComponent} },
]; { path: 'notpermitted', component: NotFoundComponent},
@NgModule({ // Handle all other routes
imports: [RouterModule.forRoot(routes, { { path: '**', component: NotFoundComponent}
scrollPositionRestoration: 'enabled', ];
anchorScrolling: 'enabled', \ No newline at end of file
onSameUrlNavigation: 'ignore'
})],
exports: [RouterModule]
})
export class AppRoutingModule { }
\ No newline at end of file
import { TestBed, async } from '@angular/core/testing'; import { TestBed, async } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing'; import { RouterTestingModule } from '@angular/router/testing';
import { AppComponent } from './app.component'; import { AppComponent } from './app.component';
describe('AppComponent', () => { describe('AppComponent', () => {
beforeEach(async(() => { beforeEach(async(() => {
TestBed.configureTestingModule({ TestBed.configureTestingModule({
imports: [ imports: [
RouterTestingModule RouterTestingModule
], ],
declarations: [ declarations: [
AppComponent AppComponent
], ],
}).compileComponents(); }).compileComponents();
})); }));
it('should create the app', () => { it('should create the app', () => {
const fixture = TestBed.createComponent(AppComponent); const fixture = TestBed.createComponent(AppComponent);
const app = fixture.debugElement.componentInstance; const app = fixture.debugElement.componentInstance;
expect(app).toBeTruthy(); expect(app).toBeTruthy();
}); });
it(`should have as title 'bytebot-html'`, () => { it(`should have as title 'bytebot-html'`, () => {
const fixture = TestBed.createComponent(AppComponent); const fixture = TestBed.createComponent(AppComponent);
const app = fixture.debugElement.componentInstance; const app = fixture.debugElement.componentInstance;
expect(app.title).toEqual('bytebot-html'); expect(app.title).toEqual('bytebot-html');
}); });
it('should render title', () => { it('should render title', () => {
const fixture = TestBed.createComponent(AppComponent); const fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges(); fixture.detectChanges();
const compiled = fixture.debugElement.nativeElement; const compiled = fixture.debugElement.nativeElement;
expect(compiled.querySelector('.content span').textContent).toContain('bytebot-html app is running!'); expect(compiled.querySelector('.content span').textContent).toContain('bytebot-html app is running!');
}); });
}); });
import { Component } from '@angular/core'; import { Component } from '@angular/core';
@Component({ @Component({
selector: 'byte-root', selector: 'byte-root',
templateUrl: './app.component.html', templateUrl: './app.component.html',
styleUrls: ['./app.component.scss'] styleUrls: ['./app.component.scss']
}) })
export class AppComponent { export class AppComponent {
title = 'bytebot-html'; title = 'bytebot-html';
} }
import { HttpRequest, HttpResponse, HttpHandler, HttpEvent, HttpInterceptor } from '@angular/common/http'; import { HttpRequest, HttpResponse, HttpHandler, HttpEvent, HttpInterceptor } from '@angular/common/http';
import { Observable, of, throwError } from 'rxjs'; import { Observable, of, throwError } from 'rxjs';
import { delay, mergeMap, materialize, dematerialize } from 'rxjs/operators'; import { delay, mergeMap, materialize, dematerialize } from 'rxjs/operators';
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import * as source from '../../assets/fake-data/programs-data.json'; import * as source from '../../assets/fake-data/programs-data.json';
import * as controlsSource from '../../assets/fake-data/controls-data.json'; import * as controlsSource from '../../assets/fake-data/controls-data.json';
const basePath = '/service/security/programs'; const basePath = '/service/security/programs';
const basePathCotnrols = '/service/security/controls'; const basePathCotnrols = '/service/security/controls';
@Injectable() @Injectable()
export class CustomProgramsFakeBackendInterceptor implements HttpInterceptor { export class CustomProgramsFakeBackendInterceptor implements HttpInterceptor {
intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> { intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
const { url, method, headers, body } = request; const { url, method, headers, body } = request;
const data = (source as any).default; const data = (source as any).default;
const dataControls = (controlsSource as any).default; const dataControls = (controlsSource as any).default;
return of(null) return of(null)
.pipe(mergeMap(handleRoute)) .pipe(mergeMap(handleRoute))
.pipe(materialize()) .pipe(materialize())
.pipe(delay(50)) .pipe(delay(50))
.pipe(dematerialize()); .pipe(dematerialize());
function handleRoute() { function handleRoute() {
switch (true) { switch (true) {
case url.match('.*' + basePath) && method === 'GET': case url.match('.*' + basePath) && method === 'GET':
return getList(); return getList();
case url.match('.*'+ basePathCotnrols + '.*') && method === 'GET': case url.match('.*'+ basePathCotnrols + '.*') && method === 'GET':
return getControls(); return getControls();
default: default:
// pass through any requests not handled above // pass through any requests not handled above
return next.handle(request); return next.handle(request);
} }
} }
function getList() { function getList() {
return ok(data); return ok(data);
} }
function getControls() { function getControls() {
return ok(dataControls); return ok(dataControls);
} }
// helper functions // helper functions
function ok(bodyContent?) { function ok(bodyContent?) {
return of(new HttpResponse({ status: 200, body: bodyContent })); return of(new HttpResponse({ status: 200, body: bodyContent }));
} }
function error(message: string) { function error(message: string) {
return throwError({ error: { message } }); return throwError({ error: { message } });
} }
} }
} }
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { AuthGuard } from '@xdf/security';
import { TemplateResolver, CrudDetailComponent, DirtyGuard, GridViewComponent, CrudGridComponent, RecordResolver } from '@xdf/gallery';
import { ResourceAuthGuard } from '@xdf/security';
import { UserRoleFormComponent, AccessDetailResolver } from '@xdf/settings';
import { AgentComponent } from './view/agent/agent.component';
const routes: Routes = [
{
path: 'agent', component: AgentComponent, canActivate: [AuthGuard, ResourceAuthGuard],
data: {
program: 'agent',
breadcrumb: 'breadcrumb.agent'
}
},
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
export class ConfigurationRoutingModule { }
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { TranslateModule } from '@ngx-translate/core';
import { ConfigurationRoutingModule } from './configuration-routing.module';
import { AgentComponent } from './view/agent/agent.component';
import { XdfGalleryModule } from '@xdf/gallery';
import { MatProgressSpinnerModule, MatTableModule, MatSortModule, MatIconModule, MatTooltipModule, MatPaginatorModule, MatButtonModule } from '@angular/material';
@NgModule({
declarations: [
AgentComponent
],
imports: [
CommonModule,
ConfigurationRoutingModule,
FormsModule,
MatButtonModule,
MatIconModule,
MatPaginatorModule,
MatProgressSpinnerModule,
MatSortModule,
MatTableModule,
MatTooltipModule,
ReactiveFormsModule,
TranslateModule,
XdfGalleryModule
]
})
export class ConfigurationModule { }
import { TestBed } from '@angular/core/testing';
import { AgentService } from './agent.service';
describe('AgentService', () => {
beforeEach(() => TestBed.configureTestingModule({}));
it('should be created', () => {
const service: AgentService = TestBed.get(AgentService);
expect(service).toBeTruthy();
});
});
import { Injectable } from '@angular/core';
import { DynaDataService } from '@xdf/gallery';
import { HttpClient } from '@angular/common/http';
@Injectable({
providedIn: 'root'
})
export class AgentService extends DynaDataService {
serviceURL = './service/agent';
constructor(private httpClient: HttpClient) {
super(httpClient);
}
}
<div class="wrapper wrapper-content animated fadeInRight">
<div class="row">
<div class="col-lg-12">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>{{'label.external.systems' | translate}}</h5>
</div>
<div class="ibox-content">
<div class="content">
<div class="grid-ibox-content">
<div class="filter-panel mat-elevation-z3">
<xdf-ngx-tags-input name="name" class="input-lg" [fields]="fieldFilters"
(filterEvent)="onFilter($event)"></xdf-ngx-tags-input>
</div>
<br />
<div class="grid-container mat-elevation-z3">
<div class="spinner-container" *ngIf="dataSource?.loading$ | async">
<mat-spinner diameter="40"></mat-spinner>
</div>
<table class="crud-table table table-striped table-hover" mat-table
[dataSource]="dataSource" matSort [matSortActive]="sortColumn"
[matSortDirection]="sortDirection" matSortDisableClear multiTemplateDataRows>
<ng-container matColumnDef="{{template.name}}"
*ngFor="let template of columnTemplateArray">
<div *ngIf="template.sortable">
<th mat-header-cell *matHeaderCellDef mat-sort-header>
{{ template.title | translate }}
<mat-icon *ngIf="sortColumn===template?.name">
<i class="fa fa-sort-amount-desc"
*ngIf="sortDirection === 'desc'"></i>
<i class="fa fa-sort-amount-asc"
*ngIf="sortDirection === 'asc'"></i>
</mat-icon>
</th>
</div>
<div *ngIf="!template.sortable">
<th mat-header-cell *matHeaderCellDef>{{ template.title | translate }}
</th>
</div>
<td mat-cell *matCellDef="let item"
[style.width]="template.width ? template.width : ''"
[ngClass]="{'td-view': !this.resourceAuth['view']}" (click)="view(item)">
<span *ngIf="template['name'] !== 'avatar'">{{ item[template['name']] }}</span>
<img *ngIf="template['name'] === 'avatar'" [src]="item[template['name']]" alt="Avatar" class="avatar">
</td>
</ng-container>
<ng-container matColumnDef="actions">
<th mat-header-cell *matHeaderCellDef></th>
<td class="text-center mat-cell cdk-column-actions mat-column-actions ng-star-inserted"
mat-cell="" role="gridcell" *matCellDef="let item">
<div class="btn-group">
<button class="btn btn-default btn-sm" (click)="edit(item)"
*ngIf="this.resourceAuth['edit']" type="button">
<i class="fa fa-edit"></i>
<span class="visible-md-inline visible-lg-inline visible-xl-inline">
{{'btn.edit' | translate}}
</span>
</button>
<button class="btn btn-default btn-sm" (click)="delete(item)"
*ngIf="this.resourceAuth['delete']" type="button">
<i class="fa fa-trash"></i>
<span class="visible-md-inline visible-lg-inline visible-xl-inline">
{{'btn.delete' | translate}}
</span>
</button>
</div>
</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
</table>
<div class="status-button-bar pull-left">
<button type="button" mat-icon-button
matTooltip="{{ 'action.grid.refresh' | translate }}" (click)="onRefresh()">
<i class="fa fa-refresh"></i>
</button>
</div>
<mat-paginator [length]="pagination?.totalItems" [pageSize]="pagination?.itemsPerPage"
[pageSizeOptions]="[5, 10, 15]" [pageIndex]="pagination?.currentPage">
</mat-paginator>
</div>
</div>
<!--Boton de Nuevo-->
<div class="toolbar-option">
<button color="default" mat-mini-fab="" class="mat-mini-fab"
matTooltip="{{'btn.new' | translate}}" (click)="create()"
*ngIf="this.resourceAuth['new']">
<span><i class="fa fa-file-o"></i></span>
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
.toolbar-option {
margin-left: 10px;
margin-right: 10px;
}
$fontcolor: #676a6c;
.content {
width: 100%;
display: flex;
padding-right: 0px !important;
.grid-container,
.filter-panel {
.crud-table {
margin-bottom: 0px;
width: 100%;
}
.form {
padding: 10px 20px 10px 20px;
}
}
.filter-panel {
margin-bottom: 10px;
}
}
.grid-ibox-content {
width: 100%;
}
.btn-group {
.btn {
font-size: 10px;
}
}
.td-view{
cursor: auto !important
}
.mat-row-auth:hover {
background-color: #f8f9fa;
cursor: pointer !important;
}
.spinner-container {
height: 100%;
width: 100%;
padding-top: 50px;
position: fixed;
}
.spinner-container {
height: 100%;
width: 100%;
padding-top: 50px;
position: fixed;
}
.spinner-container mat-spinner {
margin: -10px auto 0 auto;
}
th.mat-column-actions {
width: 1px !important;
padding-right: 0px !important;
}
td.mat-column-actions {
min-width: 170px;
padding-right: 20px !important;
cursor: default !important;
}
td {
vertical-align: middle !important;
color: $fontcolor;
font-size: 12px;
}
th {
vertical-align: middle !important;
}
tr.mat-header-row {
height: 50px !important;
}
tr.mat-footer-row,
tr.mat-row {
height: 40px !important;
}
.table-toolbar {
right: 10px;
top: 10px;
button {
font-size: 12px;
}
}
.status-button-bar {
button {
font-size: 16px;
}
padding-top: 8px;
padding-left: 15px;
}
.mat-raised-button {
padding: 0px 10px;
}
.icon-centered-button span.mat-button-wrapper {
display: flex;
}
.icon-centered-button mat-icon {
font-size: 15px;
padding-top: 2px;
}
::ng-deep .mat-sort-header-arrow {
visibility: hidden;
}
::ng-deep .mat-sort-header-button {
.mat-icon {
padding-left: 10px;
font-size: 12px;
padding-top: 5px;
}
}
th {
background: rgb(242, 242, 242);
}
tr.example-detail-row {
height: 0 !important;
}
tr.example-element-row:not(.example-expanded-row):hover {
background: #dedede;
cursor: pointer;
}
tr.example-element-row:not(.example-expanded-row):active {
background: #efefef;
}
.example-element-row td {
border-bottom-width: 0;
}
.example-element-detail {
overflow: hidden;
display: flex;
}
.example-detail-row td {
padding-top: 0px;
padding-bottom: 0px;
border: none !important;
background-color: #f2f2f2;
}
i.state {
font-size: 1.3em;
}
i.fa-key.pull-left {
color: rgba(128, 128, 128, 0.33);
margin-right: 6px;
}
//////
table {
width: 100%;
}
tr.mat-header-row {
height: 25px;
}
tr.mat-footer-row,
tr.mat-row {
height: 40px;
}
.button-grid {
margin: 2px 5px;
mat-icon {
padding-top: 2px;
}
}
.btn-header-new {
margin-top: -4px;
}
.btn-grid-filter {
height: 36px;
width: 85px;
padding-left: 0px;
padding-top: 2px;
}
.btn-grid-action {
padding: 0 10px;
line-height: 0em;
}
.mat-row:hover {
cursor: pointer;
background-color: #f8f9fa;
}
.spinner-container {
height: 100%;
width: 100%;
padding-top: 50px;
position: fixed;
}
.spinner-container mat-spinner {
margin: -10px auto 0 auto;
}
.mat-raised-button {
padding: 0px 10px;
}
.icon-centered-button span.mat-button-wrapper {
display: flex;
}
.icon-centered-button mat-icon {
font-size: 15px;
padding-top: 2px;
}
.ibox-content {
padding-right: 0px;
}
.content {
width: 100%;
display: flex;
padding-right: 0px !important;
}
.grid-ibox-content {
width: 100%;
}
.avatar {
vertical-align: middle;
width: 35px;
height: 35px;
border-radius: 50%;
}
\ No newline at end of file
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { AgentComponent } from './agent.component';
describe('AgentComponent', () => {
let component: AgentComponent;
let fixture: ComponentFixture<AgentComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ AgentComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(AgentComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit, ViewChild, ViewContainerRef, Input } from '@angular/core';
import { MatPaginator, MatSort } from '@angular/material';
import { ColumnTemplate, DynaDataSource, ConfirmationDialogService, extractRSQL, FieldFilter } from '@xdf/gallery';
import { Pagination, SortField, NotificationType, NotificationService } from '@xdf/commons';
import { Router, ActivatedRoute } from '@angular/router';
import { tap } from 'rxjs/operators';
import { TagFilter } from '@xdf/gallery/lib/views/gallery/ngx-tags-input/model/tag-filter';
import { TranslateService } from '@ngx-translate/core';
import { AgentService } from '../../services/agent.service';
const columnTemplateArray = [
{
name: 'avatar',
sortable: true,
title: 'etl_avatar',
visible: true,
filtable: true,
style: { width: 'auto' },
type: 'string',
aliasName: null,
queryName: null,
responsive: null,
styles: null,
values: null,
digitsInfo: null,
dateFormat: null,
colStyle: null
},
{
name: 'id',
sortable: true,
title: 'etl_code',
visible: true,
filtable: true,
style: { width: 'auto' },
type: 'number',
aliasName: null,
queryName: null,
responsive: null,
styles: null,
values: null,
digitsInfo: null,
dateFormat: null,
colStyle: null
},
{
name: 'name',
sortable: true,
title: 'etl_name',
visible: true,
filtable: true,
style: { width: 'auto' },
type: 'string',
aliasName: null,
queryName: null,
responsive: null,
styles: null,
values: null,
digitsInfo: null,
dateFormat: null,
colStyle: null
},
{
name: 'version',
sortable: true,
title: 'etl_version',
visible: true,
filtable: true,
style: { width: 'auto' },
type: 'string',
aliasName: null,
queryName: null,
responsive: null,
styles: null,
values: null,
digitsInfo: null,
dateFormat: null,
colStyle: null
},
{
name: 'status',
sortable: true,
title: 'etl_status',
visible: true,
filtable: true,
style: { width: 'auto' },
type: 'string',
aliasName: null,
queryName: null,
responsive: null,
styles: null,
values: null,
digitsInfo: null,
dateFormat: null,
colStyle: null
},
{
name: 'country',
sortable: true,
title: 'etl_country',
visible: true,
filtable: true,
style: { width: 'auto' },
type: 'string',
aliasName: null,
queryName: null,
responsive: null,
styles: null,
values: null,
digitsInfo: null,
dateFormat: null,
colStyle: null
},
{
name: 'timezone',
sortable: true,
title: 'etl_timezone',
visible: true,
filtable: true,
style: { width: 'auto' },
type: 'string',
aliasName: null,
queryName: null,
responsive: null,
styles: null,
values: null,
digitsInfo: null,
dateFormat: null,
colStyle: null
}
];
const fieldFilters = [
new FieldFilter('etl_code', 'id', 'id', 'number', undefined),
new FieldFilter('etl_abbreviation', 'abbreviation', 'abbreviation', 'string', undefined),
new FieldFilter('etl_name', 'name', 'name', 'string', undefined),
];
@Component({
selector: 'byte-agent',
templateUrl: './agent.component.html',
styleUrls: ['./agent.component.scss']
})
export class AgentComponent implements OnInit {
@ViewChild(MatPaginator, { static: false }) paginator: MatPaginator;
@ViewChild(MatSort, { static: false }) sort: MatSort;
sortColumn: string;
sortDirection: string;
statusQuickFilter: string;
pagingSize = 10;
programIdentifier = 'agent';
columnTemplateArray: ColumnTemplate[];
dataSource: DynaDataSource;
displayedColumns = new Array<string>();
fieldFilters: Array<FieldFilter> = fieldFilters;
filterTags = [];
pagination: Pagination;
public resourceAuth: any;
constructor(
private router: Router,
private route: ActivatedRoute,
private agentService: AgentService,
private notificationService: NotificationService,
private translateService: TranslateService,
protected confirmationDialogService: ConfirmationDialogService,
protected vcRef: ViewContainerRef
) { }
ngAfterViewInit(): void {
this.sort.sortChange.subscribe(() => {
if (!this.sort.disabled && this.sort.active) {
this.pagination.sortFields = new Array();
const sortField: SortField = new SortField();
sortField.direction = this.sortDirection = this.sort.direction;
sortField.field = this.sortColumn = this.sort.active;
this.pagination.sortFields.push(sortField);
}
this.paginator.pageIndex = 0;
this.dataSource.load(this.pagination);
});
this.paginator.page
.pipe(
tap(() => {
this.pagination.currentPage = this.paginator.pageIndex;
this.pagination.itemsPerPage = this.paginator.pageSize;
this.dataSource.load(this.pagination);
})
)
.subscribe();
}
ngOnInit() {
this.sortColumn = 'id';
this.sortDirection = 'asc';
const authList = this.route.snapshot.paramMap['authorization'];
if (authList) {
this.resourceAuth = new Object();
authList.forEach(option => {
this.resourceAuth[option] = true;
});
}
this.columnTemplateArray = columnTemplateArray;
this.dataSource = new DynaDataSource(this.agentService);
const previousState = JSON.parse(localStorage.getItem(this.programIdentifier + '-state'));
if (previousState) {
const PAG = 'pagination';
const FILTERS = 'filtersTags';
this.pagination = previousState[PAG];
this.filterTags = previousState[FILTERS];
localStorage.removeItem(this.programIdentifier + '-state');
} else {
// Paginación
this.pagination = new Pagination();
this.pagination.currentPage = 0;
this.pagination.itemsPerPage = this.pagingSize;
this.pagination.filterExpression = "id != 0";
// Ordenación por defecto
if (this.sortColumn && this.sortDirection) {
this.pagination.sortFields = new Array();
const sortField: SortField = new SortField();
sortField.direction = this.sortDirection;
sortField.field = this.sortColumn;
this.pagination.sortFields.push(sortField);
}
}
// calculando la columnas a pintar
this.columnTemplateArray.forEach(column => {
this.displayedColumns.push(column.name);
});
this.displayedColumns.push('actions');
this.dataSource.load(this.pagination);
}
onFilter(tags: Array<TagFilter>) {
this.filterTags = tags;
this.pagination.currentPage = 0;
// let tagsTemp = tags.slice();
const tagsTemp = tags.map(a => Object.assign({}, a));
for (let i = 0; i < tagsTemp.length; i++) {
if (tagsTemp[i].column !== 'id') {
tagsTemp[i].value = tagsTemp[i].value;
}
}
this.pagination.filterExpression = extractRSQL(tagsTemp);
if (this.pagination.filterExpression == null || this.pagination.filterExpression == undefined) {
this.pagination.filterExpression = "id != 0";
}
this.dataSource.load(this.pagination);
}
onRefresh() {
this.dataSource.load(this.pagination);
}
delete(item) {
this.confirmationDialogService.loadComponent(
this.vcRef,
'title.delete.confirmation',
'message.delete.confirmation').subscribe(result => {
if (result) {
this.agentService.delete(item.id).subscribe((rslt: any) => {
if (rslt.statusCode != 200) {
this.notificationService.showMessage(
this.translateService.instant(rslt.message), this.translateService.instant('label.error.message.title'), NotificationType.error);
} else {
this.dataSource.load(this.pagination);
}
}
);
}
});
}
edit(item) {
this.router.navigate(['/etl/external-system/detail/edit/' + item.id]);
}
view(item) {
this.router.navigate(['/etl/external-system/detail/view/' + item.id]);
}
create() {
this.router.navigate(['/etl/external-system/detail/new']);
}
}
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router'; import { Routes, RouterModule } from '@angular/router';
import { AuthGuard } from '@xdf/security'; import { AuthGuard } from '@xdf/security';
import { TemplateResolver, CrudDetailComponent, DirtyGuard, GridViewComponent, CrudGridComponent, RecordResolver } from '@xdf/gallery'; import { TemplateResolver, CrudDetailComponent, DirtyGuard, GridViewComponent, CrudGridComponent, RecordResolver } from '@xdf/gallery';
import { ResourceAuthGuard } from '@xdf/security'; import { ResourceAuthGuard } from '@xdf/security';
import { UserRoleFormComponent, AccessDetailResolver } from '@xdf/settings'; import { UserRoleFormComponent, AccessDetailResolver } from '@xdf/settings';
const routes: Routes = [ const routes: Routes = [
{ {
path: 'user-role', component: GridViewComponent, canActivate: [AuthGuard, ResourceAuthGuard], path: 'user-role', component: GridViewComponent, canActivate: [AuthGuard, ResourceAuthGuard],
resolve: { template: TemplateResolver }, resolve: { template: TemplateResolver },
data: { data: {
program: 'user_role', program: 'user_role',
breadcrumb: 'breadcrumb.user.role' breadcrumb: 'breadcrumb.user.role'
} }
}, },
{ {
path: 'user-role/detail/:mode', component: UserRoleFormComponent, canActivate: [AuthGuard, ResourceAuthGuard], canDeactivate: [DirtyGuard], path: 'user-role/detail/:mode', component: UserRoleFormComponent, canActivate: [AuthGuard, ResourceAuthGuard], canDeactivate: [DirtyGuard],
resolve: { record: RecordResolver, accessList: AccessDetailResolver }, resolve: { record: RecordResolver, accessList: AccessDetailResolver },
data: { data: {
program: 'user_role', program: 'user_role',
breadcrumb: 'breadcrumb.user.role.detail' breadcrumb: 'breadcrumb.user.role.detail'
} }
}, },
{ {
path: 'user', component: CrudGridComponent, canActivate: [AuthGuard, ResourceAuthGuard], path: 'user', component: CrudGridComponent, canActivate: [AuthGuard, ResourceAuthGuard],
resolve: { template: TemplateResolver }, resolve: { template: TemplateResolver },
data: { data: {
innerTemplate: 'none', innerTemplate: 'none',
program: 'user', program: 'user',
breadcrumb: 'breadcrumb.user' breadcrumb: 'breadcrumb.user'
} }
}, },
{ {
path: 'user/detail/:mode', component: CrudDetailComponent, canActivate: [AuthGuard, ResourceAuthGuard], canDeactivate: [DirtyGuard], path: 'user/detail/:mode', component: CrudDetailComponent, canActivate: [AuthGuard, ResourceAuthGuard], canDeactivate: [DirtyGuard],
resolve: { record: RecordResolver }, resolve: { record: RecordResolver },
data: { data: {
program: 'user', program: 'user',
breadcrumb: 'breadcrumb.user.detail' breadcrumb: 'breadcrumb.user.detail'
} }
} }
]; ];
@NgModule({ @NgModule({
imports: [RouterModule.forChild(routes)], imports: [RouterModule.forChild(routes)],
exports: [RouterModule] exports: [RouterModule]
}) })
export class SecurityRoutingModule { } export class SecurityRoutingModule { }
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { DirtyGuard, XdfGalleryModule } from '@xdf/gallery'; import { DirtyGuard, XdfGalleryModule } from '@xdf/gallery';
import { SecurityRoutingModule } from './security-routing.module'; import { SecurityRoutingModule } from './security-routing.module';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { TranslateModule } from '@ngx-translate/core'; import { TranslateModule } from '@ngx-translate/core';
import { XdfSettingsModule } from '@xdf/settings'; import { XdfSettingsModule } from '@xdf/settings';
@NgModule({ @NgModule({
declarations: [ declarations: [
], ],
imports: [ imports: [
CommonModule, CommonModule,
FormsModule, FormsModule,
ReactiveFormsModule, ReactiveFormsModule,
TranslateModule, TranslateModule,
XdfGalleryModule, XdfGalleryModule,
XdfSettingsModule, XdfSettingsModule,
SecurityRoutingModule SecurityRoutingModule
], ],
entryComponents:[ entryComponents:[
], ],
providers: [ providers: [
{ provide: DirtyGuard, useClass: DirtyGuard } { provide: DirtyGuard, useClass: DirtyGuard }
] ]
}) })
export class SecurityModule { } export class SecurityModule { }
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router'; import { Routes, RouterModule } from '@angular/router';
import { AuthGuard } from '@xdf/security'; import { AuthGuard } from '@xdf/security';
import { DirtyGuard, TemplateResolver, CrudGridComponent, EditableDataTableTemplateResolver, CrudDetailComponent, FormViewComponent, ListResolver, RecordResolver } from '@xdf/gallery'; import { DirtyGuard, TemplateResolver, CrudGridComponent, EditableDataTableTemplateResolver, CrudDetailComponent, FormViewComponent, ListResolver, RecordResolver } from '@xdf/gallery';
import { ResourceAuthGuard } from '@xdf/security'; import { ResourceAuthGuard } from '@xdf/security';
import { ApplicationFormComponent, ValposFormComponent } from '@xdf/settings'; import { ApplicationFormComponent, ValposFormComponent } from '@xdf/settings';
import { TabsLayoutComponent, TabsTemplateResolver } from '@xdf/layouts'; import { TabsLayoutComponent, TabsTemplateResolver } from '@xdf/layouts';
const routes: Routes = [ const routes: Routes = [
{ {
path: "system-settings", component: TabsLayoutComponent, path: "system-settings", component: TabsLayoutComponent,
resolve: { template: TabsTemplateResolver }, resolve: { template: TabsTemplateResolver },
data: { data: {
templateName: "system-settings", templateName: "system-settings",
}, },
children: [ children: [
{ path: 'information', component: FormViewComponent, canActivate: [AuthGuard, ResourceAuthGuard], canDeactivate: [DirtyGuard], { path: 'information', component: FormViewComponent, canActivate: [AuthGuard, ResourceAuthGuard], canDeactivate: [DirtyGuard],
resolve: { record: ListResolver }, resolve: { record: ListResolver },
data: { data: {
option: 'information', option: 'information',
program: 'system_settings_information', program: 'system_settings_information',
breadcrumb: 'breadcrumb.settings.information' breadcrumb: 'breadcrumb.settings.information'
} }
}, },
{ path: 'information/:mode', component: FormViewComponent, canActivate: [AuthGuard, ResourceAuthGuard], canDeactivate: [DirtyGuard], { path: 'information/:mode', component: FormViewComponent, canActivate: [AuthGuard, ResourceAuthGuard], canDeactivate: [DirtyGuard],
resolve: { ecord: ListResolver }, resolve: { ecord: ListResolver },
data: { data: {
withoutGrid: true, withoutGrid: true,
option: 'information', option: 'information',
program: 'system_settings_information', program: 'system_settings_information',
breadcrumb: 'breadcrumb.settings.information' breadcrumb: 'breadcrumb.settings.information'
} }
}, },
{ path: 'password', component: FormViewComponent, canActivate: [AuthGuard, ResourceAuthGuard], canDeactivate: [DirtyGuard], { path: 'password', component: FormViewComponent, canActivate: [AuthGuard, ResourceAuthGuard], canDeactivate: [DirtyGuard],
resolve: { record: ListResolver }, resolve: { record: ListResolver },
data: { data: {
option: 'password', option: 'password',
program: 'system_settings_password', program: 'system_settings_password',
breadcrumb: 'breadcrumb.settings.password' breadcrumb: 'breadcrumb.settings.password'
} }
}, },
{ path: 'password/:mode', component: FormViewComponent, canActivate: [AuthGuard, ResourceAuthGuard], canDeactivate: [DirtyGuard], { path: 'password/:mode', component: FormViewComponent, canActivate: [AuthGuard, ResourceAuthGuard], canDeactivate: [DirtyGuard],
resolve: { record: ListResolver }, resolve: { record: ListResolver },
data: { data: {
withoutGrid: true, withoutGrid: true,
option: 'password', option: 'password',
program: 'system_settings_password', program: 'system_settings_password',
breadcrumb: 'breadcrumb.settings.password' breadcrumb: 'breadcrumb.settings.password'
} }
}, },
{ path: 'userpolicy', component: FormViewComponent, canActivate: [AuthGuard, ResourceAuthGuard], canDeactivate: [DirtyGuard], { path: 'userpolicy', component: FormViewComponent, canActivate: [AuthGuard, ResourceAuthGuard], canDeactivate: [DirtyGuard],
resolve: { record: ListResolver }, resolve: { record: ListResolver },
data: { data: {
option: 'userpolicy', option: 'userpolicy',
program: 'system_settings_userpolicy', program: 'system_settings_userpolicy',
breadcrumb: 'breadcrumb.settings.userpolicy' breadcrumb: 'breadcrumb.settings.userpolicy'
} }
}, },
{ path: 'userpolicy/:mode', component: FormViewComponent, canActivate: [AuthGuard, ResourceAuthGuard], canDeactivate: [DirtyGuard], { path: 'userpolicy/:mode', component: FormViewComponent, canActivate: [AuthGuard, ResourceAuthGuard], canDeactivate: [DirtyGuard],
resolve: { record: ListResolver }, resolve: { record: ListResolver },
data: { data: {
withoutGrid: true, withoutGrid: true,
option: 'userpolicy', option: 'userpolicy',
program: 'system_settings_userpolicy', program: 'system_settings_userpolicy',
breadcrumb: 'breadcrumb.settings.userpolicy' breadcrumb: 'breadcrumb.settings.userpolicy'
} }
} }
] ]
}, },
{ {
path: 'application', component: CrudGridComponent, canActivate: [AuthGuard, ResourceAuthGuard], path: 'application', component: CrudGridComponent, canActivate: [AuthGuard, ResourceAuthGuard],
resolve: { template: TemplateResolver }, resolve: { template: TemplateResolver },
data: { data: {
program: 'application', program: 'application',
breadcrumb: 'breadcrumb.application' breadcrumb: 'breadcrumb.application'
} }
}, },
{ {
path: 'application/detail/:mode', component: ApplicationFormComponent, canActivate: [AuthGuard, ResourceAuthGuard], canDeactivate: [DirtyGuard], path: 'application/detail/:mode', component: ApplicationFormComponent, canActivate: [AuthGuard, ResourceAuthGuard], canDeactivate: [DirtyGuard],
resolve: { record: RecordResolver }, resolve: { record: RecordResolver },
data: { data: {
program: 'application', program: 'application',
breadcrumb: 'breadcrumb.application.detail' breadcrumb: 'breadcrumb.application.detail'
} }
}, },
{ {
path: 'valpos', component: CrudGridComponent, canActivate: [AuthGuard, ResourceAuthGuard], path: 'valpos', component: CrudGridComponent, canActivate: [AuthGuard, ResourceAuthGuard],
resolve: { template: TemplateResolver }, resolve: { template: TemplateResolver },
data: { data: {
program: 'valpos', program: 'valpos',
breadcrumb: 'breadcrumb.valpos' breadcrumb: 'breadcrumb.valpos'
} }
}, },
{ {
path: 'valpos/detail/:mode', component: ValposFormComponent, canActivate: [AuthGuard, ResourceAuthGuard], canDeactivate: [DirtyGuard], path: 'valpos/detail/:mode', component: ValposFormComponent, canActivate: [AuthGuard, ResourceAuthGuard], canDeactivate: [DirtyGuard],
resolve: { record: RecordResolver, editableTableTemplate: EditableDataTableTemplateResolver }, resolve: { record: RecordResolver, editableTableTemplate: EditableDataTableTemplateResolver },
data: { data: {
program: 'valpos', program: 'valpos',
breadcrumb: 'breadcrumb.valpos.detail', breadcrumb: 'breadcrumb.valpos.detail',
editableTableTemplate: 'valpos-detail' editableTableTemplate: 'valpos-detail'
} }
} }
]; ];
@NgModule({ @NgModule({
imports: [RouterModule.forChild(routes)], imports: [RouterModule.forChild(routes)],
exports: [RouterModule] exports: [RouterModule]
}) })
export class SettingsRoutingModule { } export class SettingsRoutingModule { }
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { DirtyGuard, XdfGalleryModule, EditableDataTableTemplateResolver } from '@xdf/gallery'; import { DirtyGuard, XdfGalleryModule, EditableDataTableTemplateResolver } from '@xdf/gallery';
import { SettingsRoutingModule } from './settings-routing.module'; import { SettingsRoutingModule } from './settings-routing.module';
import { TranslateModule } from '@ngx-translate/core'; import { TranslateModule } from '@ngx-translate/core';
import { ReactiveFormsModule, FormsModule } from '@angular/forms'; import { ReactiveFormsModule, FormsModule } from '@angular/forms';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import { MatFormFieldModule, MatSelectModule, MatTooltipModule, MatButtonModule } from '@angular/material'; import { MatFormFieldModule, MatSelectModule, MatTooltipModule, MatButtonModule } from '@angular/material';
import { XdfSettingsModule } from '@xdf/settings'; import { XdfSettingsModule } from '@xdf/settings';
import { XdfLayoutsModule } from '@xdf/layouts'; import { XdfLayoutsModule } from '@xdf/layouts';
@NgModule({ @NgModule({
declarations: [ declarations: [
], ],
imports: [ imports: [
CommonModule, CommonModule,
FormsModule, FormsModule,
ReactiveFormsModule, ReactiveFormsModule,
TranslateModule, TranslateModule,
SettingsRoutingModule, SettingsRoutingModule,
MatFormFieldModule, MatFormFieldModule,
MatSelectModule, MatSelectModule,
MatTooltipModule, MatTooltipModule,
XdfGalleryModule, XdfGalleryModule,
XdfSettingsModule, XdfSettingsModule,
XdfLayoutsModule, XdfLayoutsModule,
MatButtonModule MatButtonModule
], ],
entryComponents: [ entryComponents: [
], ],
providers: [ providers: [
{ provide: DirtyGuard, useClass: DirtyGuard }, { provide: DirtyGuard, useClass: DirtyGuard },
EditableDataTableTemplateResolver EditableDataTableTemplateResolver
] ]
}) })
export class SettingsModule { } export class SettingsModule { }
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { HomeComponent } from './home.component'; import { HomeComponent } from './home.component';
describe('HomeComponent', () => { describe('HomeComponent', () => {
let component: HomeComponent; let component: HomeComponent;
let fixture: ComponentFixture<HomeComponent>; let fixture: ComponentFixture<HomeComponent>;
beforeEach(async(() => { beforeEach(async(() => {
TestBed.configureTestingModule({ TestBed.configureTestingModule({
declarations: [ HomeComponent ] declarations: [ HomeComponent ]
}) })
.compileComponents(); .compileComponents();
})); }));
beforeEach(() => { beforeEach(() => {
fixture = TestBed.createComponent(HomeComponent); fixture = TestBed.createComponent(HomeComponent);
component = fixture.componentInstance; component = fixture.componentInstance;
fixture.detectChanges(); fixture.detectChanges();
}); });
it('should create', () => { it('should create', () => {
expect(component).toBeTruthy(); expect(component).toBeTruthy();
}); });
}); });
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
@Component({ @Component({
selector: 'byte-home', selector: 'byte-home',
templateUrl: './home.component.html', templateUrl: './home.component.html',
styleUrls: ['./home.component.scss'] styleUrls: ['./home.component.scss']
}) })
export class HomeComponent implements OnInit { export class HomeComponent implements OnInit {
constructor() { } constructor() { }
ngOnInit() { ngOnInit() {
} }
} }
[ [
{ {
"view":"(UTC-11:00) Midway, Niue, Pago Pago", "view":"(UTC-11:00) Midway, Niue, Pago Pago",
"gmt":"-11:00" "gmt":"-11:00"
}, },
{ {
"view":"(UTC-10:00) Honolulu, Tahiti", "view":"(UTC-10:00) Honolulu, Tahiti",
"gmt":"-10:00" "gmt":"-10:00"
}, },
{ {
"view":"(UTC-9:30) Marquesas", "view":"(UTC-9:30) Marquesas",
"gmt":"-9:30" "gmt":"-9:30"
}, },
{ {
"view":"(UTC-9:00) Juneau, Nome, Gambier", "view":"(UTC-9:00) Juneau, Nome, Gambier",
"gmt":"-9:00" "gmt":"-9:00"
}, },
{ {
"view":"(UTC-8:00) Dawson, Los Angeles, Tijuana, Vancouver", "view":"(UTC-8:00) Dawson, Los Angeles, Tijuana, Vancouver",
"gmt":"-8:00" "gmt":"-8:00"
}, },
{ {
"view":"(UTC-7:00) Boise, Phoenix, Edmonton, Inuvik", "view":"(UTC-7:00) Boise, Phoenix, Edmonton, Inuvik",
"gmt":"-7:00" "gmt":"-7:00"
}, },
{ {
"view":"(UTC-6:00) Belize, Chicago, Costa Rica, El Salvador, Guatemala, Managua, Mexico City", "view":"(UTC-6:00) Belize, Chicago, Costa Rica, El Salvador, Guatemala, Managua, Mexico City",
"gmt":"-6:00" "gmt":"-6:00"
}, },
{ {
"view":"(UTC-5:00) Bogota, Cancun, Detroit, Lima, New York, Panama, Toronto", "view":"(UTC-5:00) Bogota, Cancun, Detroit, Lima, New York, Panama, Toronto",
"gmt":"-5:00" "gmt":"-5:00"
}, },
{ {
"view":"(UTC-4:00) Aruba, Barbados, Caracas, Guyana, La Paz, Manaus, Santiago, Puerto Rico", "view":"(UTC-4:00) Aruba, Barbados, Caracas, Guyana, La Paz, Manaus, Santiago, Puerto Rico",
"gmt":"-4:00" "gmt":"-4:00"
}, },
{ {
"view":"(UTC-3:30) St Johns", "view":"(UTC-3:30) St Johns",
"gmt":"-3:30" "gmt":"-3:30"
}, },
{ {
"view":"(UTC-3:00) Buenos Aires, Bahia, Cayenne, Montevideo", "view":"(UTC-3:00) Buenos Aires, Bahia, Cayenne, Montevideo",
"gmt":"-3:00" "gmt":"-3:00"
}, },
{ {
"view":"(UTC-2:00) Noronha, South Georgia", "view":"(UTC-2:00) Noronha, South Georgia",
"gmt":"-2:00" "gmt":"-2:00"
}, },
{ {
"view":"(UTC-1:00) Scoresbysund, Azores, Cape Verde", "view":"(UTC-1:00) Scoresbysund, Azores, Cape Verde",
"gmt":"-1:00" "gmt":"-1:00"
}, },
{ {
"view":"(UTC) Hora universal coordinada", "view":"(UTC) Hora universal coordinada",
"gmt":"0:00" "gmt":"0:00"
}, },
{ {
"view":"(UTC+1:00) Algiers, Madrid, Berlin, Bruselas, Lagos, Túnez, Niamey, Amsterdam", "view":"(UTC+1:00) Algiers, Madrid, Berlin, Bruselas, Lagos, Túnez, Niamey, Amsterdam",
"gmt":"+1:00" "gmt":"+1:00"
}, },
{ {
"view":"(UTC+2:00) Cairo, Harare, Tripoli, Gaza, Atenas", "view":"(UTC+2:00) Cairo, Harare, Tripoli, Gaza, Atenas",
"gmt":"+2:00" "gmt":"+2:00"
}, },
{ {
"view":"(UTC+3:00) Qatar, Moscú, Simferopol ", "view":"(UTC+3:00) Qatar, Moscú, Simferopol ",
"gmt":"+3:00" "gmt":"+3:00"
}, },
{ {
"view":"(UTC+3:30) Tehran", "view":"(UTC+3:30) Tehran",
"gmt":"+3:30" "gmt":"+3:30"
}, },
{ {
"view":"(UTC+4:00) Baku, Dubai", "view":"(UTC+4:00) Baku, Dubai",
"gmt":"+4:00" "gmt":"+4:00"
}, },
{ {
"view":"(UTC+4:30) Kabul ", "view":"(UTC+4:30) Kabul ",
"gmt":"+4:30" "gmt":"+4:30"
}, },
{ {
"view":"(UTC+5:00) Mawson, Aqtobe, Karachi, Maldivas", "view":"(UTC+5:00) Mawson, Aqtobe, Karachi, Maldivas",
"gmt":"+5:00" "gmt":"+5:00"
}, },
{ {
"view":"(UTC+5:30) Colombo, Kolkata ", "view":"(UTC+5:30) Colombo, Kolkata ",
"gmt":"+5:30" "gmt":"+5:30"
}, },
{ {
"view":"(UTC+5:45) Kathmandu", "view":"(UTC+5:45) Kathmandu",
"gmt":"+5:45" "gmt":"+5:45"
}, },
{ {
"view":"(UTC+6:00) Bishkek, Novosibirsk, Qyzylorda", "view":"(UTC+6:00) Bishkek, Novosibirsk, Qyzylorda",
"gmt":"+6:00" "gmt":"+6:00"
}, },
{ {
"view":"(UTC+7:00) Bangkok, Indonesia, Barnaul ", "view":"(UTC+7:00) Bangkok, Indonesia, Barnaul ",
"gmt":"+7:00" "gmt":"+7:00"
}, },
{ {
"view":"(UTC+8:00) Macau, Shanghai, Singapore", "view":"(UTC+8:00) Macau, Shanghai, Singapore",
"gmt":"+8:00" "gmt":"+8:00"
}, },
{ {
"view":"(UTC+8:30) Pyongyang", "view":"(UTC+8:30) Pyongyang",
"gmt":"+8:30" "gmt":"+8:30"
}, },
{ {
"view":"(UTC+8:45) Eucla", "view":"(UTC+8:45) Eucla",
"gmt":"+8:45" "gmt":"+8:45"
}, },
{ {
"view":"(UTC+9:00) Chita, Jayapura, Tokyo, Palau", "view":"(UTC+9:00) Chita, Jayapura, Tokyo, Palau",
"gmt":"+9:00" "gmt":"+9:00"
}, },
{ {
"view":"(UTC+9:30) Darwin, Adelaide", "view":"(UTC+9:30) Darwin, Adelaide",
"gmt":"+9:30" "gmt":"+9:30"
}, },
{ {
"view":"(UTC+10:00) Vladivostok, Brisbane, Hobart", "view":"(UTC+10:00) Vladivostok, Brisbane, Hobart",
"gmt":"+10:00" "gmt":"+10:00"
}, },
{ {
"view":"(UTC+10:30) Lord Howe", "view":"(UTC+10:30) Lord Howe",
"gmt":"+10:30" "gmt":"+10:30"
}, },
{ {
"view":"(UTC+11:00) Magadan, Bougainville, Guadalcanal", "view":"(UTC+11:00) Magadan, Bougainville, Guadalcanal",
"gmt":"+11:00" "gmt":"+11:00"
}, },
{ {
"view":"(UTC+12:00) Kamchatka, Auckland, Majuro", "view":"(UTC+12:00) Kamchatka, Auckland, Majuro",
"gmt":"+12:00" "gmt":"+12:00"
}, },
{ {
"view":"(UTC+12:45) Chatham", "view":"(UTC+12:45) Chatham",
"gmt":"+12:45" "gmt":"+12:45"
}, },
{ {
"view":"(UTC+13:00) Apia, Enderbury, Tongatapu ", "view":"(UTC+13:00) Apia, Enderbury, Tongatapu ",
"gmt":"+13:00" "gmt":"+13:00"
}, },
{ {
"view":"(UTC+14:00) Kiritimati ", "view":"(UTC+14:00) Kiritimati ",
"gmt":"+14:00" "gmt":"+14:00"
} }
] ]
\ No newline at end of file
[ [
{ {
"id": 30, "id": 30,
"name": "security", "name": "security",
"label": "menu.security", "label": "menu.security",
"icon": "<i class=\"fa fa-address-book\"></i>", "icon": "<i class=\"fa fa-address-book\"></i>",
"fullPath": "/security", "fullPath": "/security",
"singlePath": "security", "singlePath": "security",
"isProgram": false, "isProgram": false,
"children": [ "children": [
{ {
"id": 32, "id": 32,
"name": "user", "name": "user",
"label": "menu.security.user", "label": "menu.security.user",
"icon": null, "icon": null,
"fullPath": "/security/user", "fullPath": "/security/user",
"singlePath": "user", "singlePath": "user",
"isProgram": true, "isProgram": true,
"children": [] "children": []
}, },
{ {
"id": 32, "id": 32,
"name": "user_role", "name": "user_role",
"label": "menu.security.user.role", "label": "menu.security.user.role",
"icon": null, "icon": null,
"fullPath": "/security/user-role", "fullPath": "/security/user-role",
"singlePath": "user-role", "singlePath": "user-role",
"isProgram": true, "isProgram": true,
"children": [] "children": []
} }
] ]
}, },
{ {
"id": 37, "id": 37,
"name": "agent", "name": "agent",
"label": "menu.parent.agent", "label": "menu.parent.agent",
"icon": "<i class=\"fa fa-cog\"></i>", "icon": "<i class=\"fa fa-cog\"></i>",
"fullPath": "/config/agent", "fullPath": "/config/agent",
"singlePath": "config", "singlePath": "config",
"isProgram": true, "isProgram": true,
"children": [] "children": []
} }
] ]
[ [
{ "user": "./assets/definitions/security-definitions/user.json" }, { "user": "./assets/definitions/security-definitions/user.json" },
{ "user_role": "./assets/definitions/security-definitions/user-role.json" }, { "user_role": "./assets/definitions/security-definitions/user-role.json" },
{ "system_settings_information": "./assets/definitions/setting-definitions/system-settings-information.json" }, { "system_settings_information": "./assets/definitions/setting-definitions/system-settings-information.json" },
{ "system_settings_password": "./assets/definitions/setting-definitions/system-settings-password.json" }, { "system_settings_password": "./assets/definitions/setting-definitions/system-settings-password.json" },
{ "system_settings_userpolicy": "./assets/definitions/setting-definitions/system-settings-userpolicy.json" }, { "system_settings_userpolicy": "./assets/definitions/setting-definitions/system-settings-userpolicy.json" },
{ "application": "./assets/definitions/setting-definitions/application.json" }, { "application": "./assets/definitions/setting-definitions/application.json" },
{ "valpos": "./assets/definitions/setting-definitions/valpos.json"} { "valpos": "./assets/definitions/setting-definitions/valpos.json"}
] ]
\ No newline at end of file
{ {
"label": { "label": {
"type": "text", "type": "text",
"required": true "required": true
}, },
"value": { "value": {
"type": "text", "type": "text",
"required": true "required": true
} }
} }
\ No newline at end of file
{ {
"name": "user_role", "name": "user_role",
"title": "user.role.title", "title": "user.role.title",
"fieldToShowInActon": "identifier", "fieldToShowInActon": "identifier",
"icon": "<span class=\"material-icons\">supervisor_account</span>", "icon": "<span class=\"material-icons\">supervisor_account</span>",
"service": "./service/user-role", "service": "./service/user-role",
"recordId": "id", "recordId": "id",
"showFormIn": "standard", "showFormIn": "standard",
"definitionReport": "user-role-report-1", "definitionReport": "user-role-report-1",
"attributes": [ "attributes": [
{ {
"name": "id", "name": "id",
"type": "number", "type": "number",
"formOptions": { "formOptions": {
"options": { "options": {
"hideInNew": true, "hideInNew": true,
"readonly": true, "readonly": true,
"styleClass": "col-xs-3 col-sm-6 col-md-3" "styleClass": "col-xs-3 col-sm-6 col-md-3"
}, },
"validators": [ "validators": [
"required" "required"
], ],
"controlType": "number" "controlType": "number"
} }
}, },
{ {
"name": "identifier", "name": "identifier",
"type": "string", "type": "string",
"formOptions": { "formOptions": {
"options": { "options": {
"styleClass": "col-md-6", "styleClass": "col-md-6",
"showLength": true, "showLength": true,
"maxLength": 80 "maxLength": 80
}, },
"validators": [ "validators": [
"required" "required"
] ]
} }
}, },
{ {
"name": "description", "name": "description",
"type": "string", "type": "string",
"formOptions": { "formOptions": {
"options": { "options": {
"styleClass": "col-md-6", "styleClass": "col-md-6",
"showLength": true, "showLength": true,
"maxLength": 120 "maxLength": 120
}, },
"validators": [ "validators": [
"required" "required"
] ]
} }
} }
], ],
"grid": [ "grid": [
{ {
"sortColumnDefault": "id", "sortColumnDefault": "id",
"sortColumnDirection": "desc", "sortColumnDirection": "desc",
"pagingSize": 5, "pagingSize": 5,
"expandRow": false, "expandRow": false,
"columns": [ "columns": [
{ {
"name": "id", "name": "id",
"sortable": true, "sortable": true,
"style": {"width": "100px"}, "style": {"width": "100px"},
"optional": false, "optional": false,
"filter": true "filter": true
}, },
{ {
"name": "identifier", "name": "identifier",
"sortable": true, "sortable": true,
"style": {"width": "180px"}, "style": {"width": "180px"},
"filter": true "filter": true
}, },
{ {
"name": "description", "name": "description",
"sortable": true, "sortable": true,
"style": {"width": "180px"}, "style": {"width": "180px"},
"filter": true "filter": true
} }
] ]
} }
] ]
} }
\ No newline at end of file
{ {
"name": "system_settings_information", "name": "system_settings_information",
"title": "system_settings_information_title", "title": "system_settings_information_title",
"titleDesc": "system_settings_information_title_desc", "titleDesc": "system_settings_information_title_desc",
"icon": "<i class=\"fa fa-info-circle fa-2x\"></i>", "icon": "<i class=\"fa fa-info-circle fa-2x\"></i>",
"service": "./service/system-settings/information", "service": "./service/system-settings/information",
"attributes": [ "attributes": [
{ {
"name": "name", "name": "name",
"type": "string", "type": "string",
"formOptions": { "formOptions": {
"options": { "options": {
"max-length": "200", "max-length": "200",
"styleClass": "col-12" "styleClass": "col-12"
}, },
"validators": [ "validators": [
"required" "required"
] ]
} }
}, },
{ {
"name": "email", "name": "email",
"type": "string", "type": "string",
"formOptions": { "formOptions": {
"options": { "options": {
"rightIcon": "mail", "rightIcon": "mail",
"rightIconLabel": "", "rightIconLabel": "",
"showLength": true, "showLength": true,
"maxLength": 200, "maxLength": 200,
"styleClass": "col-12" "styleClass": "col-12"
}, },
"validators": [ "validators": [
"required", "required",
"email" "email"
] ]
} }
}, },
{ {
"name": "domain", "name": "domain",
"type": "string", "type": "string",
"formOptions": { "formOptions": {
"options": { "options": {
"rightIcon": "http", "rightIcon": "http",
"rightIconLabel": "", "rightIconLabel": "",
"showLength": true, "showLength": true,
"maxLength": 200, "maxLength": 200,
"styleClass": "col-12" "styleClass": "col-12"
}, },
"validators": [ "validators": [
"required", "required",
"url" "url"
] ]
} }
}, },
{ {
"name": "image", "name": "image",
"type": "file-upload", "type": "file-upload",
"formOptions": { "formOptions": {
"options": { "options": {
"text": "btn.upload.image", "text": "btn.upload.image",
"param": "file", "param": "file",
"target": "./service/file/upload", "target": "./service/file/upload",
"height": "250px", "height": "250px",
"styleClass": "col-6" "styleClass": "col-6"
}, },
"controlType": "file-upload" "controlType": "file-upload"
} }
} }
], ],
"groups": [ "groups": [
{ {
"name": "info", "name": "info",
"title": "", "title": "",
"description": "settings_information_group_info_description", "description": "settings_information_group_info_description",
"controls": [ "controls": [
"name", "name",
"email", "email",
"domain", "domain",
["image"] ["image"]
] ]
} }
] ]
} }
\ No newline at end of file
{ {
"name": "system_settings_password", "name": "system_settings_password",
"title": "system_settings_password_title", "title": "system_settings_password_title",
"titleDesc": "system_settings_password_title_desc", "titleDesc": "system_settings_password_title_desc",
"icon": "<i class=\"fa fa-key fa-2x\"></i>", "icon": "<i class=\"fa fa-key fa-2x\"></i>",
"service": "./service/system-settings/password", "service": "./service/system-settings/password",
"attributes": [ "attributes": [
{ {
"name": "includeUppercase", "name": "includeUppercase",
"type": "boolean", "type": "boolean",
"formOptions": { "formOptions": {
"options": { "options": {
"showSuggest": true, "showSuggest": true,
"styleClass": "col-12" "styleClass": "col-12"
}, },
"controlType": "checkbox" "controlType": "checkbox"
} }
}, },
{ {
"name": "includeNumber", "name": "includeNumber",
"type": "boolean", "type": "boolean",
"formOptions": { "formOptions": {
"options": { "options": {
"showSuggest": true, "showSuggest": true,
"styleClass": "col-12" "styleClass": "col-12"
}, },
"controlType": "checkbox" "controlType": "checkbox"
} }
}, },
{ {
"name": "notIncludeUserId", "name": "notIncludeUserId",
"type": "boolean", "type": "boolean",
"formOptions": { "formOptions": {
"options": { "options": {
"showSuggest": true, "showSuggest": true,
"styleClass": "col-12" "styleClass": "col-12"
}, },
"controlType": "checkbox" "controlType": "checkbox"
} }
}, },
{ {
"name": "notIncludeReverseUserId", "name": "notIncludeReverseUserId",
"type": "boolean", "type": "boolean",
"formOptions": { "formOptions": {
"options": { "options": {
"showSuggest": true, "showSuggest": true,
"styleClass": "col-12" "styleClass": "col-12"
}, },
"controlType": "checkbox" "controlType": "checkbox"
} }
}, },
{ {
"name": "passwordMinLength", "name": "passwordMinLength",
"type": "boolean", "type": "boolean",
"formOptions": { "formOptions": {
"options": { "options": {
"showSuggest": true, "showSuggest": true,
"styleClass": "col-12" "styleClass": "col-12"
}, },
"controlType": "checkbox" "controlType": "checkbox"
} }
} }
] ]
} }
\ No newline at end of file
{ {
"name": "system_settings_userpolicy", "name": "system_settings_userpolicy",
"title": "system_settings_userpolicy_title", "title": "system_settings_userpolicy_title",
"titleDesc": "system_settings_userpolicy_title_desc", "titleDesc": "system_settings_userpolicy_title_desc",
"icon": "<i class=\"fa fa-user-secret fa-2x\"></i>", "icon": "<i class=\"fa fa-user-secret fa-2x\"></i>",
"service": "./service/system-settings/userpolicy", "service": "./service/system-settings/userpolicy",
"attributes": [ "attributes": [
{ {
"name": "maxFailLogin", "name": "maxFailLogin",
"type": "number", "type": "number",
"formOptions": { "formOptions": {
"options": { "options": {
"showSuggest": true, "showSuggest": true,
"styleClass": "col-12" "styleClass": "col-12"
}, },
"validators": [ "validators": [
"required", "required",
{ {
"name": "min", "name": "min",
"value": 0 "value": 0
}, },
{ {
"name": "max", "name": "max",
"value": 99 "value": 99
} }
], ],
"controlType": "number" "controlType": "number"
} }
}, },
{ {
"name": "historyValidation", "name": "historyValidation",
"type": "number", "type": "number",
"formOptions": { "formOptions": {
"options": { "options": {
"showSuggest": true, "showSuggest": true,
"styleClass": "col-12" "styleClass": "col-12"
}, },
"validators": [ "validators": [
"required", "required",
{ {
"name": "min", "name": "min",
"value": 0 "value": 0
}, },
{ {
"name": "max", "name": "max",
"value": 99 "value": 99
} }
], ],
"controlType": "number" "controlType": "number"
} }
}, },
{ {
"name": "userInactivity", "name": "userInactivity",
"type": "number", "type": "number",
"formOptions": { "formOptions": {
"options": { "options": {
"showSuggest": true, "showSuggest": true,
"styleClass": "col-12" "styleClass": "col-12"
}, },
"validators": [ "validators": [
"required", "required",
{ {
"name": "min", "name": "min",
"value": 0 "value": 0
}, },
{ {
"name": "max", "name": "max",
"value": 99 "value": 99
} }
], ],
"controlType": "number" "controlType": "number"
} }
}, },
{ {
"name": "passwordExpiration", "name": "passwordExpiration",
"type": "number", "type": "number",
"formOptions": { "formOptions": {
"options": { "options": {
"showSuggest": true, "showSuggest": true,
"styleClass": "col-12" "styleClass": "col-12"
}, },
"validators": [ "validators": [
"required", "required",
{ {
"name": "min", "name": "min",
"value": 0 "value": 0
}, },
{ {
"name": "max", "name": "max",
"value": 99 "value": 99
} }
], ],
"controlType": "number" "controlType": "number"
} }
}, },
{ {
"name": "automaticUnlock", "name": "automaticUnlock",
"type": "number", "type": "number",
"formOptions": { "formOptions": {
"options": { "options": {
"showSuggest": true, "showSuggest": true,
"styleClass": "col-12" "styleClass": "col-12"
}, },
"validators": [ "validators": [
"required", "required",
{ {
"name": "min", "name": "min",
"value": 0 "value": 0
}, },
{ {
"name": "max", "name": "max",
"value": 99 "value": 99
} }
], ],
"controlType": "number" "controlType": "number"
} }
}, },
{ {
"name": "manageAccountByEmail", "name": "manageAccountByEmail",
"type": "boolean", "type": "boolean",
"formOptions": { "formOptions": {
"options": { "options": {
"showSuggest": true, "showSuggest": true,
"styleClass": "col-12" "styleClass": "col-12"
}, },
"controlType": "checkbox" "controlType": "checkbox"
} }
} }
] ]
} }
\ No newline at end of file
[ [
{ {
"name": "system_settings_information", "name": "system_settings_information",
"label": "tabs.system.settings.information.title", "label": "tabs.system.settings.information.title",
"description": "tabs.system.settings.information.title.desc", "description": "tabs.system.settings.information.title.desc",
"path": "/settings/system-settings/information", "path": "/settings/system-settings/information",
"icon": "<i class=\"fa fa-info-circle fa-1_5x\"></i>" "icon": "<i class=\"fa fa-info-circle fa-1_5x\"></i>"
}, },
{ {
"name": "system_settings_password", "name": "system_settings_password",
"label": "tabs.system.settings.password.title", "label": "tabs.system.settings.password.title",
"description": "tabs.system.settings.password.title.desc", "description": "tabs.system.settings.password.title.desc",
"path": "/settings/system-settings/password", "path": "/settings/system-settings/password",
"icon": "<i class=\"fa fa-key fa-1_5x\"></i>" "icon": "<i class=\"fa fa-key fa-1_5x\"></i>"
}, },
{ {
"name": "system_settings_userpolicy", "name": "system_settings_userpolicy",
"label": "tabs.system.settings.userpolicy.title", "label": "tabs.system.settings.userpolicy.title",
"description": "tabs.system.settings.userpolicy.title.desc", "description": "tabs.system.settings.userpolicy.title.desc",
"path": "/settings/system-settings/userpolicy", "path": "/settings/system-settings/userpolicy",
"icon": "<i class=\"fa fa-user-secret fa-1_5x\"></i>" "icon": "<i class=\"fa fa-user-secret fa-1_5x\"></i>"
} }
] ]
\ No newline at end of file
[ [
"view", "view",
"edit", "edit",
"delete", "delete",
"new" "new"
] ]
\ No newline at end of file
[ [
{"id": 1, "name": "Perú (+51)", "code": "+51"}, {"id": 1, "name": "Perú (+51)", "code": "+51"},
{"id": 2, "name": "Chile (+52)", "code": "+52"}, {"id": 2, "name": "Chile (+52)", "code": "+52"},
{"id": 3, "name": "México (+53)", "code": "+53"} {"id": 3, "name": "México (+53)", "code": "+53"}
] ]
\ No newline at end of file
[ [
{ "id": 1, "identifier": "ADMIN", "description": "Aministración" }, { "id": 1, "identifier": "ADMIN", "description": "Aministración" },
{ "id": 2, "identifier": "XDFUSER", "description": "XdfUser" } { "id": 2, "identifier": "XDFUSER", "description": "XdfUser" }
] ]
\ No newline at end of file
{ {
"title.error": "Error", "title.error": "Error",
"title.http.error": "Http Error", "title.http.error": "Http Error",
"title.not.http.error": "Error!" "title.not.http.error": "Error!"
} }
\ No newline at end of file
{ {
"title.error": "Error", "title.error": "Error",
"title.http.error": "Error Http", "title.http.error": "Error Http",
"title.not.http.error": "Error!" "title.not.http.error": "Error!"
} }
\ No newline at end of file
{ {
"home.subtitle": "Welcome to XDF Project", "home.subtitle": "Welcome to XDF Project",
"home.comments": "It is an application skeleton for a typical web app. You can use it to quickly bootstrap your webapp projects and dev environment." "home.comments": "It is an application skeleton for a typical web app. You can use it to quickly bootstrap your webapp projects and dev environment."
} }
\ No newline at end of file
{ {
"home.subtitle": "Bienvenido al proyecto XDF", "home.subtitle": "Bienvenido al proyecto XDF",
"home.comments": "Este proyecto presenta una aplicación web típica. Puede usarlo como un marco de referencia para el desarrollo de sus aplicaciones web." "home.comments": "Este proyecto presenta una aplicación web típica. Puede usarlo como un marco de referencia para el desarrollo de sus aplicaciones web.",
"etl_avatar": "Avatar",
"etl_code": "ID",
"etl_name": "Nombre",
"etl_version": "Versión",
"etl_status": "Estado",
"etl_country": "País",
"etl_timezone": "Zona horaria"
} }
\ No newline at end of file
@import "~bootstrap/scss/bootstrap"; @import "~bootstrap/scss/bootstrap";
@import "./css/animate"; @import "./css/animate";
@import "./css/inspinia"; @import "./css/inspinia";
@import '~@swimlane/ngx-datatable/index.css'; @import '~@swimlane/ngx-datatable/index.css';
@import "~@ng-select/ng-select/themes/default.theme.css"; @import "~@ng-select/ng-select/themes/default.theme.css";
@import './css/ngx-datatable/bootstrap'; @import './css/ngx-datatable/bootstrap';
@import './css/ngx-datatable/material'; @import './css/ngx-datatable/material';
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment