Skip to content

Commit

Permalink
Can release components again
Browse files Browse the repository at this point in the history
  • Loading branch information
yazz committed Nov 17, 2023
1 parent 538d119 commit d077a6f
Showing 1 changed file with 72 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ load_once_from_file(true)
// ******** DATA ********
return {
commit_pane_description: "",
releaseMessage: "",
releaseErrorMessage: "",

selectedTab: "history",

Expand Down Expand Up @@ -299,6 +301,40 @@ load_once_from_file(true)
<!-- --------------------------- RELEASE PANE ------------------------------
| --------------
|
|
|
-------------------------------------------------------------------------- -->
<div v-if='selectedTab=="release"' style="padding:15px;">
<!-- ----------------------------------------------
Old release button
---------------------------------------------- -->
<div style='margin-top: 20px;padding-bottom: 40vh;'>
<button type=button
class=' btn btn-info btn-lg'
v-on:click='releaseCodePressed()' >Old release</button>
</div>
<div style="color:black">{{releaseMessage}}</div>
<div style="color:red">{{releaseErrorMessage}}</div>
</div>
<!-- --------------------------- END OF PANES ------------------------------
| ---------------
|
Expand All @@ -310,6 +346,42 @@ load_once_from_file(true)
mounted: async function() {
},
methods: {
releaseCodePressed: async function ( ) {
//----------------------------------------------------------------------------------
//
// /-------------------------------------/
// / releaseCodePressed /
// /-------------------------------------/
//
//----------------------------------------------------------------------------
// This tries to release the current commit as the release version
// of the app
//--------------------------------------------------------------------
try {
let mm = this
showProgressBar()

let postAppUrl = "http" + (($HOSTPORT == 443)?"s":"") + "://" + $HOST + "/http_post_release_commit"
callAjaxPost(postAppUrl,
{
code_id: mm.codeId
,
user_id: "xyz"
}
,
async function(response){
let responseJson = JSON.parse(response)

mm.releaseMessage = "Release successful"
hideProgressBar()
})

} catch (e) {
hideProgressBar()
mm.releaseErrorMessage = "Error in release: " + JSON.stringify(e,null,2)
//this.checkSavedFile()
}
},

// editor interface
switchTab: async function ( { tabName } ) {
Expand Down

0 comments on commit d077a6f

Please sign in to comment.