diff --git a/web/src/app/__tests__/common/sessionPlayerTest.js b/web/src/app/__tests__/common/sessionPlayerTest.js index 0a2502d586c..ab59ede7681 100644 --- a/web/src/app/__tests__/common/sessionPlayerTest.js +++ b/web/src/app/__tests__/common/sessionPlayerTest.js @@ -15,10 +15,10 @@ limitations under the License. */ var { expect, $, spyOn, api, Dfd } = require('./..'); -var {EventProvider, TtyPlayer, Buffer} = require('app/common/term/ttyPlayer'); +var {EventProvider, TtyPlayer, Buffer} = require('app/lib/term/ttyPlayer'); var sample = require('./streamData') -describe('common/lib/term/ttyPlayer/eventProvider', function(){ +describe('lib/lib/term/ttyPlayer/eventProvider', function(){ afterEach(function () { expect.restoreSpies(); @@ -126,7 +126,7 @@ describe('common/lib/term/ttyPlayer/eventProvider', function(){ }); }); -describe('common/lib/ttyPlayer', function () { +describe('lib/lib/ttyPlayer', function () { afterEach(function () { expect.restoreSpies(); diff --git a/web/src/app/__tests__/modules/nodesTest.js b/web/src/app/__tests__/modules/nodesTest.js index a41a2988fd5..0254ef21945 100644 --- a/web/src/app/__tests__/modules/nodesTest.js +++ b/web/src/app/__tests__/modules/nodesTest.js @@ -15,8 +15,8 @@ limitations under the License. */ var { sampleData, reactor, expect, Dfd, spyOn, api } = require('./../'); -var { getters, actions } = require('app/modules/nodes'); -var { setSiteId } = require('app/modules/app/actions'); +var { getters, actions } = require('app/flux/nodes'); +var { setSiteId } = require('app/flux/app/actions'); describe('modules/nodes', function () { let siteid = 'siteid123'; diff --git a/web/src/app/__tests__/modules/sessionsTest.js b/web/src/app/__tests__/modules/sessionsTest.js index 6a93f91433c..77f2f9de004 100644 --- a/web/src/app/__tests__/modules/sessionsTest.js +++ b/web/src/app/__tests__/modules/sessionsTest.js @@ -15,8 +15,8 @@ limitations under the License. */ var { sampleData, reactor, expect, Dfd, cfg, spyOn, api } = require('./../'); -var {actions, getters} = require('app/modules/sessions'); -var { setSiteId } = require('app/modules/app/actions'); +var {actions, getters} = require('app/flux/sessions'); +var { setSiteId } = require('app/flux/app/actions'); describe('modules/sessions', function () { let siteid = 'siteid123'; diff --git a/web/src/app/__tests__/modules/userTest.js b/web/src/app/__tests__/modules/userTest.js index 510eb361f93..5d8ffe82534 100644 --- a/web/src/app/__tests__/modules/userTest.js +++ b/web/src/app/__tests__/modules/userTest.js @@ -15,8 +15,8 @@ limitations under the License. */ var { reactor, sampleData, expect, api, Dfd, spyOn } = require('./../'); -var {actions, getters} = require('app/modules/user'); -var {TLPT_RECEIVE_USER} = require('app/modules/user/actionTypes'); +var {actions, getters} = require('app/flux/user'); +var {TLPT_RECEIVE_USER} = require('app/flux/user/actionTypes'); describe('modules/user', function () { diff --git a/web/src/app/components/app.jsx b/web/src/app/components/app.jsx index 1f8b61cb15a..2a1f23a20fc 100644 --- a/web/src/app/components/app.jsx +++ b/web/src/app/components/app.jsx @@ -17,8 +17,8 @@ limitations under the License. import React, { Component } from 'react'; import { connect } from 'nuclear-js-react-addons'; import cfg from 'app/config' -import { getters } from 'app/modules/app'; -import { refresh } from 'app/modules/app/actions'; +import { getters } from 'app/flux/app'; +import { refresh } from 'app/flux/app/actions'; import NavLeftBar from './navLeftBar'; import NotificationHost from './notificationHost.jsx'; import Timer from './timer.jsx'; diff --git a/web/src/app/components/clusterSelector.jsx b/web/src/app/components/clusterSelector.jsx index 498b78fcfaf..6d56eaa09ee 100644 --- a/web/src/app/components/clusterSelector.jsx +++ b/web/src/app/components/clusterSelector.jsx @@ -16,11 +16,11 @@ limitations under the License. import React from 'react'; import reactor from 'app/reactor'; -import siteGetters from 'app/modules/sites/getters'; -import appGetters from 'app/modules/app/getters'; +import siteGetters from 'app/flux/sites/getters'; +import appGetters from 'app/flux/app/getters'; import DropDown from './dropdown.jsx'; -import { setSiteId, refresh } from 'app/modules/app/actions'; -import { isUUID } from 'app/common/objectUtils'; +import { setSiteId, refresh } from 'app/flux/app/actions'; +import { isUUID } from 'app/lib/objectUtils'; const ClusterSelector = React.createClass({ diff --git a/web/src/app/components/navLeftBar.jsx b/web/src/app/components/navLeftBar.jsx index fbf91793f76..fec23e7b3a4 100644 --- a/web/src/app/components/navLeftBar.jsx +++ b/web/src/app/components/navLeftBar.jsx @@ -16,9 +16,9 @@ limitations under the License. import React from 'react'; import reactor from 'app/reactor'; import cfg from 'app/config'; -import userGetters from 'app/modules/user/getters'; +import userGetters from 'app/flux/user/getters'; import { IndexLink } from 'react-router'; -import { logoutUser } from 'app/modules/app/actions'; +import { logoutUser } from 'app/flux/app/actions'; import { UserIcon } from './icons.jsx'; const NavLeftBar = React.createClass({ diff --git a/web/src/app/components/nodes/main.jsx b/web/src/app/components/nodes/main.jsx index a218cbdeaa7..39e38bb9a50 100644 --- a/web/src/app/components/nodes/main.jsx +++ b/web/src/app/components/nodes/main.jsx @@ -16,8 +16,8 @@ limitations under the License. import React from 'react'; import reactor from 'app/reactor'; -import userGetters from 'app/modules/user/getters'; -import nodeGetters from 'app/modules/nodes/getters'; +import userGetters from 'app/flux/user/getters'; +import nodeGetters from 'app/flux/nodes/getters'; import NodeList from './nodeList.jsx'; const Nodes = React.createClass({ diff --git a/web/src/app/components/nodes/nodeList.jsx b/web/src/app/components/nodes/nodeList.jsx index a59ecf559a8..6697ea7c514 100644 --- a/web/src/app/components/nodes/nodeList.jsx +++ b/web/src/app/components/nodes/nodeList.jsx @@ -17,7 +17,7 @@ limitations under the License. import React from 'react'; import { Link } from 'react-router'; import _ from '_'; -import { isMatch } from 'app/common/objectUtils'; +import { isMatch } from 'app/lib/objectUtils'; import InputSearch from './../inputSearch.jsx'; import { Table, Column, Cell, SortHeaderCell, SortTypes, EmptyIndicator } from 'app/components/table.jsx'; import ClusterSelector from './../clusterSelector.jsx'; diff --git a/web/src/app/components/notificationHost.jsx b/web/src/app/components/notificationHost.jsx index a97b61f798e..44072a3dbfd 100644 --- a/web/src/app/components/notificationHost.jsx +++ b/web/src/app/components/notificationHost.jsx @@ -16,7 +16,7 @@ limitations under the License. import React from 'react'; import reactor from 'app/reactor'; -import { lastMessage } from 'app/modules/notifications/getters'; +import { lastMessage } from 'app/flux/notifications/getters'; import { ToastContainer, ToastMessage } from "react-toastr"; const ToastMessageFactory = React.createFactory(ToastMessage.animation); diff --git a/web/src/app/components/player/playerHost.jsx b/web/src/app/components/player/playerHost.jsx index ed9b214d104..86f6a080aba 100644 --- a/web/src/app/components/player/playerHost.jsx +++ b/web/src/app/components/player/playerHost.jsx @@ -18,10 +18,10 @@ import initScroll from 'perfect-scrollbar/jquery'; import React from 'react'; import { connect } from 'nuclear-js-react-addons'; import ReactSlider from 'react-slider'; -import getters from 'app/modules/player/getters'; -import Terminal from 'app/common/term/terminal'; -import { TtyPlayer } from 'app/common/term/ttyPlayer'; -import { initPlayer, close } from 'app/modules/player/actions'; +import getters from 'app/flux/player/getters'; +import Terminal from 'app/lib/term/terminal'; +import { TtyPlayer } from 'app/lib/term/ttyPlayer'; +import { initPlayer, close } from 'app/flux/player/actions'; import Indicator from './../indicator.jsx'; import PartyListPanel from './../partyListPanel'; diff --git a/web/src/app/components/sessions/main.jsx b/web/src/app/components/sessions/main.jsx index 35b57e41433..76063b7b283 100644 --- a/web/src/app/components/sessions/main.jsx +++ b/web/src/app/components/sessions/main.jsx @@ -16,9 +16,9 @@ limitations under the License. import React from 'react'; import reactor from 'app/reactor'; -import { fetchSiteEventsWithinTimeRange } from 'app/modules/storedSessionsFilter/actions'; -import { storedSessionList, activeSessionList } from 'app/modules/sessions/getters'; -import { filter } from 'app/modules/storedSessionsFilter/getters'; +import { fetchSiteEventsWithinTimeRange } from 'app/flux/storedSessionsFilter/actions'; +import { storedSessionList, activeSessionList } from 'app/flux/sessions/getters'; +import { filter } from 'app/flux/storedSessionsFilter/getters'; import Timer from './../timer.jsx'; import SessionList from './sessionList.jsx'; diff --git a/web/src/app/components/sessions/sessionList.jsx b/web/src/app/components/sessions/sessionList.jsx index e5e9c80b577..9c8a3ae892e 100644 --- a/web/src/app/components/sessions/sessionList.jsx +++ b/web/src/app/components/sessions/sessionList.jsx @@ -18,8 +18,8 @@ import _ from '_'; import React from 'react'; import moment from 'moment'; import InputSearch from './../inputSearch.jsx'; -import { isMatch } from 'app/common/objectUtils'; -import { actions } from 'app/modules/storedSessionsFilter'; +import { isMatch } from 'app/lib/objectUtils'; +import { actions } from 'app/flux/storedSessionsFilter'; import { Table, Column, Cell, SortHeaderCell, SortTypes, EmptyIndicator } from 'app/components/table.jsx'; import { SessionIdCell, NodeCell, UsersCell, DateCreatedCell, DurationCell } from './listItems'; import { DateRangePicker } from './../datePicker.jsx'; diff --git a/web/src/app/components/terminal/terminalHost.jsx b/web/src/app/components/terminal/terminalHost.jsx index 6ef8095a7ab..cb58b43ef56 100644 --- a/web/src/app/components/terminal/terminalHost.jsx +++ b/web/src/app/components/terminal/terminalHost.jsx @@ -19,12 +19,12 @@ import reactor from 'app/reactor'; import cfg from 'app/config'; import PartyListPanel from './../partyListPanel'; import session from 'app/services/session'; -import Terminal from 'app/common/term/terminal'; -import termGetters from 'app/modules/terminal/getters'; -import sessionGetters from 'app/modules/sessions/getters'; +import Terminal from 'app/lib/term/terminal'; +import termGetters from 'app/flux/terminal/getters'; +import sessionGetters from 'app/flux/sessions/getters'; import Indicator from './../indicator.jsx'; -import { initTerminal, startNew, close, updateSessionFromEventStream } from 'app/modules/terminal/actions'; -import { openPlayer } from 'app/modules/player/actions'; +import { initTerminal, startNew, close, updateSessionFromEventStream } from 'app/flux/terminal/actions'; +import { openPlayer } from 'app/flux/player/actions'; const TerminalHost = React.createClass({ diff --git a/web/src/app/components/user/invite.jsx b/web/src/app/components/user/invite.jsx index dffb850d23a..2c11237ddd6 100644 --- a/web/src/app/components/user/invite.jsx +++ b/web/src/app/components/user/invite.jsx @@ -19,7 +19,7 @@ import $ from 'jQuery'; import classnames from 'classnames'; import reactor from 'app/reactor'; import cfg from 'app/config'; -import {actions, getters} from 'app/modules/user'; +import {actions, getters} from 'app/flux/user'; import LinkedStateMixin from 'react-addons-linked-state-mixin'; import { Auth2faTypeEnum, AuthTypeEnum } from 'app/services/enums'; import { ErrorPage, ErrorTypes } from './../msgPage'; diff --git a/web/src/app/components/user/login.jsx b/web/src/app/components/user/login.jsx index c6517808fcf..b5e24623d64 100644 --- a/web/src/app/components/user/login.jsx +++ b/web/src/app/components/user/login.jsx @@ -18,7 +18,7 @@ import React from 'react'; import $ from 'jQuery'; import 'app/../assets/js/jquery-validate'; import reactor from 'app/reactor'; -import {actions, getters} from 'app/modules/user'; +import {actions, getters} from 'app/flux/user'; import GoogleAuthInfo from './googleAuthLogo'; import cfg from 'app/config'; import { TeleportLogo } from './../icons.jsx'; diff --git a/web/src/app/config.js b/web/src/app/config.js index c4cc8469eca..c0e6a171d1c 100644 --- a/web/src/app/config.js +++ b/web/src/app/config.js @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { formatPattern } from 'app/common/patternUtils'; +import { formatPattern } from 'app/lib/patternUtils'; import $ from 'jQuery'; let cfg = { diff --git a/web/src/app/modules/app/actionTypes.js b/web/src/app/flux/app/actionTypes.js similarity index 100% rename from web/src/app/modules/app/actionTypes.js rename to web/src/app/flux/app/actionTypes.js diff --git a/web/src/app/modules/app/actions.js b/web/src/app/flux/app/actions.js similarity index 88% rename from web/src/app/modules/app/actions.js rename to web/src/app/flux/app/actions.js index 92be215a975..eaaf481d0a9 100644 --- a/web/src/app/modules/app/actions.js +++ b/web/src/app/flux/app/actions.js @@ -16,18 +16,18 @@ limitations under the License. import reactor from 'app/reactor'; import auth from 'app/services/auth'; -import { showError } from 'app/modules/notifications/actions'; +import { showError } from 'app/flux/notifications/actions'; import { TLPT_APP_SET_SITE_ID } from './actionTypes'; -import { TRYING_TO_INIT_APP } from 'app/modules/restApi/constants'; +import { TRYING_TO_INIT_APP } from 'app/flux/restApi/constants'; import { TLPT_SITES_RECEIVE } from './../sites/actionTypes'; import api from 'app/services/api'; import cfg from 'app/config'; -import restApiActions from 'app/modules/restApi/actions'; +import restApiActions from 'app/flux/restApi/actions'; import { fetchNodes } from './../nodes/actions'; -import { fetchActiveSessions } from 'app/modules/sessions/actions'; +import { fetchActiveSessions } from 'app/flux/sessions/actions'; import $ from 'jQuery'; -const logger = require('app/common/logger').create('flux/app'); +const logger = require('app/lib/logger').create('flux/app'); const actions = { diff --git a/web/src/app/modules/app/appStore.js b/web/src/app/flux/app/appStore.js similarity index 100% rename from web/src/app/modules/app/appStore.js rename to web/src/app/flux/app/appStore.js diff --git a/web/src/app/modules/app/getters.js b/web/src/app/flux/app/getters.js similarity index 83% rename from web/src/app/modules/app/getters.js rename to web/src/app/flux/app/getters.js index 6acea2651d4..1f9d9457599 100644 --- a/web/src/app/modules/app/getters.js +++ b/web/src/app/flux/app/getters.js @@ -14,8 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { TRYING_TO_INIT_APP } from 'app/modules/restApi/constants'; -import { requestStatus } from 'app/modules/restApi/getters'; +import { TRYING_TO_INIT_APP } from 'app/flux/restApi/constants'; +import { requestStatus } from 'app/flux/restApi/getters'; export default { initAttemp: requestStatus(TRYING_TO_INIT_APP), diff --git a/web/src/app/modules/app/index.js b/web/src/app/flux/app/index.js similarity index 100% rename from web/src/app/modules/app/index.js rename to web/src/app/flux/app/index.js diff --git a/web/src/app/modules/index.js b/web/src/app/flux/index.js similarity index 100% rename from web/src/app/modules/index.js rename to web/src/app/flux/index.js diff --git a/web/src/app/modules/nodes/actionTypes.js b/web/src/app/flux/nodes/actionTypes.js similarity index 100% rename from web/src/app/modules/nodes/actionTypes.js rename to web/src/app/flux/nodes/actionTypes.js diff --git a/web/src/app/modules/nodes/actions.js b/web/src/app/flux/nodes/actions.js similarity index 81% rename from web/src/app/modules/nodes/actions.js rename to web/src/app/flux/nodes/actions.js index ddafb58c64d..477cba06f28 100644 --- a/web/src/app/modules/nodes/actions.js +++ b/web/src/app/flux/nodes/actions.js @@ -2,9 +2,9 @@ import reactor from 'app/reactor'; import { TLPT_NODES_RECEIVE } from './actionTypes'; import api from 'app/services/api'; import cfg from 'app/config'; -import { showError } from 'app/modules/notifications/actions'; -import appGetters from 'app/modules/app/getters'; -import Logger from 'app/common/logger'; +import { showError } from 'app/flux/notifications/actions'; +import appGetters from 'app/flux/app/getters'; +import Logger from 'app/lib/logger'; const logger = Logger.create('Modules/Nodes'); diff --git a/web/src/app/modules/nodes/getters.js b/web/src/app/flux/nodes/getters.js similarity index 100% rename from web/src/app/modules/nodes/getters.js rename to web/src/app/flux/nodes/getters.js diff --git a/web/src/app/modules/nodes/index.js b/web/src/app/flux/nodes/index.js similarity index 100% rename from web/src/app/modules/nodes/index.js rename to web/src/app/flux/nodes/index.js diff --git a/web/src/app/modules/nodes/nodeStore.js b/web/src/app/flux/nodes/nodeStore.js similarity index 100% rename from web/src/app/modules/nodes/nodeStore.js rename to web/src/app/flux/nodes/nodeStore.js diff --git a/web/src/app/modules/notifications/actionTypes.js b/web/src/app/flux/notifications/actionTypes.js similarity index 100% rename from web/src/app/modules/notifications/actionTypes.js rename to web/src/app/flux/notifications/actionTypes.js diff --git a/web/src/app/modules/notifications/actions.js b/web/src/app/flux/notifications/actions.js similarity index 100% rename from web/src/app/modules/notifications/actions.js rename to web/src/app/flux/notifications/actions.js diff --git a/web/src/app/modules/notifications/getters.js b/web/src/app/flux/notifications/getters.js similarity index 100% rename from web/src/app/modules/notifications/getters.js rename to web/src/app/flux/notifications/getters.js diff --git a/web/src/app/modules/notifications/index.js b/web/src/app/flux/notifications/index.js similarity index 100% rename from web/src/app/modules/notifications/index.js rename to web/src/app/flux/notifications/index.js diff --git a/web/src/app/modules/notifications/notificationStore.js b/web/src/app/flux/notifications/notificationStore.js similarity index 100% rename from web/src/app/modules/notifications/notificationStore.js rename to web/src/app/flux/notifications/notificationStore.js diff --git a/web/src/app/modules/player/actionTypes.js b/web/src/app/flux/player/actionTypes.js similarity index 100% rename from web/src/app/modules/player/actionTypes.js rename to web/src/app/flux/player/actionTypes.js diff --git a/web/src/app/modules/player/actions.js b/web/src/app/flux/player/actions.js similarity index 96% rename from web/src/app/modules/player/actions.js rename to web/src/app/flux/player/actions.js index 76344bdf754..e9798a8bd25 100644 --- a/web/src/app/modules/player/actions.js +++ b/web/src/app/flux/player/actions.js @@ -20,7 +20,7 @@ import cfg from 'app/config'; import { fetchStoredSession } from './../sessions/actions'; import sessionGetters from './../sessions/getters'; -const logger = require('app/common/logger').create('app/flux/player'); +const logger = require('app/lib/logger').create('app/flux/player'); import { TLPT_PLAYER_INIT, diff --git a/web/src/app/modules/player/getters.js b/web/src/app/flux/player/getters.js similarity index 100% rename from web/src/app/modules/player/getters.js rename to web/src/app/flux/player/getters.js diff --git a/web/src/app/modules/player/store.js b/web/src/app/flux/player/store.js similarity index 100% rename from web/src/app/modules/player/store.js rename to web/src/app/flux/player/store.js diff --git a/web/src/app/modules/restApi/actionTypes.js b/web/src/app/flux/restApi/actionTypes.js similarity index 100% rename from web/src/app/modules/restApi/actionTypes.js rename to web/src/app/flux/restApi/actionTypes.js diff --git a/web/src/app/modules/restApi/actions.js b/web/src/app/flux/restApi/actions.js similarity index 100% rename from web/src/app/modules/restApi/actions.js rename to web/src/app/flux/restApi/actions.js diff --git a/web/src/app/modules/restApi/constants.js b/web/src/app/flux/restApi/constants.js similarity index 100% rename from web/src/app/modules/restApi/constants.js rename to web/src/app/flux/restApi/constants.js diff --git a/web/src/app/modules/restApi/getters.js b/web/src/app/flux/restApi/getters.js similarity index 100% rename from web/src/app/modules/restApi/getters.js rename to web/src/app/flux/restApi/getters.js diff --git a/web/src/app/modules/restApi/index.js b/web/src/app/flux/restApi/index.js similarity index 100% rename from web/src/app/modules/restApi/index.js rename to web/src/app/flux/restApi/index.js diff --git a/web/src/app/modules/restApi/restApiStore.js b/web/src/app/flux/restApi/restApiStore.js similarity index 100% rename from web/src/app/modules/restApi/restApiStore.js rename to web/src/app/flux/restApi/restApiStore.js diff --git a/web/src/app/modules/sessions/actionTypes.js b/web/src/app/flux/sessions/actionTypes.js similarity index 100% rename from web/src/app/modules/sessions/actionTypes.js rename to web/src/app/flux/sessions/actionTypes.js diff --git a/web/src/app/modules/sessions/actions.js b/web/src/app/flux/sessions/actions.js similarity index 92% rename from web/src/app/modules/sessions/actions.js rename to web/src/app/flux/sessions/actions.js index 15b7833b42f..fdbacb91bee 100644 --- a/web/src/app/modules/sessions/actions.js +++ b/web/src/app/flux/sessions/actions.js @@ -17,11 +17,11 @@ limitations under the License. var reactor = require('app/reactor'); var api = require('app/services/api'); var cfg = require('app/config'); -var {showError} = require('app/modules/notifications/actions'); +var {showError} = require('app/flux/notifications/actions'); var moment = require('moment'); -var appGetters = require('app/modules/app/getters') +var appGetters = require('app/flux/app/getters') -const logger = require('app/common/logger').create('Modules/Sessions'); +const logger = require('app/lib/logger').create('Modules/Sessions'); const { TLPT_SESSIONS_ACTIVE_RECEIVE, TLPT_SESSIONS_EVENTS_RECEIVE, diff --git a/web/src/app/modules/sessions/activeSessionStore.js b/web/src/app/flux/sessions/activeSessionStore.js similarity index 100% rename from web/src/app/modules/sessions/activeSessionStore.js rename to web/src/app/flux/sessions/activeSessionStore.js diff --git a/web/src/app/modules/sessions/archivedSessionStore.js b/web/src/app/flux/sessions/archivedSessionStore.js similarity index 100% rename from web/src/app/modules/sessions/archivedSessionStore.js rename to web/src/app/flux/sessions/archivedSessionStore.js diff --git a/web/src/app/modules/sessions/eventStore.js b/web/src/app/flux/sessions/eventStore.js similarity index 100% rename from web/src/app/modules/sessions/eventStore.js rename to web/src/app/flux/sessions/eventStore.js diff --git a/web/src/app/modules/sessions/getters.js b/web/src/app/flux/sessions/getters.js similarity index 96% rename from web/src/app/modules/sessions/getters.js rename to web/src/app/flux/sessions/getters.js index 9ac5684a844..38115d8f337 100644 --- a/web/src/app/modules/sessions/getters.js +++ b/web/src/app/flux/sessions/getters.js @@ -18,8 +18,8 @@ import moment from 'moment'; import cfg from 'app/config'; import { EventTypeEnum } from 'app/services/enums'; import reactor from 'app/reactor'; -import { nodeHostNameByServerId } from 'app/modules/nodes/getters'; -import { parseIp } from 'app/common/objectUtils'; +import { nodeHostNameByServerId } from 'app/flux/nodes/getters'; +import { parseIp } from 'app/lib/objectUtils'; const activeSessionList = [['tlpt_sessions_active'], ['tlpt', 'siteId'], (sessionList, siteId) => { sessionList = sessionList.filter(n => n.get('siteId') === siteId); diff --git a/web/src/app/modules/sessions/index.js b/web/src/app/flux/sessions/index.js similarity index 100% rename from web/src/app/modules/sessions/index.js rename to web/src/app/flux/sessions/index.js diff --git a/web/src/app/modules/sites/actionTypes.js b/web/src/app/flux/sites/actionTypes.js similarity index 100% rename from web/src/app/modules/sites/actionTypes.js rename to web/src/app/flux/sites/actionTypes.js diff --git a/web/src/app/modules/sites/getters.js b/web/src/app/flux/sites/getters.js similarity index 100% rename from web/src/app/modules/sites/getters.js rename to web/src/app/flux/sites/getters.js diff --git a/web/src/app/modules/sites/siteStore.js b/web/src/app/flux/sites/siteStore.js similarity index 100% rename from web/src/app/modules/sites/siteStore.js rename to web/src/app/flux/sites/siteStore.js diff --git a/web/src/app/modules/storedSessionsFilter/actionTypes.js b/web/src/app/flux/storedSessionsFilter/actionTypes.js similarity index 100% rename from web/src/app/modules/storedSessionsFilter/actionTypes.js rename to web/src/app/flux/storedSessionsFilter/actionTypes.js diff --git a/web/src/app/modules/storedSessionsFilter/actions.js b/web/src/app/flux/storedSessionsFilter/actions.js similarity index 90% rename from web/src/app/modules/storedSessionsFilter/actions.js rename to web/src/app/flux/storedSessionsFilter/actions.js index d66b51132b2..66a50fbe1ff 100644 --- a/web/src/app/modules/storedSessionsFilter/actions.js +++ b/web/src/app/flux/storedSessionsFilter/actions.js @@ -17,9 +17,9 @@ limitations under the License. var reactor = require('app/reactor'); var {filter} = require('./getters'); var {fetchSiteEvents} = require('./../sessions/actions'); -var {showError} = require('app/modules/notifications/actions'); +var {showError} = require('app/flux/notifications/actions'); -const logger = require('app/common/logger').create('Modules/Sessions'); +const logger = require('app/lib/logger').create('Modules/Sessions'); const { TLPT_STORED_SESSINS_FILTER_SET_RANGE } = require('./actionTypes'); diff --git a/web/src/app/modules/storedSessionsFilter/getters.js b/web/src/app/flux/storedSessionsFilter/getters.js similarity index 100% rename from web/src/app/modules/storedSessionsFilter/getters.js rename to web/src/app/flux/storedSessionsFilter/getters.js diff --git a/web/src/app/modules/storedSessionsFilter/index.js b/web/src/app/flux/storedSessionsFilter/index.js similarity index 100% rename from web/src/app/modules/storedSessionsFilter/index.js rename to web/src/app/flux/storedSessionsFilter/index.js diff --git a/web/src/app/modules/storedSessionsFilter/storedSessionFilterStore.js b/web/src/app/flux/storedSessionsFilter/storedSessionFilterStore.js similarity index 100% rename from web/src/app/modules/storedSessionsFilter/storedSessionFilterStore.js rename to web/src/app/flux/storedSessionsFilter/storedSessionFilterStore.js diff --git a/web/src/app/modules/terminal/actionTypes.js b/web/src/app/flux/terminal/actionTypes.js similarity index 100% rename from web/src/app/modules/terminal/actionTypes.js rename to web/src/app/flux/terminal/actionTypes.js diff --git a/web/src/app/modules/terminal/actions.js b/web/src/app/flux/terminal/actions.js similarity index 96% rename from web/src/app/modules/terminal/actions.js rename to web/src/app/flux/terminal/actions.js index 62020375858..c8c55cb6767 100644 --- a/web/src/app/modules/terminal/actions.js +++ b/web/src/app/flux/terminal/actions.js @@ -20,9 +20,9 @@ import cfg from 'app/config'; //import getters from './getters'; import { updateSession } from './../sessions/actions'; import sessionGetters from './../sessions/getters'; -//import {showError} from 'app/modules/notifications/actions'; +//import {showError} from 'app/flux/notifications/actions'; -const logger = require('app/common/logger').create('Current Session'); +const logger = require('app/lib/logger').create('Current Session'); const { TLPT_TERMINAL_OPEN, TLPT_TERMINAL_CLOSE, TLPT_TERMINAL_SET_STATUS } = require('./actionTypes'); diff --git a/web/src/app/modules/terminal/getters.js b/web/src/app/flux/terminal/getters.js similarity index 100% rename from web/src/app/modules/terminal/getters.js rename to web/src/app/flux/terminal/getters.js diff --git a/web/src/app/modules/terminal/store.js b/web/src/app/flux/terminal/store.js similarity index 96% rename from web/src/app/modules/terminal/store.js rename to web/src/app/flux/terminal/store.js index d7b7ba0ee73..f5033fa265a 100644 --- a/web/src/app/modules/terminal/store.js +++ b/web/src/app/flux/terminal/store.js @@ -16,7 +16,7 @@ limitations under the License. import { Store } from 'nuclear-js'; import { Record } from 'immutable'; import reactor from 'app/reactor'; -import { nodeHostNameByServerId } from 'app/modules/nodes/getters'; +import { nodeHostNameByServerId } from 'app/flux/nodes/getters'; import { TLPT_TERMINAL_OPEN, TLPT_TERMINAL_CLOSE, diff --git a/web/src/app/modules/user/actionTypes.js b/web/src/app/flux/user/actionTypes.js similarity index 100% rename from web/src/app/modules/user/actionTypes.js rename to web/src/app/flux/user/actionTypes.js diff --git a/web/src/app/modules/user/actions.js b/web/src/app/flux/user/actions.js similarity index 97% rename from web/src/app/modules/user/actions.js rename to web/src/app/flux/user/actions.js index 71ba97df3c1..8c749d97a8b 100644 --- a/web/src/app/modules/user/actions.js +++ b/web/src/app/flux/user/actions.js @@ -16,8 +16,8 @@ limitations under the License. import reactor from 'app/reactor'; import { TLPT_RECEIVE_USER, TLPT_RECEIVE_USER_INVITE } from './actionTypes'; -import { TRYING_TO_SIGN_UP, TRYING_TO_LOGIN, FETCHING_INVITE} from 'app/modules/restApi/constants'; -import restApiActions from 'app/modules/restApi/actions'; +import { TRYING_TO_SIGN_UP, TRYING_TO_LOGIN, FETCHING_INVITE} from 'app/flux/restApi/constants'; +import restApiActions from 'app/flux/restApi/actions'; import auth from 'app/services/auth'; import cfg from 'app/config'; import api from 'app/services/api'; diff --git a/web/src/app/modules/user/getters.js b/web/src/app/flux/user/getters.js similarity index 92% rename from web/src/app/modules/user/getters.js rename to web/src/app/flux/user/getters.js index 069390142a6..3d588fdc747 100644 --- a/web/src/app/modules/user/getters.js +++ b/web/src/app/flux/user/getters.js @@ -14,8 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ -var {TRYING_TO_LOGIN, TRYING_TO_SIGN_UP, FETCHING_INVITE} = require('app/modules/restApi/constants'); -var {requestStatus} = require('app/modules/restApi/getters'); +var {TRYING_TO_LOGIN, TRYING_TO_SIGN_UP, FETCHING_INVITE} = require('app/flux/restApi/constants'); +var {requestStatus} = require('app/flux/restApi/getters'); const invite = [ ['tlpt_user_invite'], invite => invite ]; diff --git a/web/src/app/modules/user/index.js b/web/src/app/flux/user/index.js similarity index 100% rename from web/src/app/modules/user/index.js rename to web/src/app/flux/user/index.js diff --git a/web/src/app/modules/user/userInviteStore.js b/web/src/app/flux/user/userInviteStore.js similarity index 100% rename from web/src/app/modules/user/userInviteStore.js rename to web/src/app/flux/user/userInviteStore.js diff --git a/web/src/app/modules/user/userStore.js b/web/src/app/flux/user/userStore.js similarity index 100% rename from web/src/app/modules/user/userStore.js rename to web/src/app/flux/user/userStore.js diff --git a/web/src/app/index.jsx b/web/src/app/index.jsx index 9119300d9e1..4bc557ada2e 100644 --- a/web/src/app/index.jsx +++ b/web/src/app/index.jsx @@ -27,12 +27,12 @@ import Sessions from './components/sessions/main.jsx'; import TerminalHost from './components/terminal/terminalHost.jsx'; import PlayerHost from './components/player/playerHost.jsx'; import { MessagePage, NotFound } from './components/msgPage.jsx'; -import { ensureUser } from './modules/user/actions'; -import { initApp } from './modules/app/actions'; +import { ensureUser } from './flux/user/actions'; +import { initApp } from './flux/app/actions'; import cfg from './config'; import reactor from './reactor'; import DocumentTitle from './components/documentTitle'; -import './modules'; +import './flux'; // init session session.init(); diff --git a/web/src/app/common/dateUtils.js b/web/src/app/lib/dateUtils.js similarity index 96% rename from web/src/app/common/dateUtils.js rename to web/src/app/lib/dateUtils.js index 4b41a0eb0a9..8240123667d 100644 --- a/web/src/app/common/dateUtils.js +++ b/web/src/app/lib/dateUtils.js @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -var moment = require('moment'); +import moment from 'moment'; module.exports.weekRange = function(value = new Date()){ let startDate = moment(value).startOf('week').toDate(); diff --git a/web/src/app/common/logger.js b/web/src/app/lib/logger.js similarity index 100% rename from web/src/app/common/logger.js rename to web/src/app/lib/logger.js diff --git a/web/src/app/common/objectUtils.js b/web/src/app/lib/objectUtils.js similarity index 100% rename from web/src/app/common/objectUtils.js rename to web/src/app/lib/objectUtils.js diff --git a/web/src/app/common/patternUtils.js b/web/src/app/lib/patternUtils.js similarity index 100% rename from web/src/app/common/patternUtils.js rename to web/src/app/lib/patternUtils.js diff --git a/web/src/app/common/term/terminal.js b/web/src/app/lib/term/terminal.js similarity index 99% rename from web/src/app/common/term/terminal.js rename to web/src/app/lib/term/terminal.js index b43bebf817d..8644b2af51c 100644 --- a/web/src/app/common/term/terminal.js +++ b/web/src/app/lib/term/terminal.js @@ -20,7 +20,7 @@ var TtyEvents = require('./ttyEvents'); var {debounce, isNumber} = require('_'); var api = require('app/services/api'); -var logger = require('app/common/logger').create('terminal'); +var logger = require('app/lib/logger').create('terminal'); var $ = require('jQuery'); Term.colors[256] = '#252323'; diff --git a/web/src/app/common/term/tty.js b/web/src/app/lib/term/tty.js similarity index 100% rename from web/src/app/common/term/tty.js rename to web/src/app/lib/term/tty.js diff --git a/web/src/app/common/term/ttyEnums.js b/web/src/app/lib/term/ttyEnums.js similarity index 100% rename from web/src/app/common/term/ttyEnums.js rename to web/src/app/lib/term/ttyEnums.js diff --git a/web/src/app/common/term/ttyEvents.js b/web/src/app/lib/term/ttyEvents.js similarity index 100% rename from web/src/app/common/term/ttyEvents.js rename to web/src/app/lib/term/ttyEvents.js diff --git a/web/src/app/common/term/ttyPlayer.js b/web/src/app/lib/term/ttyPlayer.js similarity index 98% rename from web/src/app/common/term/ttyPlayer.js rename to web/src/app/lib/term/ttyPlayer.js index 99afa1544f3..1a4e7fc5c0c 100644 --- a/web/src/app/common/term/ttyPlayer.js +++ b/web/src/app/lib/term/ttyPlayer.js @@ -16,11 +16,11 @@ limitations under the License. var Tty = require('./tty'); var api = require('app/services/api'); -var {showError} = require('app/modules/notifications/actions'); +var {showError} = require('app/flux/notifications/actions'); var $ = require('jQuery'); var Buffer = require('buffer/').Buffer; -const logger = require('app/common/logger').create('TtyPlayer'); +const logger = require('app/lib/logger').create('TtyPlayer'); const STREAM_START_INDEX = 0; const PRE_FETCH_BUF_SIZE = 150; const URL_PREFIX_EVENTS = '/events'; diff --git a/web/src/app/services/auth.js b/web/src/app/services/auth.js index 7fa6d45c44c..fcccefe01a4 100644 --- a/web/src/app/services/auth.js +++ b/web/src/app/services/auth.js @@ -18,7 +18,7 @@ import api from './api'; import session from './session'; import cfg from 'app/config'; import $ from 'jQuery'; -import Logger from 'app/common/logger'; +import Logger from 'app/lib/logger'; // This puts it in window.u2f import 'u2f-api-polyfill'; diff --git a/web/src/app/services/session.js b/web/src/app/services/session.js index ca7f02dfa67..641322b47b8 100644 --- a/web/src/app/services/session.js +++ b/web/src/app/services/session.js @@ -17,7 +17,7 @@ limitations under the License. var { browserHistory, createMemoryHistory } = require('react-router'); var $ = require('jQuery'); -const logger = require('app/common/logger').create('services/sessions'); +const logger = require('app/lib/logger').create('services/sessions'); const AUTH_KEY_DATA = 'authData'; var _history = createMemoryHistory(); diff --git a/web/src/app/vendor.js b/web/src/app/vendor.js index 8f8c1ccc213..4f5457bad7d 100644 --- a/web/src/app/vendor.js +++ b/web/src/app/vendor.js @@ -14,26 +14,25 @@ See the License for the specific language governing permissions and limitations under the License. */ -require('jQuery'); -require('perfect-scrollbar/jquery'); -require('Terminal'); -require('_'); -require('bootstrap-sass/assets/javascripts/bootstrap'); -require('./../assets/js/jquery-validate'); -require('./../assets/js/datepicker'); - -require('buffer'); -require('classnames'); -require('keymirror'); -require('moment'); -require('nuclear-js'); -require('react'); -require('react-addons-linked-state-mixin'); -require('react-addons-pure-render-mixin'); -require('react-addons-transition-group'); -require('react-addons-css-transition-group'); -require('react-dom'); -require('react-router'); -require('react-slider'); -require('react-toastr'); -require('react-overlays'); +import 'jQuery'; +import 'perfect-scrollbar/jquery'; +import 'Terminal'; +import '_'; +import 'bootstrap-sass/assets/javascripts/bootstrap'; +import './../assets/js/jquery-validate'; +import './../assets/js/datepicker'; +import 'buffer'; +import 'classnames'; +import 'keymirror'; +import 'moment'; +import 'nuclear-js'; +import 'react'; +import 'react-addons-linked-state-mixin'; +import 'react-addons-pure-render-mixin'; +import 'react-addons-transition-group'; +import 'react-addons-css-transition-group'; +import 'react-dom'; +import 'react-router'; +import 'react-slider'; +import 'react-toastr'; +import 'react-overlays';