Skip to content
This repository was archived by the owner on May 12, 2021. It is now read-only.

Commit fe4932f

Browse files
committed
ZEST-143 - Various fixes.
1 parent 8f25f13 commit fe4932f

56 files changed

Lines changed: 1276 additions & 22 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

tools/shell/src/main/resources/templates/default/project.properties renamed to tools/shell/src/dist/etc/templates/default/template.properties

File renamed without changes.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
2+
apply plugin: 'war'
3+
apply plugin: 'jetty'
4+
5+
dependencies {
6+
compile project( ":bootstrap" )
7+
compile project( ":model" )
8+
compile project( ":rest" )
9+
10+
compile "org.apache.zest.core:org.apache.zest.core.spi:$zestVersion"
11+
compile "org.apache.zest.core:org.apache.zest.core.bootstrap:$zestVersion"
12+
compile "org.apache.zest.library:org.apache.zest.library.servlet:$zestVersion"
13+
14+
compile "javax.servlet:servlet-api:2.5"
15+
compile "org.restlet.jee:org.restlet:2.3.4"
16+
17+
runtime "org.apache.zest.core:org.apache.zest.core.runtime:$zestVersion"
18+
runtime "org.restlet.jee:org.restlet.ext.servlet:2.3.4"
19+
20+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<!--
2+
~ Licensed to the Apache Software Foundation (ASF) under one
3+
~ or more contributor license agreements. See the NOTICE file
4+
~ distributed with this work for additional information
5+
~ regarding copyright ownership. The ASF licenses this file
6+
~ to you under the Apache License, Version 2.0 (the
7+
~ "License"); you may not use this file except in compliance
8+
~ with the License. You may obtain a copy of the License at
9+
~
10+
~ http://www.apache.org/licenses/LICENSE-2.0
11+
~
12+
~ Unless required by applicable law or agreed to in writing, software
13+
~ distributed under the License is distributed on an "AS IS" BASIS,
14+
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
~ See the License for the specific language governing permissions and
16+
~ limitations under the License.
17+
~
18+
~
19+
-->
20+
21+
<html>
22+
<body>This package contains the bootstrap code.</body>
23+
</html>

tools/shell/src/dist/etc/templates/ng2-heroes/files/app/src/main/resources/___placeholder___

Whitespace-only changes.

tools/shell/src/dist/etc/templates/ng2-heroes/files/app/src/main/webapp/WEB-INF/___placeholder___

Whitespace-only changes.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
nav a {
2+
padding: 5px 10px;
3+
text-decoration: none;
4+
margin-top: 10px;
5+
display: inline-block;
6+
background-color: #eee;
7+
border-radius: 4px;
8+
}
9+
nav a:visited, a:link {
10+
color: #607D8B;
11+
}
12+
nav a:hover {
13+
color: #039be5;
14+
background-color: #CFD8DC;
15+
}
16+
nav a.router-link-active {
17+
color: #039be5;
18+
}
19+
h1 {
20+
font-size: 1.2em;
21+
color: #999;
22+
margin-bottom: 0;
23+
}
24+
h2 {
25+
font-size: 2em;
26+
margin-top: 0;
27+
padding-top: 0;
28+
}
29+
30+
/*
31+
Copyright 2016 Google Inc. All Rights Reserved.
32+
Use of this source code is governed by an MIT-style license that
33+
can be found in the LICENSE file at http://angular.io/license
34+
*/
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import {Component} from 'angular2/core';
2+
import {RouteConfig, ROUTER_DIRECTIVES} from 'angular2/router';
3+
import {HeroesComponent} from './heroes.component';
4+
import {HeroDetailComponent} from './hero-detail.component';
5+
import {DashboardComponent} from './dashboard.component';
6+
import {HeroService} from './hero.service';
7+
8+
@Component({
9+
selector: 'my-app',
10+
template: `
11+
<h1>{{title}}</h1>
12+
<nav>
13+
<a [routerLink]="['Dashboard']">Dashboard</a>
14+
<a [routerLink]="['Heroes']">Heroes</a>
15+
</nav>
16+
<router-outlet></router-outlet>
17+
`,
18+
styleUrls: ['app/app.component.css'],
19+
directives: [ROUTER_DIRECTIVES],
20+
providers: [HeroService]
21+
})
22+
@RouteConfig([
23+
// {path: '/', redirectTo: ['Dashboard'] },
24+
{path: '/dashboard', name: 'Dashboard', component: DashboardComponent, useAsDefault: true},
25+
{path: '/heroes', name: 'Heroes', component: HeroesComponent},
26+
{path: '/detail/:id', name: 'HeroDetail', component: HeroDetailComponent}
27+
])
28+
export class AppComponent {
29+
title = 'Tour of Heroes';
30+
}
31+
32+
33+
/*
34+
Copyright 2016 Google Inc. All Rights Reserved.
35+
Use of this source code is governed by an MIT-style license that
36+
can be found in the LICENSE file at http://angular.io/license
37+
*/
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
[class*='col-'] {
2+
float: left;
3+
}
4+
*, *:after, *:before {
5+
-webkit-box-sizing: border-box;
6+
-moz-box-sizing: border-box;
7+
box-sizing: border-box;
8+
}
9+
h3 {
10+
text-align: center; margin-bottom: 0;
11+
}
12+
[class*='col-'] {
13+
padding-right: 20px;
14+
padding-bottom: 20px;
15+
}
16+
[class*='col-']:last-of-type {
17+
padding-right: 0;
18+
}
19+
.grid {
20+
margin: 0;
21+
}
22+
.col-1-4 {
23+
width: 25%;
24+
}
25+
.module {
26+
padding: 20px;
27+
text-align: center;
28+
color: #eee;
29+
max-height: 120px;
30+
min-width: 120px;
31+
background-color: #607D8B;
32+
border-radius: 2px;
33+
}
34+
h4 {
35+
position: relative;
36+
}
37+
.module:hover {
38+
background-color: #EEE;
39+
cursor: pointer;
40+
color: #607d8b;
41+
}
42+
.grid-pad {
43+
padding: 10px 0;
44+
}
45+
.grid-pad > [class*='col-']:last-of-type {
46+
padding-right: 20px;
47+
}
48+
@media (max-width: 600px) {
49+
.module {
50+
font-size: 10px;
51+
max-height: 75px; }
52+
}
53+
@media (max-width: 1024px) {
54+
.grid {
55+
margin: 0;
56+
}
57+
.module {
58+
min-width: 60px;
59+
}
60+
}
61+
62+
63+
/*
64+
Copyright 2016 Google Inc. All Rights Reserved.
65+
Use of this source code is governed by an MIT-style license that
66+
can be found in the LICENSE file at http://angular.io/license
67+
*/
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<h3>Top Heroes</h3>
2+
<div class="grid grid-pad">
3+
<div *ngFor="#hero of heroes" class="col-1-4" (click)="gotoDetail(hero)">
4+
<div class="module hero">
5+
<h4>{{hero.name}}</h4>
6+
</div>
7+
</div>
8+
</div>
9+
10+
11+
<!--
12+
Copyright 2016 Google Inc. All Rights Reserved.
13+
Use of this source code is governed by an MIT-style license that
14+
can be found in the LICENSE file at http://angular.io/license
15+
-->
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import {Component, OnInit} from 'angular2/core';
2+
import {Router} from 'angular2/router';
3+
import {Hero} from './hero';
4+
import {HeroService} from './hero.service';
5+
6+
@Component({
7+
selector: 'my-dashboard',
8+
templateUrl: 'app/dashboard.component.html',
9+
styleUrls: ['app/dashboard.component.css']
10+
})
11+
export class DashboardComponent implements OnInit {
12+
heroes: Hero[] = [];
13+
14+
constructor(private _heroService: HeroService, private _router: Router) { }
15+
16+
ngOnInit() {
17+
this._heroService.getHeroes().then(heroes => this.heroes = heroes.slice(1,5));
18+
}
19+
20+
gotoDetail(hero: Hero) {
21+
let link = ['HeroDetail', { id: hero.id }];
22+
this._router.navigate(link);
23+
}
24+
}
25+
26+
27+
/*
28+
Copyright 2016 Google Inc. All Rights Reserved.
29+
Use of this source code is governed by an MIT-style license that
30+
can be found in the LICENSE file at http://angular.io/license
31+
*/

0 commit comments

Comments
 (0)