-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'rpl-refactoring/select-connections'
- Loading branch information
Showing
37 changed files
with
727 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<?xml version="1.0"?> | ||
|
||
<?xml-stylesheet href="chrome://global/skin/global.css"?> | ||
<?xml-stylesheet href="chrome://global/skin/findBar.css" type="text/css"?> | ||
<?xml-stylesheet href="chrome://browser/skin/devtools/widgets.css" type="text/css"?> | ||
|
||
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" | ||
xmlns:html="http://www.w3.org/1999/xhtml" | ||
id="rdpinspectorconnections" | ||
windowtype="RDPInspectorConnectionList" | ||
title="RDP Inspector - Connections" | ||
width="300" height="480" | ||
screenX="10" screenY="10" | ||
persist="screenX screenY width height sizemode"> | ||
|
||
<!-- Firefox Files --> | ||
<script xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" type="application/javascript;version=1.8" | ||
src="chrome://browser/content/devtools/theme-switching.js"/> | ||
<script type="application/x-javascript" src="chrome://global/content/globalOverlay.js"/> | ||
<script type="application/x-javascript" src="chrome://global/content/findBar.js"/> | ||
|
||
<!-- String Bundles --> | ||
<stringbundle id="bundle_findBar" src="chrome://global/locale/findbar.properties"/> | ||
|
||
<!-- Commands --> | ||
<commandset id="mainCommandSet"> | ||
<command id="cmd_find" oncommand="gFindBar.onFindCommand();"/> | ||
<command id="cmd_findAgain" oncommand="gFindBar.onFindAgainCmd();"/> | ||
<command id="cmd_findPrevious" oncommand="gFindBar.onFindPreviousCmd();"/> | ||
</commandset> | ||
|
||
<keyset id="mainKeyset"> | ||
<key id="key_find" key="f" command="cmd_find" modifiers="accel"/> | ||
</keyset> | ||
|
||
<!-- Application Content --> | ||
<vbox flex="1"> | ||
|
||
<!-- React UI Container --> | ||
<browser id="contentFrame" type="content-primary" flex="1" | ||
disablehistory="true" /> | ||
|
||
<!-- Search bar --> | ||
<findbar id="FindToolbar" browserid="contentFrame"/> | ||
|
||
<script type="application/x-javascript"> | ||
window.gFindBar = document.getElementById("FindToolbar"); | ||
</script> | ||
</vbox> | ||
</window> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# LOCALIZATION NOTE (rdpConnections.tab.LocalTabs, rdpConnections.tab.WebIDE) | ||
# A label for "Connect To..." window tabs. | ||
rdpConnections.tab.LocalTabs=Local Tabs | ||
rdpConnections.tab.WebIDE=WebIDE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/* See license.txt for terms of usage */ | ||
|
||
define(function(require, exports/*, module*/) { | ||
|
||
"use strict"; | ||
|
||
// ReactJS | ||
const React = require("react"); | ||
|
||
// React Bootstrap factories | ||
const { | ||
ListGroup, ListGroupItem, | ||
TabbedArea, TabPane | ||
} = require("shared/react-bootstrap-factories"); | ||
|
||
const ConnectionsGroup = React.createClass({ | ||
displayName: "ConnectionsGroup", | ||
|
||
render() { | ||
let connections = this.props.connections.map((conn) => { | ||
return ListGroupItem({ | ||
onClick: (evt) => { | ||
this.props.onConnectionClick(conn, evt); | ||
} | ||
}, conn.name); | ||
}); | ||
|
||
return ListGroup({ fill: true }, connections); | ||
} | ||
}); | ||
|
||
exports.ConnectionList = React.createClass({ | ||
displayName: "ConnectionList", | ||
|
||
render() { | ||
const connections = this.props.connections || {}; | ||
|
||
// turn the first level (connections group) into a ConnectionsGroups components | ||
const connectionsGroups = Object.keys(connections).map((groupName, i) => { | ||
return TabPane({ | ||
key: groupName, | ||
tab: connections[groupName].label, | ||
eventKey: i + 1, | ||
style: { overflow: "auto"} | ||
}, React.createElement(ConnectionsGroup, { | ||
onConnectionClick: this.props.onConnectionClick, | ||
connections: connections[groupName].connections | ||
})); | ||
}); | ||
|
||
return TabbedArea({ | ||
className: "mainTabbedArea", | ||
defaultActiveKey: 1, animation: false | ||
}, connectionsGroups); | ||
} | ||
}); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* See license.txt for terms of usage */ | ||
|
||
define(function(require, exports/*, module*/) { | ||
|
||
"use strict"; | ||
|
||
// ReactJS | ||
const React = require("react"); | ||
|
||
// Connections List components | ||
const { ConnectionList } = require("./connection-list"); | ||
|
||
exports.MainPanel = React.createClass({ | ||
displayName: "MainPanel", | ||
|
||
render() { | ||
return React.createElement(ConnectionList, { | ||
connections: this.props.connections, | ||
onConnectionClick: this.props.onConnectionClick | ||
}); | ||
} | ||
}); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* See license.txt for terms of usage */ | ||
|
||
/* globals requirejs */ | ||
|
||
// RequireJS configuration | ||
require.config({ | ||
baseUrl: ".", | ||
scriptType: "application/javascript;version=1.8", | ||
paths: { | ||
"shared": "../shared", | ||
"jquery": "../lib/jquery/jquery", | ||
"react": "../lib/react/react", | ||
"bootstrap": "../lib/bootstrap/js/bootstrap", | ||
"immutable": "../lib/immutable/immutable", | ||
"react-bootstrap": "../lib/react-bootstrap/react-bootstrap", | ||
"reps": "../../node_modules/firebug.sdk/lib/reps" | ||
} | ||
}); | ||
|
||
// Load the main panel module | ||
requirejs(["index"]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
|
||
<!-- Bootstrap default CSS --> | ||
<link href="../lib/bootstrap/css/bootstrap.css" rel="stylesheet"> | ||
|
||
<!-- Custom styles --> | ||
|
||
<link href="../inspector/css/base.css" rel="stylesheet"> | ||
<link href="../inspector/css/toolbox.css" rel="stylesheet"> | ||
<link href="../inspector/css/toolbar.css" rel="stylesheet"> | ||
<link href="../inspector/css/search-box.css" rel="stylesheet"> | ||
|
||
<link href="chrome://rdpinspector-firebug.sdk/skin/domTree.css" rel="stylesheet"> | ||
|
||
<!-- Load RequireJS config file as the entry point module --> | ||
<script data-main="config" src="../lib/requirejs/require.js"></script> | ||
</head> | ||
<body class="theme-firebug"> | ||
<div id="content"></div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* See license.txt for terms of usage */ | ||
|
||
define(function(require/*, exports, module*/) { | ||
|
||
"use strict"; | ||
|
||
const { RDPConnectionList } = require("shared/rdp-inspector-window"); | ||
var { Resizer } = require("shared/resizer"); | ||
|
||
const { MainPanel } = require("./components/main-panel"); | ||
|
||
// ReactJS | ||
var React = require("react"); | ||
|
||
function render() { | ||
let connections = RDPConnectionList.getConnectionsInfo(); | ||
|
||
return React.render( | ||
React.createElement(MainPanel, { | ||
connections, | ||
onConnectionClick: (conn) => { | ||
RDPConnectionList.openRDPInspectorWindow(conn); | ||
} | ||
}), | ||
document.querySelector("#content") | ||
); | ||
} | ||
|
||
let theApp = render(); | ||
RDPConnectionList.onConnectionsUpdated.addListener(render); | ||
|
||
/* eslint-disable no-new */ | ||
new Resizer(window, theApp); | ||
/* eslint-enable */ | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.