Skip to content

Commit

Permalink
Merge pull request #5 from ozdemirozcelik/ticker_update
Browse files Browse the repository at this point in the history
fix for ref. error.
  • Loading branch information
ozdemirozcelik authored Apr 7, 2023
2 parents 69297f4 + f3b2250 commit 807e9f0
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 41 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@ jobs:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download coverage badge
- name: Checkout
uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: coverage-badge
path: tests
- name: Push the badge to repo
- name: Push new badge to repo
run: |
git config user.name github-actions
git config user.email [email protected]
Expand Down
5 changes: 2 additions & 3 deletions static/pairs.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ function postSave_pairs() {
// create span element according to pair status
if (jsonResponse.status) {
li.innerHTML = "<span title='active' class='roundgreen'></span>";
} else if (pairs_data.pairs[key].status==0) {
} else if (jsonResponse.status==0) {
li.innerHTML = "<span title='passive' class='roundred'></span>";
} else {
li.innerHTML = "<span title='watch' class='roundyellow'></span>";
Expand All @@ -299,9 +299,8 @@ function postSave_pairs() {
li.setAttribute('id', pair_text);
li.appendChild(document.createTextNode(pair_text));
pairlist.insertBefore(li, pairlist.firstChild);

// add onclick event listener for each list element
dynamiclistener_signal(pair_text)
dynamiclistener_pair(pair_text)

createPages_pairs();

Expand Down
4 changes: 3 additions & 1 deletion static/tickers.js
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,10 @@ function postSave() {

li.setAttribute('id', ticker.value.toUpperCase());
li.appendChild(document.createTextNode(ticker.value.toUpperCase()));
li.setAttribute("onclick", "Update(this)");
// li.setAttribute("onclick", "Update(this)");
stklist.insertBefore(li, stklist.firstChild);
// add onclick event listener for each list element
dynamiclistener_ticker(ticker.value.toUpperCase())

createPages();

Expand Down
28 changes: 14 additions & 14 deletions templates/setup.html
Original file line number Diff line number Diff line change
Expand Up @@ -207,11 +207,11 @@ <h3> Webhook Simulator </h3>
</p>
<p>
<label for="order_contracts"># of Contracts(*):&nbsp;</label>
<input type="text" name="order_contracts" id="order_contracts" class="integer" title="Integers only" pattern="[0-9]+" required placeholder="###">
<input type="text" name="order_contracts" id="order_contracts" class="integer" title="Integers only" pattern="^$|[0-9]+" required placeholder="###">
</p>
<p>
<label for="order_price">Order Price:&nbsp;</label>
<input type="text" name="order_price" id="order_price" class="float" title="Decimals only" pattern="^[1-9]\d*(\.\d+)?$" required placeholder="##.##">
<input type="text" name="order_price" id="order_price" class="float" title="Decimals only" pattern="^$|^[1-9]\d*(\.\d+)?$" placeholder="##.##">
</p>
<p>
<label for="mar_pos">Market Position:&nbsp;</label>
Expand All @@ -224,7 +224,7 @@ <h3> Webhook Simulator </h3>
</p>
<p>
<label for="mar_pos_size">Mar. Pos. Size:&nbsp;</label>
<input type="text" name="mar_pos_size" id="mar_pos_size" class="integer" class="integer" title="Integers only" pattern="[0-9]+" required placeholder="###">
<input type="text" name="mar_pos_size" id="mar_pos_size" class="integer" class="integer" title="Integers only" pattern="^$|[0-9]+" placeholder="###">
</p>
<p>
<label for="pre_mar_pos">Previous Mar. Pos.:&nbsp;</label>
Expand All @@ -237,11 +237,11 @@ <h3> Webhook Simulator </h3>
</p>
<p>
<label for="pre_mar_pos_size">Pre. Mar. Pos. Size:&nbsp</label>
<input type="text" name="pre_mar_pos_size" id="pre_mar_pos_size" class="integer" class="integer" title="Integers only" pattern="[0-9]+" required placeholder="###">
<input type="text" name="pre_mar_pos_size" id="pre_mar_pos_size" class="integer" class="integer" title="Integers only" pattern="^$|[0-9]+" placeholder="###">
</p>
<p>
<label for="passphrase">Passphrase(*):&nbsp</label>
<input type="text" name="passphrase" id="passphrase" autocomplete='passphrase'>
<input type="text" name="passphrase" id="passphrase" autocomplete='passphrase' required>
</p>
<br>
<p>
Expand Down Expand Up @@ -341,12 +341,12 @@ <h3> Update Signal </h3>
</p>
<p>
<label for="order_contracts_update"># Contracts(*):&nbsp;</label>
<input type="text" name="order_contracts" id="order_contracts-update" class="integer" title="Integers only" pattern="[0-9]+" required placeholder="###">
<input type="text" name="order_contracts" id="order_contracts_update" class="integer" title="Integers only" pattern="[0-9]+" required placeholder="###">

</p>
<p>
<label for="order_price_update">Order Price:&nbsp;</label>
<input type="text" name="order_price" id="order_price_update" class="float" title="Decimals only" pattern="^[1-9]\d*(\.\d+)?$" required placeholder="##.##">
<input type="text" name="order_price" id="order_price_update" class="float" title="Decimals only" pattern="^[1-9]\d*(\.\d+)?$" placeholder="##.##">
</p>
<p>
<label for="mar_pos_update">Mar. Position:&nbsp;</label>
Expand All @@ -359,7 +359,7 @@ <h3> Update Signal </h3>
</p>
<p>
<label for="mar_pos_size_update">Mar. Pos. Size:&nbsp;</label>
<input type="text" name="mar_pos_size" id="mar_pos_size_update" class="integer" class="integer" title="Integers only" pattern="[0-9]+" required placeholder="###">
<input type="text" name="mar_pos_size" id="mar_pos_size_update" class="integer" class="integer" title="Integers only" pattern="[0-9]+" placeholder="###">
</p>
<p>
<label for="pre_mar_pos_update">Pre. Mar. Pos.:&nbsp;</label>
Expand All @@ -372,7 +372,7 @@ <h3> Update Signal </h3>
</p>
<p>
<label for="pre_mar_pos_size_update">Pre.Mar.Pos.Size:&nbsp;</label>
<input type="text" name="pre_mar_pos_size" id="pre_mar_pos_size_update" class="integer" class="integer" title="Integers only" pattern="[0-9]+" required placeholder="###">
<input type="text" name="pre_mar_pos_size" id="pre_mar_pos_size_update" class="integer" class="integer" title="Integers only" pattern="[0-9]+" placeholder="###">
</p>

<p>
Expand Down Expand Up @@ -430,7 +430,7 @@ <h3> Update Signal </h3>
</p>
<p>
<label for="passphrase">Passphrase(*):&nbsp</label>
<input type="text" name="passphrase" id="passphrase_update" autocomplete='passphrase'>
<input type="text" name="passphrase" id="passphrase_update" autocomplete='passphrase' required >
</p>


Expand Down Expand Up @@ -489,12 +489,12 @@ <h3> Add Pair </h3>
</select>
</p>
<p>
<label for="hedge">Hedge:&nbsp;</label>
<label for="hedge">Hedge(*):&nbsp;</label>
<input type="text" title="Decimals only" name="hedge" id="hedge" class="float" pattern="^[1-9]\d*(\.\d+)?$" required placeholder="#.##">
<input name="status" type="hidden" value="0"/>
</p>
<p>
<label for="contracts">Contracts:&nbsp;</label>
<label for="contracts">Contracts(*):&nbsp;</label>
<input type="text" title="Integers only" name="contracts" id="contracts" class="integer" pattern="[0-9]+" required placeholder="###">
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
</p>
Expand Down Expand Up @@ -568,11 +568,11 @@ <h3> Update Pair </h3>
</p>
<br>
<p>
<label for="hedge-update">Hedge Value:&nbsp;</label>
<label for="hedge-update">Hedge(*):&nbsp;</label>
<input type="text" title="Decimals only" name="hedge" id="hedge-update" class="float" pattern="^[1-9]\d*(\.\d+)?$" required placeholder="#.##">
</p>
<p>
<label for="contracts-update">Contracts:&nbsp;</label>
<label for="contracts-update">Contracts(*):&nbsp;</label>
<input type="text" title="Integers only" name="contracts" id="contracts-update" class="integer" pattern="[0-9]+" required placeholder="###">
</p>
<p>
Expand Down
21 changes: 0 additions & 21 deletions tests/coverage.svg

This file was deleted.

0 comments on commit 807e9f0

Please sign in to comment.