Skip to content

Commit eb3e8fd

Browse files
author
Masaharu Hayashi
committed
update
1 parent ecb6b72 commit eb3e8fd

9 files changed

Lines changed: 316 additions & 41 deletions

File tree

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,3 +110,13 @@ nginx/keys/*.csr
110110
nginx/keys/*.key
111111
nginx/*-metadata.xml
112112

113+
backup/
114+
115+
# local config files
116+
# regular file is nginx/ams/weko-frontend/app.config.ts
117+
nginx/ams/weko-frontend/.app.config.ts.prod
118+
nginx/ams/weko-frontend/.app.config.ts.dev
119+
# regular file is nginx/ams/weko-frontend/nuxt.config.ts
120+
nginx/ams/weko-frontend/.nuxt.config.ts.prod
121+
nginx/ams/weko-frontend/.nuxt.config.ts.dev
122+

docker-compose.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,10 @@ services:
381381
resources:
382382
limits:
383383
memory: 300m
384+
environment:
385+
- NODE_TLS_REJECT_UNAUTHORIZED=0
386+
extra_hosts:
387+
- "ms2db.ir.rcos.nii.ac.jp:host-gateway"
384388

385389
# certbot:
386390
# image: certbot/certbot:latest
Lines changed: 173 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,173 @@
1+
const weko = 'changeme';
2+
3+
export default defineAppConfig({
4+
wekoOrigin: 'https://' + weko,
5+
wekoApi: 'https://' + weko + '/api/v1',
6+
amsImage: '/img/ams',
7+
amsPath: '/ams',
8+
amsApi: '/api/ams',
9+
export: {
10+
jpcoar:
11+
'https://' + weko + '/oai?verb=GetRecord&metadataPrefix=jpcoar_1.0&identifier=oai:ms2db.ir.rcos.nii.ac.jp:',
12+
dublincore:
13+
'https://' + weko + '/oai?verb=GetRecord&metadataPrefix=oai_dc&identifier=oai:ms2db.ir.rcos.nii.ac.jp:',
14+
ddi: 'https://' + weko + '/oai?verb=GetRecord&metadataPrefix=ddi&identifier=oai:ms2db.ir.rcos.nii.ac.jp:'
15+
},
16+
/** RO-Crate Mapping setting */
17+
roCrate: {
18+
/**
19+
* WEKOのRO-Crate Mapping画面で指定したMappingのkey値を未病画面上のどの枠に表示するか設定
20+
* key: 未病画面上の表示位置
21+
* value: RO-Crate Mapping画面で設定したkey値
22+
*/
23+
root: {
24+
// サムネイル
25+
thumbnail: 'thumbnail',
26+
// 公開区分
27+
releaseRange: 'accessMode',
28+
// 公開日
29+
releaseDate: 'dateCreated',
30+
// メタデータ作成日
31+
createDate: 'dateCreated',
32+
// メタデータ更新日
33+
updateDate: 'reviews',
34+
// データセットの名称
35+
title: 'subjectOf',
36+
// データセットの分野
37+
field: 'genre',
38+
// データ作成者氏名
39+
authorName: 'creator',
40+
// データ作成者所属
41+
authorAffiliation: 'creativeWorkStatus',
42+
// 取得データの対象種別
43+
target: 'character',
44+
// アクセス権
45+
accessMode: 'accessMode',
46+
// キーワード
47+
keywords: 'keywords',
48+
// ファイル情報
49+
file: {
50+
// 格納場所
51+
url: 'url',
52+
// サイズ
53+
size: 'size',
54+
// ライセンス種別
55+
licenseType: 'license',
56+
// ライセンス自由入力
57+
licenseWrite: 'text',
58+
// ファイル形式
59+
format: 'encodingFormat',
60+
// コメント
61+
comment: 'comment'
62+
}
63+
},
64+
/**
65+
* WEKOのRO-Crate Mapping画面で指定したLayerを設定
66+
* ※3階層以下のみ表示可能
67+
*/
68+
layer: {
69+
tab: 'tab',
70+
section: 'section',
71+
subsection: 'subsection'
72+
},
73+
/**
74+
* WEKO側で扱っている選択形式の値を設定
75+
*/
76+
selector: {
77+
// 公開区分
78+
releaseRange: {
79+
// 一般公開
80+
public: 'Public',
81+
// グループ内公開
82+
group: 'Shared',
83+
// 制限公開
84+
member: 'Private',
85+
// 非公開
86+
private: 'Unshared'
87+
},
88+
accessMode: {
89+
// 公開
90+
public: 'open access',
91+
// 共有
92+
group: 'restricted access',
93+
// 非共有・非公開
94+
member: 'embargoed access',
95+
// 公開期間猶予
96+
private: 'metadata only access'
97+
}
98+
}
99+
},
100+
grdm: {
101+
url: '',
102+
relationType: 'isVersionOf'
103+
},
104+
/** CC license setting */
105+
cc: {
106+
/**
107+
* WEKO側で扱っているライセンス種別の値を設定
108+
*/
109+
free: 'license_free',
110+
zero: 'license_12',
111+
by_3: 'license_6',
112+
by_4: 'license_0',
113+
by_sa_3: 'license_7',
114+
by_sa_4: 'license_1',
115+
by_nd_3: 'license_8',
116+
by_nd_4: 'license_2',
117+
by_nc_3: 'license_9',
118+
by_nc_4: 'license_3',
119+
by_nc_sa_3: 'license_10',
120+
by_nc_sa_4: 'license_4',
121+
by_nc_nd_3: 'license_11',
122+
by_nc_nd_4: 'license_5',
123+
/**
124+
* ライセンスのリンクを設定
125+
*/
126+
link: {
127+
zero: 'https://creativecommons.org/publicdomain/zero/1.0/',
128+
zero_ja: 'https://creativecommons.org/publicdomain/zero/1.0/deed.ja',
129+
by_3: 'https://creativecommons.org/licenses/by/3.0/',
130+
by_3_ja: 'https://creativecommons.org/licenses/by/3.0/deed.ja',
131+
by_4: 'https://creativecommons.org/licenses/by/4.0/',
132+
by_4_ja: 'https://creativecommons.org/licenses/by/4.0/deed.ja',
133+
by_sa_3: 'https://creativecommons.org/licenses/by-sa/3.0/',
134+
by_sa_3_ja: 'https://creativecommons.org/licenses/by-sa/3.0/deed.ja',
135+
by_sa_4: 'https://creativecommons.org/licenses/by-sa/4.0/',
136+
by_sa_4_ja: 'https://creativecommons.org/licenses/by-sa/4.0/deed.ja',
137+
by_nd_3: 'https://creativecommons.org/licenses/by-nd/3.0/',
138+
by_nd_3_ja: 'https://creativecommons.org/licenses/by-nd/3.0/deed.ja',
139+
by_nd_4: 'https://creativecommons.org/licenses/by-nd/4.0/',
140+
by_nd_4_ja: 'https://creativecommons.org/licenses/by-nd/4.0/deed.ja',
141+
by_nc_3: 'https://creativecommons.org/licenses/by-nc/3.0/',
142+
by_nc_3_ja: 'https://creativecommons.org/licenses/by-nc/3.0/deed.ja',
143+
by_nc_4: 'https://creativecommons.org/licenses/by-nc/4.0/',
144+
by_nc_4_ja: 'https://creativecommons.org/licenses/by-nc/4.0/deed.ja',
145+
by_nc_sa_3: 'https://creativecommons.org/licenses/by-nc-sa/3.0/',
146+
by_nc_sa_3_ja: 'https://creativecommons.org/licenses/by-nc-sa/3.0/deed.ja',
147+
by_nc_sa_4: 'https://creativecommons.org/licenses/by-nc-sa/4.0/',
148+
by_nc_sa_4_ja: 'https://creativecommons.org/licenses/by-nc-sa/4.0/deed.ja',
149+
by_nc_nd_3: 'https://creativecommons.org/licenses/by-nc-nd/3.0/',
150+
by_nc_nd_3_ja: 'https://creativecommons.org/licenses/by-nc-nd/3.0/deed.ja',
151+
by_nc_nd_4: 'https://creativecommons.org/licenses/by-nc-nd/4.0/',
152+
by_nc_nd_4_ja: 'https://creativecommons.org/licenses/by-nc-nd/4.0/deed.ja'
153+
}
154+
},
155+
/**
156+
* 閲覧権限が必要なアイテム詳細画面からログイン画面へ遷移するまでの時間設定
157+
*/
158+
transitionTimeMs: 10000, // ミリ秒
159+
/**
160+
* フロントのShibboleth Login設定
161+
*/
162+
shibLogin: {
163+
// 本番環境
164+
dsURL: 'https://ds.gakunin.nii.ac.jp/WAYF',
165+
orthrosURL: 'https://core.orthros.gakunin.nii.ac.jp/idp',
166+
// テスト環境
167+
// dsURL: 'https://test-ds.gakunin.nii.ac.jp/WAYF',
168+
// orthrosURL: 'https://core-stg.orthros.gakunin.nii.ac.jp/idp',
169+
entityID: 'https://' + weko + '/shibboleth-sp',
170+
handlerURL: 'https://' + weko + '/Shibboleth.sso',
171+
returnURL: 'https://' + weko + '/secure/login.py?next=ams'
172+
}
173+
});
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
import { defineNuxtConfig } from 'nuxt/config';
2+
3+
export default defineNuxtConfig({
4+
typescript: {
5+
strict: true
6+
},
7+
vite: {
8+
css: {
9+
preprocessorOptions: {
10+
scss: {
11+
additionalData: '@import "@/assets/sass/variables.scss";'
12+
}
13+
}
14+
}
15+
},
16+
modules: ['@nuxtjs/tailwindcss', 'nuxt-lodash'],
17+
css: ['@/assets/sass/styles.scss'],
18+
ssr: false,
19+
app: {
20+
buildAssetsDir: '/ams/_nuxt/',
21+
head: {
22+
htmlAttrs: { lang: 'ja' },
23+
title: 'MoonshotG2 Database Catalog',
24+
meta: [
25+
{ charset: 'utf-8' },
26+
{ name: 'keywords', content: '' },
27+
{ name: 'description', content: '' },
28+
{ name: 'viewport', content: 'width=device-width, initial-scale=1.0' }
29+
],
30+
link: [
31+
{ rel: 'icon', type: 'image/svg+xml', href: '/favicon.svg' },
32+
{ rel: 'preconnect', href: 'https://fonts.googleapis.com' },
33+
{ rel: 'preconnect', href: 'https://fonts.gstatic.com' },
34+
{
35+
rel: 'stylesheet',
36+
href: 'https://fonts.googleapis.com/css2?family=Noto+Sans+JP&family=Noto+Serif+JP:wght@400&display=swap'
37+
},
38+
{
39+
rel: 'stylesheet',
40+
href: 'https://fonts.googleapis.com/icon?family=Material+Icons+Outlined'
41+
}
42+
]
43+
}
44+
},
45+
runtimeConfig: {
46+
public: {
47+
clientId: 'changeme',
48+
redirectURI: 'changeme',
49+
apiTimeout: 10000, // api response timeout (ms)
50+
tokenRefreshLimit: 600, // refresh access token before time (s)
51+
contact: {
52+
use: 'smtp' // email type used for contact (smtp or gmail)
53+
},
54+
dlRanking: {
55+
display: 5 // number of items displayed in DL ranking
56+
}
57+
},
58+
clientSecret: 'changeme',
59+
// email setting for contact
60+
contact: {
61+
to: 'wekosoftware@nii.ac.jp',
62+
subject: 'Contact subject',
63+
smtp: {
64+
host: 'localhost',
65+
port: '1025',
66+
user: 'user',
67+
pass: 'pass'
68+
},
69+
gmail: {
70+
address: 'sample@gmail.com', // Gmail address
71+
pass: 'changeme' // application password
72+
}
73+
}
74+
}
75+
});

