: { 77
+    "plugins": {
78
+      "cordova-plugin-whitelist": {},
79
+      "cordova-plugin-statusbar": {},
80
+      "cordova-plugin-device": {},
81
+      "cordova-plugin-splashscreen": {},
82
+      "cordova-plugin-ionic-webview": {},
83
+      "cordova-plugin-ionic-keyboard": {}
84
+    },
85
+    "platforms": [
86
+      "ios",
87
+      "android"
88
+    ]
89
+  }
90
+}

+ 8 - 0
resources/README.md

@@ -0,0 +1,8 @@
1
+These are Cordova resources. You can replace icon.png and splash.png and run
2
+`ionic cordova resources` to generate custom icons and splash screens for your
3
+app. See `ionic cordova resources --help` for details.
4
+
5
+Cordova reference documentation:
6
+
7
+- Icons: https://cordova.apache.org/docs/en/latest/config_ref/images.html
8
+- Splash Screens: https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-splashscreen/

BIN
resources/android/icon/drawable-hdpi-icon.png


BIN
resources/android/icon/drawable-ldpi-icon.png


BIN
resources/android/icon/drawable-mdpi-icon.png


BIN
resources/android/icon/drawable-xhdpi-icon.png


BIN
resources/android/icon/drawable-xxhdpi-icon.png


BIN
resources/android/icon/drawable-xxxhdpi-icon.png


BIN
resources/android/splash/drawable-land-hdpi-screen.png


BIN
resources/android/splash/drawable-land-ldpi-screen.png


BIN
resources/android/splash/drawable-land-mdpi-screen.png


BIN
resources/android/splash/drawable-land-xhdpi-screen.png


BIN
resources/android/splash/drawable-land-xxhdpi-screen.png


BIN
resources/android/splash/drawable-land-xxxhdpi-screen.png


BIN
resources/android/splash/drawable-port-hdpi-screen.png


BIN
resources/android/splash/drawable-port-ldpi-screen.png


BIN
resources/android/splash/drawable-port-mdpi-screen.png


BIN
resources/android/splash/drawable-port-xhdpi-screen.png


BIN
resources/android/splash/drawable-port-xxhdpi-screen.png


BIN
resources/android/splash/drawable-port-xxxhdpi-screen.png


+ 6 - 0
resources/android/xml/network_security_config.xml

@@ -0,0 +1,6 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<network-security-config>
3
+    <domain-config cleartextTrafficPermitted="true">
4
+        <domain includeSubdomains="true">localhost</domain>
5
+    </domain-config>
6
+</network-security-config>

BIN
resources/icon.png


BIN
resources/ios/icon/icon-1024.png


BIN
resources/ios/icon/icon-20.png


BIN
resources/ios/icon/icon-20@2x.png


BIN
resources/ios/icon/icon-20@3x.png


BIN
resources/ios/icon/icon-24@2x.png


BIN
resources/ios/icon/icon-27.5@2x.png


BIN
resources/ios/icon/icon-29.png


BIN
resources/ios/icon/icon-29@2x.png


BIN
resources/ios/icon/icon-29@3x.png


BIN
resources/ios/icon/icon-40.png


BIN
resources/ios/icon/icon-40@2x.png


BIN
resources/ios/icon/icon-40@3x.png


BIN
resources/ios/icon/icon-44@2x.png


BIN
resources/ios/icon/icon-50.png


BIN
resources/ios/icon/icon-50@2x.png


BIN
resources/ios/icon/icon-60.png


BIN
resources/ios/icon/icon-60@2x.png


BIN
resources/ios/icon/icon-60@3x.png


BIN
resources/ios/icon/icon-72.png


BIN
resources/ios/icon/icon-72@2x.png


BIN
resources/ios/icon/icon-76.png


BIN
resources/ios/icon/icon-76@2x.png


BIN
resources/ios/icon/icon-83.5@2x.png


BIN
resources/ios/icon/icon-86@2x.png


BIN
resources/ios/icon/icon-98@2x.png


BIN
resources/ios/icon/icon-small.png


BIN
resources/ios/icon/icon-small@2x.png


BIN
resources/ios/icon/icon-small@3x.png


BIN
resources/ios/icon/icon.png


BIN
resources/ios/icon/icon@2x.png


BIN
resources/ios/splash/Default-2436h.png


BIN
resources/ios/splash/Default-568h@2x~iphone.png


BIN
resources/ios/splash/Default-667h.png


BIN
resources/ios/splash/Default-736h.png


BIN
resources/ios/splash/Default-Landscape-2436h.png


BIN
resources/ios/splash/Default-Landscape-736h.png


BIN
resources/ios/splash/Default-Landscape@2x~ipad.png


BIN
resources/ios/splash/Default-Landscape@~ipadpro.png


BIN
resources/ios/splash/Default-Landscape~ipad.png


BIN
resources/ios/splash/Default-Portrait@2x~ipad.png


BIN
resources/ios/splash/Default-Portrait@~ipadpro.png


BIN
resources/ios/splash/Default-Portrait~ipad.png


BIN
resources/ios/splash/Default@2x~iphone.png


BIN
resources/ios/splash/Default@2x~universal~anyany.png


BIN
resources/ios/splash/Default~iphone.png


BIN
resources/splash.png


+ 40 - 0
src/app/app-routing.module.ts

