Skip to content

Commit

Permalink
feat: first commit for web ui (#17)
Browse files Browse the repository at this point in the history
* first commit

* update app.component.html
  • Loading branch information
Cempakers87 authored and mergify[bot] committed Nov 22, 2018
1 parent df581c4 commit 5dfb8c9
Show file tree
Hide file tree
Showing 74 changed files with 759 additions and 12,125 deletions.
14 changes: 14 additions & 0 deletions web/ui/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Editor configuration, see http://editorconfig.org
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
max_line_length = off
trim_trailing_whitespace = false
47 changes: 45 additions & 2 deletions web/ui/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,45 @@
dist
node_modules
# See http://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist
/dist-server
/tmp
/out-tsc

# dependencies
/node_modules
package-lock.json

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings

# e2e
/e2e/*.js
/e2e/*.map

# System Files
.DS_Store
Thumbs.db
54 changes: 35 additions & 19 deletions web/ui/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,35 @@
"version": 1,
"newProjectRoot": "projects",
"projects": {
"siem-ui": {
"ng": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
"targets": {
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "./dist",
"outputPath": "dist",
"index": "src/index.html",
"main": "src/main.ts",
"tsConfig": "src/tsconfig.app.json",
"polyfills": "src/polyfills.ts",
"assets": [
"src/assets",
"src/favicon.ico"
"src/assets"
],
"styles": [
"src/styles.css"
"node_modules/@coreui/icons/css/coreui-icons.css",
"node_modules/flag-icon-css/css/flag-icon.css",
"node_modules/font-awesome/css/font-awesome.css",
"node_modules/simple-line-icons/css/simple-line-icons.css",
"src/scss/style.scss"
],
"scripts": []
"stylePreprocessorOptions": {
"includePaths": ["./node_modules"]
},
"scripts": [
"node_modules/chart.js/dist/Chart.min.js"
]
},
"configurations": {
"production": {
Expand All @@ -48,18 +56,18 @@
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "siem-ui:build"
"browserTarget": "ng:build"
},
"configurations": {
"production": {
"browserTarget": "siem-ui:build:production"
"browserTarget": "ng:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "siem-ui:build"
"browserTarget": "ng:build"
}
},
"test": {
Expand All @@ -69,10 +77,18 @@
"karmaConfig": "./karma.conf.js",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"scripts": [],
"scripts": [
"node_modules/chart.js/dist/Chart.min.js"
],
"styles": [
"src/styles.css"
"node_modules/flag-icon-css/css/flag-icon.css",
"node_modules/font-awesome/css/font-awesome.css",
"node_modules/simple-line-icons/css/simple-line-icons.css",
"src/scss/style.scss"
],
"stylePreprocessorOptions": {
"includePaths": ["./node_modules"]
},
"assets": [
"src/assets",
"src/favicon.ico"
Expand All @@ -93,16 +109,16 @@
}
}
},
"siem-ui-e2e": {
"root": "e2e",
"sourceRoot": "e2e",
"ng-e2e": {
"root": "",
"sourceRoot": "",
"projectType": "application",
"targets": {
"architect": {
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "./protractor.conf.js",
"devServerTarget": "siem-ui:serve"
"devServerTarget": "ng:serve"
}
},
"lint": {
Expand All @@ -119,11 +135,11 @@
}
}
},
"defaultProject": "siem-ui",
"defaultProject": "ng",
"schematics": {
"@schematics/angular:component": {
"prefix": "app",
"styleext": "css"
"styleext": "scss"
},
"@schematics/angular:directive": {
"prefix": "app"
Expand Down
12 changes: 6 additions & 6 deletions web/ui/e2e/app.e2e-spec.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { AppPage } from './app.po';
import { CoreUIPage } from './app.po';

describe('angular4-elastic-search App', () => {
let page: AppPage;
describe('core-ui App', function() {
let page: CoreUIPage;

beforeEach(() => {
page = new AppPage();
page = new CoreUIPage();
});

it('should display welcome message', () => {
it('should display footer containing creativeLabs', () => {
page.navigateTo();
expect(page.getParagraphText()).toEqual('Welcome to app!');
expect(page.getParagraphText()).toContain('creativeLabs');
});
});
6 changes: 3 additions & 3 deletions web/ui/e2e/app.po.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { browser, by, element } from 'protractor';
import { browser, element, by } from 'protractor';

export class AppPage {
export class CoreUIPage {
navigateTo() {
return browser.get('/');
}

getParagraphText() {
return element(by.css('app-root h1')).getText();
return element(by.tagName('footer')).getText();
}
}
4 changes: 1 addition & 3 deletions web/ui/e2e/tsconfig.e2e.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/e2e",
"baseUrl": "./",
"module": "commonjs",
"target": "es5",
"types": [
"types":[
"jasmine",
"jasminewd2",
"node"
]
}
Expand Down
4 changes: 3 additions & 1 deletion web/ui/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ module.exports = function (config) {
dir: require('path').join(__dirname, 'coverage'), reports: [ 'html', 'lcovonly' ],
fixWebpackSourcePaths: true
},

angularCli: {
environment: 'dev'
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
Expand Down
Loading

0 comments on commit 5dfb8c9

Please sign in to comment.