nginx/ams/weko-frontend/app.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const weko = 'ms2db.ir.rcos.nii.ac.jp';
1+
const weko = 'changeme';
22

33
export default defineAppConfig({
44
wekoOrigin: 'https://' + weko,

nginx/ams/weko-frontend/nuxt.config.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ export default defineNuxtConfig({
4444
},
4545
runtimeConfig: {
4646
public: {
47-
clientId: 'Z3JmFZtzAkVx1Yet3nmDmvsKgfyPrSfjjUgXkTv7',
48-
redirectURI: 'https://ms2db.ir.rcos.nii.ac.jp/',
47+
clientId: 'changeme',
48+
redirectURI: 'changeme',
4949
apiTimeout: 10000, // api response timeout (ms)
5050
tokenRefreshLimit: 600, // refresh access token before time (s)
5151
contact: {
@@ -55,7 +55,7 @@ export default defineNuxtConfig({
5555
display: 5 // number of items displayed in DL ranking
5656
}
5757
},
58-
clientSecret: 'xgUiGkUqXlJGQa93k2rNwzpr6EkIxzXrJhS0Z8cAigauiCGXRrZ33EIuVVew',
58+
clientSecret: 'changeme',
5959
// email setting for contact
6060
contact: {
6161
to: 'wekosoftware@nii.ac.jp',
@@ -68,7 +68,7 @@ export default defineNuxtConfig({
6868
},
6969
gmail: {
7070
address: 'sample@gmail.com', // Gmail address
71-
pass: 'rcir twcq kjwh cnfu' // application password
71+
pass: 'changeme' // application password
7272
}
7373
}
7474
}

nginx/ams/weko-frontend/pages/ams/detail.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,12 @@
7474
</div>
7575
<div class="bg-miby-bg-gray py-7 text-center flex justify-center items-center">
7676
<button @click="openDataSet">
77+
<center>
7778
<img :src="`${appConf.amsImage ?? '/img'}/logo/gakunin_logo.svg`" alt="Send" />
79+
<br/><div>Access GakuNinRDM project</div>
80+
</center>
7881
</button>
79-
<div>Go to GakuNinRDM</div>
82+
8083
</div>
8184
</div>
8285
<!-- リクエストメール(リクエストメールアドレス有&プロジェクトURL無) -->

nginx/ams/weko-frontend/pages/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ async function init() {
148148
}
149149
setTimeout(() => {
150150
location.reload();
151-
}, 300);
151+
}, 600);
152152
});
153153
}
154154
}

0 commit comments

Comments
 (0)