瀏覽代碼

HUE-634 remove unused files from Shell

Enrico Berti 13 年之前
父節點
當前提交
242d3a1653

+ 0 - 37
apps/shell/src/shell/static/bootstrap.js

@@ -1,37 +0,0 @@
-// Licensed to Cloudera, Inc. under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  Cloudera, Inc. licenses this file
-// to you 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.
-Hue.Desktop.register({
-	Shell : {
-		name : 'Shell',
-		//autolaunch: "/shell/",
-		css : '/shell/static/css/shell.css',
-		require: [ 'shell/Shell' ],
-		launch: function(path, options){
-			// application launch code here 
-			// example code below: 
-			return new Shell(path || '/shell/', options);
-		},
-		menu: {
-			id: 'hue-shell-menu',
-			img: {
-				// Replace this with a real icon!
-				// ideally a 55x55 transparent png
-				src: '/shell/static/art/shell.png'
-			}
-		},
-		help: '/help/shell/'
-	}
-});

+ 0 - 82
apps/shell/src/shell/static/css/shell.css

@@ -1,82 +0,0 @@
-/* 
-	shell styles
-	important: these should be namespaced
-	example:
-	let's say you are creating an app called "calculator"; you should prefix all your styles with your application's name like so
-	
-	.calculator img {
-		border: 1px solid #000;
-	}
-	.calculator p {
-		margin: 10px 0px;
-	}
-	etc...
-
-	other notes:
-	* don't use ids - there may be more than one of your apps open; use classes!
-	* the toolbar element is absolutely positioned and 100% wide (and therefor 0px high);
-	any elements inside it should also be absolutely positioned
-*/
-
-.shell img.shell_icon {
-	width: 55px;
-	height: 55px;
-	position: absolute;
-	top: 27px;
-	left: 3px;
-}
-
-.shell .Button .plus_button{
-	background: url("/static/art/icons/add.png");
-	height: 16px;
-	width: 16px;
-	float:left;
-	margin: 0px 5px 0px 0px;
-}
-
-.shell div.nav_menu{
-	position:absolute;
-	top: 37px;
-	left: 66px;
-}
-
-.shell .Button {
-	padding: 10px;
-	margin: 10px;
-}
-
-.shell .nav_button{
-	margin: -2px;
-}
-
-.shell textarea{
-	border-width:0px;
-	width:100%;
-	overflow:hidden;
-	outline:none;
-	padding:0px;
-	resize:none;
-}
-
-.shell li .Button {
-	display:block;
-	width: 100%;
-	font-size:1.25em;
-	margin-left:0px;
-}
-
-.shell span, .shell textarea{
-	font-family: monospace;
-	font-size: 14px;    
-}
-
-.shell .shell_container div{
-	width: 50%;
-	margin-left:25%;
-	background-color:#ffffff;
-	padding: 2px 10px;
-}
-
-.shell .hidden{
-	display: none;
-}

+ 0 - 235
apps/shell/src/shell/static/js/Source/Shell/Poller.js

