<commit_before>(ns webapp.framework.client.webhosting.hostmain
  (:require
   [webapp.framework.client.coreclient   :as c ]
    [om.core :as om :include-macros true]
   [cljs.core.async  :refer [put! chan <! pub timeout]]
    )
  (:use-macros
   [webapp.framework.client.coreclient  :only [ns-coils defn-ui-component def-coils-app
                                               container  map-many  inline  text log sql textarea a
                                               div img pre component h2 input section header button label form iframe
                                               write-ui read-ui container input component <-- data-view-result-set
                                               h1 h2 h3 h4 h5 h6 span  data-view-v2 select dselect realtime drealtime
                                               input-field remote
                                               ]])
  (:require-macros
   [cljs.core.async.macros :refer [go alt!]]))
(ns-coils 'webapp.framework.client.webhosting.hostmain)





(defn-ui-component     editor-component   [app]
 {:on-mount
  (do  (go (if  (read-ui app [:app-id])
             (let [x (remote  !getfilecontents  {:id (read-ui app [:app-id]) })]
               (js/createEditor)
               (js/populateEditor (get x :value))))))}


  (div {}
            (div {:style {:display "inline-block" :width "1200" :height "800" :verticalAlign "top"}}
                 (textarea {:id "cm" :style {:display "inline-block" :width "1200" :height "800"}} ""))

            (iframe {:style {:display "inline-block"} :src "http://127.0.0.1:3450" :width "600" :height "800"})))











(defn-ui-component     browser-component   [app]  {}


  (div {:style {:margin "30px"}}
       (select id, application_name from coils_applications {}
               (div nil


                    (cond
                      (and (= (read-ui app [:submode]) "editappname") (= (<-- :id ) (read-ui app [:app-id])))
                      (input-field {:style {:marginBottom "20px"} :placeholder  "Enter name"}
                                   app
                                   (fn [new-name]
                                     (let [id (read-ui app [:app-id])]
                                       (go
                                         (sql "update  coils_applications
                                              set application_name = ?
                                              where id = ?"
                                              [new-name id ]  )
                                         ;(js/alert (str new-name ":" id))<commit_msg>Show the new app name when renaming an app<commit_after>(ns webapp.framework.client.webhosting.hostmain
  (:require
   [webapp.framework.client.coreclient   :as c ]
    [om.core :as om :include-macros true]
   [cljs.core.async  :refer [put! chan <! pub timeout]]
    )
  (:use-macros
   [webapp.framework.client.coreclient  :only [ns-coils defn-ui-component def-coils-app
                                               container  map-many  inline  text log sql textarea a
                                               div img pre component h2 input section header button label form iframe
                                               write-ui read-ui container input component <-- data-view-result-set
                                               h1 h2 h3 h4 h5 h6 span  data-view-v2 select dselect realtime drealtime
                                               input-field remote
                                               ]])
  (:require-macros
   [cljs.core.async.macros :refer [go alt!]]))
(ns-coils 'webapp.framework.client.webhosting.hostmain)





(defn-ui-component     editor-component   [app]
 {:on-mount
  (do  (go (if  (read-ui app [:app-id])
             (let [x (remote  !getfilecontents  {:id (read-ui app [:app-id]) })]
               (js/createEditor)
               (js/populateEditor (get x :value))))))}


  (div {}
            (div {:style {:display "inline-block" :width "1200" :height "800" :verticalAlign "top"}}
                 (textarea {:id "cm" :style {:display "inline-block" :width "1200" :height "800"}} ""))

            (iframe {:style {:display "inline-block"} :src "http://127.0.0.1:3450" :width "600" :height "800"})))











(defn-ui-component     browser-component   [app]  {}


  (div {:style {:margin "30px"}}
       (select id, application_name from coils_applications {}
               (div nil


                    (cond
                      (and (= (read-ui app [:submode]) "editappname") (= (<-- :id ) (read-ui app [:app-id])))
                      (input-field {:style {:marginBottom "20px" :color "black"} :placeholder  "Enter name"}
                                   app
                                   (fn [new-name]
                                     (let [id (read-ui app [:app-id])]
                                       (go
                                         (sql "update  coils_applications
                                              set application_name = ?
                                              where id = ?"
                                              [new-name id ]  )
                                         ;(js/alert (str new-name ":" id))
{'fraction_non_alphanumeric': 0.1179047619047619, 'fraction_numerical': 0.016, 'mean_word_length': 1.229723991507431, 'pattern_counts': {'":': 2, '<': 9, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 54, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5995621', 'n_tokens_mistral': 1455, 'n_tokens_neox': 1334, 'n_words': 363}