fix #2319 add admin storage page
This commit is contained in:
parent
84c4142c60
commit
04d791665a
8 changed files with 123 additions and 89 deletions
|
@ -176,7 +176,9 @@ public class AdminStorageAction extends FessAdminAction {
|
|||
}
|
||||
}
|
||||
} catch (final Exception e) {
|
||||
throw new StorageException("Failed to access " + fessConfig.getStorageEndpoint(), e);
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Failed to access " + fessConfig.getStorageEndpoint(), e);
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
|
|
@ -3126,6 +3126,12 @@ public class FessLabels extends UserMessages {
|
|||
/** The key of the message: Upload */
|
||||
public static final String LABELS_storage_button_upload = "{labels.storage_button_upload}";
|
||||
|
||||
/** The key of the message: Bucket Name */
|
||||
public static final String LABELS_storage_bucket_name = "{labels.storage_bucket_name}";
|
||||
|
||||
/** The key of the message: File */
|
||||
public static final String LABELS_storage_file = "{labels.storage_file}";
|
||||
|
||||
/**
|
||||
* Assert the property is not null.
|
||||
* @param property The value of the property. (NotNull)
|
||||
|
|
|
@ -1033,3 +1033,5 @@ labels.storage_size=Size
|
|||
labels.storage_last_modified=Last Modified
|
||||
labels.storage_upload_file=Upload File
|
||||
labels.storage_button_upload=Upload
|
||||
labels.storage_bucket_name=Bucket Name
|
||||
labels.storage_file=File
|
||||
|
|
|
@ -193,6 +193,7 @@ labels.menu_maintenance=Maintenance
|
|||
labels.menu_related_content=Related Content
|
||||
labels.menu_related_query=Related Query
|
||||
labels.menu_plugin=Plugin
|
||||
labels.menu_storage=Storage
|
||||
labels.sidebar.placeholder_search=Search...
|
||||
labels.sidebar.menu=MENU
|
||||
labels.footer.copyright=©2019 <a href="https://github.com/codelibs">CodeLibs Project</a>.
|
||||
|
@ -839,6 +840,7 @@ labels.general_menu_logging=Logging
|
|||
labels.general_menu_suggest=Suggest
|
||||
labels.general_menu_ldap=LDAP
|
||||
labels.general_menu_notification=Notification
|
||||
labels.general_storage=Storage
|
||||
labels.ldap_provider_url=LDAP URL
|
||||
labels.ldap_security_principal=User DN
|
||||
labels.ldap_admin_security_principal=Bind DN
|
||||
|
@ -849,6 +851,10 @@ labels.ldap_group_filter=Group Filter
|
|||
labels.ldap_memberof_attribute=memberOf Attribute
|
||||
labels.notification_login=Login page
|
||||
labels.notification_search_top=Search top page
|
||||
labels.storage_endpoint=Endpoint
|
||||
labels.storage_access_key=Access Key
|
||||
labels.storage_secret_key=Secret Key
|
||||
labels.storage_bucket=Bucket
|
||||
labels.send_testmail=Send TestMail
|
||||
labels.backup_configuration=Back Up
|
||||
labels.backup_name=Name
|
||||
|
@ -1021,3 +1027,11 @@ labels.plugin_jar_file=Jar File
|
|||
labels.plugin_local_install=Local
|
||||
labels.plugin_remote_install=Remote
|
||||
labels.crud_button_install=Install
|
||||
labels.storage_configuration=Storage
|
||||
labels.storage_name=Name
|
||||
labels.storage_size=Size
|
||||
labels.storage_last_modified=Last Modified
|
||||
labels.storage_upload_file=Upload File
|
||||
labels.storage_button_upload=Upload
|
||||
labels.storage_bucket_name=Bucket Name
|
||||
labels.storage_file=File
|
||||
|
|
|
@ -186,6 +186,7 @@ labels.menu_related_content=関連コンテンツ
|
|||
labels.menu_related_query=関連クエリー
|
||||
labels.sidebar.placeholder_search=検索...
|
||||
labels.menu_plugin=プラグイン
|
||||
labels.menu_storage=ストレージ
|
||||
labels.sidebar.menu=メニュー
|
||||
labels.footer.copyright=©2019 <a href="https://github.com/codelibs">CodeLibs Project</a>.
|
||||
labels.search=検索
|
||||
|
@ -831,6 +832,7 @@ labels.general_menu_logging=ロギング
|
|||
labels.general_menu_suggest=サジェスト
|
||||
labels.general_menu_ldap=LDAP
|
||||
labels.general_menu_notification=お知らせ表示
|
||||
labels.general_storage=ストレージ
|
||||
labels.ldapProviderUrl=LDAP URL
|
||||
labels.ldapSecurityPrincipal=User DN
|
||||
labels.ldapAdminSecurityPrincipal=Bind DN
|
||||
|
@ -849,6 +851,10 @@ labels.ldap_group_filter=グループフィルタ
|
|||
labels.ldap_memberof_attribute=memberOf属性
|
||||
labels.notification_login=ログインページ
|
||||
labels.notification_search_top=検索トップページ
|
||||
labels.storage_endpoint=エンドポイント
|
||||
labels.storage_access_key=アクセスキー
|
||||
labels.storage_secret_key=シークレットキー
|
||||
labels.storage_bucket=バケット
|
||||
labels.send_testmail=テストメールの送信
|
||||
labels.backup_configuration=バックアップ
|
||||
labels.backup_name=名前
|
||||
|
@ -1021,3 +1027,11 @@ labels.plugin_jar_file=Jarファイル
|
|||
labels.plugin_local_install=ローカル
|
||||
labels.plugin_remote_install=リモート
|
||||
labels.crud_button_install=インストール
|
||||
labels.storage_configuration=ストレージ
|
||||
labels.storage_name=名前
|
||||
labels.storage_size=サイズ
|
||||
labels.storage_last_modified=最終更新日時
|
||||
labels.storage_upload_file=ファイルのアップロード
|
||||
labels.storage_button_upload=アップロード
|
||||
labels.storage_bucket_name=バケット名
|
||||
labels.storage_file=ファイル
|
||||
|
|
|
@ -156,6 +156,13 @@ errors.property_type_float={0} should be numeric.
|
|||
errors.property_type_double={0} should be numeric.
|
||||
errors.property_type_date={0} should be date.
|
||||
|
||||
errors.storage_file_upload_failure=Failed to upload {0}.
|
||||
errors.storage_file_not_found=The target file is not found in Storage.
|
||||
errors.storage_file_download_failure=Failed to download {0}.
|
||||
errors.storage_access_error=Storage access error: {0}
|
||||
errors.storage_no_upload_file=Upload file is required.
|
||||
errors.storage_directory_name_is_invalid=Directory name is invalid.
|
||||
|
||||
success.update_crawler_params=Updated parameters.
|
||||
success.delete_doc_from_index=Started a process to delete the document from index.
|
||||
success.crawling_info_delete_all=Deleted session data.
|
||||
|
@ -184,6 +191,7 @@ success.bulk_process_started=Bulk process is started.
|
|||
success.print_thread_dump=Printed thread dump to log file.
|
||||
success.install_plugin=Installing {0} plugin.
|
||||
success.delete_plugin=Deleting {0} plugin.
|
||||
success.upload_file_to_storage=Uploaded {0}
|
||||
|
||||
success.crud_create_crud_table=Created data.
|
||||
success.crud_update_crud_table=Updated data.
|
||||
|
|
|
@ -149,6 +149,13 @@ errors.property_type_float={0}は数値です。
|
|||
errors.property_type_double={0}は数値です。
|
||||
errors.property_type_date={0}は日付です。
|
||||
|
||||
errors.storage_file_upload_failure={0} のアップロードに失敗しました。
|
||||
errors.storage_file_not_found=対象のファイルはストレージ内にありません。
|
||||
errors.storage_file_download_failure={0} のダウンロードに失敗しました。
|
||||
errors.storage_access_error=ストレージアクセスエラー: {0}
|
||||
errors.storage_no_upload_file=アップロードするファイルを指定してください。
|
||||
errors.storage_directory_name_is_invalid=ディレクトリ名が正しくありません。
|
||||
|
||||
success.update_crawler_params = パラメータを更新しました。
|
||||
success.delete_doc_from_index = インデックスから文書を削除するプロセスを開始しました。
|
||||
success.crawling_info_delete_all = セッションデータを削除しました。
|
||||
|
@ -177,6 +184,7 @@ success.bulk_process_started=バルク処理を開始しました。
|
|||
success.print_thread_dump=スレッドダンプをログファイルに出力しました。
|
||||
success.install_plugin=プラグイン {0} をインストールしています。
|
||||
success.delete_plugin=プラグイン {0} を削除しています。
|
||||
success.upload_file_to_storage={0} をアップロードしました。
|
||||
|
||||
success.crud_create_crud_table = データを作成しました。
|
||||
success.crud_update_crud_table = データを更新しました。
|
||||
|
|
|
@ -26,8 +26,16 @@
|
|||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">
|
||||
<la:message key="labels.storage_configuration" />
|
||||
<a aria-hidden="true" href="${contextPath}/admin/storage/"><i class="fas fa-database" aria-hidden="true"></i>${f:h(bucket)}</a>
|
||||
<c:forEach var="item" varStatus="s" items="${pathItems}">
|
||||
/ <span><a href="${contextPath}/admin/storage/list/${f:u(item.id)}/">${f:h(item.name)}</a></span>
|
||||
</c:forEach>
|
||||
/ <a data-toggle="modal" data-target="#createDir"> <i class="fas fa-folder" aria-hidden="true"></i></a>
|
||||
</h3>
|
||||
<span class="pull-right"> <a data-toggle="modal" data-target="#uploadeFile"><i class="fa fa-upload"
|
||||
aria-hidden="true"
|
||||
></i></a>
|
||||
</span>
|
||||
</div>
|
||||
<!-- /.box-header -->
|
||||
<div class="box-body">
|
||||
|
@ -40,97 +48,68 @@
|
|||
</div>
|
||||
<%-- List --%>
|
||||
<div class="data-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<a class="fa fa-home" aria-hidden="true" href="${contextPath}/admin/storage/">(Bucket: ${f:h(endpoint)}/${f:h(bucket)})</a>
|
||||
<c:forEach var="item" varStatus="s" items="${pathItems}">
|
||||
<i class="fa fa-chevron-right" aria-hidden="true"></i>
|
||||
<span><a href="${contextPath}/admin/storage/list/${f:u(item.id)}/">${f:h(item.name)}</a></span>
|
||||
</c:forEach>
|
||||
<i class="fa fa-chevron-right" aria-hidden="true"></i>
|
||||
|
||||
<div type="button" class="btn btn-success btn-xs" name="createDir" data-toggle="modal"
|
||||
data-target="#createDir">
|
||||
<i class="fa fa-plus" aria-hidden="true"></i>
|
||||
</div>
|
||||
|
||||
<div class="modal modal-primary" id="createDir"
|
||||
tabindex="-1" role="dialog"
|
||||
>
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title">
|
||||
<la:message key="labels.crud_title_create" />
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body col-sm-12">
|
||||
<la:form action="/admin/storage/createDir/" enctype="multipart/form-data" styleClass="form-inline">
|
||||
<div class="form-group">
|
||||
<input type="text" name="name" class="form-control" />
|
||||
</div>
|
||||
<input type="hidden" name="path" value="${path}" />
|
||||
<button type="submit" class="btn btn-success" name="createDir">
|
||||
<em class="fa fa-make"></em>
|
||||
<la:message key="labels.crud_button_create" />
|
||||
</button>
|
||||
</la:form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-outline pull-left" data-dismiss="modal">
|
||||
<la:message key="labels.crud_button_cancel" />
|
||||
</button>
|
||||
<div class="modal modal-primary" id="createDir" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<la:form action="/admin/storage/createDir/" enctype="multipart/form-data" styleClass="form-inline">
|
||||
<input type="hidden" name="path" value="${path}" />
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title">
|
||||
<la:message key="labels.crud_title_create" />
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<label for="name" class="control-label"><la:message key="labels.storage_bucket_name" /></label>
|
||||
<input type="text" name="name" class="form-control"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-outline pull-left" data-dismiss="modal">
|
||||
<la:message key="labels.crud_button_cancel" />
|
||||
</button>
|
||||
<button type="submit" class="btn btn-success" name="createDir">
|
||||
<em class="fa fa-make"></em>
|
||||
<la:message key="labels.crud_button_create" />
|
||||
</button>
|
||||
</div>
|
||||
</la:form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div type="button" class="btn btn-success pull-right" name="upload" data-toggle="modal"
|
||||
data-target="#uploadeFile"
|
||||
value="<la:message key="labels.storage_button_upload" />"
|
||||
>
|
||||
<em class="fa fa-upload"></em>
|
||||
<la:message key="labels.storage_button_upload" />
|
||||
</div>
|
||||
<div class="modal modal-primary" id="uploadeFile"
|
||||
tabindex="-1" role="dialog"
|
||||
>
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title">
|
||||
<la:message key="labels.storage_upload_file" />
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body col-sm-12">
|
||||
<la:form action="/admin/storage/upload/" enctype="multipart/form-data" styleClass="form-inline">
|
||||
<div class="form-group">
|
||||
<input type="file" name="uploadFile" class="form-control" />
|
||||
</div>
|
||||
<input type="hidden" name="path" value="${path}" />
|
||||
<button type="submit" class="btn btn-success" name="upload">
|
||||
<em class="fa fa-upload"></em>
|
||||
<la:message key="labels.storage_button_upload" />
|
||||
</button>
|
||||
</la:form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-outline pull-left" data-dismiss="modal">
|
||||
<la:message key="labels.crud_button_cancel" />
|
||||
</button>
|
||||
<div class="modal modal-primary" id="uploadeFile" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<la:form action="/admin/storage/upload/" enctype="multipart/form-data" styleClass="form-inline">
|
||||
<input type="hidden" name="path" value="${path}" />
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title">
|
||||
<la:message key="labels.storage_upload_file" />
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<label for="uploadFile" class="control-label"><la:message key="labels.storage_file" /></label>
|
||||
<input type="file" name="uploadFile" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-outline pull-left" data-dismiss="modal">
|
||||
<la:message key="labels.crud_button_cancel" />
|
||||
</button>
|
||||
<button type="submit" class="btn btn-success" name="upload">
|
||||
<em class="fa fa-upload"></em>
|
||||
<la:message key="labels.storage_button_upload" />
|
||||
</button>
|
||||
</div>
|
||||
</la:form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -141,8 +120,9 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
<th><la:message key="labels.storage_name" /></th>
|
||||
<th><la:message key="labels.storage_size" /></th>
|
||||
<th><la:message key="labels.storage_last_modified" /></th>
|
||||
<th class="col-md-1"><la:message key="labels.storage_size" /></th>
|
||||
<th class="col-md-3"><la:message key="labels.storage_last_modified" /></th>
|
||||
<th class="col-md-2"></th>
|
||||
</tr>
|
||||
<c:if test="${not empty path and not empty parentId}">
|
||||
<tr
|
||||
|
@ -163,7 +143,7 @@
|
|||
<c:if test="${not data.directory}">
|
||||
<tr>
|
||||
<td>
|
||||
<em class="fa fa-file"></em>
|
||||
<em class="far fa-file"></em>
|
||||
${f:h(data.name)}
|
||||
</td>
|
||||
<td>${f:h(data.size)}</td>
|
||||
|
@ -173,7 +153,7 @@
|
|||
<tr
|
||||
data-href="${contextPath}/admin/storage/list/${f:u(data.id)}/">
|
||||
<td>
|
||||
<em class="fa fa-folder-open"></em>
|
||||
<em class="fa fa-folder-open" style="color:#F7C502;"></em>
|
||||
${f:h(data.name)}
|
||||
</td>
|
||||
<td></td>
|
||||
|
|
Loading…
Add table
Reference in a new issue