@@ -1,235 +0,0 @@
-// Licensed to Cloudera, Inc. under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  Cloudera, Inc. licenses this file
-// to you 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.
-/*
----
-description: I/O functionality shared between instances of the Shell app.
-provides: [Poller]
-requires: [hue-shared/Hue.Request]
-script: Poller.js
-
-...
-*/
-
-var hueInstanceID = function() {
-	var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";
-	var lastIndex = chars.length - 1;
-	var stringLength = 128;
-	var randomString = "";
-	for (var i = 0; i < stringLength; i++) {
-		var randomIndex = $random(0, lastIndex);
-		randomString += chars.substring(randomIndex, randomIndex+1);
-	}
-	return randomString;
-}();
-
-Poller = {
-	initialize: function() {
-		this.outputReq = new Request.JSON({
-			method: 'post',
-			url: '/shell/retrieve_output',
-			onSuccess: this.outputReceived.bind(this),
-			onFailure: this.outputRequestFailed.bind(this),
-			headers: { "Hue-Instance-ID" : hueInstanceID }
-		});
-		this.addToOutputReq = new Request.JSON({
-			method: 'post',
-			url: '/shell/add_to_output',
-			onSuccess: this.addToOutputCompleted.bind(this),
-			onFailure: this.addToOutputFailed.bind(this),
-			headers: { "Hue-Instance-ID" : hueInstanceID }
-		});
-		this.numAdditionalReqsSent = 0;
-		this.additionalReqs = [];
-		this.addToOutputReqOpen = false;
-		this.requestOpen = false;
-		this.initialized = true;
-		this.requestsStopped = true;
-		this.dispatchInfo = {};
-		this.backoffTime = 1;
-	},
-
-	listenForShell: function(shellId, offset, callback) {
-		// One-time initialization
-		if (!this.initialized) {
-			this.initialize();
-		}
-
-		// Register the dispatch information for this shell ID.
-		this.dispatchInfo[shellId] = {callback:callback, offset:offset};
-
-		// If an output request is already open, use the secondary channel to add the new shell and
-		// offset to the existing output request.
-		if (this.requestOpen) {
-			this.addToOutputChannel(shellId, offset);
-		}
-		
-		// We might be between openOutputChannel calls, so check to see if we've stopped
-		// the requests or if we're just in between calls. If we've stopped, restart them.
-		if (this.requestsStopped) {
-			this.requestsStopped = false;
-			this.openOutputChannel();
-		}
-	},
-	
-	// Remove the dispatch info for the given shell id. We don't have to do a request.cancel() since
-	// either there's only 1 shell and we won't reissue once the request completes, or there are 
-	// multiple and we might want to reissue.
-	stopShellListener: function(shellId) {
-		this.dispatchInfo[shellId] = null;
-	},
-	
-	// Convert the information stored in this.dispatchInfo into the form that the backend speaks.
-	serializeShellData: function() {
-		var serializedShells = {};
-		var numShells = 0;
-		for (var shellId in this.dispatchInfo) {
-			var shellInfo = this.dispatchInfo[shellId];
-			if (shellInfo) {
-				numShells++;
-				serializedShells['shellId'+numShells] = shellId;
-				serializedShells['offset'+numShells] = shellInfo.offset;
-			}
-		}
-		serializedShells["numPairs"] = numShells;
-		return serializedShells;
-	},
-	
-	openOutputChannel: function() {
-		this.requestOpen = true;
-		var serializedData = this.serializeShellData();
-		this.outputReq.send({ data: serializedData });
-	},
-
-	outputRequestFailed: function() {
-		this.requestOpen = false;
-		setTimeout(this.openOutputChannel.bind(this), this.backoffTime);
-		this.backoffTime *= 2;
-	},
-	
-	outputReceived: function(json, text) {
-		this.requestOpen = false;
-		this.backoffTime = 1;
-
-		var closeOutputChannel = true; // Used to determine if we should issue a new output request.
-		if (json.periodicResponse) {
-			closeOutputChannel = false; // If it's just a "keep-alive", we should reissue.
-		}
-		
-		// The object we got back has a dictionary for every shell ID. We loop through the keys in the object.
-		for (var shellId in json) {
-			var shellInfo = this.dispatchInfo[shellId];
-			// For each key, see if we have any callbacks that are interested in that key. If not, then it
-			// either isn't a shell ID (so it's something like "periodicResponse") or it's a shell ID that 
-			// we no longer care about. That can occur when the user closes the instance of the shell app that
-			// we made this output request for.
-			if (shellInfo) {
-				// Let's pull out the data for this shell.
-				var result = json[shellId];
-				// If it's alive, or it has exited, we might have to reissue an output request. We might reissue
-				// if it's exited because there might be more output available.
-				if (result.alive || result.exited) {
-					//Let's update how far into the output stream we are.
-					shellInfo.offset = result.nextOffset;
-					// If it's not alive and no more output is available, then we stop listening for this shell.
-					if (!(result.alive || result.moreOutputAvailable)) {
-						this.stopShellListener(shellId);
-					}
-				} else {
-					//If it's neither alive nor exited, then we're in some error state, so we definitely stop
-					//listening for this shell
-					this.stopShellListener(shellId);
-				}
-				// Since there was output this one time, let's call the callback with the result for this shell.
-				shellInfo.callback(result);
-			}
-			
-			// Now let's check if we still care about this shell. If not, we'll have called
-			// stopShellListener on it and this.dispatchInfo[shellId] will be null.
-			if (this.dispatchInfo[shellId]) { 
-				closeOutputChannel = false; // We care still, so let's reissue an output req.
-			}
-		}
-
-		if (closeOutputChannel) {
-			//None of the shells in the response are still listening. Check to see if any other is.
-			for (var shellId in this.dispatchInfo) {
-				if (this.dispatchInfo[shellId]) {
-					closeOutputChannel = false; // >=1 shells are listening, so let's reissue
-				}
-			}
-		}
-
-		if (!closeOutputChannel) {
-			//can't use openOutputChannel.delay(0, this) here because it causes buggy behavior in Firefox.
-			setTimeout(this.openOutputChannel.bind(this), 0);
-		} else {
-			// Let's set this flag to true so that we can reopen the channel on the next listener.
-			this.requestsStopped = true;
-		}
-	},
-	
-	addToOutputChannel: function(shellId, offset) {
-		// First let's store the info
-		this.additionalReqs.push({shellId: shellId, offset: offset});
-		this.sendAdditionalReq();
-	},
-	
-	serializeAdditionalReqs: function() {
-		// Convert the additional things we need to register into our output channel into the
-		// same format as used for output requests.
-		var serializedData = {}
-		for (var i = 0; i < this.additionalReqs.length; i++) {
-			serializedData["shellId" + (i+1)] = this.additionalReqs[i].shellId;
-			serializedData["offset" + (i+1)] = this.additionalReqs[i].offset;
-		}
-		serializedData["numPairs"] = this.additionalReqs.length;
-		return serializedData;
-	},
-	
-	sendAdditionalReq: function() {
-		this.addToOutputReqOpen = true;
-		var serializedData = this.serializeAdditionalReqs();
-		this.numAdditionalReqsSent = this.additionalReqs.length;
-		this.addToOutputReq.send({ data: serializedData });
-	},
-	
-	addToOutputCompleted: function(json, text) {
-		this.backoffTime = 1;
-		this.addToOutputReqOpen = false;
-		if (json.success) {
-			this.additionalReqs.splice(0, this.numAdditionalReqsSent);
-			this.numAdditionalReqsSent = 0;
-			if (this.additionalReqs.length) {
-				this.sendAdditionalReq.delay(0, this);
-				setTimeout(this.sendAdditionalReq.bind(this), 0);
-			}
-		} else if (json.restartHue) {
-			alert("Your version of Hue is not up to date. Please restart your browser.");
-		} else if (json.notRunningSpawning) {
-			alert("The server is not running Spawning and cannot support the Shell app.");
-		} else {
-			this.numAdditionalReqsSent = 0;
-			setTimeout(this.sendAdditionalReq.bind(this), 0);
-		}
-	},
-	
-	addToOutputFailed: function() {
-		this.addToOutputReqOpen = false;
-		this.numAdditionalReqsSent = 0;
-		setTimeout(this.sendAdditionalReq.bind(this), this.backoffTime);
-		this.backoffTime *= 2;
-	}
-};