@@ -5,6 +5,46 @@ const routes: Routes = [
5 5
   {
6 6
     path: '',
7 7
     loadChildren: () => import('./tabs/tabs.module').then(m => m.TabsPageModule)
8
+  },
9
+  {
10
+    path: 'home',
11
+    loadChildren: () => import('./home/home.module').then( m => m.HomePageModule)
12
+  },
13
+  {
14
+    path: 'register',
15
+    loadChildren: () => import('./register/register.module').then( m => m.RegisterPageModule)
16
+  },
17
+  {
18
+    path: 'login',
19
+    loadChildren: () => import('./login/login.module').then( m => m.LoginPageModule)
20
+  },
21
+  {
22
+    path: 'forgot-password',
23
+    loadChildren: () => import('./forgot-password/forgot-password.module').then( m => m.ForgotPasswordPageModule)
24
+  },
25
+  {
26
+    path: 'register-form',
27
+    loadChildren: () => import('./register-form/register-form.module').then( m => m.RegisterFormPageModule)
28
+  },
29
+  {
30
+    path: 'profile',
31
+    loadChildren: () => import('./profile/profile.module').then( m => m.ProfilePageModule)
32
+  },
33
+  {
34
+    path: 'reset-password',
35
+    loadChildren: () => import('./reset-password/reset-password.module').then( m => m.ResetPasswordPageModule)
36
+  },
37
+  {
38
+    path: 'placedetail',
39
+    loadChildren: () => import('./placedetail/placedetail.module').then( m => m.PlacedetailPageModule)
40
+  },
41
+  {
42
+    path: 'place',
43
+    loadChildren: () => import('./place/place.module').then( m => m.PlacePageModule)
44
+  },
45
+  {
46
+    path: 'province',
47
+    loadChildren: () => import('./province/province.module').then( m => m.ProvincePageModule)
8 48
   }
9 49
 ];
