diff options
Diffstat (limited to 'gui-editors/gui-editor-apex/src')
54 files changed, 1516 insertions, 500 deletions
diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/.gitignore b/gui-editors/gui-editor-apex/src/main/resources/webapp/.gitignore new file mode 100644 index 0000000..0b898ee --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/.gitignore @@ -0,0 +1,5 @@ +node_modules/ +node/ +dist/bundle.js +coverage/ +reports/
\ No newline at end of file diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/close.html b/gui-editors/gui-editor-apex/src/main/resources/webapp/dist/close.html index 60c43a5..60c43a5 100644 --- a/gui-editors/gui-editor-apex/src/main/resources/webapp/close.html +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/dist/close.html diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/css/close.css b/gui-editors/gui-editor-apex/src/main/resources/webapp/dist/css/close.css index 128c060..128c060 100644 --- a/gui-editors/gui-editor-apex/src/main/resources/webapp/css/close.css +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/dist/css/close.css diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/css/contextMenu.css b/gui-editors/gui-editor-apex/src/main/resources/webapp/dist/css/contextMenu.css index 78f5288..78f5288 100644 --- a/gui-editors/gui-editor-apex/src/main/resources/webapp/css/contextMenu.css +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/dist/css/contextMenu.css diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/css/dropdownList.css b/gui-editors/gui-editor-apex/src/main/resources/webapp/dist/css/dropdownList.css index 483a1ce..483a1ce 100644 --- a/gui-editors/gui-editor-apex/src/main/resources/webapp/css/dropdownList.css +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/dist/css/dropdownList.css diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/css/fileMenu.css b/gui-editors/gui-editor-apex/src/main/resources/webapp/dist/css/fileMenu.css index 8d905d7..8d905d7 100644 --- a/gui-editors/gui-editor-apex/src/main/resources/webapp/css/fileMenu.css +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/dist/css/fileMenu.css diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/css/interfaceAssets.css b/gui-editors/gui-editor-apex/src/main/resources/webapp/dist/css/interfaceAssets.css index b309cb2..0f965ee 100644 --- a/gui-editors/gui-editor-apex/src/main/resources/webapp/css/interfaceAssets.css +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/dist/css/interfaceAssets.css @@ -1030,14 +1030,14 @@ h4 { display: none; } .ebInput-statusOk:before { - background-image: url('../resources/form/valid_icon.svg'); + background-image: url('../../resources/form/valid_icon.svg'); } .ebInput-statusError { color: #e32119; display: none; } .ebInput-statusError:before { - background-image: url('../resources/form/invalid_icon.svg'); + background-image: url('../../resources/form/invalid_icon.svg'); } .ebInput-status_none { display: none; @@ -1805,901 +1805,901 @@ a.ebBtn_active { margin: 4px; } .ebIcon_upArrow { - background-image: url('../resources/16px/ArrowUpSmall_black_16px.svg'); + background-image: url('../../resources/16px/ArrowUpSmall_black_16px.svg'); } .ebIcon_upArrow_white { - background-image: url('../resources/16px/arrowUpSmall_white_16px.svg'); + background-image: url('../../resources/16px/arrowUpSmall_white_16px.svg'); } .ebIcon_downArrow { - background-image: url('../resources/16px/ArrowDownSmall_black_16px.svg'); + background-image: url('../../resources/16px/ArrowDownSmall_black_16px.svg'); } .ebIcon_downArrow_white { - background-image: url('../resources/16px/ArrowDownSmall_white_16px.svg'); + background-image: url('../../resources/16px/ArrowDownSmall_white_16px.svg'); } .ebIcon_leftArrow { - background-image: url('../resources/16px/ArrowLeftSmall_black_16px.svg'); + background-image: url('../../resources/16px/ArrowLeftSmall_black_16px.svg'); } .ebIcon_leftArrow_white { - background-image: url('../resources/16px/ArrowLeftSmall_white_16px.svg'); + background-image: url('../../resources/16px/ArrowLeftSmall_white_16px.svg'); } .ebIcon_rightArrow { - background-image: url('../resources/16px/ArrowRightSmall_black_16px.svg'); + background-image: url('../../resources/16px/ArrowRightSmall_black_16px.svg'); } .ebIcon_rightArrow_white { - background-image: url('../resources/16px/ArrowRightSmall_white_16px.svg'); + background-image: url('../../resources/16px/ArrowRightSmall_white_16px.svg'); } .ebIcon_prevArrow { - background-image: url('../resources/16px/ArrowDoubleLeftSmall_black_16px.svg'); + background-image: url('../../resources/16px/ArrowDoubleLeftSmall_black_16px.svg'); } .ebIcon_nextArrow { - background-image: url('../resources/16px/ArrowDoubleRightSmall_black_16px.svg'); + background-image: url('../../resources/16px/ArrowDoubleRightSmall_black_16px.svg'); } .ebIcon_upArrow_10px { - background-image: url('../resources/10px/ArrowUpSmall_black_10px.svg'); + background-image: url('../../resources/10px/ArrowUpSmall_black_10px.svg'); } .ebIcon_downArrow_10px { - background-image: url('../resources/10px/ArrowDownSmall_black_10px.svg'); + background-image: url('../../resources/10px/ArrowDownSmall_black_10px.svg'); } .ebIcon_leftArrow_10px { - background-image: url('../resources/10px/ArrowLeftSmall_black_10px.svg'); + background-image: url('../../resources/10px/ArrowLeftSmall_black_10px.svg'); } .ebIcon_rightArrow_10px { - background-image: url('../resources/10px/ArrowRightSmall_black_10px.svg'); + background-image: url('../../resources/10px/ArrowRightSmall_black_10px.svg'); } .ebIcon_prevArrow_10px { - background-image: url('../resources/10px/ArrowDoubleLeftSmall_black_10px.svg'); + background-image: url('../../resources/10px/ArrowDoubleLeftSmall_black_10px.svg'); } .ebIcon_nextArrow_10px { - background-image: url('../resources/10px/ArrowDoubleRightSmall_black_10px.svg'); + background-image: url('../../resources/10px/ArrowDoubleRightSmall_black_10px.svg'); } .ebIcon_errorSmall { - background-image: url('../resources/other/errorSmall_red_10px.svg'); + background-image: url('../../resources/other/errorSmall_red_10px.svg'); } .ebIcon_tickSmallBlack { - background-image: url('../resources/other/tick_black_10x8px.svg'); + background-image: url('../../resources/other/tick_black_10x8px.svg'); } .ebIcon_tickSmallGreen { - background-image: url('../resources/other/tick_green_10x8px.svg'); + background-image: url('../../resources/other/tick_green_10x8px.svg'); } .ebIcon_upArrowLarge { - background-image: url('../resources/16px/ArrowUp_black_16px.svg'); + background-image: url('../../resources/16px/ArrowUp_black_16px.svg'); } .ebIcon_upArrowLarge_white { - background-image: url('../resources/16px/ArrowUp_white_16px.svg'); + background-image: url('../../resources/16px/ArrowUp_white_16px.svg'); } .ebIcon_downArrowLarge { - background-image: url('../resources/16px/ArrowDown_black_16px.svg'); + background-image: url('../../resources/16px/ArrowDown_black_16px.svg'); } .ebIcon_downArrowLarge_white { - background-image: url('../resources/16px/ArrowDown_white_16px.svg'); + background-image: url('../../resources/16px/ArrowDown_white_16px.svg'); } .ebIcon_downArrowLarge_blue { - background-image: url('../resources/16px/ArrowDown_blue_16px.svg'); + background-image: url('../../resources/16px/ArrowDown_blue_16px.svg'); } .ebIcon_leftArrowLarge { - background-image: url('../resources/16px/ArrowLeft_black_16px.svg'); + background-image: url('../../resources/16px/ArrowLeft_black_16px.svg'); } .ebIcon_leftArrowLarge_white { - background-image: url('../resources/16px/ArrowLeft_white_16px.svg'); + background-image: url('../../resources/16px/ArrowLeft_white_16px.svg'); } .ebIcon_rightArrowLarge { - background-image: url('../resources/16px/ArrowRight_black_16px.svg'); + background-image: url('../../resources/16px/ArrowRight_black_16px.svg'); } .ebIcon_rightArrowLarge_white { - background-image: url('../resources/16px/ArrowRight_white_16px.svg'); + background-image: url('../../resources/16px/ArrowRight_white_16px.svg'); } .ebIcon_circleArrowDown { - background-image: url('../resources/16px/circleArrowDown_black_16px.svg'); + background-image: url('../../resources/16px/circleArrowDown_black_16px.svg'); } .ebIcon_circleArrowDown_white { - background-image: url('../resources/16px/circleArrowDown_white_16px.svg'); + background-image: url('../../resources/16px/circleArrowDown_white_16px.svg'); } .ebIcon_circleArrowLeft { - background-image: url('../resources/16px/circleArrowLeft_black_16px.svg'); + background-image: url('../../resources/16px/circleArrowLeft_black_16px.svg'); } .ebIcon_circleArrowLeft_white { - background-image: url('../resources/16px/circleArrowLeft_white_16px.svg'); + background-image: url('../../resources/16px/circleArrowLeft_white_16px.svg'); } .ebIcon_circleArrowRight { - background-image: url('../resources/16px/circleArrowRight_black_16px.svg'); + background-image: url('../../resources/16px/circleArrowRight_black_16px.svg'); } .ebIcon_circleArrowRight_white { - background-image: url('../resources/16px/circleArrowRight_white_16px.svg'); + background-image: url('../../resources/16px/circleArrowRight_white_16px.svg'); } .ebIcon_circleArrowUp { - background-image: url('../resources/16px/circleArrowUp_black_16px.svg'); + background-image: url('../../resources/16px/circleArrowUp_black_16px.svg'); } .ebIcon_circleArrowUp_white { - background-image: url('../resources/16px/circleArrowUp_white_16px.svg'); + background-image: url('../../resources/16px/circleArrowUp_white_16px.svg'); } .ebIcon_circleCaretDown { - background-image: url('../resources/16px/circleCaretDown_black_16px.svg'); + background-image: url('../../resources/16px/circleCaretDown_black_16px.svg'); } .ebIcon_circleCaretDown_white { - background-image: url('../resources/16px/circleCaretDown_white_16px.svg'); + background-image: url('../../resources/16px/circleCaretDown_white_16px.svg'); } .ebIcon_circleCaretLeft { - background-image: url('../resources/16px/circleCaretLeft_black_16px.svg'); + background-image: url('../../resources/16px/circleCaretLeft_black_16px.svg'); } .ebIcon_circleCaretLeft_white { - background-image: url('../resources/16px/circleCaretLeft_white_16px.svg'); + background-image: url('../../resources/16px/circleCaretLeft_white_16px.svg'); } .ebIcon_circleCaretRight { - background-image: url('../resources/16px/circleCaretRight_black_16px.svg'); + background-image: url('../../resources/16px/circleCaretRight_black_16px.svg'); } .ebIcon_circleCaretRight_white { - background-image: url('../resources/16px/circleCaretRight_white_16px.svg'); + background-image: url('../../resources/16px/circleCaretRight_white_16px.svg'); } .ebIcon_circleCaretUp { - background-image: url('../resources/16px/circleCaretUp_black_16px.svg'); + background-image: url('../../resources/16px/circleCaretUp_black_16px.svg'); } .ebIcon_circleCaretUp_white { - background-image: url('../resources/16px/circleCaretUp_white_16px.svg'); + background-image: url('../../resources/16px/circleCaretUp_white_16px.svg'); } .ebIcon_eLogo { background-image: url('../resources/systemBar/econ01.svg'); } .ebIcon_comment { - background-image: url('../resources/16px/Comment_black_16px.svg'); + background-image: url('../../resources/16px/Comment_black_16px.svg'); } .ebIcon_comment_white { - background-image: url('../resources/16px/comment_white.svg'); + background-image: url('../../resources/16px/comment_white.svg'); } .ebIcon_copy { - background-image: url('../resources/16px/copy_black_16px.svg'); + background-image: url('../../resources/16px/copy_black_16px.svg'); } .ebIcon_copy_white { - background-image: url('../resources/16px/copy_white_16px.svg'); + background-image: url('../../resources/16px/copy_white_16px.svg'); } .ebIcon_cut { - background-image: url('../resources/16px/cut_black.svg'); + background-image: url('../../resources/16px/cut_black.svg'); } .ebIcon_cut_white { - background-image: url('../resources/16px/cut_white.svg'); + background-image: url('../../resources/16px/cut_white.svg'); } .ebIcon_delete { - background-image: url('../resources/16px/delete_black_16px.svg'); + background-image: url('../../resources/16px/delete_black_16px.svg'); } .ebIcon_delete_white { - background-image: url('../resources/16px/delete_white_16px.svg'); + background-image: url('../../resources/16px/delete_white_16px.svg'); } .ebIcon_duplicate { - background-image: url('../resources/16px/duplicate_black_16px.svg'); + background-image: url('../../resources/16px/duplicate_black_16px.svg'); } .ebIcon_duplicate_white { - background-image: url('../resources/16px/duplicate_white_16px.svg'); + background-image: url('../../resources/16px/duplicate_white_16px.svg'); } .ebIcon_edit { - background-image: url('../resources/16px/edit_black_16px.svg'); + background-image: url('../../resources/16px/edit_black_16px.svg'); } .ebIcon_editWhite { - background-image: url('../resources/16px/edit_white_16px.svg'); + background-image: url('../../resources/16px/edit_white_16px.svg'); } .ebIcon_newFile { - background-image: url('../resources/16px/newFile_black_16px.svg'); + background-image: url('../../resources/16px/newFile_black_16px.svg'); } .ebIcon_newFile_white { - background-image: url('../resources/16px/newFile_white_16px.svg'); + background-image: url('../../resources/16px/newFile_white_16px.svg'); } .ebIcon_save { - background-image: url('../resources/16px/save_black_16px.svg'); + background-image: url('../../resources/16px/save_black_16px.svg'); } .ebIcon_save_white { background-size: contain; - background-image: url('../resources/16px/save_white.svg'); + background-image: url('../../resources/16px/save_white.svg'); } .ebIcon_filter { - background-image: url('../resources/16px/filter_black_16px.svg'); + background-image: url('../../resources/16px/filter_black_16px.svg'); } .ebIcon_filterOn { - background-image: url('../resources/16px/filters_on.svg'); + background-image: url('../../resources/16px/filters_on.svg'); } .ebIcon_filterOff { - background-image: url('../resources/16px/filters_off.svg'); + background-image: url('../../resources/16px/filters_off.svg'); } .ebIcon_filter_white { - background-image: url('../resources/16px/filter_white_16px.svg'); + background-image: url('../../resources/16px/filter_white_16px.svg'); } .ebIcon_folder { - background-image: url('../resources/16px/folder_black_16px.svg'); + background-image: url('../../resources/16px/folder_black_16px.svg'); } .ebIcon_folder_white { - background-image: url('../resources/16px/folder_white_16px.svg'); + background-image: url('../../resources/16px/folder_white_16px.svg'); } .ebIcon_folderClosed { - background-image: url('../resources/16px/folderClosed_black.svg'); + background-image: url('../../resources/16px/folderClosed_black.svg'); } .ebIcon_folderClosed_white { - background-image: url('../resources/16px/folderClosed_white.svg'); + background-image: url('../../resources/16px/folderClosed_white.svg'); } .ebIcon_detach { - background-image: url('../resources/16px/detach_black_16px.svg'); + background-image: url('../../resources/16px/detach_black_16px.svg'); } .ebIcon_detach_white { background-size: contain; - background-image: url('../resources/16px/detach_white.svg'); + background-image: url('../../resources/16px/detach_white.svg'); } .ebIcon_import { - background-image: url('../resources/16px/import_black.svg'); + background-image: url('../../resources/16px/import_black.svg'); } .ebIcon_import_white { - background-image: url('../resources/16px/import_white.svg'); + background-image: url('../../resources/16px/import_white.svg'); } .ebIcon_export { - background-image: url('../resources/16px/export_black_16px.svg'); + background-image: url('../../resources/16px/export_black_16px.svg'); } .ebIcon_export_white { - background-image: url('../resources/16px/export_white.svg'); + background-image: url('../../resources/16px/export_white.svg'); } .ebIcon_undo { - background-image: url('../resources/16px/undo_black_16px.svg'); + background-image: url('../../resources/16px/undo_black_16px.svg'); } .ebIcon_undo_white { - background-image: url('../resources/16px/undo_white_16px.svg'); + background-image: url('../../resources/16px/undo_white_16px.svg'); } .ebIcon_cancelled { - background-image: url('../resources/16px/Cancelled_Black_16px.svg'); + background-image: url('../../resources/16px/Cancelled_Black_16px.svg'); } .ebIcon_draft { background-size: contain; - background-image: url('../resources/16px/draft.svg'); + background-image: url('../../resources/16px/draft.svg'); } .ebIcon_importExport { - background-image: url('../resources/16px/import_export.svg'); + background-image: url('../../resources/16px/import_export.svg'); } .ebIcon_login { - background-image: url('../resources/16px/login.svg'); + background-image: url('../../resources/16px/login.svg'); } .ebIcon_move { - background-image: url('../resources/16px/move.svg'); + background-image: url('../../resources/16px/move.svg'); } .ebIcon_remove { - background-image: url('../resources/16px/remove.svg'); + background-image: url('../../resources/16px/remove.svg'); } .ebIcon_valid { - background-image: url('../resources/16px/valid_icon.svg'); + background-image: url('../../resources/16px/valid_icon.svg'); } .ebIcon_invalid { - background-image: url('../resources/16px/invalid_icon.svg'); + background-image: url('../../resources/16px/invalid_icon.svg'); } .ebIcon_error { - background-image: url('../resources/16px/error_red_16px.svg'); + background-image: url('../../resources/16px/error_red_16px.svg'); } .ebIcon_warning { - background-image: url('../resources/16px/warning_yellow_16px.svg'); + background-image: url('../../resources/16px/warning_yellow_16px.svg'); } .ebIcon_warningOrange { - background-image: url('../resources/16px/warning_orange_16px.svg'); + background-image: url('../../resources/16px/warning_orange_16px.svg'); } .ebIcon_warning_white { - background-image: url('../resources/16px/warning_white.svg'); + background-image: url('../../resources/16px/warning_white.svg'); } .ebIcon_warningShield { - background-image: url('../resources/16px/warningShield_black_16px.svg'); + background-image: url('../../resources/16px/warningShield_black_16px.svg'); } .ebIcon_warningShield_white { background-size: contain; - background-image: url('../resources/16px/warningShield_white.svg'); + background-image: url('../../resources/16px/warningShield_white.svg'); } .ebIcon_mail { - background-image: url('../resources/16px/mail_black_16px.svg'); + background-image: url('../../resources/16px/mail_black_16px.svg'); } .ebIcon_mail_white { - background-image: url('../resources/16px/mail_white_16px.svg'); + background-image: url('../../resources/16px/mail_white_16px.svg'); } .ebIcon_mailRead { - background-image: url('../resources/16px/mailRead_black_16px.svg'); + background-image: url('../../resources/16px/mailRead_black_16px.svg'); } .ebIcon_mailRead_white { - background-image: url('../resources/16px/mailRead_white_16px.svg'); + background-image: url('../../resources/16px/mailRead_white_16px.svg'); } .ebIcon_link { - background-image: url('../resources/16px/Link_black_16px.svg');; + background-image: url('../../resources/16px/Link_black_16px.svg');; } .ebIcon_lock { - background-image: url('../resources/16px/lock_black_16px.svg'); + background-image: url('../../resources/16px/lock_black_16px.svg'); } .ebIcon_lock_white { - background-image: url('../resources/16px/lock_white_16px.svg'); + background-image: url('../../resources/16px/lock_white_16px.svg'); } .ebIcon_unlock { - background-image: url('../resources/16px/unlock_black_16px.svg'); + background-image: url('../../resources/16px/unlock_black_16px.svg'); } .ebIcon_unlock_white { - background-image: url('../resources/16px/unlock_white_16px.svg'); + background-image: url('../../resources/16px/unlock_white_16px.svg'); } .ebIcon_logout { - background-image: url('../resources/16px/logout_black_16px.svg'); + background-image: url('../../resources/16px/logout_black_16px.svg'); } .ebIcon_menu { - background-image: url('../resources/16px/menu_black_16px.svg'); + background-image: url('../../resources/16px/menu_black_16px.svg'); } .ebIcon_menu_white { - background-image: url('../resources/16px/menu_white_16px.svg'); + background-image: url('../../resources/16px/menu_white_16px.svg'); } .ebIcon_search { - background-image: url('../resources/16px/search_black_16px.svg'); + background-image: url('../../resources/16px/search_black_16px.svg'); } .ebIcon_searchWhite { - background-image: url('../resources/16px/search_white_16px.svg'); + background-image: url('../../resources/16px/search_white_16px.svg'); } .ebIcon_advancedSearch { - background-image: url('../resources/16px/advanced_search_black_16px.svg'); + background-image: url('../../resources/16px/advanced_search_black_16px.svg'); } .ebIcon_advancedSearchWhite { - background-image: url('../resources/16px/advanced_search_white_16px.svg'); + background-image: url('../../resources/16px/advanced_search_white_16px.svg'); } .ebIcon_share { - background-image: url('../resources/16px/share_black_16px.svg'); + background-image: url('../../resources/16px/share_black_16px.svg'); } .ebIcon_share_white { - background-image: url('../resources/16px/share_white.svg'); + background-image: url('../../resources/16px/share_white.svg'); } .ebIcon_star { - background-image: url('../resources/16px/star_black_16px.svg'); + background-image: url('../../resources/16px/star_black_16px.svg'); } .ebIcon_star_white { - background-image: url('../resources/16px/star_white_16px.svg'); + background-image: url('../../resources/16px/star_white_16px.svg'); } .ebIcon_star_yellow { - background-image: url('../resources/16px/star_yellow_16px.svg'); + background-image: url('../../resources/16px/star_yellow_16px.svg'); } .ebIcon_starOutline { - background-image: url('../resources/16px/star_outline_black_16px.svg'); + background-image: url('../../resources/16px/star_outline_black_16px.svg'); } .ebIcon_starOutline_white { - background-image: url('../resources/16px/star_outline_white_16px.svg'); + background-image: url('../../resources/16px/star_outline_white_16px.svg'); } .ebIcon_starOutline_yellow { - background-image: url('../resources/16px/star_outline_yellow_16px.svg'); + background-image: url('../../resources/16px/star_outline_yellow_16px.svg'); } .ebIcon_tick { - background-image: url('../resources/16px/tick_green_16px.svg'); + background-image: url('../../resources/16px/tick_green_16px.svg'); } .ebIcon_tick_black { - background-image: url('../resources/16px/tick_16px.svg'); + background-image: url('../../resources/16px/tick_16px.svg'); } .ebIcon_simpleGreenTick { - background-image: url('../resources/16px/simple_green_tick.svg'); + background-image: url('../../resources/16px/simple_green_tick.svg'); } .ebIcon_simpleTick_black { - background-image: url('../resources/16px/simple_tick.svg'); + background-image: url('../../resources/16px/simple_tick.svg'); } .ebIcon_download { - background-image: url('../resources/16px/download_black.svg'); + background-image: url('../../resources/16px/download_black.svg'); } .ebIcon_download_white { - background-image: url('../resources/16px/download_white.svg'); + background-image: url('../../resources/16px/download_white.svg'); } .ebIcon_downloadWhite { - background-image: url('../resources/16px/download_white_16px.svg'); + background-image: url('../../resources/16px/download_white_16px.svg'); } .ebIcon_documentWhite { - background-image: url('../resources/16px/document_white_16px.svg'); + background-image: url('../../resources/16px/document_white_16px.svg'); } .ebIcon_expand { - background-image: url('../resources/16px/expand_black_16px.svg'); + background-image: url('../../resources/16px/expand_black_16px.svg'); } .ebIcon_rowCollapsed { - background-image: url('../resources/16px/rowCollapsed_black_16px.svg'); + background-image: url('../../resources/16px/rowCollapsed_black_16px.svg'); } .ebIcon_rowExpanded { - background-image: url('../resources/16px/rowExpanded_black_16px.svg'); + background-image: url('../../resources/16px/rowExpanded_black_16px.svg'); } .ebIcon_rowView { - background-image: url('../resources/16px/rowView_black_16px.svg'); + background-image: url('../../resources/16px/rowView_black_16px.svg'); } .ebIcon_rowView_white { - background-image: url('../resources/16px/rowView_white.svg'); + background-image: url('../../resources/16px/rowView_white.svg'); } .ebIcon_externalApp { - background-image: url('../resources/16px/externalApp_black_16px.svg'); + background-image: url('../../resources/16px/externalApp_black_16px.svg'); } .ebIcon_externalApp_white { - background-image: url('../resources/16px/externalApp_white_16px.svg'); + background-image: url('../../resources/16px/externalApp_white_16px.svg'); } .ebIcon_fullscreen { - background-image: url('../resources/16px/fullscreen_black_16px.svg'); + background-image: url('../../resources/16px/fullscreen_black_16px.svg'); } .ebIcon_fullscreenMinimize { - background-image: url('../resources/16px/fullscreenMinimise_black_16px.svg'); + background-image: url('../../resources/16px/fullscreenMinimise_black_16px.svg'); } .ebIcon_help { - background-image: url('../resources/16px/help_black_16px.svg'); + background-image: url('../../resources/16px/help_black_16px.svg'); } .ebIcon_help_white { - background-image: url('../resources/16px/help_white.svg'); + background-image: url('../../resources/16px/help_white.svg'); } .ebIcon_info { - background-image: url('../resources/16px/info_black.svg'); + background-image: url('../../resources/16px/info_black.svg'); } .ebIcon_info_white { - background-image: url('../resources/16px/info_white.svg'); + background-image: url('../../resources/16px/info_white.svg'); } .ebIcon_dialogInfo { - background-image: url('../resources/16px/dialogInfo_blue.svg'); + background-image: url('../../resources/16px/dialogInfo_blue.svg'); } .ebIcon_dialogInfo_white { - background-image: url('../resources/16px/dialogInfo_white.svg'); + background-image: url('../../resources/16px/dialogInfo_white.svg'); } .ebIcon_infoMsgIndicator { - background-image: url('../resources/16px/infoMsgIndicator_16px.svg'); + background-image: url('../../resources/16px/infoMsgIndicator_16px.svg'); } .ebIcon_exitFullscreen { - background-image: url('../resources/16px/minimiseFullscreen_black_16px.svg'); + background-image: url('../../resources/16px/minimiseFullscreen_black_16px.svg'); } .ebIcon_refresh { - background-image: url('../resources/16px/refresh_black_16px.svg'); + background-image: url('../../resources/16px/refresh_black_16px.svg'); } .ebIcon_refresh_white { - background-image: url('../resources/16px/refresh_white_16px.svg'); + background-image: url('../../resources/16px/refresh_white_16px.svg'); } .ebIcon_settings { - background-image: url('../resources/16px/settings_black_16px.svg'); + background-image: url('../../resources/16px/settings_black_16px.svg'); } .ebIcon_settings_white { - background-image: url('../resources/16px/settings_white_16px.svg'); + background-image: url('../../resources/16px/settings_white_16px.svg'); } .ebIcon_user { - background-image: url('../resources/16px/user_black_16px.svg'); + background-image: url('../../resources/16px/user_black_16px.svg'); } .ebIcon_user_white { - background-image: url('../resources/16px/user_white_16px.svg'); + background-image: url('../../resources/16px/user_white_16px.svg'); } .ebIcon_close { - background-image: url('../resources/16px/X_black_16px.svg'); + background-image: url('../../resources/16px/X_black_16px.svg'); } .ebIcon_close_white { - background-image: url('../resources/16px/close_white_16px.svg'); + background-image: url('../../resources/16px/close_white_16px.svg'); } .ebIcon_close_blue { - background-image: url('../resources/16px/X_blue_16px.svg'); + background-image: url('../../resources/16px/X_blue_16px.svg'); } .ebIcon_close_paleBlue { - background-image: url('../resources/16px/X_paleBlue_16px.svg'); + background-image: url('../../resources/16px/X_paleBlue_16px.svg'); } .ebIcon_close_green { - background-image: url('../resources/16px/X_green_16px.svg'); + background-image: url('../../resources/16px/X_green_16px.svg'); } .ebIcon_close_orange { - background-image: url('../resources/16px/X_orange_16px.svg'); + background-image: url('../../resources/16px/X_orange_16px.svg'); } .ebIcon_close_red { - background-image: url('../resources/16px/X_red_16px.svg'); + background-image: url('../../resources/16px/X_red_16px.svg'); } .ebIcon_close_yellow { - background-image: url('../resources/16px/X_yellow_16px.svg'); + background-image: url('../../resources/16px/X_yellow_16px.svg'); } .ebIcon_minus { - background-image: url('../resources/16px/minus_black_16px.svg'); + background-image: url('../../resources/16px/minus_black_16px.svg'); } .ebIcon_plus { - background-image: url('../resources/16px/plus_black_16px.svg'); + background-image: url('../../resources/16px/plus_black_16px.svg'); } .ebIcon_add { - background-image: url('../resources/16px/add_black_16px.svg'); + background-image: url('../../resources/16px/add_black_16px.svg'); } .ebIcon_add_white { - background-image: url('../resources/16px/add_white_16px.svg'); + background-image: url('../../resources/16px/add_white_16px.svg'); } .ebIcon_multiSelect { - background-image: url('../resources/16px/multiSelect_black_16px.svg'); + background-image: url('../../resources/16px/multiSelect_black_16px.svg'); } .ebIcon_multiSelect_white { background-size: contain; - background-image: url('../resources/16px/multiSelect_white.svg'); + background-image: url('../../resources/16px/multiSelect_white.svg'); } .ebIcon_multiSort { - background-image: url('../resources/16px/multi-sort.svg'); + background-image: url('../../resources/16px/multi-sort.svg'); } .ebIcon_multiSort_white { - background-image: url('../resources/16px/multi-sort_white.svg'); + background-image: url('../../resources/16px/multi-sort_white.svg'); } .ebIcon_sort { - background-image: url('../resources/16px/sort.svg'); + background-image: url('../../resources/16px/sort.svg'); } .ebIcon_sort_white { - background-image: url('../resources/16px/sort_white.svg'); + background-image: url('../../resources/16px/sort_white.svg'); } .ebIcon_stop { - background-image: url('../resources/16px/stop_black_16px.svg'); + background-image: url('../../resources/16px/stop_black_16px.svg'); } .ebIcon_pause { - background-image: url('../resources/16px/pause_black_16px.svg'); + background-image: url('../../resources/16px/pause_black_16px.svg'); } .ebIcon_suspend { - background-image: url('../resources/16px/suspend_black_16px.svg'); + background-image: url('../../resources/16px/suspend_black_16px.svg'); } .ebIcon_resume { - background-image: url('../resources/16px/resume_black_16px.svg'); + background-image: url('../../resources/16px/resume_black_16px.svg'); } .ebIcon_play { - background-image: url('../resources/16px/play_black_16px.svg'); + background-image: url('../../resources/16px/play_black_16px.svg'); } .ebIcon_fastForward { - background-image: url('../resources/16px/fastForward_black_16px.svg'); + background-image: url('../../resources/16px/fastForward_black_16px.svg'); } .ebIcon_fastRewind { - background-image: url('../resources/16px/fastRewind_black_16px.svg'); + background-image: url('../../resources/16px/fastRewind_black_16px.svg'); } .ebIcon_print { - background-image: url('../resources/16px/print_black_16px.svg'); + background-image: url('../../resources/16px/print_black_16px.svg'); } .ebIcon_print_white { - background-image: url('../resources/16px/print_white_16px.svg'); + background-image: url('../../resources/16px/print_white_16px.svg'); } .ebIcon_calendar { - background-image: url('../resources/16px/calendar_black_16px.svg'); + background-image: url('../../resources/16px/calendar_black_16px.svg'); } .ebIcon_calendar_white { - background-image: url('../resources/16px/calendar_white_16px.svg'); + background-image: url('../../resources/16px/calendar_white_16px.svg'); } .ebIcon_addToFolder { - background-image: url('../resources/16px/addToFolder_black.svg'); + background-image: url('../../resources/16px/addToFolder_black.svg'); } .ebIcon_addToFolder_white { - background-image: url('../resources/16px/addToFolder_white.svg'); + background-image: url('../../resources/16px/addToFolder_white.svg'); } .ebIcon_alarmCleared { - background-image: url('../resources/16px/alarmCleared_16px.svg'); + background-image: url('../../resources/16px/alarmCleared_16px.svg'); } .ebIcon_alarmCleared_white { - background-image: url('../resources/16px/alarmCleared_white_16px.svg'); + background-image: url('../../resources/16px/alarmCleared_white_16px.svg'); } .ebIcon_alarmCritical { - background-image: url('../resources/16px/alarmCritical_16px.svg'); + background-image: url('../../resources/16px/alarmCritical_16px.svg'); } .ebIcon_alarmCritical_white { - background-image: url('../resources/16px/alarmCritical_white_16px.svg'); + background-image: url('../../resources/16px/alarmCritical_white_16px.svg'); } .ebIcon_alarmHeartbeat { - background-image: url('../resources/16px/alarmHeartbeat_16px.svg'); + background-image: url('../../resources/16px/alarmHeartbeat_16px.svg'); } .ebIcon_alarmIndeterminate { - background-image: url('../resources/16px/alarmIndeterminate_16px.svg'); + background-image: url('../../resources/16px/alarmIndeterminate_16px.svg'); } .ebIcon_alarmIndeterminate_white { - background-image: url('../resources/16px/alarmIndeterminate_white_16px.svg'); + background-image: url('../../resources/16px/alarmIndeterminate_white_16px.svg'); } .ebIcon_alarmMajor { - background-image: url('../resources/16px/alarmMajor_16px.svg'); + background-image: url('../../resources/16px/alarmMajor_16px.svg'); } .ebIcon_alarmMajor_white { - background-image: url('../resources/16px/alarmMajor_white_16px.svg'); + background-image: url('../../resources/16px/alarmMajor_white_16px.svg'); } .ebIcon_alarmMinor { - background-image: url('../resources/16px/alarmMinor_16px.svg'); + background-image: url('../../resources/16px/alarmMinor_16px.svg'); } .ebIcon_alarmMinor_white { - background-image: url('../resources/16px/alarmMinor_white_16px.svg'); + background-image: url('../../resources/16px/alarmMinor_white_16px.svg'); } .ebIcon_alarmWarning { - background-image: url('../resources/16px/alarmWarning_16px.svg'); + background-image: url('../../resources/16px/alarmWarning_16px.svg'); } .ebIcon_alarmWarning_white { - background-image: url('../resources/16px/alarmWarning_white_16px.svg'); + background-image: url('../../resources/16px/alarmWarning_white_16px.svg'); } .ebIcon_alarmOtherGrouping { - background-image: url('../resources/16px/alarmOtherGrouping_16px.svg'); + background-image: url('../../resources/16px/alarmOtherGrouping_16px.svg'); } .ebIcon_alarmUnacknowledged { - background-image: url('../resources/16px/alarmUnacknowledged.svg'); + background-image: url('../../resources/16px/alarmUnacknowledged.svg'); } .ebIcon_alarmUnacknowledged_white { - background-image: url('../resources/16px/alarmUnacknowledged_white.svg'); + background-image: url('../../resources/16px/alarmUnacknowledged_white.svg'); } .ebIcon_alarmUnspecified { - background-image: url('../resources/16px/alarmUnspecified_16px.svg'); + background-image: url('../../resources/16px/alarmUnspecified_16px.svg'); } .ebIcon_acknowledgeAlarm { - background-image: url('../resources/16px/acknowledgeAlarm.svg'); + background-image: url('../../resources/16px/acknowledgeAlarm.svg'); } .ebIcon_acknowledgeAlarm_white { - background-image: url('../resources/16px/acknowledgeAlarm_white.svg'); + background-image: url('../../resources/16px/acknowledgeAlarm_white.svg'); } .ebIcon_clearAlarm { - background-image: url('../resources/16px/clearAlarm.svg'); + background-image: url('../../resources/16px/clearAlarm.svg'); } .ebIcon_clearAlarm_white { - background-image: url('../resources/16px/clearAlarm_white.svg'); + background-image: url('../../resources/16px/clearAlarm_white.svg'); } .ebIcon_bsc { - background-image: url('../resources/16px/BSC_black_16px.svg'); + background-image: url('../../resources/16px/BSC_black_16px.svg'); } .ebIcon_bscYellow { - background-image: url('../resources/16px/BSC_Yellow_16px.svg'); + background-image: url('../../resources/16px/BSC_Yellow_16px.svg'); } .ebIcon_bscFunction { - background-image: url('../resources/16px/BSCFunction_black_16px.svg'); + background-image: url('../../resources/16px/BSCFunction_black_16px.svg'); } .ebIcon_bscFunctionYellow { - background-image: url('../resources/16px/BSCFunction_Yellow_16px.svg'); + background-image: url('../../resources/16px/BSCFunction_Yellow_16px.svg'); } .ebIcon_cabinet { - background-image: url('../resources/16px/cabinet_black_16px.svg'); + background-image: url('../../resources/16px/cabinet_black_16px.svg'); } .ebIcon_cellGray { - background-image: url('../resources/16px/cell_gray_16px.svg'); + background-image: url('../../resources/16px/cell_gray_16px.svg'); } .ebIcon_cellGreen { - background-image: url('../resources/16px/cell_green_16px.svg'); + background-image: url('../../resources/16px/cell_green_16px.svg'); } .ebIcon_cellRed { - background-image: url('../resources/16px/cell_red_16px.svg'); + background-image: url('../../resources/16px/cell_red_16px.svg'); } .ebIcon_cellAdjacent { - background-image: url('../resources/16px/cellAdjacent_16px.svg'); + background-image: url('../../resources/16px/cellAdjacent_16px.svg'); } .ebIcon_cellExternal { - background-image: url('../resources/16px/cellExternal_16px.svg'); + background-image: url('../../resources/16px/cellExternal_16px.svg'); } .ebIcon_charging { - background-image: url('../resources/16px/charging_black.svg'); + background-image: url('../../resources/16px/charging_black.svg'); } .ebIcon_charging_white { background-size: contain; - background-image: url('../resources/16px/charging_white.svg'); + background-image: url('../../resources/16px/charging_white.svg'); } .ebIcon_connected { - background-image: url('../resources/16px/connected_black_16px.svg'); + background-image: url('../../resources/16px/connected_black_16px.svg'); } .ebIcon_disconnected { - background-image: url('../resources/16px/disconnected_black_16px.svg'); + background-image: url('../../resources/16px/disconnected_black_16px.svg'); } .ebIcon_connectionError { - background-image: url('../resources/16px/connectionError_black_16px.svg'); + background-image: url('../../resources/16px/connectionError_black_16px.svg'); } .ebIcon_core { - background-image: url('../resources/16px/core_black_16px.svg'); + background-image: url('../../resources/16px/core_black_16px.svg'); } .ebIcon_coreSubscriber { - background-image: url('../resources/16px/coreSubscriber_black_16px.svg'); + background-image: url('../../resources/16px/coreSubscriber_black_16px.svg'); } .ebIcon_database { - background-image: url('../resources/16px/database_black_16px.svg'); + background-image: url('../../resources/16px/database_black_16px.svg'); } .ebIcon_ftpServer { - background-image: url('../resources/16px/ftpServer_black_16px.svg'); + background-image: url('../../resources/16px/ftpServer_black_16px.svg'); } .ebIcon_ftpServerFunction { - background-image: url('../resources/16px/ftpServerFunction_black_16px.svg'); + background-image: url('../../resources/16px/ftpServerFunction_black_16px.svg'); } .ebIcon_gatewayFunction { - background-image: url('../resources/16px/gatewayFunction_black_16px.svg'); + background-image: url('../../resources/16px/gatewayFunction_black_16px.svg'); } .ebIcon_grabHandle { - background-image: url('../resources/16px/grabHandle_black_16px.svg'); + background-image: url('../../resources/16px/grabHandle_black_16px.svg'); } .ebIcon_grabHandle_white { background-size: contain; - background-image: url('../resources/16px/grabHandle_white.svg'); + background-image: url('../../resources/16px/grabHandle_white.svg'); } .ebIcon_managedFunction { - background-image: url('../resources/16px/managedFunction_black_16px.svg'); + background-image: url('../../resources/16px/managedFunction_black_16px.svg'); } .ebIcon_managedGroup { - background-image: url('../resources/16px/managedGroup_black_16px.svg'); + background-image: url('../../resources/16px/managedGroup_black_16px.svg'); } .ebIcon_managementNode { - background-image: url('../resources/16px/managementNode_black_16px.svg'); + background-image: url('../../resources/16px/managementNode_black_16px.svg'); } .ebIcon_network { - background-image: url('../resources/16px/network_black_16px.svg'); + background-image: url('../../resources/16px/network_black_16px.svg'); } .ebIcon_networkElement { - background-image: url('../resources/16px/networkElement_black_16px.svg'); + background-image: url('../../resources/16px/networkElement_black_16px.svg'); } .ebIcon_networkElement_white { - background-image: url('../resources/16px/networkElement_white_16px.svg'); + background-image: url('../../resources/16px/networkElement_white_16px.svg'); } .ebIcon_rbs { - background-image: url('../resources/16px/RBS_black_16px.svg'); + background-image: url('../../resources/16px/RBS_black_16px.svg'); } .ebIcon_rbs_white { - background-image: url('../resources/16px/RBS_white_16px.svg'); + background-image: url('../../resources/16px/RBS_white_16px.svg'); } .ebIcon_routeSwitch { - background-image: url('../resources/16px/routeSwitch.svg'); + background-image: url('../../resources/16px/routeSwitch.svg'); } .ebIcon_rxi { - background-image: url('../resources/16px/rxi_black_16px.svg'); + background-image: url('../../resources/16px/rxi_black_16px.svg'); } .ebIcon_switchFunction { - background-image: url('../resources/16px/switchFunction_black_16px.svg'); + background-image: url('../../resources/16px/switchFunction_black_16px.svg'); } .ebIcon_technicianPresent { - background-image: url('../resources/16px/technicianPresent_16px.svg'); + background-image: url('../../resources/16px/technicianPresent_16px.svg'); } .ebIcon_terminal { - background-image: url('../resources/16px/terminal_black_16px.svg'); + background-image: url('../../resources/16px/terminal_black_16px.svg'); } .ebIcon_topology { - background-image: url('../resources/16px/topology_black_16px.svg'); + background-image: url('../../resources/16px/topology_black_16px.svg'); } .ebIcon_access { - background-image: url('../resources/16px/access_black_16px.svg'); + background-image: url('../../resources/16px/access_black_16px.svg'); } .ebIcon_access_white { - background-image: url('../resources/16px/access_white_16px.svg'); + background-image: url('../../resources/16px/access_white_16px.svg'); } .ebIcon_accessSettings { - background-image: url('../resources/16px/accessSettings_black_16px.svg'); + background-image: url('../../resources/16px/accessSettings_black_16px.svg'); } .ebIcon_accessSettings_white { - background-image: url('../resources/16px/accessSettings_white_16px.svg'); + background-image: url('../../resources/16px/accessSettings_white_16px.svg'); } .ebIcon_alignCenter { - background-image: url('../resources/16px/alignCenter_black_16px.svg'); + background-image: url('../../resources/16px/alignCenter_black_16px.svg'); } .ebIcon_alignCenter_white { - background-image: url('../resources/16px/alignCenter_white.svg'); + background-image: url('../../resources/16px/alignCenter_white.svg'); } .ebIcon_alignLeft { - background-image: url('../resources/16px/alignLeft_black_16px.svg'); + background-image: url('../../resources/16px/alignLeft_black_16px.svg'); } .ebIcon_alignLeft_white { - background-image: url('../resources/16px/alignLeft_white.svg'); + background-image: url('../../resources/16px/alignLeft_white.svg'); } .ebIcon_alignRight { - background-image: url('../resources/16px/alignRight_black_16px.svg'); + background-image: url('../../resources/16px/alignRight_black_16px.svg'); } .ebIcon_alignRight_white { - background-image: url('../resources/16px/alignRight_white.svg'); + background-image: url('../../resources/16px/alignRight_white.svg'); } .ebIcon_cli { - background-image: url('../resources/16px/CommandLineInterface_black_16px.svg'); + background-image: url('../../resources/16px/CommandLineInterface_black_16px.svg'); } .ebIcon_cli_white { - background-image: url('../resources/16px/CommandLineInterface_white_16px.svg'); + background-image: url('../../resources/16px/CommandLineInterface_white_16px.svg'); } .ebIcon_controllingNode { - background-image: url('../resources/16px/controllingNode.svg'); + background-image: url('../../resources/16px/controllingNode.svg'); } .ebIcon_grid3x3 { - background-image: url('../resources/16px/grid3X3_black_16px.svg'); + background-image: url('../../resources/16px/grid3X3_black_16px.svg'); } .ebIcon_grid3x3_white { - background-image: url('../resources/16px/grid3x3_white.svg'); + background-image: url('../../resources/16px/grid3x3_white.svg'); } .ebIcon_grid4x4 { - background-image: url('../resources/16px/grid4X4_black_16px.svg'); + background-image: url('../../resources/16px/grid4X4_black_16px.svg'); } .ebIcon_grid4x4_white { - background-image: url('../resources/16px/grid4x4_white.svg'); + background-image: url('../../resources/16px/grid4x4_white.svg'); } .ebIcon_gridView { - background-image: url('../resources/16px/gridView_black_16px.svg'); + background-image: url('../../resources/16px/gridView_black_16px.svg'); } .ebIcon_gridView_white { - background-image: url('../resources/16px/gridView_white.svg'); + background-image: url('../../resources/16px/gridView_white.svg'); } .ebIcon_jumpTo { - background-image: url('../resources/16px/jumpTo_black_16px.svg'); + background-image: url('../../resources/16px/jumpTo_black_16px.svg'); } .ebIcon_microwave { - background-image: url('../resources/16px/microwave.svg'); + background-image: url('../../resources/16px/microwave.svg'); } .ebIcon_mo { - background-image: url('../resources/16px/mo.svg'); + background-image: url('../../resources/16px/mo.svg'); } .ebIcon_security { - background-image: url('../resources/16px/security_black_16px.svg'); + background-image: url('../../resources/16px/security_black_16px.svg'); } .ebIcon_security_white { - background-image: url('../resources/16px/security_white_16px.svg'); + background-image: url('../../resources/16px/security_white_16px.svg'); } .ebIcon_site { - background-image: url('../resources/16px/site_black_16px.svg'); + background-image: url('../../resources/16px/site_black_16px.svg'); } .ebIcon_siteManager { - background-image: url('../resources/16px/siteManager_black_16px.svg'); + background-image: url('../../resources/16px/siteManager_black_16px.svg'); } .ebIcon_subnetwork { - background-image: url('../resources/16px/subnetwork.svg'); + background-image: url('../../resources/16px/subnetwork.svg'); } .ebIcon_gateway, .ebIcon_switch { - background-image: url('../resources/16px/switch.svg'); + background-image: url('../../resources/16px/switch.svg'); } .ebIcon_tip { - background-image: url('../resources/16px/tip_black_16px.svg'); + background-image: url('../../resources/16px/tip_black_16px.svg'); } .ebIcon_tip_white { - background-image: url('../resources/16px/tip_white_16px.svg'); + background-image: url('../../resources/16px/tip_white_16px.svg'); } .ebIcon_attach { - background-image: url('../resources/16px/attach_black_16px.svg'); + background-image: url('../../resources/16px/attach_black_16px.svg'); } .ebIcon_attach_white { background-size: contain; - background-image: url('../resources/16px/attach_white.svg'); + background-image: url('../../resources/16px/attach_white.svg'); } .ebIcon_clock { - background-image: url('../resources/16px/clock_black_16px.svg'); + background-image: url('../../resources/16px/clock_black_16px.svg'); } .ebIcon_clock_white { - background-image: url('../resources/16px/clock_white_16px.svg'); + background-image: url('../../resources/16px/clock_white_16px.svg'); } .ebIcon_windowMaximize { - background-image: url('../resources/16px/WindowMaximize_black_16px.svg'); + background-image: url('../../resources/16px/WindowMaximize_black_16px.svg'); } .ebIcon_windowMinimize { - background-image: url('../resources/16px/WindowMinimize_black_16px.svg'); + background-image: url('../../resources/16px/WindowMinimize_black_16px.svg'); } .ebIcon_deprecated { - background-image: url('../resources/16px/deprecated_16px.svg'); + background-image: url('../../resources/16px/deprecated_16px.svg'); } .ebIcon_obsolete { - background-image: url('../resources/16px/obsolete_16px.svg'); + background-image: url('../../resources/16px/obsolete_16px.svg'); } .ebIcon_newStatus_blue { - background-image: url('../resources/16px/newStatus_blue_16px.svg'); + background-image: url('../../resources/16px/newStatus_blue_16px.svg'); } .ebIcon_newStatus_green { - background-image: url('../resources/16px/newStatus_green_16px.svg'); + background-image: url('../../resources/16px/newStatus_green_16px.svg'); } .ebIcon_upload { - background-image: url('../resources/16px/upload_black_16px.svg'); + background-image: url('../../resources/16px/upload_black_16px.svg'); } .ebIcon_activate { - background-image: url('../resources/16px/activate_black_16px.svg'); + background-image: url('../../resources/16px/activate_black_16px.svg'); } .ebIcon_activate_white { background-size: contain; - background-image: url('../resources/16px/activate_white.svg'); + background-image: url('../../resources/16px/activate_white.svg'); } .ebIcon_deactivate { - background-image: url('../resources/16px/deactivate_black_16px.svg'); + background-image: url('../../resources/16px/deactivate_black_16px.svg'); } .ebIcon_deactivate_white { background-size: contain; - background-image: url('../resources/16px/deactivate_white.svg'); + background-image: url('../../resources/16px/deactivate_white.svg'); } .ebIcon_switchBetween { - background-image: url('../resources/16px/switchBetween_black_16px.svg'); + background-image: url('../../resources/16px/switchBetween_black_16px.svg'); } .ebIcon_switchBetween_white { - background-image: url('../resources/16px/switchBetween_white_16px.svg'); + background-image: url('../../resources/16px/switchBetween_white_16px.svg'); } .ebIcon_eye { - background-image: url('../resources/16px/eye_black_16px.svg'); + background-image: url('../../resources/16px/eye_black_16px.svg'); } .ebIcon_eye_white { - background-image: url('../resources/16px/eye_white_16px.svg'); + background-image: url('../../resources/16px/eye_white_16px.svg'); } .ebIcon_eyeLine { - background-image: url('../resources/16px/eyeLine_black_16px.svg'); + background-image: url('../../resources/16px/eyeLine_black_16px.svg'); } .ebIcon_eyeLine_white { - background-image: url('../resources/16px/eyeLine_white.svg'); + background-image: url('../../resources/16px/eyeLine_white.svg'); } .ebIcon_activityTray { - background-image: url('../resources/16px/activity_16px_black.svg'); + background-image: url('../../resources/16px/activity_16px_black.svg'); } .ebIcon_note { - background-image: url('../resources/16px/note_black_16px.svg'); + background-image: url('../../resources/16px/note_black_16px.svg'); background-size: contain; } .ebIcon_note_white { - background-image: url('../resources/16px/note_white_16px.svg'); + background-image: url('../../resources/16px/note_white_16px.svg'); } .ebIcon_tableView { - background-image: url('../resources/16px/tableView_black_16px.svg'); + background-image: url('../../resources/16px/tableView_black_16px.svg'); } .ebIcon_tableView_white { - background-image: url('../resources/16px/tableView_white_16px.svg'); + background-image: url('../../resources/16px/tableView_white_16px.svg'); } .ebIcon_synced { - background-image: url('../resources/16px/Syncd_16px.svg'); + background-image: url('../../resources/16px/Syncd_16px.svg'); } .ebIcon_syncError { - background-image: url('../resources/16px/SyncError_16px.svg'); + background-image: url('../../resources/16px/SyncError_16px.svg'); } .ebIcon_syncing { - background-image: url('../resources/16px/Syncing_Static_16px.svg'); + background-image: url('../../resources/16px/Syncing_Static_16px.svg'); } .ebIcon_syncing_animated { - background-image: url('../resources/16px/Syncing_Animated_16px.svg'); + background-image: url('../../resources/16px/Syncing_Animated_16px.svg'); } diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/css/showhideTextarea.css b/gui-editors/gui-editor-apex/src/main/resources/webapp/dist/css/showhideTextarea.css index 86da161..86da161 100644 --- a/gui-editors/gui-editor-apex/src/main/resources/webapp/css/showhideTextarea.css +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/dist/css/showhideTextarea.css diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/css/styles.css b/gui-editors/gui-editor-apex/src/main/resources/webapp/dist/css/styles.css index a1a8e47..a1a8e47 100644 --- a/gui-editors/gui-editor-apex/src/main/resources/webapp/css/styles.css +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/dist/css/styles.css diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/images/Apex.png b/gui-editors/gui-editor-apex/src/main/resources/webapp/dist/images/Apex.png Binary files differindex e71451f..e71451f 100644 --- a/gui-editors/gui-editor-apex/src/main/resources/webapp/images/Apex.png +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/dist/images/Apex.png diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/images/logo_onap.png b/gui-editors/gui-editor-apex/src/main/resources/webapp/dist/images/logo_onap.png Binary files differindex c6f6857..c6f6857 100644 --- a/gui-editors/gui-editor-apex/src/main/resources/webapp/images/logo_onap.png +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/dist/images/logo_onap.png diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/index.html b/gui-editors/gui-editor-apex/src/main/resources/webapp/dist/index.html index d131d22..7f94959 100644 --- a/gui-editors/gui-editor-apex/src/main/resources/webapp/index.html +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/dist/index.html @@ -44,9 +44,8 @@ <link rel="stylesheet" type="text/css" href="css/interfaceAssets.css"> <!-- JQuery style --> -<link rel="stylesheet" href="js/jquery-ui-1.12.1/jquery-ui.css"> +<link rel="stylesheet" href="../js/jquery-ui-1.12.1/jquery-ui.css"> -<script type="text/javascript" src="js/ApexUtils.js"></script> </head> @@ -180,7 +179,7 @@ <!-- Placeholder for when no policy has been loaded yet --> <img class="onapLogo placeholderLogo" src="images/logo_onap.png" alt="ONAP"> <img class="apexLogo placeholderLogo" - src="images/Apex.png" alt="Apex"> + src="images/Apex.png" alt="Apex"> </div> <div class="ebInlineMessage"> @@ -197,45 +196,16 @@ </div> <!-- jQuery --> - <script src="js/jquery/jquery-3.4.1.min.js"></script> - <script src="js/jquery-ui-1.12.1/jquery-ui.js"></script> + <script src="../js/jquery/jquery-3.4.1.min.js"></script> + <script src="../js/jquery-ui-1.12.1/jquery-ui.js"></script> <!-- fileMenu JS file --> - <script type="text/javascript" src="js/fileMenu.js"></script> - - <!-- contextMenu JS file --> - <script type="text/javascript" src="js/contextMenu.js"></script> - <!-- dropdownList JS file --> - <script type="text/javascript" src="js/dropdownList.js"></script> - <!-- showHideTextarea JS file --> - <script type="text/javascript" src="js/showhideTextarea.js"></script> + <script type="text/javascript" src="../js/fileMenu.js"></script> <!-- showhideElement JS file --> - <script type="text/javascript" src="js/showhideElement.js"></script> + <script type="text/javascript" src="../js/showhideElement.js"></script> <!-- edit area JS file --> - <script language="javascript" type="text/javascript" - src="js/edit_area/edit_area_full.js"></script> - <!-- Apex JS files --> - <script type="text/javascript" src="js/ApexFiles.js"></script> - <script type="text/javascript" src="js/ApexAjax.js"></script> - <script type="text/javascript" src="js/ApexTable.js"></script> - <script type="text/javascript" src="js/ApexContextSchemaTab.js"></script> - <script type="text/javascript" src="js/ApexContextSchemaEditForm.js"></script> - <script type="text/javascript" src="js/ApexEventTab.js"></script> - <script type="text/javascript" src="js/ApexEventEditForm.js"></script> - <script type="text/javascript" src="js/ApexContextAlbumTab.js"></script> - <script type="text/javascript" src="js/ApexContextAlbumEditForm.js"></script> - <script type="text/javascript" src="js/ApexTaskTab.js"></script> - <script type="text/javascript" src="js/ApexTaskEditForm.js"></script> - <script type="text/javascript" src="js/ApexPolicyTab.js"></script> - <script type="text/javascript" src="js/ApexPolicyEditForm_State.js"></script> - <script type="text/javascript" src="js/ApexPolicyEditForm.js"></script> - <script type="text/javascript" src="js/ApexKeyInformationTab.js"></script> - <script type="text/javascript" src="js/ApexPageControl.js"></script> - <script type="text/javascript" src="js/ApexFormUtils.js"></script> - <script type="text/javascript" src="js/ApexNewModelForm.js"></script> - <script type="text/javascript" src="js/ApexResultForm.js"></script> - <script type="text/javascript" src="js/ApexModelHandling.js"></script> - <script type="text/javascript" src="js/ApexMain.js"></script> - + <script language="javascript" type="text/javascript" src="../js/edit_area/edit_area_full.js"></script> + <!-- generated bundle.js --> + <script type="text/javascript" src="bundle.js"></script> </body> </html> diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexAjax.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexAjax.js index 2a75b72..79a4ac8 100644 --- a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexAjax.js +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexAjax.js @@ -19,6 +19,11 @@ * ============LICENSE_END========================================================= */ +const { + pageControl_restError, pageControl_status, + pageControl_successStatus +} = require("./ApexPageControl"); + function ajax_get(requestURL, callback) { $.ajax({ type : 'GET', @@ -36,7 +41,7 @@ function ajax_get(requestURL, callback) { function ajax_getWithKeyInfo(requestURL, objectType, callback, keyNam) { let keyName = keyNam || "key"; - let keyInfoURL = restRootURL + "/KeyInformation/Get?name=&version="; + let keyInfoURL = window.restRootURL + "/KeyInformation/Get?name=&version="; ajax_get(keyInfoURL, function(dataKeyInfos) { ajax_get(requestURL, function(data) { var keyInfos = []; @@ -122,4 +127,4 @@ function ajax_delete(requestURL, callback) { }); } -module.exports = {ajax_get, ajax_delete, ajax_post, ajax_put, ajax_getOKOrFail, ajax_getWithKeyInfo};
\ No newline at end of file +export {ajax_get, ajax_delete, ajax_post, ajax_put, ajax_getOKOrFail, ajax_getWithKeyInfo};
\ No newline at end of file diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexContextAlbumEditForm.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexContextAlbumEditForm.js index 602fa49..c09e625 100644 --- a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexContextAlbumEditForm.js +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexContextAlbumEditForm.js @@ -19,9 +19,15 @@ * ============LICENSE_END========================================================= */ +const {ajax_delete, ajax_getWithKeyInfo, ajax_get} = require("./ApexAjax"); +const {contextAlbumTab_reset} = require("./ApexContextAlbumTab"); +const {apexUtils_removeElement, apexUtils_emptyElement, scrollToTop, apexUtils_areYouSure} = require("./ApexUtils"); +const {dropdownList} = require("./dropdownList"); +const { formUtils_generateDescription, formUtils_generateUUID } = require("./ApexFormUtils"); + function editContextAlbumForm_createContextAlbum(formParent) { // Get all contextSchemas too for album item schema - var requestURL = restRootURL + "/ContextSchema/Get?name=&version="; + var requestURL = window.restRootURL + "/ContextSchema/Get?name=&version="; var contextSchemas = new Array(); ajax_get(requestURL, function(data2) { for (var i = 0; i < data2.messages.message.length; i++) { @@ -40,7 +46,7 @@ function editContextAlbumForm_createContextAlbum(formParent) { function editContextAlbumForm_deleteContextAlbum(parent, name, version) { var message = "Are you sure you want to delete ContextAlbum \"" + name + ":" + version + "\"?"; if (apexUtils_areYouSure(message)) { - var requestURL = restRootURL + "/ContextAlbum/Delete?name=" + name + "&version=" + version; + var requestURL = window.restRootURL + "/ContextAlbum/Delete?name=" + name + "&version=" + version; ajax_delete(requestURL, function(data) { apexUtils_removeElement("editContextAlbumFormDiv"); contextAlbumTab_reset(); @@ -50,10 +56,10 @@ function editContextAlbumForm_deleteContextAlbum(parent, name, version) { } function editContextAlbumForm_viewContextAlbum(parent, name, version) { - var requestURL = restRootURL + "/ContextAlbum/Get?name=" + name + "&version=" + version; + var requestURL = window.restRootURL + "/ContextAlbum/Get?name=" + name + "&version=" + version; ajax_getWithKeyInfo(requestURL, "apexContextAlbum", function(contextAlbum) { // Get all contextSchemas too for album item schema - var requestURL = restRootURL + "/ContextSchema/Get?name=&version="; + var requestURL = window.restRootURL + "/ContextSchema/Get?name=&version="; var contextSchemas = new Array(); ajax_get(requestURL, function(data2) { for (var i = 0; i < data2.messages.message.length; i++) { @@ -71,10 +77,10 @@ function editContextAlbumForm_viewContextAlbum(parent, name, version) { } function editContextAlbumForm_editContextAlbum(formParent, name, version) { - var requestURL = restRootURL + "/ContextAlbum/Get?name=" + name + "&version=" + version; + var requestURL = window.restRootURL + "/ContextAlbum/Get?name=" + name + "&version=" + version; ajax_getWithKeyInfo(requestURL, "apexContextAlbum", function(contextAlbum) { // Get all contextSchemas too for album item schema - var requestURL = restRootURL + "/ContextSchema/Get?name=&version="; + var requestURL = window.restRootURL + "/ContextSchema/Get?name=&version="; var contextSchemas = new Array(); ajax_get(requestURL, function(data2) { for (var i = 0; i < data2.messages.message.length; i++) { @@ -94,6 +100,11 @@ function editContextAlbumForm_editContextAlbum(formParent, name, version) { function editContextAlbumForm_activate(parent, operation, contextAlbum, contextSchemas) { apexUtils_removeElement("editContextAlbumFormDiv"); var formParent = document.getElementById(parent); + + //Test Purposes + if(formParent === null){ + formParent = document.createElement(parent); + } apexUtils_emptyElement(parent); var isedit = false; @@ -457,14 +468,14 @@ function editContextAlbumForm_submitPressed() { }); if (createEditOrView == "CREATE") { - var requestURL = restRootURL + "/ContextAlbum/Create"; + var requestURL = window.restRootURL + "/ContextAlbum/Create"; ajax_post(requestURL, jsonString, function(resultData) { apexUtils_removeElement("editContextAlbumFormDiv"); contextAlbumTab_reset(); keyInformationTab_reset() }); } else if (createEditOrView == "EDIT") { - var requestURL = restRootURL + "/ContextAlbum/Update"; + var requestURL = window.restRootURL + "/ContextAlbum/Update"; ajax_put(requestURL, jsonString, function(resultData) { apexUtils_removeElement("editContextAlbumFormDiv"); contextAlbumTab_reset(); @@ -473,3 +484,15 @@ function editContextAlbumForm_submitPressed() { } } + +export { + editContextAlbumForm_viewContextAlbum, + editContextAlbumForm_generateUUIDPressed, + editContextAlbumForm_generateDescriptionPressed, + editContextAlbumForm_editContextAlbum, + editContextAlbumForm_deleteContextAlbum, + editContextAlbumForm_createContextAlbum, + editContextAlbumForm_cancelPressed, + editContextAlbumForm_activate, + editContextAlbumForm_submitPressed +} diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexContextAlbumTab.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexContextAlbumTab.js index f0af49f..2b1a5e8 100644 --- a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexContextAlbumTab.js +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexContextAlbumTab.js @@ -19,6 +19,11 @@ * ============LICENSE_END========================================================= */ +import {rightClickMenu_scopePreserver} from './contextMenu'; +import {createTable} from './ApexTable'; +import {ajax_get} from './ApexAjax'; +import {apexUtils_removeElement} from "./ApexUtils"; + function contextAlbumTab_reset() { contextAlbumTab_deactivate(); contextAlbumTab_activate(); @@ -27,7 +32,7 @@ function contextAlbumTab_reset() { function contextAlbumTab_activate() { contextAlbumTab_create(); - var requestURL = restRootURL + "/ContextAlbum/Get?name=&version="; + var requestURL = window.restRootURL + "/ContextAlbum/Get?name=&version="; ajax_get(requestURL, function(data) { $("#contextAlbumTableBody").find("tr:gt(0)").remove(); @@ -69,6 +74,11 @@ function contextAlbumTab_deactivate() { function contextAlbumTab_create() { var contextAlbumTab = document.getElementById("contextAlbumsTab"); + //Testing purposes + if(contextAlbumTab === null){ + contextAlbumTab = document.createElement('contextAlbumsTab'); + } + var contextAlbumTabContent = document.getElementById("contextAlbumTabContent"); if (contextAlbumTabContent != null) { return @@ -115,4 +125,5 @@ function contextAlbumTab_create() { contextAlbumTable.setAttribute("id", "contextAlbumTableBody"); } -module.exports = {contextAlbumTab_reset, contextAlbumTab_create, contextAlbumTab_activate, contextAlbumTab_deactivate};
\ No newline at end of file +//Testing purposes +export { contextAlbumTab_reset, contextAlbumTab_create, contextAlbumTab_activate, contextAlbumTab_deactivate };
\ No newline at end of file diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexContextSchemaEditForm.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexContextSchemaEditForm.js index 7eecb72..197b58b 100644 --- a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexContextSchemaEditForm.js +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexContextSchemaEditForm.js @@ -19,6 +19,14 @@ * ============LICENSE_END========================================================= */ +import {ajax_delete, ajax_getWithKeyInfo, ajax_post, ajax_put} from "./ApexAjax"; +import {apexUtils_removeElement, apexUtils_emptyElement, scrollToTop, apexUtils_areYouSure} from "./ApexUtils"; +import { + formUtils_generateDescription, + formUtils_generateUUID +} from "./ApexFormUtils"; +import {contextSchemaTab_reset} from "./ApexContextSchemaTab"; + function editContextSchemaForm_createContextSchema(formParent) { return editContextSchemaForm_activate(formParent, "CREATE", null); } @@ -26,7 +34,7 @@ function editContextSchemaForm_createContextSchema(formParent) { function editContextSchemaForm_deleteContextSchema(parent, name, version) { var message = "Are you sure you want to delete ContextSchema \"" + name + ":" + version + "\"?"; if (apexUtils_areYouSure(message)) { - var requestURL = restRootURL + "/ContextSchema/Delete?name=" + name + "&version=" + version; + var requestURL = window.restRootURL + "/ContextSchema/Delete?name=" + name + "&version=" + version; ajax_delete(requestURL, function(data) { apexUtils_removeElement("editContextSchemaFormDiv"); contextSchemaTab_reset(); @@ -36,14 +44,14 @@ function editContextSchemaForm_deleteContextSchema(parent, name, version) { } function editContextSchemaForm_viewContextSchema(parent, name, version) { - var requestURL = restRootURL + "/ContextSchema/Get?name=" + name + "&version=" + version; + var requestURL = window.restRootURL + "/ContextSchema/Get?name=" + name + "&version=" + version; ajax_getWithKeyInfo(requestURL, "apexContextSchema", function(contextSchema) { editContextSchemaForm_activate(parent, "VIEW", contextSchema); }); } function editContextSchemaForm_editContextSchema(formParent, name, version) { - var requestURL = restRootURL + "/ContextSchema/Get?name=" + name + "&version=" + version; + var requestURL = window.restRootURL + "/ContextSchema/Get?name=" + name + "&version=" + version; ajax_getWithKeyInfo(requestURL, "apexContextSchema", function(contextSchema) { editContextSchemaForm_activate(formParent, "EDIT", contextSchema); }); @@ -52,6 +60,11 @@ function editContextSchemaForm_editContextSchema(formParent, name, version) { function editContextSchemaForm_activate(parent, operation, contextSchema) { apexUtils_removeElement("editContextSchemaFormDiv"); var formParent = document.getElementById(parent); + + //Testing purposes + if(formParent === null){ + formParent = document.createElement("formParentTest") + } apexUtils_emptyElement(parent); var isedit = false; @@ -351,14 +364,14 @@ function editContextSchemaForm_submitPressed() { }); if (createEditOrView == "CREATE") { - var requestURL = restRootURL + "/ContextSchema/Create"; + var requestURL = window.restRootURL + "/ContextSchema/Create"; ajax_post(requestURL, jsonString, function(resultData) { apexUtils_removeElement("editContextSchemaFormDiv"); contextSchemaTab_reset(); keyInformationTab_reset() }); } else if (createEditOrView == "EDIT") { - var requestURL = restRootURL + "/ContextSchema/Update"; + var requestURL = window.restRootURL + "/ContextSchema/Update"; ajax_put(requestURL, jsonString, function(resultData) { apexUtils_removeElement("editContextSchemaFormDiv"); contextSchemaTab_reset(); @@ -368,6 +381,8 @@ function editContextSchemaForm_submitPressed() { } -module.exports = {editContextSchemaForm_activate, editContextSchemaForm_cancelPressed, editContextSchemaForm_createContextSchema, - editContextSchemaForm_deleteContextSchema, editContextSchemaForm_editContextSchema, editContextSchemaForm_generateDescriptionPressed, - editContextSchemaForm_generateUUIDPressed, editContextSchemaForm_submitPressed, editContextSchemaForm_viewContextSchema}; +export { + editContextSchemaForm_activate, editContextSchemaForm_cancelPressed, editContextSchemaForm_createContextSchema, + editContextSchemaForm_deleteContextSchema, editContextSchemaForm_editContextSchema, editContextSchemaForm_generateDescriptionPressed, + editContextSchemaForm_generateUUIDPressed, editContextSchemaForm_submitPressed, editContextSchemaForm_viewContextSchema +}; diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexContextSchemaTab.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexContextSchemaTab.js index 1c8b85e..4474f5d 100644 --- a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexContextSchemaTab.js +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexContextSchemaTab.js @@ -19,6 +19,11 @@ * ============LICENSE_END========================================================= */ +const {ajax_get} = require("./ApexAjax"); +const {createTable} = require('./ApexTable'); +const {rightClickMenu_scopePreserver} = require('./contextMenu'); +const {apexUtils_removeElement} = require('./ApexUtils'); + function contextSchemaTab_reset() { contextSchemaTab_deactivate(); contextSchemaTab_activate(); @@ -26,7 +31,7 @@ function contextSchemaTab_reset() { function contextSchemaTab_activate() { contextSchemaTab_create(); - var requestURL = restRootURL + "/ContextSchema/Get?name=&version="; + var requestURL = window.restRootURL + "/ContextSchema/Get?name=&version="; ajax_get(requestURL, function(data) { $("#contextSchemaTableBody").find("tr:gt(0)").remove(); @@ -63,6 +68,11 @@ function contextSchemaTab_deactivate() { function contextSchemaTab_create() { var contextSchemaTab = document.getElementById("contextSchemasTab"); + //Testing purposes + if(contextSchemaTab === null){ + contextSchemaTab = document.createElement('contextSchemasTab'); + } + var contextSchemaTabContent = document.getElementById("contextSchemaTabContent"); if (contextSchemaTabContent != null) { return @@ -102,4 +112,12 @@ function contextSchemaTab_create() { var contextSchemaTableBody = document.createElement("tbody"); contextSchemaTable.appendChild(contextSchemaTableBody); contextSchemaTable.setAttribute("id", "contextSchemaTableBody"); -}
\ No newline at end of file +} + +//Testing purposes +export { + contextSchemaTab_activate, + contextSchemaTab_deactivate, + contextSchemaTab_reset, + contextSchemaTab_create +} diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexEventEditForm.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexEventEditForm.js index 51408e3..58c9b26 100644 --- a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexEventEditForm.js +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexEventEditForm.js @@ -19,10 +19,17 @@ * ============LICENSE_END========================================================= */ +import { formUtils_generateDescription, formUtils_generateUUID } from "./ApexFormUtils"; +import {dropdownList} from "./dropdownList"; +import {ajax_post, ajax_put, ajax_delete, ajax_get, ajax_getWithKeyInfo} from "./ApexAjax"; +import {eventTab_reset} from "./ApexEventTab"; +import {apexUtils_areYouSure, apexUtils_removeElement, apexUtils_emptyElement, createAddFormButton, scrollToTop} from './ApexUtils'; +import {keyInformationTab_reset} from "./ApexKeyInformationTab"; + function editEventForm_deleteEvent(parent, name, version) { var message = "Are you sure you want to delete Event \"" + name + ":" + version + "\"?"; if (apexUtils_areYouSure(message)) { - var requestURL = restRootURL + "/Event/Delete?name=" + name + "&version=" + version; + var requestURL = window.restRootURL + "/Event/Delete?name=" + name + "&version=" + version; ajax_delete(requestURL, function(data) { apexUtils_removeElement("editEventFormDiv"); eventTab_reset(); @@ -41,7 +48,7 @@ function editEventForm_editEvent(formParent, name, version) { function editEventForm_createEvent(formParent) { // Get all contextSchemas too for event params - var requestURL = restRootURL + "/ContextSchema/Get?name=&version="; + var requestURL = window.restRootURL + "/ContextSchema/Get?name=&version="; var contextSchemas = new Array(); ajax_get(requestURL, function(data2) { for (var i = 0; i < data2.messages.message.length; i++) { @@ -59,10 +66,10 @@ function editEventForm_createEvent(formParent) { } function editEventForm_editEvent_inner(formParent, name, version, viewOrEdit) { - var requestURL = restRootURL + "/Event/Get?name=" + name + "&version=" + version; + var requestURL = window.restRootURL + "/Event/Get?name=" + name + "&version=" + version; ajax_getWithKeyInfo(requestURL, "apexEvent", function(event) { // Get all contextSchemas too for event params - var requestURL = restRootURL + "/ContextSchema/Get?name=&version="; + var requestURL = window.restRootURL + "/ContextSchema/Get?name=&version="; var contextSchemas = new Array(); ajax_get(requestURL, function(data2) { for (var i = 0; i < data2.messages.message.length; i++) { @@ -82,6 +89,11 @@ function editEventForm_editEvent_inner(formParent, name, version, viewOrEdit) { function editEventForm_activate(parent, operation, event, contextSchemas) { apexUtils_removeElement("editEventFormDiv"); var formParent = document.getElementById(parent); + + //Testing purposes + if(formParent === null){ + formParent = document.createElement('testFormParent'); + } apexUtils_emptyElement(parent); var isedit = false; @@ -302,7 +314,7 @@ function editEventForm_activate(parent, operation, event, contextSchemas) { // for // delete // button - paramstable_head_th = document.createElement("th"); + var paramstable_head_th = document.createElement("th"); paramstable_head_tr.appendChild(paramstable_head_th); paramstable_head_th.innerHTML = "Parameter Name: "; paramstable_head_th.setAttribute("class", "table-eventparam-heading form-heading"); @@ -548,14 +560,14 @@ function editEventForm_submitPressed() { var jsonString = JSON.stringify(eventbean); if (createEditOrView == "CREATE") { - var requestURL = restRootURL + "/Event/Create"; + var requestURL = window.restRootURL + "/Event/Create"; ajax_post(requestURL, jsonString, function(resultData) { apexUtils_removeElement("editEventFormDiv"); eventTab_reset(); keyInformationTab_reset() }); } else if (createEditOrView == "EDIT") { - var requestURL = restRootURL + "/Event/Update"; + var requestURL = window.restRootURL + "/Event/Update"; ajax_put(requestURL, jsonString, function(resultData) { apexUtils_removeElement("editEventFormDiv"); eventTab_reset(); @@ -564,3 +576,17 @@ function editEventForm_submitPressed() { } } + +export { + editEventForm_activate, + editEventForm_addEventParam, + editEventForm_cancelPressed, + editEventForm_createEvent, + editEventForm_deleteEvent, + editEventForm_editEvent, + editEventForm_editEvent_inner, + editEventForm_generateDescriptionPressed, + editEventForm_generateUUIDPressed, + editEventForm_submitPressed, + editEventForm_viewEvent +} diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexEventTab.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexEventTab.js index 699f460..56886fb 100644 --- a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexEventTab.js +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexEventTab.js @@ -19,6 +19,12 @@ * ============LICENSE_END========================================================= */ + +import {ajax_get} from "./ApexAjax"; +import {rightClickMenu_scopePreserver} from "./contextMenu"; +import {createTable} from "./ApexTable"; +import {apexUtils_removeElement} from "./ApexUtils"; + function eventTab_reset() { eventTab_deactivate(); eventTab_activate(); @@ -27,7 +33,7 @@ function eventTab_reset() { function eventTab_activate() { eventTab_create(); - var requestURL = restRootURL + "/Event/Get?name=&version="; + var requestURL = window.restRootURL + "/Event/Get?name=&version="; ajax_get(requestURL, function(data) { $("#eventTableBody").find("tr:gt(0)").remove(); @@ -87,6 +93,11 @@ function eventTab_deactivate() { function eventTab_create() { var eventTab = document.getElementById("eventsTab"); + //Testing purposes + if(eventTab === null){ + eventTab = document.createElement('eventsTab'); + } + var eventTabContent = document.getElementById("eventTabContent"); if (eventTabContent != null) { return @@ -138,4 +149,9 @@ function eventTab_create() { eventTable.setAttribute("id", "eventTableBody"); } -exports = {eventTab_reset, eventTab_activate, eventTab_deactivate, eventTab_create} +export { + eventTab_reset, + eventTab_activate, + eventTab_deactivate, + eventTab_create +} diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexFiles.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexFiles.js index 93b1183..ade1eb3 100644 --- a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexFiles.js +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexFiles.js @@ -19,6 +19,12 @@ * ============LICENSE_END========================================================= */ +import {resultForm_activate} from "./ApexResultForm"; + +const {ajax_put, ajax_get, ajax_getOKOrFail} = require("./ApexAjax"); +const {pageControl_modelMode} = require("./ApexPageControl"); +const {modelFileName} = require("./ApexNewModelForm"); + function files_fileOpen() { $('<input type="file">').on('change', function() { var reader = new FileReader(); @@ -26,10 +32,10 @@ function files_fileOpen() { reader.readAsText(this.files[0]); reader.onload = function(event) { - var requestURL = restRootURL + "/Model/Load"; + var requestURL = window.restRootURL + "/Model/Load"; ajax_put(requestURL, event.target.result, function(resultData) { localStorage.setItem("apex_model_loaded", true); - var requestURL = restRootURL + "/Model/GetKey"; + var requestURL = window.restRootURL + "/Model/GetKey"; ajax_get(requestURL, function(data) { var modelKey = JSON.parse(data.messages.message[0]).apexArtifactKey; pageControl_modelMode(modelKey.name, modelKey.version, modelFileName); @@ -40,7 +46,7 @@ function files_fileOpen() { } function files_fileDownload() { - var requestURL = restRootURL + "/Model/Download"; + var requestURL = window.restRootURL + "/Model/Download"; var downloadLink = document.createElement("a"); document.body.appendChild(downloadLink); @@ -51,7 +57,7 @@ function files_fileDownload() { } function files_fileUpload() { - var requestURL = restRootURL + "/Model/Upload?userId=" + new URLSearchParams(window.location.search).get('userId'); + var requestURL = window.restRootURL + "/Model/Upload?userId=" + new URLSearchParams(window.location.search).get('userId'); ajax_getOKOrFail(requestURL, function(data) { var uploadResultString = ""; @@ -62,4 +68,4 @@ function files_fileUpload() { }); } -module.exports = {files_fileUpload, files_fileDownload, files_fileOpen}; +export {files_fileUpload, files_fileDownload, files_fileOpen}; diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexFormUtils.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexFormUtils.js index 93f0f68..9476e58 100644 --- a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexFormUtils.js +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexFormUtils.js @@ -47,4 +47,4 @@ function formUtils_generateDescription(name, version, uuid) { return description; } -module.exports = {formUtils_generateDescription, formUtils_generateUUID}; +export {formUtils_generateDescription, formUtils_generateUUID}; diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexKeyInformationTab.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexKeyInformationTab.js index 3ba1e17..9442ddd 100644 --- a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexKeyInformationTab.js +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexKeyInformationTab.js @@ -19,6 +19,10 @@ * ============LICENSE_END========================================================= */ +import {ajax_get} from "./ApexAjax"; +import {apexUtils_escapeHtml, apexUtils_removeElement} from "./ApexUtils"; +import {createTable} from "./ApexTable"; + function keyInformationTab_reset() { keyInformationTab_deactivate(); keyInformationTab_activate(); @@ -27,7 +31,7 @@ function keyInformationTab_reset() { function keyInformationTab_activate() { keyInformationTab_create(); - var requestURL = restRootURL + "/KeyInformation/Get?name=&version="; + var requestURL = window.restRootURL + "/KeyInformation/Get?name=&version="; ajax_get(requestURL, function(data) { $("#keyInformationTableBody").find("tr:gt(0)").remove(); @@ -103,3 +107,10 @@ function keyInformationTab_create() { keyInformationTable.appendChild(keyInformationTableBody); keyInformationTable.setAttribute("id", "keyInformationTableBody"); } + +export { + keyInformationTab_activate, + keyInformationTab_create, + keyInformationTab_deactivate, + keyInformationTab_reset +} diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexMain.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexMain.js index 9dea9b5..d7019d3 100644 --- a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexMain.js +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexMain.js @@ -19,16 +19,22 @@ * ============LICENSE_END========================================================= */ +import {pageControl_noModelMode, pageControl_modelMode} from "./ApexPageControl"; +import {newModelForm_activate} from "./ApexNewModelForm"; +import {files_fileDownload, files_fileOpen, files_fileUpload} from "./ApexFiles"; +import {ajax_delete, ajax_get} from "./ApexAjax"; +import {modelHandling_analyse, modelHandling_validate} from "./ApexModelHandling"; + var restRootURL = null; var modelFileName = null; -$("#menu").fileMenu({ - slideSpeed : 200 -}); - $(document).ready(function() { + $("#menu").fileMenu({ + slideSpeed : 200 + }); pageControl_noModelMode(); main_getRestRootURL(); + $(".content").fadeIn(); }); $("#menu li").not(".emptyMessage").click(function() { @@ -114,6 +120,7 @@ function main_getRestRootURL() { var restContext = "apexservices/editor/"; if (localStorage.getItem("apex_session")) { restRootURL = href + restContext + localStorage.getItem("apex_session"); + window.restRootURL = href + restContext + localStorage.getItem("apex_session"); var requestURL = restRootURL + "/Model/GetKey"; ajax_get(requestURL, function(data) { $("#statusMessageTable").append("<tr><td> REST root URL set to: " + restRootURL + "</td></tr>"); @@ -166,8 +173,6 @@ $(".ebInlineMessage").mouseleave(function(e) { }, 200); }); -$(document).ready(function() { - $(".content").fadeIn(); -}); - -exports.restRootURL = { restRootURL }; +export { + clearLocalStorage +} diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexModelHandling.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexModelHandling.js index d6af0c9..9c04102 100644 --- a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexModelHandling.js +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexModelHandling.js @@ -19,8 +19,11 @@ * ============LICENSE_END========================================================= */ +import {ajax_getOKOrFail, ajax_get} from "./ApexAjax"; +import {resultForm_activate} from "./ApexResultForm"; + function modelHandling_analyse() { - var requestURL = restRootURL + "/Model/Analyse"; + var requestURL = window.restRootURL + "/Model/Analyse"; ajax_get(requestURL, function(data) { resultForm_activate(document.getElementById("mainArea"), "Model Analysis Result", data.messages.message[0]); @@ -28,7 +31,7 @@ function modelHandling_analyse() { } function modelHandling_validate() { - var requestURL = restRootURL + "/Model/Validate"; + var requestURL = window.restRootURL + "/Model/Validate"; ajax_getOKOrFail(requestURL, function(data) { var validationResultString = ""; @@ -37,4 +40,9 @@ function modelHandling_validate() { } resultForm_activate(document.getElementById("mainArea"), "Model Validation Result", validationResultString); }); -}
\ No newline at end of file +} + +export { + modelHandling_analyse, + modelHandling_validate +} diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexNewModelForm.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexNewModelForm.js index bf0e016..65b39d9 100644 --- a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexNewModelForm.js +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexNewModelForm.js @@ -19,6 +19,12 @@ * ============LICENSE_END========================================================= */ +import { formUtils_generateDescription, formUtils_generateUUID } from "./ApexFormUtils"; +import {apexUtils_removeElement} from "./ApexUtils"; +import {pageControl_modelMode} from "./ApexPageControl"; +import {ajax_post, ajax_get} from "./ApexAjax"; +import {keyInformationTab_reset} from "./ApexKeyInformationTab"; + function newModelForm_activate(formParent) { apexUtils_removeElement("newModelFormDiv"); @@ -203,25 +209,33 @@ function newModelForm_cancelPressed() { } function newModelForm_submitPressed() { - jsonString = JSON.stringify({ + var jsonString = JSON.stringify({ "name" : $('#newModelFormNameInput').val(), "version" : $('#newModelFormVersionInput').val(), "uuid" : $('#newModelFormUuidInput').val(), "description" : $('#newModelFormDescriptionTextArea').val() }); - var requestURL = restRootURL + "/Model/Create"; + var requestURL = window.restRootURL + "/Model/Create"; ajax_post(requestURL, jsonString, function(resultData) { apexUtils_removeElement("newModelDivBackground"); - var requestURL = restRootURL + "/Model/GetKey"; + var requestURL = window.restRootURL + "/Model/GetKey"; ajax_get(requestURL, function(data) { var modelKey = JSON.parse(data.messages.message[0]).apexArtifactKey; - modelFileName = modelKey.name + ".json"; + var modelFileName = modelKey.name + ".json"; pageControl_modelMode(modelKey.name, modelKey.version, modelFileName); }); keyInformationTab_reset() }); } + +export { + newModelForm_activate, + newModelForm_cancelPressed, + newModelForm_generateDescriptionPressed, + newModelForm_generateUUIDPressed, + newModelForm_submitPressed +} diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexPageControl.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexPageControl.js index 133f511..e1a553e 100644 --- a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexPageControl.js +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexPageControl.js @@ -19,6 +19,23 @@ * ============LICENSE_END========================================================= */ +import { + contextSchemaTab_activate, + contextSchemaTab_deactivate +} from "./ApexContextSchemaTab"; +import {eventTab_activate, eventTab_deactivate} from "./ApexEventTab"; +import { + contextAlbumTab_activate, + contextAlbumTab_deactivate +} from "./ApexContextAlbumTab"; +import {taskTab_activate, taskTab_deactivate} from "./ApexTaskTab"; +import {policyTab_activate, policyTab_deactivate} from "./ApexPolicyTab"; +import { + keyInformationTab_activate, + keyInformationTab_deactivate +} from "./ApexKeyInformationTab"; +import {clearLocalStorage} from "./ApexMain"; + function pageControl_modelMode(name, version, fileName) { $('#modelName').html(name); $('#modelVersion').html(version); @@ -254,4 +271,14 @@ function showPlaceholder(show) { } } -module.exports = {showPlaceholder, pageControl_busyMode, pageControl_modelMode, pageControl_noModelMode, pageControl_readyMode, pageControl_recursiveDisable, pageControl_restError, pageControl_status, pageControl_successStatus} +export { + showPlaceholder, + pageControl_busyMode, + pageControl_modelMode, + pageControl_noModelMode, + pageControl_readyMode, + pageControl_recursiveDisable, + pageControl_restError, + pageControl_status, + pageControl_successStatus +} diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexPolicyEditForm.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexPolicyEditForm.js index 93c672c..116cfa4 100644 --- a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexPolicyEditForm.js +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexPolicyEditForm.js @@ -19,6 +19,14 @@ * ============LICENSE_END========================================================= */ +import {apexUtils_removeElement, apexUtils_emptyElement, apexUtils_areYouSure, scrollToTop} from "./ApexUtils"; +import {dropdownList, dropdownList_ChangeOptions} from "./dropdownList"; +import {ajax_get, ajax_delete, ajax_getWithKeyInfo, ajax_post, ajax_put} from "./ApexAjax"; +import {policyTab_reset} from "./ApexPolicyTab"; +import { editPolicyForm_State_generateStateDiv, editPolicyForm_State_getStateBean } from "./ApexPolicyEditForm_State"; +import { formUtils_generateDescription, formUtils_generateUUID } from "./ApexFormUtils"; +import {keyInformationTab_reset} from "./ApexKeyInformationTab"; + function editPolicyForm_createPolicy(formParent) { editPolicyForm_editPolicy_inner(formParent, null, "CREATE"); } @@ -37,7 +45,7 @@ function editPolicyForm_deletePolicy(parent, name, version) { function editPolicyForm_viewPolicy(formParent, name, version) { // get the policy - var requestURL = restRootURL + "/Policy/Get?name=" + name + "&version=" + version; + var requestURL = window.restRootURL + "/Policy/Get?name=" + name + "&version=" + version; ajax_getWithKeyInfo(requestURL, "apexPolicy", function(policy) { editPolicyForm_editPolicy_inner(formParent, policy, "VIEW"); }, "policyKey"); @@ -45,7 +53,7 @@ function editPolicyForm_viewPolicy(formParent, name, version) { function editPolicyForm_editPolicy(formParent, name, version) { // get the policy - var requestURL = restRootURL + "/Policy/Get?name=" + name + "&version=" + version; + var requestURL = window.restRootURL + "/Policy/Get?name=" + name + "&version=" + version; ajax_getWithKeyInfo(requestURL, "apexPolicy", function(policy) { editPolicyForm_editPolicy_inner(formParent, policy, "EDIT"); }, "policyKey"); @@ -53,7 +61,7 @@ function editPolicyForm_editPolicy(formParent, name, version) { function editPolicyForm_editPolicy_inner(formParent, policy, viewOrEdit) { // Get all contextSchemas too - requestURL = restRootURL + "/ContextSchema/Get?name=&version="; + var requestURL = window.restRootURL + "/ContextSchema/Get?name=&version="; var contextSchemas = new Array(); ajax_get(requestURL, function(data2) { for (var i = 0; i < data2.messages.message.length; i++) { @@ -66,7 +74,7 @@ function editPolicyForm_editPolicy_inner(formParent, policy, viewOrEdit) { }); } // Get all tasks - requestURL = restRootURL + "/Task/Get?name=&version="; + requestURL = window.restRootURL + "/Task/Get?name=&version="; var tasks = new Array(); ajax_get(requestURL, function(data3) { for (var j = 0; j < data3.messages.message.length; j++) { @@ -79,7 +87,7 @@ function editPolicyForm_editPolicy_inner(formParent, policy, viewOrEdit) { }); } // Get all ContextAlbums - requestURL = restRootURL + "/ContextAlbum/Get?name=&version="; + requestURL = window.restRootURL + "/ContextAlbum/Get?name=&version="; var albums = new Array(); ajax_get(requestURL, function(data4) { for (var k = 0; k < data4.messages.message.length; k++) { @@ -92,7 +100,7 @@ function editPolicyForm_editPolicy_inner(formParent, policy, viewOrEdit) { }); } // Get all Events - requestURL = restRootURL + "/Event/Get?name=&version="; + requestURL = window.restRootURL + "/Event/Get?name=&version="; var events = new Array(); ajax_get(requestURL, function(data5) { for (var m = 0; m < data5.messages.message.length; m++) { @@ -114,6 +122,11 @@ function editPolicyForm_editPolicy_inner(formParent, policy, viewOrEdit) { function editPolicyForm_activate(parent, operation, policy, tasks, events, contextAlbums, contextItemSchemas) { apexUtils_removeElement("editPolicyFormDiv"); var formParent = document.getElementById(parent); + + //Testing purposes + if(formParent === null) { + formParent = document.createElement("testFormParent"); + } apexUtils_emptyElement(parent); var isedit = false; @@ -407,7 +420,7 @@ function editPolicyForm_activate(parent, operation, policy, tasks, events, conte triggerLI.appendChild(triggerPeriodicEventCheckbox); - triggerPeriodicEventLabel = document.createElement("label"); + var triggerPeriodicEventLabel = document.createElement("label"); triggerPeriodicEventLabel.setAttribute("class", "periodic-events-label"); triggerPeriodicEventLabel.innerHTML = "is Periodic Event"; triggerLI.appendChild(triggerPeriodicEventLabel); @@ -433,7 +446,7 @@ function editPolicyForm_activate(parent, operation, policy, tasks, events, conte } } for (i = 0; i < policy.state.entry.length; i++) { - stateEntry = policy.state.entry[i]; + var stateEntry = policy.state.entry[i]; var statename = stateEntry.key; var state = stateEntry.value; var stateLI = editPolicyForm_addState(statename, state, createEditOrView, policy, tasks, events, @@ -720,7 +733,7 @@ function editPolicyForm_submitPressed() { var jsonString = JSON.stringify(policybean); if (createEditOrView == "CREATE") { - var requestURL = restRootURL + "/Policy/Create"; + var requestURL = window.restRootURL + "/Policy/Create"; ajax_post(requestURL, jsonString, function(resultData) { apexUtils_removeElement("editPolicyFormDiv"); policyTab_reset(); @@ -728,7 +741,7 @@ function editPolicyForm_submitPressed() { }); } else if (createEditOrView == "EDIT") { var firstStatePeriodic = $("#periodicEventsCheckbox").is(":checked") - var requestURL = restRootURL + "/Policy/Update?firstStatePeriodic=" + firstStatePeriodic; + var requestURL = window.restRootURL + "/Policy/Update?firstStatePeriodic=" + firstStatePeriodic; ajax_put(requestURL, jsonString, function(resultData) { apexUtils_removeElement("editPolicyFormDiv"); policyTab_reset(); @@ -800,3 +813,24 @@ function editPolicyForm_getPolicyBean() { }; return policybean; } + +export { + editPolicyForm_activate, + editPolicyForm_editPolicy_inner, + editPolicyForm_State_getStateBean, + editPolicyForm_addNewState, + editPolicyForm_addState, + editPolicyForm_cancelPressed, + editPolicyForm_createPolicy, + editPolicyForm_deletePolicy, + editPolicyForm_editPolicy, + editPolicyForm_generateDescriptionPressed, + editPolicyForm_generateUUIDPressed, + editPolicyForm_getNextStateOptions, + editPolicyForm_getPolicyBean, + editPolicyForm_getStateOptions, + editPolicyForm_State_generateStateDiv, + editPolicyForm_submitPressed, + editPolicyForm_updateTriggerEventOptions, + editPolicyForm_viewPolicy +} diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexPolicyEditForm_State.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexPolicyEditForm_State.js index 77e8814..e9d1118 100644 --- a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexPolicyEditForm_State.js +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexPolicyEditForm_State.js @@ -19,6 +19,12 @@ * ============LICENSE_END========================================================= */ +import { dropdownList } from "./dropdownList"; +import { createAddFormButton } from "./ApexUtils"; +import { showHideTextarea } from "./showhideTextarea"; +import { formUtils_generateUUID } from "./ApexFormUtils"; +import {editPolicyForm_getNextStateOptions, editPolicyForm_updateTriggerEventOptions} from "./ApexPolicyEditForm"; + function editPolicyForm_State_generateStateDiv(createEditOrView, policy, statename, state, tasks, events, contextAlbums, contextItemSchemas) { var retDiv = document.createElement("div"); @@ -799,6 +805,7 @@ function editPolicyForm_State_addPolicyTask(parentTBody, disabled, isdefault, st function editPolicyForm_State_getLogicOutputMappingOptions(statename) { var outputoptions = new Array(); var finalizerstablerows = document.getElementById("editPolicyFormLogicOutputsTable_" + statename).rows; + if (finalizerstablerows && finalizerstablerows.length > 2) { // has head // so just // ignore @@ -856,6 +863,7 @@ function editPolicyForm_State_getStateBean(statename) { return null; } var div = document.getElementById("editPolicyFormStateDiv_" + statename); + if (div == null) { console.error("State information requested for state " + statename + ", but that state does not exist!") alert("State information requested for state " + statename + ", but that state does not exist!"); @@ -1127,3 +1135,14 @@ function editPolicyForm_State_getStateBean(statename) { return ret; } + +export { + editPolicyForm_State_generateStateDiv, + editPolicyForm_State_addPolicyContext, + editPolicyForm_State_addPolicyTask, + editPolicyForm_State_addStateDirectOutput, + editPolicyForm_State_addStateLogicOutput, + editPolicyForm_State_getDirectOutputMappingOptions, + editPolicyForm_State_getStateBean, + editPolicyForm_State_getLogicOutputMappingOptions +} diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexPolicyTab.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexPolicyTab.js index 8d9788e..e3a1765 100644 --- a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexPolicyTab.js +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexPolicyTab.js @@ -19,6 +19,11 @@ * ============LICENSE_END========================================================= */ +import {rightClickMenu_scopePreserver} from "./contextMenu"; +import {createTable} from "./ApexTable"; +import {ajax_get} from "./ApexAjax"; +import {apexUtils_removeElement} from "./ApexUtils"; + function policyTab_reset() { policyTab_deactivate(); policyTab_activate(); @@ -27,7 +32,7 @@ function policyTab_reset() { function policyTab_activate() { policyTab_create(); - var requestURL = restRootURL + "/Policy/Get?name=&version="; + var requestURL = window.restRootURL + "/Policy/Get?name=&version="; ajax_get(requestURL, function(data) { $("#policyTableBody").find("tr:gt(0)").remove(); @@ -164,6 +169,11 @@ function policyTab_deactivate() { function policyTab_create() { var policyTab = document.getElementById("policiesTab"); + //Testing purposes + if(policyTab === null) { + policyTab = document.createElement("policiesTab"); + } + var policyTabContent = document.getElementById("policyTabContent"); if (policyTabContent != null) { return @@ -208,4 +218,11 @@ function policyTab_create() { var policyTableBody = document.createElement("tbody"); policyTable.appendChild(policyTableBody); policyTable.setAttribute("id", "policyTableBody"); -}
\ No newline at end of file +} + +export { + policyTab_activate, + policyTab_create, + policyTab_deactivate, + policyTab_reset +} diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexResultForm.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexResultForm.js index b254c38..0838ce8 100644 --- a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexResultForm.js +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexResultForm.js @@ -19,6 +19,8 @@ * ============LICENSE_END========================================================= */ +import {apexUtils_removeElement} from "./ApexUtils"; + function resultForm_activate(formParent, formHeading, formText) { apexUtils_removeElement("newModelDivBackground"); @@ -87,3 +89,7 @@ function resultForm_activate(formParent, formHeading, formText) { function resultForm_okPressed() { apexUtils_removeElement("newModelDivBackground"); } + +export { + resultForm_activate, resultForm_okPressed +} diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexTable.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexTable.js index 3e9fe3d..0283fb7 100644 --- a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexTable.js +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexTable.js @@ -36,4 +36,4 @@ function setRowHover(rowElement) { }; } -module.exports = {createTable, setRowHover};
\ No newline at end of file +export { createTable, setRowHover };
\ No newline at end of file diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexTaskEditForm.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexTaskEditForm.js index d4021c0..56ba578 100644 --- a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexTaskEditForm.js +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexTaskEditForm.js @@ -19,9 +19,16 @@ * ============LICENSE_END========================================================= */ +import {taskTab_reset} from "./ApexTaskTab"; +import {dropdownList} from "./dropdownList"; +import { ajax_delete, ajax_getWithKeyInfo, ajax_post, ajax_put, ajax_get } from "./ApexAjax"; +import { formUtils_generateDescription, formUtils_generateUUID } from "./ApexFormUtils"; +import { apexUtils_removeElement, apexUtils_emptyElement, apexUtils_areYouSure, createAddFormButton, scrollToTop } from "./ApexUtils"; +import { showHideTextarea } from "./showhideTextarea"; + function editTaskForm_createTask(formParent) { // Get all contextSchemas too for task input/outputfields - var requestURL = restRootURL + "/ContextSchema/Get?name=&version="; + var requestURL = window.restRootURL + "/ContextSchema/Get?name=&version="; var contextSchemas = new Array(); ajax_get(requestURL, function(data2) { for (var i = 0; i < data2.messages.message.length; i++) { @@ -35,7 +42,7 @@ function editTaskForm_createTask(formParent) { contextSchemas.push(dt); } // Get all contextAlbums too for task context album references - var requestURL = restRootURL + "/ContextAlbum/Get?name=&version="; + var requestURL = window.restRootURL + "/ContextAlbum/Get?name=&version="; var contextAlbums = new Array(); ajax_get(requestURL, function(data3) { for (var i = 0; i < data3.messages.message.length; i++) { @@ -56,7 +63,7 @@ function editTaskForm_createTask(formParent) { function editTaskForm_deleteTask(parent, name, version) { var message = "Are you sure you want to delete Task \"" + name + ":" + version + "\"?"; if (apexUtils_areYouSure(message)) { - var requestURL = restRootURL + "/Task/Delete?name=" + name + "&version=" + version; + var requestURL = window.restRootURL + "/Task/Delete?name=" + name + "&version=" + version; ajax_delete(requestURL, function(data) { apexUtils_removeElement("editTaskFormDiv"); taskTab_reset(); @@ -74,10 +81,10 @@ function editTaskForm_editTask(formParent, name, version) { } function editTaskForm_editTask_inner(formParent, name, version, viewOrEdit) { - var requestURL = restRootURL + "/Task/Get?name=" + name + "&version=" + version; + var requestURL = window.restRootURL + "/Task/Get?name=" + name + "&version=" + version; ajax_getWithKeyInfo(requestURL, "apexTask", function(task) { // Get all contextSchemas too for task inputfields - var requestURL = restRootURL + "/ContextSchema/Get?name=&version="; + var requestURL = window.restRootURL + "/ContextSchema/Get?name=&version="; var contextSchemas = new Array(); ajax_get(requestURL, function(data2) { for (var i = 0; i < data2.messages.message.length; i++) { @@ -90,7 +97,7 @@ function editTaskForm_editTask_inner(formParent, name, version, viewOrEdit) { }); } // Get all contextAlbums too for task context album references - var requestURL = restRootURL + "/ContextAlbum/Get?name=&version="; + var requestURL = window.restRootURL + "/ContextAlbum/Get?name=&version="; var contextAlbums = new Array(); ajax_get(requestURL, function(data3) { for (var i = 0; i < data3.messages.message.length; i++) { @@ -112,6 +119,11 @@ function editTaskForm_editTask_inner(formParent, name, version, viewOrEdit) { function editTaskForm_activate(parent, operation, task, contextSchemas, contextAlbums) { apexUtils_removeElement("editTaskFormDiv"); var formParent = document.getElementById(parent); + + //Testing purposes + if(formParent === null) { + formParent = document.createElement('testFormParent'); + } apexUtils_emptyElement(parent); var isedit = false; @@ -985,14 +997,14 @@ function editTaskForm_submitPressed() { var jsonString = JSON.stringify(taskbean); if (createEditOrView == "CREATE") { - var requestURL = restRootURL + "/Task/Create"; + var requestURL = window.restRootURL + "/Task/Create"; ajax_post(requestURL, jsonString, function(resultData) { apexUtils_removeElement("editTaskFormDiv"); taskTab_reset(); keyInformationTab_reset() }); } else if (createEditOrView == "EDIT") { - var requestURL = restRootURL + "/Task/Update"; + var requestURL = window.restRootURL + "/Task/Update"; ajax_put(requestURL, jsonString, function(resultData) { apexUtils_removeElement("editTaskFormDiv"); taskTab_reset(); @@ -1001,3 +1013,20 @@ function editTaskForm_submitPressed() { } } + +export { + editTaskForm_activate, + editTaskForm_addTaskContext, + editTaskForm_addTaskInputField, + editTaskForm_addTaskOutputField, + editTaskForm_addTaskParameter, + editTaskForm_cancelPressed, + editTaskForm_createTask, + editTaskForm_deleteTask, + editTaskForm_editTask, + editTaskForm_editTask_inner, + editTaskForm_generateDescriptionPressed, + editTaskForm_generateUUIDPressed, + editTaskForm_submitPressed, + editTaskForm_viewTask +} diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexTaskTab.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexTaskTab.js index 632882b..cb442be 100644 --- a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexTaskTab.js +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexTaskTab.js @@ -19,6 +19,11 @@ * ============LICENSE_END========================================================= */ +import {createTable} from "./ApexTable"; +import {ajax_get} from "./ApexAjax"; +import {rightClickMenu_scopePreserver} from "./contextMenu"; +import {apexUtils_removeElement} from "./ApexUtils"; + function taskTab_reset() { taskTab_deactivate(); taskTab_activate(); @@ -27,16 +32,16 @@ function taskTab_reset() { function taskTab_activate() { taskTab_create(); - var requestURL = restRootURL + "/Task/Get?name=&version="; + const requestURL = window.restRootURL + "/Task/Get?name=&version="; ajax_get(requestURL, function(data) { $("#taskTableBody").find("tr:gt(0)").remove(); - for (var i = 0; i < data.messages.message.length; i++) { - var task = JSON.parse(data.messages.message[i]).apexTask; + for (let i = 0; i < data.messages.message.length; i++) { + const task = JSON.parse(data.messages.message[i]).apexTask; - var taskRow_tr = document.createElement("tr"); - var taskid = task.key.name + ":" + task.key.version; + const taskRow_tr = document.createElement("tr"); + const taskid = task.key.name + ":" + task.key.version; var taskTableRow = "<td>" + @@ -119,6 +124,11 @@ function taskTab_deactivate() { function taskTab_create() { var taskTab = document.getElementById("tasksTab"); + //Testing purposes + if(taskTab === null) { + taskTab = document.createElement("tasksTab"); + } + var taskTabContent = document.getElementById("taskTabContent"); if (taskTabContent != null) { return @@ -173,4 +183,11 @@ function taskTab_create() { var taskTableBody = document.createElement("tbody"); taskTable.appendChild(taskTableBody); taskTable.setAttribute("id", "taskTableBody"); -}
\ No newline at end of file +} + +export { + taskTab_create, + taskTab_reset, + taskTab_activate, + taskTab_deactivate +}; diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexUtils.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexUtils.js index 33abdeb..b1ff792 100644 --- a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexUtils.js +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/ApexUtils.js @@ -124,4 +124,14 @@ function getHomepageURL() { + (location.pathname.endsWith("/editor/") ? location.pathname.substring(0, location.pathname .indexOf("editor/")) : location.pathname); location.href = homepageURL; -}
\ No newline at end of file +} + +export { + apexUtils_removeElement, + apexUtils_emptyElement, + scrollToTop, + apexUtils_areYouSure, + createAddFormButton, + apexUtils_escapeHtml, + apexUtils_deleteTableRow +} diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/__test__/ApexAjax.test.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/__test__/ApexAjax.test.js index ebf79c9..34640c3 100644 --- a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/__test__/ApexAjax.test.js +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/__test__/ApexAjax.test.js @@ -19,51 +19,130 @@ const mod = require('../ApexAjax'); -test('Test ajax_get', () => { - const mockGet = jest.fn(mod.ajax_get).mockImplementation(() => { - const val = { - type : 'GET', - url : 'requestURL', - dataType : "json", // data type of response - success : function(data) { - return 'Success' - }, - error : function(jqXHR, textStatus, errorThrown) { - return 'Error' - } - } +const requestURL = "http://localhost:7979"; +const data = { + useHttps: 'useHttps', + hostname: 'hostname', + port: 'port', + username: 'username', + password: 'password', + messages: { + message: '' + }, + content: ['01', '02'], + result: 'ok', + ok: true +} + +test('Test ajax_get error', () => { + const callback = jest.fn(); + $.ajax = jest.fn().mockImplementation((args) => { + args.error(data, null, null); + }); + const mock_get_error = jest.fn(mod.ajax_get(requestURL, callback)); + mock_get_error(); + expect(mock_get_error).toHaveBeenCalled(); +}); + +test('Test ajax_get success', () => { + const callback = jest.fn(); + const jqXHR = { status: 200, responseText: "" }; + $.ajax = jest.fn().mockImplementation((args) => { + args.success(data, null, jqXHR); }); - mockGet('Called'); - expect(mockGet).toBeCalledTimes(1); - expect(mockGet).toHaveBeenCalledWith('Called'); + const mock_get_success = jest.fn(mod.ajax_get(requestURL, callback)); + mock_get_success(); + expect(mock_get_success).toHaveBeenCalled(); }); -test('Test ajax_delete', () => { - const mockDelete = jest.fn(mod.ajax_delete); - mockDelete(); - expect(mockDelete).toBeCalledTimes(1); +test('Test ajax_delete error', () => { + const callback = jest.fn(); + const jqXHR = { status: 500, responseText: "" }; + $.ajax = jest.fn().mockImplementation((args) => { + args.error(jqXHR, null, null); + }); + const mock_delete_error = jest.fn(mod.ajax_delete(requestURL, callback)); + mock_delete_error(); + expect(mock_delete_error).toHaveBeenCalled(); }); -test('Test ajax_post', () => { - const mockAjaxPost = jest.fn(mod.ajax_post); - mockAjaxPost(); - expect(mockAjaxPost).toBeCalledTimes(1); +test('Test ajax_delete success', () => { + const callback = jest.fn(); + const jqXHR = { status: 200, responseText: "" }; + $.ajax = jest.fn().mockImplementation((args) => { + args.success(data, null, jqXHR); + }); + const mock_delete_success = jest.fn(mod.ajax_delete(requestURL, callback)); + mock_delete_success(); + expect(mock_delete_success).toHaveBeenCalled(); }); -test('Test ajax_put', () => { - const mockAjaxPut = jest.fn(mod.ajax_put); - mockAjaxPut(); - expect(mockAjaxPut).toBeCalledTimes(1); +test('Test ajax_post error', () => { + const callback = jest.fn(); + const jqXHR = { status: 500, responseText: "" }; + $.ajax = jest.fn().mockImplementation((args) => { + args.error(jqXHR, null, null); + }); + const mock_post_error = jest.fn(mod.ajax_post(requestURL, data, callback)); + mock_post_error(); + expect(mock_post_error).toHaveBeenCalled(); }); -test('Test ajax_getOKOrFail', () => { - const mockAjaxGetOkOrFail = jest.fn(mod.ajax_getOKOrFail); - mockAjaxGetOkOrFail(); - expect(mockAjaxGetOkOrFail).toBeCalledTimes(1); +test('Test ajax_post success', () => { + const callback = jest.fn(); + const jqXHR = { status: 200, responseText: "" }; + $.ajax = jest.fn().mockImplementation((args) => { + args.success(data, null, jqXHR); + }); + const mock_post_success = jest.fn(mod.ajax_post(requestURL, data, callback)); + mock_post_success(); + expect(mock_post_success).toHaveBeenCalled(); +}); + +test('Test ajax_put error', () => { + const callback = jest.fn(); + const jqXHR = { status: 500, responseText: "" }; + $.ajax = jest.fn().mockImplementation((args) => { + args.error(jqXHR, null, null); + }); + const mock_put_error = jest.fn(mod.ajax_put(requestURL, callback)); + mock_put_error(); + expect(mock_put_error).toHaveBeenCalled(); +}); + +test('Test ajax_put success', () => { + const callback = jest.fn(); + const jqXHR = { status: 200, responseText: "" }; + + $.ajax = jest.fn().mockImplementation((args) => { + args.success(data, null, jqXHR); + }); + const mock_put_success = jest.fn(mod.ajax_put(requestURL, data, callback)); + mock_put_success(); + expect(mock_put_success).toHaveBeenCalled(); +}); + +test('Test ajax_getOKOrFail error', () => { + const callback = jest.fn(); + const jqXHR = { status: 500, responseText: "" }; + $.ajax = jest.fn().mockImplementation((args) => { + args.error(jqXHR, null, null); + }); + const mock_getOKOrFail_error = jest.fn(mod.ajax_getOKOrFail(requestURL, callback)); + mock_getOKOrFail_error(); + expect(mock_getOKOrFail_error).toHaveBeenCalled(); +}); + +test('Test ajax_getOKOrFail success', () => { + const callback = jest.fn(); + const jqXHR = { status: 200, responseText: "" }; + + $.ajax = jest.fn().mockImplementation((args) => { + args.success(data, null, jqXHR); + }); + const mock_getOKOrFail_success = jest.fn(mod.ajax_getOKOrFail(requestURL, callback)); + mock_getOKOrFail_success(); + expect(mock_getOKOrFail_success).toHaveBeenCalled(); }); -test('Test ajax_getWithKeyInfo', () => { - const mockGetWKey = jest.fn(mod.ajax_getWithKeyInfo); - const kName = mod.ajax_getWithKeyInfo.keyName; - expect(kName).not.toBe(null); -});
\ No newline at end of file +test.todo('Test ajax_getWithKeyInfo'); diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/__test__/ApexContextAlbumEditForm.test.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/__test__/ApexContextAlbumEditForm.test.js new file mode 100644 index 0000000..728accd --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/__test__/ApexContextAlbumEditForm.test.js @@ -0,0 +1,44 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2020 Nordix Foundation + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +const mod = require('../ApexContextAlbumEditForm'); + +test('Test mock_editContextAlbumForm_activate', () => { + const mock_editContextAlbumForm_activate = jest.fn(mod.editContextAlbumForm_activate); + + const contextAlbum = { + name: 'testName', + version: '0.0.1', + scope: 'test', + uuid: 'testUUID', + description: 'testDesc', + writeable: true + }; + const contextSchema = { + name: 'testName', + version: '0.0.1', + schemaFlavour: 'testFlav', + schemaDefinition: 'testDef', + uuid: 'testUUID', + description: 'testDesc' + } + + mock_editContextAlbumForm_activate('parentTest', 'CREATE', contextAlbum, contextSchema); + expect(mock_editContextAlbumForm_activate).toHaveBeenCalledTimes(1); +});
\ No newline at end of file diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/__test__/ApexContextAlbumTab.test.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/__test__/ApexContextAlbumTab.test.js index 5932a6d..e109174 100644 --- a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/__test__/ApexContextAlbumTab.test.js +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/__test__/ApexContextAlbumTab.test.js @@ -18,15 +18,10 @@ */ const mod = require('../ApexContextAlbumTab'); +const utils = require('../ApexUtils'); -test('call deactivate', () => { - const deactivate = jest.fn(mod.contextAlbumTab_deactivate).mockReturnValueOnce('success'); - deactivate(); - expect(deactivate).toHaveBeenCalledTimes(1); +test('Test contextAlbumTab_create', () => { + const mock_activate = jest.fn(mod.contextAlbumTab_activate); + mock_activate(); + expect(mock_activate).toBeCalled(); }); - -test('call create', () => { - const create = jest.fn(mod.contextAlbumTab_create).mockReturnValueOnce('success'); - create(); - expect(create).toHaveBeenCalledTimes(1); -})
\ No newline at end of file diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/__test__/ApexContextSchemaEditForm.test.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/__test__/ApexContextSchemaEditForm.test.js new file mode 100644 index 0000000..69505bb --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/__test__/ApexContextSchemaEditForm.test.js @@ -0,0 +1,36 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2020 Nordix Foundation. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +const mod = require('../ApexContextSchemaEditForm'); + +test('Test editContextSchemaForm_createContextSchema', () => { + const contextSchema = { + name: 'testName', + version: '0.0.1', + schemaFlavour: 'testFlav', + schemaDefinition: 'testDef', + uuid: 'testUUID', + description: 'testDesc' + } + + const mock_editContextSchemaForm_createContextSchema = jest.fn(mod.editContextSchemaForm_createContextSchema); + mock_editContextSchemaForm_createContextSchema('parentTest', 'CREATE', contextSchema); + expect(mock_editContextSchemaForm_createContextSchema).toBeCalled(); +});
\ No newline at end of file diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/__test__/ApexContextSchemaTab.test.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/__test__/ApexContextSchemaTab.test.js new file mode 100644 index 0000000..552eb85 --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/__test__/ApexContextSchemaTab.test.js @@ -0,0 +1,33 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2020 Nordix Foundation. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +const mod = require('../ApexContextSchemaTab'); + +test('Test activateContextSchema', () => { + const mock_activate = jest.fn(mod.contextSchemaTab_activate); + mock_activate(); + expect(mock_activate).toBeCalled(); +}); + +test('Test deactivate', () => { + const mock_deactivate = jest.fn(mod.contextSchemaTab_deactivate); + mock_deactivate(); + expect(mock_deactivate).toBeCalledWith(); +});
\ No newline at end of file diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/__test__/ApexEventEditForm.test.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/__test__/ApexEventEditForm.test.js new file mode 100644 index 0000000..6363ae6 --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/__test__/ApexEventEditForm.test.js @@ -0,0 +1,73 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2020 Nordix Foundation. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +const mod = require('../ApexEventEditForm'); +const contextSchema = { + name: 'testName', + version: '0.0.1', + schemaFlavour: 'testFlav', + schemaDefinition: 'testDef', + uuid: 'testUUID', + description: 'testDesc' +} + +test('Test Activate', () => { + const mock_activate = jest.fn(mod.editEventForm_activate); + mock_activate(null, 'CREATE', null, contextSchema); + expect(mock_activate).toBeCalled(); +}); + +test('Test Activate Edit', () => { + + const event = { + key: { + name: 'testName', + version: '0.0.1', + }, + nameSpace: 'test', + source: 'test', + target: 'test', + uuid: 'test', + description: 'test', + } + + const mock_activate = jest.fn(mod.editEventForm_activate); + mock_activate(null, 'EDIT', event, contextSchema); + expect(mock_activate).toBeCalled(); +}); + +test('Test Activate !=Create/Edit', () => { + + const event = { + key: { + name: 'testName', + version: '0.0.1', + }, + nameSpace: 'test', + source: 'test', + target: 'test', + uuid: 'test', + description: 'test', + } + + const mock_activate = jest.fn(mod.editEventForm_activate); + mock_activate(null, 'TEST', event, contextSchema); + expect(mock_activate).toBeCalled(); +});
\ No newline at end of file diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/__test__/ApexEventTab.test.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/__test__/ApexEventTab.test.js new file mode 100644 index 0000000..23f4edc --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/__test__/ApexEventTab.test.js @@ -0,0 +1,33 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2020 Nordix Foundation. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +const mod = require('../ApexEventTab'); + +test('Test activate', () => { + const mock_activate = jest.fn(mod.eventTab_activate); + mock_activate() + expect(mock_activate).toBeCalled(); +}); + +// These are being tested indirectly +// But could be tested individually here if needed +test.todo('Test create'); +test.todo('Test deactivate'); +test.todo('Test reset');
\ No newline at end of file diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/__test__/ApexFiles.test.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/__test__/ApexFiles.test.js index d6d3c40..6fcaa4d 100644 --- a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/__test__/ApexFiles.test.js +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/__test__/ApexFiles.test.js @@ -1,20 +1,21 @@ /* * ============LICENSE_START======================================================= * Copyright (C) 2020 Nordix Foundation - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * http://www.apache.org/licenses/LICENSE-2.0 * - * SPDX-License-Identifier: Apache-2.0 - * ============LICENSE_END========================================================= + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= */ const mod = require('../ApexFiles'); @@ -23,19 +24,16 @@ test('test files_open', () => { const open = jest.fn(mod.files_fileOpen); open(); expect(open).toBeCalledTimes(1); -}) +}); test('test files_download', () => { - const download = jest.fn(mod.files_fileDownload).mockImplementation(() => { - var requestURL = "/Model/Download"; - - var downloadLink = document.createElement("a"); - document.body.appendChild(downloadLink); - downloadLink.download = 'modelFileName'; - downloadLink.href = requestURL; - downloadLink.click(); - document.body.removeChild(downloadLink); - }); + const download = jest.fn(mod.files_fileDownload); download(); expect(download).toHaveBeenCalledTimes(1); -})
\ No newline at end of file +}); + +test('Test files_upload', () => { + const upload = jest.fn(mod.files_fileUpload); + upload(); + expect(upload).toBeCalled(); +});
\ No newline at end of file diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/__test__/ApexFormUtils.test.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/__test__/ApexFormUtils.test.js index 046c43e..0df839d 100644 --- a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/__test__/ApexFormUtils.test.js +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/__test__/ApexFormUtils.test.js @@ -28,5 +28,8 @@ test('test generate', () => { test('test edit', () => { const mock = jest.fn(mod.formUtils_generateDescription); mock(); - expect(mock).toBeCalledTimes(1); + expect(mock(null, null, null)).toBe("Generated description for a concept called \"null\" with version \"null\" and UUID \"null\""); + expect(mock).toBeCalledTimes(2); + + })
\ No newline at end of file diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/__test__/ApexModelHandling.test.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/__test__/ApexModelHandling.test.js new file mode 100644 index 0000000..b9315c2 --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/__test__/ApexModelHandling.test.js @@ -0,0 +1,37 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2020 Nordix Foundation. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +const mod = require('../ApexModelHandling'); + +test('Test modelHandling_analyse', () => { + const mock_modelHandling_analyse = jest.fn(mod.modelHandling_analyse); + mock_modelHandling_analyse(); + expect(mock_modelHandling_analyse).toHaveBeenCalledWith(); +}); + +test('Test modelHandling_validate', () => { + const mock_modelHandling_validate_ajaxget = jest.fn(mod.modelHandling_validate.ajax_get); + mock_modelHandling_validate_ajaxget('test', jest.fn()); + expect(mock_modelHandling_validate_ajaxget).toHaveBeenCalledTimes(1); + + const mock_modelHandling_validate = jest.fn(mod.modelHandling_validate); + mock_modelHandling_validate(); + expect(mock_modelHandling_validate).toHaveBeenCalled(); +});
\ No newline at end of file diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/__test__/ApexNewModelForm.test.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/__test__/ApexNewModelForm.test.js new file mode 100644 index 0000000..5088988 --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/__test__/ApexNewModelForm.test.js @@ -0,0 +1,46 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2020 Nordix Foundation. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +const mod = require('../ApexNewModelForm'); + +test('test activate', () => { + document.innerHTML = + '<div id="newModelFormDiv">' + + '</div>' + + '<div id="elementTest">' + + '</div>'; + + const mock_activate = jest.fn(mod.newModelForm_activate); + mock_activate(document.createElement("elementTest")); + expect(mock_activate).toBeCalled(); +}); + +test('Test generateUUIDPressed', () => { + document.innerHTML = + '<div id="newModelFormUuidInput"></div>'; + + const mock_generateUuid = jest.fn(mod.newModelForm_generateUUIDPressed); + mock_generateUuid.mockImplementation(() => { + document.createElement("newModelFormUuidInput"); + document.getElementsByTagName("newModelFormUuidInput").value = 'test'; + }); + mock_generateUuid(); + expect(mock_generateUuid).toBeCalled(); +});
\ No newline at end of file diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/__test__/ApexPolicyEditForm.test.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/__test__/ApexPolicyEditForm.test.js new file mode 100644 index 0000000..f438305 --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/__test__/ApexPolicyEditForm.test.js @@ -0,0 +1,55 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2020 Nordix Foundation + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +const mod = require('../ApexPolicyEditForm'); +const policy = { + policyKey: { + name: 'testName', + version: 'testVersion', + uuid: 'testUUID' + }, + uuid: 'testUUID' +} + +test('Test activate CREATE', () => { + const mock_activate = jest.fn(mod.editPolicyForm_activate); + + mock_activate('test', 'CREATE', policy, 'tasks', 'events', 'contextS', 'contextI'); + expect(mock_activate).toBeCalled(); +}); + +test('Test activate EDIT', () => { + const mock_activate = jest.fn(mod.editPolicyForm_activate); + + mock_activate('test', 'EDIT', policy, 'tasks', 'events', 'contextS', 'contextI'); + expect(mock_activate).toBeCalled(); +}); + +test('Test activate !CREATE/EDIT', () => { + const mock_activate = jest.fn(mod.editPolicyForm_activate); + + mock_activate('test', 'TEST', policy, 'tasks', 'events', 'contextS', 'contextI'); + expect(mock_activate).toBeCalled(); +}); + +test('Test editPolicyForm_editPolicy_inner', () => { + const mock_editPolicyForm_editPolicy_inner = jest.fn(mod.editPolicyForm_editPolicy_inner); + mock_editPolicyForm_editPolicy_inner('formParent', policy, 'VIEW'); + expect(mock_editPolicyForm_editPolicy_inner).toBeCalled(); +})
\ No newline at end of file diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/__test__/ApexPolicyEditForm_State.test.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/__test__/ApexPolicyEditForm_State.test.js new file mode 100644 index 0000000..1f1767a --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/__test__/ApexPolicyEditForm_State.test.js @@ -0,0 +1,122 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2020 Nordix Foundation + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +const mod = require('../ApexPolicyEditForm_State'); + +const contextAlbum = { + name: 'testName', + version: '0.0.1', + scope: 'test', + uuid: 'testUUID', + description: 'testDesc', + writeable: true +}; +const contextSchema = { + name: 'testName', + version: '0.0.1', + schemaFlavour: 'testFlav', + schemaDefinition: 'testDef', + uuid: 'testUUID', + description: 'testDesc' +} + +const task = { + key: { + name: 'testName', + version: 'testVersion' + }, + uuid: 'testUUID' +}; + +const event = { + key: { + name: 'testName', + version: '0.0.1', + }, + nameSpace: 'test', + source: 'test', + target: 'test', + uuid: 'test', + description: 'test', +} + +const policy = { + policyKey: { + name: 'testName', + version: 'testVersion', + uuid: 'testUUID' + }, + uuid: 'testUUID' +} + +const state = { + trigger: { + name: 'testName', + version: '0.0.1', + } +} + +const parentTBody = document.createElement('table'); + +test('Test editPolicyForm_State_generateStateDiv CREATE', () => { + const mock_editPolicyForm_State_generateStateDiv = jest.fn(mod.editPolicyForm_State_generateStateDiv); + mock_editPolicyForm_State_generateStateDiv('CREATE', policy, 'stateName', state, task, event, contextAlbum, contextSchema); + expect(mock_editPolicyForm_State_generateStateDiv).toBeCalledWith('CREATE', policy, 'stateName', state, task, event, contextAlbum, contextSchema); +}); + +test('Test editPolicyForm_State_generateStateDiv VIEW', () => { + const mock_editPolicyForm_State_generateStateDiv = jest.fn(mod.editPolicyForm_State_generateStateDiv); + mock_editPolicyForm_State_generateStateDiv('VIEW', policy, 'stateName', state, task, event, contextAlbum, contextSchema); + expect(mock_editPolicyForm_State_generateStateDiv).toBeCalledWith('VIEW', policy, 'stateName', state, task, event, contextAlbum, contextSchema); +}); + +test('Test editPolicyForm_State_generateStateDiv EDIT', () => { + const mock_editPolicyForm_State_generateStateDiv = jest.fn(mod.editPolicyForm_State_generateStateDiv); + mock_editPolicyForm_State_generateStateDiv('EDIT', policy, 'stateName', state, task, event, contextAlbum, contextSchema); + expect(mock_editPolicyForm_State_generateStateDiv).toBeCalledWith('EDIT', policy, 'stateName', state, task, event, contextAlbum, contextSchema); +}); + +test('Test editPolicyForm_State_addStateLogicOutput', () => { + const mock_editPolicyForm_State_addStateLogicOutput = jest.fn(mod.editPolicyForm_State_addStateLogicOutput); + mock_editPolicyForm_State_addStateLogicOutput(parentTBody, false, 'stateName', state, 'outputName', 'logic', 'flavour'); + expect(mock_editPolicyForm_State_addStateLogicOutput).toBeCalledWith(parentTBody, false, 'stateName', state, 'outputName', 'logic', 'flavour'); +}); + +test('Test editPolicyForm_State_addStateDirectOutput', () => { + const mock_editPolicyForm_State_addStateDirectOutput = jest.fn(mod.editPolicyForm_State_addStateDirectOutput); + mock_editPolicyForm_State_addStateDirectOutput(parentTBody, false, 'stateName', state, 'outputName', state, event, 'options', event); + expect(mock_editPolicyForm_State_addStateDirectOutput).toBeCalledWith(parentTBody, false, 'stateName', state, 'outputName', state, event, 'options', event); +}); + +test('Test editPolicyForm_State_addPolicyContext', () => { + const mock_editPolicyForm_State_addPolicyContext = jest.fn(mod.editPolicyForm_State_addPolicyContext); + mock_editPolicyForm_State_addPolicyContext(parentTBody, false, 'stateName', 'contextName', 'ref', contextAlbum); + expect(mock_editPolicyForm_State_addPolicyContext).toBeCalledWith(parentTBody, false, 'stateName', 'contextName', 'ref', contextAlbum); +}); + +test('Test editPolicyForm_State_addPolicyTask', () => { + const mock_editPolicyForm_State_addPolicyTask = jest.fn(mod.editPolicyForm_State_addPolicyTask); + mock_editPolicyForm_State_addPolicyTask(parentTBody, false, false, state, 'stateName', 'ref', task, 'options'); + expect(mock_editPolicyForm_State_addPolicyTask).toBeCalledWith(parentTBody, false, false, state, 'stateName', 'ref', task, 'options'); + +}); + +test.todo('Test editPolicyForm_State_getDirectOutputMappingOptions'); +test.todo('Test editPolicyForm_State_getStateBean'); +test.todo('Test editPolicyForm_State_getLogicOutputMappingOptions');
\ No newline at end of file diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/__test__/ApexPageControl.test.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/__test__/ApexPolicyTab.test.js index abdb1a9..47f00ef 100644 --- a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/__test__/ApexPageControl.test.js +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/__test__/ApexPolicyTab.test.js @@ -17,14 +17,10 @@ * ============LICENSE_END========================================================= */ -const mod = require('../ApexPageControl'); +const mod = require('../ApexPolicyTab'); -test('test show placeholder', () => { - const mock = jest.fn(mod.showPlaceholder); - mock(); - expect(mock).toBeCalledTimes(1); -}) - -test('test busyMode', () => { - -})
\ No newline at end of file +test('Test policyTab_activate', () => { + const mock_activate = jest.fn(mod.policyTab_activate); + mock_activate(); + expect(mock_activate).toBeCalled(); +});
\ No newline at end of file diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/__test__/ApexResultForm.test.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/__test__/ApexResultForm.test.js new file mode 100644 index 0000000..a219ac9 --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/__test__/ApexResultForm.test.js @@ -0,0 +1,37 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2020 Nordix Foundation. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +const mod = require('../ApexResultForm'); + +test('resultForm test', () => { + document.innerHTML = + '<div id="newModelDivBackground">' + + '</div>' + + '<div id="elementTest">' + + '</div>'; + + const content = document.getElementById("elementTest"); + const mock_activate = jest.fn(mod.resultForm_activate); + mock_activate(document.createElement("elementTest"), 'heading', 'text'); + expect(mock_activate).toBeCalled(); + + const mock_pressedOK = jest.fn(mod.resultForm_okPressed); + mock_pressedOK(); +});
\ No newline at end of file diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/__test__/ApexTaskEditForm.test.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/__test__/ApexTaskEditForm.test.js new file mode 100644 index 0000000..f914645 --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/__test__/ApexTaskEditForm.test.js @@ -0,0 +1,50 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2020 Nordix Foundation. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +const mod = require('../ApexTaskEditForm'); + +const contextSchema = { + name: 'testName', + version: '0.0.1', + schemaFlavour: 'testFlav', + schemaDefinition: 'testDef', + uuid: 'testUUID', + description: 'testDesc' +}; + +const task = { + key: { + name: 'testName', + version: 'testVersion' + }, + uuid: 'testUUID' +}; + +test('Test editTaskForm_activate CREATE', () => { + const mock_activate = jest.fn(mod.editTaskForm_activate); + mock_activate('test', 'CREATE', 'task', contextSchema, 'album'); + expect(mock_activate).toBeCalled(); +}); + +test('Test editTaskForm_activate EDIT', () => { + const mock_activate = jest.fn(mod.editTaskForm_activate); + mock_activate('test', 'EDIT', task, contextSchema, 'album'); + expect(mock_activate).toBeCalled(); +}); diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/__test__/ApexTaskTab.test.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/__test__/ApexTaskTab.test.js new file mode 100644 index 0000000..784c644 --- /dev/null +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/__test__/ApexTaskTab.test.js @@ -0,0 +1,33 @@ +/*- + * ============LICENSE_START======================================================= + * Copyright (C) 2020 Nordix Foundation. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +const mod = require('../ApexTaskTab'); + +test('test dom : taskTab_activate', () => { + const activate_mock = jest.fn(mod.taskTab_activate); + activate_mock(); + expect(activate_mock).toBeCalled(); +}); + +test('test reset', () => { + const reset_mock = jest.fn(mod.taskTab_reset); + reset_mock(); + expect(reset_mock).toBeCalled(); +});
\ No newline at end of file diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/contextMenu.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/contextMenu.js index 925a522..1235cf1 100644 --- a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/contextMenu.js +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/contextMenu.js @@ -20,6 +20,38 @@ */ //hide the context menu, if it's shown, anytime the user clicks anywhere. +import {apexUtils_emptyElement} from "./ApexUtils"; +import { + editContextSchemaForm_createContextSchema, + editContextSchemaForm_deleteContextSchema, + editContextSchemaForm_editContextSchema, + editContextSchemaForm_viewContextSchema +} from "./ApexContextSchemaEditForm"; +import { + editEventForm_createEvent, + editEventForm_deleteEvent, + editEventForm_editEvent, + editEventForm_viewEvent +} from "./ApexEventEditForm"; +import { + editTaskForm_createTask, + editTaskForm_deleteTask, + editTaskForm_editTask, + editTaskForm_viewTask +} from "./ApexTaskEditForm"; +import { + editPolicyForm_createPolicy, + editPolicyForm_deletePolicy, + editPolicyForm_editPolicy, + editPolicyForm_viewPolicy +} from "./ApexPolicyEditForm"; +import { + editContextAlbumForm_createContextAlbum, + editContextAlbumForm_deleteContextAlbum, + editContextAlbumForm_editContextAlbum, + editContextAlbumForm_viewContextAlbum +} from "./ApexContextAlbumEditForm"; + $(document).on("click", function(event) { if (document.getElementById("rightClickMenu")) document.getElementById("rightClickMenu").className = "ebContextMenu-body_visible_false"; @@ -197,3 +229,7 @@ function mouseY(evt) { return null; } } + +export { + rightClickMenu_scopePreserver +} diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/dropdownList.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/dropdownList.js index a64b823..497bd68 100644 --- a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/dropdownList.js +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/dropdownList.js @@ -199,3 +199,14 @@ function dropdownList_ChangeOptions(dropdownListDIV, options, selected, disabled } return retdiv; } + +export { + dropdownList, + dropdownList_ChangeOptions, + dropdownList_display_click, + dropdownList_display_hide, + dropdownList_filter, + dropdownList_filter_scopePreserver, + dropdownList_option_select, + dropdownList_option_select_scopePreserver +} diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/showhideTextarea.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/showhideTextarea.js index e1ac0e7..353b4e9 100644 --- a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/showhideTextarea.js +++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/showhideTextarea.js @@ -124,3 +124,10 @@ function showHideTextarea(id_prefix, content, _initialshow, _editable, _disabled return retdiv; }; +export { + showHideTextarea, + showHideTextarea_display_hide, + showHideTextarea_display_show, + _showHideTextarea_display_hide, + _showHideTextarea_display_show +} |