| @@ -27,6 +27,7 @@ const ( | |||
| JobTypeDebug JobType = "DEBUG" | |||
| JobTypeBenchmark JobType = "BENCHMARK" | |||
| JobTypeSnn4imagenet JobType = "SNN4IMAGENET" | |||
| JobTypeBrainScore JobType = "BRAINSCORE" | |||
| ModelArtsCreateQueue ModelArtsJobStatus = "CREATE_QUEUING" //免费资源创建排队中 | |||
| ModelArtsCreating ModelArtsJobStatus = "CREATING" //创建中 | |||
| @@ -16,6 +16,7 @@ const ( | |||
| ModelMountPath = "/model" | |||
| BenchMarkMountPath = "/benchmark" | |||
| Snn4imagenetMountPath = "/snn4imagenet" | |||
| BrainScoreMountPath = "/brainscore" | |||
| TaskInfoName = "/taskInfo" | |||
| SubTaskName = "task1" | |||
| @@ -4,10 +4,10 @@ import ( | |||
| "bytes" | |||
| "encoding/base64" | |||
| "encoding/json" | |||
| "fmt" | |||
| "io/ioutil" | |||
| "net/http" | |||
| "code.gitea.io/gitea/modules/log" | |||
| "code.gitea.io/gitea/modules/setting" | |||
| ) | |||
| @@ -99,8 +99,8 @@ type ResultInfo struct { | |||
| //elk输出的json结构end | |||
| //发送post请求到elk | |||
| func SendReqToElk(jsonStr []byte) (content string) { | |||
| //处理返回的elk数据,只保留totalView,即访问量;loaded是分片载入次数,用来判断返回的数据是否准确 | |||
| func GetResultFromElk(resultInfo ResultInfo, jsonStr []byte) (loaded int, totalView int, err error) { | |||
| ElkBase64Init := setting.ElkUser + ":" + setting.ElkPassword | |||
| ElkBase64 := base64.StdEncoding.EncodeToString([]byte(ElkBase64Init)) | |||
| BasicElkBase64 := "Basic" + " " + ElkBase64 | |||
| @@ -117,15 +117,11 @@ func SendReqToElk(jsonStr []byte) (content string) { | |||
| } | |||
| defer resp.Body.Close() | |||
| body, _ := ioutil.ReadAll(resp.Body) | |||
| return string(body) | |||
| } | |||
| //处理返回的elk数据,只保留totalView,即访问量;loaded是分片载入次数,用来判断返回的数据是否准确 | |||
| func GetResultFromElk(resultinfo ResultInfo, jobResult string) (loaded int, totalView int) { | |||
| var resultTest ResultInfo | |||
| errs := json.Unmarshal([]byte(jobResult), &resultTest) | |||
| fmt.Println(errs) | |||
| return resultTest.Result.Loaded, resultTest.Result.RawResponse.Hits.Total | |||
| errs := json.Unmarshal([]byte(string(body)), &resultInfo) | |||
| log.Info("Get resultJson failed", errs) | |||
| return resultInfo.Result.Loaded, resultInfo.Result.RawResponse.Hits.Total, err | |||
| } | |||
| //初始化传给elk的数据结构,给定用户名和项目名,查询的起止时间,返回初始化后的结构 | |||
| @@ -211,23 +207,23 @@ func TagNameInit(MessageInfo string, Tagname string, Gte string, Lte string) (pr | |||
| } | |||
| //向elk发送请求,将获取的结果只保留访问量,输入是初始化后的数据结构,返回访问量 | |||
| func ViewInfo(viewInfo InputInfo) (totalView int) { | |||
| func ViewInfo(viewInfo InputInfo) (totalView int, err error) { | |||
| jsons, errs := json.Marshal(viewInfo) | |||
| if errs != nil { | |||
| fmt.Println("errs:", errs.Error()) | |||
| log.Info("errs:", errs) | |||
| } | |||
| // fmt.Println("viewInfoInit:",string(jsons)) | |||
| var jsonStr = []byte(jsons) | |||
| var resultInfo ResultInfo | |||
| loaded, totalView := GetResultFromElk(resultInfo, SendReqToElk(jsonStr)) | |||
| loaded, totalView, err := GetResultFromElk(resultInfo, jsonStr) | |||
| time := 0 | |||
| for { | |||
| if loaded == 0 { | |||
| loaded_next, totalView := GetResultFromElk(resultInfo, SendReqToElk(jsonStr)) | |||
| loaded_next, totalView, err := GetResultFromElk(resultInfo, jsonStr) | |||
| time++ | |||
| log.Info("time:", time) | |||
| if loaded_next != 0 && time < 100 { | |||
| fmt.Println("totalView:", totalView) | |||
| return totalView | |||
| return totalView, err | |||
| } | |||
| if time > 100 { | |||
| break | |||
| @@ -236,20 +232,20 @@ func ViewInfo(viewInfo InputInfo) (totalView int) { | |||
| break | |||
| } | |||
| } | |||
| fmt.Println("loaded:", loaded) | |||
| return totalView | |||
| return totalView, err | |||
| } | |||
| // @title ProjectView | |||
| // @title AppointProjectView | |||
| // @description 获取指定用户和项目的访问量 | |||
| // @param User string "用户名" | |||
| // @param Project string "项目名" | |||
| // @param Gte string "起始时间" 如time.Now().AddDate(0, 0, -1).Format(time.RFC3339) | |||
| // @param Lte string "结束时间" 如time.Now().Format(time.RFC3339) | |||
| // @return totalView int "访问量" | |||
| func AppointProjectView(User string, Project string, Gte string, Lte string) (totalView int) { | |||
| InitInfo := ProjectViewInit(User, Project, Gte, Lte) | |||
| return ViewInfo(InitInfo) | |||
| func AppointProjectView(User string, Project string, Gte string, Lte string) (totalView int, err error) { | |||
| ProjectViewInitInfo := ProjectViewInit(User, Project, Gte, Lte) | |||
| ProjectTotalView, err := ViewInfo(ProjectViewInitInfo) | |||
| return ProjectTotalView, err | |||
| } | |||
| //统计项目相关页面的访问量 | |||
| @@ -287,26 +283,44 @@ type ProjectInfo struct { | |||
| Project_forks int | |||
| } | |||
| type ErrorInfo struct { | |||
| Project_dataset_type_0 error | |||
| Project_dataset_type_1 error | |||
| Project_issues error | |||
| Project_labels error | |||
| Project_milestones error | |||
| Project_pulls error | |||
| Project_release error | |||
| Project_wiki error | |||
| Project_activity error | |||
| Project_cloudbrain error | |||
| Project_modelarts error | |||
| Project_blockchain error | |||
| Project_watchers error | |||
| Project_stars error | |||
| Project_forks error | |||
| } | |||
| // @title AllProjectView | |||
| // @description 获取指定用户和项目的访问量 | |||
| // @param Gte string "起始时间" 如time.Now().AddDate(0, 0, -1).Format(time.RFC3339) | |||
| // @param Lte string "结束时间" | |||
| // @return projectInfo ProjectInfo "统计所有项目中页面的浏览情况,不需要区分项目" | |||
| func AllProjectView(Gte string, Lte string) (projectInfo ProjectInfo) { | |||
| projectInfo.Project_dataset_type_0 = ViewInfo(AllProjectViewInit("/datasets?type=0", "%{[request][2]}", Gte, Lte)) | |||
| projectInfo.Project_dataset_type_1 = ViewInfo(AllProjectViewInit("/datasets?type=1", "%{[request][2]}", Gte, Lte)) | |||
| projectInfo.Project_issues = ViewInfo(AllProjectViewInit("/issues HTTP/2.0", "%{[request][2]}", Gte, Lte)) | |||
| projectInfo.Project_labels = ViewInfo(TagNameInit("/labels HTTP/2.0", "labels", Gte, Lte)) | |||
| projectInfo.Project_milestones = ViewInfo(AllProjectViewInit("/milestones HTTP/2.0", "%{[request][2]}", Gte, Lte)) | |||
| projectInfo.Project_pulls = ViewInfo(AllProjectViewInit("/pulls HTTP/2.0", "%{[request][2]}", Gte, Lte)) | |||
| projectInfo.Project_release = ViewInfo(AllProjectViewInit("/release HTTP/2.0", "%{[request][2]}", Gte, Lte)) | |||
| projectInfo.Project_wiki = ViewInfo(AllProjectViewInit("/wiki HTTP/2.0", "%{[request][2]}", Gte, Lte)) | |||
| projectInfo.Project_activity = ViewInfo(AllProjectViewInit("/activity HTTP/2.0", "%{[request][2]}", Gte, Lte)) | |||
| projectInfo.Project_cloudbrain = ViewInfo(AllProjectViewInit("/cloudbrain HTTP/2.0", "%{[request][2]}", Gte, Lte)) | |||
| projectInfo.Project_modelarts = ViewInfo(AllProjectViewInit("/modelarts HTTP/2.0", "%{[request][2]}", Gte, Lte)) | |||
| projectInfo.Project_blockchain = ViewInfo(AllProjectViewInit("/blockchain HTTP/2.0", "%{[request][2]}", Gte, Lte)) | |||
| projectInfo.Project_watchers = ViewInfo(AllProjectViewInit("/watchers HTTP/2.0", "%{[request][2]}", Gte, Lte)) | |||
| projectInfo.Project_stars = ViewInfo(AllProjectViewInit("/stars HTTP/2.0", "%{[request][2]}", Gte, Lte)) | |||
| projectInfo.Project_forks = ViewInfo(AllProjectViewInit("/forks HTTP/2.0", "%{[request][2]}", Gte, Lte)) | |||
| return projectInfo | |||
| func AllProjectView(Gte string, Lte string) (projectViewInfo ProjectInfo, errorInfo ErrorInfo) { | |||
| projectViewInfo.Project_dataset_type_0, errorInfo.Project_dataset_type_0 = ViewInfo(AllProjectViewInit("/datasets?type=0", "%{[request][2]}", Gte, Lte)) | |||
| projectViewInfo.Project_dataset_type_1, errorInfo.Project_dataset_type_1 = ViewInfo(AllProjectViewInit("/datasets?type=1", "%{[request][2]}", Gte, Lte)) | |||
| projectViewInfo.Project_issues, errorInfo.Project_issues = ViewInfo(AllProjectViewInit("/issues HTTP/2.0", "%{[request][2]}", Gte, Lte)) | |||
| projectViewInfo.Project_labels, errorInfo.Project_labels = ViewInfo(TagNameInit("/labels HTTP/2.0", "labels", Gte, Lte)) | |||
| projectViewInfo.Project_milestones, errorInfo.Project_milestones = ViewInfo(AllProjectViewInit("/milestones HTTP/2.0", "%{[request][2]}", Gte, Lte)) | |||
| projectViewInfo.Project_pulls, errorInfo.Project_pulls = ViewInfo(AllProjectViewInit("/pulls HTTP/2.0", "%{[request][2]}", Gte, Lte)) | |||
| projectViewInfo.Project_release, errorInfo.Project_release = ViewInfo(AllProjectViewInit("/release HTTP/2.0", "%{[request][2]}", Gte, Lte)) | |||
| projectViewInfo.Project_wiki, errorInfo.Project_wiki = ViewInfo(AllProjectViewInit("/wiki HTTP/2.0", "%{[request][2]}", Gte, Lte)) | |||
| projectViewInfo.Project_activity, errorInfo.Project_activity = ViewInfo(AllProjectViewInit("/activity HTTP/2.0", "%{[request][2]}", Gte, Lte)) | |||
| projectViewInfo.Project_cloudbrain, errorInfo.Project_cloudbrain = ViewInfo(AllProjectViewInit("/cloudbrain HTTP/2.0", "%{[request][2]}", Gte, Lte)) | |||
| projectViewInfo.Project_modelarts, errorInfo.Project_modelarts = ViewInfo(AllProjectViewInit("/modelarts HTTP/2.0", "%{[request][2]}", Gte, Lte)) | |||
| projectViewInfo.Project_blockchain, errorInfo.Project_blockchain = ViewInfo(AllProjectViewInit("/blockchain HTTP/2.0", "%{[request][2]}", Gte, Lte)) | |||
| projectViewInfo.Project_watchers, errorInfo.Project_watchers = ViewInfo(AllProjectViewInit("/watchers HTTP/2.0", "%{[request][2]}", Gte, Lte)) | |||
| projectViewInfo.Project_stars, errorInfo.Project_stars = ViewInfo(AllProjectViewInit("/stars HTTP/2.0", "%{[request][2]}", Gte, Lte)) | |||
| projectViewInfo.Project_forks, errorInfo.Project_forks = ViewInfo(AllProjectViewInit("/forks HTTP/2.0", "%{[request][2]}", Gte, Lte)) | |||
| return projectViewInfo, errorInfo | |||
| } | |||
| @@ -457,6 +457,11 @@ var ( | |||
| Snn4imagenetCode string | |||
| Snn4imagenetServerHost string | |||
| //snn4imagenet config | |||
| IsBrainScoreEnabled bool | |||
| BrainScoreCode string | |||
| BrainScoreServerHost string | |||
| //blockchain config | |||
| BlockChainHost string | |||
| CommitValidDate string | |||
| @@ -1181,8 +1186,13 @@ func NewContext() { | |||
| sec = Cfg.Section("snn4imagenet") | |||
| IsSnn4imagenetEnabled = sec.Key("ENABLED").MustBool(false) | |||
| Snn4imagenetCode = sec.Key("SNN4IMAGENETCODE").MustString("https://yangzhx:justfortest123@git.openi.org.cn/yangzhx/detection_benchmark_script.git") | |||
| Snn4imagenetServerHost = sec.Key("HOST").MustString("http://192.168.202.90:3366/") | |||
| Snn4imagenetCode = sec.Key("SNN4IMAGENETCODE").MustString("https://yult:19910821ylt@git.openi.org.cn/yult/snn4imagenet_script.git") | |||
| Snn4imagenetServerHost = sec.Key("HOST").MustString("http://192.168.207.76:8080/") | |||
| sec = Cfg.Section("brainscore") | |||
| IsBrainScoreEnabled = sec.Key("ENABLED").MustBool(false) | |||
| BrainScoreCode = sec.Key("BRAINSCORECODE").MustString("https://yult:19910821ylt@git.openi.org.cn/yult/brainscore_script.git") | |||
| BrainScoreServerHost = sec.Key("HOST").MustString("http://192.168.207.76:8080/") | |||
| sec = Cfg.Section("blockchain") | |||
| BlockChainHost = sec.Key("HOST").MustString("http://192.168.136.66:3302/") | |||
| @@ -175,6 +175,9 @@ func cloudBrainNewDataPrepare(ctx *context.Context) error{ | |||
| ctx.Data["snn4imagenet_path"] = cloudbrain.Snn4imagenetMountPath | |||
| ctx.Data["is_snn4imagenet_enabled"] = setting.IsSnn4imagenetEnabled | |||
| ctx.Data["brainscore_path"] = cloudbrain.BrainScoreMountPath | |||
| ctx.Data["is_brainscore_enabled"] = setting.IsBrainScoreEnabled | |||
| return nil | |||
| } | |||
| @@ -198,7 +201,7 @@ func CloudBrainCreate(ctx *context.Context, form auth.CreateCloudBrainForm) { | |||
| codePath := setting.JobPath + jobName + cloudbrain.CodeMountPath | |||
| resourceSpecId := form.ResourceSpecId | |||
| if jobType != string(models.JobTypeBenchmark) && jobType != string(models.JobTypeDebug) && jobType != string(models.JobTypeSnn4imagenet) { | |||
| if jobType != string(models.JobTypeBenchmark) && jobType != string(models.JobTypeDebug) && jobType != string(models.JobTypeSnn4imagenet) && jobType != string(models.JobTypeBrainScore) { | |||
| log.Error("jobtype error:", jobType, ctx.Data["MsgID"]) | |||
| cloudBrainNewDataPrepare(ctx) | |||
| ctx.RenderWithErr("jobtype error", tplCloudBrainNew, &form) | |||
| @@ -247,6 +250,11 @@ func CloudBrainCreate(ctx *context.Context, form auth.CreateCloudBrainForm) { | |||
| downloadRateCode(repo, jobName, setting.Snn4imagenetCode, snn4imagenetPath, "", "") | |||
| } | |||
| brainScorePath := setting.JobPath + jobName + cloudbrain.BrainScoreMountPath | |||
| if setting.IsBrainScoreEnabled && jobType == string(models.JobTypeBrainScore) { | |||
| downloadRateCode(repo, jobName, setting.BrainScoreCode, brainScorePath, "", "") | |||
| } | |||
| err = cloudbrain.GenerateTask(ctx, jobName, image, command, uuid, codePath, modelPath, benchmarkPath, snn4imagenetPath, jobType, gpuQueue, resourceSpecId) | |||
| if err != nil { | |||
| cloudBrainNewDataPrepare(ctx) | |||
| @@ -568,6 +576,8 @@ func GetRate(ctx *context.Context) { | |||
| ctx.Redirect(setting.BenchmarkServerHost + "?username=" + ctx.User.Name) | |||
| } else if job.JobType == string(models.JobTypeSnn4imagenet) { | |||
| ctx.Redirect(setting.Snn4imagenetServerHost) | |||
| } else if job.JobType == string(models.JobTypeBrainScore) { | |||
| ctx.Redirect(setting.BrainScoreServerHost) | |||
| } else { | |||
| log.Error("JobType error:%s", job.JobType, ctx.Data["msgID"]) | |||
| } | |||
| @@ -5,6 +5,7 @@ import ( | |||
| "code.gitea.io/gitea/models" | |||
| "code.gitea.io/gitea/modules/log" | |||
| "code.gitea.io/gitea/modules/repository" | |||
| ) | |||
| //auto daily or manually | |||
| @@ -62,9 +63,12 @@ func RepoStatisticDaily(date string) { | |||
| continue | |||
| } | |||
| //beginTime, endTime := getStatTime(date) | |||
| //numVisits := repository.AppointProjectView(repo.OwnerName, repo.Name, beginTime, endTime) | |||
| numVisits := 0 | |||
| beginTime, endTime := getStatTime(date) | |||
| numVisits, err := repository.AppointProjectView(repo.OwnerName, repo.Name, beginTime, endTime) | |||
| if err != nil { | |||
| log.Error("Get numVisits failed", err) | |||
| numVisits = 0 | |||
| } | |||
| repoStat := models.RepoStatistic{ | |||
| RepoID: repo.ID, | |||
| @@ -50,6 +50,13 @@ | |||
| </a> | |||
| </div> | |||
| </div> | |||
| <div class="swiper-slide"> | |||
| <div class="ui card"> | |||
| <a class="image" href="https://git.openi.org.cn/JD_Group"> | |||
| <img src="/img/org-jd@2x-80.jpg" alt="京东" title="京东"> | |||
| </a> | |||
| </div> | |||
| </div> | |||
| <div class="swiper-slide"> | |||
| <div class="ui card"> | |||
| <a class="image" href="https://git.openi.org.cn/TensorLayer"> | |||
| @@ -89,6 +89,10 @@ | |||
| display: none; | |||
| } | |||
| .inline.required.field.cloudbrain_brainscore { | |||
| display: none; | |||
| } | |||
| .select2-container .select2-selection--single{ | |||
| height:38px !important; | |||
| } | |||
| @@ -130,12 +134,13 @@ | |||
| <input name="job_name" id="cloudbrain_job_name" placeholder="任务名称" value="{{.job_name}}" tabindex="3" autofocus required maxlength="255"> | |||
| </div> | |||
| <div class="inline required field" style="{{if .is_benchmark_enabled}}display:block;{{else if .is_snn4imagenet_enabled}}display:block;{{else}}display:none;{{end}}"> | |||
| <div class="inline required field" style="{{if ((.is_benchmark_enabled) or (.is_snn4imagenet_enabled) or (.is_brainscore_enabled))}}display:block;{{else}}display:none;{{end}}"> | |||
| <label>任务类型</label> | |||
| <select id="cloudbrain_job_type" class="ui search dropdown" placeholder="选择任务类型" style='width:385px' name="job_type"> | |||
| <option name="job_type" value="DEBUG">DEBUG</option> | |||
| <option name="job_type" value="BENCHMARK">BENCHMARK</option> | |||
| <option name="job_type" value="SNN4IMAGENET">SNN4IMAGENET</option> | |||
| <option name="job_type" value="BRAINSCORE">BRAINSCORE</option> | |||
| </select> | |||
| </div> | |||
| @@ -215,6 +220,10 @@ | |||
| <label>snn4imagenet脚本存放路径</label> | |||
| <input name="snn4imagenet_path" id="cloudbrain_snn4imagenet_path" value="{{.snn4imagenet_path}}" tabindex="3" autofocus required maxlength="255" readonly="readonly"> | |||
| </div> | |||
| <div class="inline required field cloudbrain_brainscore"> | |||
| <label>brainscore脚本存放路径</label> | |||
| <input name="brainscore_path" id="cloudbrain_brainscore_path" value="{{.brainscore_path}}" tabindex="3" autofocus required maxlength="255" readonly="readonly"> | |||
| </div> | |||
| <div class="inline required field" hidden> | |||
| <label>启动命令</label> | |||
| <textarea name="command" rows="10" readonly="readonly">{{.command}}</textarea> | |||
| @@ -250,11 +259,11 @@ | |||
| let value_task = $("input[name='job_name']").val() | |||
| let value_image = $("input[name='image']").val() | |||
| let value_data = $("input[name='attachment']").val() | |||
| let re = /^[a-z0-9][a-z0-9-_]{1,36}$/ | |||
| let re = /^[a-z0-9][a-z0-9-_]{1,35}[^_]$/ | |||
| let flag = re.test(value_task) | |||
| if(!flag){ | |||
| $('#messageInfo').css('display','block') | |||
| let str = '只能以小写字母或数字开头且只包含小写字母、数字、_和-、最长36个字符。' | |||
| let str = '只能以小写字母或数字开头且只包含小写字母、数字、_和-、最长36个字符,不能下划线(-)结尾。' | |||
| $('#messageInfo p').text(str) | |||
| return false | |||
| } | |||
| @@ -311,9 +320,12 @@ | |||
| $(".cloudbrain_benchmark").show(); | |||
| } else if ($(this).val() == 'SNN4IMAGENET') { | |||
| $(".cloudbrain_snn4imagenet").show(); | |||
| } else if ($(this).val() == 'BRAINSCORE') { | |||
| $(".cloudbrain_brainscore").show(); | |||
| } else { | |||
| $(".cloudbrain_benchmark").hide(); | |||
| $(".cloudbrain_snn4imagenet").hide(); | |||
| $(".cloudbrain_brainscore").hide(); | |||
| } | |||
| }) | |||
| }) | |||
| @@ -179,7 +179,7 @@ | |||
| let value_task = $("input[name='job_name']").val() | |||
| let re = /^[a-z0-9][a-z0-9-_]{1,36}$/ | |||
| let re = /^[a-z0-9][a-z0-9-_]{1,35}$/ | |||
| let flag = re.test(value_task) | |||
| if(!flag){ | |||
| $('#messageInfo').css('display','block') | |||
| @@ -11,16 +11,16 @@ | |||
| <div class="icon-wrapper"> | |||
| <i style="line-height: 1.5;color: #303643;font-weight: 900;" v-if="showInitTopic[i]" class="el-icon-check" ></i> | |||
| </div> | |||
| <div class="text">{{arr.topic_name}} </div> | |||
| <div class="text">{{arr.topic_name.toLowerCase()}} </div> | |||
| </div> | |||
| <div v-if="showInputValue" class="addition item-text" @click="postTopic"> | |||
| 点击或回车添加<b class="user-add-label-text">{{input}}</b>标签 | |||
| 点击或回车添加<b class="user-add-label-text">{{input.toLowerCase()}}</b>标签 | |||
| </div> | |||
| <div v-if="showAddTopic" class="item-text" @click="addPostTopic"> | |||
| <div class="icon-wrapper"> | |||
| <i style="line-height: 1.5;color: #303643;font-weight: 900;" v-if="showAddFlage" class="el-icon-check" ></i> | |||
| </div> | |||
| <div class="text">{{input}}</div> | |||
| <div class="text">{{input.toLowerCase()}}</div> | |||
| </div> | |||
| </div> | |||
| @@ -134,7 +134,7 @@ export default { | |||
| this.showSearchTopic = true | |||
| } | |||
| else if(this.arrayTopics.indexOf(this.input)>-1){ | |||
| else if(this.arrayTopics.indexOf(this.input.toLowerCase())>-1){ | |||
| this.showInputValue = false | |||
| this.showSearchTopic = false | |||
| @@ -142,7 +142,7 @@ export default { | |||
| this.showInitTopic = [] | |||
| let timestamp=new Date().getTime() | |||
| this.params.q = this.input | |||
| this.params.q = this.input.toLowerCase() | |||
| this.params._ = timestamp | |||
| this.$axios.get('/api/v1/topics/search',{ | |||
| params:this.params | |||
| @@ -224,11 +224,11 @@ export default { | |||
| return | |||
| }else{ | |||
| let topic = this.input | |||
| if(this.arrayTopics.includes(topic)){ | |||
| if(this.arrayTopics.includes(topic.toLowerCase())){ | |||
| return | |||
| } | |||
| else{ | |||
| this.arrayTopics.push(topic) | |||
| this.arrayTopics.push(topic.toLowerCase()) | |||
| let topics = this.arrayTopics | |||
| let strTopics = topics.join(',') | |||
| @@ -268,7 +268,7 @@ export default { | |||
| } | |||
| else if(!this.showAddFlage){ | |||
| let topic = this.input | |||
| this.arrayTopics.push(topic) | |||
| this.arrayTopics.push(topic.toLowerCase()) | |||
| let topics = this.arrayTopics | |||
| let strTopics = topics.join(',') | |||