10 50
 @NgModule({

+ 18 - 2
src/app/app.module.ts

@@ -7,11 +7,27 @@ import { IonicModule, IonicRouteStrategy } from '@ionic/angular';
7 7
 import { AppRoutingModule } from './app-routing.module';
8 8
 import { AppComponent } from './app.component';
9 9
 
10
+import { HttpClientModule, HttpClient} from '@angular/common/http';
11
+
12
+// import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
13
+// import { library } from '@fortawesome/fontawesome-svg-core';
14
+import { FontAwesomeModule, FaIconLibrary } from '@fortawesome/angular-fontawesome';
15
+import { fas } from '@fortawesome/free-solid-svg-icons';
16
+import { far } from '@fortawesome/free-regular-svg-icons';
17
+import { fab } from '@fortawesome/free-brands-svg-icons';
18
+
19
+// library.add(fas,far,fab);
20
+
10 21
 @NgModule({
11 22
   declarations: [AppComponent],
12 23
   entryComponents: [],
13
-  imports: [BrowserModule, IonicModule.forRoot(), AppRoutingModule],
24
+  imports: [HttpClientModule, BrowserModule, IonicModule.forRoot(), AppRoutingModule, FontAwesomeModule],
14 25
   providers: [{ provide: RouteReuseStrategy, useClass: IonicRouteStrategy }],
15 26
   bootstrap: [AppComponent],
16 27
 })
17
-export class AppModule {}
28
+export class AppModule {
29
+constructor(library: FaIconLibrary) {
30
+  library.addIconPacks(fas, fab, far);
31
+}
32
+
33
+}

+ 3 - 1
src/app/explore-container/explore-container.component.html

@@ -1,4 +1,6 @@
1 1
 <div id="container">
2 2
   <strong>{{ name }}</strong>
3 3
   <p>Explore <a target="_blank" rel="noopener noreferrer" href="https://ionicframework.com/docs/components">UI Components</a></p>
4
-</div>
4
+</div>
5
+<ion-title size="large">wellnessroute.info</ion-title>
6
+  <ion-title size="large">แผนที่สุขภาพ</ion-title>

+ 17 - 0
src/app/forgot-password/forgot-password-routing.module.ts

@@ -0,0 +1,17 @@
1
+import { NgModule } from '@angular/core';
2
+import { Routes, RouterModule } from '@angular/router';
3
+
4
+import { ForgotPasswordPage } from './forgot-password.page';
5
+
6
+const routes: Routes = [
7
+  {
8
+    path: '',
9
+    component: ForgotPasswordPage
10
+  }
11
+];
12
+
13
+@NgModule({
14
+  imports: [RouterModule.forChild(routes)],
15
+  exports: [RouterModule],
16
+})
17
+export class ForgotPasswordPageRoutingModule {}

+ 20 - 0
src/app/forgot-password/forgot-password.module.ts

@@ -0,0 +1,20 @@
1
+import { NgModule } from '@angular/core';
2
+import { CommonModule } from '@angular/common';
3
+import { FormsModule } from '@angular/forms';
4
+
5
+import { IonicModule } from '@ionic/angular';
6
+
7
+import { ForgotPasswordPageRoutingModule } from './forgot-password-routing.module';
8
+
9
+import { ForgotPasswordPage } from './forgot-password.page';
10
+
11
+@NgModule({
12
+  imports: [
13
+    CommonModule,
14
+    FormsModule,
15
+    IonicModule,
16
+    ForgotPasswordPageRoutingModule
17
+  ],
18
+  declarations: [ForgotPasswordPage]
19
+})
20
+export class ForgotPasswordPageModule {}

+ 31 - 0
src/app/forgot-password/forgot-password.page.html

@@ -0,0 +1,31 @@
1
+<ion-header>
2
+  <ion-toolbar>
3
+    <ion-title>Wellness Route</ion-title>
4
+  </ion-toolbar>
5
+</ion-header>
6
+
7
+<ion-content>
8
+  <ion-row>
9
+    <ion-col>
10
+      <div class="ion-text-center">
11
+        <h1>ลืมรหัสผ่าน</h1>
12
+      </div>
13
+    </ion-col>
14
+  </ion-row>
15
+  <form>
16
+    <ion-row>
17
+      <ion-col>
18
+        <ion-item lines="full">
19
+          <ion-label position="floating">อีเมล์</ion-label>
20
+          <ion-input type="email" name="email" [(ngModel)]="email" inputmode="email"></ion-input>
21
+        </ion-item>
22
+      </ion-col>
23
+    </ion-row>
24
+    <ion-row>
25
+      <ion-col>
26
+        <ion-button type="submit" color="danger" expand="block" (click)="resetPassword()">ส่งรหัสผ่าน</ion-button>
27
+
28
+      </ion-col>
29
+    </ion-row>
30
+  </form>
31
+</ion-content>

+ 0 - 0
src/app/forgot-password/forgot-password.page.scss


+ 24 - 0
src/app/forgot-password/forgot-password.page.spec.ts

@@ -0,0 +1,24 @@
1
+import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
2
+import { IonicModule } from '@ionic/angular';
3
+
4
+import { ForgotPasswordPage } from './forgot-password.page';
5
+
6
+describe('ForgotPasswordPage', () => {
7
+  let component: ForgotPasswordPage;
8
+  let fixture: ComponentFixture<ForgotPasswordPage>;
9
+
10
+  beforeEach(waitForAsync(() => {
11
+    TestBed.configureTestingModule({
12
+      declarations: [ ForgotPasswordPage ],
13
+      imports: [IonicModule.forRoot()]
14
+    }).compileComponents();
15
+
16
+    fixture = TestBed.createComponent(ForgotPasswordPage);
17
+    component = fixture.componentInstance;
18
+    fixture.detectChanges();
19
+  }));
20
+
21
+  it('should create', () => {
22
+    expect(component).toBeTruthy();
23
+  });
24
+});

+ 17 - 0
src/app/forgot-password/forgot-password.page.ts

@@ -0,0 +1,17 @@
1
+import { Component, OnInit } from '@angular/core';
2
+
3
+@Component({
4
+  selector: 'app-forgot-password',
5
+  templateUrl: './forgot-password.page.html',
6
+  styleUrls: ['./forgot-password.page.scss'],
7
+})
8
+export class ForgotPasswordPage implements OnInit {
9
+
10
+  email = "";
11
+
12
+  constructor() { }
13
+
14
+  ngOnInit() {
15
+  }
16
+
17
+}

+ 17 - 0
src/app/home/home-routing.module.ts

@@ -0,0 +1,17 @@
1
+import { NgModule } from '@angular/core';
2
+import { Routes, RouterModule } from '@angular/router';
3
+
4
+import { HomePage } from './home.page';
5
+
6
+const routes: Routes = [
7
+  {
8
+    path: '',
9
+    component: HomePage
10
+  }
11
+];
12
+
13
+@NgModule({
14
+  imports: [RouterModule.forChild(routes)],
15
+  exports: [RouterModule],
16
+})
17
+export class HomePageRoutingModule {}

+ 23 - 0
src/app/home/home.module.ts

@@ -0,0 +1,23 @@
1
+import { NgModule } from '@angular/core';
2
+import { CommonModule } from '@angular/common';
3
+import { FormsModule } from '@angular/forms';
4
+
5
+import { IonicModule } from '@ionic/angular';
6
+
7
+import { HomePageRoutingModule } from './home-routing.module';
8
+
9
+import { HomePage } from './home.page';
10
+import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
11
+import { IonSlides } from '@ionic/angular';
12
+
13
+@NgModule({
14
+  imports: [
15
+    CommonModule,
16
+    FormsModule,
17
+    IonicModule,
18
+    HomePageRoutingModule,
19
+    FontAwesomeModule
20
+  ],
21
+  declarations: [HomePage]
22
+})
23
+export class HomePageModule {}

+ 87 - 0
src/app/home/home.page.html

@@ -0,0 +1,87 @@
1
+<ion-header class="ion-no-border">
2
+  <ion-toolbar class="new-background-color">
3
+    <ion-title>Wellness Route</ion-title>
4
+  </ion-toolbar>
5
+</ion-header>
6
+<ion-content [fullscreen]="true">
7
+  <ion-slides pager="true" [options]="slideOptsOne">
8
+    <ion-slide *ngFor="let p of imageslide">
9
+      <div class="slide">
10
+        <ion-img [src]="p.better_featured_image.source_url"></ion-img>
11
+      </div>
12
+    </ion-slide>
13
+  </ion-slides>
14
+  <ion-grid>
15
+    <ion-row>
16
+      <ion-col>
17
+        <ion-toolbar class="search">
18
+          <ion-searchbar placeholder="ค้นหา"></ion-searchbar>
19
+        </ion-toolbar>
20
+      </ion-col>
21
+    </ion-row>
22
+    <ion-row class="ion-justify-content-start">
23
+      <!-- <ion-col size="6">
24
+        <div class="center catshow">
25
+          <fa-icon [icon]="['fas', 'utensils']" size="3x" class="red"></fa-icon>
26
+        </div>
27
+      </ion-col>
28
+      <ion-col size="6">
29
+        <div class=" catshow center">
30
+          <fa-icon [icon]="['fas', 'spa']" size="3x"></fa-icon>        
31
+        </div>
32
+      </ion-col>
33
+      <ion-col size="6">
34
+        <div class=" catshow center">
35
+          <fa-icon [icon]="['fas', 'praying-hands']" size="3x"></fa-icon>          
36
+        </div>
37
+      </ion-col>
38
+      <ion-col size="6">
39
+        <div class="catshow center">
40
+          <fa-icon [icon]="['fas', 'running']" size="3x"></fa-icon>
41
+        </div>
42
+      </ion-col> -->
43
+      <ion-col size="3">
44
+        <div class="center catshow">
45
+          <a [routerLink]="['/tabs/place/']"><fa-icon [icon]="['fas', 'utensils']" size="2x" class="red"></fa-icon></a>          
46
+        </div>
47
+      </ion-col>
48
+      <ion-col size="3">
49
+        <div class=" catshow center">
50
+          <fa-icon [icon]="['fas', 'spa']" size="2x"></fa-icon>        
51
+        </div>
52
+      </ion-col>
53
+      <ion-col size="3">
54
+        <div class=" catshow center">
55
+          <fa-icon [icon]="['fas', 'praying-hands']" size="2x"></fa-icon>          
56
+        </div>
57
+      </ion-col>
58
+      <ion-col size="3">
59
+        <div class="catshow center">
60
+          <fa-icon [icon]="['fas', 'running']" size="2x"></fa-icon>
61
+        </div>
62
+      </ion-col>
63
+    </ion-row>
64
+    <ion-row>
65
+      <ion-col>
66
+        <ion-card *ngFor="let pldata of placelasted">
67
+          <div *ngIf="$any(pldata).better_featured_image != null">
68
+            <img src="{{$any(pldata).better_featured_image.source_url}}" alt="">
69
+          </div>
70
+          <div *ngIf="$any(pldata).better_featured_image == null">
71
+            <img src="/assets/images/temp.png" />
72
+          </div>
73
+          <ion-card-header>            
74
+            <a [routerLink]="['/tabs/place/', pldata.id]"><ion-card-title [innerHTML]="pldata.title.rendered"></ion-card-title>
75
+            </a>
76
+            <a [routerLink]="['/tabs/province/']">
77
+              <span [innerHTML]="pldata._embedded['wp:term'][1][0].name"></span>
78
+            </a> /
79
+            <a [routerLink]="['/tabs/place/']">
80
+              <span [innerHTML]="pldata._embedded['wp:term'][2][0].name"></span>
81
+            </a>
82
+          </ion-card-header>
83
+        </ion-card>
84
+      </ion-col>
85
+    </ion-row>
86
+  </ion-grid>
87
+</ion-content>

+ 45 - 0
src/app/home/home.page.scss

@@ -0,0 +1,45 @@
1
+ion-card-title {
2
+  font-family: "IBM Plex Sans Thai", sans-serif !important;
3
+  font-weight: 600;
4
+  font-size: 20px;
5
+}
6
+
7
+ion-searchbar{
8
+  // --color:#000;
9
+  // --placeholder-color:#000;
10
+  // --background:#000;
11
+}
12
+
13
+.search{
14
+  padding: 0px !important;
15
+  // margin-bottom: 30px;
16
+  margin-top: 10px;
17
+}
18
+
19
+// .red {
20
+//   color: rgb(255, 0, 0);
21
+// }
22
+
23
+.catshow {
24
+  height: 100px;
25
+  // background-color: rgb(183, 210, 236);
26
+  border: solid 1px;
27
+  border-color: cornflowerblue;
28
+}
29
+
30
+.center {
31
+  // // height: 110px;
32
+  // margin: auto;
33
+  // // width: 50%;
34
+  // border: 3px solid green;
35
+  // padding: 10px;
36
+  // display: block;
37
+  // margin-left: auto;
38
+  // margin-right: auto;
39
+  display: flex;
40
+  // height: 180px;
41
+  // background-color: #ff1124;
42
+  justify-content: center;
43
+  align-items: center;
44
+  // flex-wrap: wrap;
45
+}

+ 24 - 0
src/app/home/home.page.spec.ts

@@ -0,0 +1,24 @@
1
+import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
2
+import { IonicModule } from '@ionic/angular';
3
+
4
+import { HomePage } from './home.page';
5
+
6
+describe('HomePage', () => {
7
+  let component: HomePage;
8
+  let fixture: ComponentFixture<HomePage>;
9
+
10
+  beforeEach(waitForAsync(() => {
11
+    TestBed.configureTestingModule({
12
+      declarations: [ HomePage ],
13
+      imports: [IonicModule.forRoot()]
14
+    }).compileComponents();
15
+
16
+    fixture = TestBed.createComponent(HomePage);
17
+    component = fixture.componentInstance;
18
+    fixture.detectChanges();
19
+  }));
20
+
21
+  it('should create', () => {
22
+    expect(component).toBeTruthy();
23
+  });
24
+});

+ 39 - 0
src/app/home/home.page.ts

@@ -0,0 +1,39 @@
1
+import { Component, OnInit } from '@angular/core';
2
+import { NavController } from '@ionic/angular';
3
+import { WpServiceService } from '../wp-service.service';
4
+
5
+
6
+@Component({
7
+  selector: 'app-home',
8
+  templateUrl: './home.page.html',
9
+  styleUrls: ['./home.page.scss'],
10
+})
11
+export class HomePage implements OnInit {
12
+
13
+  imageslide :any = [];
14
+  placelasted :any = [];
15
+  sliderOne: any;
16
+
17
+  slideOptsOne = {
18
+    initialSlide: 0,
19
+    slidesPerView: 1,
20
+    autoplay: true
21
+  };
22
+
23
+  constructor(public navCtrl: NavController, private wpservice: WpServiceService) { }
24
+
25
+  ngOnInit() {
26
+    
27
+    this.wpservice.getSlideshow().subscribe((data) => {
28
+      this.imageslide = data;
29
+      console.log('load imageslide');
30
+    });
31
+
32
+    this.wpservice.getLasted().subscribe((placedata) => {
33
+      this.placelasted = placedata;
34
+      console.log('load Place');
35
+      console.log(placedata);
36
+    });        
37
+  }
38
+
39
+}

+ 17 - 0
src/app/login/login-routing.module.ts

@@ -0,0 +1,17 @@
1
+import { NgModule } from '@angular/core';
2
+import { Routes, RouterModule } from '@angular/router';
3
+
4
+import { LoginPage } from './login.page';
5
+
6
+const routes: Routes = [
7
+  {
8
+    path: '',
9
+    component: LoginPage
10
+  }
11
+];
12
+
13
+@NgModule({
14
+  imports: [RouterModule.forChild(routes)],
15
+  exports: [RouterModule],
16
+})
17
+export class LoginPageRoutingModule {}

+ 20 - 0
src/app/login/login.module.ts

@@ -0,0 +1,20 @@
1
+import { NgModule } from '@angular/core';
2
+import { CommonModule } from '@angular/common';
3
+import { FormsModule } from '@angular/forms';
4
+
5
+import { IonicModule } from '@ionic/angular';
6
+
7
+import { LoginPageRoutingModule } from './login-routing.module';
8
+
9
+import { LoginPage } from './login.page';
10
+
11
+@NgModule({
12
+  imports: [
13
+    CommonModule,
14
+    FormsModule,
15
+    IonicModule,
16
+    LoginPageRoutingModule
17
+  ],
18
+  declarations: [LoginPage]
19
+})
20
+export class LoginPageModule {}

+ 78 - 0
src/app/login/login.page.html

@@ -0,0 +1,78 @@
1
+<ion-header>
2
+  <ion-toolbar>
3
+    <ion-title>Wellness Route</ion-title>
4
+  </ion-toolbar>
5
+</ion-header>
6
+
7
+<ion-content>
8
+  <ion-row>
9
+    <ion-col>
10
+      <div class="ion-text-center">
11
+        <h1>เข้าสู่ระบบ</h1>
12
+      </div>
13
+    </ion-col>
14
+  </ion-row>
15
+  <ion-row>
16
+    <ion-col>
17
+      <form>
18
+        <ion-item lines="full">
19
+          <ion-label position="floating">อีเมล์</ion-label>
20
+          <ion-input type="text" required="true" [(ngModel)]='registerForm.email' name='email' type='email'></ion-input>
21
+        </ion-item>
22
+
23
+        <ion-item lines="full">
24
+          <ion-label position="floating">รหัสผ่าน</ion-label>
25
+          <ion-input type="password" required [(ngModel)]='registerForm.password' name='password'></ion-input>
26
+        </ion-item>
27
+      </form>
28
+    </ion-col>
29
+  </ion-row>
30
+  <ion-row>
31
+    <ion-col>
32
+      <ion-button type="submit" color="success" expand="block" (click)="userLogin()">Login</ion-button>
33
+    </ion-col>
34
+  </ion-row>
35
+  <ion-row>
36
+    <ion-col class='ion-text-center'>
37
+      <a (click)="openForgotPassword()" class="small-text">ลืมรหัส</a>      
38
+    </ion-col>
39
+    <ion-col class='ion-text-center'>
40
+      <a (click)="openRegister()" class="small-text">สม้ครใหม่</a>
41
+    </ion-col>
42
+  </ion-row>
43
+  <ion-row>
44
+    <ion-col>
45
+      <span class="divider line one-line">หรือ</span>
46
+    </ion-col>
47
+  </ion-row>
48
+  <ion-row>
49
+    <ion-col>
50
+      <ion-button class="log-fb-in-button" expand="block" (click)="doFbLogin()">
51
+        Log in with Facebook
52
+      </ion-button><br>
53
+      <button (click)="appleSignIn()" block [hidden]="isAndroid">
54
+        <img src="assets/images/appleid_button@2x.png">
55
+      </button>
56
+    </ion-col>
57
+  </ion-row>
58
+  <ion-col>      
59
+    <a [routerLink]="['/tabs/forgot-password']">
60
+      page ลืมรหัส
61
+    </a>
62
+  </ion-col>
63
+  <ion-col>      
64
+    <a [routerLink]="['/tabs/register']">
65
+      page register or signin
66
+    </a>
67
+  </ion-col>
68
+  <ion-col>      
69
+    <a [routerLink]="['/tabs/reset-password']">
70
+      page reset password
71
+    </a>
72
+  </ion-col>
73
+  <ion-col>      
74
+    <a [routerLink]="['/tabs/profile']">
75
+      page profile
76
+    </a>
77
+  </ion-col>
78
+</ion-content>

+ 26 - 0
src/app/login/login.page.scss

@@ -0,0 +1,26 @@
1
+
2
+.divider {
3
+    display: flex;
4
+  
5
+    &:before,
6
+    &:after {
7
+      content: "";
8
+      flex: 1;
9
+    }
10
+  }
11
+  .line {
12
+    align-items: center;
13
+    margin: 1em -1em;
14
+    color: #5f5e5e;
15
+    &:before,
16
+    &:after {
17
+      height: 1px;
18
+      margin: 0 1em;
19
+    }
20
+  }
21
+  .one-line {
22
+    &:before,
23
+    &:after {
24
+      background: #5f5e5e;
25
+    }
26
+  }

+ 24 - 0
src/app/login/login.page.spec.ts

@@ -0,0 +1,24 @@
1
+import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
2
+import { IonicModule } from '@ionic/angular';
3
+
4
+import { LoginPage } from './login.page';
5
+
6
+describe('LoginPage', () => {
7
+  let component: LoginPage;
8
+  let fixture: ComponentFixture<LoginPage>;
9
+
10
+  beforeEach(waitForAsync(() => {
11
+    TestBed.configureTestingModule({
12
+      declarations: [ LoginPage ],
13
+      imports: [IonicModule.forRoot()]
14
+    }).compileComponents();
15
+
16
+    fixture = TestBed.createComponent(LoginPage);
17
+    component = fixture.componentInstance;
18
+    fixture.detectChanges();
19
+  }));
20
+
21
+  it('should create', () => {
22
+    expect(component).toBeTruthy();
23
+  });
24
+});

+ 18 - 0
src/app/login/login.page.ts

@@ -0,0 +1,18 @@
1
+import { Component, OnInit } from '@angular/core';
2
+
3
+@Component({
4
+  selector: 'app-login',
5
+  templateUrl: './login.page.html',
6
+  styleUrls: ['./login.page.scss'],
7
+})
8
+export class LoginPage implements OnInit {
9
+
10
+  registerForm = { email: "", password: "" };
11
+  isAndroid = false;
12
+
13
+  constructor() { }
14
+
15
+  ngOnInit() {
16
+  }
17
+
18
+}

+ 17 - 0
src/app/place/place-routing.module.ts

@@ -0,0 +1,17 @@
1
+import { NgModule } from '@angular/core';
2
+import { Routes, RouterModule } from '@angular/router';
3
+
4
+import { PlacePage } from './place.page';
5
+
6
+const routes: Routes = [
7
+  {
8
+    path: '',
9
+    component: PlacePage
10
+  }
11
+];
12
+
13
+@NgModule({
14
+  imports: [RouterModule.forChild(routes)],
15
+  exports: [RouterModule],
16
+})
17
+export class PlacePageRoutingModule {}

+ 20 - 0
src/app/place/place.module.ts

@@ -0,0 +1,20 @@
1
+import { NgModule } from '@angular/core';
2
+import { CommonModule } from '@angular/common';
3
+import { FormsModule } from '@angular/forms';
4
+
5
+import { IonicModule } from '@ionic/angular';
6
+
7
+import { PlacePageRoutingModule } from './place-routing.module';
8
+
9
+import { PlacePage } from './place.page';
10
+
11
+@NgModule({
12
+  imports: [
13
+    CommonModule,
14
+    FormsModule,
15
+    IonicModule,
16
+    PlacePageRoutingModule
17
+  ],
18
+  declarations: [PlacePage]
19
+})
20
+export class PlacePageModule {}

+ 29 - 0
src/app/place/place.page.html

@@ -0,0 +1,29 @@
1
+<ion-header>
2
+  <ion-toolbar class="new-background-color">
3
+    <ion-title>Wellness Route</ion-title>
4
+  </ion-toolbar>
5
+</ion-header>
6
+
7
+<ion-content>
8
+  <img src="/assets/images/golf-bg.jpg">
9
+  <div class="holidaycard">
10
+    <ion-grid>
11
+      <ion-row>
12
+        <ion-col size="12">
13
+          <div class="txt-place-title">Place Category Name</div>
14
+        </ion-col>
15
+      </ion-row>
16
+      <ion-card *ngFor="let pcl of placecatlist">
17
+        <div *ngIf="$any(pcl).better_featured_image != null">
18
+          <img src="{{$any(pcl).better_featured_image.source_url}}" alt="">
19
+        </div>
20
+        <div *ngIf="$any(pcl).better_featured_image == null">
21
+          <img src="/assets/images/temp.png" />
22
+        </div>
23
+        <ion-card-header>
24
+           <a [routerLink]="['/tabs/place/', pcl.id]"><ion-card-title [innerHTML]="pcl.title.rendered"></ion-card-title></a>
25
+        </ion-card-header>
26
+      </ion-card>
27
+    </ion-grid>
28
+  </div>
29
+</ion-content>

+ 18 - 0
src/app/place/place.page.scss

@@ -0,0 +1,18 @@
1
+.holidaycard {
2
+    position: absolute;
3
+    left: 0px;
4
+    // bottom: 0px;
5
+    top:200px;
6
+    min-height: 48%;
7
+    width: 100%;
8
+    padding: 5px;
9
+    border-radius: 15px ;
10
+    background: white;
11
+    --background: white;
12
+  }
13
+  
14
+  ion-card-title {
15
+    font-family: "IBM Plex Sans Thai", sans-serif !important;
16
+    font-weight: 600;
17
+    font-size: 20px;
18
+  }

+ 24 - 0
src/app/place/place.page.spec.ts

@@ -0,0 +1,24 @@
1
+import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
2
+import { IonicModule } from '@ionic/angular';
3
+
4
+import { PlacePage } from './place.page';
5
+
6
+describe('PlacePage', () => {
7
+  let component: PlacePage;
8
+  let fixture: ComponentFixture<PlacePage>;
9
+
10
+  beforeEach(waitForAsync(() => {
11
+    TestBed.configureTestingModule({
12
+      declarations: [ PlacePage ],
13
+      imports: [IonicModule.forRoot()]
14
+    }).compileComponents();
15
+
16
+    fixture = TestBed.createComponent(PlacePage);
17
+    component = fixture.componentInstance;
18
+    fixture.detectChanges();
19
+  }));
20
+
21
+  it('should create', () => {
22
+    expect(component).toBeTruthy();
23
+  });
24
+});

+ 31 - 0
src/app/place/place.page.ts

@@ -0,0 +1,31 @@
1
+import { Component, OnInit, Input } from '@angular/core';
2
+import { ActivatedRoute, Router } from '@angular/router';
3
+import { WpServiceService } from '../wp-service.service';
4
+
5
+@Component({
6
+  selector: 'app-place',
7
+  templateUrl: './place.page.html',
8
+  styleUrls: ['./place.page.scss'],
9
+})
10
+export class PlacePage implements OnInit {
11
+
12
+  data: any;
13
+  placecatlist: any;
14
+
15
+  constructor(private wpservice: WpServiceService, private route: ActivatedRoute, private router: Router) { }
16
+
17
+  @Input() id: string;
18
+
19
+  ngOnInit() {
20
+    let id = this.route.snapshot.paramMap.get('id') || this.id;
21
+    console.log("fetching ...");
22
+    this.wpservice.getPlaceCat().subscribe((data) => {
23
+      this.placecatlist = data;      
24
+      console.log("load Cat Place ...");
25
+      console.log(data);
26
+    }, error => {
27
+      console.log("errror ", error);
28
+    });
29
+  }
30
+
31
+}

+ 17 - 0
src/app/placedetail/placedetail-routing.module.ts

@@ -0,0 +1,17 @@
1
+import { NgModule } from '@angular/core';
2
+import { Routes, RouterModule } from '@angular/router';
3
+
4
+import { PlacedetailPage } from './placedetail.page';
5
+
6
+const routes: Routes = [
7
+  {
8
+    path: '',
9
+    component: PlacedetailPage
10
+  }
11
+];
12
+
13
+@NgModule({
14
+  imports: [RouterModule.forChild(routes)],
15
+  exports: [RouterModule],
16
+})
17
+export class PlacedetailPageRoutingModule {}

+ 0 - 0
src/app/placedetail/placedetail.module.ts


Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff

tum/soc - Gogs: Simplico Git Service

暂无描述

Migration-to-Wazuh-4.4.md 13KB

Opendistro data migration to Wazuh indexer on docker.

This procedure explains how to migrate Opendistro data from Opendistro to Wazuh indexer in docker production deployments. The example is migrating from v4.2 to v4.4.

Procedure

Assuming that you have a v4.2 production deployment, perform the following steps.

1. Stop 4.2 environment docker-compose -f production-cluster.yml stop

2. List elasticsearch volumes docker volume ls --filter name='wazuh-docker_elastic-data'

3. Inspect elasticsearch volume docker volume inspect wazuh-docker_elastic-data-1

4. Spin down the 4.2 environment. docker-compose -f production-cluster.yml down

Steps 5 and 6 can be done with the volume-migrator.sh script, specifying Docker compose version and project name as parameters.

Ex: $ multi-node/volume-migrator.sh 1.25.0 multi-node

5. Run the volume create command: create new indexer and Wazuh manager volumes using the com.docker.compose.version label value from the previous command.

docker volume create \
           --label com.docker.compose.project=multi-node \
           --label com.docker.compose.version=1.25.0 \
           --label com.docker.compose.volume=wazuh-indexer-data-1 \
           multi-node_wazuh-indexer-data-1
docker volume create \
           --label com.docker.compose.project=multi-node \
           --label com.docker.compose.version=1.25.0 \
           --label com.docker.compose.volume=wazuh-indexer-data-2 \
           multi-node_wazuh-indexer-data-2
docker volume create \
           --label com.docker.compose.project=multi-node \
           --label com.docker.compose.version=1.25.0 \
           --label com.docker.compose.volume=wazuh-indexer-data-3 \
           multi-node_wazuh-indexer-data-3
docker volume create \
           --label com.docker.compose.project=multi-node \
           --label com.docker.compose.version=1.25.0 \
           --label com.docker.compose.volume=master_wazuh_api_configuration \
           multi-node_master_wazuh_api_configuration
docker volume create \
           --label com.docker.compose.project=multi-node \
           --label com.docker.compose.version=1.25.0 \
           --label com.docker.compose.volume=master_wazuh_etc \
           multi-node_docker_wazuh_etc
docker volume create \
           --label com.docker.compose.project=multi-node \
           --label com.docker.compose.version=1.25.0 \
           --label com.docker.compose.volume=master-wazuh-logs \
           multi-node_master-wazuh-logs
docker volume create \
           --label com.docker.compose.project=multi-node \
           --label com.docker.compose.version=1.25.0 \
           --label com.docker.compose.volume=master-wazuh-queue \
           multi-node_master-wazuh-queue
docker volume create \
           --label com.docker.compose.project=multi-node \
           --label com.docker.compose.version=1.25.0 \
           --label com.docker.compose.volume=master-wazuh-var-multigroups \
           multi-node_master-wazuh-var-multigroups
docker volume create \
           --label com.docker.compose.project=multi-node \
           --label com.docker.compose.version=1.25.0 \
           --label com.docker.compose.volume=master-wazuh-integrations \
           multi-node_master-wazuh-integrations
docker volume create \
           --label com.docker.compose.project=multi-node \
           --label com.docker.compose.version=1.25.0 \
           --label com.docker.compose.volume=master-wazuh-active-response \
           multi-node_master-wazuh-active-response
docker volume create \
           --label com.docker.compose.project=multi-node \
           --label com.docker.compose.version=1.25.0 \
           --label com.docker.compose.volume=master-wazuh-agentless \
           multi-node_master-wazuh-agentless
docker volume create \
           --label com.docker.compose.project=multi-node \
           --label com.docker.compose.version=1.25.0 \
           --label com.docker.compose.volume=master-wazuh-wodles \
           multi-node_master-wazuh-wodles
docker volume create \
           --label com.docker.compose.project=multi-node \
           --label com.docker.compose.version=1.25.0 \
           --label com.docker.compose.volume=master-filebeat-etc \
           multi-node_master-filebeat-etc
docker volume create \
           --label com.docker.compose.project=multi-node \
           --label com.docker.compose.version=1.25.0 \
           --label com.docker.compose.volume=master-filebeat-var \
           multi-node_master-filebeat-var
docker volume create \
           --label com.docker.compose.project=multi-node \
           --label com.docker.compose.version=1.25.0 \
           --label com.docker.compose.volume=worker_wazuh_api_configuration \
           multi-node_worker_wazuh_api_configuration
docker volume create \
           --label com.docker.compose.project=multi-node \
           --label com.docker.compose.version=1.25.0 \
           --label com.docker.compose.volume=worker_wazuh_etc \
           multi-node_worker-wazuh-etc
docker volume create \
           --label com.docker.compose.project=multi-node \
           --label com.docker.compose.version=1.25.0 \
           --label com.docker.compose.volume=worker-wazuh-logs \
           multi-node_worker-wazuh-logs
docker volume create \
           --label com.docker.compose.project=multi-node \
           --label com.docker.compose.version=1.25.0 \
           --label com.docker.compose.volume=worker-wazuh-queue \
           multi-node_worker-wazuh-queue
docker volume create \
           --label com.docker.compose.project=multi-node \
           --label com.docker.compose.version=1.25.0 \
           --label com.docker.compose.volume=worker-wazuh-var-multigroups \
           multi-node_worker-wazuh-var-multigroups
docker volume create \
           --label com.docker.compose.project=multi-node \
           --label com.docker.compose.version=1.25.0 \
           --label com.docker.compose.volume=worker-wazuh-integrations \
           multi-node_worker-wazuh-integrations
docker volume create \
           --label com.docker.compose.project=multi-node \
           --label com.docker.compose.version=1.25.0 \
           --label com.docker.compose.volume=worker-wazuh-active-response \
           multi-node_worker-wazuh-active-response
docker volume create \
           --label com.docker.compose.project=multi-node \
           --label com.docker.compose.version=1.25.0 \
           --label com.docker.compose.volume=worker-wazuh-agentless \
           multi-node_worker-wazuh-agentless
docker volume create \
           --label com.docker.compose.project=multi-node \
           --label com.docker.compose.version=1.25.0 \
           --label com.docker.compose.volume=worker-wazuh-wodles \
           multi-node_worker-wazuh-wodles
docker volume create \
           --label com.docker.compose.project=multi-node \
           --label com.docker.compose.version=1.25.0 \
           --label com.docker.compose.volume=worker-filebeat-etc \
           multi-node_worker-filebeat-etc
docker volume create \
           --label com.docker.compose.project=multi-node \
           --label com.docker.compose.version=1.25.0 \
           --label com.docker.compose.volume=worker-filebeat-var \
           multi-node_worker-filebeat-var

6. Copy the volume content from elasticsearch to Wazuh indexer volumes and old Wazuh manager content to new volumes.

docker container run --rm -it \
           -v wazuh-docker_elastic-data-1:/from \
           -v multi-node_wazuh-indexer-data-1:/to \
           alpine ash -c "cd /from ; cp -avp . /to"
docker container run --rm -it \
           -v wazuh-docker_elastic-data-2:/from \
           -v multi-node_wazuh-indexer-data-2:/to \
           alpine ash -c "cd /from ; cp -avp . /to"
docker container run --rm -it \
           -v wazuh-docker_elastic-data-3:/from \
           -v multi-node_wazuh-indexer-data-3:/to \
           alpine ash -c "cd /from ; cp -avp . /to"
docker container run --rm -it \
           -v wazuh-docker_ossec-api-configuration:/from \
           -v multi-node_master-wazuh-api-configuration:/to \
           alpine ash -c "cd /from ; cp -avp . /to"
docker container run --rm -it \
           -v wazuh-docker_ossec-etc:/from \
           -v multi-node_master-wazuh-etc:/to \
           alpine ash -c "cd /from ; cp -avp . /to"
docker container run --rm -it \
           -v wazuh-docker_ossec-logs:/from \
           -v multi-node_master-wazuh-logs:/to \
           alpine ash -c "cd /from ; cp -avp . /to"
docker container run --rm -it \
           -v wazuh-docker_ossec-queue:/from \
           -v multi-node_master-wazuh-queue:/to \
           alpine ash -c "cd /from ; cp -avp . /to"
docker container run --rm -it \
           -v wazuh-docker_ossec-var-multigroups:/from \
           -v multi-node_master-wazuh-var-multigroups:/to \
           alpine ash -c "cd /from ; cp -avp . /to"
docker container run --rm -it \
           -v wazuh-docker_ossec-integrations:/from \
           -v multi-node_master-wazuh-integrations:/to \
           alpine ash -c "cd /from ; cp -avp . /to"
docker container run --rm -it \
           -v wazuh-docker_ossec-active-response:/from \
           -v multi-node_master-wazuh-active-response:/to \
           alpine ash -c "cd /from ; cp -avp . /to"
docker container run --rm -it \
           -v wazuh-docker_ossec-agentless:/from \
           -v multi-node_master-wazuh-agentless:/to \
           alpine ash -c "cd /from ; cp -avp . /to"
docker container run --rm -it \
           -v wazuh-docker_ossec-wodles:/from \
           -v multi-node_master-wazuh-wodles:/to \
           alpine ash -c "cd /from ; cp -avp . /to"
docker container run --rm -it \
           -v wazuh-docker_filebeat-etc:/from \
           -v multi-node_master-filebeat-etc:/to \
           alpine ash -c "cd /from ; cp -avp . /to"
docker container run --rm -it \
           -v wazuh-docker_filebeat-var:/from \
           -v multi-node_master-filebeat-var:/to \
           alpine ash -c "cd /from ; cp -avp . /to"
docker container run --rm -it \
           -v wazuh-docker_worker-ossec-api-configuration:/from \
           -v multi-node_worker-wazuh-api-configuration:/to \
           alpine ash -c "cd /from ; cp -avp . /to"
docker container run --rm -it \
           -v wazuh-docker_worker-ossec-etc:/from \
           -v multi-node_worker-wazuh-etc:/to \
           alpine ash -c "cd /from ; cp -avp . /to"
docker container run --rm -it \
           -v wazuh-docker_worker-ossec-logs:/from \
           -v multi-node_worker-wazuh-logs:/to \
           alpine ash -c "cd /from ; cp -avp . /to"
docker container run --rm -it \
           -v wazuh-docker_worker-ossec-queue:/from \
           -v multi-node_worker-wazuh-queue:/to \
           alpine ash -c "cd /from ; cp -avp . /to"
docker container run --rm -it \
           -v wazuh-docker_worker-ossec-var-multigroups:/from \
           -v multi-node_worker-wazuh-var-multigroups:/to \
           alpine ash -c "cd /from ; cp -avp . /to"
docker container run --rm -it \
           -v wazuh-docker_worker-ossec-integrations:/from \
           -v multi-node_worker-wazuh-integrations:/to \
           alpine ash -c "cd /from ; cp -avp . /to"
docker container run --rm -it \
           -v wazuh-docker_worker-ossec-active-response:/from \
           -v multi-node_worker-wazuh-active-response:/to \
           alpine ash -c "cd /from ; cp -avp . /to"
docker container run --rm -it \
           -v wazuh-docker_worker-ossec-agentless:/from \
           -v multi-node_worker-wazuh-agentless:/to \
           alpine ash -c "cd /from ; cp -avp . /to"
docker container run --rm -it \
           -v wazuh-docker_worker-ossec-wodles:/from \
           -v multi-node_worker-wazuh-wodles:/to \
           alpine ash -c "cd /from ; cp -avp . /to"
docker container run --rm -it \
           -v wazuh-docker_worker-filebeat-etc:/from \
           -v multi-node_worker-filebeat-etc:/to \
           alpine ash -c "cd /from ; cp -avp . /to"
docker container run --rm -it \
           -v wazuh-docker_worker-filebeat-var:/from \
           -v multi-node_worker-filebeat-var:/to \
           alpine ash -c "cd /from ; cp -avp . /to"

7. Start the 4.4 environment.

git checkout 4.4
cd multi-node
docker-compose -f generate-indexer-certs.yml run --rm generator
docker-compose up -d

8. Check the access to Wazuh dashboard: go to the Wazuh dashboard using the web browser and check the data.