-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
81 changed files
with
3,153 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,3 +18,4 @@ | |
/npm-cache/conf/storage | ||
/npm-cache/local_storage | ||
/npm-cache/storage | ||
/microdocs-server/npm-debug.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
FROM node:6 | ||
EXPOSE 3000 | ||
WORKDIR /microdocs/microdocs-server | ||
RUN npm set registry http://192.168.252.165:4873/ | ||
RUN echo @maxxton:registry=https://npm.maxxton.com > .npmrc | ||
ADD microdocs-server/config.yml . | ||
ADD microdocs-server/package.json . | ||
RUN npm install --prod && npm install nodemon | ||
CMD ./node_modules/.bin/nodemon --watch dist dist/index.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
version: '2' | ||
services: | ||
npm-registry: | ||
image: verdaccio/verdaccio | ||
volumes: | ||
- ./npm-cache/conf:/verdaccio/conf | ||
- ./npm-cache/storage:/verdaccio/storage | ||
- ./npm-cache/local_storage :/verdaccio/local_storage | ||
ports: | ||
- 4873:4873 | ||
networks: | ||
- 'microdocs-server' | ||
|
||
networks: | ||
microdocs-server: | ||
external: | ||
name: 'microdocs-server' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
version: '2' | ||
services: | ||
microdocs-server: | ||
container_name: microdocs-dev | ||
image: microdocs:dev | ||
build: | ||
dockerfile: Dockerfile.dev | ||
context: . | ||
ports: | ||
- 3000:3000 | ||
volumes: | ||
- ./microdocs-server/dist:/microdocs/microdocs-server/dist | ||
- ./microdocs-server/data:/microdocs/microdocs-server/data | ||
- ./microdocs-ui/dist:/microdocs/microdocs-ui/dist | ||
- ../microdocs-core/dist:/microdocs/microdocs-server/dist/node_modules/@maxxton/microdocs-core | ||
networks: | ||
- 'microdocs-server' | ||
|
||
networks: | ||
microdocs-server: | ||
external: | ||
name: 'microdocs-server' |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Editor configuration, see http://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
max_line_length = off | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
{ | ||
"project": { | ||
"version": "1.0.0-beta.25.5", | ||
"name": "microdocs-ui" | ||
}, | ||
"apps": [ | ||
{ | ||
"root": "src", | ||
"outDir": "dist", | ||
"assets": [ | ||
"assets", | ||
"favicon.ico" | ||
], | ||
"index": "index.html", | ||
"main": "main.ts", | ||
"test": "test.ts", | ||
"tsconfig": "tsconfig.json", | ||
"prefix": "app", | ||
"mobile": false, | ||
"styles": [ | ||
"styles.scss" | ||
], | ||
"scripts": [], | ||
"environments": { | ||
"source": "environments/environment.ts", | ||
"dev": "environments/environment.ts", | ||
"prod": "environments/environment.prod.ts" | ||
} | ||
} | ||
], | ||
"addons": [], | ||
"packages": [], | ||
"e2e": { | ||
"protractor": { | ||
"config": "./protractor.conf.js" | ||
} | ||
}, | ||
"test": { | ||
"karma": { | ||
"config": "./karma.conf.js" | ||
} | ||
}, | ||
"defaults": { | ||
"styleExt": "scss", | ||
"prefixInterfaces": false, | ||
"inline": { | ||
"style": false, | ||
"template": false | ||
}, | ||
"spec": { | ||
"class": false, | ||
"component": true, | ||
"directive": true, | ||
"module": false, | ||
"pipe": true, | ||
"service": true | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { MicrodocsUiPage } from './app.po'; | ||
|
||
describe('microdocs-ui App', function() { | ||
let page: MicrodocsUiPage; | ||
|
||
beforeEach(() => { | ||
page = new MicrodocsUiPage(); | ||
}); | ||
|
||
it('should display message saying app works', () => { | ||
page.navigateTo(); | ||
expect(page.getParagraphText()).toEqual('app works!'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { browser, element, by } from 'protractor'; | ||
|
||
export class MicrodocsUiPage { | ||
navigateTo() { | ||
return browser.get('/'); | ||
} | ||
|
||
getParagraphText() { | ||
return element(by.css('app-root h1')).getText(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"compileOnSave": false, | ||
"compilerOptions": { | ||
"declaration": false, | ||
"emitDecoratorMetadata": true, | ||
"experimentalDecorators": true, | ||
"module": "commonjs", | ||
"moduleResolution": "node", | ||
"outDir": "../dist/out-tsc-e2e", | ||
"sourceMap": true, | ||
"target": "es5", | ||
"typeRoots": [ | ||
"../node_modules/@types" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// Karma configuration file, see link for more information | ||
// https://karma-runner.github.io/0.13/config/configuration-file.html | ||
|
||
module.exports = function (config) { | ||
config.set({ | ||
basePath: '', | ||
frameworks: ['jasmine', 'angular-cli'], | ||
plugins: [ | ||
require('karma-jasmine'), | ||
require('karma-chrome-launcher'), | ||
require('karma-remap-istanbul'), | ||
require('angular-cli/plugins/karma') | ||
], | ||
files: [ | ||
{ pattern: './src/test.ts', watched: false } | ||
], | ||
preprocessors: { | ||
'./src/test.ts': ['angular-cli'] | ||
}, | ||
mime: { | ||
'text/x-typescript': ['ts','tsx'] | ||
}, | ||
remapIstanbulReporter: { | ||
reports: { | ||
html: 'coverage', | ||
lcovonly: './coverage/coverage.lcov' | ||
} | ||
}, | ||
angularCli: { | ||
config: './angular-cli.json', | ||
environment: 'dev' | ||
}, | ||
reporters: config.angularCli && config.angularCli.codeCoverage | ||
? ['progress', 'karma-remap-istanbul'] | ||
: ['progress'], | ||
port: 9876, | ||
colors: true, | ||
logLevel: config.LOG_INFO, | ||
autoWatch: true, | ||
browsers: ['Chrome'], | ||
singleRun: false | ||
}); | ||
}; |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Protractor configuration file, see link for more information | ||
// https://github.com/angular/protractor/blob/master/lib/config.ts | ||
|
||
/*global jasmine */ | ||
var SpecReporter = require('jasmine-spec-reporter'); | ||
|
||
exports.config = { | ||
allScriptsTimeout: 11000, | ||
specs: [ | ||
'./e2e/**/*.e2e-spec.ts' | ||
], | ||
capabilities: { | ||
'browserName': 'chrome' | ||
}, | ||
directConnect: true, | ||
baseUrl: 'http://localhost:4200/', | ||
framework: 'jasmine', | ||
jasmineNodeOpts: { | ||
showColors: true, | ||
defaultTimeoutInterval: 30000, | ||
print: function() {} | ||
}, | ||
useAllAngular2AppRoots: true, | ||
beforeLaunch: function() { | ||
require('ts-node').register({ | ||
project: 'e2e' | ||
}); | ||
}, | ||
onPrepare: function() { | ||
jasmine.getEnv().addReporter(new SpecReporter()); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<md-sidenav-container> | ||
<md-sidenav mode="side" opened="true"> | ||
<sidebar-component [projects]="projects" [selectedEnv]="selectedEnv" [envs]="envs" (envChange)="onEnvVersion($event)"></sidebar-component> | ||
</md-sidenav> | ||
<div class="my-content"> | ||
<router-outlet></router-outlet> | ||
</div> | ||
</md-sidenav-container> | ||
|
||
|
||
<!--<div class="main-container grid-block horizontal app-content">--> | ||
|
||
<!--<sidebar-component [projects]="projects" [selectedEnv]="selectedEnv" [envs]="envs" (envChange)="onEnvVersion($event)"></sidebar-component>--> | ||
|
||
<!--<!–main content–>--> | ||
<!--<div class="content" id="page-content">--> | ||
<!--<div>--> | ||
<!--<router-outlet></router-outlet>--> | ||
<!--</div>--> | ||
<!--</div>--> | ||
<!--<!–<snackbar id="snackbar" class="snackbar"></snackbar>–>--> | ||
<!--</div>--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
md-sidenav-container{ | ||
height: 100vh; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* tslint:disable:no-unused-variable */ | ||
|
||
import { TestBed, async } from '@angular/core/testing'; | ||
import { AppComponent } from './app.component'; | ||
|
||
describe('AppComponent', () => { | ||
beforeEach(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [ | ||
AppComponent | ||
], | ||
}); | ||
TestBed.compileComponents(); | ||
}); | ||
|
||
it('should create the app', async(() => { | ||
const fixture = TestBed.createComponent(AppComponent); | ||
const app = fixture.debugElement.componentInstance; | ||
expect(app).toBeTruthy(); | ||
})); | ||
|
||
it(`should have as title 'app works!'`, async(() => { | ||
const fixture = TestBed.createComponent(AppComponent); | ||
const app = fixture.debugElement.componentInstance; | ||
expect(app.title).toEqual('app works!'); | ||
})); | ||
|
||
it('should render title in a h1 tag', async(() => { | ||
const fixture = TestBed.createComponent(AppComponent); | ||
fixture.detectChanges(); | ||
const compiled = fixture.debugElement.nativeElement; | ||
expect(compiled.querySelector('h1').textContent).toContain('app works!'); | ||
})); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
import {Component, Injectable} from "@angular/core"; | ||
import {Router, ActivatedRoute} from "@angular/router"; | ||
import {Subject} from "rxjs/Subject"; | ||
import {Notification} from "rxjs/Notification"; | ||
import {ProjectTree} from "@maxxton/microdocs-core/domain"; | ||
import { ProjectService } from "./services/project.service"; | ||
|
||
|
||
/** | ||
* @application | ||
* @projectInclude microdocs-core | ||
*/ | ||
@Component({ | ||
selector: 'app-root', | ||
templateUrl: './app.component.html', | ||
styleUrls: ['app.component.scss'] | ||
}) | ||
@Injectable() | ||
export class AppComponent { | ||
private showFullSideBar:boolean = true; | ||
private user = {}; | ||
private login = { | ||
error: <boolean> false, | ||
status: <number|string> null | ||
}; | ||
|
||
projects:Subject<Notification<ProjectTree>>; | ||
envs:string[]; | ||
selectedEnv:string; | ||
|
||
constructor(private projectService:ProjectService, private router:Router, private activatedRoute: ActivatedRoute) { | ||
this.projects = this.projectService.getProjects(); | ||
|
||
projectService.getEnvs().subscribe((envs) => { | ||
this.envs = Object.keys(envs); | ||
if (projectService.getSelectedEnv() == undefined) { | ||
for (let key in envs) { | ||
if (envs[key].default) { | ||
projectService.setSelectedEnv(key); | ||
this.selectedEnv = key; | ||
break; | ||
} | ||
} | ||
} | ||
}); | ||
|
||
this.activatedRoute.queryParams.subscribe(params => { | ||
if (params['env'] && this.projectService.getSelectedEnv() !== params['env']) { | ||
this.selectedEnv = params['env']; | ||
this.projectService.setSelectedEnv(params['env']); | ||
} | ||
}); | ||
} | ||
|
||
public onEnvVersion(newEnv:string) { | ||
this.projectService.setSelectedEnv(newEnv); | ||
this.selectedEnv = newEnv; | ||
|
||
this.router.navigate(['/dashboard'], {queryParams: {env: newEnv}}); | ||
} | ||
|
||
|
||
} |
Oops, something went wrong.