Merge branch 'next' into mongo_storage
This commit is contained in:
2
.profile
2
.profile
@@ -1,3 +1,5 @@
|
||||
export PS1='\e[1m\e[31m[\h] \e[32m($(docker-prompt)) \e[34m\u@$(hostname -i)\e[35m \w\e[0m\n$ '
|
||||
alias vi='vim'
|
||||
export PATH=$PATH:/root/go/bin
|
||||
cat /etc/motd
|
||||
echo $BASHPID > /var/run/cwd
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
FROM golang:1.8
|
||||
|
||||
# Copy the runtime dockerfile into the context as Dockerfile
|
||||
COPY Dockerfile.run /go/bin/Dockerfile
|
||||
COPY ./www /go/bin/www
|
||||
|
||||
COPY . /go/src/github.com/play-with-docker/play-with-docker
|
||||
|
||||
WORKDIR /go/src/github.com/play-with-docker/play-with-docker
|
||||
|
||||
@@ -1,8 +1,18 @@
|
||||
ARG VERSION=docker:17.05.0-ce-dind
|
||||
ARG VERSION=docker:17.06.0-ce-dind
|
||||
FROM ${VERSION}
|
||||
|
||||
RUN apk add --no-cache git tmux py2-pip apache2-utils vim build-base gettext-dev curl bash-completion bash util-linux jq openssh
|
||||
RUN apk add --no-cache git tmux py2-pip apache2-utils vim build-base gettext-dev curl bash-completion bash util-linux jq openssh qemu-img qemu-system-x86_64
|
||||
|
||||
ENV GOPATH /root/go
|
||||
ENV PATH $PATH:$GOPATH
|
||||
|
||||
# Use specific moby commit due to vendoring mismatch
|
||||
ENV MOBY_COMMIT="a73c3d3667f32fd61febcd2e824aa0341a57bafd"
|
||||
|
||||
RUN mkdir /root/go && apk add --no-cache go \
|
||||
&& go get -u -d github.com/moby/tool/cmd/moby && (cd $GOPATH/src/github.com/moby/tool/cmd/moby && git checkout $MOBY_COMMIT && go install) \
|
||||
&& go get -u github.com/linuxkit/linuxkit/src/cmd/linuxkit \
|
||||
&& rm -rf /root/go/pkg && rm -rf /root/go/src && rm -rf /usr/lib/go
|
||||
|
||||
# Compile and install httping
|
||||
# (used in orchestration workshop, and very useful anyway)
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
FROM alpine
|
||||
|
||||
RUN apk --update add ca-certificates
|
||||
RUN mkdir -p /app/pwd
|
||||
|
||||
ADD play-with-docker /app/play-with-docker
|
||||
COPY ./www /app/www
|
||||
|
||||
WORKDIR /app
|
||||
CMD ["./play-with-docker"]
|
||||
|
||||
EXPOSE 3000
|
||||
@@ -20,7 +20,7 @@ const (
|
||||
var NameFilter = regexp.MustCompile(PWDHostPortGroupRegex)
|
||||
var AliasFilter = regexp.MustCompile(AliasPortGroupRegex)
|
||||
|
||||
var SSLPortNumber, PortNumber, Key, Cert, SessionsFile, PWDContainerName, PWDCName, HashKey
|
||||
var SSLPortNumber, PortNumber, Key, Cert, SessionsFile, PWDContainerName, PWDCName, HashKey string
|
||||
var MaxLoadAvg float64
|
||||
|
||||
func ParseFlags() {
|
||||
|
||||
@@ -4,6 +4,7 @@ import (
|
||||
"io"
|
||||
"log"
|
||||
"net/http"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/gorilla/mux"
|
||||
)
|
||||
@@ -20,7 +21,10 @@ func FileUpload(rw http.ResponseWriter, req *http.Request) {
|
||||
|
||||
// has a url query parameter, ignore body
|
||||
if url := req.URL.Query().Get("url"); url != "" {
|
||||
err := core.InstanceUploadFromUrl(i, req.URL.Query().Get("url"))
|
||||
|
||||
_, fileName := filepath.Split(url)
|
||||
|
||||
err := core.InstanceUploadFromUrl(i, fileName, "", req.URL.Query().Get("url"))
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
rw.WriteHeader(http.StatusInternalServerError)
|
||||
@@ -35,6 +39,8 @@ func FileUpload(rw http.ResponseWriter, req *http.Request) {
|
||||
rw.WriteHeader(http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
path := req.URL.Query().Get("path")
|
||||
|
||||
for {
|
||||
p, err := red.NextPart()
|
||||
if err == io.EOF {
|
||||
@@ -48,12 +54,13 @@ func FileUpload(rw http.ResponseWriter, req *http.Request) {
|
||||
if p.FileName() == "" {
|
||||
continue
|
||||
}
|
||||
err = core.InstanceUploadFromReader(i, p.FileName(), p)
|
||||
err = core.InstanceUploadFromReader(i, p.FileName(), path, p)
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
rw.WriteHeader(http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
|
||||
log.Printf("Uploaded [%s] to [%s]\n", p.FileName(), i.Name)
|
||||
}
|
||||
rw.WriteHeader(http.StatusOK)
|
||||
|
||||
2
motd
2
motd
@@ -1,7 +1,7 @@
|
||||
###############################################################
|
||||
# WARNING!!!! #
|
||||
# This is a sandbox environment. Using personal credentials #
|
||||
# is HIGHLY! discouraged. Any consequences of doing so, are #
|
||||
# is HIGHLY! discouraged. Any consequences of doing so are #
|
||||
# completely the user's responsibilites. #
|
||||
# #
|
||||
# The PWD team. #
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package pwd
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"io"
|
||||
"log"
|
||||
@@ -66,10 +67,11 @@ func (p *pwd) InstanceAttachTerminal(instance *types.Instance) error {
|
||||
terms[instance.SessionId][instance.Name] = conn
|
||||
}
|
||||
io.Copy(encoder.Writer(sw), conn)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p *pwd) InstanceUploadFromUrl(instance *types.Instance, url string) error {
|
||||
func (p *pwd) InstanceUploadFromUrl(instance *types.Instance, fileName, dest string, url string) error {
|
||||
defer observeAction("InstanceUploadFromUrl", time.Now())
|
||||
log.Printf("Downloading file [%s]\n", url)
|
||||
resp, err := http.Get(url)
|
||||
@@ -81,9 +83,7 @@ func (p *pwd) InstanceUploadFromUrl(instance *types.Instance, url string) error
|
||||
return fmt.Errorf("Could not download file [%s]. Status code: %d\n", url, resp.StatusCode)
|
||||
}
|
||||
|
||||
_, fileName := filepath.Split(url)
|
||||
|
||||
copyErr := p.docker.CopyToContainer(instance.Name, "/var/run/pwd/uploads", fileName, resp.Body)
|
||||
copyErr := p.docker.CopyToContainer(instance.Name, dest, fileName, resp.Body)
|
||||
|
||||
if copyErr != nil {
|
||||
return fmt.Errorf("Error while downloading file [%s]. Error: %s\n", url, copyErr)
|
||||
@@ -92,10 +92,36 @@ func (p *pwd) InstanceUploadFromUrl(instance *types.Instance, url string) error
|
||||
return nil
|
||||
}
|
||||
|
||||
func (p *pwd) InstanceUploadFromReader(instance *types.Instance, fileName string, reader io.Reader) error {
|
||||
func (p *pwd) getInstanceCWD(instance *types.Instance) (string, error) {
|
||||
b := bytes.NewBufferString("")
|
||||
|
||||
if c, err := p.docker.ExecAttach(instance.Name, []string{"bash", "-c", `pwdx $(</var/run/cwd)`}, b); c > 0 {
|
||||
log.Println(b.String())
|
||||
return "", fmt.Errorf("Error %d trying to get CWD", c)
|
||||
} else if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
cwd := strings.TrimSpace(strings.Split(b.String(), ":")[1])
|
||||
|
||||
return cwd, nil
|
||||
}
|
||||
|
||||
func (p *pwd) InstanceUploadFromReader(instance *types.Instance, fileName, dest string, reader io.Reader) error {
|
||||
defer observeAction("InstanceUploadFromReader", time.Now())
|
||||
|
||||
copyErr := p.docker.CopyToContainer(instance.Name, "/var/run/pwd/uploads", fileName, reader)
|
||||
var finalDest string
|
||||
if filepath.IsAbs(dest) {
|
||||
finalDest = dest
|
||||
} else {
|
||||
if cwd, err := p.getInstanceCWD(instance); err != nil {
|
||||
return err
|
||||
} else {
|
||||
finalDest = fmt.Sprintf("%s/%s", cwd, dest)
|
||||
}
|
||||
}
|
||||
|
||||
copyErr := p.docker.CopyToContainer(instance.Name, finalDest, fileName, reader)
|
||||
|
||||
if copyErr != nil {
|
||||
return fmt.Errorf("Error while uploading file [%s]. Error: %s\n", fileName, copyErr)
|
||||
|
||||
@@ -61,8 +61,8 @@ type PWDApi interface {
|
||||
InstanceNew(session *types.Session, conf InstanceConfig) (*types.Instance, error)
|
||||
InstanceResizeTerminal(instance *types.Instance, cols, rows uint) error
|
||||
InstanceAttachTerminal(instance *types.Instance) error
|
||||
InstanceUploadFromUrl(instance *types.Instance, url string) error
|
||||
InstanceUploadFromReader(instance *types.Instance, filename string, reader io.Reader) error
|
||||
InstanceUploadFromUrl(instance *types.Instance, fileName, dest, url string) error
|
||||
InstanceUploadFromReader(instance *types.Instance, fileName, dest string, reader io.Reader) error
|
||||
InstanceGet(session *types.Session, name string) *types.Instance
|
||||
// TODO remove this function when we add the session prefix to the PWD url
|
||||
InstanceFindByIP(ip string) *types.Instance
|
||||
|
||||
@@ -5,6 +5,7 @@ import (
|
||||
"log"
|
||||
"math"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
@@ -154,13 +155,15 @@ func (p *pwd) SessionDeployStack(s *types.Session) error {
|
||||
log.Printf("Error creating instance for stack [%s]: %s\n", s.Stack, err)
|
||||
return err
|
||||
}
|
||||
err = p.InstanceUploadFromUrl(i, s.Stack)
|
||||
|
||||
_, fileName := filepath.Split(s.Stack)
|
||||
err = p.InstanceUploadFromUrl(i, fileName, "/var/run/pwd/uploads", s.Stack)
|
||||
if err != nil {
|
||||
log.Printf("Error uploading stack file [%s]: %s\n", s.Stack, err)
|
||||
return err
|
||||
}
|
||||
|
||||
fileName := path.Base(s.Stack)
|
||||
fileName = path.Base(s.Stack)
|
||||
file := fmt.Sprintf("/var/run/pwd/uploads/%s", fileName)
|
||||
cmd := fmt.Sprintf("docker swarm init --advertise-addr eth0 && docker-compose -f %s pull && docker stack deploy -c %s %s", file, file, s.StackName)
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
var app = angular.module('DockerPlay', ['ngMaterial']);
|
||||
var app = angular.module('DockerPlay', ['ngMaterial', 'ngFileUpload']);
|
||||
|
||||
// Automatically redirects user to a new session when bypassing captcha.
|
||||
// Controller keeps code/logic separate from the HTML
|
||||
@@ -19,7 +19,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
app.controller('PlayController', ['$scope', '$log', '$http', '$location', '$timeout', '$mdDialog', '$window', 'TerminalService', 'KeyboardShortcutService', 'InstanceService', 'SessionService', function($scope, $log, $http, $location, $timeout, $mdDialog, $window, TerminalService, KeyboardShortcutService, InstanceService, SessionService) {
|
||||
app.controller('PlayController', ['$scope', '$log', '$http', '$location', '$timeout', '$mdDialog', '$window', 'TerminalService', 'KeyboardShortcutService', 'InstanceService', 'SessionService', 'Upload', function($scope, $log, $http, $location, $timeout, $mdDialog, $window, TerminalService, KeyboardShortcutService, InstanceService, SessionService, Upload) {
|
||||
$scope.sessionId = SessionService.getCurrentSessionId();
|
||||
$scope.instances = [];
|
||||
$scope.idx = {};
|
||||
@@ -31,6 +31,30 @@
|
||||
$scope.newInstanceBtnText = '+ Add new instance';
|
||||
$scope.deleteInstanceBtnText = 'Delete';
|
||||
$scope.isInstanceBeingDeleted = false;
|
||||
$scope.uploadProgress = 0;
|
||||
|
||||
|
||||
$scope.uploadFiles = function (files, invalidFiles) {
|
||||
let total = files.length;
|
||||
let uploadFile = function() {
|
||||
let file = files.shift();
|
||||
if (!file){
|
||||
$scope.uploadMessage = "";
|
||||
$scope.uploadProgress = 0;
|
||||
return
|
||||
}
|
||||
$scope.uploadMessage = "Uploading file(s) " + (total - files.length) + "/"+ total + " : " + file.name;
|
||||
let upload = Upload.upload({url: '/sessions/' + $scope.sessionId + '/instances/' + $scope.selectedInstance.name + '/uploads', data: {file: file}, method: 'POST'})
|
||||
.then(function(){}, function(){}, function(evt) {
|
||||
$scope.uploadProgress = parseInt(100.0 * evt.loaded / evt.total);
|
||||
});
|
||||
|
||||
// process next file
|
||||
upload.finally(uploadFile);
|
||||
}
|
||||
|
||||
uploadFile();
|
||||
}
|
||||
|
||||
var selectedKeyboardShortcuts = KeyboardShortcutService.getCurrentShortcuts();
|
||||
|
||||
@@ -105,7 +129,7 @@
|
||||
|
||||
if (!state) {
|
||||
$mdDialog.show({
|
||||
controller: SessionBuilderModalController,
|
||||
onComplete: function(){SessionBuilderModalController($mdDialog, $scope)},
|
||||
contentElement: '#builderDialog',
|
||||
parent: angular.element(document.body),
|
||||
clickOutsideToClose: false,
|
||||
@@ -273,11 +297,6 @@
|
||||
|
||||
$scope.createBuilderTerminal = function() {
|
||||
var builderTerminalContainer = document.getElementById('builder-terminal');
|
||||
// For some reason the dialog DOM might not be ready, so we just keep trying
|
||||
if (!builderTerminalContainer) {
|
||||
setTimeout($scope.createBuilderTerminal, 100);
|
||||
return;
|
||||
}
|
||||
let term = new Terminal({
|
||||
cursorBlink: false
|
||||
});
|
||||
|
||||
72
www/assets/full_horizontal.svg
Normal file
72
www/assets/full_horizontal.svg
Normal file
@@ -0,0 +1,72 @@
|
||||
<svg viewBox="0 0 340 100" xmlns="http://www.w3.org/2000/svg">
|
||||
<style type="text/css">.st0{fill:#099CEC;}
|
||||
.st1{fill:#066DA5;}
|
||||
.st2{fill:#089CEC;}
|
||||
.st3{fill:#FFFFFF;}
|
||||
.st4{fill:#056BA2;}
|
||||
.st5{opacity:0.6;fill:#101E26;enable-background:new ;}
|
||||
.st6{opacity:0.1;fill:#101E26;enable-background:new ;}</style>
|
||||
|
||||
<title>full_horizontal</title>
|
||||
<desc>Created with Sketch.</desc>
|
||||
<g>
|
||||
<title>background</title>
|
||||
<rect fill="none" id="canvas_background" height="102" width="342" y="-1" x="-1"/>
|
||||
</g>
|
||||
<g>
|
||||
<title>Layer 1</title>
|
||||
<polygon points="58.62161469459534,32 69.6216299533844,32 69.6216299533844,42 58.62161469459534,42 " class="st0" id="Rectangle"/>
|
||||
<polygon points="71.6216299533844,32 82.6216299533844,32 82.6216299533844,42 71.6216299533844,42 " class="st0" id="Rectangle_1_"/>
|
||||
<polygon points="84.6216299533844,32 95.6216299533844,32 95.6216299533844,42 84.6216299533844,42 " class="st0" id="Rectangle_2_"/>
|
||||
<polygon points="97.6216299533844,32 108.6216299533844,32 108.6216299533844,42 97.6216299533844,42 " class="st0" id="Rectangle_3_"/>
|
||||
<polygon points="110.6216299533844,32 121.6216299533844,32 121.6216299533844,42 110.6216299533844,42 " class="st0" id="Rectangle_4_"/>
|
||||
<polygon points="71.6216299533844,20 82.6216299533844,20 82.6216299533844,30 71.6216299533844,30 " class="st0" id="Rectangle_5_"/>
|
||||
<polygon points="84.6216299533844,20 95.6216299533844,20 95.6216299533844,30 84.6216299533844,30 " class="st0" id="Rectangle_6_"/>
|
||||
<polygon points="97.6216299533844,20 108.6216299533844,20 108.6216299533844,30 97.6216299533844,30 " class="st0" id="Rectangle_7_"/>
|
||||
<polygon points="97.6216299533844,8 108.6216299533844,8 108.6216299533844,18 97.6216299533844,18 " class="st0" id="Rectangle_8_"/>
|
||||
<path d="m296.221621,53.4c-0.4,-0.4 -0.9,-0.7 -1.5,-0.9c-0.6,-0.2 -1.3,-0.4 -2,-0.5c-0.7,-0.1 -1.4,-0.1 -2,-0.1c-1.4,0 -2.8,0.2 -4,0.7c-1.3,0.5 -2.4,1.1 -3.5,2l0,-0.4c0,-0.6 -0.2,-1.1 -0.7,-1.6c-0.4,-0.4 -1,-0.7 -1.6,-0.7c-0.6,0 -1.2,0.2 -1.6,0.7c-0.4,0.4 -0.7,1 -0.7,1.6l0,19.6c0,0.6 0.2,1.1 0.7,1.6c0.4,0.4 1,0.7 1.6,0.7c0.6,0 1.1,-0.2 1.6,-0.7c0.4,-0.4 0.7,-1 0.7,-1.6l0,-9.8c0,-1 0.2,-2 0.6,-2.9c0.4,-0.9 0.9,-1.7 1.6,-2.4c0.7,-0.7 1.5,-1.2 2.4,-1.6c0.9,-0.4 1.9,-0.6 2.9,-0.6c1.1,0 2,0.2 2.9,0.5c0.4,0.2 0.7,0.2 0.9,0.2c0.3,0 0.6,-0.1 0.9,-0.2c0.3,-0.1 0.5,-0.3 0.7,-0.5c0.2,-0.2 0.4,-0.4 0.5,-0.7c0.1,-0.3 0.2,-0.6 0.2,-0.9c0,-0.6 -0.2,-1.1 -0.6,-1.5zm-38.8,8.3c0.2,-0.8 0.6,-1.5 1.1,-2.2c0.5,-0.7 1,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-2.2,-1.8 -4.7,-2.6 -7.5,-2.6c-3.3,0 -6.2,1.2 -8.5,3.5c-2.3,2.3 -3.5,5.2 -3.5,8.5s1.2,6.2 3.5,8.5s5.2,3.5 8.5,3.5c3.3,0 6.1,-1.2 8.5,-3.5c2.3,-2.3 3.5,-5.2 3.5,-8.5l0,-20c0,-0.6 -0.2,-1.2 -0.7,-1.6c-0.4,-0.5 -1,-0.7 -1.6,-0.7z" class="st1" id="Fill-1"/>
|
||||
<path d="m141.521621,34c-0.2,-4.3 -2.4,-7.9 -6.5,-11.1l-1.5,-1l-1,1.5c-2,3 -2.8,7 -2.5,10.6c0.2,2.2 1,4.7 2.5,6.5c-1.1,0.9 -4.7,2.6 -9.5,2.5l-71.5,0c-1.3,7.6 0.9,36.2 34,36.2c24.6,0 44.8,-11 54,-34.2c3,0 11.1,0.5 15,-7c0.1,-0.1 1,-2 1,-2l-1.5,-1c-2.2,-1.5 -8.2,-2.1 -12.5,-1z" class="st2" id="Shape"/>
|
||||
<path d="m58.621621,32l0,10l11,0l0,-10l-11,0zm-2,-2l15,0l0,14l-15,0l0,-14z" class="st1" id="Rectangle-38-Copy"/>
|
||||
<path d="m78.321621,65.8c-8.2,2.8 -16.9,3.2 -18.8,3.2c6.1,5.1 17,14.7 35,9.2c-3.3,-0.9 -11,-3.9 -16.2,-12.4z" class="st3" id="Fill-21"/>
|
||||
<path d="m77.421621,64c-3.9,2.2 -8.5,3.5 -13.3,3.5c-2.4,0 -4.8,-0.3 -7.1,-0.9c1.4,2.4 1.4,2.4 1.4,2.4c1.8,0.4 3.7,0.5 5.6,0.5c5.2,0 10,-1.4 14.3,-3.8c-0.3,-0.5 -0.6,-1.1 -0.9,-1.7z" class="st4" id="Shape_1_"/>
|
||||
<ellipse ry="3.5" rx="3.5" cy="59.2" cx="85.021621" class="st3" id="Oval"/>
|
||||
<path id="svg_1" d="m87.021621,59.1c-0.1,0.1 -0.3,0.1 -0.5,0.1c-0.6,0 -1,-0.5 -1,-1c0,-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0.6,4.1 1.9,8.2 3.9,11.8c5.2,9.3 14.6,14.8 29,14.8c25.2,0 44.3,-11.7 53.1,-33.6l0.3,-0.6l0.7,0c0.3,0 0.5,0 0.5,0c3,0.1 5,-0.1 7.1,-0.9c2.8,-1 4.9,-2.8 6.4,-5.6c0.1,-0.2 0.1,-0.2 0.2,-0.3c0.1,-0.2 0.2,-0.4 0.3,-0.6c0,-0.1 0.1,-0.2 0.1,-0.2l-0.7,-0.7z" class="st4" id="Shape_3_"/>
|
||||
<rect height="6" width="1" class="st1" y="34" x="60.621621" id="Rectangle-5"/>
|
||||
<rect height="6" width="1" class="st1" y="34" x="63.621621" id="Rectangle-5_1_"/>
|
||||
<rect height="6" width="1" class="st1" y="34" x="66.621621" id="Rectangle-5_2_"/>
|
||||
<path d="m71.621621,32l0,10l11,0l0,-10l-11,0zm-2,-2l15,0l0,14l-15,0l0,-14z" class="st1" id="Rectangle-38-Copy_1_"/>
|
||||
<rect height="6" width="1" class="st1" y="34" x="73.621621" id="Rectangle-5_3_"/>
|
||||
<rect height="6" width="1" class="st1" y="34" x="76.621621" id="Rectangle-5_4_"/>
|
||||
<rect height="6" width="1" class="st1" y="34" x="79.621621" id="Rectangle-5_5_"/>
|
||||
<path d="m84.621621,32l0,10l11,0l0,-10l-11,0zm-2,-2l15,0l0,14l-15,0l0,-14z" class="st1" id="Rectangle-38-Copy_2_"/>
|
||||
<rect height="6" width="1" class="st1" y="34" x="86.621621" id="Rectangle-5_6_"/>
|
||||
<rect height="6" width="1" class="st1" y="34" x="89.621621" id="Rectangle-5_7_"/>
|
||||
<rect height="6" width="1" class="st1" y="34" x="92.621621" id="Rectangle-5_8_"/>
|
||||
<path d="m97.621621,32l0,10l11,0l0,-10l-11,0zm-2,-2l15,0l0,14l-15,0l0,-14z" class="st1" id="Rectangle-38-Copy_3_"/>
|
||||
<rect height="6" width="1" class="st1" y="34" x="99.621621" id="Rectangle-5_9_"/>
|
||||
<rect height="6" width="1" class="st1" y="34" x="102.621621" id="Rectangle-5_10_"/>
|
||||
<rect height="6" width="1" class="st1" y="34" x="105.621621" id="Rectangle-5_11_"/>
|
||||
<path d="m110.621621,32l0,10l11,0l0,-10l-11,0zm-2,-2l15,0l0,14l-15,0l0,-14z" class="st1" id="Rectangle-38-Copy_4_"/>
|
||||
<rect height="6" width="1" class="st1" y="34" x="112.621621" id="Rectangle-5_12_"/>
|
||||
<rect height="6" width="1" class="st1" y="34" x="115.621621" id="Rectangle-5_13_"/>
|
||||
<rect height="6" width="1" class="st1" y="34" x="118.621621" id="Rectangle-5_14_"/>
|
||||
<path d="m71.621621,20l0,10l11,0l0,-10l-11,0zm-2,-2l15,0l0,14l-15,0l0,-14z" class="st1" id="Rectangle-38-Copy_5_"/>
|
||||
<rect height="6" width="1" class="st1" y="22" x="76.621621" id="Rectangle-5_15_"/>
|
||||
<rect height="6" width="1" class="st1" y="22" x="79.621621" id="Rectangle-5_16_"/>
|
||||
<path d="m84.621621,20l0,10l11,0l0,-10l-11,0zm-2,-2l15,0l0,14l-15,0l0,-14z" class="st1" id="Rectangle-38-Copy_6_"/>
|
||||
<rect height="6" width="1" class="st1" y="22" x="86.621621" id="Rectangle-5_17_"/>
|
||||
<rect height="6" width="1" class="st1" y="22" x="89.621621" id="Rectangle-5_18_"/>
|
||||
<rect height="6" width="1" class="st1" y="22" x="92.621621" id="Rectangle-5_19_"/>
|
||||
<path d="m97.621621,20l0,10l11,0l0,-10l-11,0zm-2,-2l15,0l0,14l-15,0l0,-14z" class="st1" id="Rectangle-38-Copy_7_"/>
|
||||
<rect height="6" width="1" class="st1" y="22" x="99.621621" id="Rectangle-5_20_"/>
|
||||
<rect height="6" width="1" class="st1" y="22" x="102.621621" id="Rectangle-5_21_"/>
|
||||
<rect height="6" width="1" class="st1" y="22" x="105.621621" id="Rectangle-5_22_"/>
|
||||
<path d="m97.621621,8l0,10l11,0l0,-10l-11,0zm-2,-2l15,0l0,14l-15,0l0,-14z" class="st1" id="Rectangle-38-Copy_8_"/>
|
||||
<rect height="6" width="1" class="st1" y="10" x="102.621621" id="Rectangle-5_23_"/>
|
||||
<rect height="6" width="1" class="st1" y="10" x="99.621621" id="Rectangle-5_24_"/>
|
||||
<rect height="6" width="1" class="st1" y="10" x="105.621621" id="Rectangle-5_25_"/>
|
||||
<rect height="6" width="1" class="st1" y="22" x="73.621621" id="Rectangle-5_26_"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 11 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 35 KiB |
@@ -35,6 +35,29 @@ md-card-content.terminal-container {
|
||||
margin-top: 50px;
|
||||
}
|
||||
|
||||
.uploadStatus .bottom-block {
|
||||
display: block;
|
||||
position: relative;
|
||||
background-color: rgba(255, 235, 169, 0.25);
|
||||
height: 30px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.uploadStatus .bottom-block > span {
|
||||
display: inline-block;
|
||||
padding: 8px;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
.uploadStatus {
|
||||
display: block;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
border: 2px solid #aad1f9;
|
||||
transition: opacity 0.1s linear;
|
||||
border-top: 0px;
|
||||
}
|
||||
|
||||
.disconnected {
|
||||
background-color: #FDF4B6;
|
||||
}
|
||||
@@ -62,3 +85,7 @@ md-input-container .md-errors-spacer {
|
||||
.md-mini {
|
||||
min-width: 24px;
|
||||
}
|
||||
|
||||
.dragover {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
@@ -41,6 +41,9 @@
|
||||
font-family: courier-new, courier, monospace;
|
||||
font-feature-settings: "liga" 0;
|
||||
position: relative;
|
||||
user-select: none;
|
||||
-ms-user-select: none;
|
||||
-webkit-user-select: none;
|
||||
}
|
||||
|
||||
.terminal.focus,
|
||||
@@ -71,7 +74,22 @@
|
||||
resize: none;
|
||||
}
|
||||
|
||||
.terminal .terminal-cursor {
|
||||
.terminal a {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.terminal a:hover {
|
||||
cursor: pointer;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.terminal a.xterm-invalid-link:hover {
|
||||
cursor: text;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.terminal.focus:not(.xterm-cursor-style-underline):not(.xterm-cursor-style-bar) .terminal-cursor {
|
||||
background-color: #fff;
|
||||
color: #000;
|
||||
}
|
||||
@@ -82,19 +100,41 @@
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.terminal.focus .terminal-cursor.blinking {
|
||||
animation: blink-cursor 1.2s infinite step-end;
|
||||
.terminal:not(.xterm-cursor-style-underline):not(.xterm-cursor-style-bar).focus.xterm-cursor-blink-on .terminal-cursor {
|
||||
background-color: transparent;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
@keyframes blink-cursor {
|
||||
0% {
|
||||
background-color: #fff;
|
||||
color: #000;
|
||||
}
|
||||
50% {
|
||||
background-color: transparent;
|
||||
color: #FFF;
|
||||
}
|
||||
.terminal.xterm-cursor-style-bar .terminal-cursor,
|
||||
.terminal.xterm-cursor-style-underline .terminal-cursor {
|
||||
position: relative;
|
||||
}
|
||||
.terminal.xterm-cursor-style-bar .terminal-cursor::before,
|
||||
.terminal.xterm-cursor-style-underline .terminal-cursor::before {
|
||||
content: "";
|
||||
display: block;
|
||||
position: absolute;
|
||||
background-color: #fff;
|
||||
}
|
||||
.terminal.xterm-cursor-style-bar .terminal-cursor::before {
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 1px;
|
||||
}
|
||||
.terminal.xterm-cursor-style-underline .terminal-cursor::before {
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 1px;
|
||||
}
|
||||
.terminal.xterm-cursor-style-bar.focus.xterm-cursor-blink.xterm-cursor-blink-on .terminal-cursor::before,
|
||||
.terminal.xterm-cursor-style-underline.focus.xterm-cursor-blink.xterm-cursor-blink-on .terminal-cursor::before {
|
||||
background-color: transparent;
|
||||
}
|
||||
.terminal.xterm-cursor-style-bar.focus.xterm-cursor-blink .terminal-cursor::before,
|
||||
.terminal.xterm-cursor-style-underline.focus.xterm-cursor-blink .terminal-cursor::before {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.terminal .composition-view {
|
||||
@@ -116,6 +156,11 @@
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.terminal .xterm-wide-char,
|
||||
.terminal .xterm-normal-char {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.terminal .xterm-rows {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
@@ -138,6 +183,25 @@
|
||||
left: -9999em;
|
||||
}
|
||||
|
||||
.terminal.enable-mouse-events {
|
||||
/* When mouse events are enabled (eg. tmux), revert to the standard pointer cursor */
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.terminal .xterm-selection {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 1;
|
||||
opacity: 0.3;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.terminal .xterm-selection div {
|
||||
position: absolute;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
/*
|
||||
* Determine default colors for xterm.js
|
||||
*/
|
||||
|
||||
9874
www/assets/xterm.js
9874
www/assets/xterm.js
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -72,7 +72,7 @@
|
||||
|
||||
<div flex></div>
|
||||
</md-content>
|
||||
<md-content flex layout="column" ng-repeat="instance in instances" ng-show="instance.name == selectedInstance.name">
|
||||
<md-content flex layout="column" ng-repeat="instance in instances" ng-show="instance.name == selectedInstance.name" ngf-drop class="drop-box" ngf-drag-over-class="'dragover'" ngf-max-size="100000000" ngf-change="uploadFiles($files, $invalidFiles)" ngf-multiple="true">
|
||||
<md-card class="stats" md-theme="default" md-theme-watch>
|
||||
<md-card-title>
|
||||
<md-card-title-text>
|
||||
@@ -107,6 +107,12 @@
|
||||
</md-card-actions>
|
||||
</md-card>
|
||||
<md-card flex md-theme="default" md-theme-watch >
|
||||
<div ng-show="uploadMessage" class="uploadStatus">
|
||||
<md-progress-linear md-mode="determinate" value="{{uploadProgress}}"></md-progress-linear>
|
||||
<div class="bottom-block">
|
||||
<span>{{uploadMessage}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<md-card-content flex id="terminal-{{instance.name}}" class="terminal-container">
|
||||
</md-card-content>
|
||||
</md-card>
|
||||
@@ -272,6 +278,9 @@
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular-messages.min.js"></script>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/angular_material/1.1.0/angular-material.min.js"></script>
|
||||
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/danialfarid-angular-file-upload/12.2.13/ng-file-upload-all.min.js" integrity="sha256-LrZq3efIkFX0BooX7x/rjWyYDvMKfFV2HJpy6HBw7cE=" crossorigin="anonymous"></script>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/1.7.3/socket.io.js"></script>
|
||||
<script src="/assets/app.js"></script>
|
||||
<script src="/assets/xterm.js"></script>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<input id="image_name" type="hidden" name="image_name" value=""/>
|
||||
<button id="create" style="display:none;">Create session</button>
|
||||
</form>
|
||||
<img src="/assets/large_h.png" />
|
||||
<img src="/assets/full_horizontal.svg" />
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
Reference in New Issue
Block a user