mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
About page not working #1265
This commit is contained in:
1
demo-shell-ng2/.gitignore
vendored
1
demo-shell-ng2/.gitignore
vendored
@@ -5,6 +5,7 @@ app/**/*.js
|
|||||||
app/**/*.js.map
|
app/**/*.js.map
|
||||||
!app/js/Polyline.js
|
!app/js/Polyline.js
|
||||||
.idea
|
.idea
|
||||||
|
versions.json
|
||||||
dist/
|
dist/
|
||||||
coverage/
|
coverage/
|
||||||
|
|
||||||
|
@@ -27,17 +27,29 @@ export class AboutComponent implements OnInit {
|
|||||||
|
|
||||||
data: ObjectDataTableAdapter;
|
data: ObjectDataTableAdapter;
|
||||||
|
|
||||||
constructor(private http: Http) {}
|
constructor(private http: Http) {
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
// this.data = new ObjectDataTableAdapter();
|
this.http.get('/versions.json').subscribe(response => {
|
||||||
this.http.get('/versions').subscribe(response => {
|
var regexp = new RegExp("^(ng2-activiti|ng2-alfresco|alfresco-)", 'g');
|
||||||
let data = response.json() || {};
|
|
||||||
let packages = data.packages || [];
|
|
||||||
|
|
||||||
this.data = new ObjectDataTableAdapter(packages, [
|
var alfrescoPackages = Object.keys(response.json().dependencies).filter(function (val) {
|
||||||
{ type: 'text', key: 'name', title: 'Name', sortable: true },
|
console.log(val);
|
||||||
{ type: 'text', key: 'version', title: 'Version', sortable: true }
|
return regexp.test(val);
|
||||||
|
});
|
||||||
|
|
||||||
|
let alfrescoPackagesTableRappresentation = [];
|
||||||
|
alfrescoPackages.forEach((val)=> {
|
||||||
|
console.log(response.json().dependencies[val]);
|
||||||
|
alfrescoPackagesTableRappresentation.push({name:val,version:response.json().dependencies[val].version});
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log(alfrescoPackagesTableRappresentation);
|
||||||
|
|
||||||
|
this.data = new ObjectDataTableAdapter(alfrescoPackagesTableRappresentation, [
|
||||||
|
{type: 'text', key: 'name', title: 'Name', sortable: true},
|
||||||
|
{type: 'text', key: 'version', title: 'Version', sortable: true}
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@@ -5,6 +5,7 @@ var helpers = require('./helpers');
|
|||||||
var path = require('path');
|
var path = require('path');
|
||||||
var fs = require('fs');
|
var fs = require('fs');
|
||||||
var glob = require('glob');
|
var glob = require('glob');
|
||||||
|
var CopyWebpackPlugin = require('copy-webpack-plugin');
|
||||||
|
|
||||||
const rootPath = helpers.root('node_modules');
|
const rootPath = helpers.root('node_modules');
|
||||||
|
|
||||||
@@ -108,7 +109,13 @@ plugins: [
|
|||||||
new webpack.ProvidePlugin({
|
new webpack.ProvidePlugin({
|
||||||
'dialogPolyfill': 'dialog-polyfill/dialog-polyfill'
|
'dialogPolyfill': 'dialog-polyfill/dialog-polyfill'
|
||||||
}),
|
}),
|
||||||
|
|
||||||
|
new CopyWebpackPlugin([
|
||||||
|
{
|
||||||
|
from: 'versions.json'
|
||||||
|
}
|
||||||
|
]),
|
||||||
|
|
||||||
new webpack.optimize.CommonsChunkPlugin({
|
new webpack.optimize.CommonsChunkPlugin({
|
||||||
name: ['app', 'vendor', 'polyfills']
|
name: ['app', 'vendor', 'polyfills']
|
||||||
}),
|
}),
|
||||||
|
@@ -5,11 +5,12 @@
|
|||||||
"author": "Alfresco Software, Ltd.",
|
"author": "Alfresco Software, Ltd.",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"clean": "npm install rimraf && npm run clean-build && rimraf dist node_modules typings dist",
|
"clean": "npm install rimraf && npm run clean-build && rimraf dist node_modules typings dist",
|
||||||
"start": "webpack-dev-server --inline --progress --port 3000",
|
"start": "npm run server-versions && webpack-dev-server --inline --progress --port 3000",
|
||||||
"start:dist": "wsrv -s dist/ -p 3000 -a 0.0.0.0",
|
"start:dist": "wsrv -s dist/ -p 3000 -a 0.0.0.0",
|
||||||
"clean-build": "rimraf 'app/{,**/}**.js' 'app/{,**/}**.js.map' 'app/{,**/}**.d.ts'",
|
"clean-build": "rimraf 'app/{,**/}**.js' 'app/{,**/}**.js.map' 'app/{,**/}**.d.ts'",
|
||||||
"test": "karma start",
|
"test": "karma start",
|
||||||
"build": "rimraf dist && webpack --config config/webpack.prod.js --progress --profile --bail",
|
"build": "npm run server-versions && rimraf dist && webpack --config config/webpack.prod.js --progress --profile --bail",
|
||||||
|
"server-versions" : "rimraf versions.json && npm list --depth=0 --json=true --prod=true > versions.json || true",
|
||||||
"aws": "node app.js",
|
"aws": "node app.js",
|
||||||
"tslint": "tslint -c tslint.json *.ts && tslint -c tslint.json 'app/{,**/}**.ts'",
|
"tslint": "tslint -c tslint.json *.ts && tslint -c tslint.json 'app/{,**/}**.ts'",
|
||||||
"licensecheck": "license-check"
|
"licensecheck": "license-check"
|
||||||
|
Reference in New Issue
Block a user