parent
972e4be811
commit
08d7b4babe
23 changed files with 1290 additions and 630 deletions
|
@ -982,6 +982,12 @@ a:focus {
|
|||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 1200px) {
|
||||
.co-dialog.wider .modal-dialog {
|
||||
width: 1000px;
|
||||
}
|
||||
}
|
||||
|
||||
.co-alert .co-step-bar {
|
||||
float: right;
|
||||
margin-top: 6px;
|
||||
|
@ -1477,4 +1483,94 @@ a:focus {
|
|||
color: #aaa;
|
||||
}
|
||||
|
||||
.co-dialog .co-tabs {
|
||||
width: auto;
|
||||
min-height: 400px;
|
||||
padding-top: 58px;
|
||||
}
|
||||
|
||||
.co-dialog .co-tabs li a {
|
||||
width: auto;
|
||||
height: 42px;
|
||||
line-height: 42px;
|
||||
text-align: left;
|
||||
font-size: 120%;
|
||||
white-space: nowrap;
|
||||
padding: 0px;
|
||||
padding-left: 16px;
|
||||
padding-right: 30px;
|
||||
color: #5A5A5A;
|
||||
}
|
||||
|
||||
.co-dialog .co-tabs li.active a, .co-dialog .co-tabs li.active a .fa {
|
||||
color: black;
|
||||
|
||||
filter: none !important;
|
||||
-webkit-filter: none !important;
|
||||
}
|
||||
|
||||
.co-dialog .co-tabs li a .fa {
|
||||
vertical-align: middle;
|
||||
margin-right: 10px;
|
||||
font-size: 20px;
|
||||
line-height: 20px;
|
||||
width: 20px;
|
||||
text-align: center;
|
||||
margin-top: -2px;
|
||||
}
|
||||
|
||||
.co-dialog .co-tabs li a .fa.icon {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
background-size: 20px;
|
||||
filter: grayscale(100%);
|
||||
-webkit-filter: grayscale(100%);
|
||||
}
|
||||
|
||||
|
||||
.co-dialog .co-tab-content {
|
||||
padding: 16px;
|
||||
padding-bottom: 30px;
|
||||
}
|
||||
|
||||
.co-dialog .co-tab-content h3 {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.co-dialog .co-tab-content label {
|
||||
margin-top: 24px;
|
||||
font-weight: bold;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.co-dialog .co-tab-content .help-text {
|
||||
margin-top: 7px;
|
||||
margin-left: 6px;
|
||||
color: #aaa;
|
||||
}
|
||||
|
||||
.co-dialog .co-tab-content .co-list-table {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.co-dialog .co-tab-content .co-list-table td:first-child {
|
||||
white-space: nowrap;
|
||||
vertical-align: middle;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.co-dialog .co-tabs li:first-child {
|
||||
border-top: 1px solid #DDE7ED;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 767px) {
|
||||
.co-dialog .co-tabs {
|
||||
min-height: 0px;
|
||||
padding-top: 0px;
|
||||
}
|
||||
|
||||
.co-dialog .co-tabs li a {
|
||||
line-height: 60px;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
|
|
32
static/css/directives/ui/credentials-dialog.css
Normal file
32
static/css/directives/ui/credentials-dialog.css
Normal file
|
@ -0,0 +1,32 @@
|
|||
.credentials-dialog-element .action-text {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.credentials-dialog-element .action-bar {
|
||||
list-style: none;
|
||||
padding: 0px;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.credentials-dialog-element .action-bar li {
|
||||
display: inline-block;
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
.credentials-dialog-element .action-bar li .fa {
|
||||
margin-right: 6px;
|
||||
}
|
||||
|
||||
|
||||
.credentials-dialog-element .viewing-file {
|
||||
margin-top: 10px;
|
||||
min-height: 200px;
|
||||
background: white;
|
||||
cursor: text;
|
||||
font-family: Consolas, "Lucida Console", Monaco, monospace;
|
||||
}
|
||||
|
||||
.credentials-dialog-element pre {
|
||||
margin-top: 20px;
|
||||
}
|
9
static/css/directives/ui/robot-credentials-dialog.css
Normal file
9
static/css/directives/ui/robot-credentials-dialog.css
Normal file
|
@ -0,0 +1,9 @@
|
|||
.robot-credentials-dialog-element .token-regenerated {
|
||||
margin-top: 10px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.robot-credentials-dialog-element .token-regenerated .fa {
|
||||
margin-right: 6px;
|
||||
color: #2FC98E;
|
||||
}
|
|
@ -3846,6 +3846,21 @@ i.rocket-icon {
|
|||
height: 16px;
|
||||
}
|
||||
|
||||
i.kubernetes-icon {
|
||||
background-image: url(/static/img/kubernetes.svg);
|
||||
background-size: 16px;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
background-position-y: -4px;
|
||||
}
|
||||
|
||||
i.mesos-icon {
|
||||
background-image: url(/static/img/mesos.svg);
|
||||
background-size: 16px;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
.external-notification-view-element {
|
||||
margin: 10px;
|
||||
padding: 6px;
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
<div class="co-tab-content tab-content col-md-11" ng-transclude></div>
|
168
static/directives/credentials-dialog.html
Normal file
168
static/directives/credentials-dialog.html
Normal file
|
@ -0,0 +1,168 @@
|
|||
<div class="credentials-dialog-element">
|
||||
<div class="modal fade co-dialog wider">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-body" ng-show="credentials.loading">
|
||||
<div class="cor-loader"></div>
|
||||
</div>
|
||||
<div class="co-tab-modal-body" ng-show="!credentials.loading">
|
||||
<div class="co-tab-panel">
|
||||
<!-- Tabs -->
|
||||
<div class="cor-tabs" remember-cookie="quay.credentialsTab">
|
||||
<span class="cor-tab" tab-active="true" tab-target="#cred-secret-{{ dialogID }}">
|
||||
<i class="fa" ng-class="entityIcon"></i> {{ secretTitle }}
|
||||
</span>
|
||||
|
||||
<span class="cor-tab" tab-target="#cred-kubernetes-{{ dialogID }}">
|
||||
<i class="fa kubernetes-icon icon"></i> Kubernetes Secret
|
||||
</span>
|
||||
|
||||
<span class="cor-tab" tab-target="#cred-rkt-{{ dialogID }}">
|
||||
<i class="fa rocket-icon icon"></i> rkt Configuration
|
||||
</span>
|
||||
|
||||
<span class="cor-tab" tab-target="#cred-docker-login-{{ dialogID }}">
|
||||
<i class="fa docker-icon icon"></i> Docker Login
|
||||
</span>
|
||||
|
||||
<span class="cor-tab" tab-target="#cred-docker-{{ dialogID }}">
|
||||
<i class="fa docker-icon icon"></i> Docker Configuration
|
||||
</span>
|
||||
|
||||
<span class="cor-tab" tab-target="#cred-mesos-{{ dialogID }}" quay-show="isDownloadSupported()">
|
||||
<i class="fa mesos-icon icon"></i> Mesos Credentials
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<!-- Tab contents -->
|
||||
<div class="cor-tab-content">
|
||||
<h3>
|
||||
Credentials for {{ credentials.username }}
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
</h3>
|
||||
|
||||
<div id="cred-secret-{{ dialogID }}" class="tab-pane active">
|
||||
<label>{{ secretTitle }}:</label>
|
||||
<div class="copy-box" value="credentials.password"></div>
|
||||
<div class="help-text">
|
||||
Username is {{ credentials.username }} and password is the {{ secretTitle }}
|
||||
</div>
|
||||
|
||||
<div ng-transclude/>
|
||||
</div>
|
||||
|
||||
<div id="cred-kubernetes-{{ dialogID }}" class="tab-pane">
|
||||
<label>Step 1: Download secret</label>
|
||||
<div class="action-text">First, download the Kubernetes pull secret for the {{ entityTitle }}:</div>
|
||||
<ul class="action-bar">
|
||||
<li><a ng-click="downloadFile(getKubernetesFile(credentials))" ng-if="isDownloadSupported()"><i class="fa fa-download"></i> Download {{ getKubernetesFilename(credentials) }}</li></a>
|
||||
<li><a ng-click="viewFile(k8s)"><i class="fa fa-code"></i> View {{ getKubernetesFilename(credentials) }}</li></a>
|
||||
</ul>
|
||||
|
||||
<textarea class="form-control viewing-file" ng-if="k8s.viewingFile" readonly>{{ getKubernetesFile(credentials).contents }}</textarea>
|
||||
|
||||
<label>Step 2: Submit</label>
|
||||
<div class="action-text">Second, submit the secret to the cluster using this command:</div>
|
||||
<div class="copy-box" value="'kubectl create -f ' + getKubernetesFilename(credentials) + ' --namespace=NAMESPACEHERE'"></div>
|
||||
|
||||
<label>Step 3: Update Kubernetes configuration</label>
|
||||
<div class="action-text">
|
||||
Finally, <a href="http://kubernetes.io/docs/user-guide/images/#specifying-imagepullsecrets-on-a-pod" ng-safenewtab>add a reference to the secret to your Kuberenetes pod config</a> via an <code>imagePullSecrets</code> field. For example:
|
||||
|
||||
<pre>
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: somepod
|
||||
namespace: all
|
||||
spec:
|
||||
containers:
|
||||
- name: web
|
||||
image: {{ Config.SERVER_HOSTNAME }}/{{ getNamespace(credentials) }}/somerepo
|
||||
<code style="font-weight: bold;">
|
||||
imagePullSecrets:
|
||||
- name: {{ getKubernetesSecretName(credentials) }}</code></pre>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="cred-mesos-{{ dialogID }}" class="tab-pane">
|
||||
<label>Step 1: Download credentials bundle</label>
|
||||
<div class="action-text">First, download the Docker credentials file as a bundle:</div>
|
||||
<ul class="action-bar">
|
||||
<li><a ng-click="downloadFile(getMesosFile(credentials))" ng-if="isDownloadSupported()"><i class="fa fa-download"></i> Download {{ getMesosFilename(credentials) }}</li></a>
|
||||
</ul>
|
||||
|
||||
<label>Step 2: Copy credentials bundle</label>
|
||||
<div class="action-text">
|
||||
Second, copy the credentials bundle file <strong>{{ getMesosFilename(credentials) }}</strong>
|
||||
into a location accessible to Mesos:
|
||||
</div>
|
||||
<div class="copy-box" value="'cp ' + getMesosFilename(credentials) + ' /etc/'"></div>
|
||||
|
||||
<label>Step 3: Update Mesos configuration</label>
|
||||
<div class="action-text">
|
||||
Finally, <a href="https://mesosphere.github.io/marathon/docs/native-docker-private-registry.html" ng-safenewtab>add a reference to the bundle to your Mesos config</a> via a <code>uris</code> field. For example:
|
||||
|
||||
<pre>
|
||||
{
|
||||
"id": "/some/name/or/id",
|
||||
"cpus": 1,
|
||||
"mem": 1024,
|
||||
"instances": 1,
|
||||
"container": {
|
||||
"type": "DOCKER",
|
||||
"docker": {
|
||||
"image": "{{ Config.SERVER_HOSTNAME }}/{{ getNamespace(credentials) }}/somerepo",
|
||||
"network": "HOST"
|
||||
}
|
||||
},
|
||||
<code style="font-weight: bold;">
|
||||
"uris": [
|
||||
"file:///etc/{{ getMesosFilename(credentials) }}"
|
||||
]</code>
|
||||
}</pre>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="cred-rkt-{{ dialogID }}" class="tab-pane">
|
||||
<label>Step 1: Download credentials config</label>
|
||||
<div class="action-text">First, download the rkt credentials file for the {{ entityTitle }}:</div>
|
||||
<ul class="action-bar">
|
||||
<li><a ng-click="downloadFile(getRktFile(credentials))" ng-if="isDownloadSupported()"><i class="fa fa-download"></i> Download {{ getRktFilename(credentials) }}</li></a>
|
||||
<li><a ng-click="viewFile(rkt)"><i class="fa fa-code"></i> View {{ getRktFilename(credentials) }}</li></a>
|
||||
</ul>
|
||||
|
||||
<textarea class="form-control viewing-file" ng-if="rkt.viewingFile" readonly>{{ getRktFile(credentials).contents }}</textarea>
|
||||
|
||||
<label>Step 2: Write to disk</label>
|
||||
<div class="action-text">Second, place the file in the rkt configuration directory:</div>
|
||||
<div class="copy-box" value="'mv ' + getRktFilename(credentials) + ' /etc/rkt/auth.d/'"></div>
|
||||
</div>
|
||||
|
||||
<div id="cred-docker-login-{{ dialogID }}" class="tab-pane">
|
||||
<label>Run docker login</label>
|
||||
<div class="action-text">Enter the following command on the command line:</div>
|
||||
<div class="copy-box" value="getDockerLogin(credentials)"></div>
|
||||
</div>
|
||||
|
||||
<div id="cred-docker-{{ dialogID }}" class="tab-pane">
|
||||
<label>Step 1: Download credentials config</label>
|
||||
<div class="action-text">First, download the Docker credentials file for the {{ entityTitle }}:</div>
|
||||
<ul class="action-bar">
|
||||
<li><a ng-click="downloadFile(getDockerFile(credentials))" ng-if="isDownloadSupported()"><i class="fa fa-download"></i> Download {{ getDockerFilename(credentials) }}</li></a>
|
||||
<li><a ng-click="viewFile(docker)"><i class="fa fa-code"></i> View {{ getDockerFilename(credentials) }}</li></a>
|
||||
</ul>
|
||||
|
||||
<textarea class="form-control viewing-file" ng-if="docker.viewingFile" readonly>{{ getDockerFile(credentials).contents }}</textarea>
|
||||
|
||||
<label>Step 2: Write to disk</label>
|
||||
<div class="action-text">Second, place the file in the Docker configuration directory. <strong>Note:</strong> This will <strong>overwrite</strong> existing credentials:</div>
|
||||
<div class="copy-box" value="'mv ' + getDockerFilename(credentials) + ' ~/.docker/config.json'"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /.co-tab-modal-body -->
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
</div>
|
|
@ -1,47 +0,0 @@
|
|||
<!-- Modal message dialog -->
|
||||
<div class="modal fade" id="dockerauthmodal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title">
|
||||
<span ng-transclude></span>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body token-dialog-body">
|
||||
<div class="alert alert-info">The docker <u>username</u> is <b>{{ username }}</b> and the <u>password</u> is the token below. You may use any value for email.</div>
|
||||
|
||||
<div class="well well-sm" ng-show="regenerating">
|
||||
Regenerating Token...
|
||||
<i class="fa fa-refresh fa-spin"></i>
|
||||
</div>
|
||||
|
||||
<div class="well well-sm" ng-show="!regenerating">
|
||||
<input id="token-view" class="token-view" type="text" value="{{ token }}" onClick="this.select();" readonly>
|
||||
<i class="fa fa-refresh" ng-show="supportsRegenerate" ng-click="askRegenerate()"
|
||||
data-title="Regenerate Token"
|
||||
data-placement="left"
|
||||
bs-tooltip></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer" ng-show="regenerating">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||
</div>
|
||||
<div class="modal-footer" ng-show="!regenerating">
|
||||
<span class="download-cfg" ng-show="isDownloadSupported()">
|
||||
<i class="fa fa-download"></i>
|
||||
<a ng-click="downloadCfg(shownRobot)">Download .dockercfg file</a>
|
||||
</span>
|
||||
<span class="download-cfg not-supported" ng-show="!isDownloadSupported()">
|
||||
.dockercfg download not supported in this browser
|
||||
</span>
|
||||
<div class="clipboard-copied-message" style="display: none">
|
||||
Copied
|
||||
</div>
|
||||
<input type="hidden" name="command-data" id="command-data" value="{{ command }}">
|
||||
<button id="copyClipboard" type="button" class="btn btn-primary" data-clipboard-target="command-data">Copy Login Command</button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||
</div>
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
|
@ -30,8 +30,11 @@
|
|||
<!-- Robot -->
|
||||
<span ng-if="entity.is_robot">
|
||||
<i class="fa ci-robot fa-lg"></i>
|
||||
<span class="entity-name anchor" href="{{ getRobotUrl(entity.name) }}"
|
||||
is-only-text="!getIsAdmin(getPrefix(entity.name))">
|
||||
<a class="entity-name" ng-if="getIsAdmin(getPrefix(entity.name))" ng-click="showRobotCredentials()">
|
||||
<span class="prefix">{{ getPrefix(entity.name) }}+</span>
|
||||
<span>{{ getShortenedName(entity.name) }}</span>
|
||||
</a>
|
||||
<span class="entity-name" ng-if="!getIsAdmin(getPrefix(entity.name))">
|
||||
<span class="prefix">{{ getPrefix(entity.name) }}+</span>
|
||||
<span>{{ getShortenedName(entity.name) }}</span>
|
||||
</span>
|
||||
|
@ -39,4 +42,6 @@
|
|||
</span>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
<div class="robot-credentials-dialog" info="robotToShow" ng-if="robotToShow"></div>
|
||||
</span>
|
||||
|
|
11
static/directives/robot-credentials-dialog.html
Normal file
11
static/directives/robot-credentials-dialog.html
Normal file
|
@ -0,0 +1,11 @@
|
|||
<div class="robot-credentials-dialog-element">
|
||||
<div class="credentials-dialog" credentials="credentials" secret-title="Robot Token" entity-title="robot account" entity-icon="ci-robot">
|
||||
<label>Regenerate Token:</label>
|
||||
<div class="action-text">Click the below to regenerate the token for this robot. Note that <strong>all existing logins</strong> of this robot account will become invalid.</div>
|
||||
<a ng-click="askRegenerateToken()" class="co-modify-link" ng-show="!showRegenerateToken">Regenerate Token</a>
|
||||
<button class="btn btn-warning" ng-click="regenerateToken()" ng-show="showRegenerateToken">Regenerate Token Now</button>
|
||||
<div ng-show="tokenRegenerated" class="token-regenerated">
|
||||
<i class="fa fa-check-circle"></i>Token successfully regenerated
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -134,8 +134,5 @@
|
|||
</table>
|
||||
</div>
|
||||
|
||||
<div class="docker-auth-dialog" username="shownRobot.name" token="shownRobot.token"
|
||||
shown="!!shownRobot" counter="showRobotCounter" supports-regenerate="true" regenerate="regenerateToken(username)">
|
||||
<i class="fa ci-robot"></i> {{ shownRobot.name }}
|
||||
</div>
|
||||
<div class="robot-credentials-dialog" info="robotDisplayInfo"></div>
|
||||
</div>
|
||||
|
|
112
static/img/kubernetes.svg
Normal file
112
static/img/kubernetes.svg
Normal file
|
@ -0,0 +1,112 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
<svg xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" width="744.09448819" height="1052.3622047" id="svg2" version="1.1" inkscape:version="0.48.3.1 r9886" sodipodi:docname="kubernetes_logo.svg" inkscape:export-filename="/home/thockin/Downloads/kubernetes.png" inkscape:export-xdpi="90" inkscape:export-ydpi="90" viewBox="0 0 744.09448819 1052.3622047">
|
||||
<defs id="defs4"/>
|
||||
<sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="0.75130096" inkscape:cx="423.88414" inkscape:cy="492.66426" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="false" inkscape:window-width="1519" inkscape:window-height="848" inkscape:window-x="73" inkscape:window-y="24" inkscape:window-maximized="0" inkscape:snap-global="false"/>
|
||||
<metadata id="metadata7">
|
||||
<rdf:RDF>
|
||||
<cc:Work rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
|
||||
<dc:title/>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g inkscape:label="Layer 1" inkscape:groupmode="layer" id="layer1">
|
||||
<g id="g3973">
|
||||
<path inkscape:export-ydpi="90" inkscape:export-xdpi="90" transform="matrix(-0.70423675,-1.1472157,1.1566815,-0.69847357,-57.760066,-127.50052)" inkscape:transform-center-y="-88.166574" inkscape:transform-center-x="85.453542" d="m -391.42855,129.50504 -168.04608,108.95128 -189.95655,-63.45371 -68.82586,-188.076755 104.1321,-171.074165 198.67647,-25.24924 143.61341,139.588871 z" inkscape:randomized="0" inkscape:rounded="0" inkscape:flatsided="true" sodipodi:arg2="0.99558779" sodipodi:arg1="0.54678884" sodipodi:r2="207.9371" sodipodi:r1="230.79279" sodipodi:cy="9.5050402" sodipodi:cx="-588.57141" sodipodi:sides="7" id="path3054" style="fill:#326de6;fill-opacity:1;stroke:#326de6;stroke-width:69;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" sodipodi:type="star"/>
|
||||
<g transform="translate(-0.97949518,-0.04249773)" id="g6172">
|
||||
<path transform="matrix(-0.05312297,-0.23127578,0.23112783,-0.05247783,269.21748,562.56174)" d="M 728,432.36218 C 728,830.0072 405.64502,1152.3622 8,1152.3622 c -397.64502,0 -720,-322.355 -720,-720.00002 0,-397.645017 322.35498,-720 720,-720 397.64502,0 720,322.354983 720,720 z" sodipodi:ry="720" sodipodi:rx="720" sodipodi:cy="432.36218" sodipodi:cx="8" id="path3847" style="fill:none;stroke:#ffffff;stroke-width:162.01495361;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" sodipodi:type="arc"/>
|
||||
<g id="g5927">
|
||||
<g transform="matrix(1,0,0,0.93883617,3.0146411,22.388286)" id="g4131">
|
||||
<g style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-opacity:1" id="g3892-2" transform="matrix(0.27453777,-3.262896e-5,2.8624424e-5,0.31011525,143.53725,308.78719)">
|
||||
<path sodipodi:nodetypes="ccccc" inkscape:connector-curvature="0" id="rect3851-5" d="m 751.73724,103.83546 68.45129,0.15616 4.29438,474.38067 -101.29515,0.88337 z" style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1.76751065;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1"/>
|
||||
<path sodipodi:nodetypes="ccccc" inkscape:connector-curvature="0" id="rect3851-4-35" d="m 866.65544,103.83523 -68.45129,0.15616 -4.29439,474.38067 101.29515,0.88337 z" style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1.76751065;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1"/>
|
||||
</g>
|
||||
<g id="g3303">
|
||||
<path transform="matrix(0.28575795,-3.1068327e-5,3.4122922e-5,0.33818241,134.39948,319.2262)" d="m 860.59216,-99.897148 c 0,28.265051 -22.91335,51.178402 -51.1784,51.178402 -28.26505,0 -51.1784,-22.913351 -51.1784,-51.178402 0,-28.265052 22.91335,-51.178402 51.1784,-51.178402 28.26505,0 51.1784,22.91335 51.1784,51.178402 z" sodipodi:ry="51.178402" sodipodi:rx="51.178402" sodipodi:cy="-99.897148" sodipodi:cx="809.41376" id="path3896-5" style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1.07997656;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" sodipodi:type="arc"/>
|
||||
<path sodipodi:nodetypes="cscccccc" inkscape:connector-curvature="0" id="path3898-37" d="m 351.07606,285.18762 c 0.001,1.36972 -0.0624,3.33785 -0.0163,4.65708 0.19262,5.5132 1.32752,9.74051 2.00662,14.81995 1.23028,10.87161 2.26477,19.8822 1.6286,28.25841 -0.57783,4.19204 -2.85742,5.84225 -4.76113,7.78258 l 23.06717,16.25738 -3.46339,-71.65344 z" style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:0.33545998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"/>
|
||||
<path sodipodi:nodetypes="cscccccc" inkscape:connector-curvature="0" id="path3898-37-3" d="m 380.31469,285.18762 c -10e-4,1.36972 0.0624,3.33785 0.0163,4.65708 -0.19262,5.5132 -1.32752,9.74051 -2.00662,14.81995 -1.23028,10.87161 -2.26477,19.8822 -1.6286,28.25841 0.57783,4.19204 2.85742,5.84225 4.76113,7.78258 l -23.06717,16.25738 3.46339,-71.65344 z" style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:0.33545998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"/>
|
||||
</g>
|
||||
</g>
|
||||
<path transform="matrix(0.80325602,-0.59012374,0.59264431,0.79983971,-119.57145,303.63055)" inkscape:transform-center-y="2.371582" inkscape:transform-center-x="-0.0016128867" d="m 266.04808,526.71903 -41.11138,-7.77869 -19.5509,-36.99211 16.7318,-38.34971 40.41512,-10.8292 33.66503,24.84592 1.56448,41.81155 z" inkscape:randomized="0" inkscape:rounded="0" inkscape:flatsided="true" sodipodi:arg2="1.7577959" sodipodi:arg1="1.3089969" sodipodi:r2="43.441673" sodipodi:r1="48.216618" sodipodi:cy="480.14536" sodipodi:cx="253.5687" sodipodi:sides="7" id="path4840" style="fill:none;stroke:#ffffff;stroke-width:38;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" sodipodi:type="star"/>
|
||||
<g transform="matrix(0.62348395,-0.78183615,0.73401606,0.58534928,-262.59282,502.41369)" id="g4131-6">
|
||||
<g style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-opacity:1" id="g3892-2-4" transform="matrix(0.27453777,-3.262896e-5,2.8624424e-5,0.31011525,143.53725,308.78719)">
|
||||
<path sodipodi:nodetypes="ccccc" inkscape:connector-curvature="0" id="rect3851-5-1" d="m 751.73724,103.83546 68.45129,0.15616 4.29438,474.38067 -101.29515,0.88337 z" style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1.76751065;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1"/>
|
||||
<path sodipodi:nodetypes="ccccc" inkscape:connector-curvature="0" id="rect3851-4-35-7" d="m 866.65544,103.83523 -68.45129,0.15616 -4.29439,474.38067 101.29515,0.88337 z" style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1.76751065;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1"/>
|
||||
</g>
|
||||
<g id="g3303-0">
|
||||
<path transform="matrix(0.28575795,-3.1068327e-5,3.4122922e-5,0.33818241,134.39948,319.2262)" d="m 860.59216,-99.897148 c 0,28.265051 -22.91335,51.178402 -51.1784,51.178402 -28.26505,0 -51.1784,-22.913351 -51.1784,-51.178402 0,-28.265052 22.91335,-51.178402 51.1784,-51.178402 28.26505,0 51.1784,22.91335 51.1784,51.178402 z" sodipodi:ry="51.178402" sodipodi:rx="51.178402" sodipodi:cy="-99.897148" sodipodi:cx="809.41376" id="path3896-5-0" style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1.07997656;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" sodipodi:type="arc"/>
|
||||
<path sodipodi:nodetypes="cscccccc" inkscape:connector-curvature="0" id="path3898-37-5" d="m 351.07606,285.18762 c 0.001,1.36972 -0.0624,3.33785 -0.0163,4.65708 0.19262,5.5132 1.32752,9.74051 2.00662,14.81995 1.23028,10.87161 2.26477,19.8822 1.6286,28.25841 -0.57783,4.19204 -2.85742,5.84225 -4.76113,7.78258 l 23.06717,16.25738 -3.46339,-71.65344 z" style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:0.33545998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"/>
|
||||
<path sodipodi:nodetypes="cscccccc" inkscape:connector-curvature="0" id="path3898-37-3-0" d="m 380.31469,285.18762 c -10e-4,1.36972 0.0624,3.33785 0.0163,4.65708 -0.19262,5.5132 -1.32752,9.74051 -2.00662,14.81995 -1.23028,10.87161 -2.26477,19.8822 -1.6286,28.25841 0.57783,4.19204 2.85742,5.84225 4.76113,7.78258 l -23.06717,16.25738 3.46339,-71.65344 z" style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:0.33545998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"/>
|
||||
</g>
|
||||
</g>
|
||||
<g transform="matrix(-0.22253552,-0.97492458,0.91529446,-0.2089244,-52.601372,1009.4621)" id="g4131-8">
|
||||
<g style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-opacity:1" id="g3892-2-5" transform="matrix(0.27453777,-3.262896e-5,2.8624424e-5,0.31011525,143.53725,308.78719)">
|
||||
<path sodipodi:nodetypes="ccccc" inkscape:connector-curvature="0" id="rect3851-5-7" d="m 751.73724,103.83546 68.45129,0.15616 4.29438,474.38067 -101.29515,0.88337 z" style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1.76751065;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1"/>
|
||||
<path sodipodi:nodetypes="ccccc" inkscape:connector-curvature="0" id="rect3851-4-35-5" d="m 866.65544,103.83523 -68.45129,0.15616 -4.29439,474.38067 101.29515,0.88337 z" style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1.76751065;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1"/>
|
||||
</g>
|
||||
<g id="g3303-4">
|
||||
<path transform="matrix(0.28575795,-3.1068327e-5,3.4122922e-5,0.33818241,134.39948,319.2262)" d="m 860.59216,-99.897148 c 0,28.265051 -22.91335,51.178402 -51.1784,51.178402 -28.26505,0 -51.1784,-22.913351 -51.1784,-51.178402 0,-28.265052 22.91335,-51.178402 51.1784,-51.178402 28.26505,0 51.1784,22.91335 51.1784,51.178402 z" sodipodi:ry="51.178402" sodipodi:rx="51.178402" sodipodi:cy="-99.897148" sodipodi:cx="809.41376" id="path3896-5-2" style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1.07997656;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" sodipodi:type="arc"/>
|
||||
<path sodipodi:nodetypes="cscccccc" inkscape:connector-curvature="0" id="path3898-37-7" d="m 351.07606,285.18762 c 0.001,1.36972 -0.0624,3.33785 -0.0163,4.65708 0.19262,5.5132 1.32752,9.74051 2.00662,14.81995 1.23028,10.87161 2.26477,19.8822 1.6286,28.25841 -0.57783,4.19204 -2.85742,5.84225 -4.76113,7.78258 l 23.06717,16.25738 -3.46339,-71.65344 z" style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:0.33545998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"/>
|
||||
<path sodipodi:nodetypes="cscccccc" inkscape:connector-curvature="0" id="path3898-37-3-5" d="m 380.31469,285.18762 c -10e-4,1.36972 0.0624,3.33785 0.0163,4.65708 -0.19262,5.5132 -1.32752,9.74051 -2.00662,14.81995 -1.23028,10.87161 -2.26477,19.8822 -1.6286,28.25841 0.57783,4.19204 2.85742,5.84225 4.76113,7.78258 l -23.06717,16.25738 3.46339,-71.65344 z" style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:0.33545998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"/>
|
||||
</g>
|
||||
</g>
|
||||
<g transform="matrix(-0.90097861,-0.43386351,0.40732676,-0.84587131,474.49429,1161.5866)" id="g4131-6-8">
|
||||
<g style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-opacity:1" id="g3892-2-4-6" transform="matrix(0.27453777,-3.262896e-5,2.8624424e-5,0.31011525,143.53725,308.78719)">
|
||||
<path sodipodi:nodetypes="ccccc" inkscape:connector-curvature="0" id="rect3851-5-1-8" d="m 751.73724,103.83546 68.45129,0.15616 4.29438,474.38067 -101.29515,0.88337 z" style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1.76751065;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1"/>
|
||||
<path sodipodi:nodetypes="ccccc" inkscape:connector-curvature="0" id="rect3851-4-35-7-3" d="m 866.65544,103.83523 -68.45129,0.15616 -4.29439,474.38067 101.29515,0.88337 z" style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1.76751065;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1"/>
|
||||
</g>
|
||||
<g id="g3303-0-7">
|
||||
<path transform="matrix(0.28575795,-3.1068327e-5,3.4122922e-5,0.33818241,134.39948,319.2262)" d="m 860.59216,-99.897148 c 0,28.265051 -22.91335,51.178402 -51.1784,51.178402 -28.26505,0 -51.1784,-22.913351 -51.1784,-51.178402 0,-28.265052 22.91335,-51.178402 51.1784,-51.178402 28.26505,0 51.1784,22.91335 51.1784,51.178402 z" sodipodi:ry="51.178402" sodipodi:rx="51.178402" sodipodi:cy="-99.897148" sodipodi:cx="809.41376" id="path3896-5-0-4" style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1.07997656;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" sodipodi:type="arc"/>
|
||||
<path sodipodi:nodetypes="cscccccc" inkscape:connector-curvature="0" id="path3898-37-5-6" d="m 351.07606,285.18762 c 0.001,1.36972 -0.0624,3.33785 -0.0163,4.65708 0.19262,5.5132 1.32752,9.74051 2.00662,14.81995 1.23028,10.87161 2.26477,19.8822 1.6286,28.25841 -0.57783,4.19204 -2.85742,5.84225 -4.76113,7.78258 l 23.06717,16.25738 -3.46339,-71.65344 z" style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:0.33545998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"/>
|
||||
<path sodipodi:nodetypes="cscccccc" inkscape:connector-curvature="0" id="path3898-37-3-0-4" d="m 380.31469,285.18762 c -10e-4,1.36972 0.0624,3.33785 0.0163,4.65708 -0.19262,5.5132 -1.32752,9.74051 -2.00662,14.81995 -1.23028,10.87161 -2.26477,19.8822 -1.6286,28.25841 0.57783,4.19204 2.85742,5.84225 4.76113,7.78258 l -23.06717,16.25738 3.46339,-71.65344 z" style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:0.33545998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"/>
|
||||
</g>
|
||||
</g>
|
||||
<g transform="matrix(-0.90095588,0.4339107,-0.40737106,-0.84584997,921.98234,844.00136)" id="g4131-6-2">
|
||||
<g style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-opacity:1" id="g3892-2-4-4" transform="matrix(0.27453777,-3.262896e-5,2.8624424e-5,0.31011525,143.53725,308.78719)">
|
||||
<path sodipodi:nodetypes="ccccc" inkscape:connector-curvature="0" id="rect3851-5-1-3" d="m 751.73724,103.83546 68.45129,0.15616 4.29438,474.38067 -101.29515,0.88337 z" style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1.76751065;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1"/>
|
||||
<path sodipodi:nodetypes="ccccc" inkscape:connector-curvature="0" id="rect3851-4-35-7-4" d="m 866.65544,103.83523 -68.45129,0.15616 -4.29439,474.38067 101.29515,0.88337 z" style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1.76751065;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1"/>
|
||||
</g>
|
||||
<g id="g3303-0-4">
|
||||
<path transform="matrix(0.28575795,-3.1068327e-5,3.4122922e-5,0.33818241,134.39948,319.2262)" d="m 860.59216,-99.897148 c 0,28.265051 -22.91335,51.178402 -51.1784,51.178402 -28.26505,0 -51.1784,-22.913351 -51.1784,-51.178402 0,-28.265052 22.91335,-51.178402 51.1784,-51.178402 28.26505,0 51.1784,22.91335 51.1784,51.178402 z" sodipodi:ry="51.178402" sodipodi:rx="51.178402" sodipodi:cy="-99.897148" sodipodi:cx="809.41376" id="path3896-5-0-0" style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1.07997656;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" sodipodi:type="arc"/>
|
||||
<path sodipodi:nodetypes="cscccccc" inkscape:connector-curvature="0" id="path3898-37-5-1" d="m 351.07606,285.18762 c 0.001,1.36972 -0.0624,3.33785 -0.0163,4.65708 0.19262,5.5132 1.32752,9.74051 2.00662,14.81995 1.23028,10.87161 2.26477,19.8822 1.6286,28.25841 -0.57783,4.19204 -2.85742,5.84225 -4.76113,7.78258 l 23.06717,16.25738 -3.46339,-71.65344 z" style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:0.33545998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"/>
|
||||
<path sodipodi:nodetypes="cscccccc" inkscape:connector-curvature="0" id="path3898-37-3-0-9" d="m 380.31469,285.18762 c -10e-4,1.36972 0.0624,3.33785 0.0163,4.65708 -0.19262,5.5132 -1.32752,9.74051 -2.00662,14.81995 -1.23028,10.87161 -2.26477,19.8822 -1.6286,28.25841 0.57783,4.19204 2.85742,5.84225 4.76113,7.78258 l -23.06717,16.25738 3.46339,-71.65344 z" style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:0.33545998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"/>
|
||||
</g>
|
||||
</g>
|
||||
<g transform="matrix(-0.22248447,0.97493623,-0.9153054,-0.20887646,952.77435,296.05397)" id="g4131-8-4">
|
||||
<g style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-opacity:1" id="g3892-2-5-6" transform="matrix(0.27453777,-3.262896e-5,2.8624424e-5,0.31011525,143.53725,308.78719)">
|
||||
<path sodipodi:nodetypes="ccccc" inkscape:connector-curvature="0" id="rect3851-5-7-0" d="m 751.73724,103.83546 68.45129,0.15616 4.29438,474.38067 -101.29515,0.88337 z" style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1.76751065;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1"/>
|
||||
<path sodipodi:nodetypes="ccccc" inkscape:connector-curvature="0" id="rect3851-4-35-5-4" d="m 866.65544,103.83523 -68.45129,0.15616 -4.29439,474.38067 101.29515,0.88337 z" style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1.76751065;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1"/>
|
||||
</g>
|
||||
<g id="g3303-4-3">
|
||||
<path transform="matrix(0.28575795,-3.1068327e-5,3.4122922e-5,0.33818241,134.39948,319.2262)" d="m 860.59216,-99.897148 c 0,28.265051 -22.91335,51.178402 -51.1784,51.178402 -28.26505,0 -51.1784,-22.913351 -51.1784,-51.178402 0,-28.265052 22.91335,-51.178402 51.1784,-51.178402 28.26505,0 51.1784,22.91335 51.1784,51.178402 z" sodipodi:ry="51.178402" sodipodi:rx="51.178402" sodipodi:cy="-99.897148" sodipodi:cx="809.41376" id="path3896-5-2-2" style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1.07997656;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" sodipodi:type="arc"/>
|
||||
<path sodipodi:nodetypes="cscccccc" inkscape:connector-curvature="0" id="path3898-37-7-0" d="m 351.07606,285.18762 c 0.001,1.36972 -0.0624,3.33785 -0.0163,4.65708 0.19262,5.5132 1.32752,9.74051 2.00662,14.81995 1.23028,10.87161 2.26477,19.8822 1.6286,28.25841 -0.57783,4.19204 -2.85742,5.84225 -4.76113,7.78258 l 23.06717,16.25738 -3.46339,-71.65344 z" style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:0.33545998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"/>
|
||||
<path sodipodi:nodetypes="cscccccc" inkscape:connector-curvature="0" id="path3898-37-3-5-9" d="m 380.31469,285.18762 c -10e-4,1.36972 0.0624,3.33785 0.0163,4.65708 -0.19262,5.5132 -1.32752,9.74051 -2.00662,14.81995 -1.23028,10.87161 -2.26477,19.8822 -1.6286,28.25841 0.57783,4.19204 2.85742,5.84225 4.76113,7.78258 l -23.06717,16.25738 3.46339,-71.65344 z" style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:0.33545998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"/>
|
||||
</g>
|
||||
</g>
|
||||
<g transform="matrix(0.6235249,0.78180349,-0.7339854,0.58538773,543.87371,-69.694532)" id="g4131-6-8-9">
|
||||
<g style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-opacity:1" id="g3892-2-4-6-1" transform="matrix(0.27453777,-3.262896e-5,2.8624424e-5,0.31011525,143.53725,308.78719)">
|
||||
<path sodipodi:nodetypes="ccccc" inkscape:connector-curvature="0" id="rect3851-5-1-8-0" d="m 751.73724,103.83546 68.45129,0.15616 4.29438,474.38067 -101.29515,0.88337 z" style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1.76751065;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1"/>
|
||||
<path sodipodi:nodetypes="ccccc" inkscape:connector-curvature="0" id="rect3851-4-35-7-3-9" d="m 866.65544,103.83523 -68.45129,0.15616 -4.29439,474.38067 101.29515,0.88337 z" style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1.76751065;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1"/>
|
||||
</g>
|
||||
<g id="g3303-0-7-8">
|
||||
<path transform="matrix(0.28575795,-3.1068327e-5,3.4122922e-5,0.33818241,134.39948,319.2262)" d="m 860.59216,-99.897148 c 0,28.265051 -22.91335,51.178402 -51.1784,51.178402 -28.26505,0 -51.1784,-22.913351 -51.1784,-51.178402 0,-28.265052 22.91335,-51.178402 51.1784,-51.178402 28.26505,0 51.1784,22.91335 51.1784,51.178402 z" sodipodi:ry="51.178402" sodipodi:rx="51.178402" sodipodi:cy="-99.897148" sodipodi:cx="809.41376" id="path3896-5-0-4-9" style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1.07997656;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" sodipodi:type="arc"/>
|
||||
<path sodipodi:nodetypes="cscccccc" inkscape:connector-curvature="0" id="path3898-37-5-6-0" d="m 351.07606,285.18762 c 0.001,1.36972 -0.0624,3.33785 -0.0163,4.65708 0.19262,5.5132 1.32752,9.74051 2.00662,14.81995 1.23028,10.87161 2.26477,19.8822 1.6286,28.25841 -0.57783,4.19204 -2.85742,5.84225 -4.76113,7.78258 l 23.06717,16.25738 -3.46339,-71.65344 z" style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:0.33545998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"/>
|
||||
<path sodipodi:nodetypes="cscccccc" inkscape:connector-curvature="0" id="path3898-37-3-0-4-4" d="m 380.31469,285.18762 c -10e-4,1.36972 0.0624,3.33785 0.0163,4.65708 -0.19262,5.5132 -1.32752,9.74051 -2.00662,14.81995 -1.23028,10.87161 -2.26477,19.8822 -1.6286,28.25841 0.57783,4.19204 2.85742,5.84225 4.76113,7.78258 l -23.06717,16.25738 3.46339,-71.65344 z" style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:0.33545998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g id="g6152">
|
||||
<path inkscape:connector-curvature="0" id="rect6068" d="m 345.7441,464.40625 c -0.29134,6.86335 -5.93996,12.34375 -12.875,12.34375 -2.84081,0 -5.46294,-0.91229 -7.59375,-2.46875 l -3.34375,1.59375 6.84375,14.15625 30,-14.46875 -6.8125,-14.15625 -6.21875,3 z" style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:0;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"/>
|
||||
<path id="rect6068-7" d="m 296.78003,510.10489 c 5.18437,4.50697 5.94732,12.34021 1.62344,17.76227 -1.7712,2.22105 -4.11932,3.70233 -6.66474,4.39784 l -0.83873,3.60795 15.33484,3.4755 7.39233,-32.47612 -15.31536,-3.49993 -1.53178,6.73249 z" style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:0;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" inkscape:connector-curvature="0"/>
|
||||
<path id="rect6068-0" d="m 301.92455,576.84686 c 6.75608,-1.2433 13.35607,3.04409 14.89936,9.80523 0.63219,2.76958 0.32629,5.52897 -0.71696,7.95272 l 2.29788,2.90524 12.27831,-9.82241 -20.78201,-26.02792 -12.28526,9.79193 4.30868,5.39521 z" style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:0;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" inkscape:connector-curvature="0"/>
|
||||
<path id="rect6068-7-2" d="m 357.3147,614.41356 c 3.24024,-6.05733 10.70728,-8.54432 16.9556,-5.53547 2.55951,1.23253 4.52618,3.19214 5.7707,5.51895 l 3.70413,0.0148 -0.0242,-15.72374 -33.30682,0.0201 -0.004,15.71019 6.90455,-0.005 z" style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:0;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" inkscape:connector-curvature="0"/>
|
||||
<path id="rect6068-7-4" d="m 421.16295,594.31034 c -2.71561,-6.30999 -0.004,-13.69859 6.24372,-16.70778 2.55944,-1.23266 5.31772,-1.54849 7.91284,-1.07077 l 2.32104,-2.8868 -12.30848,-9.78457 -20.75055,26.053 12.28029,9.79818 4.30097,-5.40135 z" style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:0;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" inkscape:connector-curvature="0"/>
|
||||
<path id="rect6068-0-6" d="m 445.54357,531.88642 c -6.6265,-1.81104 -10.71254,-8.53772 -9.16986,-15.2986 0.63203,-2.76962 2.10483,-5.12305 4.09636,-6.85416 l -0.80987,-3.61453 -15.32408,3.52269 7.43155,32.46716 15.31712,-3.49217 -1.54139,-6.73031 z" style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:0;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" inkscape:connector-curvature="0"/>
|
||||
<path id="rect6068-7-2-8" d="m 411.93706,474.00786 c -5.54745,4.05169 -13.3542,3.05231 -17.67827,-2.36908 -1.77132,-2.22096 -2.69304,-4.83979 -2.80482,-7.47615 l -3.33091,-1.62042 -6.80016,14.17724 30.01745,14.43252 6.81969,-14.15281 -6.22303,-2.99113 z" style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:0;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" inkscape:connector-curvature="0"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 26 KiB |
29
static/img/mesos.svg
Normal file
29
static/img/mesos.svg
Normal file
|
@ -0,0 +1,29 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="256px" height="291px" viewBox="0 0 256 291" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" preserveAspectRatio="xMidYMid">
|
||||
<g>
|
||||
<path d="M190.180109,177.16993 L190.180109,113.804451 L135.537556,145.539486 L190.180109,177.16993" fill="#FFFFFF"></path>
|
||||
<path d="M186.644918,107.621603 L131.906739,75.9702412 L131.906739,139.348669 L186.644918,107.621603" fill="#00AEDE"></path>
|
||||
<path d="M124.792529,139.346677 L124.792529,75.968249 L70.0155019,107.619611 L124.792529,139.346677" fill="#00AEDE"></path>
|
||||
<path d="M121.252358,69.8870039 L66.5271284,38.052358 L66.5271284,101.52442 L121.252358,69.8870039" fill="#00AEDE"></path>
|
||||
<path d="M186.644918,183.259144 L131.906739,151.635673 L131.906739,215.00414 L186.644918,183.259144" fill="#FFFFFF"></path>
|
||||
<path d="M124.792529,215.005136 L124.792529,151.633681 L70.0155019,183.261136 L124.792529,215.005136" fill="#FFFFFF"></path>
|
||||
<path d="M252.113183,145.53849 L197.295315,113.80744 L197.295315,177.168934 L252.113183,145.53849" fill="#00AEDE"></path>
|
||||
<path d="M59.3989728,101.52442 L59.3989728,38.052358 L4.2633463,69.8870039 L59.3989728,101.52442" fill="#00AEDE"></path>
|
||||
<path d="M121.252358,221.095346 L66.5271284,189.375253 L66.5271284,252.826397 L121.252358,221.095346" fill="#FFFFFF"></path>
|
||||
<path d="M59.3989728,252.827393 L59.3989728,189.377245 L4.2633463,221.097339 L59.3989728,252.827393" fill="#00AEDE"></path>
|
||||
<path d="M121.252358,145.53849 L66.5271284,113.80744 L66.5271284,177.168934 L121.252358,145.53849" fill="#FFFFFF"></path>
|
||||
<path d="M190.180109,101.52442 L190.180109,38.052358 L135.537556,69.8870039 L190.180109,101.52442" fill="#00AEDE"></path>
|
||||
<path d="M131.908732,0.318754864 L131.908732,63.6762646 L186.646911,31.9561712 L131.908732,0.318754864" fill="#FFFFFF"></path>
|
||||
<path d="M70.0145058,31.9561712 L124.791533,63.6762646 L124.791533,0.318754864 L70.0145058,31.9561712" fill="#FFFFFF"></path>
|
||||
<path d="M186.644918,258.91063 L131.906739,227.294132 L131.906739,290.641681 L186.644918,258.91063" fill="#FFFFFF"></path>
|
||||
<path d="M124.792529,290.643673 L124.792529,227.29214 L70.0155019,258.912623 L124.792529,290.643673" fill="#FFFFFF"></path>
|
||||
<path d="M255.660327,215.005136 L255.660327,151.633681 L200.983907,183.261136 L255.660327,215.005136" fill="#00AEDE"></path>
|
||||
<path d="M59.3989728,177.16993 L59.3989728,113.70484 L4.2633463,145.539486 L59.3989728,177.16993" fill="#00AEDE"></path>
|
||||
<path d="M55.871751,183.259144 L0.656435798,151.635673 L0.656435798,215.00414 L55.871751,183.259144" fill="#00AEDE"></path>
|
||||
<path d="M255.660327,139.346677 L255.660327,75.968249 L200.983907,107.619611 L255.660327,139.346677" fill="#00AEDE"></path>
|
||||
<path d="M252.113183,69.8870039 L197.295315,38.052358 L197.295315,101.52442 L252.113183,69.8870039" fill="#00AEDE"></path>
|
||||
<path d="M252.113183,221.095346 L197.295315,189.375253 L197.295315,252.826397 L252.113183,221.095346" fill="#00AEDE"></path>
|
||||
<path d="M190.180109,252.827393 L190.180109,189.377245 L135.537556,221.097339 L190.180109,252.827393" fill="#FFFFFF"></path>
|
||||
<path d="M55.871751,107.621603 L0.656435798,75.9702412 L0.656435798,139.348669 L55.871751,107.621603" fill="#00AEDE"></path>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 3.2 KiB |
|
@ -230,12 +230,12 @@ angular.module("core-ui", [])
|
|||
.directive('corTabContent', function() {
|
||||
var directiveDefinitionObject = {
|
||||
priority: 2,
|
||||
templateUrl: '/static/directives/cor-tab-content.html',
|
||||
replace: true,
|
||||
transclude: true,
|
||||
transclude: false,
|
||||
restrict: 'C',
|
||||
scope: {},
|
||||
controller: function($rootScope, $scope, $element) {
|
||||
$element.addClass('co-tab-content tab-content col-md-11');
|
||||
}
|
||||
};
|
||||
return directiveDefinitionObject;
|
||||
|
@ -248,7 +248,9 @@ angular.module("core-ui", [])
|
|||
replace: true,
|
||||
transclude: true,
|
||||
restrict: 'C',
|
||||
scope: {},
|
||||
scope: {
|
||||
'rememberCookie': '@rememberCookie'
|
||||
},
|
||||
controller: function($rootScope, $scope, $element, $timeout, $location, UIService) {
|
||||
$scope.isClosed = true;
|
||||
|
||||
|
@ -260,7 +262,7 @@ angular.module("core-ui", [])
|
|||
|
||||
UIService.initializeTabs($scope, $element, function() {
|
||||
$scope.isClosed = true;
|
||||
});
|
||||
}, $scope.rememberCookie);
|
||||
}
|
||||
};
|
||||
return directiveDefinitionObject;
|
||||
|
|
193
static/js/directives/ui/credentials-dialog.js
Normal file
193
static/js/directives/ui/credentials-dialog.js
Normal file
|
@ -0,0 +1,193 @@
|
|||
/**
|
||||
* An element which displays a credentials dialog.
|
||||
*/
|
||||
angular.module('quay').directive('credentialsDialog', function () {
|
||||
var directiveDefinitionObject = {
|
||||
priority: 0,
|
||||
templateUrl: '/static/directives/credentials-dialog.html',
|
||||
replace: false,
|
||||
transclude: true,
|
||||
restrict: 'C',
|
||||
scope: {
|
||||
'credentials': '=credentials',
|
||||
'secretTitle': '@secretTitle',
|
||||
'entityTitle': '@entityTitle',
|
||||
'entityIcon': '@entityIcon'
|
||||
},
|
||||
|
||||
controller: function($scope, $element, $rootScope, Config) {
|
||||
$scope.Config = Config;
|
||||
|
||||
$scope.k8s = {};
|
||||
$scope.rkt = {};
|
||||
$scope.docker = {};
|
||||
|
||||
// Generate a unique ID for the dialog.
|
||||
if (!$rootScope.credentialsDialogCounter) {
|
||||
$rootScope.credentialsDialogCounter = 0;
|
||||
}
|
||||
|
||||
$rootScope.credentialsDialogCounter++;
|
||||
$scope.dialogID = $rootScope.credentialsDialogCounter;
|
||||
|
||||
$scope.hide = function() {
|
||||
$element.find('.modal').modal('hide');
|
||||
};
|
||||
|
||||
$scope.show = function() {
|
||||
$element.find('.modal').modal({});
|
||||
};
|
||||
|
||||
$scope.$watch('credentials', function(credentials) {
|
||||
if (!credentials) {
|
||||
$scope.hide();
|
||||
return;
|
||||
}
|
||||
|
||||
$scope.show();
|
||||
});
|
||||
|
||||
$scope.downloadFile = function(info) {
|
||||
var blob = new Blob([info.contents]);
|
||||
saveAs(blob, info.filename);
|
||||
};
|
||||
|
||||
$scope.viewFile = function(context) {
|
||||
context.viewingFile = true;
|
||||
};
|
||||
|
||||
$scope.isDownloadSupported = function() {
|
||||
var isSafari = /^((?!chrome).)*safari/i.test(navigator.userAgent);
|
||||
if (isSafari) {
|
||||
// Doesn't work properly in Safari, sadly.
|
||||
return false;
|
||||
}
|
||||
|
||||
try { return !!new Blob(); } catch(e) {}
|
||||
return false;
|
||||
};
|
||||
|
||||
$scope.getNamespace = function(credentials) {
|
||||
if (!credentials || !credentials.username) {
|
||||
return '';
|
||||
}
|
||||
|
||||
return credentials.username.split('+')[0];
|
||||
};
|
||||
|
||||
$scope.getMesosFilename = function(credentials) {
|
||||
return $scope.getSuffixedFilename(credentials, 'auth.tar.gz');
|
||||
};
|
||||
|
||||
$scope.getMesosFile = function(credentials) {
|
||||
var tarFile = new Tar();
|
||||
tarFile.append('.docker/config.json', $scope.getDockerConfig(credentials), {});
|
||||
contents = (new Zlib.Gzip(tarFile.getData())).compress();
|
||||
return {
|
||||
'filename': $scope.getMesosFilename(credentials),
|
||||
'contents': contents
|
||||
}
|
||||
};
|
||||
|
||||
$scope.getDockerConfig = function(credentials) {
|
||||
var auths = {};
|
||||
auths[Config['SERVER_HOSTNAME']] = {
|
||||
'auth': $.base64.encode(credentials.username + ":" + credentials.token),
|
||||
'email': ''
|
||||
};
|
||||
|
||||
var config = {
|
||||
'auths': auths
|
||||
};
|
||||
|
||||
return JSON.stringify(config, null, ' ');
|
||||
};
|
||||
|
||||
$scope.getDockerFile = function(credentials) {
|
||||
return {
|
||||
'filename': $scope.getRktFilename(credentials),
|
||||
'contents': $scope.getDockerConfig(credentials)
|
||||
}
|
||||
};
|
||||
|
||||
$scope.getDockerLogin = function(credentials) {
|
||||
if (!credentials || !credentials.username) {
|
||||
return '';
|
||||
}
|
||||
|
||||
var escape = function(v) {
|
||||
if (!v) { return v; }
|
||||
return v.replace('$', '\\$');
|
||||
};
|
||||
|
||||
return 'docker login -e="." -u="' + escape(credentials.username) + '" -p="' + credentials.password + '" ' + Config['SERVER_HOSTNAME'];
|
||||
};
|
||||
|
||||
$scope.getDockerFilename = function(credentials) {
|
||||
return $scope.getSuffixedFilename(credentials, 'auth.json')
|
||||
};
|
||||
|
||||
$scope.getRktFile = function(credentials) {
|
||||
var config = {
|
||||
'rktKind': 'auth',
|
||||
'rktVersion': 'v1',
|
||||
'domains': [Config['SERVER_HOSTNAME']],
|
||||
'type': 'basic',
|
||||
'credentials': {
|
||||
'user': credentials['username'],
|
||||
'password': credentials['password']
|
||||
}
|
||||
};
|
||||
|
||||
var contents = JSON.stringify(config, null, ' ');
|
||||
return {
|
||||
'filename': $scope.getRktFilename(credentials),
|
||||
'contents': contents
|
||||
}
|
||||
};
|
||||
|
||||
$scope.getRktFilename = function(credentials) {
|
||||
return $scope.getSuffixedFilename(credentials, 'auth.json')
|
||||
};
|
||||
|
||||
$scope.getKubernetesSecretName = function(credentials) {
|
||||
if (!credentials || !credentials.username) {
|
||||
return '';
|
||||
}
|
||||
|
||||
var username = credentials.username.replace('+', '-');
|
||||
return username + '-pull-secret';
|
||||
};
|
||||
|
||||
$scope.getKubernetesFile = function(credentials) {
|
||||
var dockerConfigJson = $scope.getDockerConfig(credentials);
|
||||
var contents = 'apiVersion: v1\n' +
|
||||
'kind: Secret\n' +
|
||||
'metadata:\n' +
|
||||
' name: ' + $scope.getKubernetesSecretName(credentials) + '\n' +
|
||||
'data:\n' +
|
||||
' .dockerconfigjson: ' + $.base64.encode(dockerConfigJson) + '\n' +
|
||||
'type: kubernetes.io/dockerconfigjson'
|
||||
|
||||
return {
|
||||
'filename': $scope.getKubernetesFilename(credentials),
|
||||
'contents': contents
|
||||
}
|
||||
};
|
||||
|
||||
$scope.getKubernetesFilename = function(credentials) {
|
||||
return $scope.getSuffixedFilename(credentials, 'secret.yml')
|
||||
};
|
||||
|
||||
$scope.getSuffixedFilename = function(credentials, suffix) {
|
||||
if (!credentials || !credentials.username) {
|
||||
return '';
|
||||
}
|
||||
|
||||
var username = credentials.username.replace('+', '-');
|
||||
return username + '-' + suffix;
|
||||
};
|
||||
}
|
||||
};
|
||||
return directiveDefinitionObject;
|
||||
});
|
|
@ -1,86 +0,0 @@
|
|||
/**
|
||||
* An element which displays a dialog with docker auth credentials for an entity.
|
||||
*/
|
||||
angular.module('quay').directive('dockerAuthDialog', function (Config) {
|
||||
var directiveDefinitionObject = {
|
||||
priority: 0,
|
||||
templateUrl: '/static/directives/docker-auth-dialog.html',
|
||||
replace: false,
|
||||
transclude: true,
|
||||
restrict: 'C',
|
||||
scope: {
|
||||
'username': '=username',
|
||||
'token': '=token',
|
||||
'shown': '=shown',
|
||||
'counter': '=counter',
|
||||
'supportsRegenerate': '@supportsRegenerate',
|
||||
'regenerate': '®enerate'
|
||||
},
|
||||
controller: function($scope, $element) {
|
||||
var updateCommand = function() {
|
||||
var escape = function(v) {
|
||||
if (!v) { return v; }
|
||||
return v.replace('$', '\\$');
|
||||
};
|
||||
$scope.command = 'docker login -e="." -u="' + escape($scope.username) +
|
||||
'" -p="' + $scope.token + '" ' + Config['SERVER_HOSTNAME'];
|
||||
};
|
||||
|
||||
$scope.$watch('username', updateCommand);
|
||||
$scope.$watch('token', updateCommand);
|
||||
|
||||
$scope.regenerating = true;
|
||||
|
||||
$scope.askRegenerate = function() {
|
||||
bootbox.confirm('Are you sure you want to regenerate the token? All existing login credentials will become invalid', function(resp) {
|
||||
if (resp) {
|
||||
$scope.regenerating = true;
|
||||
$scope.regenerate({'username': $scope.username, 'token': $scope.token});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
$scope.isDownloadSupported = function() {
|
||||
var isSafari = /^((?!chrome).)*safari/i.test(navigator.userAgent);
|
||||
if (isSafari) {
|
||||
// Doesn't work properly in Safari, sadly.
|
||||
return false;
|
||||
}
|
||||
|
||||
try { return !!new Blob(); } catch(e) {}
|
||||
return false;
|
||||
};
|
||||
|
||||
$scope.downloadCfg = function() {
|
||||
var auth = $.base64.encode($scope.username + ":" + $scope.token);
|
||||
config = {}
|
||||
config[Config['SERVER_HOSTNAME']] = {
|
||||
"auth": auth,
|
||||
"email": ""
|
||||
};
|
||||
|
||||
var file = JSON.stringify(config, null, ' ');
|
||||
var blob = new Blob([file]);
|
||||
saveAs(blob, '.dockercfg');
|
||||
};
|
||||
|
||||
var show = function(r) {
|
||||
$scope.regenerating = false;
|
||||
|
||||
if (!$scope.shown || !$scope.username || !$scope.token) {
|
||||
$('#dockerauthmodal').modal('hide');
|
||||
return;
|
||||
}
|
||||
|
||||
$('#copyClipboard').clipboardCopy();
|
||||
$('#dockerauthmodal').modal({});
|
||||
};
|
||||
|
||||
$scope.$watch('counter', show);
|
||||
$scope.$watch('shown', show);
|
||||
$scope.$watch('username', show);
|
||||
$scope.$watch('token', show);
|
||||
}
|
||||
};
|
||||
return directiveDefinitionObject;
|
||||
});
|
|
@ -16,29 +16,12 @@ angular.module('quay').directive('entityReference', function () {
|
|||
'avatarSize': '@avatarSize'
|
||||
},
|
||||
controller: function($scope, $element, UserService, UtilService, Config) {
|
||||
$scope.robotToShow = null;
|
||||
|
||||
$scope.getIsAdmin = function(namespace) {
|
||||
return UserService.isNamespaceAdmin(namespace);
|
||||
};
|
||||
|
||||
$scope.getRobotUrl = function(name) {
|
||||
var namespace = $scope.getPrefix(name);
|
||||
if (!namespace) {
|
||||
return '';
|
||||
}
|
||||
|
||||
if (!$scope.getIsAdmin(namespace)) {
|
||||
return '';
|
||||
}
|
||||
|
||||
var org = UserService.getOrganization(namespace);
|
||||
if (!org) {
|
||||
// This robot is owned by the user.
|
||||
return '/user/' + namespace + '?tab=robots&showRobot=' + UtilService.textToSafeHtml(name);
|
||||
}
|
||||
|
||||
return '/organization/' + org['name'] + '?tab=robots&showRobot=' + UtilService.textToSafeHtml(name);
|
||||
};
|
||||
|
||||
$scope.getTitle = function(entity) {
|
||||
if (!entity) { return ''; }
|
||||
|
||||
|
@ -65,6 +48,12 @@ angular.module('quay').directive('entityReference', function () {
|
|||
var plus = name.indexOf('+');
|
||||
return name.substr(plus + 1);
|
||||
};
|
||||
|
||||
$scope.showRobotCredentials = function() {
|
||||
$scope.robotToShow = {
|
||||
'name': $scope.entity.name
|
||||
};
|
||||
};
|
||||
}
|
||||
};
|
||||
return directiveDefinitionObject;
|
||||
|
|
68
static/js/directives/ui/robot-credentials-dialog.js
Normal file
68
static/js/directives/ui/robot-credentials-dialog.js
Normal file
|
@ -0,0 +1,68 @@
|
|||
/**
|
||||
* An element which displays a robot credentials dialog.
|
||||
*/
|
||||
angular.module('quay').directive('robotCredentialsDialog', function () {
|
||||
var directiveDefinitionObject = {
|
||||
priority: 0,
|
||||
templateUrl: '/static/directives/robot-credentials-dialog.html',
|
||||
replace: false,
|
||||
transclude: true,
|
||||
restrict: 'C',
|
||||
scope: {
|
||||
'info': '=info',
|
||||
},
|
||||
controller: function($scope, $element, ApiService, UserService) {
|
||||
$scope.credentials = null;
|
||||
|
||||
var lookupRobot = function() {
|
||||
var pieces = $scope.info.name.split('+');
|
||||
var params = {
|
||||
'robot_shortname': pieces[1]
|
||||
};
|
||||
|
||||
$scope.credentials = {
|
||||
'loading': true
|
||||
};
|
||||
|
||||
var organization = UserService.isOrganization(pieces[0]) ? pieces[0] : null;
|
||||
ApiService.getRobot(organization, null, params).then(function(resp) {
|
||||
$scope.credentials = {
|
||||
'username': $scope.info.name,
|
||||
'password': resp['token']
|
||||
};
|
||||
|
||||
$scope.showRegenerateToken = false;
|
||||
$scope.tokenRegenerated = false;
|
||||
}, ApiService.errorDisplay('Could not load robot information', function() {
|
||||
$scope.credentials = null;
|
||||
}));
|
||||
};
|
||||
|
||||
$scope.askRegenerateToken = function() {
|
||||
$scope.showRegenerateToken = true;
|
||||
};
|
||||
|
||||
$scope.regenerateToken = function() {
|
||||
var pieces = $scope.info.name.split('+');
|
||||
var shortName = pieces[1];
|
||||
|
||||
var organization = UserService.isOrganization(pieces[0]) ? pieces[0] : null;
|
||||
ApiService.regenerateRobotToken(organization, null, {'robot_shortname': shortName}).then(function(updated) {
|
||||
$scope.credentials = {
|
||||
'username': $scope.info.name,
|
||||
'password': updated['token']
|
||||
};
|
||||
$scope.showRegenerateToken = false;
|
||||
$scope.tokenRegenerated = true;
|
||||
}, ApiService.errorDisplay('Cannot regenerate robot account token'))
|
||||
};
|
||||
|
||||
$scope.$watch('info', function(info) {
|
||||
if (info && info.name) {
|
||||
lookupRobot();
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
return directiveDefinitionObject;
|
||||
});
|
|
@ -19,10 +19,9 @@ angular.module('quay').directive('robotsManager', function () {
|
|||
|
||||
$scope.robots = null;
|
||||
$scope.loading = false;
|
||||
$scope.shownRobot = null;
|
||||
$scope.showRobotCounter = 0;
|
||||
$scope.Config = Config;
|
||||
$scope.feedback = null;
|
||||
$scope.robotDisplayInfo = null;
|
||||
|
||||
// Listen for route changes and update the tabs accordingly.
|
||||
var locationListener = $rootScope.$on('$routeUpdate', function(){
|
||||
|
@ -66,23 +65,10 @@ angular.module('quay').directive('robotsManager', function () {
|
|||
}
|
||||
};
|
||||
|
||||
$scope.regenerateToken = function(username) {
|
||||
if (!username) { return; }
|
||||
|
||||
var shortName = $scope.getShortenedName(username);
|
||||
ApiService.regenerateRobotToken($scope.organization, null, {'robot_shortname': shortName}).then(function(updated) {
|
||||
var index = $scope.findRobotIndexByName(username);
|
||||
if (index >= 0) {
|
||||
$scope.robots.splice(index, 1);
|
||||
$scope.robots.push(updated);
|
||||
}
|
||||
$scope.shownRobot = updated;
|
||||
}, ApiService.errorDisplay('Cannot regenerate robot account token'));
|
||||
};
|
||||
|
||||
$scope.showRobot = function(info) {
|
||||
$scope.shownRobot = info;
|
||||
$scope.showRobotCounter++;
|
||||
$scope.robotDisplayInfo = {
|
||||
'name': info.name
|
||||
};
|
||||
};
|
||||
|
||||
$scope.findRobotIndexByName = function(name) {
|
||||
|
|
|
@ -91,8 +91,10 @@
|
|||
};
|
||||
|
||||
ApiService.generateUserClientKey(data).then(function(resp) {
|
||||
$scope.generatedClientToken = resp['key'];
|
||||
$('#clientTokenModal').modal({});
|
||||
$scope.context.encryptedPasswordCredentials = {
|
||||
'username': $scope.context.viewuser.username,
|
||||
'password': resp['key']
|
||||
};
|
||||
}, ApiService.errorDisplay('Could not generate token'));
|
||||
};
|
||||
|
||||
|
|
|
@ -240,7 +240,7 @@ angular.module('quay').factory('UIService', ['$timeout', '$rootScope', '$locatio
|
|||
el.dispatchEvent(ev);
|
||||
};
|
||||
|
||||
uiService.initializeTabs = function(scope, element, opt_clickCallback) {
|
||||
uiService.initializeTabs = function(scope, element, opt_clickCallback, opt_rememberCookie) {
|
||||
var locationListener = null;
|
||||
var disposed = false;
|
||||
|
||||
|
@ -314,32 +314,38 @@ angular.module('quay').factory('UIService', ['$timeout', '$rootScope', '$locatio
|
|||
});
|
||||
|
||||
// Listen for route changes and update the tabs accordingly.
|
||||
locationListener = $rootScope.$on('$routeUpdate', function(){
|
||||
if ($location.search()['tab']) {
|
||||
changeTab($location.search()['tab']);
|
||||
} else {
|
||||
resetDefaultTab();
|
||||
}
|
||||
});
|
||||
if (!opt_rememberCookie) {
|
||||
locationListener = $rootScope.$on('$routeUpdate', function(){
|
||||
if ($location.search()['tab']) {
|
||||
changeTab($location.search()['tab']);
|
||||
} else {
|
||||
resetDefaultTab();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Listen for tab changes.
|
||||
tabs.on('shown.bs.tab', function (e) {
|
||||
// Invoke the callback, if any.
|
||||
opt_clickCallback && opt_clickCallback();
|
||||
|
||||
// Update the search location.
|
||||
var tabName = e.target.getAttribute('data-target').substr(1);
|
||||
$rootScope.$apply(function() {
|
||||
var isDefaultTab = tabs[0] == e.target;
|
||||
var newSearch = $.extend($location.search(), {});
|
||||
if (isDefaultTab) {
|
||||
delete newSearch['tab'];
|
||||
} else {
|
||||
newSearch['tab'] = tabName;
|
||||
}
|
||||
// Update the search location or cookie.
|
||||
if (opt_rememberCookie) {
|
||||
// TODO: this
|
||||
} else {
|
||||
var tabName = e.target.getAttribute('data-target').substr(1);
|
||||
$rootScope.$apply(function() {
|
||||
var isDefaultTab = tabs[0] == e.target;
|
||||
var newSearch = $.extend($location.search(), {});
|
||||
if (isDefaultTab) {
|
||||
delete newSearch['tab'];
|
||||
} else {
|
||||
newSearch['tab'] = tabName;
|
||||
}
|
||||
|
||||
$location.search(newSearch);
|
||||
});
|
||||
$location.search(newSearch);
|
||||
});
|
||||
}
|
||||
|
||||
e.preventDefault();
|
||||
});
|
||||
|
|
499
static/js/tar.js
Normal file
499
static/js/tar.js
Normal file
|
@ -0,0 +1,499 @@
|
|||
/**
|
||||
* Tar library code based on the tar-async project (MIT License):
|
||||
* https://github.com/beatgammit/tar-async
|
||||
*/
|
||||
// Production steps of ECMA-262, Edition 5, 15.4.4.18
|
||||
// Reference: http://es5.github.com/#x15.4.4.18
|
||||
if (!Array.prototype.forEach) {
|
||||
Array.prototype.forEach = function(callback, thisArg) {
|
||||
var T, k;
|
||||
|
||||
if (this == null) {
|
||||
throw new TypeError(" this is null or not defined");
|
||||
}
|
||||
|
||||
// 1. Let O be the result of calling ToObject passing the |this| value as the argument.
|
||||
var O = Object(this);
|
||||
|
||||
// 2. Let lenValue be the result of calling the Get internal method of O with the argument "length".
|
||||
// 3. Let len be ToUint32(lenValue).
|
||||
var len = O.length >>> 0;
|
||||
|
||||
// 4. If IsCallable(callback) is false, throw a TypeError exception.
|
||||
// See: http://es5.github.com/#x9.11
|
||||
if (typeof callback !== "function") {
|
||||
throw new TypeError(callback + " is not a function");
|
||||
}
|
||||
|
||||
// 5. If thisArg was supplied, let T be thisArg; else let T be undefined.
|
||||
if (arguments.length > 1) {
|
||||
T = thisArg;
|
||||
}
|
||||
|
||||
// 6. Let k be 0
|
||||
k = 0;
|
||||
|
||||
// 7. Repeat, while k < len
|
||||
while (k < len) {
|
||||
|
||||
var kValue;
|
||||
|
||||
// a. Let Pk be ToString(k).
|
||||
// This is implicit for LHS operands of the in operator
|
||||
// b. Let kPresent be the result of calling the HasProperty internal method of O with argument Pk.
|
||||
// This step can be combined with c
|
||||
// c. If kPresent is true, then
|
||||
if (k in O) {
|
||||
|
||||
// i. Let kValue be the result of calling the Get internal method of O with argument Pk.
|
||||
kValue = O[k];
|
||||
|
||||
// ii. Call the Call internal method of callback with T as the this value and
|
||||
// argument list containing kValue, k, and O.
|
||||
callback.call(T, kValue, k, O);
|
||||
}
|
||||
// d. Increase k by 1.
|
||||
k++;
|
||||
}
|
||||
// 8. return undefined
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
// Polyfill: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some
|
||||
if (!Array.prototype.some) {
|
||||
Array.prototype.some = function(fun /*, thisArg */ ) {
|
||||
'use strict';
|
||||
|
||||
if (this === void 0 || this === null)
|
||||
throw new TypeError();
|
||||
|
||||
var t = Object(this);
|
||||
var len = t.length >>> 0;
|
||||
if (typeof fun !== 'function')
|
||||
throw new TypeError();
|
||||
|
||||
var thisArg = arguments.length >= 2 ? arguments[1] : void 0;
|
||||
for (var i = 0; i < len; i++) {
|
||||
if (i in t && fun.call(thisArg, t[i], i, t))
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
(function() {
|
||||
|
||||
function pad(num, bytes, base) {
|
||||
num = num.toString(base || 8);
|
||||
return "000000000000".substr(num.length + 12 - bytes) + num;
|
||||
}
|
||||
|
||||
/*
|
||||
struct posix_header { // byte offset
|
||||
char name[100]; // 0
|
||||
char mode[8]; // 100
|
||||
char uid[8]; // 108
|
||||
char gid[8]; // 116
|
||||
char size[12]; // 124
|
||||
char mtime[12]; // 136
|
||||
char chksum[8]; // 148
|
||||
char typeflag; // 156
|
||||
char linkname[100]; // 157
|
||||
char magic[6]; // 257
|
||||
char version[2]; // 263
|
||||
char uname[32]; // 265
|
||||
char gname[32]; // 297
|
||||
char devmajor[8]; // 329
|
||||
char devminor[8]; // 337
|
||||
char prefix[155]; // 345
|
||||
// 500
|
||||
};
|
||||
*/
|
||||
|
||||
var headerFormat = [{
|
||||
'field': 'filename',
|
||||
'length': 100,
|
||||
'type': 'string'
|
||||
}, {
|
||||
'field': 'mode',
|
||||
'length': 8,
|
||||
'type': 'number'
|
||||
}, {
|
||||
'field': 'uid',
|
||||
'length': 8,
|
||||
'type': 'number'
|
||||
}, {
|
||||
'field': 'gid',
|
||||
'length': 8,
|
||||
'type': 'number'
|
||||
}, {
|
||||
'field': 'size',
|
||||
'length': 12,
|
||||
'type': 'number'
|
||||
}, {
|
||||
'field': 'mtime',
|
||||
'length': 12,
|
||||
'type': 'number'
|
||||
}, {
|
||||
'field': 'checksum',
|
||||
'length': 8,
|
||||
'type': 'number'
|
||||
}, {
|
||||
'field': 'type',
|
||||
'length': 1,
|
||||
'type': 'number'
|
||||
}, {
|
||||
'field': 'linkName',
|
||||
'length': 100,
|
||||
'type': 'string'
|
||||
}, {
|
||||
'field': 'ustar',
|
||||
'length': 8,
|
||||
'type': 'string'
|
||||
}, {
|
||||
'field': 'owner',
|
||||
'length': 32,
|
||||
'type': 'string'
|
||||
}, {
|
||||
'field': 'group',
|
||||
'length': 32,
|
||||
'type': 'string'
|
||||
}, {
|
||||
'field': 'majorNumber',
|
||||
'length': 8,
|
||||
'type': 'number'
|
||||
}, {
|
||||
'field': 'minorNumber',
|
||||
'length': 8,
|
||||
'type': 'number'
|
||||
}, {
|
||||
'field': 'filenamePrefix',
|
||||
'length': 155,
|
||||
'type': 'string'
|
||||
}, {
|
||||
'field': 'padding',
|
||||
'length': 12
|
||||
}];
|
||||
|
||||
function clean(length) {
|
||||
return new Uint8Array(length);
|
||||
}
|
||||
|
||||
function formatHeader(data) {
|
||||
var buffer = new Uint8Array(5000);
|
||||
offset = 0;
|
||||
|
||||
headerFormat.forEach(function(value) {
|
||||
var v = data[value.field] || "";
|
||||
for (var i = 0; i < v.length; ++i) {
|
||||
buffer[offset + i] = v.charCodeAt(i);
|
||||
}
|
||||
offset += value.length;
|
||||
});
|
||||
|
||||
return buffer.slice(0, offset);
|
||||
}
|
||||
|
||||
var totalRead = 0,
|
||||
recordSize = 512,
|
||||
fileBuffer,
|
||||
leftToRead,
|
||||
fileTypes = [
|
||||
'normal', 'hard-link', 'symbolic-link', 'character-special', 'block-special', 'directory', 'fifo', 'contiguous-file'
|
||||
];
|
||||
|
||||
function filterDecoder(input) {
|
||||
var filter = [];
|
||||
if (!input) {
|
||||
return [0, 7];
|
||||
}
|
||||
|
||||
if (typeof input === 'string') {
|
||||
input = [].push(input);
|
||||
}
|
||||
|
||||
if (!(input instanceof Array)) {
|
||||
console.error('Invalid fileType. Only Arrays or strings are accepted');
|
||||
return;
|
||||
}
|
||||
|
||||
input.forEach(function(i) {
|
||||
var index = fileTypes.indexOf(i);
|
||||
if (index < 0) {
|
||||
console.error('Filetype not valid. Ignoring input:', i);
|
||||
return;
|
||||
}
|
||||
|
||||
filter.push(i);
|
||||
});
|
||||
|
||||
return filter;
|
||||
}
|
||||
|
||||
function readInt(value) {
|
||||
return parseInt(value.replace(/^0*/, ''), 8) || 0;
|
||||
}
|
||||
|
||||
function readString(buf) {
|
||||
var str = '';
|
||||
for (var i = 0; i < buf.length; ++i) {
|
||||
if (buf[i] == 0) {
|
||||
break;
|
||||
}
|
||||
str += String.fromCharCode(buf[i]);
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
function doHeader(buf, cb) {
|
||||
var data = {},
|
||||
offset = 0,
|
||||
checksum = 0;
|
||||
|
||||
function updateChecksum(value) {
|
||||
var i, length;
|
||||
|
||||
for (i = 0, length = value.length; i < length; i += 1) {
|
||||
checksum += value.charCodeAt(i);
|
||||
}
|
||||
}
|
||||
|
||||
headerFormat.some(function(field) {
|
||||
var tBuf = buf.subarray(offset, offset + field.length),
|
||||
tString = String.fromCharCode.apply(null, tBuf);
|
||||
|
||||
offset += field.length;
|
||||
|
||||
if (field.field === 'ustar' && !/ustar/.test(tString)) {
|
||||
// end the loop if not using the extended header
|
||||
return true;
|
||||
} else if (field.field === 'checksum') {
|
||||
updateChecksum(' ');
|
||||
} else {
|
||||
updateChecksum(tString);
|
||||
}
|
||||
|
||||
if (field.type === 'string') {
|
||||
data[field.field] = readString(tBuf);
|
||||
} else if (field.type === 'number') {
|
||||
data[field.field] = readInt(tString);
|
||||
}
|
||||
});
|
||||
|
||||
if (checksum !== data.checksum) {
|
||||
cb.call(this, 'Checksum not equal', checksum, data.checksum);
|
||||
return false;
|
||||
}
|
||||
|
||||
cb.call(this, null, data, recordSize);
|
||||
return true;
|
||||
}
|
||||
|
||||
function readTarFile(state, data) {
|
||||
var fileBuffer = new Uint8Array(data.size);
|
||||
fileBuffer.set(state.buffer.subarray(0, data.size));
|
||||
state.files.push({
|
||||
'meta': data,
|
||||
'buffer': fileBuffer
|
||||
});
|
||||
}
|
||||
|
||||
function removeTrailingNulls(state) {
|
||||
// If we're not an even multiple, account for trailing nulls
|
||||
if (state.totalRead % recordSize) {
|
||||
var bytesBuffer = recordSize - (state.totalRead % recordSize);
|
||||
|
||||
// If we don't have enough bytes to account for the nulls
|
||||
if (state.buffer.length < bytesBuffer) {
|
||||
state.totalRead += bytesBuffer;
|
||||
return;
|
||||
}
|
||||
|
||||
// Throw away trailing nulls
|
||||
state.buffer = state.buffer.subarray(bytesBuffer);
|
||||
state.totalRead += bytesBuffer;
|
||||
}
|
||||
}
|
||||
|
||||
function processTar(state) {
|
||||
if (state.totalRead == 0) {
|
||||
// Remove trailing nulls.
|
||||
removeTrailingNulls(state);
|
||||
}
|
||||
|
||||
// Check to see if/when we are done.
|
||||
if (state.buffer.length < recordSize) {
|
||||
state.cb('done', state.totalRead, state.files, null);
|
||||
return;
|
||||
}
|
||||
|
||||
state.cb('working', state.totalRead, state.files, null);
|
||||
|
||||
doHeader.call(this, state.buffer, function(err, data, rOffset) {
|
||||
if (err) {
|
||||
if (rOffset === 0) {
|
||||
state.cb('done', state.totalRead, state.files, null);
|
||||
return;
|
||||
}
|
||||
return state.cb('error', state.totalRead, state.files, err);
|
||||
}
|
||||
|
||||
// Update total; rOffset should always be 512
|
||||
state.totalRead += rOffset;
|
||||
state.buffer = state.buffer.subarray(rOffset);
|
||||
|
||||
// Read the tar file contents.
|
||||
readTarFile(state, data);
|
||||
|
||||
// Update the total and offset.
|
||||
state.totalRead += data.size;
|
||||
state.buffer = state.buffer.subarray(data.size);
|
||||
|
||||
// Remove trailing nulls.
|
||||
removeTrailingNulls(state);
|
||||
|
||||
if (state.buffer.length > 0) {
|
||||
setTimeout(function() {
|
||||
processTar(state);
|
||||
}, 0);
|
||||
} else {
|
||||
state.cb('done', state.totalRead, state.files, null);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
* Extract data from an input.
|
||||
*
|
||||
* @param data The data, in Uint8Array form.
|
||||
*/
|
||||
function Untar(data) {
|
||||
this.data = [];
|
||||
}
|
||||
|
||||
Untar.prototype.process = function(cb, opt_filter) {
|
||||
return processTar({
|
||||
'cb': cb,
|
||||
'buffer': this.data,
|
||||
'fileTypes': filterDecoder(opt_filter || []),
|
||||
'totalRead': 0,
|
||||
'files': []
|
||||
});
|
||||
};
|
||||
|
||||
window.Untar = Untar;
|
||||
|
||||
function appendArrays(arr1, arr2) {
|
||||
var tmp = new Uint8Array(arr1.length + arr2.length);
|
||||
tmp.set(arr1);
|
||||
tmp.set(arr2, arr1.length);
|
||||
return tmp;
|
||||
}
|
||||
|
||||
function Tar() {
|
||||
this.data = new Uint8Array(0);
|
||||
}
|
||||
|
||||
Tar.prototype.getData = function() {
|
||||
return this.data;
|
||||
};
|
||||
|
||||
Tar.prototype.emit = function(data) {
|
||||
if (typeof data == 'string') {
|
||||
var buf = new Uint8Array(data.length);
|
||||
for (var i = 0; i < data.length; ++i) {
|
||||
buf[i] = data.charCodeAt(i);
|
||||
}
|
||||
|
||||
data = buf;
|
||||
}
|
||||
|
||||
this.data = appendArrays(this.data, data);
|
||||
};
|
||||
|
||||
Tar.prototype.createHeader = function(data) {
|
||||
var checksum,
|
||||
i,
|
||||
length,
|
||||
headerBuf;
|
||||
|
||||
// format the header without the checksum
|
||||
headerBuf = formatHeader(data);
|
||||
|
||||
// calculate the checksum
|
||||
checksum = 0;
|
||||
for (i = 0, length = headerBuf.length; i < length; i += 1) {
|
||||
checksum += headerBuf[i];
|
||||
}
|
||||
|
||||
// pad the checksum
|
||||
checksum = checksum.toString(8);
|
||||
while (checksum.length < 6) {
|
||||
checksum = '0' + checksum;
|
||||
}
|
||||
|
||||
// write the checksum into the header
|
||||
for (i = 0, length = 6; i < length; i += 1) {
|
||||
headerBuf[i + 148] = checksum.charCodeAt(i);
|
||||
}
|
||||
|
||||
headerBuf[154] = 0;
|
||||
headerBuf[155] = 0x20;
|
||||
return headerBuf;
|
||||
};
|
||||
|
||||
Tar.prototype.writeData = function(header, input, size) {
|
||||
var extraBytes,
|
||||
tape = this;
|
||||
|
||||
// and write it out to the stream
|
||||
this.emit(header);
|
||||
this.written += header.length;
|
||||
|
||||
this.emit(input);
|
||||
this.written += input.length;
|
||||
|
||||
extraBytes = recordSize - (size % recordSize || recordSize);
|
||||
this.emit(clean(extraBytes));
|
||||
this.written += extraBytes;
|
||||
};
|
||||
|
||||
Tar.prototype.append = function(filepath, input, opts) {
|
||||
var data,
|
||||
mode,
|
||||
mtime,
|
||||
uid,
|
||||
gid,
|
||||
size,
|
||||
tape = this;
|
||||
|
||||
opts = opts || {};
|
||||
mode = typeof opts.mode === 'number' ? opts.mode : parseInt('777', 8) & 0xfff;
|
||||
mtime = typeof opts.mtime === 'number' ? opts.mtime : parseInt(+new Date() / 1000);
|
||||
uid = typeof opts.uid === 'number' ? opts.uid : 0;
|
||||
gid = typeof opts.gid === 'number' ? opts.gid : 0;
|
||||
size = typeof opts.size === 'number' ? opts.size : input.length;
|
||||
|
||||
data = {
|
||||
filename: filepath,
|
||||
mode: pad(mode, 7),
|
||||
uid: pad(uid, 7),
|
||||
gid: pad(gid, 7),
|
||||
size: pad(size, 11),
|
||||
mtime: pad(mtime, 11),
|
||||
checksum: ' ',
|
||||
type: '0', // just a file
|
||||
ustar: 'ustar ',
|
||||
owner: '',
|
||||
group: ''
|
||||
};
|
||||
|
||||
this.writeData(this.createHeader(data), input, size);
|
||||
};
|
||||
|
||||
window.Tar = Tar;
|
||||
|
||||
})();
|
|
@ -1,409 +0,0 @@
|
|||
/**
|
||||
* Untar library code based on the tar-async project (MIT License):
|
||||
* https://github.com/beatgammit/tar-async
|
||||
*/
|
||||
|
||||
// Production steps of ECMA-262, Edition 5, 15.4.4.18
|
||||
// Reference: http://es5.github.com/#x15.4.4.18
|
||||
if (!Array.prototype.forEach) {
|
||||
Array.prototype.forEach = function (callback, thisArg) {
|
||||
var T, k;
|
||||
|
||||
if (this == null) {
|
||||
throw new TypeError(" this is null or not defined");
|
||||
}
|
||||
|
||||
// 1. Let O be the result of calling ToObject passing the |this| value as the argument.
|
||||
var O = Object(this);
|
||||
|
||||
// 2. Let lenValue be the result of calling the Get internal method of O with the argument "length".
|
||||
// 3. Let len be ToUint32(lenValue).
|
||||
var len = O.length >>> 0;
|
||||
|
||||
// 4. If IsCallable(callback) is false, throw a TypeError exception.
|
||||
// See: http://es5.github.com/#x9.11
|
||||
if (typeof callback !== "function") {
|
||||
throw new TypeError(callback + " is not a function");
|
||||
}
|
||||
|
||||
// 5. If thisArg was supplied, let T be thisArg; else let T be undefined.
|
||||
if (arguments.length > 1) {
|
||||
T = thisArg;
|
||||
}
|
||||
|
||||
// 6. Let k be 0
|
||||
k = 0;
|
||||
|
||||
// 7. Repeat, while k < len
|
||||
while (k < len) {
|
||||
|
||||
var kValue;
|
||||
|
||||
// a. Let Pk be ToString(k).
|
||||
// This is implicit for LHS operands of the in operator
|
||||
// b. Let kPresent be the result of calling the HasProperty internal method of O with argument Pk.
|
||||
// This step can be combined with c
|
||||
// c. If kPresent is true, then
|
||||
if (k in O) {
|
||||
|
||||
// i. Let kValue be the result of calling the Get internal method of O with argument Pk.
|
||||
kValue = O[k];
|
||||
|
||||
// ii. Call the Call internal method of callback with T as the this value and
|
||||
// argument list containing kValue, k, and O.
|
||||
callback.call(T, kValue, k, O);
|
||||
}
|
||||
// d. Increase k by 1.
|
||||
k++;
|
||||
}
|
||||
// 8. return undefined
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
// Polyfill: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some
|
||||
if (!Array.prototype.some) {
|
||||
Array.prototype.some = function(fun /*, thisArg */)
|
||||
{
|
||||
'use strict';
|
||||
|
||||
if (this === void 0 || this === null)
|
||||
throw new TypeError();
|
||||
|
||||
var t = Object(this);
|
||||
var len = t.length >>> 0;
|
||||
if (typeof fun !== 'function')
|
||||
throw new TypeError();
|
||||
|
||||
var thisArg = arguments.length >= 2 ? arguments[1] : void 0;
|
||||
for (var i = 0; i < len; i++)
|
||||
{
|
||||
if (i in t && fun.call(thisArg, t[i], i, t))
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
(function() {
|
||||
|
||||
function pad(num, bytes, base) {
|
||||
num = num.toString(base || 8);
|
||||
return "000000000000".substr(num.length + 12 - bytes) + num;
|
||||
}
|
||||
|
||||
/*
|
||||
struct posix_header { // byte offset
|
||||
char name[100]; // 0
|
||||
char mode[8]; // 100
|
||||
char uid[8]; // 108
|
||||
char gid[8]; // 116
|
||||
char size[12]; // 124
|
||||
char mtime[12]; // 136
|
||||
char chksum[8]; // 148
|
||||
char typeflag; // 156
|
||||
char linkname[100]; // 157
|
||||
char magic[6]; // 257
|
||||
char version[2]; // 263
|
||||
char uname[32]; // 265
|
||||
char gname[32]; // 297
|
||||
char devmajor[8]; // 329
|
||||
char devminor[8]; // 337
|
||||
char prefix[155]; // 345
|
||||
// 500
|
||||
};
|
||||
*/
|
||||
|
||||
var headerFormat = [
|
||||
{
|
||||
'field': 'filename',
|
||||
'length': 100,
|
||||
'type': 'string'
|
||||
},
|
||||
{
|
||||
'field': 'mode',
|
||||
'length': 8,
|
||||
'type': 'number'
|
||||
},
|
||||
{
|
||||
'field': 'uid',
|
||||
'length': 8,
|
||||
'type': 'number'
|
||||
},
|
||||
{
|
||||
'field': 'gid',
|
||||
'length': 8,
|
||||
'type': 'number'
|
||||
},
|
||||
{
|
||||
'field': 'size',
|
||||
'length': 12,
|
||||
'type': 'number'
|
||||
},
|
||||
{
|
||||
'field': 'mtime',
|
||||
'length': 12,
|
||||
'type': 'number'
|
||||
},
|
||||
{
|
||||
'field': 'checksum',
|
||||
'length': 8,
|
||||
'type': 'number'
|
||||
},
|
||||
{
|
||||
'field': 'type',
|
||||
'length': 1,
|
||||
'type': 'number'
|
||||
},
|
||||
{
|
||||
'field': 'linkName',
|
||||
'length': 100,
|
||||
'type': 'string'
|
||||
},
|
||||
{
|
||||
'field': 'ustar',
|
||||
'length': 8,
|
||||
'type': 'string'
|
||||
},
|
||||
{
|
||||
'field': 'owner',
|
||||
'length': 32,
|
||||
'type': 'string'
|
||||
},
|
||||
{
|
||||
'field': 'group',
|
||||
'length': 32,
|
||||
'type': 'string'
|
||||
},
|
||||
{
|
||||
'field': 'majorNumber',
|
||||
'length': 8,
|
||||
'type': 'number'
|
||||
},
|
||||
{
|
||||
'field': 'minorNumber',
|
||||
'length': 8,
|
||||
'type': 'number'
|
||||
},
|
||||
{
|
||||
'field': 'filenamePrefix',
|
||||
'length': 155,
|
||||
'type': 'string'
|
||||
},
|
||||
{
|
||||
'field': 'padding',
|
||||
'length': 12
|
||||
}
|
||||
];
|
||||
|
||||
function clean(length) {
|
||||
var i, buffer = new Buffer(length);
|
||||
for (i = 0; i < length; i += 1) {
|
||||
buffer[i] = 0;
|
||||
}
|
||||
return buffer;
|
||||
}
|
||||
|
||||
function formatHeader(data) {
|
||||
var buffer = [];
|
||||
offset = 0;
|
||||
|
||||
headerFormat.forEach(function (value) {
|
||||
var v = data[value.field] || "";
|
||||
for (var i = 0; i < v.length; ++i) {
|
||||
buffer[offset + i] = v[i];
|
||||
}
|
||||
offset += value.length;
|
||||
});
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
||||
var totalRead = 0,
|
||||
recordSize = 512,
|
||||
fileBuffer,
|
||||
leftToRead,
|
||||
fileTypes = [
|
||||
'normal', 'hard-link', 'symbolic-link', 'character-special', 'block-special', 'directory', 'fifo', 'contiguous-file'
|
||||
];
|
||||
|
||||
function filterDecoder(input) {
|
||||
var filter = [];
|
||||
if (!input) {
|
||||
return [0, 7];
|
||||
}
|
||||
|
||||
if (typeof input === 'string') {
|
||||
input = [].push(input);
|
||||
}
|
||||
|
||||
if (!(input instanceof Array)) {
|
||||
console.error('Invalid fileType. Only Arrays or strings are accepted');
|
||||
return;
|
||||
}
|
||||
|
||||
input.forEach(function (i) {
|
||||
var index = fileTypes.indexOf(i);
|
||||
if (index < 0) {
|
||||
console.error('Filetype not valid. Ignoring input:', i);
|
||||
return;
|
||||
}
|
||||
|
||||
filter.push(i);
|
||||
});
|
||||
|
||||
return filter;
|
||||
}
|
||||
|
||||
function readInt(value) {
|
||||
return parseInt(value.replace(/^0*/, ''), 8) || 0;
|
||||
}
|
||||
|
||||
function readString(buf) {
|
||||
var str = '';
|
||||
for (var i = 0; i < buf.length; ++i) {
|
||||
if (buf[i] == 0) { break; }
|
||||
str += String.fromCharCode(buf[i]);
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
function doHeader(buf, cb) {
|
||||
var data = {}, offset = 0, checksum = 0;
|
||||
|
||||
function updateChecksum(value) {
|
||||
var i, length;
|
||||
|
||||
for (i = 0, length = value.length; i < length; i += 1) {
|
||||
checksum += value.charCodeAt(i);
|
||||
}
|
||||
}
|
||||
|
||||
headerFormat.some(function (field) {
|
||||
var tBuf = buf.subarray(offset, offset + field.length),
|
||||
tString = String.fromCharCode.apply(null, tBuf);
|
||||
|
||||
offset += field.length;
|
||||
|
||||
if (field.field === 'ustar' && !/ustar/.test(tString)) {
|
||||
// end the loop if not using the extended header
|
||||
return true;
|
||||
} else if (field.field === 'checksum') {
|
||||
updateChecksum(' ');
|
||||
} else {
|
||||
updateChecksum(tString);
|
||||
}
|
||||
|
||||
if (field.type === 'string') {
|
||||
data[field.field] = readString(tBuf);
|
||||
} else if (field.type === 'number') {
|
||||
data[field.field] = readInt(tString);
|
||||
}
|
||||
});
|
||||
|
||||
if (checksum !== data.checksum) {
|
||||
cb.call(this, 'Checksum not equal', checksum, data.checksum);
|
||||
return false;
|
||||
}
|
||||
|
||||
cb.call(this, null, data, recordSize);
|
||||
return true;
|
||||
}
|
||||
|
||||
function readTarFile(state, data) {
|
||||
var fileBuffer = new Uint8Array(data.size);
|
||||
fileBuffer.set(state.buffer.subarray(0, data.size));
|
||||
state.files.push({
|
||||
'meta': data,
|
||||
'buffer': fileBuffer
|
||||
});
|
||||
}
|
||||
|
||||
function removeTrailingNulls(state) {
|
||||
// If we're not an even multiple, account for trailing nulls
|
||||
if (state.totalRead % recordSize) {
|
||||
var bytesBuffer = recordSize - (state.totalRead % recordSize);
|
||||
|
||||
// If we don't have enough bytes to account for the nulls
|
||||
if (state.buffer.length < bytesBuffer) {
|
||||
state.totalRead += bytesBuffer;
|
||||
return;
|
||||
}
|
||||
|
||||
// Throw away trailing nulls
|
||||
state.buffer = state.buffer.subarray(bytesBuffer);
|
||||
state.totalRead += bytesBuffer;
|
||||
}
|
||||
}
|
||||
|
||||
function processTar(state) {
|
||||
if (state.totalRead == 0) {
|
||||
// Remove trailing nulls.
|
||||
removeTrailingNulls(state);
|
||||
}
|
||||
|
||||
// Check to see if/when we are done.
|
||||
if (state.buffer.length < recordSize) {
|
||||
state.cb('done', state.totalRead, state.files, null);
|
||||
return;
|
||||
}
|
||||
|
||||
state.cb('working', state.totalRead, state.files, null);
|
||||
|
||||
doHeader.call(this, state.buffer, function (err, data, rOffset) {
|
||||
if (err) {
|
||||
if (rOffset === 0) {
|
||||
state.cb('done', state.totalRead, state.files, null);
|
||||
return;
|
||||
}
|
||||
return state.cb('error', state.totalRead, state.files, err);
|
||||
}
|
||||
|
||||
// Update total; rOffset should always be 512
|
||||
state.totalRead += rOffset;
|
||||
state.buffer = state.buffer.subarray(rOffset);
|
||||
|
||||
// Read the tar file contents.
|
||||
readTarFile(state, data);
|
||||
|
||||
// Update the total and offset.
|
||||
state.totalRead += data.size;
|
||||
state.buffer = state.buffer.subarray(data.size);
|
||||
|
||||
// Remove trailing nulls.
|
||||
removeTrailingNulls(state);
|
||||
|
||||
if (state.buffer.length > 0) {
|
||||
setTimeout(function() {
|
||||
processTar(state);
|
||||
}, 0);
|
||||
} else {
|
||||
state.cb('done', state.totalRead, state.files, null);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
* Extract data from an input.
|
||||
*
|
||||
* @param data The data, in Uint8Array form.
|
||||
*/
|
||||
function Untar(data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
Untar.prototype.process = function(cb, opt_filter) {
|
||||
return processTar({
|
||||
'cb': cb,
|
||||
'buffer': this.data,
|
||||
'fileTypes': filterDecoder(opt_filter || []),
|
||||
'totalRead': 0,
|
||||
'files': []
|
||||
});
|
||||
};
|
||||
|
||||
window.Untar = Untar;
|
||||
|
||||
})();
|
|
@ -173,22 +173,6 @@
|
|||
<!-- Convert account dialog -->
|
||||
<div class="convert-user-to-org" info="convertAccountInfo"></div>
|
||||
|
||||
<!-- Modal message dialog -->
|
||||
<div class="co-dialog modal fade" id="clientTokenModal">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title">Encrypted Password</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div style="margin-bottom: 10px;">Your generated encrypted password:</div>
|
||||
<div class="copy-box" value="generatedClientToken"></div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Dismiss</button>
|
||||
</div>
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
<!-- Credentials for encrypted passwords -->
|
||||
<div class="credentials-dialog" credentials="context.encryptedPasswordCredentials" secret-title="Encrypted Password" entity-title="encrypted password" entity-icon="fa-key">
|
||||
</div>
|
||||
|
|
Reference in a new issue