+ 0 - 450
apps/shell/src/shell/static/js/Source/Shell/Shell.js

@@ -1,450 +0,0 @@
-// Licensed to Cloudera, Inc. under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  Cloudera, Inc. licenses this file
-// to you 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.
-/*
----
-
-script: Shell.js
-
-description: Defines Shell; a Hue application that extends Hue.JBrowser.
-
-authors:
-- Hue
-
-requires: [JFrame/JFrame.Browser, hue-shared/Hue.Request, Core/Element, Core/Native, Poller, Core/Fx, hue-shared/Hue.Desktop]
-provides: [Shell]
-
-...
-*/
-ART.Sheet.define('window.art.browser.shell', {
-	'min-width': 620
-});
-
-(function() {
-	var expressions = [
-		{
-			expr: /&/gm,
-			replacement: '&amp;'
-		},
-		{
-			expr: /</gm,
-			replacement: '&lt;'
-		},
-		{
-			expr: />/gm,
-			replacement: '&gt;'
-		},
-		{
-			expr: /"/gm,
-			replacement: '&quot;'
-		},
-		{
-			expr: /\n/g,
-			replacement: "<br>"
-		}
-	];
-
-	String.implement({
-		escapeHTML: function() {
-			var cleaned = this;
-			expressions.each(function(expression) {
-				cleaned = cleaned.replace(expression.expr, expression.replacement);
-			});
-			return cleaned;
-		}
-	});
-})();
-
-var Shell = new Class({
-
-	Extends: Hue.JBrowser,
-	options: {
-		className: 'art browser logo_header shell',
-		displayHistory: false
-	},
-
-	initialize: function(path, options) {
-		this.parent(path || '/shell/', options);
-		if (this.options && this.options.shellId) {
-			this.shellId = options.shellId;
-		}
-		this.addEvent("load", this.startShell.bind(this));
-	},
-
-	startShell: function(view) {
-		var shellIdContainer = $(this).getElement('.shell_id');
-		if (shellIdContainer) {
-			this.shellId = shellIdContainer.get("text");
-		}
-
-		// Set up some state shared between "fresh" and "restored" shells.
-		this.previousCommands = [];
-		this.currentCommandIndex = -1;
-
-		this.jframe.markForCleanup(this.cleanUp.bind(this));
-		this.shellKilled = false;
-
-		this.background = $(this).getElement('.jframe_contents');
-		this.background.setStyle("background-color", "#ffffff");
-		this.container = $(this).getElement('.shell_container');
-		this.output = new Element('span');
-		this.input = new Element('textarea', {
-			events: {
-				keydown: this.handleKeyDown.bind(this),
-				keyup: this.resizeInput.bind(this)
-			},
-			spellcheck: false
-		});
-
-		this.inputExpander = new Fx.Morph(this.input, { duration:0, transition: Fx.Transitions.linear });
-
-		this.jframe.scroller.setOptions({
-			duration: 200
-		});
-
-		// The command-sending request.
-		this.commandReq = new Request.JSON({
-			method: 'post',
-			url: '/shell/process_command',
-			onSuccess: this.commandProcessed.bind(this)
-		});
-
-		if (this.shellId) {
-			this.startRestore(view);
-		} else {
-			this.setup(view);
-		}
-	},
-
-	startRestore: function(view) {
-		this.view = view;
-		this.restoreReq = new Request.JSON({
-			method: 'post',
-			url: '/shell/restore_shell',
-			onSuccess: this.restoreCompleted.bind(this),
-			onFailure: this.restoreFailed.bind(this)
-		});
-		var shellId = this.shellId;
-		this.restoreReq.send({
-			data: 'shellId='+shellId
-		});
-	},
-
-	restoreCompleted: function(json, text) {
-		this.restoreReq = null;
-		if (json.success) {
-			this.view = null;
-			this.nextOffset = json.nextOffset;
-			this.previousCommands = json.commands;
-			this.currentCommandIndex = this.previousCommands.length - 1;
-			this.jframe.collectElement(this.container);
-			this.container.empty();
-			this.setupTerminal(json.output);
-		} else if (json.notRunningSpawning) {
-			this.errorMessage("Error", "The currently running webserver does not support the Shell app. Please contact your admin.");
-		} else {
-			this.restoreFailed();
-		}
-	},
-
-	restoreFailed: function() {
-		this.restoreReq = null;
-		this.shellId = null;
-		var view = this.view;
-		this.view = null;
-		this.setup(view);
-	},
-
-	setupTerminal: function(initVal) {
-		// Set up the DOM
-		this.container.adopt([this.output, this.input]);
-
-		if (initVal) {
-			this.appendToOutput(initVal);
-
-			// Scroll the jframe and focus the input
-			this.jframe.scroller.toBottom();
-		}
-		this.focusInput();
-
-		// If the user clicks anywhere in the jframe, focus the textarea.
-		this.background.addEvent("click", this.focusInput.bind(this));
-		this.shellCreated = true;
-
-		// Register the shell we have with Poller, so we can be included in the output channel it has.
-		Hue.Desktop.store();
-		Poller.listenForShell(this.shellId, this.nextOffset, this.outputReceived.bind(this));
-	},
-
-	focusInput: function() {
-		if (!this.input.get("disabled")) {
-			this.input.focus();
-		}
-	},
-
-	setup: function(view) {
-		this.shellCreated = false;
-		var mainMenuButtons = $(this).getElements("a.menu_button");
-		mainMenuButtons.each(function(button) {
-			var keyName = button.nextSibling.get("text");
-			button.addEvent('click', this.handleShellSelection.bind(this, keyName));
-		}.bind(this));
-	},
-
-	handleShellSelection: function(keyName) {
-		this.registerReq = new Request.JSON({
-			method: 'post',
-			url: '/shell/create',
-			onSuccess: this.registerCompleted.bind(this),
-			onFailure: this.registerFailed.bind(this)
-		});
-		this.registerReq.send({ data: "keyName="+keyName });
-	},
-
-	resizeInput: function() {
-		var currHeight = this.input.getSize().y;
-		var scrollHeight = this.input.getScrollSize().y;
-		if (scrollHeight < currHeight) {
-			return;
-		}
-		// Credit to Philip Hutchison, http://pipwerks.com/2010/05/07/textareaexpander-class-for-mootools/
-		// for suggesting this way of resizing the input. It works really well. This idea is borrowed and
-		// modified from his MIT-licensed code.
-		this.inputExpander.start({ height: scrollHeight });
-	},
-
-	appendToOutput:function(text) {
-		this.output.set('html', this.output.get('html')+text.escapeHTML());
-	},
-
-	registerFailed: function() {
-		this.registerReq = null;
-		this.choices = null;
-		this.choicesText = null;
-		this.errorMessage('Error',"Error creating shell. Is the shell server running?");
-	},
-
-	registerCompleted: function(json, text) {
-		this.registerReq = null;
-		if (!json.success) {
-			if (json.shellCreateFailed) {
-				this.errorMessage('Error', 'Could not create any more shells. Please try again soon.');
-			} else if (json.notRunningSpawning) {
-				this.errorMessage("Error", "The currently running webserver does not support the Shell app. Please contact your admin.");
-			} else if (json.noSuchUser) {
-				this.errorMessage("Error", "The remote server does not have a Unix user with your username. Please contact your admin.");
-			} else if (json.shellNotAllowed) {
-				this.errorMessage("Error", "You do not have permission to create a Shell of this type. Please contact your admin to get permission.");
-			}
-		} else {
-			this.background.setStyle("background-color","#ffffff");
-			this.shellCreated = true;
-			this.shellId = json.shellId;
-			this.options.shellId = json.shellId;
-			this.nextOffset = 0;
-			this.jframe.collectElement(this.container);
-			this.container.empty();
-			this.setupTerminal();
-		}
-	},
-
-	showPreviousCommand: function() {
-		if (this.currentCommandIndex < 0 || this.currentCommandIndex >= this.previousCommands.length) {
-			this.currentCommandIndex = this.previousCommands.length-1;
-		}
-		var oldCommand = this.previousCommands[this.currentCommandIndex];
-		if (oldCommand) {
-			this.input.set('value', oldCommand);
-			this.currentCommandIndex--;
-			this.focusInput();
-		}
-	},
-
-	showNextCommand: function() {
-		if (this.currentCommandIndex < 0 || this.currentCommandIndex >= this.previousCommands.length) {
-			this.currentCommandIndex = this.previousCommands.length?0:-1;
-		}
-		var oldCommand = this.previousCommands[this.currentCommandIndex];
-		if (oldCommand) {
-			this.input.set('value', oldCommand);
-			this.currentCommandIndex++;
-			this.focusInput();
-		}
-	},
-
-	handleUpKey: function() {
-		var tempInputValue = this.tempInputValue;
-		this.tempInputValue = null;
-		if (tempInputValue === this.input.get("value")) {
-			this.showPreviousCommand();
-		}
-	},
-
-	handleDownKey: function() {
-		var tempInputValue = this.tempInputValue;
-		this.tempInputValue = null;
-		if (tempInputValue === this.input.get("value")) {
-			this.showNextCommand();
-		}
-	},
-
-	handleKeyDown: function(event) {
-		if (event.key=="enter") {
-			this.recordCommand();
-			this.sendCommand();
-		} else if (event.key=="up") {
-			this.tempInputValue = this.input.get("value");
-			// The delay is to deal with a problem differentiating "&" and "up" in Firefox.
-			this.handleUpKey.delay(5, this);
-		} else if (event.key=="down") {
-			this.tempInputValue = this.input.get("value");
-			// The delay is to deal with a problem differentiating "(" (left paren) and "down" in Firefox.
-			this.handleDownKey.delay(5, this);
-		} else if (event.key=="tab") {
-			event.stop();
-		}
-		this.resizeInput.delay(0, this);
-	},
-
-	recordCommand: function() {
-		var enteredCommand = this.input.get("value");
-		if (enteredCommand) {
-			if (this.previousCommands[this.previousCommands.length - 1] != enteredCommand) {
-				this.previousCommands.push(enteredCommand);
-				this.currentCommandIndex = this.previousCommands.length - 1;
-			}
-		}
-	},
-
-	sendCommand: function() {
-		var enteredCommand = this.input.get("value");
-		var shellId = this.shellId;
-		this.disableInput();
-		var dataToSend = {
-			lineToSend : enteredCommand,
-			shellId : shellId
-		};
-		this.commandReq.send({
-			data: dataToSend
-		});
-	},
-
-	commandProcessed: function(json, text) {
-		if (json.success) {
-			this.enableInput();
-			this.input.setStyle("height","auto");
-			this.input.set("value", "");
-		} else {
-			if (json.noShellExists) {
-				this.shellExited();
-			} else if (json.bufferExceeded) {
-				this.errorMessage("Error", "You have entered too many commands. Please try again.");
-			} else if (json.notRunningSpawning) {
-				this.errorMessage("Error", "The currently running webserver does not support the Shell app. Please contact your admin.");
-			}
-		}
-	},
-
-	outputReceived: function(json) {
-		if (json.alive || json.exited) {
-			this.appendToOutput(json.output);
-			this.jframe.scroller.toBottom();
-			if (json.exited) {
-				this.shellExited();
-			}
-		} else {
-			if (json.noShellExists) {
-				this.shellExited();
-			} else if (json.shellKilled) {
-				this.shellExited();
-			} else {
-				this.errorMessage('Error','Received invalid JSON response object from the Shell poller');
-			}
-		}
-	},
-
-	enableInput:function() {
-		this.input.set({
-			disabled: false,
-			styles: {
-				cursor: 'text',
-				display: ''
-			}
-		}).focus();
-	},
-
-	disableInput:function() {
-		this.input.set({
-			disabled: true,
-			styles: {
-				cursor: 'default',
-				display: 'none'
-			}
-		}).blur();
-	},
-
-	errorStatus:function() {
-		this.disableInput();
-		this.background.setStyle("background-color", "#cccccc");
-	},
-
-	errorMessage:function(title, message) {
-		this.errorStatus();
-		this.alert(title, message);
-	},
-
-	shellExited:function() {
-		this.errorStatus();
-		this.appendToOutput("\n[Process completed]");
-		this.shellKilled = true;
-	},
-
-	cleanUp:function() {
-		if (this.registerReq) {
-			this.registerReq.cancel();
-		}
-		if (this.restoreReq) {
-			this.restoreReq.cancel();
-		}
-		if (this.commandReq) {
-			this.commandReq.cancel();
-		}
-
-		//Clear out this.options.shellId and this.shellId, but save the value in a local variable
-		//for the purposes of this function.
-		this.options.shellId = null;
-		var shellId = this.shellId;
-		this.shellId = null;
-
-		//Tell the shell poller to stop listening for shellId. Important to do this before
-		//sending the kill shell request because then the resulting output doesn't cause
-		//a non-existent callback to be called.
-		if (shellId) {
-			Poller.stopShellListener(shellId);
-			if (this.shellCreated && !this.shellKilled) {
-				//A one-time request to tell the server to kill the subprocess if it's still alive.
-				var req = new Request.JSON({
-					method: 'post',
-					url: '/shell/kill_shell'
-				});
-				req.send({
-					data: 'shellId='+shellId
-				});
-			}
-		}
-		Hue.Desktop.store();
-	}
-
-});

+ 0 - 8
apps/shell/src/shell/static/js/package.yml

@@ -1,8 +0,0 @@
-copyright: Apache License v2.0
-version: 0.1
-description: Unknown
-name: shell
-sources: [
-Source/Shell/Shell.js,
-Source/Shell/Poller.js
-]