Permalink
Browse files

Fix #2

  • Loading branch information...
amarkelov
amarkelov committed Dec 11, 2017
1 parent 33121b9 commit 362888faacce8a28b0a9e001bb7629706183946a
@@ -0,0 +1,9 @@
Copyright 2017 Andrey Markelov
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

This file was deleted.

Oops, something went wrong.
@@ -63,6 +63,7 @@
<version>${amps.version}</version>
<extensions>true</extensions>
<configuration>
<compressResources>false</compressResources>
<productVersion>${jira.version}</productVersion>
<productDataVersion>${jira.version}</productDataVersion>
</configuration>
@@ -18,6 +18,7 @@
<!-- Web Resources -->
<web-resource key="prom-for-jira-exporter-resources" name="Web Resources">
<dependency>com.atlassian.auiplugin:ajs</dependency>
<resource type="download" name="vue.min.js" location="/ru/andreymarkelov/atlas/plugins/promjiraexporter/js/vue.min.js"/>
<resource type="download" name="images/" location="/ru/andreymarkelov/atlas/plugins/promjiraexporter/images"/>
<context>prom-for-jira-exporter</context>
</web-resource>

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -7,6 +7,7 @@
$webResourceManager.requireResource("jira.webresources:global-static")
$webResourceManager.requireResource("jira.webresources:jira-global")
$webResourceManager.requireResource("com.atlassian.auiplugin:ajs")
$webResourceManager.requireResourcesForContext("prom-for-jira-exporter")
</head>
<body class="aui">
<section id="content" role="main">
@@ -29,23 +30,46 @@
</p>
</div>
#end
<form class="aui" name="jiraform" method="post" action="PromForJiraSecureTokenConfigAction.jspa">
<input type="hidden" name="atl_token" value="$atl_token"/>
<div class="field-group">
<label for="token">$action.getText("ru.andreymarkelov.atlas.plugins.promjiraexporter.settings.token"):</label>
<input class="text long-field" type="text" id="token" name="token" value="$token"/>
#if($action.getErrors().containsKey("token"))<div class="error">$action.getErrors().get("token")</div>#end
<div class="description">$i18n.getText("ru.andreymarkelov.atlas.plugins.promjiraexporter.settings.token.desc")</div>
</div>
<div class="buttons-container">
<div class="buttons">
<input class="button submit" type="submit" value='$i18n.getText("ru.andreymarkelov.atlas.plugins.promjiraexporter.settings.action.save")'/>
<div id="base-form">
<form class="aui" name="jiraform" method="post" action="PromForJiraSecureTokenConfigAction.jspa">
<input type="hidden" name="atl_token" value="$atl_token"/>
<div class="field-group">
<label for="token">$action.getText("ru.andreymarkelov.atlas.plugins.promjiraexporter.settings.token"):</label>
<input class="text long-field" v-model="storedToken" type="text" id="token" name="token"/>
<button class="aui-button" @click.prevent="generateToken">Generate</button>
#if($action.getErrors().containsKey("token"))<div class="error">$action.getErrors().get("token")</div>#end
<div class="description">$i18n.getText("ru.andreymarkelov.atlas.plugins.promjiraexporter.settings.token.desc")</div>
</div>
</div>
</form>
<div class="buttons-container">
<div class="buttons">
<input class="button submit" type="submit" value='$i18n.getText("ru.andreymarkelov.atlas.plugins.promjiraexporter.settings.action.save")'/>
</div>
</div>
</form>
</div>
</section>
</div>
</div>
</section>
<script>
new Vue({
el: "#base-form",
data() {
return {
storedToken: "$!{token}",
possible: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
}
},
methods: {
generateToken: function () {
var res = "";
for (var i = 0; i < 35; i++) {
res += this.possible.charAt(Math.floor(Math.random() * this.possible.length));
}
this.storedToken = res;
}
}
});
</script>
</body>
</html>

0 comments on commit 362888f

Please sign in to comment.