<commit_before>﻿@*******************************************************************************************************
//  ConnectionProfileTasks.cshtml - Gbtc
//
//  Copyright © 2016, Grid Protection Alliance.  All Rights Reserved.
//
//  Licensed to the Grid Protection Alliance (GPA) under one or more contributor license agreements. See
//  the NOTICE file distributed with this work for additional information regarding copyright ownership.
//  The GPA licenses this file to you under the MIT License (MIT), the "License"; you may
//  not use this file except in compliance with the License. You may obtain a copy of the License at:
//
//      http://opensource.org/licenses/MIT
//
//  Unless agreed to in writing, the subject software distributed under the License is distributed on an
//  "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Refer to the
//  License for the specific language governing permissions and limitations.
//
//  Code Modification History:
//  ----------------------------------------------------------------------------------------------------
//  01/15/2016 - <NAME>
//       Generated original version of source code.
//
//*****************************************************************************************************@
@using System
@using System.Collections.Generic
@using System.Net.Http
@using System.Text
@using GSF
@using GSF.Identity
@using GSF.Web
@using GSF.Web.Model
@using openMIC
@using openMIC.Model
@using RazorEngine.Templating
@inherits ExtendedTemplateBase<AppModel>
@section StyleSheets {
    <link href="Content/Popup.css" rel="stylesheet">
}
@{
    DataContext dataContext = ViewBag.DataContext;
    HttpRequestMessage request = ViewBag.Request;
    Dictionary<string, string> parameters = request.QueryParameters();
    int parentID = int.Parse(parameters["ID"]);

    Layout = "Layout.cshtml";
    ViewBag.ShowMenu = false;
    ViewBag.Title = parameters["Name"] + " Tasks";
    ViewBag.PageControlScripts = new StringBuilder();

    ViewBag.HeaderColumns = new[]
    {   //    { "Field", "Label", "Classes" }
        new[] { "Name", "Name", "text-left" },
        new[] { null, "File Extensions", "text-center valign-middle" },
    };

    ViewBag.BodyRows = BodyRows().ToString();
    ViewBag.AddNewEditDialog = AddNewEditDialog(dataContext).ToString();
}
@helper BodyRows()
{
    <td width="35%" class="text-left valign-middle"><button type="button" class="btn btn-link" data-bind="text: Name, click: $parent.viewPageRecord"></button></td>
    <td width="60%" class="text-center"><div data-bind="text: $($element.parentElement).truncateToWidth(notNull(Settings).parseKeyValuePairs().get('fileextensions'), 2)"></div></td>
    <td width="5%" class="text-center valign-middle" nowrap>
        <button type="button" class="btn btn-xs" data-bind="click: $parent.editPageRecord, enable: $parent.dataHubIsConnected"><span class="glyphicon glyphicon-pencil"></span></button>
        <button type="button" class="btn btn-xs" data-bind="click: $parent.removePageRecord, enable: $parent.dataHubIsConnected"><span class="glyphicon glyphicon-remove"></span></button>
    </td>
}
@helper AddNewEditDialog(DataContext dataContext)
{
    <div class="col-md-6">
        @Raw(dataContext.AddInputField<ConnectionProfileTask>("Name", initialFocus: true))
        @Raw(dataContext.AddInputField("get('fileextensions')", true, fieldLabel: "File Names or Extensions to Download", fieldID: "inputFileExtensions", groupDataBinding: "with: $root.connectionString", toolTip: "Separate multiple file names or extension patterns with commas", enableHotLinks: false))
        @Raw(dataContext.AddInputField("get('remotepath')", true, fieldLabel: "Remote Path", fieldID: "inputRemotePath", groupDataBinding: "with: $root.connectionString", enableHotLinks: false))
        @Raw(dataContext.AddInputField("get('localpath')", true, fieldLabel: "Local Path", fieldID: "inputLocalPath", groupDataBinding: "with: $root.connectionString", toolTip: string.Format("User \"{0}\" will need rights to this folder or local path authentication will need to be specified >>", UserInfo.CurrentUserID).HtmlEncode(), enableHotLinks: false))
        <div class="checkbox" data-bind="with: $root.connectionString">
            <label><input type="checkbox" data-bind="checked: get('recursivedownload'), attr: {'disabled': ($root.recordMode()===RecordMode.View ? true : undefined)}"> Recursively download matching files in all sub-folders</label><commit_msg>Added tooltip for remote path<commit_after>﻿@*******************************************************************************************************
//  ConnectionProfileTasks.cshtml - Gbtc
//
//  Copyright © 2016, Grid Protection Alliance.  All Rights Reserved.
//
//  Licensed to the Grid Protection Alliance (GPA) under one or more contributor license agreements. See
//  the NOTICE file distributed with this work for additional information regarding copyright ownership.
//  The GPA licenses this file to you under the MIT License (MIT), the "License"; you may
//  not use this file except in compliance with the License. You may obtain a copy of the License at:
//
//      http://opensource.org/licenses/MIT
//
//  Unless agreed to in writing, the subject software distributed under the License is distributed on an
//  "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Refer to the
//  License for the specific language governing permissions and limitations.
//
//  Code Modification History:
//  ----------------------------------------------------------------------------------------------------
//  01/15/2016 - <NAME>
//       Generated original version of source code.
//
//*****************************************************************************************************@
@using System
@using System.Collections.Generic
@using System.Net.Http
@using System.Text
@using GSF
@using GSF.Identity
@using GSF.Web
@using GSF.Web.Model
@using openMIC
@using openMIC.Model
@using RazorEngine.Templating
@inherits ExtendedTemplateBase<AppModel>
@section StyleSheets {
    <link href="Content/Popup.css" rel="stylesheet">
}
@{
    DataContext dataContext = ViewBag.DataContext;
    HttpRequestMessage request = ViewBag.Request;
    Dictionary<string, string> parameters = request.QueryParameters();
    int parentID = int.Parse(parameters["ID"]);

    Layout = "Layout.cshtml";
    ViewBag.ShowMenu = false;
    ViewBag.Title = parameters["Name"] + " Tasks";
    ViewBag.PageControlScripts = new StringBuilder();

    ViewBag.HeaderColumns = new[]
    {   //    { "Field", "Label", "Classes" }
        new[] { "Name", "Name", "text-left" },
        new[] { null, "File Extensions", "text-center valign-middle" },
    };

    ViewBag.BodyRows = BodyRows().ToString();
    ViewBag.AddNewEditDialog = AddNewEditDialog(dataContext).ToString();
}
@helper BodyRows()
{
    <td width="35%" class="text-left valign-middle"><button type="button" class="btn btn-link" data-bind="text: Name, click: $parent.viewPageRecord"></button></td>
    <td width="60%" class="text-center"><div data-bind="text: $($element.parentElement).truncateToWidth(notNull(Settings).parseKeyValuePairs().get('fileextensions'), 2)"></div></td>
    <td width="5%" class="text-center valign-middle" nowrap>
        <button type="button" class="btn btn-xs" data-bind="click: $parent.editPageRecord, enable: $parent.dataHubIsConnected"><span class="glyphicon glyphicon-pencil"></span></button>
        <button type="button" class="btn btn-xs" data-bind="click: $parent.removePageRecord, enable: $parent.dataHubIsConnected"><span class="glyphicon glyphicon-remove"></span></button>
    </td>
}
@helper AddNewEditDialog(DataContext dataContext)
{
    <div class="col-md-6">
        @Raw(dataContext.AddInputField<ConnectionProfileTask>("Name", initialFocus: true))
        @Raw(dataContext.AddInputField("get('fileextensions')", true, fieldLabel: "File Names or Extensions to Download", fieldID: "inputFileExtensions", groupDataBinding: "with: $root.connectionString", toolTip: "Separate multiple file names or extension patterns with commas", enableHotLinks: false))
        @Raw(dataContext.AddInputField("get('remotepath')", true, fieldLabel: "Remote Path", fieldID: "inputRemotePath", groupDataBinding: "with: $root.connectionString", toolTip: "Available template fields include year as <YYYY> or <YY>, month as <MM>, day as <DD>, Month # as <Month MM>, Day # as <Day DD>, Yesterday(Day #-1) as <Day DD-1>, device name as <DeviceName>, device acronym as <DeviceAcronym>, device folder name as <DeviceFolderName> and connection profile name as <ProfileName>", enableHotLinks: false ))
        @Raw(dataContext.AddInputField("get('localpath')", true, fieldLabel: "Local Path", fieldID: "inputLocalPath", groupDataBinding: "with: $root.connectionString", toolTip: string.Format("User \"{0}\" will need rights to this folder or local path authentication will need to be specified >>", UserInfo.CurrentUserID).HtmlEncode(), enableHotLinks: false))
        <div class="checkbox" data-bind="with: $root.connectionString">
            <label><input type="checkbox" data-bind="checked: get('recursivedownload'), attr: {'disabled': ($root.recordMode()===RecordMode.View ? true : undefined)}"> Recursively download matching files in all sub-folders</label>
{'fraction_non_alphanumeric': 0.19402028830752802, 'fraction_numerical': 0.004484783769353977, 'mean_word_length': 4.432714617169373, 'pattern_counts': {'":': 0, '<': 70, '<?xml version=': 0, '>': 74, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2894572', 'n_tokens_mistral': 2539, 'n_tokens_neox': 2461, 'n_words': 733}